Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

APL Worth The Effort

Name: Anonymous 2011-08-03 21:02

Hi, Does anyone here think learni ing APL is worth the effort, I know a few people who revere it as the optiomy of programing but im skeptical. I have a pretty strong background in functional languages (Haskell, CL , Clojure, Scheme, Qi , etc.) and have read my SICP so its concepts shouldnt be too hard for me to learn but I want to know what makes APL 'special' and when it comes down to it useful.

Name: Anonymous 2011-08-03 21:10

Showing results for epitome. Search instead for optiomy.

Name: Anonymous 2011-08-03 21:25

The good thing of APL are the array operations. I'd say it wouldn't be bad to try it, especially because all the languages I know suck at array processing.

Name: Anonymous 2011-08-03 21:41

>>3
Ocaml, do it. It's awesome.
http://dis.4chan.org/read/prog/1312136162/

Name: Anonymous 2011-08-03 22:49

Name: Anonymous 2011-08-04 0:33

>>5
Most of that shit is because he expects some kind of dynamic language. It's pretty retarded and I can't believe people are actually put off O'Caml by it.

Name: Anonymous 2011-08-04 0:40

I might try J first. J is a version of APL which uses only ASCII characters. I tried out J for a few days and I liked it. Though one problem being that it's almost a write only language and you have to keep at it for a while learning the vocabulary.

Name: Anonymous 2011-08-04 1:13

>>5
I just had to reply to that (in the least time consuming way possible). It is so annoying. I feel like he is expecting Lisp and is pissed that it's not lisp. He actually complained about not having dynamic types...


False Sense of Security
I am sorry that you are retarded.

Few Basic Types
Ocaml has matrices now (Bigarray). One floating point type can be nice or not nice. There are modules.

Silent Integer Overflow
Hurrr.

Module Immutability
Keep your own functions in your own modules. You should not be changing module signatures randomly.

Polymorphism Causes Run-time Type Errors
This cannot be avoided wit ad-hoc polymorphism.

No Macros
Kill yourself. Also, camlp4.

Record field naming hell
Records are typed. It can be good or inconvenient. Also, variant labels.

No Polymorphism
Kill yourself. This is supposed to be strictly typed language. Stop complaining about there being no automatic coersion.

Inconsistent function sets
An actual point.

No dynamic variables
KILL YOURSELF.

Optional arguments suck
I think they are good and very useful. Expecially when using foreign functions.

Partial argument application inconsistency (for optional arguments)
Maybe a good point.

Arithmetic's readability (for example Int64)
He doesn't want to define infix operations or have macros. What the fuck does he want?

Silent name conflict resolution
Point.

Order of evaluation
This is a function language, retard.

No object input/output (ie. print is not polymorphic)
Point. This might be nice.

Complains about debuggin.
Actually good points. Though I don't mind the debugging problems because the debugger can backtrack (this is incredibly useful).

GC sucks
I guess. I don't know about this.

Function round is absent
Sorry you are retarded.

List.map is not tail-recursive!
An actual annoyance.

Lists are immutable, thus cannot be spliced - non-consing operation is impossible.
Kill yourself. It's not meant to be b/c this is a functional language, retard. (Also, Stack module)

Name: Anonymous 2011-08-04 7:17

>>8
I just had to reply to this. You're so annoying. I feel like you are thinking that these are the imageboards.
I feel like he is expecting Lisp and is pissed that it's not lisp.
You may want to read more than what you want to read. Like, the whole thing.
I am sorry that you are retarded.
That's a nice argument to debunk a statement, isn't it?
Many static type users do think that if it compiles, it must work.
Hurrr.
Again, nice argument. You seriously convinced me that letting integer overflowing without throwing an exception is a good idea!
#;> (fixnum? (- (expt 2 30) 1))
#t
#;> (fixnum? (expt 2 30))
#f
#;> (fx+ (- (expt 2 30) 1) 1)
fx+: result is not a fixnum: 1073741824

