sponge45 changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/
smimou has quit ["bli"]
Mr_Awesome has joined #ocaml
malc_ has quit ["leaving"]
postalchris has quit [Read error: 110 (Connection timed out)]
cmeme has quit [Read error: 104 (Connection reset by peer)]
cmeme has joined #ocaml
postalchris has joined #ocaml
vorago has joined #ocaml
<vorago>
Hm. Hi.
<vorago>
How to create 64 bit constant on 32 bit system? ;s
<vorago>
"L"; Thanks.
mbishop has joined #ocaml
postalchris has quit [Read error: 113 (No route to host)]
slipstream-- has joined #ocaml
slipstre1m-- has joined #ocaml
slipstream has quit [Read error: 110 (Connection timed out)]
mbishop has quit [zelazny.freenode.net irc.freenode.net]
ramkrsna has quit [zelazny.freenode.net irc.freenode.net]
Smergo has quit [zelazny.freenode.net irc.freenode.net]
TaXules has quit [zelazny.freenode.net irc.freenode.net]
slipstream-- has quit [Read error: 110 (Connection timed out)]
Smergo has joined #ocaml
TaXules has joined #ocaml
diffbavis has quit [Read error: 54 (Connection reset by peer)]
iFreeCarve has joined #ocaml
<iFreeCarve>
hello all / bonjour a tous
<iFreeCarve>
i am looking for a practical guide to OCaml style
<iFreeCarve>
is there a javadoc (or similar) style that you use for commenting functions?
<iFreeCarve>
what rules of thumb are there for deciding whether to use let blocks or modules to hide helper functions?
<iFreeCarve>
those sort of things...
<iFreeCarve>
if you know of any websites or books that teach this, i'd be very grateful.
ramkrsna has joined #ocaml
mbishop has joined #ocaml
Smerdyakov has quit ["Leaving"]
johnnowak has quit []
Mr_Awesome has quit ["...and the Awesome level drops"]
diffbavis has joined #ocaml
pstickne has joined #ocaml
<flux->
ifreecarve, there's ocamldoc
<flux->
ifreecarve, it's documented in the ocaml manual
<flux->
ifreecarve, I suppose the hiding thing depends on on what scope you wish to hide things
<flux->
ifreecarve, in the end I think it's considered good style to use .mli descriptions to limit the visibility of the definitions
<flux->
but still one can use let-scopes to hide things like unique symbol generator internals, let generate = let v = ref 0 in fun () -> let r = !v in incr v; r
<iFreeCarve>
flux-, concerning ocamldoc, is there special notation for saying what each argument of the function means?
<iFreeCarve>
aahh .. disregard that, i see it
shawn has quit [Read error: 110 (Connection timed out)]
iFreeCarve has left #ocaml []
bluestorm_ has joined #ocaml
bluestorm_ has quit ["Konversation terminated!"]
johnnowak has joined #ocaml
david_koontz has quit ["Leaving"]
johnnowak has quit []
pstickne has quit ["Leaving"]
pantsd has quit [Read error: 110 (Connection timed out)]
pantsd has joined #ocaml
dark_light has joined #ocaml
shawn has joined #ocaml
shawn has quit [Client Quit]
love-pingoo has joined #ocaml
slipstre1m-- has quit [Read error: 110 (Connection timed out)]
shawn has joined #ocaml
jlouis has quit ["Leaving"]
diffbavis has quit [Read error: 104 (Connection reset by peer)]
dark_light has quit [Remote closed the connection]
dark_light has joined #ocaml
joelr1 has joined #ocaml
<joelr1>
good morning
jacobian has joined #ocaml
joelr1 has quit []
diffbavis has joined #ocaml
johnnowak has joined #ocaml
johnnowak has quit [Remote closed the connection]
joelr1 has joined #ocaml
<joelr1>
good day folks
<vorago>
Hi.
<flux->
hello.
<joelr1>
:D
<joelr1>
are there any drawbacks to matching of strings ?
<joelr1>
say if i had scores of tokens in my parser that represented function names. i created a huge variant to match the function names but now wonder if i could just as well match the string names themselves.
<joelr1>
wuddaya think?
<vorago>
I'm ocaml lame. Currently also fighting with matching.. but ranges of integers. ;p
<joelr1>
oh, ok then
<joelr1>
vorago: tried posting to ocaml-beginners?
<vorago>
That's channel? Oh.
<vorago>
Posting group? Well I hope i will finally find a good documentation about matching.
<vorago>
All i find i how cool it's with lists.
<joelr1>
ok
joelr1 has quit []
<vorago>
It's possible with characters, but not with an integer. How dissapointing. ;/
<flux->
vorago, you use match guars for that (when)
<flux->
obviously it'll miss the coverage checking
<vorago>
I've got it.
<vorago>
0|1|2|3|4 also works, and in this case is really ok.
<vorago>
But I'm still fighting --- match quits my function if something is matched. I can stop it from doing this by enclosing it with let tmp = match... in. But this approach is not beatifull.
<flux->
you can use parenthesis
<flux->
or the new syntax
<flux->
which has someting like match foo with [1 -> 42 | 2 -> 42]; foo () (I don't really recall the syntax)
<vorago>
Ha. I will use parenthesis. Should do. But please tell me:
<vorago>
Why does it return from the function?
<flux->
the scope of a pattern match is until the end of the definition.. I don't think that's quite clearly said, but I don't know how else to say it
<flux->
if I'm understanding your problem correctly
<flux->
you could try using emacs and its tuareg mode's indentation to find out the rules :)
<vorago>
;)
<vorago>
Ok, I see it now. ;d
<vorago>
Program generally works. (It was a solution for one simple SPOJ problem)
Smerdyakov has joined #ocaml
cjeris has joined #ocaml
diffbavis has quit [Read error: 104 (Connection reset by peer)]
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
diffbavis has joined #ocaml
love-pingoo has quit ["Leaving"]
benny has joined #ocaml
benny_ has quit [Read error: 60 (Operation timed out)]
johnnowak has joined #ocaml
johnnowak has quit []
johnnowak has joined #ocaml
smimou has joined #ocaml
johnnowak has quit [Read error: 145 (Connection timed out)]
johnnowak has joined #ocaml
johnnowak has quit [Remote closed the connection]
postalchris has joined #ocaml
gim_ has joined #ocaml
malc_ has joined #ocaml
smimp has joined #ocaml
pantsd has quit ["Leaving."]
malc__ has joined #ocaml
malc_ has quit [Read error: 60 (Operation timed out)]
ikaros has quit [Read error: 110 (Connection timed out)]
ikaros has joined #ocaml
johnnowak has joined #ocaml
malc__ is now known as malc_
bluestorm_ has joined #ocaml
bluestorm_ has quit ["Konversation terminated!"]
SooW has joined #ocaml
<SooW>
hi everyone
<SooW>
i'm wondering if someone has already got caml/c interoperating system to work ?
<malc_>
SooW: you mean FFI
<malc_>
in general?
<SooW>
i'm creating (malloc) data with C and i try to return it to ocaml
<SooW>
i don't know what ffi means :s
<malc_>
Foreign Function Interface
<malc_>
SooW: return it to ocaml as what?
<SooW>
first of all, can C and caml share dynamically allocated memory ?
<malc_>
yes, via bigarrays
<SooW>
a value, which in fact is a bigarray
<malc_>
SooW: you have to alloc it with bigarray helper function