gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.1 http://bit.ly/nNVIVH
tac-tics[home] has joined #ocaml
Progster has quit [Ping timeout: 255 seconds]
Progster has joined #ocaml
maufred__ has quit [Ping timeout: 245 seconds]
maufred_1 has quit [Ping timeout: 252 seconds]
maufred has joined #ocaml
maufred_ has joined #ocaml
madroach has quit [Ping timeout: 265 seconds]
hongboz has joined #ocaml
hongboz has quit [Ping timeout: 240 seconds]
tbrady has quit [Quit: tbrady]
asmanur_ has joined #ocaml
asmanur has quit [Ping timeout: 248 seconds]
asmanur has joined #ocaml
asmanur_ has quit [Ping timeout: 264 seconds]
lusory has quit [Ping timeout: 264 seconds]
hto has quit [Ping timeout: 264 seconds]
chambart has quit [Ping timeout: 264 seconds]
mal`` has quit [Ping timeout: 264 seconds]
hto has joined #ocaml
mal`` has joined #ocaml
_habnabit has quit [Excess Flood]
habnabit has joined #ocaml
chambart has joined #ocaml
lusory has joined #ocaml
habnabit has quit [Changing host]
habnabit has joined #ocaml
tbrady has joined #ocaml
habnabit is now known as _habnabit
Progster has quit [Ping timeout: 252 seconds]
ankit9_ has joined #ocaml
bitbckt has quit [K-Lined]
bitbckt has joined #ocaml
emmanuelux has quit [Quit: emmanuelux]
tbrady has quit [Quit: tbrady]
sepp2k has joined #ocaml
ankit9_ has quit [Ping timeout: 264 seconds]
rejabber has joined #ocaml
<rejabber> how do I use camlp4 to write the AST of a .ml file to another file?
cdidd has joined #ocaml
ulfdoz has joined #ocaml
zorun has quit [Ping timeout: 276 seconds]
<adrien> I think there's "-o"
ftrvxmtrx has quit [Quit: Leaving]
Cyanure has joined #ocaml
ulfdoz has quit [Ping timeout: 240 seconds]
ankit9_ has joined #ocaml
pango is now known as pangoafk
eni has joined #ocaml
djcoin has joined #ocaml
Cyanure has quit [Remote host closed the connection]
<adrien> I'm wondering something with ocamlfind:
<adrien> archive(byte) = "gtkInit.cmo"
<adrien> archive(toploop,byte,mt) = "gtkThInit.cmo"
<adrien> that's from a META
<adrien> ah, no, nothing =)
<adrien> since it's '=' and not '+=', the last one will take over
eni has quit [Ping timeout: 240 seconds]
<adrien> well, no: if I change the order, it still "works" in the toplevel: it loads gtkThInit
<adrien> otoh, I think "mt" is special here
<adrien> but should not change that
<adrien> man META:
<adrien> · If there is more than one applicable assignment, the definition
<adrien> with the biggest number of formal predicates is selected.
<adrien> (and then, in case of a tie, it choses the most-recently defined one)
ankit9_ has quit [Quit: Leaving]
ftrvxmtrx has joined #ocaml
eni has joined #ocaml
Cyanure has joined #ocaml
Cyanure has quit [Ping timeout: 245 seconds]
<adrien> big question: who knew about "GtkThInit"?
<adrien> who knows how to properly initialize thread support with lablgtk2?
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
<adrien> (you get a beer if you say you know how to [ and you actually do ]; I'm simply estimating potential breakage for the next release of lablgtk2)
ocp has joined #ocaml
thomasga has joined #ocaml
* f[x] was always using gtkInit.cmo, but never had multithreaded gui so that probably doesn't matter
thomasga has quit [Client Quit]
thomasga has joined #ocaml
<adrien> well, that counts
<adrien> I think noone knows how to do it
<adrien> and can someone pastebin the META file for lablgtk2 in debian?
<adrien> thanks
<f[x]> http://anonscm.debian.org/gitweb/?p=pkg-ocaml-maint/packages/lablgtk2.git;a=blob;f=debian/META;hb=HEAD
<adrien> oh, joy: it doesn't auto-init threads :-)
<adrien> I feared people relied on that
Tobu has quit [Read error: Connection reset by peer]
eni has quit [Ping timeout: 252 seconds]
silver has joined #ocaml
avsm has joined #ocaml
madroach has joined #ocaml
Submarine has quit [Ping timeout: 248 seconds]
avsm has quit [Ping timeout: 245 seconds]
<rejabber> is there a function: string -> ('a, 'b, 'c, 'd, 'e, 'f) format6 ?
<yezariaely> rejabber: what do you need it for?
<yezariaely> scanf?
<rejabber> I want to append a string to a format string
<sgnb> rejabber: Scanf.format_from_string, to be more precise
<sgnb> ah, for that there is a function
<sgnb> (^^)
<sgnb> rejabber: e.g. "toto %s " ^^ "tata"
<rejabber> it seems to only work with string literals though
<madroach> I tried that too a few days ago. Seems like the format string is compiled at compile time?
<sgnb> Printf.printf ("toto %s " ^^ "tata") "foo" works for me
<sgnb> madroach: yes it is
<madroach> oh, a double carret?
<sgnb> es
<sgnb> yes
<madroach> concatenates format strings?
<sgnb> yes
<madroach> nice.
<sgnb> but in general, to "convert" a string to a format6 safely, you have to give another format6 with the same type (hence the extra argument to Scanf.format_from_string)
<rejabber> I see
<madroach> What is the best way to write multi-line printf format strings? Concatenate lines with (^^) ?
<sgnb> madroach: this is an actual function call... I would prefer http://paste.debian.net/180428/ instead
BiDOrD has quit [Read error: Operation timed out]
<madroach> ah, whitespace after a quoted newline is ignored?
BiDOrD has joined #ocaml
<sgnb> indeed... but you can add a backslash to resume whitespace processing
<madroach> that's very nice. Thanks alot!
beckerb has joined #ocaml
sgnb has quit [Remote host closed the connection]
sgnb has joined #ocaml
thomasga1 has joined #ocaml
thomasga has quit [Read error: Connection reset by peer]
<adrien> hah, and I was wrong: lablgtk thread init stuff from a .cmo is only for the toplevel
thomasga1 has quit [Read error: Connection reset by peer]
thomasga has joined #ocaml
Submarine has joined #ocaml
avsm has joined #ocaml
ocp has quit [Quit: Leaving.]
chambart has quit [Ping timeout: 252 seconds]
thomasga has quit [Ping timeout: 245 seconds]
mika1 has joined #ocaml
avsm has quit [Quit: Leaving.]
<Drakken> Somebody told me it's too late to make minor changes to ocaml 4.00.
thomasga has joined #ocaml
<Drakken> Does that mean they have to wait until 4.00.1 is in development?
<Drakken> or 4.01 or whatever?
<sgnb> Drakken: I dourn say 4.00.1 if it is really minor
<sgnb> s/dourn/would/ (kbd sync)
<Drakken> sgnb can we do that now, or do we have to wait until a development branch is started for the next version?
<sgnb> Drakken: who is "we"?
<Drakken> any devs who want to contribute
<sgnb> it's up to "OCaml developpers" (whatever that means) to decide
<sgnb> I don't understand why you care
<Drakken> I submitted a change for 3.12.1, but the dev said it's too late to put it in 4.00.
<sgnb> yeah, they tend to that
<sgnb> just remind them at the next beta (if it is still not applied)
munga has joined #ocaml
<sgnb> I mean, the beta (or whatever prerelease) of 4.00.1
<Drakken> okay.
<sgnb> or, if the change is too intrusive, wait for 4.01 (I have no idea what you're talking about, so I'm speculating... out of curiosity, what is it?)
<Drakken> It's a minor tweak to locate type errors more precisely.
<sgnb> ah, I've seen that... http://caml.inria.fr/mantis/view.php?id=5697 ?
<sgnb> then, it will be part of 4.01.0
<Drakken> good :)
<sgnb> it's unlikely that it will be part of 4.00.1
Submarine has quit [Ping timeout: 240 seconds]
Fnar has joined #ocaml
Fnar has quit [Changing host]
Fnar has joined #ocaml
chambart has joined #ocaml
_andre has joined #ocaml
mcclurmc has joined #ocaml
silver has quit [Remote host closed the connection]
ocp has joined #ocaml
<Ptival> well, it's in the trunk, so it will likely be applied to the next one, whatever that is
tac-tics[home] has quit [Ping timeout: 252 seconds]
<Ptival> it's just that 4.00 has already had more than its fair share of late updates
<adrien> yeah, 4.00 is very close afaik
<rejabber> is there an equivalent of haskell's 'where' clause in ocaml?
avsm has joined #ocaml
<adrien> rejabber: no; it was in caml light but has been dropped
willb has quit [Ping timeout: 244 seconds]
<Ptival> very close indeed
<Drakken> rejabber revised syntax in camlp4 supports where clauses with a single binding
willb has joined #ocaml
silver has joined #ocaml
munga has quit [Ping timeout: 248 seconds]
chambart has quit [Read error: Operation timed out]
chambart has joined #ocaml
avsm has quit [Read error: Connection reset by peer]
avsm1 has joined #ocaml
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
avsm1 has quit [Quit: Leaving.]
ankit9_ has joined #ocaml
Progster has joined #ocaml
ontologiae has joined #ocaml
<ontologiae> hi all
munga has joined #ocaml
<adrien> bwah, making a graph of dependencies in lablgtk gives very ugly things ;p
Submarine has quit [Ping timeout: 248 seconds]
sepp2k1 has joined #ocaml
sepp2k has quit [Ping timeout: 264 seconds]
gnuvince has quit [Ping timeout: 252 seconds]
avsm has joined #ocaml
K_F has quit [Ping timeout: 240 seconds]
K_F has joined #ocaml
ocp has quit [Quit: Leaving.]
Submarine has joined #ocaml
Submarine has quit [Remote host closed the connection]
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
smondet has joined #ocaml
gnuvince has joined #ocaml
K_F has quit [Ping timeout: 240 seconds]
K_F has joined #ocaml
fraggle_ has quit [Ping timeout: 240 seconds]
beginner has joined #ocaml
<beginner> how can i make a fold over a set?
<thelema> beginner: Set.fold
<beginner> i tried fold_left, my mistake, thank
<beginner> s
<thelema> n/p
<beginner> i tried also Set.for_all
<thelema> what's wrong with Set.for_all?
<beginner> i get an unbound value error
<thelema> I assume you've used Set.Make to make your set module; what did you call it?
<beginner> Declarations
<thelema> Declarations.for_all is unbound?
<beginner> i should read more carefully, it was created with Map.Make
K_F has quit [Ping timeout: 240 seconds]
<thelema> ah, Map doesn't have a for_all in the stdlib
K_F has joined #ocaml
<thelema> err, it doesn't have one before OCaml 3.12; this was recently added.
<beginner> is that wrong?
<thelema> no, that page isn't wrong; what version of OCaml are you using?
<beginner> i use ocaml 3.12
<thelema> 3.12.0? 3.12.1?
<beginner> 3.12.1
<thelema> ok, then you should have a for_all function in the result of Map.Make
<beginner> how do i call the function with Map.Make.for_all or just Make.for_all?
ankit9_ has quit [Quit: Leaving]
<thelema> beginner: neither
<thelema> module MyMap = Map.Make(struct type t = string let compare = compare end)
<thelema> MyMap.for_all (fun k v -> v = "") MyMap.empty
caligula has quit [Read error: Operation timed out]
caligula has joined #ocaml
<adrien> I'm looking for a tool to draw unidirected graphs/trees, any idea?
<adrien> dot/graphviz is out since the tools do: 1- directed graphs, 2- undirected graphs
<adrien> (and some layouts)
<adrien> and aren't good on trees
<thelema> adrien: you sure? there's a number of layout algorithms, I'd expect at least one to be good for trees
<adrien> I'm drawing dependencies between ocaml modules (which cannot have cycles) and the tools in graphviz fail hard
<thelema> adrien: also, look at rank=same for making sure that nodes line up
<adrien> thelema: right, but it's a lot of juggling around with options and the results are never perfect (I remember doing that)
<adrien> yeah, it's still not meant for trees where you often get several items "at the same level"
<adrien> 9MB png file, yummy
<f[x]> adrien, can you share the dot file?
<adrien> sure, I can also share the script that generated it (if you have lablgtk sourecs on disk, although anything else would work)
<f[x]> and iirc ocamldoc lso does somethign like that, doesn't it?
<adrien> graph? I've never seen one in ocamldoc
<adrien> ok, yeah, it can output dot
<f[x]> ocamldoc -dot
<adrien> and png...
<adrien> 4.2MB
<adrien> (I love optipng)
<thelema> adrien: you're right that the graph is quite terrible
<thelema> let's see what can be done by adding rank=same lines
<adrien> thelema: that is with rank=same ;-)
<adrien> dot graph.dot -Tpng -Granksep=1 -Grank=same -ograph.png
thomasga has quit [Read error: Connection reset by peer]
<f[x]> adrien, you probably want to get rid of transitive arrows
<f[x]> otherwise it will be a mess no matter what
Submarine has quit [Ping timeout: 248 seconds]
<adrien> f[x]: but the issue is more than just arrows anyway
<f[x]> how so?
<mehdid> f[x]: is dot capable of removing transitive arrows by itself?
<f[x]> I think no
<mehdid> thanks, that's what I thought too.
<f[x]> that's an enormous amount of edges - make the life simpler for dot and for the reader
<thelema> tred does this automatically
<thelema> (a tool with graphviz)
<adrien> f[x]: well, if several elements have the same deps, ideally, they should be grouped very closely in a grid layout
<adrien> but graphviz will never do a grid
<thelema> drops the number of edges to about 1/3
<adrien> but my edges have directions
<adrien> I can drop them all or none
thomasga has joined #ocaml
<thelema> here's the graph after tred culls extra edges: http://tinypic.com/r/2cqhd02/6
<thelema> it's still a rat's nest, but it's orders of magnitude better
<f[x]> after tred it is quite digestible
<adrien> true
<f[x]> mehdid, seen? there is tred in graphviz. useful tool as it appears
<thelema> if I can get the nodes to not overlap so much, neato might produce a better layout
<mehdid> f[x]: yeah :) thanks to thelema :)
<f[x]> -Goverlap=false
<f[x]> dot looks better for me
<adrien> yeah, it's often a good one
<thelema> ok, I give up trying to beat dot with default params
<adrien> :P
<thelema> props to f[x] for the transitive reduction suggestion
<adrien> yeah, definitely a good one I didn't know about
<adrien> still, I think something better can be obtained, especially with something that doesn't try to get cute edges
Submarine has joined #ocaml
<f[x]> I doubt so
<f[x]> also have a look at -Gsplines
<adrien> -Gsplines=false helps a bit but well
<thelema> adrien: try gephi - maybe it'll help you manually adjust things to your liking
<adrien> there's "igraph" but I have no package for it so I'll try at home
<adrien> not like I've actively been working for work (not really my fault though)
<adrien> thelema: I'll try it too
mika1 has quit [Quit: Leaving.]
wmeyer` has joined #ocaml
wmeyer has quit [Ping timeout: 260 seconds]
pheredhel has quit [Ping timeout: 252 seconds]
bacam has quit [Ping timeout: 252 seconds]
pheredhel has joined #ocaml
bacam has joined #ocaml
braibant has joined #ocaml
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
braibant has quit [Read error: Connection reset by peer]
<Drakken> Anybody have a project for me to work on? I'm looking for something to do.
<Drakken> I could work on Mantis issues, but I'm not sure how to sort them by interestingness :)
<Drakken> and doable-by-me-ness, of course.
<thelema> Drakken: if you're interested, you could hack odb.ml to build a proper dep graph, and produce an ordered list of packages to install
<Drakken> okay, I'll check it out.
<thelema> this has been on my todo list for a while, and would be a nice addition
ftrvxmtrx has quit [Quit: Leaving]
<thelema> at the moment, odb just checks all deps right before installing a package, so --force-all can result in packages being re-installed multiple times
avsm has quit [Quit: Leaving.]
<Drakken> Let me browse odb.ml for a while. I haven't looked at it recently.
<thelema> let me know if you need any help, or are confused about how something works
<Drakken> alright
osa1 has joined #ocaml
silver has quit [Remote host closed the connection]
avsm has joined #ocaml
Submarine has quit [Ping timeout: 240 seconds]
Cyanure has joined #ocaml
ontologiae has quit [Read error: Connection reset by peer]
ontologiae has joined #ocaml
beckerb has quit [Quit: Konversation terminated!]
Tobu has joined #ocaml
djcoin has quit [Quit: WeeChat 0.3.2]
madroach has quit [Quit: leaving]
madroach has joined #ocaml
ocp has joined #ocaml
avsm has quit [Quit: Leaving.]
Tobu has quit [Remote host closed the connection]
thomasga has quit [Remote host closed the connection]
thomasga has joined #ocaml
thomasga has quit [Client Quit]
milosn has quit [Read error: No route to host]
xcombelle has joined #ocaml
Tobu has joined #ocaml
milosn has joined #ocaml
ftrvxmtrx has joined #ocaml
osa1 has quit [*.net *.split]
beginner has quit [*.net *.split]
smondet has quit [*.net *.split]
cdidd has quit [*.net *.split]
wagle has quit [*.net *.split]
sivoais has quit [*.net *.split]
smondet has joined #ocaml
beginner has joined #ocaml
cdidd has joined #ocaml
wagle has joined #ocaml
sivoais has joined #ocaml
osa1 has joined #ocaml
beginner has quit [Excess Flood]
<ousado> is there a way for a module to pass itself as first-class module to a function?
<ousado> or do I always need a helper module for that?
ontologiae has quit [Ping timeout: 248 seconds]
<bobry> anyone tried odb with OCaml 4.00? I'm having some weird Toploop error
<bobry> File "/Users/superbobry/.homebrew/lib/ocaml/topfind", line 16, characters 12-41: Error: Unbound module Toploop
<thelema> bobry: it works for hcarty with his ocamlbrew script downloading and building 4.00
<thelema> unbound module toploop looks like you need to upgrade your findlib
<thelema> I think 1.3.3 has the necessary changes to support 4.00 correctly
<bobry> I think I already have the latest findlib
<bobry> $ ocamlfind list | grep findlib
<bobry> findlib (version: 1.3.3)
<thelema> that should be the latest...
<thelema> is there another topfind script on your system? (i.e. is it possible you're using an old topfind?)
<bobry> hm, probably I've forgotten to re-compile findlib after updating to 4.00
<bobry> yup, that was the case, sorry :)
munga has quit [Ping timeout: 248 seconds]
<Drakken> Holy Mother of Tcl! Why is there so much string processing in odb?
nicoo has joined #ocaml
Yoric has joined #ocaml
mcclurmc is now known as mcclurmc_away
bzzbzz has joined #ocaml
pangoafk is now known as pango
munga has joined #ocaml
Yoric has quit [Ping timeout: 245 seconds]
braibant1 has joined #ocaml
<thelema> Drakken: because it interacts with the command line a lot.
<thelema> Drakken: also, because I'm not interested in building many extra layers into odb to protect the code that actually does work from the string processing.
munga has quit [Ping timeout: 248 seconds]
<adrien> am I the only one who received a caml-list mail asking to validate a message?
<hcarty> adrien: I got the same thing
<bacam> adrien: I got it too. Just delete it.
xcombelle has quit [Quit: I am a manual virus, please copy me to your quit message.]
<adrien> bacam: yeah, did, but makes me wonder how sympa behaves
bzzbzz has quit [Ping timeout: 248 seconds]
Anarchos has joined #ocaml
Anarchos has quit [Quit: must go back to family....]
sepp2k1 has quit [Remote host closed the connection]
Anarchos has joined #ocaml
sivoais_ has joined #ocaml
Cyanure has quit [Remote host closed the connection]
sivoais has quit [Remote host closed the connection]
seanmcl_ has joined #ocaml
sivoais_ has quit [Client Quit]
sivoais has joined #ocaml
seanmcl_ has quit [Client Quit]
mcclurmc_away is now known as mcclurmc
sivoais has quit [Quit: leaving]
sivoais has joined #ocaml
_andre has quit [Quit: leaving]
<hcarty> thelema: I never followed up yesterday, but I've done a fair amount with odb since then and haven't had any trouble yet.
<hcarty> thelema: Thanks again for getting those fixes in so quickly.
<thelema> hcarty: thank you for helping me test
iago has joined #ocaml
ocp has quit [Quit: Leaving.]
Anarchos has quit [Quit: watching Tarkovsky'Solaris movie]
<ousado> is there a way for a module to pass itself as first-class module to a function or do I always need a helper module for that?
<ousado> it seems that another module is required, but the documentation is a little scarce
<adrien> why are you trying to do that?
osa1 has quit [Ping timeout: 264 seconds]
<ousado> adrien: I'm loading it as plugin using dynload
<ousado> and I'd like to have it register itself, but it's also no problem to put the code doing that in another file
smondet has quit [Quit: Leaving]
<adrien> well, there are several things to consider imho:
<adrien> 1- relying on module evaluation to register plugins doesn't give a lot of control, flexbility or visibility
<adrien> 2- the module probably has to register itself in a shared data structure anyway
<adrien> and, hmm, no, forget about that one, I need to sleep
<ousado> adrien: what's the alternative to 1?
<ousado> since according to the dynlink docs "No facilities are provided to access value names defined by the unit."
<ousado> ... and "Therefore, the unit must register itself its entry points with the main program, e.g. by modifying tables of functions."
<thelema> ousado: put your code in a submodule and register that submodule outside it in the main dynloaded module
<thelema> there's no facility for a module defined as a file to get a handle to itself
<ousado> I see. I've been reading something about recursive modules but I wasn't sure if that's applicable here
<thelema> no way for a file module to be recursive
<ousado> thanks.
<bobry> is there a helper for creating releases in oasis? something like 'cabal dist'
<thelema> bobry: tar -zcf
ontologiae has joined #ocaml
<bobry> hah, yeah, this always works :)
fraggle_ has joined #ocaml
mcclurmc is now known as mcclurmc_away
braibant1 has quit [Quit: Leaving.]
mcclurmc_away is now known as mcclurmc
mcclurmc is now known as mcclurmc_away
henux has joined #ocaml
<henux> OCaml is sexy
<henux> like it
<_habnabit> i'm sexy
<henux> i like you too
ontologiae has quit [Ping timeout: 244 seconds]
<orbitz> whee
gnuvince has quit [Ping timeout: 248 seconds]
henux has quit [Ping timeout: 264 seconds]
<orbitz> Any Jane St Async peeps here? Looking for how to run a command in it
henux has joined #ocaml
henux is now known as Guest85212