<_habnabit>
... actually, better yet, can I jam my own data onto the parse state?
<dsheets>
_habnabit: .mlp = .mly? you can call functions in the semantic actions
<_habnabit>
er, yes, I meant to type .mly
<dsheets>
_habnabit: you can use mutable state and the mutation will be done as productions are satisfied
<_habnabit>
right, but I need to reset that state somehow.
<thelema>
global variables.
<dsheets>
_habnabit: wrap your auto-generated parse function in a function that sets up and tears down your parser state
<_habnabit>
dsheets, how? that's the part I'm confused about.
<dsheets>
_habnabit: the entry production gets a function automatically created. you can make a module to wrap the generated parser and do parser-control related tasks
<_habnabit>
oh, I see.
<dsheets>
_habnabit: i'm not sure if there is a good way to splice your own module interface into the generated interface :-/
<_habnabit>
but then how do you poke that state into the parser? it seems like it would be a mutually recursive reference, with one module holding the state and calling the parse function, and the other doing the parsing.
<_habnabit>
unless I have to have /three/ modules.
<dsheets>
_habnabit: i have lang.mly, lang_lib.ml and langc.ml, personally
<_habnabit>
well, I think that I'm going to make resetting the state a part of the parse/error action on the root production.
<_habnabit>
at least that seems like it would cover all of the cases: success, and failure.
arubin has quit [Quit: arubin]
khia0 has joined #ocaml
khia0 has left #ocaml []
junsuijin has quit [Read error: Connection reset by peer]
junsuijin has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
<hcarty>
bitbckt: I emailed the findlib author to ask about the possibility of adding version support. I don't remember if I heard anything back.
<hcarty>
bitbckt: It would definitely be a worthwhile addition
lopex has quit []
BiDOrD has joined #ocaml
BiDOrD_ has quit [Ping timeout: 250 seconds]
sebz has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
arubin has joined #ocaml
sebz has joined #ocaml
wuj has joined #ocaml
wuj has quit [Read error: Operation timed out]
StepanKuzmin has quit [Remote host closed the connection]
ezyang has quit [Read error: Operation timed out]
arubin has quit [Quit: arubin]
dnolen has quit [Quit: dnolen]
ulfdoz has joined #ocaml
Reaganomicon has quit [Read error: Connection reset by peer]
Reaganomicon has joined #ocaml
ulfdoz has quit [Ping timeout: 252 seconds]
DimitryKakadu has joined #ocaml
<DimitryKakadu>
Hallo man,
<DimitryKakadu>
I'm really can't inherit any half-defined class when decaring recursive classes with `and` keyword?
bobry has quit [Quit: Leaving.]
hyperboreean has quit [Ping timeout: 240 seconds]
junsuijin has quit [Quit: Leaving.]
hyperboreean has joined #ocaml
Ptival has quit [Read error: Connection reset by peer]
larhat has joined #ocaml
Ptival has joined #ocaml
seafood_ has joined #ocaml
seafood_ has quit [Ping timeout: 276 seconds]
seafood_ has joined #ocaml
ttamttam has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
seafood_ has quit [Ping timeout: 246 seconds]
sebz has quit [Client Quit]
ftrvxmtrx has quit [Quit: This computer has gone to sleep]
ftrvxmtrx has joined #ocaml
bobry has joined #ocaml
sebz has joined #ocaml
sebz has quit [Client Quit]
sebz has joined #ocaml
<adrien>
well, seems like pretty much all plot libs are crap (can't say for plplot) and none is lazy in the drawing: they all try to plot absolutely all the points instead of only doing it on-demand
<gildor>
adrien: have you tried archimedes ?
<adrien>
gildor: no, I've been looking mostly at C and C++ libraries or tools, and python ones
<adrien>
I came to the conclusion that all of them were as badly designed as it gets
<adrien>
there are two different bindings to cairo?
ftrvxmtrx has quit [Quit: This computer has gone to sleep]
avsm has joined #ocaml
milosn has quit [Ping timeout: 260 seconds]
milosn has joined #ocaml
<adrien>
is there a maximum size for bigarrays?
sebz has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
KDr2 has joined #ocaml
avsm1 has joined #ocaml
avsm has quit [Read error: Connection reset by peer]
iratsu has quit [Ping timeout: 250 seconds]
DimitryKakadu has quit [Quit: Konversation terminated!]
Amorphous has quit [Read error: Connection reset by peer]
<adrien>
gildor: archimedes works well! at first I was using the plot functions from list/bigarray/array and it was slow but then I gave up, mentionned how archimedes was also doing it badly and remembered it also seemed to have some API which looked like it was trying to avoid stupidly plotting all the points, and it worked \o/
iratsu has quit [Ping timeout: 258 seconds]
darkf has quit [Quit: Leaving]
_andre has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
bobry has quit [Quit: Leaving.]
bobry has joined #ocaml
iratsu has joined #ocaml
iratsu has quit [Ping timeout: 258 seconds]
rwmjones has quit [Ping timeout: 264 seconds]
menace has joined #ocaml
avsm has quit [Quit: Leaving.]
bobry has quit [Ping timeout: 258 seconds]
rwmjones has joined #ocaml
ttamttam has left #ocaml []
dnolen has joined #ocaml
bobry has joined #ocaml
avsm has joined #ocaml
avsm has quit [Quit: Leaving.]
<f[x]>
sgnb, I think glibc is to blame - it shouldn't crash when stack is not what it expects
iratsu has joined #ocaml
menace has left #ocaml []
avsm has joined #ocaml
DimitryKakadu has quit [Quit: Konversation terminated!]
avsm has quit [Client Quit]
ygrek has quit [Ping timeout: 250 seconds]
iratsu has quit [Ping timeout: 250 seconds]
StepanKuzmin has joined #ocaml
<sgnb>
f[x]: well, I don't know how it can check if the stack is as expected... besides, the stack format is part of the ABI
<f[x]>
sgnb, stack format part of ABI??
<sgnb>
stack frames
<f[x]>
for ppc? IMHO it is not the case for x86
<sgnb>
I suppose... otherwise the implementation of backtrace() wouldn't make much sense
<sgnb>
(didn't check)
<sgnb>
anyway, the problem happening only on powerpc makes me suspicious
<f[x]>
sgnb, afaik it expects "good" stack and if it is not the case - falls back to heuristics or stops alltogether
<f[x]>
that's probably because stack walking routines are dfiferent for every arch and least tested on ppc?
<sgnb>
if someone gives me a pure C program that doesn't segfault, then I'll submit the bug to glibc
<sgnb>
but the current situation makes me think that something is lacking in ocamlopt-generated code
<sgnb>
thank god ocamlopt is not available everywhere
KDr2 has quit [Ping timeout: 264 seconds]
avsm has joined #ocaml
<f[x]>
afaics, it doesn't try any heuristics - on amd64 if there is no frame pointer (think ocaml code) it shows two frames and stops (not using dwarf info).
<f[x]>
sgnb, if you have acccess to ppc now - can you check pure C program but with -fomit-frame-pointers?
<sgnb>
f[x]: cc1: error: unrecognized command line option ‘-fomit-frame-pointers’
<f[x]>
sorry, no trailing 's': -fomit-frame-pointer
<hcarty>
adrien: Intelligent removal of plotted points is a tricky thing to get right
<hcarty>
But I agree that most (all?) available plotting libraries are severely lacking
<hcarty>
adrien: Christophe Troestler wrote new Cairo bindings after finding a number of GC and segfault issues with the previously existing bindings
<adrien>
hcarty: yeah, it's tricky and afaik, Archimedes' result is not perfect, but it exists and I can probably find proper settings for it
<hcarty>
At this point I think the new (Christophe Troestler) bindings are a bit more complete. I'm not sure that they support Pango though, which is supported by the original bindings.
<adrien>
and good for the cairo bindings :-)
<adrien>
hmm, can I use this cairo in lablgtk?
<adrien>
actually I think I can't
<hcarty>
There is a gtk_demo.ml file
<adrien>
ah, cool, hadn't seen it :-)
<adrien>
I should look into the examples/ folders more often
<hcarty>
The tutorial is also relatively complete, which is nice (and rare for OCaml modules)
<hcarty>
It probably helps that it is based on the existing C and Python Cairo tutorials.
<NaCl>
whoa.
<NaCl>
complete tutorial
<NaCl>
what does it mean?
<hcarty>
NaCl: That Christophe puts a lot of effort into the software he releases :-)
<NaCl>
whoa
<NaCl>
awesome
<NaCl>
unfortunately, those grand plans to bind openCV to ocaml may be blockaded due to the fact that openCV is huge
<hcarty>
NaCl: If you do go through with it, 10% coverage is not a bad place to start.
<NaCl>
we'll see
<hcarty>
If you have 5 functions to wrap for something you want to do, wrap and release those 5. If someone else needs 5 more, hopefully they wrap and contribute those :-)
<hcarty>
But if there isn't a need, then it may not be worth the effort.
<NaCl>
heh, I actually *need* none fo them.
<NaCl>
I was looking at doing it for the Lulz
<adrien>
hmmm, I'm wondering if Archimedes will work with ocaml 3.11 on windows since it uses .cma/.cmxs files for dynlink
<NaCl>
Thus muses the adrien
<hcarty>
adrien: I know the authors use a patched oasis to support .cmxs generation
<hcarty>
adrien: So Windows support may not be there yet
<adrien>
I'll probably try to hack up something without loadable modules (have them always loaded)
<adrien>
anyway, if I don't actually do something soon, I'm going to have a mental breakdown
<adrien>
even if I have to throw this away, at least I'll enjoy playing with that
<hcarty>
Could you provide the whole thing as a Linux VM image?
flapjackery has joined #ocaml
<adrien>
definitely not :P
<hcarty>
Didn't think so... it was worth a shot!
<adrien>
cygwin maybe :P
dnolen has quit [Quit: dnolen]
avsm has quit [Quit: Leaving.]
bobry1 has joined #ocaml
bobry has quit [Ping timeout: 276 seconds]
lopex has quit []
avsm has joined #ocaml
DimitryKakadu has joined #ocaml
<NaCl>
Aseembler language or assembly language?
bobry1 has quit [Ping timeout: 250 seconds]
<NaCl>
*assembler
<thelema>
assembly
bobry has joined #ocaml
avsm has quit [Quit: Leaving.]
ulfdoz has joined #ocaml
ankit9 has quit [Ping timeout: 250 seconds]
bobry has quit [Ping timeout: 250 seconds]
ankit9 has joined #ocaml
larhat has quit [Quit: Leaving.]
ankit9 has quit [Ping timeout: 250 seconds]
StepanKuzmin has quit [Ping timeout: 240 seconds]
bobry has joined #ocaml
Ptival has quit [Quit: Leaving]
jonafan has quit [Ping timeout: 252 seconds]
ygrek has joined #ocaml
jamii has joined #ocaml
avsm has joined #ocaml
avsm has quit [Quit: Leaving.]
Anarchos has joined #ocaml
boscop has joined #ocaml
iratsu has joined #ocaml
Ptival has joined #ocaml
boscop has left #ocaml []
jonafan has joined #ocaml
yezariaely has joined #ocaml
joewilliams is now known as joewilliams_away
joewilliams_away is now known as joewilliams
yezariaely has left #ocaml []
junsuijin has joined #ocaml
menace has joined #ocaml
<adrien>
with oasis, is there a way to compile C stubs with -g3 -ggdb?
menace has quit [Ping timeout: 260 seconds]
chrissbx has quit [Read error: Operation timed out]
<menace>
i already asked this, but i lost my data.. is there a ocaml runtime interpreter, which supports history (up/down keys and functions/commands repeating) and eventually even word completion?