mbishop changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab Ocaml 3.10.0 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
thruspa has quit []
netx has joined #ocaml
seafoodX has quit []
pantsd has joined #ocaml
seafoodX has joined #ocaml
seafoodX has quit []
Smerdyakov has quit [Remote closed the connection]
Smerdyakov has joined #ocaml
schme`` has quit [Remote closed the connection]
schme has joined #ocaml
seafoodX has joined #ocaml
buluca has quit [Read error: 113 (No route to host)]
magnus__ has quit [Read error: 110 (Connection timed out)]
magnus_ has joined #ocaml
Smerdyakov has quit ["Leaving"]
joshcryer has joined #ocaml
G has quit [Remote closed the connection]
bluestorm_ has joined #ocaml
vuks has quit [Read error: 110 (Connection timed out)]
pango has quit [Remote closed the connection]
pango has joined #ocaml
<flux> bluestorm_, that automatic constructor wouldn't work anyway with constructors defined in other modules, so it's better to convert the type into a set of functions which can be exported in the interface
<bluestorm_> hm
<bluestorm_> right
<flux> I wonder how realistic the name collision problem is.. still real, I suppose
<flux> perhaps something like type .. with cons(~prefix:"_") if the user so desires
<flux> or some other notation
<bluestorm_> flux: http://pastebin.be/4585
<flux> is that manually or automatically translated? but yes, something like that would be fun
<bluestorm_> it's automatically done
G has joined #ocaml
<flux> nice. where's the source? perhaps I should resume my attempts to learn campl4 also ;)
<flux> I've made one macro, which is like DEBUG "%s %d" "foo" 42, which translates into something like (match debug with None -> () | Some x -> x "%s %d" "foo" 42) but it had its problems also
<flux> also I haven't yet moved to ocaml 3.10, so the old camlp4 for me..
<bluestorm_> i had issues with some quotations patterns so the code could be better
<bluestorm_> (i mean the big Ast.stTyp thing)
<flux> I'll move myself to the office now so I'll check that out later
<bluestorm_> but at least it works
<bluestorm_> hm
<bluestorm_> ocamlc -c -I +camlp4 camlp4lib.cma -pp camlp4orf concurry.ml
<bluestorm_> (but i think it requires 3.10)
ednarofi has joined #ocaml
slipstream-- has quit [Read error: 104 (Connection reset by peer)]
ednarofi has quit [Read error: 110 (Connection timed out)]
slipstream has joined #ocaml
Tetsuo has joined #ocaml
Mr_Awesome has quit ["aunt jemima is the devil!"]
Tetsuo has quit [Read error: 104 (Connection reset by peer)]
Tetsuo has joined #ocaml
slipstream-- has joined #ocaml
slipstream has quit [Read error: 113 (No route to host)]
m3ga has joined #ocaml
Cygaal has joined #ocaml
joshcryer has quit [Read error: 113 (No route to host)]
crabstick has joined #ocaml
slipstream has joined #ocaml
seafoodX has quit [Read error: 110 (Connection timed out)]
slipstream-- has quit [Read error: 113 (No route to host)]
joshcryer has joined #ocaml
seafoodX has joined #ocaml
zmdkrbou_ is now known as zmdkrbou
seafoodX has quit [Read error: 104 (Connection reset by peer)]
slipstream-- has joined #ocaml
slipstream has quit [Read error: 110 (Connection timed out)]
buluca has joined #ocaml
Demitar has quit [Read error: 113 (No route to host)]
seafoodX has joined #ocaml
slipstream-- has quit [Read error: 104 (Connection reset by peer)]
m3ga has quit ["disappearing into the sunset"]
slipstream has joined #ocaml
tty56 has joined #ocaml
cpst has quit [Read error: 110 (Connection timed out)]
buluca has quit [Remote closed the connection]
seafoodX has quit []
pango has quit [Remote closed the connection]
pango has joined #ocaml
piggybox has joined #ocaml
piggybox has quit [Read error: 104 (Connection reset by peer)]
postalchris has joined #ocaml
piggybox has joined #ocaml
crathman has joined #ocaml
smimou has quit ["bli"]
pango has quit [Remote closed the connection]
pango has joined #ocaml
Smerdyakov has joined #ocaml
postalchris has quit ["Leaving."]
malc_ has joined #ocaml
EliasAmaral has quit [Read error: 104 (Connection reset by peer)]
<flux> bluestorm_, ooh, apparently the new camlp4 is object-based now?
<bluestorm_> hm
<bluestorm_> just a part of it
<bluestorm_> some parts
<bluestorm_> Ast.fold and Ast.map are
buluca has joined #ocaml
<bluestorm_> flux: but it's highly module-based
<bluestorm_> functors everywhere
schme has quit [Remote closed the connection]
<danderson> holy crap
<danderson> ocaml rocks.
* danderson discovers how much so little can do with a few examples of using Graphics
schme has joined #ocaml
<bluestorm_> :p
<bluestorm_> danderson: what are you doing ?
<danderson> following ocaml-tutorial.org
<bluestorm_> (i have the usual fractals around, but seeing nice pictures is always nice )
<bluestorm_> hm
<danderson> one example given pretty early on to illustrate program structure is http://code.bulix.org/02unlk-53259
<bluestorm_> you learned ocaml from scratch with ocaml-tutorial ?
<danderson> bluestorm_: never said I learned anything :)
<danderson> am learning.
<bluestorm_> :p
<bluestorm_> ok
* rwmjones watches & wonders
<bluestorm_> i ask that because i learned ocaml before i knew ocaml-tutorial, so i don't know what it's worth for beginners
<danderson> so far, it's pretty good.
<bluestorm_> instead of read_line () you could use ignore (Graphics.read_key ())
<bluestorm_> ok
<danderson> I'm still in the general program structure section, the very first
<danderson> but it's doing a good job of telling me what to "ignore for now, we'll get to that later", and highlighting common gotchas for newbies.
<bluestorm_> hm
<bluestorm_> i guess i should read it entirely one day
<bluestorm_> quick glances aren't enough
thruspa has joined #ocaml
lde` has joined #ocaml
<flux> you know what would be fun
lde has quit [No route to host]
<flux> an adaptation of Graphics-module and ocaml compiler so that paste-sites could display the resulting graphics next to the paste
<flux> (safely, I'm thinking the work done on evaluating stuff on the bot)
<flux> I doubt it would find much use, though :)
<danderson> heh
damg has joined #ocaml
seafoodX has joined #ocaml
joshcryer has quit [Nick collision from services.]
joshcryer has joined #ocaml
fridim has joined #ocaml
ygrek has joined #ocaml
seafoodX has quit []
[1]damg has joined #ocaml
_JusSx_ has joined #ocaml
malc_ has quit ["leaving"]
[1]damg has quit [Read error: 104 (Connection reset by peer)]
damg has quit [Read error: 110 (Connection timed out)]
smimou has joined #ocaml
buluca has quit [Read error: 113 (No route to host)]
fridim has quit [Read error: 110 (Connection timed out)]
buluca has joined #ocaml
cpst has joined #ocaml
buluca has quit [Read error: 113 (No route to host)]
buluca has joined #ocaml
ygrek has quit [Remote closed the connection]
buluca has quit [Read error: 113 (No route to host)]
scruffie has joined #ocaml
Mr_Awesome has joined #ocaml
jlouis_ is now known as jlouis
Demitar has joined #ocaml
thruspa has left #ocaml []
screwt8 has quit [Remote closed the connection]
kelaouchi has joined #ocaml
buluca has joined #ocaml
_JusSx_ has quit ["leaving"]
<danderson> I'm following ocaml-tutorial.org, and I'm a little confused by an example of partial application.
<danderson> let multiply n = List.map (( * ) n);;
<xavierbot> val multiply : int -> int list -> int list = <fun>
<danderson> (nice, an evalbot)
<danderson> so, I understand that multiply in this case is a partial application of both the multiplication operator and List.map
<danderson> but what are the exact semantics when you have nested partial applications like that?
<danderson> which argument comes first in the resulting function?
<Smerdyakov> You don't need a rule for this special case.
<danderson> (in this case, it's obviously the argument to ( * ), but I don't see the why)
<Smerdyakov> Do you understand what currying is?
<danderson> yes
<Smerdyakov> So you understand that, for instance, ( * ) takes the first operand and returns a new function that adds that value to its operand?
<danderson> yes. And that List.map does the same with this new function.
<danderson> hmm, okay, let me scribble how the types compose as a result of that, see if I can make sense of it.
<danderson> okay, I think I understand the reasoning behind the ordering of arguments in the resulting function.
<danderson> ah, and with the type signature of List.map, it becomes entirely clear. I was missing that its first argument is ('a -> 'b).
<danderson> Thanks.
<Smerdyakov> No problem. You're probably just shocked by how simple OCaml's typing rules are compared to mainstream languages'. :)
<danderson> not shocked about the simplicity that strict typing brings along, but currying is still very new, so I expect I'll need some time to get used to it :)
<danderson> until then, yay for interactive evaluation to see what the signature is
Tetsuo has quit ["Leaving"]
piggybox has quit [Read error: 110 (Connection timed out)]
* danderson 's brain explodes as he tries to parse functors
bluestorm_ has quit [No route to host]
kelaouch1 has joined #ocaml
m3ga has joined #ocaml
m3ga has quit [Read error: 104 (Connection reset by peer)]
crathman has quit [Read error: 110 (Connection timed out)]
Cygaal has quit []
kelaouchi has quit [Read error: 110 (Connection timed out)]
piggybox has joined #ocaml