* Yoric[DT]
hopes he didn't get anything too wrong.
<Yoric[DT]>
My next steps will be to add pattern matching on lazy lists and pretty printing of lazy lists.
<tsuyoshi>
seems to me if you want to construct code during runtime you should just use an embedded interpreter
<Jeff_123>
I don't want to write one :(
<tsuyoshi>
there are plenty already written
<Jeff_123>
I'm just gonna stick with compiling everything
<tsuyoshi>
there are two scheme interpreters written in ocaml
<tsuyoshi>
you can also link with ruby, python, or perl
<tsuyoshi>
unless what you really wanted was an ocaml interpreter?
<Jeff_123>
For now I don't need scripting; it's a long term thing.
<Jeff_123>
And ya I was thinking ocaml :)
<Jeff_123>
so ya I could like, require the user to have ocaml installed, compile whatever they said to a library and use dynlink, but c'mon that's like cheating ;)
piggybo1 has left #ocaml []
Jeff_123 has quit []
Theq629 has quit ["Leaving"]
Jeff_123 has joined #ocaml
love-pingoo has joined #ocaml
Jeff_123 has quit [Client Quit]
jeom is now known as jnkm
seafood_ has quit []
ttamttam has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
love-pingoo has quit ["Connection reset by pear"]
Jeff_123 has joined #ocaml
Jeff_123 has quit [Client Quit]
Proteus has quit [Remote closed the connection]
filp has joined #ocaml
wy__ has joined #ocaml
ertai has joined #ocaml
seafood_ has joined #ocaml
seafood_ has quit []
xavierbot has joined #ocaml
magnusj has quit [Remote closed the connection]
magnusj has joined #ocaml
gim has joined #ocaml
Jeff_123 has joined #ocaml
buluca has joined #ocaml
wy__ has quit ["Ex-Chat"]
ppsmimou has joined #ocaml
Jeff_123 has quit []
acatout has quit [Remote closed the connection]
acatout has joined #ocaml
seafood_ has joined #ocaml
wy has quit [Remote closed the connection]
jonathanv has joined #ocaml
marmottine has joined #ocaml
jonafan has quit [Read error: 110 (Connection timed out)]
hkBst has joined #ocaml
seafood_ has quit [calvino.freenode.net irc.freenode.net]
ttamttam has quit [calvino.freenode.net irc.freenode.net]
context has quit [calvino.freenode.net irc.freenode.net]
gaja has quit [calvino.freenode.net irc.freenode.net]
noj has quit [calvino.freenode.net irc.freenode.net]
l_a_m has quit [calvino.freenode.net irc.freenode.net]
flux has quit [calvino.freenode.net irc.freenode.net]
Hadaka has quit [calvino.freenode.net irc.freenode.net]
seafood_ has joined #ocaml
ttamttam has joined #ocaml
context has joined #ocaml
l_a_m has joined #ocaml
Hadaka has joined #ocaml
flux has joined #ocaml
gaja has joined #ocaml
noj has joined #ocaml
ikaros has joined #ocaml
ertai has quit [Read error: 110 (Connection timed out)]
ikaros has quit [Remote closed the connection]
buluca has quit [Read error: 113 (No route to host)]
wy has joined #ocaml
ertai has joined #ocaml
Yoric[DT] has joined #ocaml
qpu has quit ["kthxbye"]
deneb has joined #ocaml
wy has quit ["Ex-Chat"]
<flux>
yoric[dt], nice! is there pattern matching support for lazy lists?
<Yoric[DT]>
Not yet.
<Yoric[DT]>
Actually, technically, if you're willing to run camlp4 twice, it might work already.
<Yoric[DT]>
But that's not robust enough.
<Yoric[DT]>
That'll be for the next release.
<Yoric[DT]>
(hopefully)
<Yoric[DT]>
If you wish to try the experimental support, use preprocessor pp_lazylistpattern .
<flux>
maybe I'll play around with that on my holidays ;)
<Yoric[DT]>
:)
<Yoric[DT]>
Bug reports will be welcome.
<flux>
have you tried writing actual software with it?
<flux>
as a convenience instead of as a test case?
<Yoric[DT]>
No.
<Yoric[DT]>
Not yet.
<Yoric[DT]>
I'm currently converting the countdown problem just as a better test case.
<Yoric[DT]>
Plus my current work may end up using this syntax extension.
ertai has quit [Read error: 110 (Connection timed out)]
<madroach>
pchiusano: I would recommend you to put ;; after each global let, open and type statement, because it makes debugging some syntax errors easier.
<Yoric[DT]>
I'm lookint at the AST of Camlp4.
<pchiusano>
madroach: ok
<Yoric[DT]>
Does anyone have an idea of what <:ident<a b>> may be ?
<Yoric[DT]>
Obviously, it's an identifier that is itself the application of an identifier to another identifier.
<Yoric[DT]>
I have no clue what it means, though.
<pchiusano>
olle, that book looks nice
<Yoric[DT]>
flux: I've just had my first successful lazy pattern matching :)
<pchiusano>
how do I load a file in the REPL?
<flux>
yoric[dt], nice! so it forces only as much as needed?
<flux>
yoric[dt], btw, does case coverage analysis work with that? (or what is it called: the thing that say if you don't match all cases)
<Yoric[DT]>
I'm actually using another Camlp4 extension for this pattern-matching: Patterns-0.3 .
<pchiusano>
nm, got it
<Yoric[DT]>
The case coverage analysis seems to work.
<Yoric[DT]>
Although, according to the author, it's not flawless.
<Yoric[DT]>
Now, I need to submit a few patches to that extension.
<pchiusano>
how do you guys usually work when writing code...
jlouis_ has quit [Read error: 110 (Connection timed out)]
<Yoric[DT]>
What do you mean ?
<pchiusano>
like, I am used to the following workflow: I am editing a file, foo. I have an interactive prompt open. I make changes to the file, then reload the module in the repl, then issue some expressions
<Yoric[DT]>
I'm putting music :)
<Yoric[DT]>
I use the prompt relatively rarely.
<pchiusano>
okay, so what do you do instead?
ttamttam has left #ocaml []
<Yoric[DT]>
flux: mmmhhhh.... actually, looking at the code, code coverage doesn't work.
<Yoric[DT]>
pchiusano: write a set of tests, compile everything, compile the tests, check the output.
<pchiusano>
ok
<pchiusano>
is that what most people do?
<Yoric[DT]>
I'm not sure.
<Yoric[DT]>
I believe I should spend more time using the toplevel.
<pchiusano>
hmm, ok :)
<Yoric[DT]>
mmmhhh....
<Yoric[DT]>
Does anyone know how I can inspect a .cma and find out what modules it contains ?
<flux>
yoric[dt], ocamlobjinfo
<Yoric[DT]>
thanks
<flux>
pchiusano, I usually press C-x C-e in xemacs to evaluate the function and perhaps then try it out a few times in the interactive session (inside xemacs)
<flux>
for little parts
<flux>
for the whole file I might go ahead and use #use
<flux>
and for the whole project I might have a toplevel-target in the makefile
<Yoric[DT]>
mmmhhhh.....
<Yoric[DT]>
I have produced a .cma using OCamlBuild.
<Yoric[DT]>
Now, I can #load it from the toplevel, but I can't open the modules it contains.
<Yoric[DT]>
Any idea ?
<pchiusano>
you cannot have multiple defs of same function in ocaml, right, like: factorial 1 = 1; factorial n = n * factorial (n-1); you would do factorial n = match n with 1 -> 1 | n -> n * factorial (n-1)
<pango>
yup, or in this specific case, use 'function'
<pango>
as in, let rec factorial = function 1 -> 1 | n -> n * factorial (n-1)
RobertFischer has joined #ocaml
pchiusano has quit [Read error: 104 (Connection reset by peer)]
<Yoric[DT]>
So, no error regarding my .cma issue ?
pchiusano has joined #ocaml
<Yoric[DT]>
So, no idea regarding my .cma issue ?
* Yoric[DT]
is tired.
<bluestorm>
pchiusano: you have to do the second way
<flux>
yoric[dt], I sometimes have the same problem, I just work around it by loading the individual .cmo-files :)
<Yoric[DT]>
:)
<Yoric[DT]>
My problem is that I wish to distribute this.
<Yoric[DT]>
It's a bug I found in my syntax extension.
<Yoric[DT]>
The .cmo work fine, the .cma doesn't.
Snark has quit ["Quitte"]
<pchiusano>
is there like an ocaml --make option?
<olleolleolle>
pchiusano: like a build system?
<pchiusano>
yeah, like I just pass it the main file, and it compiles all dependencies?
<bluestorm>
Yoric[DT]:
<bluestorm>
<:ident< a b >> get pretty-printed as a(b)