Keep your own functions in your own modules. You should not be changing module signatures randomly.
He is actually (partially) wrong, but you miss the point.
If the behavior of some function has to be changed, use a functor.
But if it's just a module, you can't do much.
This cannot be avoided wit ad-hoc polymorphism.
It can raise a warning.
Kill yourself. Also, camlp4.
Such a strong argument. Kill yourself! You must be a real man.
Also,
The conspicuous absence of macros cannot be obscured by the presence of preprocessors.
Records are typed. It can be good or inconvenient. Also, variant labels.
I don't see how this:
Cannot have two record types in the same file that have a field with the same name (and before version 3.09, you could not have a record field named contents!)
has something to do with types. Especially the ``contents'' part.
Kill yourself. This is supposed to be strictly typed language. Stop complaining about there being no automatic coersion.
Haskell is too:
Prelude> 2 + 2.0
4.0

KILL YOURSELF.
Oh, I understand now: You see the word ``dynamic'', ``static'', you immediately think of the typing. No, silly. He's talking about dynamically scoped variables, which are really useful with optional arguments.
Again, strong argument.
I think they are good and very useful. Expecially when using foreign functions.
He thinks that too, he's complaining about OCaml's:
- The default values of the optional arguments cannot depend on positional arguments because of the calling conventions: to make function call delimiters optional, every function call for a function with optional arguments is required to end with a positional argument.
- Values do not match:
   val foo : ?arg:string -> unit -> unit
 is not included in
   val bar : unit -> unit
even though foo can be called exactly like bar, so one has to use (fun () -> foo ()) instead of foo.
- The default values of optional arguments restrict the possible type the argument may take. E.g., in
 let max_len ?(key=(fun x -> x)) strings =
   Array.fold_left ~init:0 strings ~f:(fun acc s ->
     max acc (String.length (key s)))
the type of key is string -> string, not 'a -> string as it would have been if the argument were required.
So, how about you read the article first, and then be an uneducated moron?
He doesn't want to define infix operations or have macros. What the fuck does he want?
Polymorphic arithmetic operators like in Haskell?
This is a function language, retard.
It is not pure, it permits side effects, so the order of evaluation matters.
Sorry you are retarded.
What?
Kill yourself. It's not meant to be b/c this is a functional language, retard. (Also, Stack module)
You have a point. Except that the b/c, ``kill yourself'', and retard make me want to punch you in the face, you don't say why immutable lists are good.

So, in the end, kill yourself.

Name: Anonymous 2011-08-04 7:17

>>8
Why are you replying to something a decade old here? That guy won't ever read it.

Name: Anonymous 2011-08-04 9:01

>>10
Ehh, starts kind of a discussion.

>>9
If you think that if it compiles and it must work, then there is no help for you. Sorry but thinking that is just retarded. There is no other way to put it.

Speed is important in Ocaml, which is why it does integer overflowing without throwing an exception. It would really be bad if you check bounds for every arithmetic operation.

I really don't like or see the dire need for macros. Which is why I said kill yourself.

Cannot have two record types in the same file that have a field with the same name (and before version 3.09, you could not have a record field named contents!)
You have to declare the type of a record in Ocaml. You can't just have any arbitrarily named record here. (ie. You have to say type vec3 = {x:float; y:float; z:float} before you do let pt = {x=0.; y=0.; z=0.}).
Anyway, now you can actually do type vec4 = {x:float; y:float; z:float; w:float}. So it doesn't matter anymore.

dynamically scoped variables
Fine, he wants it. Can you have dynamically scoped variables and lexical scoping in the same language? I really don't know. If you can't have both, then it's stupid to complain about it.

automatic coersion.
>> Haskell is too:
>> Prelude> 2 + 2.0
>> 4.0
This would be convenient. But he wanted automatic fromInt, fromFloat, etc which is ridiculous.

Optional arguments.
I am pretty sure you just copied that without understanding, you moron. ...but I didn't read it either. Here goes.
The default values of the optional arguments cannot depend on positional arguments because of the calling conventions
This actually is a good point. This would be convenient.
to make function call delimiters optional, every function call for a function with optional arguments is required to end with a positional argument.
What does this even mean?
even though foo can be called exactly like bar, so one has to use (fun () -> foo ()) instead of foo.
This actually works like he expects now.
The default values of optional arguments restrict the possible type the argument may take
The compiler restricts the type as much as possible from inference and clearly (fun x -> x) : a -> a. But he might have a point since it's an optional argument.

