bytbox has quit [Remote host closed the connection]
<tac_>
What is "core" vs "Core.Std"? What kind of "things" are they?
<tac_>
is one a library vs a module?
q66 has quit [Quit: Leaving]
<Drup>
yes
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
q66[lap] has quit [Ping timeout: 250 seconds]
travisbrady has joined #ocaml
taion809 has joined #ocaml
rgrinberg has joined #ocaml
zpe has joined #ocaml
yomimono has joined #ocaml
zpe has quit [Ping timeout: 272 seconds]
ygrek has joined #ocaml
taion809 has quit [Ping timeout: 250 seconds]
zRecursive has joined #ocaml
taion809 has joined #ocaml
johnnydiabetic has joined #ocaml
travisbrady has quit [Quit: travisbrady]
taion809 has quit [Ping timeout: 240 seconds]
bytbox has joined #ocaml
taion809 has joined #ocaml
thorsten` has quit [Ping timeout: 246 seconds]
travisbrady has joined #ocaml
thorsten` has joined #ocaml
johnnydiabetic has quit [Quit: Goodbye]
ygrek has quit [Ping timeout: 245 seconds]
taion809 has quit [Ping timeout: 245 seconds]
johnnydiabetic has joined #ocaml
taion809 has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 260 seconds]
taion809 has quit [Ping timeout: 245 seconds]
taion809 has joined #ocaml
huza has joined #ocaml
yacks has joined #ocaml
johnnydiabetic has quit [Ping timeout: 250 seconds]
ygrek has joined #ocaml
badkins has quit []
boogie has joined #ocaml
tac_ has quit [Quit: Leaving]
boogie has quit [Remote host closed the connection]
boogie has joined #ocaml
malo has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
rgrinberg has quit [Quit: Leaving.]
avsm has quit [Quit: Leaving.]
samrat has joined #ocaml
sheijk has quit [Quit: .]
SethTIsue has joined #ocaml
j0sh has quit [Remote host closed the connection]
oiuoiu has joined #ocaml
rgrinberg has joined #ocaml
j0sh has joined #ocaml
taion809 has quit [Ping timeout: 245 seconds]
taion809 has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
travisbrady has quit [Quit: travisbrady]
taion809 has quit [Remote host closed the connection]
rossberg__ has quit [Ping timeout: 260 seconds]
yomimono has quit [Ping timeout: 260 seconds]
zpe has joined #ocaml
boogie has quit [Remote host closed the connection]
__w_a_n_e_c_k__ has quit [Read error: Connection reset by peer]
zpe has quit [Ping timeout: 260 seconds]
rossberg__ has joined #ocaml
IbnFirnas has quit [Read error: Connection reset by peer]
IbnFirnas has joined #ocaml
boogie has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
SethTIsue has quit [Quit: SethTisue]
araujo has quit [Quit: Leaving]
axiles has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 272 seconds]
siddharthv_away is now known as siddharthv
huza has quit [Ping timeout: 258 seconds]
koderok has joined #ocaml
bjorkintosh has quit [Ping timeout: 240 seconds]
bjorkintosh has joined #ocaml
MercurialAlchemi has joined #ocaml
claudiuc has joined #ocaml
<flux>
what was that most recently announced OCaml API search?
<flux>
I think it was not OCamlScope
claudiuc has quit [Remote host closed the connection]
claudiuc has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 244 seconds]
Ptival_ has joined #ocaml
Ptival_ is now known as Ptival
ygrek has quit [Ping timeout: 260 seconds]
rand000 has joined #ocaml
boogie has quit [Remote host closed the connection]
so has quit [Ping timeout: 245 seconds]
burgobianco has quit [Remote host closed the connection]
burgobianco has joined #ocaml
thorsten` has quit [Ping timeout: 245 seconds]
Arsenik has joined #ocaml
hhugo has joined #ocaml
thorsten` has joined #ocaml
jao has quit [Ping timeout: 260 seconds]
so has joined #ocaml
zpe has joined #ocaml
rgrinberg has joined #ocaml
boogie has joined #ocaml
boogie has quit [Read error: Connection reset by peer]
boogie has joined #ocaml
zpe has quit [Ping timeout: 246 seconds]
samrat has joined #ocaml
boogie has quit [Ping timeout: 245 seconds]
tane has joined #ocaml
samrat has quit [Ping timeout: 250 seconds]
zRecursive has quit [Remote host closed the connection]
iorivur has joined #ocaml
burgobianco has quit [Remote host closed the connection]
koderok has quit [Quit: koderok]
burgobianco has joined #ocaml
ygrek has joined #ocaml
zpe has joined #ocaml
samrat has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
samrat has joined #ocaml
Simn has joined #ocaml
boogie has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
boogie has quit [Ping timeout: 245 seconds]
eikke__ has joined #ocaml
sepp2k has joined #ocaml
Hannibal_Smith has joined #ocaml
rand000 has quit [Quit: leaving]
oscar_toro has joined #ocaml
ontologiae_ has joined #ocaml
Kakadu has joined #ocaml
tani has joined #ocaml
tane has quit [Killed (holmes.freenode.net (Nickname regained by services))]
tani is now known as tane
samrat has quit [Quit: Computer has gone to sleep.]
gabemc has joined #ocaml
<whitequark>
companion_cube: hmmmm
<whitequark>
companion_cube: that could be useful, yes
waneck has joined #ocaml
Arsenik has quit [Ping timeout: 240 seconds]
boogie has joined #ocaml
jc1 has joined #ocaml
jc1 has left #ocaml [#ocaml]
boogie has quit [Ping timeout: 272 seconds]
Arsenik has joined #ocaml
samrat has joined #ocaml
samrat has quit [Client Quit]
maufred has joined #ocaml
thomasga has joined #ocaml
mort___ has joined #ocaml
cago has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 260 seconds]
MercurialAlchemi has joined #ocaml
gabemc has quit [Ping timeout: 244 seconds]
<whitequark>
def`: so, merlin2 was merged into master?
<Drup>
quite a while ago
<Drup>
it's even released
Hannibal_Smith has quit [Quit: Sto andando via]
boogie has joined #ocaml
<whitequark>
oh, yay, no more git pinning
boogie has quit [Ping timeout: 246 seconds]
rwmjones has quit [Ping timeout: 272 seconds]
troydm has quit [Ping timeout: 250 seconds]
rwmjones has joined #ocaml
tane has quit [Quit: Verlassend]
msaegesser has quit [Ping timeout: 250 seconds]
avsm has joined #ocaml
avsm has quit [Client Quit]
avsm has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
mort___ has quit [Quit: Leaving.]
mort___ has joined #ocaml
dbrumley has joined #ocaml
<dbrumley>
probably a dumb question, but what is the intended way to integrate OASIS with traditional configure duties such as detecting libraries present?
<dbrumley>
Drup: thanks. I'm looking at the docs, but not quite groking yet. I use zarith, which requires gmp in /opt/local/lib (I use port). I'm trying to create an oasis file that is portable across linux and mac that detects where gmp lives, and if not present, raise an error before attempting to compile. In the past I've used autoconf for such things. In OASIS, do we just flag() on the OS and hard-code paths?
<dbrumley>
(My confusion is I think of configure as a dynamic check, while oasis seems to be static)
<Drup>
Don't detect gmp, it's zarith job.
<Drup>
if zarith is properly installed, there will be no issue
ggole has joined #ocaml
jao has quit [Ping timeout: 272 seconds]
siddharthv is now known as siddharthv_away
boogie has quit [Ping timeout: 272 seconds]
nicoo has quit [Remote host closed the connection]
Arsenik has quit [Remote host closed the connection]
<dbrumley>
I think that is my problem. zairth detects gmp dynamically, and will find gmp in /opt/local during install and work. my oasis for packages depending on zarith don't. i'll dig a little more i guess into how zarith install is working
nicoo has joined #ocaml
<Drup>
how do you use zarith ?
<Drup>
first test : can you load zarith in a top level ?
_andre has joined #ocaml
<dbrumley>
opam install zarith is how i installed it. utop #require "zarith";; loads fine
<dbrumley>
the problem is when i link against zarith I need the c library gmp...
<Drup>
how do you link ?
<Drup>
because, zarith should contain the information for how to link against gmp
<dbrumley>
if I pass -ccopt -L/opt/local it does compile, but was thinking it was better to detect where gmp was than hard-code in the ccopt
<dbrumley>
(sorry for the slowness; my son woke up and trying to get him ready.)
oscar_toro has quit [Quit: Leaving.]
oscar_toro has joined #ocaml
charpi has joined #ocaml
dsheets has joined #ocaml
boogie has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 260 seconds]
boogie has quit [Ping timeout: 250 seconds]
MercurialAlchemi has joined #ocaml
charpi has quit [Remote host closed the connection]
Nahra has joined #ocaml
Mandus has quit [Remote host closed the connection]
samrat has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
travisbrady has joined #ocaml
avsm has quit [Quit: Leaving.]
travisbrady has quit [Client Quit]
cespinoza has quit [Ping timeout: 245 seconds]
cespinoza has joined #ocaml
huza has joined #ocaml
_0xAX has joined #ocaml
rand000 has joined #ocaml
oscar_toro has quit [Quit: Leaving.]
oscar_toro has joined #ocaml
Arsenik has joined #ocaml
ontologiae_ has quit [Ping timeout: 244 seconds]
huza has quit [Quit: WeeChat 0.3.8]
avsm has joined #ocaml
boogie has joined #ocaml
huza has joined #ocaml
boogie has quit [Ping timeout: 250 seconds]
cago has quit [Ping timeout: 272 seconds]
avsm has quit [Quit: Leaving.]
thomasga has quit [Quit: Leaving.]
mort___ has joined #ocaml
Haudegen has quit [Remote host closed the connection]
thomasga has joined #ocaml
travisbrady has joined #ocaml
msaegesser has joined #ocaml
bytbox has quit [Remote host closed the connection]
parcs has quit [Remote host closed the connection]
Thooms has joined #ocaml
waneck has quit [Read error: Connection reset by peer]
<_obad_>
hi everyone. so we have a new employee with no programming or strong math background, but some experience with matlab. how crazy would it be to get them to start learning ocaml? (we have a lot of ocaml code now)
<Drup>
the poor one.
<Drup>
_obad_: depends, how much matlab ?
<huza>
_obad_: do you accept ocaml parttime job online?
badkins has joined #ocaml
parcs has joined #ocaml
<_obad_>
drup: not a lot, but they did use loops, I/O, conditionals. very imperative of course
<_obad_>
huza: no sorry :)
<Drup>
_obad_: If you are lucky, they are not used to it too much, and it shouldn't be too hard :p
<_obad_>
drup: that's a way to look at it! the job involves running simulations and analyzing the output. options would include: let them use python (eurk), maybe scheme (then transition to ocaml) or jump straight into ocaml.
<huza>
_obad_: what about try a month for free? i'm learning ocaml
<Drup>
_obad_: scheme wouldn't help, I think
<Drup>
_obad_: how long do they have ? A "good" thing in ocaml is that the transition can be progressive while still being reasonably productive in the middle
<_obad_>
huza: it's not a question of money. plus if you're learning ocaml, why are you proposing your services?
<_obad_>
drup: 3 to 6 months would still be useful.
<_obad_>
drup: what's the best beginner's book these days?
<Drup>
I would say jump straight to ocaml then, give them a short crash course and let them fly on their task after that.
<Drup>
_obad_: If you use Core, RWO without any doubt
sheijk has joined #ocaml
<Drup>
"you"=="your company"
<Drup>
if you don't, it's probably still RWO, but they will need guidance to tell them how to step out of the core-iness of RWO.
<_obad_>
drup: no, we just use opam. lwt for some things. a bit of lacaml and sexplib.
<_obad_>
I think I'll throw "le langage caml" at them, and see how it goes
<Drup>
there is this new french book too
<_obad_>
which one
<Drup>
I haven't read it, but the authors are quite advisable :p
<gasche>
not really, it's just that nobody cared to actually submit PRs to it
<gasche>
feel free to use it
dsheets has joined #ocaml
<whitequark>
okay, so my main question is, what kind of update do you want about -ppx? so far I only see the option description that I could update
<whitequark>
(+ update corresponding parts in manpages)
<gasche>
you're in charge there
<whitequark>
ok
slash^ has quit [Read error: Connection reset by peer]
<gasche>
it would probably be useful to at least point people to the AST documentation in parsetree.ml{,i} (I never remember which one)
<gasche>
and a place where they can find examples
<gasche>
feel free to ask on the mantis ticket directly, Hendrik has good ideas about documentation
<whitequark>
there's only parsetree.mli. I'm currently thinking of adding some (more detailed) examples to Ast_mapper and pointing the -ppx docs to it.
Hannibal_Smith has joined #ocaml
<rand000>
Hello - could somebody tell me how I'm supposed to load camlp4o in 4.02? It's installed and the repl hangs when trying #require "camlp4.fulllib" ;; #camlp4o ;;
<rand000>
..hmm #thread also hangs..
joshz has joined #ocaml
<rand000>
ah no - my fault not #thread
<whitequark>
just #camlp4o;; is enough
dsheets has quit [Quit: Leaving]
travisbrady has joined #ocaml
<rand000>
It seems to load with just #camlp4o, but when evaluating an expression ( 1+2 ;;) afterwards it hangs...
<whitequark>
oh, you're using utop?
<rand000>
yeah
<rand000>
tried with normal ocaml too
<joshz>
I'm attempting to write a puppet configuration to install and set up opam, but when i run any opam configuration (either 'opam init --auto-setup' or 'opam install ocp-indent', the latter after manually doing the opam init). it appears that when I ssh in to my VM and run commands manually they work fine, but not when I run them through puppet. is there any way for me to get better debug information so i can track down what i'm doing wrong?
<joshz>
I did a bit of research which indicated that multiple different people have had multiple different causes for this issue, which makes sense given how generic the error is, but i don't believe any should be relevant to me. i have a clean install of ocaml and opam from apt
<joshz>
and they work when i'm actually at a tty, making me suspect that there is some environment variable or something that should be set but isn't. really what i'd ideally like to have is a way to track down a specific cause
<whitequark>
joshz: if you set OCAMLRUNPARAM=b, you'll see the backtrace
<whitequark>
that'll give some more information on the issue
<joshz>
weirdly, 'src/cmdliner.ml' doesn't look like it's in the opam github repo anymore, but it appears on three lines of the traceback... not sure if this matters, but it seems strange
tane has quit [Read error: Connection reset by peer]
tane has joined #ocaml
demonimin has quit [Read error: Connection reset by peer]
yomimono has quit [Ping timeout: 260 seconds]
boogie has quit [Remote host closed the connection]
<sheijk>
whitequark: on the question about ppx docs: documenting the command line flags would be awesome
<sheijk>
currently can't get ppx_deriving to work w/o either ocamlbuild or ocamlfind (and yes, i should probably just start using ocamlfind.. :))
Thooms has quit [Quit: WeeChat 0.4.3]
tane has quit [Quit: Verlassend]
tane has joined #ocaml
maurer has quit [Ping timeout: 245 seconds]
maurer has joined #ocaml
boogie has joined #ocaml
boogie has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
Derander_ is now known as Derander
cespinoza has quit [Ping timeout: 244 seconds]
cespinoza has joined #ocaml
avsm has quit [Ping timeout: 260 seconds]
avsm has joined #ocaml
Submarine has joined #ocaml
<whitequark>
sheijk: uhh, that's really simple
<whitequark>
one sec
ollehar has quit [Ping timeout: 258 seconds]
cespinoza has quit [Ping timeout: 244 seconds]
<gasche>
you should really use ocamlfind
<gasche>
there is no good reason not to use it if you've never used it before
<gasche>
(some highly specialized workflows do without, but they tried it first)
<whitequark>
basically, what gasche said.
<whitequark>
you can get it to work with -ppx $PATH_TO_OCAML_LIB/ppx_deriving/ppx_deriving
<whitequark>
but figuring out $PATH_TO_OCAML_LIB is harder than just using ocamlfind
cespinoza has joined #ocaml
Anarchos has joined #ocaml
jonludlam has quit [Quit: Coyote finally caught me]
avsm has quit [Quit: Leaving.]
sepp2k has quit [Quit: Konversation terminated!]
winterfury has quit []
<Denommus>
anyone here uses ocamlsdl?
<whitequark>
I played with it a bit
<Denommus>
what library do I need to have installed to use the Sdlgfx module
<Denommus>
?
<whitequark>
SDL_gfx? :D
<Denommus>
I have both the version 1 and 2, and it is giving errors on link
<Denommus>
undefined reference to `ml_circleRGBA'
<whitequark>
hmm
<whitequark>
report that as a bug to dbuenzli
eikke__ has quit [Ping timeout: 250 seconds]
boogie has joined #ocaml
<Denommus>
whitequark: hm. On Github or something?
seangrove has quit [Ping timeout: 272 seconds]
<whitequark>
yes
<Denommus>
whitequark: OTOH, I managed to make that game loop with React + OCamlsdl :-)
tane has quit [Quit: Verlassend]
ollehar has joined #ocaml
Nahra has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
avsm has joined #ocaml
avsm has quit [Client Quit]
fold has quit [Ping timeout: 272 seconds]
Kakadu has quit [Quit: Page closed]
zpe has quit [Remote host closed the connection]
travisbrady has quit [Quit: travisbrady]
SethTIsue has joined #ocaml
avsm1 has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
avsm1 has quit [Quit: Leaving.]
Nahra has joined #ocaml
slash^ has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
zpe has joined #ocaml
oscar_toro has joined #ocaml
hhugo has joined #ocaml
thomasga has quit [Quit: Leaving.]
Nahra has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
thomasga has joined #ocaml
rgrinberg has joined #ocaml
zpe has quit [Remote host closed the connection]
engil has joined #ocaml
koderok has joined #ocaml
travisbrady has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
gal_bolle has joined #ocaml
rand000 has quit [Ping timeout: 272 seconds]
koderok has quit [Quit: koderok]
tobiasBora has quit [Ping timeout: 245 seconds]
rand000 has joined #ocaml
tobiasBora has joined #ocaml
gal_bolle has quit [Quit: Konversation terminated!]
sheijk_ has joined #ocaml
Nahra has joined #ocaml
tobiasBora has quit [Ping timeout: 272 seconds]
sheijk has quit [Ping timeout: 272 seconds]
thomasga has quit [Quit: Leaving.]
thomasga1 has joined #ocaml
thomasga1 has quit [Quit: Leaving.]
tobiasBora has joined #ocaml
thomasga has joined #ocaml
morphles has quit [Ping timeout: 260 seconds]
Ptival has quit [Remote host closed the connection]
zpe has joined #ocaml
shinnya has quit [Ping timeout: 260 seconds]
zpe has quit [Ping timeout: 246 seconds]
MercurialAlchemi has quit [Remote host closed the connection]
hhugo has quit [Quit: Leaving.]
Kakadu has joined #ocaml
MercurialAlchemi has joined #ocaml
Ptival has joined #ocaml
WraithM has joined #ocaml
<whitequark>
hm, should I write ppx_deriving_sexp
<whitequark>
maybe I should do ppx_deriving_sext instead
<Drup>
There is a joke to do here, but I can't manage to turn it well enough.
WraithM has quit [Ping timeout: 272 seconds]
<adrien>
what's with sextants anyway?
<whitequark>
Drup: have you noticed how LLVM has a "sext" instruction?
<whitequark>
it's the only ISA I'm aware of that has the substring "sex" in the mnemonic of "sign extend". all others avoid it in various hilariously awkward ways
mcclurmc has joined #ocaml
<Drup>
Didn't saw that :p
hhugo has joined #ocaml
Hannibal_Smith has quit [Read error: Connection reset by peer]
WraithM has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
<sheijk_>
whitequark: tried it with ppx and pointing to the right path but that didn't help
<sheijk_>
my workflow currently involves several ocaml installations built with special flags and i need to run builds with all of them concurrently for continuous integration so i'm not sure i can do that using ocamlfind
<sheijk_>
basically need both 64 and 32 bit on mac
<whitequark>
sheijk_: I'm not sure how can you easily do that *without* ocamlfind
<whitequark>
"didn't help" is a very bad explanation of your problem.
<sheijk_>
whitequark: by a simple wrapper that extends PATH, etc.
<sheijk_>
but reading the ocamlfind docs now seems to be the right thing (tm)
<whitequark>
there's ocamlfind.conf
hhugo has quit [Quit: Leaving.]
axiles has quit [Remote host closed the connection]
<dmbaturin>
Is it possible to write shared libraries usable from languages that use C calling conventions?
<Drup>
sheijk_: this would be very easy with opam.
<Drup>
use various switches, build with each switch, done.
<sheijk_>
Drup: does it work well concurrently?
<Drup>
well, you're just launching shell commands, it doesn't matter ...
<Drup>
yes, you can execute two shells comands concurrently :p
<dmbaturin>
http://github.com/dmbaturin/cfgen Could anyone please review the code? The implemented parts work, but I'm not yet feeling confident about my ability to tell the difference between good and bad ocaml.
<sheijk_>
Drup: the question is more about opam. so far i've only seen opam switch which has global state to select which installation to use
<whitequark>
you can set the environment variable OPAMSWITCH
<Drup>
sheijk_: yeah, that's only for the default switch, but you can execute commands in a different switch
<Drup>
on top of the env var, you can also use the --switch argument
<sheijk_>
ah, nice
<sheijk_>
looks like my projects need to be dragged out of the middle ages :)
<Drup>
so sad, no more knight and princesses
<Drup>
(and dragons !)
<Pepe_>
hi there
<Pepe_>
I have difficulties installing core via opam
<noam>
In the ocaml repl, why do you need to end with ";;" for an expression to run? Why not have pressing enter run the code, and shift+enter for a new line? I use python/haskell and other languages and I find that ";;" thing just extremely repulsive.
<Drup>
noam: I agree with you.
<Pepe_>
noam: same here
<Drup>
(I don't have much more to say than that :D)
<noam>
how do you live with it?
<dmbaturin>
Maybe someone should look into it.
<Drup>
I don't use the repl all that much
<nlucaroni>
heavy drinking
<nlucaroni>
yeah, i don't use it much either.
<dmbaturin>
Most REPLs suck on some way or another.
<Drup>
Pepe_: can you redo it with -v ?
<noam>
does ocaml users just not use the repl a lot?
<Pepe_>
Drup: one sec
<Drup>
noam: I use it, occasionally
<dmbaturin>
whitequark: Do you think it's possible to addd Shift-Enter as expression terminator to utop?
<Drup>
mostly to test that the one-liner I'm going to post here is actually correct
<Drup>
dmbaturin: That should be feasible yes
<whitequark>
dmbaturin: yes, but I don't know how
<nlucaroni>
by the way, what the hell does this mean (aside from the obvious). "scanf: bad input at char number 0: 'looking for '"', found '@''"
pyon has quit [Quit: The fear fades away. brb]
<nlucaroni>
Why is it looking for a "? the scanner is "%{%}".
<noam>
dmbaturin: Python's repl is nice, I use it to test things while writing new code, helps to catch bugs very early
<gasche>
nlucaroni: have you looked at the documentation of %{%} in the Scanf module?
boogie has quit [Remote host closed the connection]
<gasche>
it dynamically reads a format, delimited by quotes
<dmbaturin>
Drup: I think it may work because I open'd it in the parser.
<gasche>
the missing quote is the one at the beginning of the format it's trying to read
<Drup>
dmbaturin: no, You open Grammar
<dmbaturin>
Drup: Good point, no open there. Then menhir external tokens option is probably what makes it work.
tac_ has joined #ocaml
<Drup>
ah indeed, didn't saw it
<Drup>
so hum, just get rid of that, you don't need it
<dmbaturin>
If I move that to the parser, I may not even need that option and all that stuff I did in oasis to get it to work (although it sure was educational, the oasis part :)
<Drup>
you just need to open Parser in the lexer
<Drup>
no, you can remove the definition completly
<Drup>
you should use menhir's high order rules for lists
patojo has joined #ocaml
<Drup>
rule_rhs_symbols, for example, is LIST(symbol)
<Drup>
(or something similar, I don't have the exact name in mind)
shinnya has joined #ocaml
<nlucaroni>
gasche: not much, I needed " around the string in the input channel though.
<Drup>
I don't think you need the "%public" if you don't plan to call this grammar by it's name. You already registered it has start of the parser anyway
<nlucaroni>
yeah, i just missed that part.
<dmbaturin>
Drup: I have to admit I don't yet understand what exactly %public means in menhir.
<dmbaturin>
Thanks, good to know. I can add the Lexing.new_line call to the \n rule in read_string as well, or it will only affect the state associated with read_string lexer?
<Drup>
it should be global
<Drup>
I think.
<dmbaturin>
Hhm, so I can define formatting functions for use with printf?
<dmbaturin>
Drup: Good point, now I see it can be fold. Could a leftover from earlier experiments.
<Pepe_>
I commented on the issue, hoping it'll be fixed soon enough :/
<dmbaturin>
Drup: Well, it works. :)
q66 has joined #ocaml
<Drup>
wow, pattern parsing is not consistent with expression
<dmbaturin>
Somehow. What is the usual way to deal with 'a option in this case?
<Drup>
"Some Some x" is a valid pattern but not a valid expression
msaegesser has quit [Ping timeout: 246 seconds]
<Drup>
(not valid as in "parsing error")
<Drup>
dmbaturin: You use option instead of exception in "find_production", it's good. I would declare a custom exception instead of just using failwith after
<Drup>
(it will helps you catch it after too)
<Drup>
dmbaturin: you might want to look at cmdliner. Your tool is simple, so Arg is still ok, but it's a good occasion to learn.
<dmbaturin>
Drup: Good point, no idea why I wrote that x+y fun and that pattern.
<Drup>
I should do that in github directly instead of spamming everyone x)
<dmbaturin>
Drup: Please do, at least I won't forget or pretend I didn't see it. :)
tianon has quit [Remote host closed the connection]
<Drup>
well, I'm finished.
<Drup>
you should really make rule_part a record
<dmbaturin>
Ah, good. Thanks, I'll work on it and bug you again. :)
<Drup>
you use it like a record
<dmbaturin>
Yeah, I was thinking of a record but for some reason ended up using a tuple.
tianon has joined #ocaml
<dmbaturin>
Drup: The idea to store the weight along with productions is not bad in itself?
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
<Drup>
not at all
<Drup>
Note: I didn't review the semantic (sort of) of your code, only the surface.
<dmbaturin>
Also, as of the english grammar, I wanted to make it more formal language themed, but couldn't come up with context-free subjects and objects. :)
<Drup>
Don't change it, it's the cutest english grammar ever, much better than the real one
<dmbaturin>
In german the article problem would be even worse though.
<dmbaturin>
Not sure if french articles are gender-specific.
<Drup>
they are
<Drup>
"le" and "la"
Anarchos has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
<dmbaturin>
Brainfuck grammar should be modified to produce more plausible brainfuck, but I needed something for weight testing.
<Drup>
you could add the reverse
<Drup>
take a corpus, infer weight
<Drup>
assuming correct grammar
<dmbaturin>
True.
<dmbaturin>
But it also needs a runtime parser generator for those BNFs. That's my next idea to implement.
<Drup>
yep
<dmbaturin>
There is some abandoned generic BNF verifier in C++ that was someone's thesis, but it was pretty limited.
<dmbaturin>
The thing that turned me to ocaml was an abandoned grammar analyzer. I was going to get it to work, but found out it's written in a completely unfamiliar language.
<Drup>
there is BNFC too
<Drup>
in haskell
<dmbaturin>
Guess I should take a look.
<Drup>
I find it awfull, compared to menhir
<Drup>
but it takes BNF as input
Kakadu has quit [Remote host closed the connection]