<zmdkrbou>
yes but i was speaking of "actually participating" :)
<zmdkrbou>
but i don't know
<psed>
ah
<psed>
me neither, then
<psed>
anyway, this was the best contest I've ever taken part in
<psed>
and I did my share of ACMs and olympics ;)
<smimou>
yes, much more fun than past years
<psed>
hacking into UMIX was just like a movie ;)
<psed>
and yet much more real
slipstream has joined #ocaml
magnus-- has quit ["Leaving"]
slipstream-- has quit [Read error: 110 (Connection timed out)]
love-pingoo has quit ["Connection reset by pear"]
hikozaemon has quit ["Leaving..."]
<zvrba>
anyone alive?
<zmdkrbou>
yup
<zvrba>
what's the preferred style of defining functions?
* zmdkrbou
kills zvrba .oO( hin hin hin, i'm the only one left ! \o/ )
<zmdkrbou>
let f x y = x + y
<zvrba>
that vs. let f (x,y) = x + y
<zvrba>
?
<zmdkrbou>
oh, it's curryfied vs. uncurryfied
<zvrba>
yeah, so which one is preferred and why?
<zmdkrbou>
f x y (aka curryfied) is better :)
<zvrba>
heeh
<zvrba>
:)
<zmdkrbou>
it's better because you can do partial application
<zvrba>
i understand that part
<zvrba>
so why does sml standard library define many functions as uncurrified?
<zvrba>
(nobody alive in #sml :P)
magnus- has joined #ocaml
<zmdkrbou>
heh
* zmdkrbou
won't say "because sml sucks"
<zmdkrbou>
really, i don't know
<zvrba>
some people wouldn't agree with you :P
<zmdkrbou>
that sound strange
<zvrba>
what?
<zmdkrbou>
that they use uncurryfied versions
<zvrba>
it seems that only higher-order functions are currified
<zvrba>
taking the function as 1st argument and the rest as a tuple
<zvrba>
which kinda makes sense to me..
<zmdkrbou>
bof, depends on the function
falconair_ has joined #ocaml
<zmdkrbou>
but i don't see the interest
<zvrba>
a matter of style I guess
* zmdkrbou
prefers full curryfied form for aesthetic reasons (and partial application reason)
<zvrba>
ok, i got that part :P
<zvrba>
:)
<zvrba>
can you pattern-match on non-currified versions?
<zvrba>
or you have to make smth. like match (x,y) with ...
<magnus->
I think curried functions are stupid
<magnus->
in the sense that they have a specific order of specialization as you apply arguments
<zmdkrbou>
zvrba: you can only match one argument so yes, you have to group in a tuple
<zvrba>
:)
<zmdkrbou>
magnus-: man labels
<falconair_>
i recently started looking at ocaml (i have mainly java background)....for some reason I can't find any thing about threads in ocaml...can any one help me out here
<magnus->
zmdkrbou: okay
<zmdkrbou>
plus you can't do partial application in uncerryfied versions so "specialization" is meaningless
<zmdkrbou>
falconair_: the most important thing to know about is : ocaml sucks at threading
<zvrba>
zmdkrbou: i'm sure you can always define a lambda
<zmdkrbou>
?
<zvrba>
zmdkrbou: and tumble function arguments as you like
<zvrba>
anonymous functions
<zmdkrbou>
so what ?
<zvrba>
so nothing
* zmdkrbou
doesn't get it, sorry
<zvrba>
it's not like you "can't do" partial applications of non-currified functions
<zmdkrbou>
oh, yep
<zmdkrbou>
but doing partial application of uncurryfied functions is like taking the 1 times curryfied version and applying it to the rest of the args ...
<falconair_>
zmdkrbou: would you happen to know if the same is true of F# ?
<zmdkrbou>
beeeeurk F# :)
<zmdkrbou>
i don't know anything about F# ...
<falconair_>
crap, just how bad is concurrent stuff on ocaml? I was thinking of writing an app to process streaming data (like stock quotes)
<zmdkrbou>
falconair_: but i hope for F# it has better threads support ... otherwise it's pure waste
<zmdkrbou>
falconair_: there's is a *big* problem with concurrence and threads in ocaml
<zmdkrbou>
you can use separate processes :)
<magnus->
falconair: I think SML and haskell are both better at concurrent stuff
<magnus->
tho don't quote me on that
<falconair_>
haskell monads make me want to kill my self
<magnus->
falcon: agreed... so perhaps SML might work
<zmdkrbou>
falconair_: you may try mlton, i think it would be much better for threads
<zmdkrbou>
from what i heard
<zvrba>
monads! :)
<falconair_>
i was interested in ocaml, in part, because it is fairly popular and actually used by some financial houses...is mlton more than an academic lang?
* zvrba
just reading on category theory :D
<zvrba>
yes
<magnus->
mlton is an implementation of SML (Standard ML)
<magnus->
there's another implementation too called SML/NJ
<zvrba>
and Poly/ML
<falconair_>
zvrba: i tried understanding category theory too...i know functors and morphisms but i don't have a clue what they actually mean
<zvrba>
and MoscowML
<zvrba>
...
<zvrba>
falconair_: well, i just bought a decent book
<zvrba>
it's nice abstraction
<falconair_>
zvrba: i might have it :)
<falconair_>
which one?
<zvrba>
conceptual mathematics
<zmdkrbou>
falconair_: mlton is more than an academic lang, it's aimed at being used in "real life" yes
<zmdkrbou>
i would say ocaml is more academic
<zvrba>
a first introduction to categories
<zvrba>
and smerdyakov would say that ocaml is an ugly hack ontop of SML :)
<falconair_>
zvrba: isn't that the one that is supposed to be for high school students?
<zmdkrbou>
rhoo
<zmdkrbou>
:)
<magnus->
falconair: mlton gives fast executables, SML/NJ is nice for development
<zvrba>
falconair_: so... ?
<zvrba>
it's nice as an introduction
<zvrba>
gives you a background for more advanced stuff if you need it
<falconair_>
nothing wrong with it, i guess despite a few attempts i'm apparently not motivated enough (in other words, too stoopid) :)
<zmdkrbou>
hahah categories for high school students
<zmdkrbou>
man, you have some great skilled schools there :)
<magnus->
which emacs mode is to prefer for ocaml?
<zmdkrbou>
vim :)
<falconair_>
i thought Pierce's Category Theory for Comp. Scientists is better...at least it gets to be point more quickly
<magnus->
tuareg or ocaml-mode?
<zvrba>
falconair_: i got that one too
<smimou>
tuareg
<magnus->
smimou: thanks
<zvrba>
falconair_: i decided to leave it for later :P
<zvrba>
falconair_: no use of getting quicker to the point if you don't understand the point :P
<zvrba>
the 1st one is easy to read
<zvrba>
many examples
<falconair_>
but you find out more quickly if it is over your head :)
<zvrba>
huh?
<zvrba>
find out what? it's not that i'm in a hurry...
<falconair_>
thanks dudes, looks google tells me that haskell has a nice thread library, so i'm off to #haskell
<zvrba>
... :P
<zvrba>
good luck :D
<zvrba>
are you sure you need threads?
<zvrba>
List.map
<zvrba>
(Word.fromInt o Option.valOf o Int.fromString)