Alpounet changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | 3.11.1 out now! Get yours from http://caml.inria.fr/ocaml/release.html - Answer OCaml Meeting 2010 poll https://forge.ocamlcore.org/survey/survey.php?group_id=77&survey_id=1
ulfdoz_ has joined #ocaml
tmaeda is now known as tmaedaZ
munga_ has joined #ocaml
thrasibule has joined #ocaml
ulfdoz has quit [Read error: 110 (Connection timed out)]
ulfdoz_ is now known as ulfdoz
ulfdoz_ has joined #ocaml
<mbishop> Anyone want to buy "The Functional Approach to Programming"? selling it used on Amazon
munga_ has quit [Read error: 113 (No route to host)]
ulfdoz has quit [Read error: 110 (Connection timed out)]
ulfdoz_ is now known as ulfdoz
sysop_fb has quit []
Modius__ is now known as Modius
tmaedaZ is now known as tmaeda
Modius has quit ["I'm big in Japan"]
Modius has joined #ocaml
tmaeda is now known as tmaedaZ
valross has joined #ocaml
drunK_ has quit [Read error: 110 (Connection timed out)]
caligula_ has joined #ocaml
ttamttam has joined #ocaml
caligula__ has quit [Read error: 110 (Connection timed out)]
middayc has quit ["ChatZilla 0.9.85 [Firefox 3.0.15/2009101601]"]
ttamttam has quit ["Leaving."]
ttamttam has joined #ocaml
ttamttam has quit [Client Quit]
clog_ has joined #ocaml
rhar has joined #ocaml
thrasibule has quit [Read error: 110 (Connection timed out)]
clog has quit [Read error: 110 (Connection timed out)]
clog_ is now known as clog
clog_ has joined #ocaml
ztfw` has quit [Remote closed the connection]
BigJ has joined #ocaml
tmaedaZ is now known as tmaeda
rhar has quit ["Leaving"]
ikaros has joined #ocaml
clog has joined #ocaml
ulfdoz has quit [Read error: 110 (Connection timed out)]
ygrek has joined #ocaml
Snark has joined #ocaml
clog has quit [Read error: 110 (Connection timed out)]
clog_ is now known as clog
slash_ has quit [Client Quit]
ttamttam has joined #ocaml
verte has joined #ocaml
jonafan_ has joined #ocaml
thelema_ has joined #ocaml
Snark has quit ["Ex-Chat"]
Modius_ has joined #ocaml
BigJ has quit [card.freenode.net irc.freenode.net]
Modius has quit [card.freenode.net irc.freenode.net]
jonafan has quit [card.freenode.net irc.freenode.net]
rwmjones has quit [card.freenode.net irc.freenode.net]
thelema has quit [card.freenode.net irc.freenode.net]
tiz has quit [card.freenode.net irc.freenode.net]
srcerer has quit [card.freenode.net irc.freenode.net]
Ched has quit [card.freenode.net irc.freenode.net]
lutter has quit [card.freenode.net irc.freenode.net]
animist_ has quit [card.freenode.net irc.freenode.net]
srcerer_ has joined #ocaml
ski_ has quit ["Lost terminal"]
tiz has joined #ocaml
animist has joined #ocaml
ski_ has joined #ocaml
tiz has quit [Killed by sagan.freenode.net (Nick collision)]
BigJ has joined #ocaml
Modius has joined #ocaml
jonafan has joined #ocaml
rwmjones has joined #ocaml
Ched has joined #ocaml
animist_ has joined #ocaml
srcerer has joined #ocaml
lutter has joined #ocaml
tiz has joined #ocaml
tiz_ has joined #ocaml
tiz has quit [Read error: 145 (Connection timed out)]
animist_ has quit [Read error: 145 (Connection timed out)]
srcerer has quit [SendQ exceeded]
Modius has quit [SendQ exceeded]
jonafan has quit [Connection timed out]
middayc has joined #ocaml
morse has joined #ocaml
ygrek has quit [Remote closed the connection]
valross has quit [Read error: 110 (Connection timed out)]
dmentre has joined #ocaml
jcaose has joined #ocaml
middayc_ has joined #ocaml
middayc has quit [Read error: 60 (Operation timed out)]
middayc_ is now known as middayc
ua has quit [Read error: 113 (No route to host)]
_zack has joined #ocaml
middayc has quit [Read error: 104 (Connection reset by peer)]
th5 has joined #ocaml
munga_ has joined #ocaml
dmentre1 has joined #ocaml
dmentre has quit [card.freenode.net irc.freenode.net]
Alpounet has quit [card.freenode.net irc.freenode.net]
zhijie1 has quit [card.freenode.net irc.freenode.net]
tarbo2 has quit [card.freenode.net irc.freenode.net]
smimram has quit [card.freenode.net irc.freenode.net]
monestri has quit [card.freenode.net irc.freenode.net]
Camarade_Tux has quit [card.freenode.net irc.freenode.net]
mal`` has quit [card.freenode.net irc.freenode.net]
zhijie has quit [card.freenode.net irc.freenode.net]
peddie has quit [card.freenode.net irc.freenode.net]
noj has quit [card.freenode.net irc.freenode.net]
brendan has quit [card.freenode.net irc.freenode.net]
svenl has quit [card.freenode.net irc.freenode.net]
Pepe_ has quit [card.freenode.net irc.freenode.net]
mfp has quit [card.freenode.net irc.freenode.net]
Camarade_Tux has joined #ocaml
Pepe_ has joined #ocaml
svenl has joined #ocaml
peddie has joined #ocaml
<gildor> thelema_: I was thinking that you also move the BTS of batteries to github
thelema_ has quit [Read error: 104 (Connection reset by peer)]
dmentre1 is now known as dmentre
mal`` has joined #ocaml
brendan has joined #ocaml
monestri has joined #ocaml
smimram has joined #ocaml
tarbo2 has joined #ocaml
mfp has joined #ocaml
Alpounet has joined #ocaml
zhijie has joined #ocaml
thelema has joined #ocaml
zhijie1 has joined #ocaml
Mr_Awesome has quit ["aunt jemima is the devil!"]
middayc has joined #ocaml
ua has joined #ocaml
<middayc> anyone has any idea what this means from F# homepage "a cross-compiling core shared with the popular OCaml language" -- http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/
<gildor> middayc: there is a common subset between ocaml and f#
<middayc> subset of what? (I know F# is clone of ocaml btw)
<gildor> middayc: take a look at this blog, http://coherentpdf.com/blog/, this company has try to build a library for OCaml and F#
<gildor> middayc: there is some difference between F# and OCaml, I cannot tell you precisely which ones
<middayc> very interesting, I didn't know somebody was making pdf editor in ocaml
noj has joined #ocaml
<gildor> I am not sure the whole editor is in caml, the command line tool however is
noj_ has joined #ocaml
<middayc> there is a blogpost about binding cocoa to ocaml ..
<Camarade_Tux> I think the library is in ocaml
<middayc> aha, so they were able to crosscompile ocaml to f#... I thought f# is still different in details.. interesting to know
<flux> apparently it's psosible to code in their common subset
<flux> but I suppose it can become annoying pretty fast: no modules, no objects..
Yoric has joined #ocaml
<middayc> I had/have predjustices against f# but yesterday I was watching some video and there was some impressive stuff inthere, and also looked nice and clean
<Camarade_Tux> I think they also have a preprocessing stage
<gildor> middayc: F# is probably a good PL, but only for Win32.
<gildor> middayc: it is a quite big limitation to my eye
<middayc> http://channel9.msdn.com/pdc2008/TL11/ -- the making code async (via async "workflow" which is like a monad (I read)) and paralel at the last part of vid was inpressive
<middayc> gidor: I agree .. also I don't like to enter the whole .NET ecosystem, if I had I would rather go ot JVM
<middayc> gidor: otherwise I think mono has f# too
_andre has joined #ocaml
<gildor> middayc: mono can run some version of f# as a side effect
<gildor> middayc: but I won't rely on mono for f#, it is really a big bet, for now (future version of mono will maybe improve that but as long as f# is not a widely used language, mono priority won't be running F# CTP)
dmentre has quit ["Leaving."]
<Camarade_Tux> now, I'm wondering what effect will the opensourcing of the .net micro framework have...
<middayc> not sure what is .NET micro framewor compared to .NET, I read on some chat that it has no JIT?
<Camarade_Tux> it's for win CE mostly
<middayc> aha
<middayc> gildor: I wasn't exploring mono #f to any depth.. as you said only windows is a no-go for me.. I don't intend to use windows based servers in any future
<middayc> (I mean like VPS based on windows)
ygrek has joined #ocaml
jcaose has quit [Read error: 104 (Connection reset by peer)]
noj_ has quit [Client Quit]
Pimm has joined #ocaml
pimm_ has joined #ocaml
Pimm has quit [Read error: 104 (Connection reset by peer)]
<flux> it's sort of worrying that mldonkey (one of the few big ocaml-projects) has entries such as these in the changelog: compile with Ocaml 3.10.2.. Ocaml 3.11.0 compatible.. Support Ocaml 3.11.1..
<flux> does ocaml break the backwards compatibility every now and then :)
verte has quit ["~~~ Crash in JIT!"]
<Camarade_Tux> more in the CDK approach I think
<Camarade_Tux> a few months ago, it would try to make a local 3.10.2 install while 3.11 was working well
ygrek has quit [Remote closed the connection]
munga_ has quit [Read error: 113 (No route to host)]
pimm_ has quit ["Ik ga weg"]
Pimm has joined #ocaml
<gildor> flux: no, but mldonkey AFAIK check OCaml version and use pattern like case $OCAML_VERSION ... 3.11.1) ...;; 3.11.0) ...;; esac in its configure shell script
<flux> gildor, hm, there doesn't seem to be much point in that..
<gildor> flux: so whenever a new ocaml version is out, they need to add a new pattern
<flux> shells support wildcards :)
<gildor> shell support wildcard but not something like OCAML_VERSION >= 3.11.0
<flux> they support 3.11.*, though
<flux> and 3.1[1-9].* etc
<gildor> get in touch with spiralvoice to explain this
dmentre has joined #ocaml
<gildor> there is probably other tricks all around
kaustuv has joined #ocaml
<mehdid> maybe spiralvoice needs to perform some tests before saying that mldonkey compiles fine with some new version of ocaml
<mehdid> It should work ... but just in case ...
<mehdid> It forces me to patch it everytime (like in http://git.debian.org/?p=pkg-ocaml-maint/packages/mldonkey.git;a=blob;f=debian/patches/ocaml_3.11.1.dpatch) which is kind of useless :'(
<thelema> Does anyone have suggestions/tools for profiling allocation?
<gildor> ocamlviz ?
<gildor> it allows to follow GC state
jcaose has joined #ocaml
<thelema> I want to find out where in my program I'm allocating the most memory. My live memory after GC is fairly constant, but I've got too much churn
<thelema> at least I think I have too much churn - three of my top four functions in gprof are "caml_page_table_lookup", "caml_apply2" and "caml_modify"
<thelema> that said, my gprof is pretty flat, with those taking 7.3%, 5.6% and 4.8% of runtime respectively
<gildor> maybe using bytecode + OCAMLRUNPARAMS=v0x1FF ?
<gildor> maybe using bytecode + OCAMLRUNPARAMS=v=0x1FF ?
<thelema> oops, it's OCAMLRUNPARAM
<thelema> ok, now I get a *huge* amount of debug text...
<thelema> I guess it's my job to figure out what it means
<gildor> have you execution trace with this .
<gildor> ?
<thelema> I don't understand
<gildor> if you want to know where things get allocated, you need to know where you are in your code when a GC message appears
<gildor> execution trace = little message on stderr like "I am in function z"
<thelema> ah, turn on all my debug messages and correlate them with the GC messages
<thelema> ok
<gildor> exactly
bzzbzz has joined #ocaml
jules_ has joined #ocaml
<jules_> how do i compile lexers and parsers with ocamlbuild?
<thelema> jules_: ocamlbuild has rules built in to it to convert mll and mly into ml
<gildor> jules_: just use it, ocamlbuild will compile it as a dependency
<jules_> i tried ocamlbuild parser.byte ("Unboud type constructor expr") and ocamlbuild lexer.byte (Unboud constructor INT)
<gildor> e.g. if you have MyParser.mll
<gildor> (mll -> mly)
<gildor> be sure to have "open MyParser;;" in MainProgram.ml
zhijie1 has quit ["Leaving."]
<gildor> and ocamlbuild MainProgram.byte
<gildor> jules_: ocamlbuild parser.byte ("Unboud type constructor expr") -> this is a real error, you are missing a constructor
<gildor> where is "expr" defined ?
<jules_> perhaps but if i compile them manually first with ocamlyacc and then #load "parser.ml" it works
<jules_> in parser.mly
<gildor> #load don't take into account module, it is a textual include
<gildor> before the "#load" you must have defined "expr"
<jules_> this is my parser.mly: http://pastebin.ca/1674832
zhijie has quit [Read error: 54 (Connection reset by peer)]
<jules_> i first define type expr = ... at the top, is this wrong?
tmaeda is now known as tmaedaZ
<mfp> thelema: caml_page_table_lookup and caml_modify correspond to mutation (e.g. x := y, x.y <- z or x.(n) <- y), not allocation
<gildor> what is you lexer.mll ?
<gildor> thelema: are you running on 64bits system
<gildor> ?
<thelema> mfp: hmm... I've only one function that does any real mutation, and that's just prepending to a pair of int lists and updating a pair of ints.
<thelema> gildor: yes
<gildor> caml_modify is quite expensive on 64bits system
<gildor> (see mfp blog)
<thelema> this cost is paid for even int ref?
<thelema> and bool array?
<mfp> only if the function is polymorphic
<mfp> over a 'a ref or 'a array
<gildor> unfortunately yes, because In_heap is called before Is_block
<thelema> no, no polymorphism there.
<thelema> ok, time to functionalize my graph traversal
<mfp> the compiler won't generate the caml_modify call if the type is "immediate" (int, bool, char)
<thelema> I guess I should look at the asm...
<mfp> look for caml_modify callers
<mfp> also, callgrind might help
<thelema> just the one function for traversing my graph...
<jules_> i wrote a test file to test the parser and did ocamlbuild MainProgram.byte as you suggested, and the error "Unbound type constructor" remains as you said. where/how should i define the type expr to prevent this error?
<gildor> jules: copy/paste the full error to pastebin
<jules_> this error occurs when i run ocamlbuild test.byte, test.ml contains "open Parser"
<gildor> ok, usually I have a TotoTypes.ml containing "type expr = ..." and %{ ... open TotoTypes;; ... %} ... %type <TotoTypes.expr> expr1
<jules_> ok, i'll try that :)
ikaros has joined #ocaml
ikaros has quit [Read error: 54 (Connection reset by peer)]
<jules_> it works! thanks
noosimporta has joined #ocaml
noosimporta has left #ocaml []
r0bby is now known as r0bby|android_
r0bby|android_ is now known as r0bby|android__
r0bby|android__ is now known as r0bby
jcaose has quit [Read error: 113 (No route to host)]
jcaose has joined #ocaml
ikaros has joined #ocaml
kaustuv has quit ["ERC Version 5.3 (IRC client for Emacs)"]
<jules_> how many people here are using a different general purpose library, like extlib or batteries or core?
ua has quit [Read error: 113 (No route to host)]
<gildor> (source: popcon on debian) Vote for extlib: 136; core: 8; ocaml-batteries
<gildor> : 10
<flux> jules_, lately I've begun using extlib more often
<gildor> considering that core is widely used at Jane Street (should add 30 people at least)
<Camarade_Tux> but it's a bit biaised since extlib is waaaaayyyyyyyyyyyyyyyy older
<flux> and batteries mostly incorporates it anyway :) (by mostly I mean that it isn't just a copy of extlib)
tmaedaZ is now known as tmaeda
tmaeda is now known as tmaedaZ
th5 has quit []
dmentre has quit ["Leaving."]
tmaedaZ is now known as tmaeda
tmaeda is now known as tmaedaZ
ygrek has joined #ocaml
_unK has joined #ocaml
aburrido has left #ocaml []
jcaose has quit [Read error: 104 (Connection reset by peer)]
rovar has joined #ocaml
<rovar> I am trying to build lablgtk2, it build fine, but it makes .cma files. How do I convince it to create cmx or cmxa files?
<Camarade_Tux> tried "make opt"?
Pimm has quit [Read error: 104 (Connection reset by peer)]
<rovar> I'm not sure what that does, but it seems to have worked. Thanks.
<flux> rovar, it is a common convention to have target 'opt' for natively compiled (ocamlopt) binaries
<Camarade_Tux> :)
Pimm has joined #ocaml
<rovar> ah.. so that is the distinction, thakns
<Camarade_Tux> opt isn't available everywhere, I guess that's the reason "opt" isn't build by default
jules_ has quit [Read error: 110 (Connection timed out)]
_zack has quit ["Leaving."]
morse has quit [Remote closed the connection]
srcerer_ is now known as srcerer
jonafan_ is now known as jonafan
ttamttam has quit ["Leaving."]
slash_ has joined #ocaml
ikaros_ has joined #ocaml
ikaros has quit [Read error: 60 (Operation timed out)]
middayc has quit ["ChatZilla 0.9.85 [Firefox 3.0.15/2009101601]"]
middayc has joined #ocaml
ski_ has quit ["Lost terminal"]
Pimm has quit [Read error: 60 (Operation timed out)]
rwmjones is now known as rwmjones-afk
ttamttam has joined #ocaml
<ttamttam> gildor: ping
ulfdoz has joined #ocaml
zhijie has joined #ocaml
tvn2009 has quit [Remote closed the connection]
<thelema> hmm, ocamldoc needs to have access to the threads library to build the documentation (Mutex.t) - how to satisfy this with omake and ocamlfind
Amorphous has quit [Read error: 60 (Operation timed out)]
tvn2009 has joined #ocaml
Pimm has joined #ocaml
<mfp> thelema: -I +threads
<mfp> the quick hack, the right solution being...
* thelema is surprised that [-package threads] isn't doing this already, but ok
Yoric has quit []
<mfp> hmm you're right, -package should be adding -I already
* thelema doesn't care why it's broken at the moment
<thelema> I think omake is ready to take over as build tool for aaa
<mfp> aha, got it
<mfp> Effective set of compiler predicates: + ocamldoc.opt -I /usr/lib/ocaml
<thelema> ?
<mfp> also, ocamlfind query -i-format threads -> -I /usr/lib/ocaml
<mfp> something wrong in the META, I think
<thelema> nice. double-frown
<mfp> should be -I /usr/lib/ocaml/threads
<mfp> seems you have to use either threads.posix or threads.vm
<thelema> -package threads.posix?
<mfp> yes
<thelema> it works with -I +threads - I'm done.
<mfp> -package threads.posix is more portable
<thelema> where does -I +threads not work?
<mfp> -I +threads would fail on GODI, which uses a diff dir layout, I think
<thelema> any godi experts out there?
<thelema> ok, I'll change it.
Amorphous has joined #ocaml
<thelema> todo: put links to ocaml docs into aaa docs
<thelema> lots of docs fixes needed
Snark has joined #ocaml
<mfp> thelema: cross-refs to INRIA's stdlib docs?
<thelema> exactly. aaa's modules don't auto-include stdlib
Leonidas has joined #ocaml
<Leonidas> hi
<Leonidas> I just started with some ocaml and I wonder how to get out the value of a Some element.
<Leonidas> I saw that exlib seems to have a get function for that, but what does plain ocaml do?
<mattiase> Leonidas: use pattern-matching
<Leonidas> mattiase: ok, I see. thank you.
shiram has joined #ocaml
ua has joined #ocaml
_andre has quit ["*puff*"]
albacker has joined #ocaml
rovar has quit ["Page closed"]
rwmjones-afk is now known as rwmjones
rwmjones is now known as rwmjones-afk
Yoric[DT] has joined #ocaml
shiram has quit [Read error: 60 (Operation timed out)]
tvn2009 has quit [Remote closed the connection]
jules_ has joined #ocaml
sramsay_ has joined #ocaml
<orbitz> Alpounet: hahah
pimm_ has joined #ocaml
Pimm has quit [Read error: 104 (Connection reset by peer)]
pimm_ has quit [Client Quit]
Pimm has joined #ocaml
<mrvn> Alpounet: And a circular list is a snake biting its own tail.
* Camarade_Tux wonders what a list with several cycles would be... :P
<mrvn> Camarade_Tux: a circular tree
<mrvn> or Triee.
<Camarade_Tux> he, right ;-)
<mrvn> you could make a double linked list where this->next->prev != this
<Alpounet> mrvn, now find a graphical representation for that
<Alpounet> with animals, of course. Otherwise it ain't funny.
<mrvn> A snake with two fronts biting the body of other snakes.
Snark has quit ["Ex-Chat"]
<Alpounet> picture !
<gildor> ttamttam: pong
<mrvn> Alpounet: sorry, only have a live webcam.
<Alpounet> damn !
<ttamttam> Hello gildor. Are you still here?
<gildor> ttamttam: need to go for 15min, but ask your question
<ttamttam> It was just about the OCaml days.
<ttamttam> I spoke with my boss: if you are interested, I may have a place that could be not too expansive.
Pimm has quit [Read error: 104 (Connection reset by peer)]
Pimm has joined #ocaml
Pimm has quit [Read error: 60 (Operation timed out)]
albacker has quit ["Leaving"]
_zack has joined #ocaml
ulfdoz has quit ["reboot"]
Pimm has joined #ocaml
ulfdoz has joined #ocaml
schme has quit [Read error: 60 (Operation timed out)]
schme has joined #ocaml
ulfdoz has quit [Read error: 60 (Operation timed out)]
bzzbzz has quit ["Lost terminal"]
Pimm has quit [Read error: 54 (Connection reset by peer)]
ygrek has quit [Remote closed the connection]
Pimm has joined #ocaml
Associat0r has joined #ocaml
ttamttam has quit ["Leaving."]
_unK has quit [Remote closed the connection]
pimm_ has joined #ocaml
_zack has quit ["Leaving."]
pimm_ has quit [Client Quit]
Pimm has quit [Read error: 104 (Connection reset by peer)]
Associat0r has quit []
middayc_ has joined #ocaml
BigJ has quit [Read error: 131 (Connection reset by peer)]
slash_ has quit [Client Quit]
middayc has quit [Connection timed out]
middayc has joined #ocaml
yziquel has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
middayc_ has quit [Read error: 110 (Connection timed out)]
yziquel has quit [Client Quit]
onigiri has quit []
sramsay_ has quit ["Leaving"]
yziquel_ has joined #ocaml
<yziquel_> Storing a pointer in an abstract tag. Which is right? Field(result, 0) = (value) pointer [perl4caml]; or Field(result, 0) = (value) pointer; [ocaml-r] ?
<yziquel_> Sorry. Field(result,0) = Val_long(sexp); for ocaml-r.
<mrvn> Doesn't Val_long tag the value?
<Camarade_Tux> and is it portable?
<Camarade_Tux> like x64?
<yziquel_> #define Val_long(x) (((intnat)(x) << 1) + 1)
<mrvn> It will drop the top bit.
<yziquel_> OK. so (value) pointer...
<yziquel_> thanks.
<mrvn> That works. Not sure if there is a Val_pointer makro in case ocaml ever decied to tag pointers differently.
<mrvn> The pointer must be even or even p%4==0.