mfurr changed the topic of #ocaml to: OCaml 3.08.2 available! | Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A tutorial: http://merjis.com/richj/computers/ocaml/tutorial/ | 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/
clog has joined #ocaml
mlh has quit [Client Quit]
zzorn_afk has quit ["They are coming to take me away ha ha"]
m3ga has quit ["Client exiting"]
Submarine has quit ["Leaving"]
smkl has quit [Read error: 238 (Connection timed out)]
cj has quit [Operation timed out]
m3ga has joined #ocaml
monochrom has joined #ocaml
Oktal has quit ["Boring generic quit message"]
Hanji has quit ["Lost terminal"]
Hanji has joined #ocaml
hangman4 has joined #ocaml
mattam has quit ["zZz"]
CosmicRay has joined #ocaml
smkl has joined #ocaml
Telebyte has joined #ocaml
mrsolo has joined #ocaml
CosmicRay has quit ["Client exiting"]
vezenchio has joined #ocaml
m3ga has quit ["Client exiting"]
vezenchio has quit ["haibane · renmei"]
vezenchio has joined #ocaml
monochrom has quit ["hello"]
slashvar1lri] has joined #ocaml
slashvar[lri] has quit [Read error: 54 (Connection reset by peer)]
smkl has quit [Read error: 238 (Connection timed out)]
hangman4 has quit [Connection timed out]
vezenchio has quit ["haibane · renmei"]
vezenchio has joined #ocaml
Telebyte has quit [Read error: 110 (Connection timed out)]
smkl has joined #ocaml
mrsolo has quit ["Leaving"]
gim has joined #ocaml
zzorn has joined #ocaml
hangman4 has joined #ocaml
pharx has joined #ocaml
LoganCapaldo has joined #ocaml
<LoganCapaldo> Anybody here even marginally familiar with ocamlyacc?
smkl has quit [Read error: 238 (Connection timed out)]
pango has quit ["Client exiting"]
pango has joined #ocaml
mattam has joined #ocaml
<LoganCapaldo> Is there a way to get ocaml to print the kind of information it presents in the interactive interpreter in a bytecode compilied application?
LoganCapaldo has quit ["Client exiting"]
smkl has joined #ocaml
Submarine has joined #ocaml
Godeke has quit [Remote closed the connection]
m3ga has joined #ocaml
mlh has joined #ocaml
smkl has quit [Read error: 238 (Connection timed out)]
m3ga has quit ["Client exiting"]
smimou has joined #ocaml
smimou has quit [Client Quit]
m3ga has joined #ocaml
m3ga has quit [Client Quit]
smimou has joined #ocaml
smkl has joined #ocaml
mlh has quit [Client Quit]
hangman4 has quit [Connection timed out]
hangman4 has joined #ocaml
smkl has quit [Read error: 238 (Connection timed out)]
Submarine has quit ["Leaving"]
Herrchen has joined #ocaml
CosmicRay has joined #ocaml
oberke has joined #ocaml
<oberke> [plug] ara is back online. search debian packages online at http://ara.zapto.org/
slashvar1lri] is now known as slashvar[lri]
smkl has joined #ocaml
oberke has quit [Read error: 104 (Connection reset by peer)]
Submarine has joined #ocaml
oberke has joined #ocaml
Godeke has joined #ocaml
__DL__ has joined #ocaml
Herrchen has quit ["bye"]
smkl has quit [Read error: 238 (Connection timed out)]
froody- has quit [Read error: 110 (Connection timed out)]
_fab has quit [Read error: 110 (Connection timed out)]
_fab has joined #ocaml
slashvar[lri] has quit [Remote closed the connection]
mrvn has joined #ocaml
piyr has joined #ocaml
mrvn_ has quit [Read error: 110 (Connection timed out)]
piyr has quit ["Leaving"]
smkl has joined #ocaml
smimou has quit ["?"]
smkl has quit [Read error: 238 (Connection timed out)]
vezenchio has quit ["haibane · renmei"]
pango has quit ["Leaving"]
pango has joined #ocaml
smkl has joined #ocaml
CapNemo has joined #ocaml
<CapNemo> Hello :)
<CapNemo> Im learning ocaml with the excellent book from chailloux & Manoury & Pagano .. but it talks about ocaml 2.x. How can I update my knowledge to use the current ocaml 3.08 ?
_fab has quit [Read error: 104 (Connection reset by peer)]
<oberke> capnemo: well what about the "developing applications with ocaml" book ?
<oberke> it talks about variants, objects, modules... if i remember right
<CapNemo> oberke, yup it's the book im reading
<oberke> oh, so it doesn't talk of new stuff ?
<CapNemo> what new stuff ?
<oberke> well, objects, polymorphic variants, labels
<oberke> i reckon ocaml needs a new, fresh book
<CapNemo> object yes, label it's described in new stuff in 2.99, and polymorphic variant im not sure
<oberke> polymorphic variants are those tags typed whose tags start with a backquote
<oberke> and that often lead to pageful type errors ;)
<oberke> but pretty useful anyway
__DL__ has quit [Remote closed the connection]
<CapNemo> something like : 'a ?
<Demitar> CapNemo, it might be mentioned in an appendix?
<oberke> no, 'a is a type variable
<oberke> it's more like type color = [`Red|`Green|`Blue]
<CapNemo> Demitar, yes the appendix is pretty big
<oberke> but you don't have to declare these types to be able to use them
<oberke> contrarily to ordinary tagged types
<Demitar> The online version talks about it in Appendix B (Objective CAML 3.04).
<CapNemo> there is an online version somewhere :))?
<oberke> well it seems da-ocaml covers everything in caml
<Demitar> The french version might be out there somewhere too.
<CapNemo> ahhh perfect :) more im learning this language more i like it
<judge> does anyone know how to pass an int32 to C?
<judge> is it safe to cast it to an int?
<Demitar> judge, no, it's boxed.
<Demitar> judge, look in the manual.
<oberke> judge: only if it's between -2^30 and 2^30 - 1
<judge> but i thought the point of int32 is to be like the C int
<CapNemo> btw someone knows if it exists a language embeded in ocaml to script an ocaml application ??
<judge> CapNemo: check humps, there is at least one scheme one
<Demitar> judge, Int32_val(v) returns the 32-bit integer contained in the int32 v.
<Demitar> judge, check section 18.4 http://caml.inria.fr/ocaml/htmlman/manual032.html
<oberke> (oh i thought you were casting the other way... forget what i said)
<judge> sorry i meant C int
<judge> but i guess i want to be using Nativeint
<CapNemo> judge, a scheme one .. mm can be difficult for a newbie ;)
<judge> Demitar: ok thanks
<judge> anyone know how to tell ocaml gc that i'm storing a value in a c array?
<CapNemo> do you know IDE supporting ocaml ?
<judge> i dont particularly want to have a value gced
<judge> while i'm playing with it
<Submarine> CapNemo, emacs
<CapNemo> why not :)
<Demitar> CapNemo, I use emacs and a console. :)
<judge> wonder if anyone implemented Camlmacs yet
<CapNemo> Demitar, sounds also good to me ;)
<Demitar> judge, yes, efuns and of course it has fallen into disrepair.
<judge> seems like favourite thing to do is to rewrite emacs in favourite lang
<Demitar> CapNemo, eclipse exists but the current ocaml integration is far from perfect. Someone might want to hack on it though.
<Demitar> judge, look in the manual for details on how to interact with the gc.
<CapNemo> Demitar, yup i have tested it .. i will use emacs instead
<Demitar> What inspires awe in me is that eclipse chewed 300M ram for me (mostly virtual of course). :)
<CapNemo> loll
<Demitar> I *really* love eclipse cvs integration though.
<CapNemo> ;)
<oberke> while we're at it
<oberke> the vim syntax highlighting script by markus mottl
<oberke> doesn't work very well for indenting...
<oberke> anyone know of a better one ?
<Demitar> I've got a better idea... Editor war! Whee!
<oberke> heh ;)
<CapNemo> loll
<oberke> efuns rulez ;))
<oberke> (just kidding)
<CapNemo> vim vs emacs ;) the neverending story
<Demitar> oberke, I think you'll want to contact the author(s) using the appropriate channel.
<oberke> demitar: ok just wanted to make sure there wasn't another indentation plugin
<Demitar> oberke, I'm no vi(m) person but I haven't heard of another.
<avlondono> there isn't any other that I know
<oberke> does anyone use vim and have the same problem ?
* avlondono uses vim
<oberke> avlondo, got any indentation problems with ocaml ?
zzorn is now known as zzorn_afk
<avlondono> yes I have some
<oberke> ok so it's not a misconfiguration or something
<avlondono> there is a strange behavior in the indentation with ocaml but have never spent time solving it
<oberke> but maybe it was meant to indent revised syntax ?
<avlondono> if you reindent with gg=G
<avlondono> it might make mistakes
<oberke> yep that's it
<avlondono> but if you store a macro
<oberke> and it makes mistakes sometime when you just type stuff
<avlondono> and then run it for the file length is does a better job
<avlondono> ie, qw ==<Esc>jq and then 10@w behaves different
<avlondono> it does
<oberke> well i don't use == coz it messes up stuff...
<avlondono> I don't use the OO features, so I can't talk much about how the indentation works for that
<oberke> it has problems with modules too
<oberke> not just oo stuff..
<avlondono> not much for me
<oberke> indentation worked better in my previous life, when i used emacs
<avlondono> heh, that's an indentation specs problem, that's unfair with vim ;-)
<oberke> yep :)
<avlondono> I have very few problems with the modules though. maybe is my coding style which is more appropriate for the specs
<oberke> ok whenever i overcome the current wave of laziness, i'm gonna write to markus
<avlondono> but there are problems
<avlondono> yeah, I've never overcome it to actually fix the specs file
<oberke> instead of editor wars, i propose : syntax wars : old vs revised
* Demitar votes for Classic Syntax.
<oberke> i personally propose that every user of revised syntax be granted a bath in an acid-filled ditch
<Demitar> What I really like about tuareg-mode is that I can tweak the indention to something so lovely...
<oberke> demitar: what do you tweak ?
<Demitar> I ensure "in" doesn't indent a level.
<CapNemo> classic syntax of what ???
<Demitar> I use a zillion let foo = ... in bar () let quux = ... in <...>
<oberke> capnemo: you can use a so-called "revised", heretic syntax with ocaml by means of the camlp4 preprocessor
<judge> Demitar: manual isnt very clear on this
<oberke> demitar: i didn't get it... were do you break your line ? you mean like let x = y in \n stuff
<judge> i'm not sure if caml_register_global_root is related to what i want
<CapNemo> ohh oki ... so i suppose im classic by default ;)
<avlondono> Nemo is a classic already
<oberke> capnemo: yep. caml syntax as god meant it to be
<Demitar> judge, then you shouldn't be asking me. :) Either someone else here has an answer or you want to check caml-list.
<mrvn> I like the default which indents after in if the next thing isn't another let.
<Demitar> oberke, I add newlines atleast after every in.
<mrvn> And I usualy put the last in on a seperate line.
<oberke> demitar : and what if you do let n1 = v1\n and n2 = v1 in
<oberke> do you put the last it on a separate line ?
<Demitar> mrvn, trouble for me is I mix those two cases a lot, thus keep rushing off indention with no real relation to code structure.
<mrvn> Demitar: my tuareg does this automatically right
<Demitar> oberke, only if I use multiple rows inside the let.
<mrvn> oberke: If the expression between let and in is more than one line I often put the in seperate
<Demitar> mrvn, yep, that's why it's so wonderful it's so configurable. :)
<oberke> demitar: i do that too, but i do it for single rows too, when i have a block of lets and then a non-let expression
<CapNemo> someone know a link between ocaml and mysql or psql ?
<oberke> capnemo: check the humps
<Demitar> CapNemo, ocaml-dbi
<CapNemo> the humps seems the ocaml paradise :)!
<oberke> ok ara is back at http://ara.zapto.org/
<oberke> (for searching debian packages)
oberke has quit ["Leaving"]
smimou has joined #ocaml
CosmicRay has quit ["Client exiting"]
<dan2> is therre any thing that will take a .mli file and make stubs in a .ml
Submarine has quit ["Leaving"]
smimou has quit ["?"]
<Demitar> dan2, cp? :)
smkl has quit [Read error: 238 (Connection timed out)]
<dan2> I know I can't break out of a loop in ocaml
<dan2> so how do I loop until the input is ''
* dan2 kinda sees it
<Demitar> dan2, you might want to have a look in the ocaml book.
<dan2> Demitar: basically create a function that calls itself, when I receive the right one, I'll return the value
<dan2> Demitar: sound good?
<Demitar> If you just descriped a recursive function then, yes, that's the fairly standard way to do it. :)
<dan2> Demitar: ok, thats what I was thinking
<dan2> Demitar: if I do let rec foo.... do I have to explicetly call the function, or will it automatically
<Demitar> You really should read a good tutorial, or look in the ocaml book.