<Kakadu>
few days ago I have compilable version. But after upgrade of core I received some compilation errors. Maybe after upgrading I have broken backward compatibility?
pkrnj has joined #ocaml
<wmeyer>
Kakadu: you should document it
<wmeyer>
I am upgrading opam now
<Kakadu>
If it wiil help I will
ttamttam has left #ocaml []
ontologiae has joined #ocaml
chrisdotcode has joined #ocaml
Watcher7|off is now known as Watcher7
Yoric has quit [Ping timeout: 264 seconds]
<wmeyer>
ok it builds Kakadu
Plainview has joined #ocaml
<wmeyer>
Kakadu: where is the ocamlbrowser example?
<Kakadu>
echo 'Now you can change dir to test and execute ./main -I `ocamlc -where`, for example'
<Kakadu>
Maybe it's better to mention that it is ocamlbrowser example
mcclurmc has quit [Ping timeout: 252 seconds]
<wmeyer>
Kakadu: I like what you did. The tree however need some cleanup, and some documentation
<wmeyer>
remember that user does not always have up to date version of a library
<Kakadu>
I decided to develop for Qt5 because Digia have upgraded QtQuick from version (Qt 4.8) to QtQuick 2(Qt5) and added many features
smondet has quit [Remote host closed the connection]
smondet has joined #ocaml
<wmeyer>
Kakadu: I see no problem with that, and I like you up to date with the newest version
<wmeyer>
but
<wmeyer>
it needs to be mentioned in the readme at least
ttamttam has joined #ocaml
ttamttam has left #ocaml []
* Kakadu
added constraint about Core
Yoric has joined #ocaml
<Kakadu>
Qt5 mentioned to
emmanuelux has quit [Ping timeout: 256 seconds]
<wmeyer>
Kakadu: due to problem with downlading the libqt5, i am not able to test it on my machine. However, I'm going to try it later
Watcher7 is now known as Watcher7|off
Yoric has quit [Ping timeout: 256 seconds]
Watcher7|off is now known as Watcher7
<orbitz>
eeh ,stack overflow when running byte code
<orbitz>
runs just fine native
yacks has joined #ocaml
ggole has quit []
malc__ has quit [Quit: leaving]
ollehar has quit [Ping timeout: 256 seconds]
ttamttam has joined #ocaml
ttamttam has quit [Remote host closed the connection]
Yoric has joined #ocaml
ontologiae has quit [Ping timeout: 255 seconds]
Anarchos has joined #ocaml
<Anarchos>
caml_c_thread_register must be called before any call to CAMLparam/CAMLlocal ?
structuralist has quit []
<wmeyer>
I'd believe yes Anarchos
<Anarchos>
wmeyer my gcc compiler doesn't complain if put the CAMLparam macros just after a call to caml_c_thread_register. but it seems a bit dirty because these macros declare the local variables of the fucntion.
<wmeyer>
Anarchos: you should not do it
<wmeyer>
CAMLparam should be first in the function body
<wmeyer>
well, actually, it's fine as long as you don't call runtime functions like caml_alloc_small before the caml_c_thread_register
<wmeyer>
but you should always put it first in the function
<Anarchos>
wmeyer yes but if it is the first step in a new C thread , and this one will make callback to ocaml ?
<wmeyer>
as I say, put it first, then caml_c_thread_register and then feel free to alloc anything
<Anarchos>
ok
<Anarchos>
wmeyer i find it a bit strange because i understood that caml_c_thread_register prepares the stacks for ocaml...
<wmeyer>
Anarchos: I don't know yet what it does exactly, my feeling is that CAMLparam and CAMLlocal registers the slots on the stack to be garbage collected, by registering the roots.
<wmeyer>
when I have time today I'm going to give you an answer what exactly is happening
<Anarchos>
wmeyer and caml_c_thread_register initializes all the machinery for the gc....
<wmeyer>
right
<Anarchos>
the fist stack being adding a key in TLS (thread local storage) and storing the caml_young_ptr, caml_global_roots, signal handlers and so on
vbmithr_ has quit [Read error: Operation timed out]
<wmeyer>
I'm not sure what here means "all the machinery for gc"
vbmithr has joined #ocaml
<Anarchos>
wmeyer if interested, just look the source code of caml_c_thread_register in otherlibs/systhreads/st_stubs.c
<wmeyer>
sure; but currently doing something different
pkrnj has quit [Quit: Computer has gone to sleep.]
tianon has joined #ocaml
Snark has quit [Read error: Connection reset by peer]
malo has joined #ocaml
pkrnj has joined #ocaml
ttamttam has joined #ocaml
zpe has quit [Remote host closed the connection]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
troydm has quit [Quit: What is hope? That all of your wishes and all of your dreams come true? (C) Rau Le Creuset]
troydm has joined #ocaml
ttamttam has left #ocaml []
_andre has quit [Quit: leaving]
adahlberg has joined #ocaml
adahlberg has quit [Remote host closed the connection]
weie has quit [Read error: Connection reset by peer]
weie has joined #ocaml
Yoric has quit [Ping timeout: 252 seconds]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
soulofpeace has quit [Ping timeout: 255 seconds]
osnr has quit [Quit: Leaving.]
mcclurmc has joined #ocaml
Kakadu has quit []
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
dsheets has quit [Ping timeout: 264 seconds]
Anarchos has joined #ocaml
zpe has joined #ocaml
wwilly has quit [Remote host closed the connection]
dsheets has joined #ocaml
malo has quit [Quit: Leaving]
osnr has quit [Quit: Leaving.]
zpe has quit [Ping timeout: 268 seconds]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
smondet has quit [Ping timeout: 255 seconds]
mcclurmc has quit [Ping timeout: 264 seconds]
dtg has quit [Read error: Connection reset by peer]
dtg has joined #ocaml
dtg has quit [Read error: Connection reset by peer]
dtg has joined #ocaml
Arsenik has joined #ocaml
<vext01>
howdy
jbrown has quit [Read error: Operation timed out]
tani has quit [Quit: Verlassend]
derek_c has joined #ocaml
emmanuelux has joined #ocaml
derek_c has quit [Quit: leaving]
<wmeyer>
hi
rks has quit [Killed (zelazny.freenode.net (Nickname regained by services))]
rks_ has joined #ocaml
<wmeyer>
hello rks_ :-)
<vext01>
so
<vext01>
i have a problem :)
<vext01>
recall that i was writing a stack caclulator
osnr has quit [Quit: Leaving.]
<vext01>
i added the ability to:
<vext01>
push unevaluated code on the stack, like on a hp48
<vext01>
and the ability to give comma separated commands, which are evaluated one at a time
<vext01>
<+> is an unevaluated plus
<vext01>
1,2,3 pushes three elements, 1, 2 and 3
<vext01>
a problem arises where you combine the two
<vext01>
<1,2>,3
<vext01>
should push <1,2> and then 3
<vext01>
this is hard without, for example, yacc, right?
<vext01>
is there a simple way to parse this
<Drup>
you don't want to use yacc ?
<wmeyer>
you can always parse without yacc, here you need ocamllex only
<vext01>
well, its a bit overkill perhaps
<wmeyer>
there are delimited expressions, not nested
pkrnj has quit [Quit: Computer has gone to sleep.]
<wmeyer>
so you need regex really,
<vext01>
i played with regex a bit
<wmeyer>
you don't have any other complex grammar, just stram of tokens
<vext01>
im not sure
<vext01>
take for example the expression
<Drup>
that's true, but that's also a good excuse to learn to use yacc :p
<vext01>
<<1, 2>, 3>, 4
<wmeyer>
I would not learn yacc that way
<vext01>
what regex would be used to "parse" this?
<wmeyer>
well, that's then not regular language already
<vext01>
...
<wmeyer>
you have nested triangle brackets
<vext01>
yes
<wmeyer>
so you can use yacc
<vext01>
a simple recursive descent is needed i reckon
<wmeyer>
the grammar would be simple
<thizanne>
in fact you could also use lex for non regular languages
<wmeyer>
descent is ok
<thizanne>
but don't :)
<wmeyer>
thizanne: right, CPS with rules?
<thizanne>
you don't even need CPS
<vext01>
oh did you see the famous "why cant i parse xml with regex" post on stack overflow?
<thizanne>
rules with references or recursion are enough
<vext01>
so, when we speak of yacc in the ocaml world
<vext01>
are be talking about /usr/bin/yacc?
<vext01>
or you have something of our own?
<vext01>
heh
<vext01>
ocamly<tab> -> ocamlyacc
<wmeyer>
ocamlyacc is fine, you can also use menhir
<thizanne>
yes, we are talking of ocamlyacc or menhir
<wmeyer>
it depends :-)
<vext01>
ocamlyaxx comes with ocaml, so thats fine
<thizanne>
as we are talking about ocamllex
<vext01>
s/xx/cc/g
<thizanne>
vext01: menhir is strictly better than ocamlyaxx
<thizanne>
it's like ocamlyacc, but with extra (cool) features
<vext01>
the slimmer the better really
<thizanne>
I think thebetter the better, when you begin
<Drup>
thizanne: it's also strictly more overkill most of the time :p
<thizanne>
I don't think "overkill" is the good word
<wmeyer>
Drup: not nesercialy it has convenience features
<wmeyer>
like named bindings
<thizanne>
menhir is not that heavy, using a parser might be overkill but when you need it there is little differences
<wmeyer>
and it's has better errors, and better handling of the conflicts
<thizanne>
of course you might want your program to run on standard ocaml distribution, but if it's just a stack calculator to train, you shoudld consider using menhir
<wmeyer>
in fact they are almost compatible
<wmeyer>
and you get nice example inside
<wmeyer>
I still believe that menhir should be used always when ocamlyacc is not strictly required
<vext01>
i think perhaps you are right, i only need a tokeniser
<thizanne>
vext01: then you don't even need ocamllex
<vext01>
...
<thizanne>
let token str = let i = ref (-1) in fun () -> incr i; str.[i]
<thizanne>
let t = token "abcd" in [t(); t(); t()]
derek_c has joined #ocaml
darkf has joined #ocaml
<vext01>
why [t(); t(); t();]?
<thizanne>
to make you test
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
<thizanne>
ok it was a bad example, the last t is computed first
<thizanne>
(and i forgot a !, minor detail)
<vext01>
to be be honest ocamllex looks easy enough
<thizanne>
"the slimmer the better"
<thizanne>
;)
<vext01>
touche
<thizanne>
but if it's the way you think you can learn to use it, so be it
<thizanne>
it wwon't be a loss of time anyway
pkrnj has joined #ocaml
ontologiae has joined #ocaml
emmanuelux has quit [Read error: Connection reset by peer]
osnr has quit [Quit: Leaving.]
ontologiae has quit [Read error: Operation timed out]