seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
seafood__ has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood__ has quit [Connection reset by peer]
seafood_ has joined #ocaml
nashdj has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
seafood__ has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood__ has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
zmdkrbou has quit [Read error: 110 (Connection timed out)]
dbueno has quit ["This computer has gone to sleep"]
middayc has joined #ocaml
leo037 has quit ["nenuit"]
piggybox has joined #ocaml
seafood_ has joined #ocaml
bzzbzz has joined #ocaml
piggybo1 has quit [Connection timed out]
yminsky_ has joined #ocaml
yminsky_ has quit []
zmdkrbou has joined #ocaml
yminsky_ has joined #ocaml
kmeyer has left #ocaml []
ita has quit [Remote closed the connection]
middayc has quit []
__suri_ has joined #ocaml
yminsky_ has quit []
__suri has quit [Read error: 110 (Connection timed out)]
buluca has quit [Read error: 113 (No route to host)]
buluca has joined #ocaml
zmdkrbou has quit [Read error: 110 (Connection timed out)]
thermoplyae has left #ocaml []
jderque has joined #ocaml
__suri_ has quit [Read error: 110 (Connection timed out)]
__suri has joined #ocaml
AxleLonghorn has joined #ocaml
piggybo1 has joined #ocaml
seafood_ has quit []
mordaunt has joined #ocaml
jonathanv has joined #ocaml
ygrek has joined #ocaml
piggybox has quit [Read error: 110 (Connection timed out)]
jderque has quit [Read error: 113 (No route to host)]
jonafan has quit [Read error: 110 (Connection timed out)]
jderque has joined #ocaml
ygrek has quit [Remote closed the connection]
piggybox has joined #ocaml
seafood has quit [Read error: 113 (No route to host)]
seafood has joined #ocaml
piggybo1 has quit [Read error: 110 (Connection timed out)]
buluca has quit [Read error: 113 (No route to host)]
ttamttam has joined #ocaml
jderque has quit [Read error: 113 (No route to host)]
olleolleolle has joined #ocaml
AxleLonghorn has left #ocaml []
dibblego has quit [Nick collision from services.]
dabblego has joined #ocaml
filp has joined #ocaml
zmdkrbou has joined #ocaml
Associat0r has quit []
olleolleolle has quit []
acatout has quit ["BRB."]
acatout has joined #ocaml
acatout has quit [Client Quit]
asmanur has joined #ocaml
acatout has joined #ocaml
marmottine has joined #ocaml
leo037 has joined #ocaml
Yoric[DT] has joined #ocaml
<Yoric[DT]>
hi
hkBst has joined #ocaml
huh has quit [Read error: 104 (Connection reset by peer)]
huh has joined #ocaml
Mr_Awesome has quit ["aunt jemima is the devil!"]
ttamttam has left #ocaml []
ygrek has joined #ocaml
marmottine has quit [Remote closed the connection]
seafood_ has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
seafood_ has quit [Success]
pattern has quit [Remote closed the connection]
filp has quit ["Bye"]
seafood_ has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
filp has joined #ocaml
seafood_ has joined #ocaml
seafood__ has joined #ocaml
buluca has joined #ocaml
seafood__ has quit [Read error: 104 (Connection reset by peer)]
seafood__ has joined #ocaml
seafood_ has quit [Connection timed out]
seafood__ has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
acatout has quit [Remote closed the connection]
ttamttam has joined #ocaml
robyonrails has joined #ocaml
buluca has quit [Read error: 113 (No route to host)]
sergez has joined #ocaml
seafood_ has quit [Read error: 110 (Connection timed out)]
sergez has quit [Read error: 104 (Connection reset by peer)]
sergez has joined #ocaml
piggybox has quit [Read error: 104 (Connection reset by peer)]
sergez has quit []
sergez has joined #ocaml
sergez has quit [Client Quit]
sergez has joined #ocaml
acatout has joined #ocaml
sergez has quit [Read error: 104 (Connection reset by peer)]
sergez has joined #ocaml
dramsay has joined #ocaml
huh has quit [Nick collision from services.]
huh_ has joined #ocaml
sergez has quit []
jonathanv has quit [Read error: 110 (Connection timed out)]
ita has joined #ocaml
jonathan has joined #ocaml
Boojum has joined #ocaml
Boojum is now known as Snark
buluca has joined #ocaml
lmbdwr has joined #ocaml
<lmbdwr>
hello
piggybox has joined #ocaml
<Yoric[DT]>
hi
RobertFischer has joined #ocaml
Tetsuo has joined #ocaml
leo037 has quit ["Leaving"]
jonathan is now known as jonafan
ygrek has quit [Remote closed the connection]
leo037 has joined #ocaml
ygrek has joined #ocaml
buluca has quit [No route to host]
lmbdwr has quit ["Leaving"]
pango_ has quit [Remote closed the connection]
hkBst has quit [Remote closed the connection]
pango_ has joined #ocaml
piggybox has left #ocaml []
robyonrails has quit ["Sto andando via"]
buluca has joined #ocaml
mordaunt has quit [Read error: 104 (Connection reset by peer)]
marmottine has joined #ocaml
Associat0r has joined #ocaml
zmdkrbou has quit [Read error: 110 (Connection timed out)]
filp has quit ["Bye"]
pattern has joined #ocaml
acatout has quit ["leaving"]
acatout has joined #ocaml
postalchris has joined #ocaml
hkBst has joined #ocaml
asmanur has quit [Remote closed the connection]
hkBst_ has joined #ocaml
nashdj has quit [Read error: 110 (Connection timed out)]
asmanur has joined #ocaml
dbueno has joined #ocaml
hkBst has quit [Read error: 110 (Connection timed out)]
dbueno has quit ["This computer has gone to sleep"]
dbueno has joined #ocaml
middayc has joined #ocaml
ita has quit ["Hasta luego!"]
ygrek has quit [Remote closed the connection]
ygrek has joined #ocaml
RobertFischer has left #ocaml []
postalchri1 has joined #ocaml
postalchris has quit [Read error: 110 (Connection timed out)]
drams has joined #ocaml
jderque has joined #ocaml
dramsay has quit [Read error: 110 (Connection timed out)]
postalchri1 has quit [Remote closed the connection]
bluestorm has joined #ocaml
postalchris has joined #ocaml
rwmjones has quit ["Closed connection"]
leo037 has quit [Connection timed out]
leo037 has joined #ocaml
dramsay__ has joined #ocaml
Snark has quit ["Quitte"]
drams has quit [Read error: 110 (Connection timed out)]
zmdkrbou has joined #ocaml
asmanur has quit [Remote closed the connection]
dramsay__ has quit [Read error: 110 (Connection timed out)]
ttamttam has quit ["Leaving."]
ttamttam has joined #ocaml
ttamttam has left #ocaml []
dbueno has quit ["This computer has gone to sleep"]
<bla>
Hm.. what would you propose to parse simple expressions? I need to parse ansi colors and some ansi commands.
<bla>
e.g. "<esc>]" int ';' int 'm'
<bla>
I was trying with Lexgen + parser, but that lexer is...hm. Poor.
<bla>
Now I'm fighting with EXTEND..END, Plexer etc. But i can't understand it with mine materials.
<bla>
It either prints nothing or Fatal error: exception Stdpp.Exc_located(_, _)
<bluestorm>
hm
<bla>
I know how to use ocamllex and ocamlyacc, but they are TOO BIG for this task.
<bla>
Lexgen couldn't split "123abc123" into 2 ints, it splitted it into int, and Ident 'abc123'.
<bluestorm>
what's the problem with genlex ?
<bluestorm>
hm
<bla>
Maybe I did something wrong.
<bluestorm>
that follows the ocaml naming conventions
buluca has quit [Read error: 110 (Connection timed out)]
<bluestorm>
isn't the "foo2" indent allowed in your language ?
<bla>
If you know some good materials about camlp4 (EXTEND...) and Plexer (I'm using INT e.g. but haven't seen it's definition and dedcription)
<bla>
Hm. I've got stream of characters. If I receive <esc> I have to match either ]int;intm or ]intm or ]int;intg
<bla>
All else characters can be passed as 'Char b' further, but it would be cool to lex numbers at the same time.
<bluestorm>
the simplest thing to do would probably to code a recursive-descent lexer+parser (in one go) yourself
<bluestorm>
using streams, that's quite easy
<bla>
I guess If I write a lexer myself existing parser should do
<bla>
I can try this way.
<bluestorm>
do you really need one ?
<bla>
Well, it's one problem only. In this problem I'll have to use more parsers.
<bla>
I'll use ocamlyacc/lex for few big parsing problems, but still it would be useful to have something universal for simple parsing problems.
<bluestorm>
hum
<bluestorm>
once you have a generic lexer (you can plug your lexer into the Genlex interface for reusability), what is more universal than "do the recursive-descent yourself easily with streams" ?
<bluestorm>
looks like a very good genericty/usefulness balance
<bluestorm>
hm
<bla>
It'll be ok. I'll just split lexer and parser, won't do it in one go so I can reuse lexer in other parsers.
<bluestorm>
you may want to use a combinatoric parser library
<bluestorm>
(for small-scale but with a bit more tools that the manual recursive descent)
<bluestorm>
i know one has been developped for OCaml recently (Jane Street's summer of code), but they're not so common i'm afraid
<bla>
Hm.
<bla>
I'll start with reading more about Stream module.
<bluestorm>
(seems most people use a "heavier" external tool solution)
<flux>
anarchos, and even without optimizations, it could serve as a base for for example java debuggers
<flux>
I'm thinking debugging is what you'll be doing lots when writing that bytecode interpreter :)
<mbishop>
BTW I got an answer from the guy at plnews
<bla>
bluestorm, guess i should update my ocaml bookmarks. Thanks once again.
<flux>
(of course, perhaps I'm wrong and it goes without a hitch)
<mbishop>
he says up until about a month ago his site used python cgi, now it uses Ocaml to generate a static page
<flux>
self-written all the way?
<flux>
I suppose plnews isn't that complex a website, though..
<mbishop>
I don't know, he said if he gets time he'd write up something more detailed
* jlouis
hacks Twelf
<Anarchos>
bluestorm thx a lot !! BTW i knew those pages on DA-OCAML for streams, and i use a stream analyzer to get class file bytes by bytes
<bluestorm>
bla : one last thing : the stream syntax ( [< .. >] ) is now a camlp4 extension
<bluestorm>
to use it in your caml programs you have to preprocess with camlp4o
<bluestorm>
ocamlc -pp camlp4o ...
<bla>
I do.
<bluestorm>
ok
<bluestorm>
fine
<bla>
Sure; I was trying this EXTEND thing and so it had to be included.
ita has joined #ocaml
seafood_ has joined #ocaml
seafood_ has quit [Remote closed the connection]
seafood_ has joined #ocaml
pippijn_ has joined #ocaml
pippijn has quit [Read error: 113 (No route to host)]
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
l_a_m has quit [Remote closed the connection]
seafood_ has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
seafood_ has quit [Remote closed the connection]
seafood_ has joined #ocaml
marmottine has quit ["Quitte"]
postalchris has quit [Read error: 110 (Connection timed out)]
seafood_ has quit [Remote closed the connection]
seafood_ has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
<bla>
bluestorm, I've reversed reading this int and it works generally.
seafood_ has quit [Read error: 104 (Connection reset by peer)]
<bla>
Still. I've got dumb problem. I don't know how to match an escape.
<bluestorm>
\n \t ?
<bluestorm>
hm
<bla>
There's no \e in OCaml, is it?
<bla>
char_of_int 27 won't work in matching.
<bla>
And let escape = char_of_int 27 and using 'escape won't do either.
<bluestorm>
\27 ?
<bla>
Ok, trying.
seafood_ has joined #ocaml
<bluestorm>
hm
<bluestorm>
doesn't work
<bluestorm>
\x27 maybe
<bla>
Red.
<bla>
\x and hex..
<bla>
\x1b
<bla>
Trying...
<bluestorm>
\027 works too
<bla>
Works. ;) Thanks.
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
nashdj has joined #ocaml
maayhem has joined #ocaml
<maayhem>
good evening
<Anarchos>
maayhem hello
<maayhem>
let code = (List.map (fst (translate_program indices)) (rev elist)) in [...]
<maayhem>
translate_program returns a couple, elist is a list
<maayhem>
the first elem of the couple is itself a list, as such code is a list of lists
<Anarchos>
so fst () is an element of your couple, not a fun
<maayhem>
how can I use List.map to execute translate_program on all elist element, but only care about the first couple element ? currently as you noticed its not well typed
<maayhem>
(I want code to be a list of lists and not a list of couples of (list,_))
<maayhem>
I see no solution except create a new recursive function instead of using List.map ..