Modius has quit [Quit: "Object-oriented design" is an oxymoron]
ulfdoz has quit [Read error: Operation timed out]
Ptival has quit [Quit: Quat]
malc_ has joined #ocaml
malc_ has quit [Quit: leaving]
<f[x]>
sgnb, feel free to add getrusage if it is needed :)
ftrvxmtrx_ has joined #ocaml
ftrvxmtrx has quit [Ping timeout: 258 seconds]
bobry1 has joined #ocaml
Obfuscate has quit [Read error: Connection reset by peer]
Obfuscate has joined #ocaml
bobry1 has quit [Quit: Leaving.]
bobry1 has joined #ocaml
ftrvxmtrx_ has quit [Read error: Connection reset by peer]
ftrvxmtrx_ has joined #ocaml
StepanKuzmin has joined #ocaml
jyyou has joined #ocaml
Ptival has joined #ocaml
<darkf>
Hey, does anyone know what's wrong with this code? It gives a syntax error on line 7 http://pastebin.com/bsLdNG6S
<Ptival>
darkf: don't you miss an in for the let on line 2?
<darkf>
Ptival: It's a recursive function
<zorun>
mmh, when you mix functional & imperative programming, you should use a lot of parentheses to delimit the scope
<darkf>
but I suppose I need one after the body
<darkf>
zorun: how would you recommend I format it?
<zorun>
on line 5, it could be interpreted as a toplevel function
<zorun>
just use them accordingly to you identation
<zorun>
(l. 3 - l. 7)
<darkf>
zorun: Still gives me a syntax error, though. On the line where I added );;
avsm has joined #ocaml
<zorun>
don't use ;;
<flux>
darkf, your current function is akin to: let mainloop () = let a = 5
<flux>
let has two forms: the top-level form (let a = 5) and an expression form (let a = 5 in expr)
<flux>
the former are (top-level) statements, the latter are expressions
<darkf>
flux: yep, I added an 'in' to my let rec loop
<flux>
darkf, where did you add it?
<darkf>
flux: before my final (initial) call to loop (...)
<flux>
darkf, is your main goal to only define function mainloop?
<flux>
darkf, I guess so. so you got rid of the ;; as well?
<darkf>
flux: yeah, the function mainloop licks off the infinite loop function
<flux>
all definitions must be complete before a ;;, it separates compilation units.
<darkf>
by the way is there a way to get better diagnostics? (maybe another interpreter or something?)
<flux>
well, it parses for me if I just replace ;; with in
<flux>
I'm afraid not.
<darkf>
ah :(
<flux>
darkf, here's something about ;;: a file may contain multiple compilation units, each separated by ;;. each compilation unit is either one expression, or a sequence of top-level statements.
<darkf>
hmm, Buffer.sub returns a string but I'd like to get a Buffer out of it -- I can't use the constructor (Buffer (Buffer.sub ...)), is there an easy way to do this?
<flux>
but, in practice, ;; can be good if you're beginning to program in ocaml, because it limits the point where errors can appear in the diagnostics..
<darkf>
flux: when should I use ; and ;;?
<flux>
darkf, I never use ;;
<flux>
; is simply an operator that discards its first argument
<flux>
so (a; b) is equal to b
<flux>
(while the benefit is of course evaluating the expressions for their side effects)
<darkf>
flux: what about when you have a nested function and want to call it from the higher-level one? (e.g. let f = let g x = ();; g 123)
<darkf>
er
<darkf>
keep forgetting in
<darkf>
my bad
<darkf>
:)
jyyou has left #ocaml []
<flux>
oh, of course I forgot to mention that ;; is essential when dealing with the interactive top-level :)
<darkf>
indeed
<flux>
darkf, so your example would be like: let f = let g x = () in g 42
<darkf>
sounds good :)
<darkf>
thanks flux; would you happen to know about the Buffer thing though?
<flux>
darkf, I guess there is no way other than to create a new buffer, like let buffer_with_data str = let b = Buffer.create (String.length str) in Buffer.add_string b str in b
<flux>
maybe the whole scheme isn't terribly efficient, but perhaps it doesn't matter
<darkf>
flux: blah, thank you :)
<flux>
darkf, good luck with your network coding :)
<flux>
darkf, what are you writing, btw?
<darkf>
thanks :) I suspect this would be easier with an object with a mutable buffer
<darkf>
Trying to write an IRC bot
<darkf>
Writing a buffer so I can read the lines without them getting broken
<darkf>
this may be a completely silly way to do that -- but I started OCaml yesterday and I'm not quite sure what's there
<flux>
well, your approach seems valid (better than the existing ocaml-irc module I might say)
<darkf>
:P
<flux>
darkf, it might be a good idea to separate the protocol handling stuff from the actual IRC bot. you might even be able to try out stuff in the interactive top level, if you put the handler loop into its own thread.
<darkf>
flux: should that stuff be in classes? (I could even write a network abstraction, which would be quite useful)
<flux>
darkf, object orientation is ocaml is unfortunately an advanced subject :). I suggest writing in a modular style. and for example it's not clear how one would add more IRC protocol commands to a class, whereas it's sort of clear that one can write nwe functions for new commands..
<flux>
(for example if you wanted to separate DCC handling into its own module, which seems like a good idea)
<darkf>
flux: Ah. So if I want to write this procedurally I should use a record or something then write the handlers in a separate module? :)
<flux>
darkf, typically you would have a type like: type t = { socket : Unix.sock_addr; buffer : Buffer.t; mutable some_value : int }
<darkf>
flux: Sounds good, thanks :)
<flux>
then you would have let connect server = { socket = connect..; Buffer.create 10; some_value = 42 }
<flux>
and finally a bunch of functions that take that 't' and deal with it
<flux>
good luck :)
<sgnb>
gildor (and anyone caring about ocaml-extunix): can http://anonscm.debian.org/gitweb/?p=pkg-ocaml-maint/packages/ocaml-extunix.git;a=commitdiff;h=7944054cc835b5e3e73c856cfd701e988a410730 be done in a cleaner way? the upstream patch is inside the "DO NOT EDIT" section, and I want to keep -funwind-tables Debian-specific
avsm has quit [Quit: Leaving.]
StepanKuzmin has quit [Read error: Connection reset by peer]
avsm has joined #ocaml
StepanKuzmin has joined #ocaml
<gildor>
sgnb: I think it can be done in a cleaner way
<gildor>
something like if architecture(armel) CCOpt +: -funwind-tables
<gildor>
in the _oasis file
<adrien>
hcarty: about plplot, if I give it 100000000000000000000000000000 points but my display can only accomodate 1000 points, will it skip some of the points automatically?
<gildor>
sgnb: do you have the output of ocamlc -config on this arch ?
<adrien>
hcarty: or is it my duty?
larhat has joined #ocaml
* f[x]
thought that -g generates static unwind info, but apparently it is not the case on arm?
Amorphous has quit [Ping timeout: 276 seconds]
StepanKuzmin has quit [Read error: Connection reset by peer]
avsm1 has joined #ocaml
avsm has quit [Read error: Connection reset by peer]
<f[x]>
sgnb, I think it is better to disable the test-case and acknowledge the fact that not all archs have working backtrace
<f[x]>
because all code needs to be built with -funwind-tables to get useful backtrace, not only extunix
avsm1 has quit [Read error: Connection reset by peer]
avsm has joined #ocaml
StepanKuzmin has joined #ocaml
StepanKuzmin has quit [Read error: Connection reset by peer]
<gildor>
f[x]: maybe this should go into ocaml itself ?
oriba has joined #ocaml
<f[x]>
I guess so, see also PR#5314 :))
StepanKuzmin has joined #ocaml
Amorphous has joined #ocaml
<flux>
adrien, hmm, how would it skip them? say if the data is [0;0;0;0;0;0;1;0;0;0;0;0;0;1] etc, it should still draw spikes, no matter how many samples it needs to fit into the display?
<adrien>
flux: however it wants to
oriba has quit [Quit: oriba]
<flux>
adrien, it would still need to take into account each of the samples, though?
<adrien>
there are 3600 * 4000 points = 14400000 points to display on 1920 pixels at most and there actually shouldn't be spikes
StepanKuzmin has quit [Read error: Connection reset by peer]
<adrien>
confirmed: pick one point every 1000 points or so and only display that one, without worrying about spikes
<adrien>
the issue is that currently all the tools I've seen are too slow and/or take too much memory
<flux>
I actually have a similar problem in temperature log plotting system I've been working on
<flux>
it stores each data point into a database, so it accumulates a lot of points during, say, a year
<flux>
but I thought of accumulating aggregated data as well, so a table that contains min/max/avg/dev for one-second intervals, 10-second intervals, 100-second intervals, etc
<flux>
so when I know the required data density for visualization, I can just pull all that data from the database in an instant
StepanKuzmin has joined #ocaml
<flux>
(it's slightly more complicated when you git an edge of a 100-second interval, but it's manageable)
<flux>
s/git/hit/ :)
<adrien>
fingers start typing by themselves after a while ;-)
<adrien>
as far as I'm concerned, the data is from an embedded system which doesn't have CPU time left (and no I/O time left either actually) so I can't do anything before actually displaying
<flux>
so the embedded system does the visualization as well?
<adrien>
nah, it's done on an x86 computer
<flux>
well, the desktop should be able to do aggregation/filtering when it receives the data?
<adrien>
it can only load everything at once which means it can be quite slow
<adrien>
a possibility is to find the most noticeable values in each 1000-values chunk and use it instead
<flux>
hm, surely the bottleneck is the IO bandwith of the embedded device to the desktop?
lopex has joined #ocaml
<adrien>
compact flash card but even with the data on hard drive of the desktop computer, everything I've seen was slow
<flux>
cpu bound?
<adrien>
maybe mostly because all the applications didn't try to be clever
<adrien>
like gnuplot takes as much time to display a millionth of the data with only a few points as it takes to display all the data, which makes me think it scans the whole input file
<flux>
I'm quite sure it does..
<adrien>
plus it takes n*k memory with n the size of the input and k the number of plots
<adrien>
haven't found a way to tell it to display several things from a single file so I had to do several plots of the same file (which means loading everything several tiems)
<flux>
btw, any suggestions for interactively finding patterns from binary data? I tried 'gwave', but really some logic analyzer-oriented application would be nice..
<flux>
I've been thinking a data viewer library with ocaml toplevel would be a nice combination :)
avsm has quit [Quit: Leaving.]
Cyanure has joined #ocaml
darkf has quit [Quit: Leaving]
<flux>
it would be so nice (for me :)) to just be able to select a region from a bitstream and a decoder would automatically try to run on whatever has been selected
_andre has joined #ocaml
avsm has joined #ocaml
Qrntzz has joined #ocaml
StepanKuzmin has quit [Read error: Connection reset by peer]
<sgnb>
gildor: how does oasis interpred architecture in _oasis? armel is a Debian-specific notion...
StepanKuzmin has joined #ocaml
<sgnb>
f[x]: it would be more useful to print in the buildlog the return value, though
avsm has quit [Quit: Leaving.]
<gildor>
sgnb: oasis parse the output of ocamlc -config, so if architecture: arm then if architecture(arm) should do
<sgnb>
gildor: ok
<sgnb>
I'll go with disabling the test altogether
<gildor>
sgnb: test is a separate target, so you should be able not to run it in debian/rules
<sgnb>
gildor: I do want to run as much tests as possible!
<sgnb>
I just patched test/test.ml
<gildor>
sgnb: well if it uses ounit default CLI parser, you can go with test --list-test | smthg to remove the pb test + prepend --only test | xargs test
sebz has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
dnolen has joined #ocaml
<hcarty>
adrien: Yes, you are correct - PLplot will do what you ask it to without any attempt to simplify the data
sebz has quit [Quit: Computer has gone to sleep.]
<adrien>
hcarty: well, it might be ok after all: I had been using applications (as opposed to libraries) and forgot that with libraries, I have a better control over what I can send
<hcarty>
adrien: Indeed! That is part of why I started using PLplot initially.
<adrien>
so far I've checked a dozen applications and a few libraries, the only two remaining contenders are plplot (with qt) and matplotlib (python)
<hcarty>
matplotlib was a contender for a while, but I couldn't stand the API. It quite possible that reaction was due to not spending enough time with it...
<hcarty>
... and, of course, the fact that it's python :-)
<adrien>
;-)
<adrien>
it seems the qtwidget could do the trick
<adrien>
if I can do the code by tomorrow I can go to the CCC (Chaos Communication Camp) in Berlin xD
<adrien>
hcarty: no windows binaries?
sebz has joined #ocaml
<hcarty>
adrien: Not that I know of. There was some talk about putting a binary distribution together, but I don't think any of the developers use Windows regularly
<hcarty>
There are build instructions but that's about it
<adrien>
(yypkg!)
<hcarty>
adrien: Of course!
<adrien>
btw, yypkg is mostly good and has been since january but it's really the packages which are missing and I don't have the time for that (plus I'd like some kind of support)
<adrien>
well, I'm going to do it quickly and it's going to be horribly dirty ("cp" is a very valid installation method)
<adrien>
actually, needing libaries and only having the choice between bad, worse and even worse installation methods is so infuriating that it makes a good motivation to make packages
bobry1 has quit [Remote host closed the connection]
bobry1 has joined #ocaml
ftrvxmtrx_ has quit [Quit: This computer has gone to sleep]
ftrvxmtrx has joined #ocaml
StepanKuzmin has quit [Read error: Connection reset by peer]
StepanKuzmin has joined #ocaml
Modius has joined #ocaml
ztfw has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
iratsu has quit [Ping timeout: 255 seconds]
<adrien>
hcarty: ................. test application exits with status code 1
sebz has joined #ocaml
<hcarty>
adrien: My first guess is that's not good.
<adrien>
seems to be in plinit()
<adrien>
positive aspect: time to improve my gdb skills
iratsu has joined #ocaml
<adrien>
bad aspects: I'm going to get crazy soon if this continue
StepanKuzmin has quit [Read error: Connection reset by peer]
<adrien>
or I could ship a colinux thing
oriba has joined #ocaml
<adrien>
actually I was getting a test that was failing during compilation of plplot, I hadn't paid attention but that was "qt"
<adrien>
hcarty: saw any report of plplot and ocaml on windows?
<hcarty>
adrien: None, only Linux and OSX
<hcarty>
It may work - I don't think that there is anything to prevent it
<adrien>
ok
<hcarty>
But it's not tested, and anything Windows-specific is not handled
<adrien>
actually I'm mostly looking for something that will give me a kind of widget to be used in a GUI toolkit
<adrien>
or at least open a window in which I can put the graph
<adrien>
s/graph/plot/
<hcarty>
I'm pretty sure the PLplot C++ interface + Qt has been used that way on Windows
<hcarty>
I know that PLplot has been used that way with both Qt and Cairo/Gtk under Linux
<adrien>
well, at least I can theoritecally use cairo
<hcarty>
adrien: The examples/c++/ directory should have something to start from
<hcarty>
If you are going to use Qt
<hcarty>
examples/c/ if you are going to use Cairo (or examples/ocaml/)
<adrien>
hcarty: yeah, that is what is currently failing, but I'm going to see what is going on during the compilation
<adrien>
if it fails, I'll maybe see matplotlib first
<adrien>
(really, I hope I can have a widget)
<adrien>
(with panning and friends)
<hcarty>
Sounds reasonable - I'm sorry I can't be more help!
<hcarty>
Honestly, I think matplotlib may give you panning and such for fewer lines of code than PLplot. PLplot has a lot of nice features, but the widget support is pretty bare-bones.
<hcarty>
Panning, for example, requires you to write the appropriate code to update the plot and/or display.
<hcarty>
It's not hard to do, but it is not included in PLplot out of the box
avsm has joined #ocaml
joewilliams_away is now known as joewilliams
<adrien>
yeah, I'm trying to get something quickly
<adrien>
and I'm less than impressed by cmake btw
avsm has quit [Read error: Connection reset by peer]
avsm has joined #ocaml
<adrien>
well, looks like it's failing on the dynamic loading (which is a plplot-provided wrapper on windows)
dnolen has quit [Quit: dnolen]
avsm has quit [Quit: Leaving.]
<adrien>
hah, I'm turning crazy
<adrien>
matplotlib mentions two binary distributions: one is unreachable and the other one starts at $200
<adrien>
actually that's not a bad plan, make packages and sell them: you can even meet any open-source licence and still sell as much as you want since the issue is compiling
<adrien>
oh, actually python(x,y) is alive
<NaCl>
*lightning strikes in the background"
<adrien>
I'm actually also looking at javascript libraries
<NaCl>
x
<NaCl>
D
<adrien>
=
<adrien>
(
<NaCl>
lo
<NaCl>
l
sebz has quit [Quit: Computer has gone to sleep.]
<hcarty>
adrien: Depending on your target, jqplot is a relatively simple Javascript option
StepanKuzmin has joined #ocaml
<hcarty>
adrien: And I agree regarding CMake, but the decision was made before I joined the project
<NaCl>
unfortunately, there isn't much better
<hcarty>
adrien: CMake is supposedly easier to work with when targeting native compilation on multiple platforms. But the CMake language is kind of awful.
<adrien>
gah, how can you make a python distribution that is 515MB? ><
<NaCl>
apparently the KDE people didn't have much of a problem with it
<hcarty>
NaCl: My guess is that a lot of the complexity in CMake comes from the languages it targets
<adrien>
NaCl: you're not on windows, are you? =)
<NaCl>
not now
<adrien>
hcarty: that was maybe a bad design decision on their end then
<hcarty>
adrien: My understanding is that KDE's choice to use CMake was an influence. And the previous autoconf/autotools/whatever-it-is-called build system was apparently too fragile when porting to different platforms.
<NaCl>
hcarty: windows doesn't have a sh script interpreter
<NaCl>
or GNU make
avsm has joined #ocaml
<NaCl>
and using either on a windows machine isn't particularly "native"
<hcarty>
NaCl: Yes, I think those were part of the reason for the move
<adrien>
yeah, I was able to use cmake under cmd.exe which is a huge plus and also means you don't have to use it under msys which makes process spawning slower or cywin which makes it painfully slow (15 minutes for a simple ./configure)
<hcarty>
One Of These Days I should setup a Windows VM to test PLplot + OCaml + Cairo + Gtk under that environment
<hcarty>
I doubt that will happen any time soon though, unfortunately.
<hcarty>
adrien: If you do have feedback on PLplot on Windows, I'm sure the folks on the mailing list will be happy to hear about it
<hcarty>
adrien: They can probably give better assistance than I can
lopex has quit []
<adrien>
I don't have much to say so far except "dynamic loading is broken", I will give feedback when I can say something more I think and currently I just want the damn thing to be done as quickly as possible (which is why I'm ready to do python or js)
iratsu has quit [Read error: Connection reset by peer]
<hcarty>
adrien: I understand - good luck in wrapping this up!
<adrien>
thanks
iratsu has joined #ocaml
<hcarty>
This is odd (and unrelated to PLplot...) - I'm getting Invalid_argument("Key/value not found") from BatMap.StringMap.iter.
<NaCl>
use the BatMap
<hcarty>
Nevermind - that exception is not coming from Batteries
bobry1 has quit [Ping timeout: 255 seconds]
oriba has quit [Quit: oriba]
ulfdoz has joined #ocaml
<thelema>
hcarty: many improvements to odb just pushed - thanks for the patches.
larhat has left #ocaml []
larhat has joined #ocaml
ankit9 has quit [Read error: Connection reset by peer]
Ptival has quit [Quit: Leaving]
<hcarty>
thelema: Glad I could help. I'm sorry that they weren't part of a pull request. I haven't had a chance to sit and hack properly.
<hcarty>
thelema: That looks like a nice set up updates
<hcarty>
I agree that --no-godi makes more sense that --godi, given how it works
ztfw has quit [Ping timeout: 246 seconds]
Anarchos has joined #ocaml
avsm has quit [Quit: Leaving.]
Amorphous has quit [Ping timeout: 255 seconds]
Reaganomicon has quit [Ping timeout: 255 seconds]
Reaganomicon has joined #ocaml
george_z0rwell has joined #ocaml
Ori_B has joined #ocaml
Amorphous has joined #ocaml
george_z0rwell has quit [*.net *.split]
Reaganomicon has quit [*.net *.split]
dcolish has quit [Ping timeout: 260 seconds]
Reaganomicon has joined #ocaml
Ori_B has left #ocaml []
larhat has quit [Quit: Leaving.]
joewilliams is now known as joewilliams_away
joewilliams_away is now known as joewilliams
<hcarty>
adrien: Did you try forcing static linking in the PLplot build? That's currently doesn't work with the OCaml bindings, but it should work with C++.
<adrien>
hcarty: no, because when I tried to do that in the CMakeList file, it would automatically disable qt
<hcarty>
adrien: Ah, drat.
Ptival has joined #ocaml
lopex has joined #ocaml
dcolish has joined #ocaml
ygrek has joined #ocaml
darkf has joined #ocaml
Cyanure has quit [Ping timeout: 250 seconds]
<thelema>
hcarty: any opinion on making batteries v2.0 use a different ocamlfind package name?
iratsu has quit [Read error: Connection reset by peer]
iratsu has joined #ocaml
<hcarty>
thelema: I've been thinking about that. It would make it possible/easier to have both v1 and v2 installed together
<thelema>
I find myself using v2, but have to do acrobatics to use v1
<hcarty>
I would be happy with batteries = v1, batteries2 = v2
<hcarty>
batteries3, etc.
<thelema>
yup, that's what I'm thinking
<hcarty>
I like it
<thelema>
oasis-db isn't going to be that happy with this change
<hcarty>
Would it show up as a different package, since the findlib name is different?
<thelema>
it would need to be a diffferent package for odb, but it should probably be the same package for oasis-db
<hcarty>
Ah, right.
<thelema>
maybe I'll go back to using v1
<thelema>
and leave this problem for the future
ankit9 has joined #ocaml
<hcarty>
You would need to change the oasis package name as well, I suppose.
<hcarty>
thelema: That seems like a reasonable change to make if the findlib name is changing as well
_andre has quit [Quit: leaving]
Cyanure has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
<_habnabit>
I realize I could do this with `named_leaf COMMA subtree_list` and `named_leaf`, but the next step is adding nested trees.
<bitbckt>
thelema, hcarty: it would be nice if findlib used version numbers in installed packages' root dirs. So you could install multiple versions and choose at compile/link time.
<bitbckt>
in lieu of these gymnastics you're going through with odb.
<dsheets>
_habnabit: problem is definitely subtree having and unguarded production of subtree_list
<dsheets>
_habnabit: how are your nested trees delimited?
<_habnabit>
OPENP subtree CLOSEP, essentially.
<dsheets>
_habnabit: ok, if you add those around the first subtree production, it should work
<_habnabit>
hm, okay.
<thelema>
bitbckt: agreed.
<dsheets>
_habnabit: as it is now, you have a shift-reduce conflict on subtree after subtree_list
<bitbckt>
thelema: any way we could help make that happen?
<_habnabit>
you mean OPENP subtree_list CLOSEP ?
<dsheets>
_habnabit: yes. any terminals before subtree_list will resolve the conflict
<_habnabit>
ah, that did it.
<dsheets>
yay!
<thelema>
bitbckt: well, findlib supports environments for different ocaml installs in the same system, so it's probably already got the necessary mechanisms, just they're not convenient for this
<_habnabit>
dsheets, and if I wanted to allow `A,B` at the root production as well?
<dsheets>
_habnabit: in expression parsing, one of the atomic expression productions will usually be the paren-delimited recursive call to the full expression rule
<dsheets>
_habnabit: is that currently not handled?
<technomancy>
I was going to investigate batteries once I got oasis working on my machine
Cyanure has quit [Ping timeout: 252 seconds]
<thelema>
technomancy: let me know if you have any suggestions or problems
<technomancy>
I did have an issue with the installer, but I reported it as a bug on ocamlforge
<_habnabit>
(I'm not sure of any other way of guaranteeing a particular order for tokens without having ? from EBNF.)
<_habnabit>
i.e. this would be a lot simpler if I could say something like subtree_group (LABEL | REAL)? (COLON REAL)? (EDGE_LABEL)?
<bitbckt>
Core has split_n which has that type, too.
<bitbckt>
List.split_n, iirc.
<dsheets>
_habnabit: well then maybe you do want menhir :-P it has ? and * etc
<_habnabit>
well, how's what I pasted? not too bad?
<dsheets>
_habnabit: but you'll still have to match on options
<bitbckt>
thelema: batteries is... split_at? or split_nth?
<thelema>
technomancy: hmm, I should have gotten an email. in any case, ocamlforge isn't the best place to report bugs, github is
<thelema>
bitbckt: technically both, but split_nth is deprecated
<bitbckt>
ah.
<technomancy>
thelema: sorry, do you mean with oasis or with batteries?
<technomancy>
this was an oasis issue
<thelema>
technomancy: ah, nevermind then. oasis bugs go to the forge, batteries bugs to github
<technomancy>
ok, cool
ankit9 has joined #ocaml
<_habnabit>
actually, for extra credit, I was trying to figure out how it would be possible to parse `(,,(,))`. there's ostensibly no tokens between the commas, so.
<thelema>
technomancy: did you get odb to install oasis?
<dsheets>
_habnabit: is that valid in your spec grammar?
<_habnabit>
yes.
<_habnabit>
but unusual.
<dsheets>
_habnabit: subtree needs an empty production, then
<_habnabit>
oh, you can do that?
<technomancy>
thelema: oh, I thought odb was for libraries rather than applications. I'll give it a shot.
<dsheets>
_habnabit: dunno about in ocamlyacc. I hope so. thelema?
<_habnabit>
oh, it can.
<thelema>
technomancy: oasis was one of the first things installable by odb
<dsheets>
_habnabit: excellent. this also makes ";" a valid input
<_habnabit>
that's fine.
<thelema>
dsheets: empty productions are allowed by every yacc out there
<technomancy>
better than the segfault I got from the official oasis installer =)
<dsheets>
thelema: ok. i only know for c yacc and menhir. thought maybe it was like intra-production actions
<thelema>
technomancy: very odd - "ocamlfind: Package `pcre' not found
<thelema>
technomancy: but then - ocamlfind: Package pcre is already installed
<thelema>
ah, you don't have odb_lib in your OCAMLPATH
<thelema>
export OCAMLPATH=~/.odb/lib
<technomancy>
I may not have read the docs very clearly =)
<thelema>
dsheets: it's fundamental to the theory of CFG parsing
<thelema>
technomancy: also, if you can download the latest odb, you'd help verify that I didn't break anything horrible when updating it quickly this morning
<technomancy>
thelema: looks like oasis needs type-conv, which needs ocaml 3.12, while I'm on 3.11.2.
<technomancy>
maybe that explains why oasis isn't packaged for ubuntu natty
<thelema>
technomancy: ah, yes.
<thelema>
technomancy: there's an older version of type-conv for 3.11, but the deps shifted at some point and this newer type-conv is needed.
<thelema>
technomancy: sorry about that.
<technomancy>
thelema: no problem, thanks anyway
<thelema>
technomancy: you can install batteries easily, if you want
<technomancy>
I shouldn't be messing with this right now anyway, I have a talk to prepare
<dsheets>
thelema: yes and ocamlyacc also ignores end-of-stream conflicts. how do you know whether to shift nothing or reduce at the end of the stream?
arubin has joined #ocaml
<technomancy>
how old is 3.12?
<dsheets>
a year?
<thelema>
dsheets: the 257th character of the input alphabet: EOF
<dsheets>
thelema: yes, then there is no conflict. if you do not specify rules with EOF, don't you automatically have a silent conflict if any applicable rules have trailing epsilon?
<_habnabit>
is there a way to add things to the .mli generated by a .mlp file?
<_habnabit>
or, alternatively, a way to call a function in the .mlp file when something's started parsing?