gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.1 http://bit.ly/nNVIVH
spearalot has quit [Quit: Computer has gone to sleep]
arubin has joined #ocaml
aboSamoor has quit [Quit: leaving]
arubin has quit [Read error: Connection reset by peer]
arubin has joined #ocaml
Derander has quit [Quit: ZNC - http://znc.sourceforge.net]
Derander has joined #ocaml
ulfdoz_ has joined #ocaml
ulfdoz has quit [Read error: Operation timed out]
ulfdoz_ is now known as ulfdoz
mjonsson has joined #ocaml
mjonsson has quit [Client Quit]
sepp2k has quit [Remote host closed the connection]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
Modius has quit [Quit: "Object-oriented design" is an oxymoron]
ztfw has quit [Remote host closed the connection]
oriba has quit [Quit: oriba]
emmanuelux has quit [Ping timeout: 244 seconds]
sebz_ has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
sebz has quit [Client Quit]
EmmanuelOga has joined #ocaml
brooksbp has quit [Quit: Leaving]
lamawithonel__ has quit [Remote host closed the connection]
lamawithonel has joined #ocaml
EmmanuelOga has quit [Ping timeout: 244 seconds]
sebz has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
Modius has joined #ocaml
Modius has quit [Ping timeout: 252 seconds]
Modius has joined #ocaml
arubin has quit [Quit: arubin]
ztfw has joined #ocaml
Kakadu has joined #ocaml
mcclurmc has quit [Ping timeout: 258 seconds]
musically_ut has quit [Read error: Connection reset by peer]
mcclurmc has joined #ocaml
ygrek has joined #ocaml
ankit9 has joined #ocaml
spearalot has joined #ocaml
hto has joined #ocaml
Snark has joined #ocaml
<Drakken> How did diml find out about all this gobbledygook?
<Drakken> let module M = Camlp4OCamlParser.Make(Camlp4OCamlRevisedParser.Make(Camlp4.PreCast.Syntax)) in ()
thomasga has joined #ocaml
thomasga has quit [Client Quit]
ankit9 has quit [Ping timeout: 248 seconds]
ygrek has quit [Ping timeout: 248 seconds]
edwin has joined #ocaml
larhat has joined #ocaml
ztfw has quit [Ping timeout: 245 seconds]
ztfw has joined #ocaml
ousado has quit [Ping timeout: 252 seconds]
ikaros has joined #ocaml
edwin has quit [Remote host closed the connection]
sepp2k has joined #ocaml
edwin has joined #ocaml
ankit9 has joined #ocaml
edwin has quit [Remote host closed the connection]
edwin has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
milosn has quit [Read error: Connection reset by peer]
milosn has joined #ocaml
linshuai_irc has joined #ocaml
Cyanure has joined #ocaml
Anarchos has joined #ocaml
ikaros has joined #ocaml
ankit9 has quit [Quit: Leaving]
ttamttam has joined #ocaml
<edwin> hmm what happened to #use topfind? doesn't work anymore
<edwin> and I do have findlib installed
emmanuelux has joined #ocaml
oriba has joined #ocaml
<sgnb> mfp: http://anonscm.debian.org/gitweb/?p=pkg-ocaml-maint/packages/ocaml-sqlexpr.git;a=blob;f=debian/patches/0001-Remove-buggy-param-directive.patch;h=a3f02dcc418399e83fa5f5411f4409303424ac12;hb=HEAD
ousado has joined #ocaml
ttamttam has quit [Remote host closed the connection]
ztfw has quit [Ping timeout: 244 seconds]
bzzbzz has quit [Quit: leaving]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
Anarchos has joined #ocaml
linshuai_irc has left #ocaml []
rwmjones is now known as rwmjones_afk
arubin has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
ztfw has joined #ocaml
ulfdoz has quit [Quit: std debugging]
brooksbp has joined #ocaml
ulfdoz has joined #ocaml
Anarchos has joined #ocaml
<thelema> edwin: do you have a file `ocamlc -where`/topfind?
<edwin> thelema: no
<edwin> is that a Debian bug?
<thelema> the ocamlfind package should supply this file
<edwin> dpkg -L libfindlib-ocaml ocaml-findlib|grep topfind
<edwin> it doesnt' here
ikaros has joined #ocaml
spearalot has quit [Quit: Get MacIrssi - http://www.sysctl.co.uk/projects/macirssi/]
pheredhel has quit [Ping timeout: 258 seconds]
<mbac> what's the idiom in clojure for iterating a sequence without returning a value?
<mbac> (e.g. i want to work with side-effects)
<mbac> er, wait, wrong channel
<mbac> :)
<thelema> Enum.iter, in ocaml. :)
pheredhel has joined #ocaml
<sgnb> thelema, edwin: it is in libfindlib-ocaml-dev
<thelema> sgnb: of course; that makes sense
<sgnb> actually, it could (should?) be in libfindlib-ocaml
<sgnb> libfindlib-ocaml-dev is about using findlib as a library
<sgnb> libfindlib-ocaml is about using findlib as a tool
<thelema> not about using findlib for development?
<sgnb> indeed
<sgnb> ocaml-findlib/libfindlib-ocaml is about using findlib for development
<sgnb> or let's say ocaml-findlib is about using findlib for development, and libfindlib-ocaml is its dependencies
<thelema> ok, this makes sense too
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
ttamttam has joined #ocaml
ttamttam has quit [Remote host closed the connection]
oriba_ has joined #ocaml
avsm has joined #ocaml
<edwin> sgnb: thanks, topfind works now
struktured has joined #ocaml
sebz has joined #ocaml
oriba_ has quit [Quit: oriba_]
avsm has quit [Ping timeout: 244 seconds]
EmmanuelOga has joined #ocaml
larhat has quit [Quit: Leaving.]
ygrek has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
thelema has quit [Remote host closed the connection]
thelema has joined #ocaml
ikaros has joined #ocaml
Kakadu has quit [Quit: Konversation terminated!]
sepp2k1 has joined #ocaml
sepp2k has quit [Ping timeout: 244 seconds]
raichoo has joined #ocaml
ttamttam has joined #ocaml
ygrek has quit [Ping timeout: 248 seconds]
pheredhel has quit [Ping timeout: 252 seconds]
pheredhel has joined #ocaml
sepp2k1 has quit [Remote host closed the connection]
Anarchos has joined #ocaml
schme has quit [K-Lined]
ttamttam has quit [Remote host closed the connection]
ftrvxmtrx has quit [Quit: Leaving]
ftrvxmtrx has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
Snark has quit [Quit: Quitte]
ttamttam has joined #ocaml
ttamttam has quit [Remote host closed the connection]
flapjackery has joined #ocaml
ijp has joined #ocaml
rwmjones_afk is now known as rwmjones
raichoo has quit [Quit: leaving]
Cyanure has quit [Remote host closed the connection]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
ztfw has quit [Ping timeout: 252 seconds]
edwin has quit [Remote host closed the connection]
struktured has quit [Quit: Konversation terminated!]
struktured has joined #ocaml
Morphous has quit [Ping timeout: 258 seconds]
Morphous has joined #ocaml
roha has joined #ocaml
<roha> hey, ive got a newbie question. i hope somebody could help me:
<roha> ive tried to make a calculator in ocaml and i have multiple functions to parse a string etc.
<roha> Now, ive got some functions that call each other and the compiler always complains about "unbound value block"
<thelema> let rec foo = ... bar ... and bar = ... foo ...
<roha> isnt it possible to define function headers at the beginning of an ml file?
<thelema> no, there's no predeclarations in ocaml
<roha> kind of like in C, so that i can call a function within a function that is defined after the former function,
<roha> so if i want to use a function within a function i have to define it again within that same function?
<thelema> no, you have to declare values in reverse dependency order
<thelema> if you want to call [foo] from [bar], foo has to be defined first in the file
<thelema> if you want to have mutually recursive functions, use the syntax from my first response
<roha> ok thanks! ill use "...and..." then. :)
<thelema> don't forget the 'rec' after the first 'let'
<roha> in general, is it bad practise to write functions that depend on each other?
<thelema> not at all.
<thelema> since they're generally tightly coupled, they have to be defined together
<roha> defined together as in defined in the same function through "...and..."?
<thelema> defined simultaneously as part of one compound declaration
<roha> sorry, how does a compound declaration look like? i cant seem to find it via google
<thelema> let rec foo x = if x = 0 then 0 else 1 + bar (x-1) and bar x = x * foo (x-1)
avsm has joined #ocaml
<roha> ok so if i have three functions: "foo", bar" and "foobar", that call each other in a way such that it is not possible to write them in a file without getting a "unbound value" error.
<roha> the only way out of this would be to define the function again within another function via "...and..."?
<thelema> you can - keep using more 'and's to connect them
<thelema> not within the other function
<thelema> let rec foo = ... and bar = ... and foobar = ...
<thelema> this defines all three, and you can call any of the three from each other
<roha> but bar and foobar are restricted to be used in foo right?
<thelema> no, after this, all three are available
<thelema> if you want bar and foobar only inside foo, it's:
<thelema> let foo = ... let rec bar = ... and foobar = ... in
<thelema> ...
<thelema> with this, bar and foobar are available only inside foo, but cannot call foo
<thelema> if you really want to hide bar and foobar, and have all three mutually recursive:
<thelema> let foo = let rec foo = ... and bar = ... and foobar = ... in foo
<roha> ok just to be sure that i really got this right: i have multiple functions for my parser. the first declared function checks for a number in a given token-list, the function after that one in the ml file checks for parenthesis, the function after that one checks for addition/subtraction. and then the function that is called first, a function that tries to parse a whole expression.
<roha> the problem is, that the function that checks for a number also calls the function that parses an expression, so i have multiple kind of independent functions that rely on each other.
<roha> so the only way to solve this is through the things you've said?
<thelema> it sounds like you're doing recursive descent parsing.
<roha> exactly
<thelema> The right way to do this in ocaml is with a lot of 'and's
<thelema> defining the whole thing in one big recursive compound declaration
<roha> aaaah ok!
<roha> i think i got it, thanks so much!!
<thelema> let rec num = ... and paren = ... and addsub = ... and expr = ...
<roha> ok, now it starts to make sense. ill do it that way then, thanks!
<thelema> no problem
ikaros has quit [Quit: Ex-Chat]
roha has left #ocaml []
ousado_ has joined #ocaml
ousado has quit [Ping timeout: 258 seconds]
ftrvxmtrx has quit [Quit: Leaving]
ousado_ is now known as ousado
ousado has quit [Changing host]
ousado has joined #ocaml