flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.00.1 http://bit.ly/UHeZyT | http://www.ocaml.org | Public logs at http://tunes.org/~nef/logs/ocaml/
wmeyer has quit [Remote host closed the connection]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
dekabel has quit [Quit: dekabel]
ollehar has quit [Ping timeout: 255 seconds]
q66 has quit [Remote host closed the connection]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
wmeyer has joined #ocaml
Mortchek is now known as dwcook
eikke has quit [Ping timeout: 260 seconds]
madroach has quit [Ping timeout: 248 seconds]
awm22 has quit [Quit: Leaving.]
madroach has joined #ocaml
darkf has joined #ocaml
mattrepl has joined #ocaml
osnr has quit [Quit: Leaving.]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
awm22 has joined #ocaml
soulofpeace has joined #ocaml
pkrnj has quit [Ping timeout: 260 seconds]
pkrnj has joined #ocaml
osnr has quit [Quit: Leaving.]
nalaginrut_ has quit [Remote host closed the connection]
mattrepl_ has joined #ocaml
mattrepl has quit [Ping timeout: 252 seconds]
mattrepl_ is now known as mattrepl
talzeus has quit [Read error: Connection reset by peer]
weie has quit [Read error: Connection reset by peer]
talzeus has joined #ocaml
weie has joined #ocaml
chrisdotcode_ has joined #ocaml
chrisdotcode has quit [Ping timeout: 252 seconds]
willy_ has joined #ocaml
wwilly has quit [Ping timeout: 260 seconds]
<bernardofpc> is there some way to "read back" a .cmi file to see what the compiler produced ?
<Drup> bernardofpc: if you are looking for the type deduced by the compiler, you can use -i
<Drup> if you're not, I don't understand the question :p
<bernardofpc> In fact, I'm not sure what is in the .cmi
<bernardofpc> only the types of all functions in my .ml ?
<Drup> mostly, yes.
emmanuelux has quit [Ping timeout: 256 seconds]
emmanuelux has joined #ocaml
emmanuelux has quit [Ping timeout: 245 seconds]
ggole has joined #ocaml
Drup has quit [Quit: Leaving.]
emmanuelux has joined #ocaml
Kakadu has joined #ocaml
emmanuelux has quit [Read error: Connection reset by peer]
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
chrisdotcode_ has quit [Ping timeout: 256 seconds]
chrisdotcode has joined #ocaml
mcclurmc has quit [Read error: Operation timed out]
avsm has quit [Ping timeout: 256 seconds]
Watcher7 is now known as Watcher7|off
avsm has joined #ocaml
mfp has quit [Ping timeout: 245 seconds]
Neros has quit [Ping timeout: 245 seconds]
mfp has joined #ocaml
mattrepl has quit [Quit: mattrepl]
tane has joined #ocaml
zpe has joined #ocaml
gnuvince has quit [Ping timeout: 248 seconds]
ollehar has joined #ocaml
ollehar has quit [Ping timeout: 255 seconds]
jbrown has joined #ocaml
ollehar has joined #ocaml
chrisdotcode has quit [Ping timeout: 256 seconds]
Nahra has quit [Remote host closed the connection]
Nahra has joined #ocaml
mcclurmc has joined #ocaml
Yoric has joined #ocaml
ollehar has quit [Ping timeout: 245 seconds]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
paolooo has joined #ocaml
mort___ has joined #ocaml
ontologiae has joined #ocaml
ontologiae has quit [Ping timeout: 264 seconds]
willy_ has quit [Remote host closed the connection]
wwilly has joined #ocaml
beckerb has joined #ocaml
Nahra has quit [Remote host closed the connection]
Nahra has joined #ocaml
Yoric has quit [Ping timeout: 256 seconds]
q66 has joined #ocaml
eikke has joined #ocaml
dsheets has joined #ocaml
Kakadu has quit []
ontologiae has joined #ocaml
Yoric has joined #ocaml
eikke has quit [Ping timeout: 260 seconds]
Arsenik has joined #ocaml
_andre has joined #ocaml
Nahra has quit [Remote host closed the connection]
malc__ has joined #ocaml
raichoo has joined #ocaml
Snark has quit [Ping timeout: 255 seconds]
pango has quit [Quit: kernel upgrade]
Yoric has quit [Ping timeout: 264 seconds]
eikke has joined #ocaml
pango has joined #ocaml
eikke has quit [Ping timeout: 276 seconds]
paolooo has quit [Ping timeout: 245 seconds]
Snark has joined #ocaml
Drup has joined #ocaml
paolooo has joined #ocaml
soulofpeace has quit [Ping timeout: 256 seconds]
<companion_cube> bernardofpc: there are also the required modules, I think (ocamlobjinfo may help you)
Arsenik has quit [Ping timeout: 245 seconds]
paolooo has quit [Quit: Page closed]
paolooo has joined #ocaml
awm22 has quit [Quit: Leaving.]
paolooo has quit [Quit: Page closed]
paolooo has joined #ocaml
paolooo has quit [Ping timeout: 245 seconds]
fraggle_ has quit [Ping timeout: 252 seconds]
paolooo has joined #ocaml
fraggle_ has joined #ocaml
tani has joined #ocaml
Yoric has joined #ocaml
tane has quit [Ping timeout: 252 seconds]
mort___ has quit [Ping timeout: 276 seconds]
awm221 has joined #ocaml
soulofpeace has joined #ocaml
walter|rtn has quit [Quit: This computer has gone to sleep]
Yoric has quit [Ping timeout: 256 seconds]
smondet has joined #ocaml
Neros has joined #ocaml
<bernardofpc> thkx companion_cube
hyperboreean has quit [Ping timeout: 256 seconds]
hyperboreean has joined #ocaml
ollehar has joined #ocaml
yacks has quit [Ping timeout: 245 seconds]
yacks has joined #ocaml
Watcher7|off is now known as Watcher7
beckerb has quit [Ping timeout: 264 seconds]
yacks has quit [Read error: Connection reset by peer]
darkf has quit [Quit: Leaving]
yacks has joined #ocaml
yacks has quit [Read error: Connection reset by peer]
mattrepl has joined #ocaml
Yoric has joined #ocaml
talzeus_ has joined #ocaml
yacks has joined #ocaml
structuralist has joined #ocaml
cdidd has quit [Remote host closed the connection]
Kakadu has joined #ocaml
<bobry> anyone using OCaml on os x? the version from Homebrew seems to be missing Graphics module, is there anything I can do about it?
<orbitz> what is the Graphics module?
<bobry> X11 bindings
<orbitz> does homebrow support the concept of variants?
<bobry> you mean alternative packages?
<orbitz> modifications to a package
<orbitz> like macports
<malc__> bobry: graph is not X11 bindings...
ontologiae has quit [Ping timeout: 256 seconds]
<talzeus_> hi
<talzeus_> what is "smaller" in pattern matching?
<talzeus_> let rec compress = function
<talzeus_> | a :: (b :: _ as t) -> if a = b then compress t else a :: compress t
<talzeus_> | smaller -> smaller
<bobry> orbitz: yup, solved the problem by rebuilding ocaml from source
<ggole> talzeus: a variable?
<ggole> It is bound to anything that doesn't match the first clause
<talzeus_> ah, got it!
<talzeus_> it's just a bound for the argument of function right?
<ggole> Yeah
<talzeus_> thanx! I should realize it earlier
<ggole> It seems to be there so they can use function and not have to type the explicit match
<ggole> Just a little syntactic trick
<pippijn> smaller
<pippijn> ok
<pippijn> was that a chinese programmer?
<ggole> talzeus: are you doing 99 problems by any chance?
<talzeus_> yeah
<ggole> It looked like it :)
<talzeus_> just done w/ compress function but in a longer version
<talzeus_> have you finished those problems?
<ggole> No, I've done about 40-50 of them
<ggole> Just pecking at it every now and then
<ggole> A nice problem set
<talzeus_> I'm just working from the beginning
<ggole> There's a fully tail recursive solution for that one, btw
<ggole> Which is only a little longer
<talzeus_> yeah
<talzeus_> I came up w/ the tail recursive solution
<ggole> Keeping the duplicate element as an arg?
<talzeus_> list current_elem result_list
<ggole> Yeah, I had probably exactly the same thing with different names :)
<talzeus_> nice
ollehar has quit [Ping timeout: 252 seconds]
emmanuelux has joined #ocaml
paolooo has quit [Quit: Page closed]
gnuvince has joined #ocaml
dezzy has quit [Read error: Connection reset by peer]
dezzy has joined #ocaml
tianon has quit [Ping timeout: 248 seconds]
yacks has quit [Ping timeout: 256 seconds]
yacks has joined #ocaml
Watcher7 is now known as Watcher7|off
ttamttam has joined #ocaml
raichoo has quit [Quit: leaving]
yacks has quit [Ping timeout: 256 seconds]
<wmeyer> hello
caligula__ has quit [Ping timeout: 264 seconds]
<Kakadu> hey!
<wmeyer> Kakadu: ho
* Kakadu is writing simple tutorial about this lablqt
<gasche> Kakadu: do not hesitate to ask native english speakers for corrections
<wmeyer> Kakadu: do you really need such dependencies (core, ocamlgraph, sexplib)?
<wmeyer> especially I am curious about ocamlgraph
<Kakadu> probably I can remove ocamlgraph
<Kakadu> (if I move types to seperate library)
<wmeyer> it's OK if you use it, see no problem with it
<wmeyer> I use current tip of git
awm221 has quit [Quit: Leaving.]
<Kakadu> $ ocamlfind list|grep core
<Kakadu> core (version: 109.21.00)
<Kakadu> And u, wmeyer?
<wmeyer> 109.17.00
ollehar has joined #ocaml
<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
<Kakadu> what tree?
<wmeyer> your source tree :-)
<Kakadu> aah
raichoo has joined #ocaml
<wmeyer> lalblqt tree
<wmeyer> sorry too much coffee today
<Kakadu> q3?
<Kakadu> qt3?
<wmeyer> sorry myself I am not a user of qt at all
Plainview has left #ocaml []
<Kakadu> export PATH=`qmake -query QT_INSTALL_BINS`:$PATH maybe help
<wmeyer> Kakadu: that fixed the problem http://pastebin.com/Q2h6aRE6
<wmeyer> ah it says my version of Qt is outdated
<wmeyer> you definitely need to mention in the doc that it requires Qt5 (which is bleeding edge on ubuntu)
<wmeyer> oops, not available for i386
<Kakadu> wut?
<Kakadu> I have tried lablqt at 13.04 i386
<Kakadu> it compiles
<wmeyer> yes but I have 12.10 :-)
<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]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
osnr has quit [Client Quit]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
osnr has quit [Client Quit]
raichoo has quit [Quit: leaving]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
osnr has quit [Client Quit]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
osnr has quit [Client Quit]