thermoplyae has quit [Read error: 113 (No route to host)]
Yoric[DT] has quit ["Ex-Chat"]
revax has joined #ocaml
ReachingFarr has joined #ocaml
<ReachingFarr>
Does anyone here have experience with Ocamlyacc, or know of a more appropriate channel for me to be asking for Ocamlyacc help?
<hsuh>
the place is here, but i don't have experience
<ReachingFarr>
Well, if anyone comes by and is able to help, here is my problem: Ocamlyacc seems to be reducing before it needs to, which is causing it to not except things that should be in the language.
<ReachingFarr>
I have the following definitions: nonterm1 => TOKEN1 TOKEN2 TOKEN3; nonterm2 => TOKEN1 TOKEN2 nonterm3 TOKEN3;
<ReachingFarr>
For some reason it keeps reducing to nonterm1 whenever it reads TOKEN1 TOKEN2 without waiting to see what is next.
thermoplyae has joined #ocaml
AxleLonghorn has left #ocaml []
thermoplyae has quit ["daddy's in space"]
onigiri has quit []
jlouis_ has joined #ocaml
thermoplyae has joined #ocaml
TheLittlePrince has joined #ocaml
jlouis has quit [Read error: 110 (Connection timed out)]
ReachingFarr has left #ocaml []
madroach has quit [Remote closed the connection]
jlouis has joined #ocaml
jlouis_ has quit [Read error: 110 (Connection timed out)]
brian` has joined #ocaml
jlouis_ has joined #ocaml
jlouis has quit [Read error: 110 (Connection timed out)]
jlouis has joined #ocaml
jlouis_ has quit [Read error: 110 (Connection timed out)]
brooksbp has joined #ocaml
brooksbp has quit []
jlouis_ has joined #ocaml
jlouis has quit [Read error: 110 (Connection timed out)]
Snrrrub__ is now known as Snrrrub
<Snrrrub>
Hmm, I'm having some trouble accessing record fields from one module when the record was defined in another... here's a minimal example: http://pastebin.com/d364118e9 - could someone explain what I'm doing wrong?
<thelema>
Snrrrub: record.Modulename.field
<thelema>
Snrrrub: test.A.x
<Snrrrub>
Whoa. That's intense. Makes sense, but I wouldn't have guessed it. :-) Thanks!
<thelema>
I guess the compiler could keep track of the type of the value and prepend that module name to the record labels...
<thelema>
if you open the module, things go easily
brian`` has joined #ocaml
brian` has quit [Read error: 110 (Connection timed out)]
mrsolo has joined #ocaml
NoGoodNik has joined #ocaml
mrsolo has quit ["This computer has gone to sleep"]
mrsolo has joined #ocaml
<mbishop>
How could I split a string into an array of characters?
<thelema>
mbishop: Array.init (String.length str) (fun i -> str.[i])
<thelema>
(or something like that)
mrsolo has quit ["This computer has gone to sleep"]
<mbishop>
ah yes, that worked, thanks
<mbishop>
Too bad the program doesn't work heh
<mbishop>
trying to write a brainfuck interpreter
<mbishop>
it hangs somewhere
NoGoodNik has quit []
<mbishop>
Hmm
<mbishop>
try foo.(i) <- input_byte stdin with End_of_file -> failwith "Error" is giving me
<mbishop>
"
<mbishop>
This pattern matches values of type char
<mbishop>
but is here used to match values of type exn
<mbishop>
"
<mbishop>
I tried putting ()'s around pretty much everything you can think of
<mbishop>
yeah it worked for me too, but not in the code...anyway I just removed the try...with from the code (pasted above)
<mbishop>
but it still hangs
<mbishop>
:/
<thelema>
mbishop: cp never gets incremented
<mbishop>
Really?
<thelema>
yup.
<mbishop>
I wondered why it was indenting "cp := !cp + 1" funny
<thelema>
you simply need () around your match statement
onigiri has joined #ocaml
<mbishop>
thelema: Ah! And now it works, thanks :)
<thelema>
:)
onigiri has quit [Client Quit]
Tetsuo has joined #ocaml
<mbishop>
Hmm, doesn't seem to work on some other brainfuck snippets though, like addition
<mbishop>
hmm scratch that, it works :)
Yoric[DT] has joined #ocaml
<Yoric[DT]>
hi
thermoplyae has quit ["daddy's in space"]
aska3 has joined #ocaml
aska3 has left #ocaml []
filp has joined #ocaml
middayc has quit [Read error: 110 (Connection timed out)]
Yoric[DT] has quit ["Ex-Chat"]
szell` has joined #ocaml
szell has quit [Read error: 110 (Connection timed out)]
madroach has joined #ocaml
<madroach>
Hi, I'm wondering how the Thread module is supposed to work in the toplevel.
<madroach>
I built by toplevel: ocamlmktop -thread unix.cma threads/threads.cma -o top
<madroach>
./top
<madroach>
# Thread.create;;
<madroach>
Unbound value Thread.create
<madroach>
then I did: echo module Thread = Thread >blub.ml
<madroach>
ocamlc -c -thread blub.ml
<madroach>
./top
<madroach>
#load "blub.cmo"
<madroach>
open Blub;;
<xavierbot>
Characters 1-10:
<xavierbot>
open Blub;;
<xavierbot>
^^^^^^^^^
<xavierbot>
Unbound module Blub
<madroach>
and then it worked.
<madroach>
Strange hack. How it is supposed to work?
<madroach>
Thread.create;;
<xavierbot>
Characters 1-14:
<xavierbot>
Thread.create;;
<xavierbot>
^^^^^^^^^^^^^
<xavierbot>
Unbound value Thread.create
wolfgangbeck has joined #ocaml
rwmjones has joined #ocaml
munga has joined #ocaml
huh has quit [calvino.freenode.net irc.freenode.net]
dobblego has quit [calvino.freenode.net irc.freenode.net]
ertai has quit [calvino.freenode.net irc.freenode.net]
svenl has quit [Remote closed the connection]
dobblego has joined #ocaml
ertai has joined #ocaml
huh has joined #ocaml
hsuh has quit ["owr"]
letrec has quit []
svenl has joined #ocaml
letrec has joined #ocaml
mrsolo has joined #ocaml
madroach has quit [Remote closed the connection]
gaja has quit [Read error: 110 (Connection timed out)]
Tetsuo has quit ["Leaving"]
hkBst has joined #ocaml
ttamttam has left #ocaml []
wolfgangbeck has left #ocaml []
eroyf has left #ocaml []
ttamttam has joined #ocaml
xavierbot has quit [Read error: 104 (Connection reset by peer)]
rwmjones has quit [Read error: 104 (Connection reset by peer)]
ikaros has joined #ocaml
rwmjones has joined #ocaml
ikaros has quit [Remote closed the connection]
bzzbzz has joined #ocaml
filp has quit ["Bye"]
brian``` has joined #ocaml
brian`` has quit [Read error: 110 (Connection timed out)]
middayc has joined #ocaml
brian``` has quit [Connection timed out]
TheLittlePrince has quit [Client Quit]
ita has joined #ocaml
youscef has joined #ocaml
<youscef>
salut
middayc has quit []
Snrrrub has joined #ocaml
Snrrrub__ has joined #ocaml
ecc has quit ["leaving"]
youscef has quit ["Quitte"]
Snrrrub has quit [Read error: 110 (Connection timed out)]
tsuyoshi has quit [Read error: 104 (Connection reset by peer)]
RobertFischer has joined #ocaml
Snrrrub__ is now known as Snrrrub
Morphous_ has joined #ocaml
jlouis_ has quit ["bbl"]
Morphous has quit [Read error: 110 (Connection timed out)]
munga has quit ["Leaving"]
Tetsuo has joined #ocaml
jstanley has joined #ocaml
<jstanley>
Anyone know of a program that will take ocaml files (eg, .mli files) and generate corresponding C FFI functions for them?
<hcarty>
jstanley: camlidl
<hcarty>
Sorry, misread the question
<hcarty>
camlidl goes the other way...
<rwmjones>
jstanley, there is no such program -- I did a bit of work in this area, but nothing came of it
<rwmjones>
would be very very useful for me
onigiri has joined #ocaml
bongy has joined #ocaml
<jstanley>
rwmjones: yeah, me too =/
<jstanley>
hcarty: yeah there's lots of stuff to go C -> OCaml
<jstanley>
okay, how about this: does anyone know of a canned .mli parser in ocaml?
<jstanley>
because if there's not, i might have to go write an ocaml -> C binding generator in haskell, lol ;P
<rwmjones>
you can use camlp4 to parse those files
<jstanley>
i assumed that a general-purpose infrastructure was around, i was hoping for a canned .mli parser specification
* jstanley
is not an ocaml programmer ;P
<rwmjones>
I'm not sure ... obviously the ocaml source contains a grammar
<jstanley>
rwmjones: my main problem is that i need to have ocaml heap objects promoted to global roots quite commonly in C-land, so it's not a "tight" binding generator that I need.
<jstanley>
rwmjones: *nod*
ttamttam has left #ocaml []
Tetsuo has quit [Read error: 110 (Connection timed out)]