gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml Meeting 2011 http://bit.ly/eaZi1C | OCaml 3.12.0 http://bit.ly/aNZBUp
jonafan has quit [Ping timeout: 240 seconds]
lamawithonel__ is now known as lamawithonel
dark has joined #ocaml
jonafan has joined #ocaml
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 260 seconds]
ulfdoz_ is now known as ulfdoz
gildor has quit [Ping timeout: 276 seconds]
gildor has joined #ocaml
philtor has joined #ocaml
philtor has quit [Ping timeout: 252 seconds]
<orbitz> Is there a list ocmprehension extension that is independent of any other lib?
lopexx has quit []
joewilliams_away is now known as joewilliams
vivanov has joined #ocaml
vivanov has quit [Ping timeout: 276 seconds]
diml has quit [Ping timeout: 252 seconds]
boscop has quit [Read error: Connection reset by peer]
boscop_ has joined #ocaml
dark has quit [Remote host closed the connection]
boscop_ has quit [Ping timeout: 246 seconds]
boscop_ has joined #ocaml
boscop_ has quit [Read error: Connection reset by peer]
boscop has joined #ocaml
boscop has quit [Read error: Connection reset by peer]
boscop has joined #ocaml
arubin has quit [Quit: arubin]
boscop has quit [Read error: Connection reset by peer]
boscop has joined #ocaml
philtor has joined #ocaml
boscop_ has joined #ocaml
boscop has quit [Ping timeout: 246 seconds]
boscop__ has joined #ocaml
boscop_ has quit [Ping timeout: 246 seconds]
boscop__ has quit [Ping timeout: 246 seconds]
vivanov has joined #ocaml
ygrek has joined #ocaml
vivanov has quit [Ping timeout: 240 seconds]
joewilliams is now known as joewilliams_away
vivanov has joined #ocaml
vivanov has quit [Ping timeout: 260 seconds]
philtor has quit [Ping timeout: 246 seconds]
Yoric has joined #ocaml
vivanov has joined #ocaml
rien has quit [Ping timeout: 260 seconds]
rien has joined #ocaml
vivanov has quit [Ping timeout: 240 seconds]
diml has joined #ocaml
mihamina has joined #ocaml
mnabil has joined #ocaml
boscop has joined #ocaml
Snark has joined #ocaml
boscop_ has joined #ocaml
boscop has quit [Ping timeout: 246 seconds]
boscop_ has quit [Read error: Connection reset by peer]
boscop has joined #ocaml
dnolen has quit [Quit: dnolen]
edwin has joined #ocaml
boscop has quit [Ping timeout: 250 seconds]
Cyanure has joined #ocaml
ikaros has joined #ocaml
joelr has joined #ocaml
<adrien> morning
<adrien> what would be an ok C++ parser (besides yacfe)?
<adrien> I think I can also make my own 99% incomplete parser, I only need to extract what is a valid C subset of some documents
vivanov has joined #ocaml
sepp2k has joined #ocaml
mnabil has quit [Ping timeout: 246 seconds]
Yoric has quit [Quit: Yoric]
vivanov has quit [Remote host closed the connection]
vivanov has joined #ocaml
vivanov has quit [Ping timeout: 258 seconds]
ikaros has quit [Quit: Leave the magic to Houdini]
vivanov has joined #ocaml
vivanov has quit [Ping timeout: 258 seconds]
vivanov has joined #ocaml
npouillard has quit [Ping timeout: 260 seconds]
npouillard has joined #ocaml
Yoric has joined #ocaml
jderque has joined #ocaml
vivanov has quit [Ping timeout: 276 seconds]
vivanov has joined #ocaml
Yoric has quit [Quit: Yoric]
smerz has joined #ocaml
Associat0r has quit [Quit: Associat0r]
Associat0r has joined #ocaml
boscop has joined #ocaml
Oejet has joined #ocaml
vivanov has quit [Ping timeout: 240 seconds]
vivanov has joined #ocaml
Yoric has joined #ocaml
Yoric has quit [Quit: Yoric]
lopex has joined #ocaml
jamii has joined #ocaml
jamii has quit [Remote host closed the connection]
jderque has quit [Quit: leaving]
Yoric has joined #ocaml
Modius has joined #ocaml
Yoric has quit [Quit: Yoric]
jamii has joined #ocaml
impy has joined #ocaml
jamii has quit [Ping timeout: 248 seconds]
jderque has joined #ocaml
Oejet has quit [Ping timeout: 258 seconds]
eikke has quit [Ping timeout: 248 seconds]
eikke has joined #ocaml
eikke has quit [Ping timeout: 246 seconds]
jderque has quit [Quit: leaving]
Yoric has joined #ocaml
Cyanure has quit [Read error: Operation timed out]
lopexx has joined #ocaml
lopex has quit [Ping timeout: 246 seconds]
lopexx has quit [Client Quit]
lopex has joined #ocaml
rossberg has quit [Ping timeout: 248 seconds]
Oejet has joined #ocaml
vivanov has quit [Ping timeout: 260 seconds]
vivanov has joined #ocaml
Smerdyakov has joined #ocaml
vivanov has quit [Ping timeout: 260 seconds]
vivanov has joined #ocaml
jderque has joined #ocaml
Tobu has quit [Read error: Operation timed out]
Tobu has joined #ocaml
LiliEA has left #ocaml []
dnolen has joined #ocaml
vivanov has quit [Ping timeout: 240 seconds]
vivanov has joined #ocaml
joelr has quit [Quit: joelr]
vivanov has quit [Ping timeout: 240 seconds]
vivanov has joined #ocaml
vivanov has quit [Ping timeout: 252 seconds]
vivanov has joined #ocaml
Yoric has quit [Quit: Yoric]
sepp2k has quit [Quit: Leaving.]
philtor has joined #ocaml
deavid has quit [Quit: No Ping reply in 180 seconds.]
deavid has joined #ocaml
Tobu_ has joined #ocaml
Tobu has quit [Ping timeout: 260 seconds]
<edwin> adrien: elsa/elkhound had some ocaml bindings, and clang is a good c++ parser, but it doesn't ocaml bindings
<adrien> edwin: ah, thanks, I had checked elsa but I ended up thinking I wouldn't be able to use it
<adrien> should be better than the atrocity I was going to create :P
<edwin> or write ocaml bindings for clang
<adrien> hmmm, only one thing: what does it do with comments?
<adrien> I need to get: the function declarations from cpp files and the comments before/after them
<adrien> "elsa does not include a preprocessor" =/
<edwin> I don't know about elkhound, but clang should have a way to preserve comments
<edwin> and there is a binary AST emission feature in clang
<edwin> don't know how stable the format is, but if its stable, it should be possible to read it back in ocaml using bitstring
<adrien> ok, I'll see
<adrien> I should start with yacfe: its C++ support isn't complete but it might work
arubin has joined #ocaml
vivanov has quit [Remote host closed the connection]
vivanov has joined #ocaml
groves has left #ocaml []
Smerdyakov has quit [Quit: Leaving]
impy has left #ocaml []
<thelema_> orbitz: there is some sort of list comprehension camlp4 in the standard distribution somewhere, as I recall there being a bug in it on mantis
thelema has joined #ocaml
vivanov has quit [Ping timeout: 252 seconds]
vivanov has joined #ocaml
thelema_ has quit [Ping timeout: 258 seconds]
Snark has quit [Quit: Ex-Chat]
Yoric has joined #ocaml
smerz has quit [Quit: Ex-Chat]
impy has joined #ocaml
sepp2k has joined #ocaml
ymasory has quit [Quit: Leaving]
Associ8or has joined #ocaml
Associ8or has quit [Changing host]
Associ8or has joined #ocaml
Associat0r has quit [Ping timeout: 246 seconds]
philtor has quit [Ping timeout: 246 seconds]
ski has quit [Ping timeout: 246 seconds]
ski has joined #ocaml
philtor has joined #ocaml
TimurSoft has joined #ocaml
<TimurSoft> hello all, I have seen "let () = ..." in a main.ml, could anyone tell me why there is no name for this signature of a function?
<adrien> TimurSoft: it's not a function, it's a toplevel value, it'll get executed when the module is loaded
<adrien> so it can be used for some kind of "main" function (in C) or initialization code
<TimurSoft> I see... so could we say in a "main", every function is packed within a "let ... = ", for instance, we need to code "let () = Printf.print ..." instead of "Printf.print ..." directly?
jderque has quit [Quit: leaving]
enthymeme has joined #ocaml
<edwin> with the original syntax yes
<edwin> its like main in C, or __attribute__((constructor)) for shared libs
<edwin> with the revised syntax the 'let () =', and 'let _ =' parts are not needed
rien has quit [Ping timeout: 246 seconds]
rien has joined #ocaml
ymasory has joined #ocaml
<TimurSoft> edwin: sorry, what is "revised syntax"?
<edwin> TimurSoft: you use camlp4r as a preprocessor: http://caml.inria.fr/pub/docs/manual-camlp4/manual007.html
<edwin> it is less error-prone than the original one IMHO
<TimurSoft> cool, thank you all
<edwin> at least the syntax error messages are a bit more correct (i.e. show a location that is closer to the error) than with the original syntax, which has some ambiguities
<adrien> I don't like everything in the revised syntax, but I think some things are good, I'd like the half-revised syntax :P
<edwin> so if you make an error, it could be either be here, or 10 lines before where you forgot the ;; to end a function
edwin has quit [Remote host closed the connection]
Yoric has quit [Quit: Yoric]
DOUK has joined #ocaml
<DOUK> hello
<DOUK> i have a problem with a function that should return the max of a list
ikaros has joined #ocaml
<DOUK> here i dont understand what value does a take
<DOUK> can anyone help please
<adrien> does it end up returning the *min* of the list?
vivanov has quit [Ping timeout: 276 seconds]
<DOUK> oh wait
<adrien> =)
<DOUK> i had modified something to observe something
vivanov has joined #ocaml
<DOUK> but i dont know what value a takes
<DOUK> i wanted to see if i could find the min with that same function by changing the comparison operator
<DOUK> but i still dont know what a is for
<adrien> 'a' is simply the max value of the list so far
<DOUK> when does it take the max value?
<DOUK> like assigning the max value x to a when x > a
<adrien> it starts by being the max value of a list with a single element, then if the next element in the list is smaller, it doesn't change and if it's bigger, it becomes this new value, which means it is now the max of the first two elements of the list
<adrien> repeat for each element until the end of the list and it'll be the max of all the elements of the list
<adrien> I don't know if I'm making things clearer, it's a bit late and I'm falling asleep
<DOUK> ok
<DOUK> well i dont see where a = x in order to save the new max value
<adrien> it's passed as a parameter
<adrien> so it only lives in the parameters of the function
<DOUK> oh wait
<DOUK> | x::r -> max_list_bis r x ;;
<DOUK> this line in the second part of the function
<DOUK> is when a takes the value of the first element
<DOUK> inside let max_list l =
<DOUK> match l with
<DOUK> [] -> failwith "empty"
<DOUK> | x::r -> max_list_bis r x ;;
ygrek has quit [Ping timeout: 246 seconds]
<DOUK> i see now
ymasory has quit [Quit: Leaving]
ikaros has quit [Quit: Leave the magic to Houdini]
temoto has joined #ocaml
<temoto> Hello. Where can i find recommended ocaml project filesystem layout?
<thelema> temoto: depends on the complexity of your project, but usually src/ holds your source files, doc/ holds documentation, maybe build/ holds build files, and . holds makefile/omakefile/myocamlbuild.ml
<thelema> if you need to organize your source files better, use subdirs in src/
<temoto> Same as in C.
<thelema> pretty much.
<temoto> Could you point considerations on choosing build tool makefile/omakefile/myocamlbuild.ml ?
<thelema> make works for simple projects, although there's an ocamlmakefile that adds logic to deal with quite complex build requirements, omake works for a range of complexities, but is a bit nonstandard, and has its own programming language/paradigm
<thelema> ocamlbuild is the new ocaml standard (distrbuted with ocaml itself) and is extended in ocaml, but works out of the box with a standardized myocamlbuild.ml and _tags file custom for your project to give external dependencies. Everything else is worked out pretty easily
<temoto> Thanks.
ulfdoz has quit [Ping timeout: 240 seconds]
<thelema> no problem.
<thelema> do you know what you're going to build?
<TimurSoft> Hello all, I have seen "open Syntax" on the top of a "main.ml", and in the same directory, there is a file "syntax.ml" , I would like to know which part of code (either in "syntax.ml" or makefile...) makes syntax a module so that I could be used in "main.ml"?
<temoto> Yes. I'm going to start a new project to learn OCaml and build it.
<temoto> TimurSoft, looks like no special syntax is required. It's just a capitalized filename without .ml suffix.
Oejet has quit [Ping timeout: 260 seconds]
<TimurSoft> temoto: thank you, I see
TimurSoft has left #ocaml []
Amorphous has quit [Ping timeout: 240 seconds]
Amorphous has joined #ocaml
vivanov has quit [Read error: Connection reset by peer]
vivanov has joined #ocaml
boscop has quit [Ping timeout: 246 seconds]
nihtml has joined #ocaml