dark_light changed the topic of #ocaml to: OCaml 3.09.2 available! Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
malc has quit ["Lost terminal"]
ramkrsna has quit [Read error: 145 (Connection timed out)]
ramkrsna has joined #ocaml
ramkrsna has quit [Read error: 110 (Connection timed out)]
smimou has quit ["bli"]
ramkrsna has joined #ocaml
jcreigh has joined #ocaml
Smerdyakov has joined #ocaml
pango_ has joined #ocaml
pango has quit [Remote closed the connection]
mejja has quit [Remote closed the connection]
Lob-Sogular has quit [Remote closed the connection]
jcreigh has quit ["Cuius rei demonstrationem mirabilem sane detexi. Hanc marginis exiguitas non caperet."]
uogl has joined #ocaml
woggle has quit [Nick collision from services.]
uogl is now known as woggle
jcreigh has joined #ocaml
jcreigh has quit ["Cuius rei demonstrationem mirabilem sane detexi. Hanc marginis exiguitas non caperet."]
AI_coder has joined #ocaml
ramkrsna has quit [Read error: 110 (Connection timed out)]
Smerdyakov has quit ["Leaving"]
ramkrsna has joined #ocaml
youknow365 has joined #ocaml
<youknow365> yo anyone up
_jol_ has joined #ocaml
<zvrba> maybe
<youknow365> anybings for QT for ocaml
<youknow365> or gtk or windows api
<youknow365> sorry for the repeated 100x question
_jol_ has quit ["leaving"]
dark_light has joined #ocaml
<dark_light> what is the difference between Unix.read and Unix.recv ? only the msg_flag setting? so, if i want, i can use read instead?
<zvrba> yes
<dark_light> cool
<dark_light> when Unix.read returns 0, so for sure the connection is lost? read doesn't trigger End_of_file ..
<zvrba> yes if it's stream socket
Revision17 has joined #ocaml
_jol_ has joined #ocaml
revision17_ has quit [Read error: 110 (Connection timed out)]
rillig has joined #ocaml
youknow365 has quit [Read error: 104 (Connection reset by peer)]
_jol_ has quit ["leaving"]
smimou has joined #ocaml
ramkrsna has quit [Read error: 110 (Connection timed out)]
ramkrsna has joined #ocaml
mnemonic has joined #ocaml
<mnemonic> hi
_jol_ has joined #ocaml
_jol_ has quit ["leaving"]
dark_light has quit [Remote closed the connection]
<mnemonic> smimou> you like CTCP VERSION ? :)
<smimou> well, it's a bit unusual :)
<smimou> since you always say hi, I was wondering if you do it manually or if it was some kind of script
<mnemonic> lol
<mnemonic> :)
Smerdyakov has joined #ocaml
Schmurtz has quit [Read error: 113 (No route to host)]
<ulfdoz> proposal: Say "hello" next time. :)
mikeX has joined #ocaml
<mikeX> http://www.pastebin.be/1493/ Any ideas how to make this truly polymorhic?
<mikeX> polymorphic*
<Smerdyakov> Learn about the value restriction and it should be clear.
<mikeX> what do you mean? I've used 'a. in other cases, but it causes a syntax error here.
<Smerdyakov> OCaml has most general type unifications.
<Smerdyakov> Adding a type annotation will never give something a more general type.
<Smerdyakov> (So your last line in this channel is irrelevant to the issue.)
<mikeX> hmm, I'm not sure I follow you
<Smerdyakov> So you've probably never heard of the value restriction?
<mikeX> I guess not
<Smerdyakov> Then maybe you should have looked for it instead of concluding that my advice was irrelevant. ;)
<Smerdyakov> Let me see if OCaml uses that terminology... "value restriction" is from the SML Definition.
<mikeX> I didn't come to such a conclusion
<mikeX> I just thought it had to do with this: file:///usr/share/doc/ocaml-doc/ocaml.html/manual005.html#ss:polymorphic-methods
<mikeX> (even though the object system is not involved here)
<Smerdyakov> Well, I couldn't quickly find an appropriate section of the OCaml manual.
<zvrba> it's described in that short ocaml tutorial
<mikeX> what would that be zvrba ?
<zvrba> value restriction
<mikeX> No I mean the short tutorial
<zvrba> jason hickey's
<mikeX> hm, I'll take a look, thanks
<Smerdyakov> It _must_ be in the manual somewhere!
<mikeX> well I was somehow aware of this, but not how to solve it in such a case
<Smerdyakov> I don't think the problem is related to anything having to do with the object system.
<mikeX> cause I *should* be able to work around this somehow right?
<Smerdyakov> Yes. It's easy.
<Smerdyakov> The value restriction just says that a `let' binding for an expression of polymorphic type only works with an expression that is a _value_.
<Smerdyakov> In particular, a `let' expression is not a value.
<mikeX> sorry I can't understand you
<Smerdyakov> If your program contains the declaration:
<Smerdyakov> let x = e;
<Smerdyakov> Where you want `x' to end up with a polymorphic type
<Smerdyakov> Then `e` must be a value.
<Smerdyakov> No `let' expression is a value.
mnemonic_ has joined #ocaml
mnemonic_ has quit [Client Quit]
<mikeX> right, so the 'let code = ref []' is causing a problem
<mikeX> correct?
<Smerdyakov> Yes
<mikeX> ok, but I still don't see how I could make it work (and keep the closure)
<Smerdyakov> That's surprising.
<Smerdyakov> I never said you'd be able to do it all within a single `let' declaration.
<mikeX> meaning?
<Smerdyakov> For crying out loud.
<Smerdyakov> Use a separate declaration for the reference.
<mikeX> so I can't keep the closure
<Smerdyakov> That would not change anything related to a closure.
<mikeX> well, can you give me an example of what you mean? cause I don't see it that way
<mikeX> yes technically it wouldn't but I wan't 'code' to be 'hidden'
<mikeX> i.e. not visible from outside the function
finelemon has quit [Read error: 113 (No route to host)]
<Smerdyakov> I would use the 'local' declaration for that in SML. I don't know if OCaml has an equivalent.
<Smerdyakov> You can always add an extra unit argument to the function, and then rebind the same name to its own application afterward.
<mikeX> hmm, I see, thanks
finelemon has joined #ocaml
<zvrba> so, risking to start a holy war
<mikeX> sml vs ocaml?
<zvrba> which is "better" - SML or Ocaml?
<zvrba> yeah :)
<mikeX> hehe
<Smerdyakov> I strongly prefer SML.
<zvrba> why?
<Smerdyakov> Much cleaner language design.
<zvrba> uh yeah, i guess no object layer patched ontop :)
<Smerdyakov> Much cleaner even if you ignore the OCaml OO part
<zvrba> Smerdyakov: any good sml implementation.. open-source + debugger?
<Smerdyakov> I mean, come on, printf and scanf format strings are built into the OCaml language.
<zvrba> (i've seen like MLTon generates fast code, etc... but they don't have a debugger >:)
mnemonic_ has joined #ocaml
<Smerdyakov> zvrba, you don't need a debugger if you have a repl, and everyone but MLton has that.
<zvrba> Smerdyakov: uf yeah, ugly hack. i froze when i saw their types
<zvrba> Smerdyakov: true :)
mnemonic has quit [Read error: 110 (Connection timed out)]
mnemonic_ has quit [Client Quit]
mnemonic has joined #ocaml
<mnemonic> re
chessguy has joined #ocaml
mnemonic_ has joined #ocaml
mnemonic_ has quit [Client Quit]
mnemonic has quit [Read error: 104 (Connection reset by peer)]
chessguy2 has joined #ocaml
chessguy has quit [Connection timed out]
chessguy2 has quit [" HydraIRC -> http://www.hydrairc.com <- Try something fresh"]
mnemonic has joined #ocaml
<mnemonic> re
chessguy has joined #ocaml
Demitar has quit ["Ex-Chat"]
dark_light has joined #ocaml
chessguy has quit [" HydraIRC -> http://www.hydrairc.com <- IRC has never been so good"]
Demitar has joined #ocaml
slipstream has joined #ocaml
slipstream-- has quit [Read error: 110 (Connection timed out)]
mikeX has quit ["leaving"]
mejja has joined #ocaml
sponge45 has joined #ocaml
mnemonic has quit ["leaving"]
sponge45 has quit ["zzzzzzzz"]
rillig has quit ["exit(EXIT_SUCCESS)"]
smimou has quit ["bli"]
Demitar has quit [Remote closed the connection]
Demitar has joined #ocaml
tristram has quit [Read error: 145 (Connection timed out)]
Demitar has quit [Remote closed the connection]
TaXules has quit [Read error: 145 (Connection timed out)]