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!)
seafoodX has quit []
<fremo> ocaml seems to be 10 times slower to compile on my celeron 2.4GHz on OpenBSD than on my core duo 1.6GHz on linux...
<fremo> without -j make option
<mbishop> ...and is that a surprise?
<fremo> heh :)
<fremo> you say that because of the CPU or the OS ?
<fremo> maybe the security extension of gcc on openbsd slow down ocamlrun...
<fremo> I dont know what's the difference between the celeron and the core duo...
CRathman has quit [Read error: 110 (Connection timed out)]
<fremo> hum, sorry, that's juste my computer that have a problem... it's surprising, there is something wrong, on a core duo 1.6GHz, Linux, 3m00, on a via c7 2GHz, OpenBSD, 7m13s, on a Celeron 2.4GHz dual channel ram, 45 minutes...
jlouis_ has joined #ocaml
jlouis has quit [Read error: 110 (Connection timed out)]
lkhlkh has joined #ocaml
mordaunt has quit [Nick collision from services.]
lkhlkh is now known as mordaunt
buluca has quit [Read error: 113 (No route to host)]
CRathman has joined #ocaml
Smerdyakov has quit ["Leaving"]
<CRathman> can't figure out what I'm doing wrong: was using OCamlWinPlus interactive tool - shifted to ocamlc....
<CRathman> let f () = function | `V -> () | _ -> failwith "Error"
<CRathman> let x = f ()
<CRathman> gives error in ocamlc: The type of this expression, _[> `V ] -> unit, contains type variables that cannot be generalized
<CRathman> works fine in ocamlwinplus
<CRathman> any idea what I'm doing wrong? (or not doing). thanks.
seafoodX has joined #ocaml
<grirgz> CRathman: why do you define a function wich take unit as parameter ?
<grirgz> i think what you want is let f = function | `V -> () | _ -> failwith "Error"
<grirgz> in your case, the x is not a value, it's a function
<CRathman> grirgz: this is a simplified version of what I am trying to do. the input param is actually an int. the returned value should be a function
<grirgz> the error message is because you never call this function, so the compiler can't infere the type of the parameter, the interactive environment (on linux also) wait for you to call this function later, so it dont show any error
<grirgz> mmh, or maybe i dont understand something
<grirgz> sorry i am a newbie =)
<CRathman> helping others is the best way to learn. :-)
<grirgz> it seem that you can't use currying on a function wich take polymorphic parameters
<grirgz> you can however define a type like type t = [ `V | `other ] to solve this issue
seafoodX has quit []
crabstick_ has joined #ocaml
piggybox_ has joined #ocaml
crabstick has quit [Read error: 110 (Connection timed out)]
piggybox has quit [Connection timed out]
bluestorm_ has joined #ocaml
Mr_Awesome has joined #ocaml
<flux> crathman, works with me
<flux> crathman, ocamlc 3.09.2
seafoodX has joined #ocaml
bluestorm_ has quit ["Konversation terminated!"]
cpst_ has quit [Read error: 110 (Connection timed out)]
Mr_Awesome has quit [Remote closed the connection]
Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
P_1 has quit [Remote closed the connection]
cpst has joined #ocaml
Cygal has joined #ocaml
Cygal is now known as Cygaal
screwt8 has quit [Remote closed the connection]
cpst has quit []
rwmjones has joined #ocaml
screwt8 has joined #ocaml
l_a_m has quit [Remote closed the connection]
buluca has joined #ocaml
ktne has joined #ocaml
l_a_m has joined #ocaml
kosmikus has quit [Read error: 104 (Connection reset by peer)]
ktne has quit [Read error: 104 (Connection reset by peer)]
jonathanv has joined #ocaml
magius_pendragon has joined #ocaml
piggybox_ has quit [Connection timed out]
jonafan has quit [Read error: 110 (Connection timed out)]
leo037 has joined #ocaml
cannedfish has joined #ocaml
CRathman has quit [Read error: 110 (Connection timed out)]
piggybox has joined #ocaml
CRathman has joined #ocaml
cannedfish has quit [Remote closed the connection]
cannedfish has joined #ocaml
cannedfish has quit [Remote closed the connection]
cannedfish has joined #ocaml
cannedfish has quit [Remote closed the connection]
cannedfish has joined #ocaml
Mr_Awesome has joined #ocaml
smimou has joined #ocaml
ednarofi has joined #ocaml
CRathman has quit [Read error: 110 (Connection timed out)]
seafoodX has quit []
|Jedai| has joined #ocaml
cannedfish has quit ["leaving"]
jedai has quit [Read error: 110 (Connection timed out)]
mordaunt has quit [Read error: 104 (Connection reset by peer)]
<flux> hmm.. can I do anything like this? let foo (l : 'a) = let module M = Map.Make(struct type t = 'a let compare = compare end) in () ?
<flux> so the 'a would be the same both times..
balbinus has left #ocaml []
<flux> I guess that's not possible without writing the function itself to a functor
<flux> annoying
msingh has left #ocaml []
Oatschool has joined #ocaml
Oatschool has quit [Read error: 104 (Connection reset by peer)]
Oatmeat is now known as Oatschool
smimou has quit ["bli"]
bluestorm_ has joined #ocaml
ygrek_ has joined #ocaml
pango has quit [Remote closed the connection]
pango has joined #ocaml
tty56 has quit ["leaving"]
smimou has joined #ocaml
tty56 has joined #ocaml
Smerdyakov has joined #ocaml
pantsd has quit [Read error: 110 (Connection timed out)]
cannedfish has joined #ocaml
gim has quit ["kernel reboot"]
cannedfish has quit [Remote closed the connection]
cannedfish has joined #ocaml
bzzbzz has quit ["leaving"]
smimou has quit ["bli"]
pantsd has joined #ocaml
gim has joined #ocaml
psnively has joined #ocaml
slipstream-- has joined #ocaml
pango has quit [Remote closed the connection]
pango has joined #ocaml
ygrek_ has quit [Remote closed the connection]
slipstream has quit [Read error: 113 (No route to host)]
psnively has quit [Read error: 104 (Connection reset by peer)]
psnively has joined #ocaml
crathman has joined #ocaml
buluca has quit [Read error: 113 (No route to host)]
zmdkrbou has joined #ocaml
ednarofi has quit [kornbluth.freenode.net irc.freenode.net]
ednarofi has joined #ocaml
Tetsuo has joined #ocaml
zmdkrbou has quit [Read error: 104 (Connection reset by peer)]
zmdkrbou has joined #ocaml
gaja has quit ["leaving"]
psnively has quit []
love-pingoo has joined #ocaml
gaja has joined #ocaml
bzzbzz has joined #ocaml
|Jedai| is now known as jedai
Cygaal has quit [Remote closed the connection]
<lde> a.(n) is syntactic sugar for Array.get a n, right?
screwt8 has quit [Remote closed the connection]
<Tetsuo> "You can also write [a.(n)] instead of [Array.get a n]", from array.mli
<bluestorm_> yes it is
<bluestorm_> at least in the camlp4 parser
<lde> Tetsuo: That doesn't say if it's syntactic sugar.
<lde> bluestorm_: thanks
<lde> Besides it could be some general syntactic sugar, not only for Array, which would be cool.
<Smerdyakov> Nopers. Only works for arrays, as far as I know.
<Smerdyakov> Strings use a.[n].
_JusSx_ has joined #ocaml
<bluestorm_> hm
<bluestorm_> actually lde
<bluestorm_> when parsing using the camlp4 tools
<bluestorm_> you first use and manipulate a Camlp4 AST
<bluestorm_> that is translated into the real OCaml AST before sending to the ocaml compiler
<bluestorm_> (the two Ast aren't exactly the same)
<bluestorm_> and the Camlp4 AST does have a way to express that e.(n) thing
<lde> Well, I don't much about camlp4.
<bluestorm_> the information is lost at convertion time
<lde> +know
<Smerdyakov> lde, why do you care to know the answer to your original question?
<lde> I was wandering if I could somehow define .() in ocaml, without camlp4.
<Smerdyakov> Oh. You definitely can't.
<lde> *wondering
<pango> redefine Array instead ;)
Tetsuo has quit ["Leaving"]
Mr_Awesome has quit [Remote closed the connection]
<bluestorm_> lde: you may use Camlp4 to redefine some uses of .(), based on syntaxic considerations only
<lde> Hm, how can I do that?
<pango> # module Array = struct
<pango> let set a i v = print_endline ("Don't know what to do with "^v)
<pango> end ;;
<pango> # [| "foo" |].(0) <- "bar" ;;
<pango> Don't know what to do with bar
<pango> .(0) is really syntactic sugar for Array.[gs]et
<pango> I mean .()
<lde> Yeah.
<lde> I can also do module Array' = Array to keep the old array, right?
<lde> But that's... evil.
<pango> yes :)
screwt8 has joined #ocaml
<pango> .{} stands for Bigarray.Array1.[gs]et too
bzzbzz has quit ["leaving"]
pantsd has quit [Read error: 110 (Connection timed out)]
bzzbzz has joined #ocaml
rutlov has joined #ocaml
<hcarty> pango: Wow... that's an interesting trick
pantsd has joined #ocaml
<hcarty> Unfortunately the .{} is more complicated since it can be any of Bigarray.Array[123] or Genarray depending on the number of dimensions given
rutlov has left #ocaml []
<pango> didn't know about that
bluestorm_ has quit ["Konversation terminated!"]
thesoko has joined #ocaml
_JusSx_ has quit ["leaving"]
buluca has joined #ocaml
love-pingoo has quit ["Connection reset by pear"]
crathman has quit ["ChatZilla 0.9.78.1 [Firefox 2.0.0.6/2007072518]"]
linuxtk10 has joined #ocaml
screwt892 has joined #ocaml
cannedfish has quit ["leaving"]
screwt8 has quit [Remote closed the connection]
zgrirg has joined #ocaml
pango has quit [Remote closed the connection]
pango has joined #ocaml
Mr_Awesome has joined #ocaml
grirgz has quit [Read error: 110 (Connection timed out)]
piggybox has quit [Connection reset by peer]
buluca has quit ["Leaving."]
buluca has joined #ocaml
screwt892 has quit [Remote closed the connection]
screwt892 has joined #ocaml
leo037 has quit ["Leaving"]
buluca has quit ["Leaving."]
buluca has joined #ocaml
amro|laptop has joined #ocaml