gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.0 http://bit.ly/aNZBUp
olauzon has joined #ocaml
olauzon has quit [Client Quit]
dnolen has joined #ocaml
Asmadeus_ is now known as Asmadeus
smerz has quit [Quit: Ex-Chat]
lopex has quit [Read error: Connection reset by peer]
lopex has joined #ocaml
joewilliams is now known as joewilliams_away
lopex has quit []
ymasory has quit [Remote host closed the connection]
ymasory has joined #ocaml
groovy2shoes has joined #ocaml
groovy2shoes has quit [Changing host]
groovy2shoes has joined #ocaml
groovy2shoes has quit [Quit: groovy2shoes]
joewilliams_away is now known as joewilliams
lamawithonel_ has joined #ocaml
lamawithonel has quit [Read error: Connection reset by peer]
groovy2shoes has joined #ocaml
groovy2shoes has quit [Changing host]
groovy2shoes has joined #ocaml
myu2 has joined #ocaml
ymasory has quit [Quit: Leaving]
groovy2shoes has quit [Quit: groovy2shoes]
f[x] has quit [Read error: Operation timed out]
f[x] has joined #ocaml
joewilliams is now known as joewilliams_away
dnolen has quit [Quit: dnolen]
ulfdoz has joined #ocaml
dnolen has joined #ocaml
enthymeme has quit [Quit: rcirc on GNU Emacs 23.1.1]
ulfdoz has quit [Ping timeout: 252 seconds]
philtor has joined #ocaml
Yoric has joined #ocaml
enthymeme has joined #ocaml
dnolen has quit [Quit: dnolen]
sepp2k has joined #ocaml
ygrek has joined #ocaml
joelr has joined #ocaml
mcclurmc_home has joined #ocaml
sepp2k has quit [Ping timeout: 252 seconds]
philtor has quit [Read error: Operation timed out]
larhat has joined #ocaml
Obfuscate has quit [Read error: Operation timed out]
Yoric has quit [Quit: Yoric]
wagle has quit [Ping timeout: 276 seconds]
sepp2k has joined #ocaml
ikaros has joined #ocaml
BiDOrD has quit [Ping timeout: 240 seconds]
edwin has joined #ocaml
Obfuscate has joined #ocaml
ttamttam has joined #ocaml
Obfuscate has quit [Ping timeout: 246 seconds]
myu2 has quit [Remote host closed the connection]
emmanuelux has quit [Quit: =>[]]
sepp2k has quit [Quit: Leaving.]
adlsaks has joined #ocaml
joelr has quit [Quit: joelr]
wagle has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
Obfuscate has joined #ocaml
Cyanure has joined #ocaml
ygrek has quit [Ping timeout: 246 seconds]
Cyanure has quit [Remote host closed the connection]
qqmrw has quit [Quit: Page closed]
myu2 has joined #ocaml
Cyanure has joined #ocaml
Cyanure has quit [Client Quit]
mfp has joined #ocaml
myu2 has quit [Remote host closed the connection]
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
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
myu2 has joined #ocaml
ttamttam has left #ocaml []
rwmjones has quit [Read error: Operation timed out]
mcclurmc_home has quit [Ping timeout: 246 seconds]
rwmjones has joined #ocaml
Tobu_ has quit [Remote host closed the connection]
Tobu has joined #ocaml
ttamttam has joined #ocaml
enthymeme has quit [Quit: rcirc on GNU Emacs 23.1.1]
ygrek has joined #ocaml
adlsaks has quit [Ping timeout: 246 seconds]
BiDOrD has joined #ocaml
adlsaks has joined #ocaml
BiDOrD has quit [Read error: Operation timed out]
_andre has joined #ocaml
Yoric has joined #ocaml
BiDOrD has joined #ocaml
myu2 has quit [Remote host closed the connection]
joelr has joined #ocaml
joelr has quit [Client Quit]
wagle has quit [Read error: Operation timed out]
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
myu2 has joined #ocaml
lopex has joined #ocaml
lopex is now known as Guest42077
Guest42077 has quit [Client Quit]
lopex has joined #ocaml
ygrek has quit [Ping timeout: 246 seconds]
joelr has joined #ocaml
Snark has joined #ocaml
wagle has joined #ocaml
adlsaks has quit [Ping timeout: 276 seconds]
drunK has joined #ocaml
Yoric has quit [Ping timeout: 240 seconds]
ikaros has joined #ocaml
Yoric has joined #ocaml
SoftTimur has joined #ocaml
<SoftTimur> hello all
<SoftTimur> I would like to create a small toy language with lexer, parser, analyzer and interpreter... does anyone know how to start that?
<larhat> SoftTimur: http://andrej.com/plzoo/
<SoftTimur> should i first use ocamllex or ocamlyacc?
<flux> softtimur, hmm.. you would use both.
<flux> softtimur, perhaps in practice the first step is to write a lexer, even an incomplete one, and then start building the parser
<flux> and the parser would produce an AST and you might write an interpreter for that, or possibly have some intermediate language
<SoftTimur> larhat: thanks for the link
wtetzner has quit [Remote host closed the connection]
<SoftTimur> flux: the first step would be to write a lexer by ocamllex?
<flux> softtimur, well, if you go that way you have more early a version that can accept actual code
<flux> softtimur, if you write parser first, you need to create sequences of tokens in Objective Caml data format you feed to it
<flux> I guess it depends on the person what he wants to accomplish first
<SoftTimur> flux: i just would like to find a easiest way to start
oriba has joined #ocaml
<flux> softtimur, perhaps you should look at the ocaml manual then, it has a section on lexers and parsers, with a complete example
<SoftTimur> flux: "if you go that way you have more early a version that can accept actual code" ==> you mean i could have a version which works very soon?
Yoric has quit [Quit: Yoric]
<thelema> SoftTimur: you can have a version which partially works very soon.
<flux> softtimur, it is the difference of having a program that accepts let a = "hello world" and a library that is called like evaluate [T_Let, T_Ident "a", T_Equal, T_String "hello world"]
<flux> (, is obviously ; in that..)
dnolen has joined #ocaml
<SoftTimur> flux: i guess "let a = "hello world"" is accepted by a version generated by ocamllex?
<SoftTimur> thelema: ok...
<flux> softtimur, well, yes, depending on your lexer :)
<flux> but it might very well accept let a = = = = = = as well, if you don't have a parser..
<SoftTimur> cool, i think i see generally what you mean... i will first read the lexer and parser part of ocaml manual...
<SoftTimur> thank you all
SoftTimur has left #ocaml []
SoftTimur has joined #ocaml
<thelema> type ('a,'b) pair = {_0:'a; _1:'b}
groovy2shoes has joined #ocaml
groovy2shoes has quit [Client Quit]
<flux> ?
<thelema> flux: I was just looking at rust, and their tuples have record-like access to components
ttamttam has quit [Ping timeout: 276 seconds]
avsm has joined #ocaml
<SoftTimur> hello all, i am now editing a .mly with Emacs, does anyone know how should i configure the Tuareg?
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
<thelema> SoftTimur: tuareg doesn't do too bad on .mly files
<thelema> oh yeah, except the auto-indenting doesn't work.
<thelema> just make sure your rules start at the beginning of the line and the rest should work out
<SoftTimur> thelema: that is what i wanted to say...
<thelema> just don't auto-indent anything that doesn't start |
<SoftTimur> thelema: i see your point, actually it is not that bad... thank you
ymasory has joined #ocaml
avsm has quit [Quit: Leaving.]
myu2 has quit [Remote host closed the connection]
boscop_ has joined #ocaml
ttamttam has joined #ocaml
Cyanure has joined #ocaml
dnolen has quit [Quit: dnolen]
edwin has quit [Quit: Leaving.]
lopex has quit []
yezariaely has joined #ocaml
rwmjones has quit [Ping timeout: 241 seconds]
notk0 has joined #ocaml
notk0 has left #ocaml []
avsm has joined #ocaml
rwmjones has joined #ocaml
philtor has joined #ocaml
vivanov has joined #ocaml
notk0 has joined #ocaml
<notk0> hello , I have a match withing a match, how can I end the second match?
<thelema> use () around the second match
<hcarty> notk0: You can wrap the inner match in "begin .. end" or ( )
<thelema> or begin/end if you like words better
<notk0> thank you, I will try that
<notk0> thank you that seem to work properly, at least the cursor goes at the right place in emacs now
oriba has quit [Quit: Verlassend]
joewilliams_away is now known as joewilliams
<thelema> yay emacs for reducing bugs
<notk0> tuareg :P
<notk0> BTW, does anybody here use menhir?
<thelema> notk0: a little
avsm has quit [Quit: Leaving.]
<notk0> thelema, are you familiar with this error: "Error: Two productions that share a semantic action must define
<notk0> exactly the same identifiers.
<notk0> "
<thelema> haven't run into that one. I think it's similar to the error when combining match clauses
<notk0> I tried to read the manual but didn't understand anything :X
<thelema> match (1,3) with (1,a) | (b,3) -> ...
<notk0> thelema, that error comes from menhir
<thelema> do you see what the problem with this match statement is?
<thelema> yes, I'm sure it's the same kind of problem as this.
<thelema> you have two productions that share an action, right?
<notk0> thelema, the part that gives an error was not written by me, it was written by my partner today I think
<notk0> what does two productions that shaer an action mean?
<thelema> in the two productions, you *must* bind the same variables. If you don't, the shared action isn't guaranteed to work.
<notk0> thelema, sorry I don't understand
<notk0> I think the error might come from empty production units
<thelema> exp: exp PLUS exp | exp MINUS exp -> {Op($1, $2, $3)}
<notk0> thelema, actually I found the error, I feel stupid now
<thelema> this is two productions (e+e, e-e) that share a semantic action
<thelema> it could be just a missing action
<notk0> it was because there were a lot of empty productions with todo comments
<thelema> use "assert false" or "raise Not_implemented"
<notk0> thelema, silly me, I removed them XD
<notk0> also thank you for the help thelema
<thelema> now you know.
Yoric has joined #ocaml
yezariaely has quit [Quit: Leaving.]
larhat has quit [Quit: Leaving.]
<philed> hcarty: No bug.
<philed> hcarty: "lwt s = Lwt_io.read_line Lwt_io.stdin;;" won't work.
<philed> However: you can write "let t = Lwt_io.read_line Lwt_io.stdin in lwt s = t in return s"
<hcarty> philed: Cool, thank you for letting me know
<philed> Cheers for your time, anyway. Thought it would be good to get some closure :)
<hcarty> Definitely - better to know than not :-)
ttamttam has quit [Remote host closed the connection]
pheredhel` has quit [Ping timeout: 276 seconds]
sepp2k has joined #ocaml
<flux> I guess it must work that way, because for example let a = 42 is not an expression, it's a statement
<flux> but anything in a monad is an expression
<flux> (let a = 42 in a is an expression)
pheredhel has joined #ocaml
ymasory has quit [Quit: Leaving]
_unK has joined #ocaml
drunK has quit [Ping timeout: 252 seconds]
diml has quit [Ping timeout: 264 seconds]
diml has joined #ocaml
drunK has joined #ocaml
eye-scuzzy has quit [Ping timeout: 248 seconds]
_unK has quit [Ping timeout: 276 seconds]
boscop__ has joined #ocaml
boscop_ has quit [Read error: Connection reset by peer]
enthymeme has joined #ocaml
boscop_ has joined #ocaml
boscop__ has quit [Ping timeout: 246 seconds]
<philed> flux: Is that the problem, though. I was going to put it down to it not liking the function application, and just wanting a single identifier.
_unK has joined #ocaml
drunK has quit [Ping timeout: 246 seconds]
<_habnabit> So, I'm profiling an ocaml application. Nearly 45% of the time is spent in either `mcount` or `__mcount_internal`. Is this normal?
avsm has joined #ocaml
eye-scuzzy has joined #ocaml
AdultSwim has joined #ocaml
ulfdoz has joined #ocaml
ygrek has joined #ocaml
Snark has quit [Quit: Ex-Chat]
boscop_ has quit [Ping timeout: 246 seconds]
ymasory has joined #ocaml
scooty-puff has joined #ocaml
<scooty-puff> is the ocaml module language turing complete?
<scooty-puff> i've been banging at something for a bit, and it seems like no
<scooty-puff> (to ensure compilation terminates?)
<hcarty> scooty-puff: Possibly not... 3.12.x and 3.13.x may bring it closer?
<scooty-puff> hcarty, looked like they have first-class modules, but i imagine most of this is at runtime (though it would be cool if its smart enough to shift to compile-time what it can)
<hcarty> I believe it's primarily runtime - there is some overhead cost associated with using first-class modules
Modius has quit [Quit: "Object-oriented design" is an oxymoron]
mcclurmc_home has joined #ocaml
<scooty-puff> ok
<scooty-puff> is there a way to have a functor require some other functor? I assume by passing the other functor as an argument
<scooty-puff> not the best explanation..
<scooty-puff> if it was haskell, it'd be:
<scooty-puff> class Monoid a => Body a where ...
<scooty-puff> i guess when i really need it is at the site of function use:
<scooty-puff> *declaration
<scooty-puff> (quasi code)
<flux> higher order functors are valid according to documentation, but actually I haven't ever used them..
<scooty-puff> k
<scooty-puff> nevermind the quasi code i was going to paste, not well thought out enough ..
notk0 has quit [Quit: bye bye]
alexyk has joined #ocaml
myu2 has joined #ocaml
AdultSwim has quit [Ping timeout: 248 seconds]
CrashOverride has joined #ocaml
CrashOverride has quit [Client Quit]
ftrvxmtrx has quit [Ping timeout: 240 seconds]
ftrvxmtrx has joined #ocaml
_andre has quit [Quit: leaving]
mnabil has joined #ocaml
edwin has joined #ocaml
edwin has quit [Remote host closed the connection]
ulfdoz has quit [Ping timeout: 260 seconds]
alexyk has quit [Quit: alexyk]
ygrek has quit [Ping timeout: 246 seconds]
Cyanure has quit [Remote host closed the connection]
mcclurmc_home has quit [Ping timeout: 246 seconds]
Yoric has quit [Quit: Yoric]
cthuluh has quit [Ping timeout: 248 seconds]
cthuluh has joined #ocaml
ymasory has quit [Quit: Leaving]
scooty-puff has quit [Quit: Leaving]
ikaros has quit [Quit: Leave the magic to Houdini]
adlsaks has joined #ocaml
<gildor> thelema: ping
ymasory has joined #ocaml
<gildor> thelema: you can refesh the odb admin panel, there is now errors concerning packages
<gildor> thelema: but I am afraid that error detection as displayed on the panel is quite complex (in term of CS time)
<gildor> thelema: the page loading time raise from 100ms to 1,24s
<gildor> thelema: I will have to commit my changes concerning odb and go on with other tasks now, send me an email if you want to change something
joelr has quit [Quit: joelr]
ymasory has quit [Quit: Leaving]
ymasory has joined #ocaml
thelema has quit [Read error: Connection reset by peer]
adlsaks has quit [Ping timeout: 264 seconds]
cthuluh has quit [Ping timeout: 248 seconds]
cthuluh has joined #ocaml
sepp2k has quit [Quit: Leaving.]
flx_ has joined #ocaml
flux has quit [Ping timeout: 260 seconds]
flx_ is now known as flux
thelema has joined #ocaml
<gildor> thelema: ping
enthymeme has quit [Quit: rcirc on GNU Emacs 23.1.1]
<thelema> pong
<thelema> 2 minutes to put the asparagus in the oven
<thelema> gildor: ok, back
Amorphous has quit [Ping timeout: 246 seconds]
<gildor> thelema: I msg you the 3 sentences you probably miss
<hcarty> thelema: Asparagus here too. A spooky #ocaml conspiracy.
<thelema> gildor: I got them off the irc logs.
philtor has quit [Ping timeout: 260 seconds]
<gildor> thelema: I have just commited my changes to darcs, will be off to another task
<gildor> thelema: the meeting is coming and oasis-db must be released before
<thelema> ok. I'll get you feedback on the odb soon
<thelema> ah, one week left?
<thelema> well, do what you must
<thelema> gildor: wow, the errors will make things *much* easier to get working. Merci beaucoup!
<gildor> thelema: it has a cost in term of complexity, I'll probably have to find a way to optimize them when the number of packages will grow
<gildor> thelema: maybe a simple cache of _oasis will be enough, but we need to keep an eye on this
<thelema> one option might be to have a button on the page to refresh with errors turned on, and leave the off most of the time
<gildor> thelema: yes, will consider this option, if it becomes painfull
Amorphous has joined #ocaml
<thelema> what's the costly part - querying all the packages from the DB?
<gildor> thelema: not sure about what is costly, just happen to take time and get quick when turned off
<thelema> no problem
<gildor> thelema: I think the cost comes from the _oasis parsing, but I don't really know
<thelema> so it re-parses the _oasis files? I expected that would be shoved in a SQL backend
<gildor> thelema: nope, it reparse everything for now
<thelema> ah, that would be expensive
<gildor> SQL backend -> will cause more trouble than what it solves
<thelema> very possibly. It'd be useful for making this kind of thing efficient, though.
<gildor> if there are still performance issue, I will just add a (filename, OASIS.package) Hashtable
<thelema> That should also work.
<gildor> thelema: ocsigen is a server, so you can store data in memory, no need of SQL
<thelema> ah, I didn't realize that. That memory has to be regenerated when you restart the server, but that's 1x parsing the files, not per-request
<gildor> thelema: indeed, and you can store quite complex datastructure in memory
<thelema> nosql-ish.
<thelema> except more ad-hoc than a k-v store
<gildor> that is one of the good point of ocsigen (IMHO)
<thelema> I may consider it more if I ever need a web service. The whole "enforced by the type-system correct XML" is actualy a turn-off for me.
<thelema> kaustuv: ping
enthymeme has joined #ocaml