Polymorphic arithmetic operators like in Haskell?
Ocaml doesn't have it and it's slow.

It is not pure, it permits side effects, so the order of evaluation matters.
It's still a functional language. You have to explicitly give it side effects as in

print blah ;
return_stuff

rather than do side effects in a function call. The semantics of functional stuff and mutable stuff should be clearly separated in a functional language. Else it's just bad style.

you don't say why immutable lists are good.
It's a persistent data structure. What do you want? Why would you expect every data structure to be mutable. It's just stupid.

Also, NO U.

Name: Anonymous 2011-08-04 9:22

fuck i hate lispers they're so fucking faggy

Name: Anonymous 2011-08-04 10:47

Speed is important in Ocaml, which is why it does integer overflowing without throwing an exception. It would really be bad if you check bounds for every arithmetic operation.
Does it do bound checking on vectors? Because it would be bad if you check bounds for every vector operation.
The compiler should have a flag to disable both array and integer overflow checks.
I really don't like or see the dire need for macros. Which is why I said kill yourself.
You don't like.
Fine, he wants it. Can you have dynamically scoped variables and lexical scoping in the same language? I really don't know. If you can't have both, then it's stupid to complain about it.
You can, they're called, well, dynamic variables (or special variables in CL, or parameters in Scheme)
See: defvar, defparameter in CL, parameters in Scheme, http://okmij.org/ftp/ML/dynvar.ml for any language with multi-prompt delimited continuations.
This would be convenient. But he wanted automatic fromInt, fromFloat, etc which is ridiculous.
Isn't that exactly what Haskell does?
What does this even mean?
That's the description of the calling convention, I think.
Ocaml doesn't have it and it's slow.
How? It's statically typed, I'm sure it could compile to the right operation, skipping checks, in most cases just by looking at the types.
The semantics of functional stuff and mutable stuff should be clearly separated in a functional language. Else it's just bad style.
I have to agree.
It's a persistent data structure. What do you want? Why would you expect every data structure to be mutable. It's just stupid.
I know, but you what you said was ``it's functional, so it must be immutable''.

Name: Anonymous 2011-08-04 17:35

>>13

>>This would be convenient. But he wanted automatic fromInt, fromFloat, etc which is ridiculous.
>Isn't that exactly what Haskell does?

I said automatic. As in not having to write those fns. This is what he said:
>Cannot add an int to a float - need an explicit cast. This is an obvious deficiency
which is just retarded in a strictly typed language.


How? It's statically typed, I'm sure it could compile to the right operation, skipping checks, in most cases just by looking at the types.

I think you would need a whole program compiler for it to compile to the correct operation. I am pretty sure ghc does not do it right now. What it does now is implicitly pass a dictionary along with the polymorphic function. And at runtime, it looks up the dictionary. It's pretty slow.

Also, technically, if it's functional it must be immutable. Everything else is imperative.

Anyway, I would reluctantly have to agree with you on the rest even though I don't like macros, don't like overflow checking, and don't know how dynamic variables could ever be useful. But the guy who wrote that is still a huge retard for expecting Ocaml to be Lisp.

Name: Anonymous 2011-08-04 18:40

>>13
AAAAAAAAAAAAAAAAAAAAAAAA!!!!!
How do you quote without newline!!

Name: Anonymous 2011-08-04 18:42

>>15
> multi[o]
line
quote
[/o]Normal without newline.
multi
line
quote
Normal without newline.

Name: Anonymous 2011-08-04 19:02

Use [br]

Name: Anonymous 2011-08-04 19:43

>>17
They are equivalent.

Name: Anonymous 2011-08-05 15:59

>>17
BR?

HUEHUEHUEHUEHUE

Name: Anonymous 2011-08-05 16:00

>>17
It didn't work, shitcunt.

Name: Anonymous 2011-08-05 16:02

I'm
tring.

Name: Anonymous 2011-08-05 18:37

>>7
From the wiki page:
quicksort=: (($:@(<#[) , (=#[) , $:@(>#[)) ({~ ?@#)) ^: (1<#)
It's like learning a completely new language.

Name: Anonymous 2011-08-05 18:40

>>22
I thought that was Perl code for a moment.

Don't change these.
Name: Email:
Entire Thread Thread List