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
ftrvxmtrx_ has joined #ocaml
ftrvxmtrx has quit [Ping timeout: 246 seconds]
alfa_y_omega has joined #ocaml
<NaCl> ugh, in Normal-thread-ville, I would just signal the external thread to eat death
lopex has quit []
joewilliams is now known as joewilliams_away
<NaCl> adrien: oh ffs
<NaCl> I messed up the argument order
alfa_y_omega has quit [Ping timeout: 264 seconds]
alfa_y_omega has joined #ocaml
<hcarty> xstrp4 2.0alpha4 is up on oasis-db/odb now, including a module for compatibility with xstrp4 1.8
<hcarty> thelema: xstrp4 2.0a4 also has xstrp4.syntax.batteries_strings which allows for fun things like: let s = "Hello $name. The list is ${l, List.print Int.print}"
alfa_y_omega has quit [Ping timeout: 246 seconds]
sepp2k has quit [Remote host closed the connection]
alfa_y_omega has joined #ocaml
alfa_y_omega has quit [Ping timeout: 264 seconds]
alfa_y_omega has joined #ocaml
alfa_y_omega has quit [Ping timeout: 252 seconds]
stephanewustner has quit [Ping timeout: 240 seconds]
stephanewustner has joined #ocaml
alfa_y_omega has joined #ocaml
chrissbx has joined #ocaml
alfa_y_omega has quit [Ping timeout: 252 seconds]
alfa_y_omega has joined #ocaml
alfa_y_omega has quit [Ping timeout: 240 seconds]
alfa_y_omega has joined #ocaml
alfa_y_omega has quit [Ping timeout: 250 seconds]
alfa_y_omega has joined #ocaml
joewilliams_away is now known as joewilliams
dnolen has quit [Quit: dnolen]
<adrien> NaCl: that was it? :o
<adrien> hcarty: xstrp4 2 is your fork?
ulfdoz has joined #ocaml
ankit9 has joined #ocaml
joewilliams is now known as joewilliams_away
ulfdoz has quit [Ping timeout: 246 seconds]
ccasin has quit [Ping timeout: 258 seconds]
ccasin has joined #ocaml
Ptival has quit [Quit: Quat]
edwin has joined #ocaml
sebz has joined #ocaml
mcclurmc- has joined #ocaml
mcclurmc- has quit [Ping timeout: 260 seconds]
sebz has quit [Quit: Computer has gone to sleep.]
ttamttam has joined #ocaml
sebz has joined #ocaml
ankit9 has quit [Quit: Leaving]
junsuijin has quit [Quit: Leaving.]
Ptival has joined #ocaml
ftrvxmtrx_ has quit [Quit: This computer has gone to sleep]
eikke has joined #ocaml
<ttamttam> Hello,
<ttamttam> is there a simple way to inform Batteries about Camomile run-time directories, in order to make a portable app?
<ttamttam> (ocaml 3.11.2 & batteries 1.3.0)
<ttamttam> or shall I try the "lazy" patch found in "[Caml-list] Batteries and portability" thread
sebz has quit [Quit: Computer has gone to sleep.]
thomasga has joined #ocaml
larhat has joined #ocaml
blinky- has joined #ocaml
ftrvxmtrx has joined #ocaml
ftrvxmtrx has quit [Read error: Connection reset by peer]
ftrvxmtrx has joined #ocaml
<f[x]> ttamttam, what about env variables?
<gildor> ttamttam: I don't know which implementation of Camomile is used, but at least CamomileLibraryDyn, should allow you to use env variable (CAMOMILE_DIR)
<gildor> (and Yamagata made a mistake on my name in the header)
<gildor> f[x]: have you made benchmark on snappy ?
<f[x]> yes
<gildor> f[x]: what are the result ?
<gildor> is it good ?
<f[x]> I don't have the numbers at hand but I switched to it from lzo
<f[x]> iirc size is comparable but snappy is faster
<f[x]> also api is better
<gildor> I am considering it to compress temporary file, in order to increase IO bandwidth
<gildor> I have made some benchmarks with gzip but was not convinced, but snappy/lz4 seems much faster
<f[x]> of course, gzip is several times slower but compacts better, as expected
<gildor> do you think the "time" of compression can balance the time or writing/reading to a temporary file ?
<f[x]> yes
<gildor> interesting, thx, will do benchmarks
<f[x]> it may depend on the data, but usually it is a good win
ankit9 has joined #ocaml
<f[x]> i.e. I get 6x compression on mostly-text data
<eikke> gildor: compression does help on data transfer performance when dealing with disk/ssd devices, unless the data is completely uncompressable
<gildor> I will use it on sorted text data
<eikke> gildor: at least when using a suitable compression scheme like snappy (not gz/bz2/...)
<eikke> gildor: some SSD vendors integrate compression in their hardware devices as well, to provide higher throughput
<eikke> which can lead to surprising results when benchmarking :P
seafood has joined #ocaml
seafood has quit [Remote host closed the connection]
seafood has joined #ocaml
seafood has left #ocaml []
seafood has joined #ocaml
avsm has joined #ocaml
Amorphous has quit [Read error: Connection reset by peer]
lopex has joined #ocaml
Amorphous has joined #ocaml
alfa_y_omega has quit [Ping timeout: 252 seconds]
<ttamttam> gildor: I have no idea how to use CamomileLibraryDyn from batteries?
blinky- has quit [Quit: Quitte]
_andre has joined #ocaml
seafood has quit [Quit: seafood]
drake01 has joined #ocaml
drake01 has quit [Max SendQ exceeded]
<gildor> ttamttam: that is a question for thelema or hcarty
<ttamttam> gildor: merci
Guest12764 has joined #ocaml
Guest12764 has quit [Max SendQ exceeded]
<edwin> gildor: you can also try creating your tempfile on tmpfs, i.e. mounting your /tmp as tmpfs
<edwin> gildor: unless your tempfile is huge that should work, and should be faster than compressing/writing to disk
<adrien> or use aggressive mount options
<adrien> (ext4 in particular if you have many small files and create and delete lots of them)
larhat has quit [Quit: Leaving.]
larhat has joined #ocaml
dnolen has joined #ocaml
iratsu has joined #ocaml
<hcarty> adrien: Yes, xstrp4 is more fork of Gerd's original xstrp4 1.8
<hcarty> s/more/my/
<adrien> hcarty: is he already aware fo it?
<adrien> of*
<hcarty> adrien: I have sent a few emails, both before I started to ask him for some advice on how to start with my experiments and once I had something working to let him know about the state of my work
<adrien> ok, good, I would have hated to see two source packages at the same time
kaustuv has joined #ocaml
<hcarty> adrien: He provided me with some help to get started in hacking on xstrp4, but I haven't heard from him since then. He's been quite busy from what I understand, so it may be a while before I hear back.
drake01 has joined #ocaml
<hcarty> I agree - I'd rather have one true xstrp4 rather than the confusion of multiple
<hcarty> I'll continue to maintain my fork for now - I have found the changes to be quite useful in my code
<hcarty> Plus, I'd like to keep it odb-installable
<adrien> yeah, your changes are quite useful :-)
ankit9_ has joined #ocaml
<hcarty> The major things standing in the way of a proper beta release are: (a) fixing the reported location of errors (b) documentation (c) hearing back from Gerd
ankit9 has quit [Ping timeout: 255 seconds]
<adrien> (d) define a variable named "file" in a source code using xstrp4
<adrien> ;-)
<hcarty> adrien: That's possible as long as you don't use xstrp4.syntax.compat or xstrp4.syntax.syntax_here :-)
<kaustuv> In BatLazyList, why is the representation of 'a t exposed?
<ttamttam> hcarty: did you see my question of this morning?
<adrien> hcarty: well, and using syntax_here? :P
<hcarty> ttamttam: I'm not sure of the specifics. Batteries 1.3.0 introduced some support for this, but I think you need to use Camomile 0.8.1 or later.
<NaCl> adrien: yup. that was it.
<hcarty> ttamttam: thelema will be able to give a better answer. But Batteries may Just Work assuming you build against a new enough Camomile and set the appropriate environment variable(s).
<NaCl> adrien: this leads me to believe that these things need to be documented slightly differently
<NaCl> adrien: either that, or I need to read more slowly
<hcarty> adrien: Patches are welcome :-D I haven't used that beyond some basic testing, but my guess is that changing line 45 of http://0ok.org/cgit/cgit.cgi/xstrp4/tree/src/xstrp4_here.ml to ... "interpolate_file" ... rather than ... "interpolate"; "file" ... would do the trick
<ttamttam> hcarty: Camomile version is checked during batterie installation (I use the very last version of camomile I could. But I do not know how to instruct Batterie to use CamomileLibraryDyn?
* NaCl could look into that
<hcarty> ttamttam: I think Batteries does by default if Camomile 0.8.1 or later is used.
<adrien> hcarty: yeah, afaiu, it's mostly a leftover from a previous version of the syntax
<adrien> NaCl: that was argument order to what already?
<NaCl> eh?
<NaCl> I used kill signal pid
<ttamttam> hcarty: I set CAMOMILE_DIR in the env, but it is not taken into account.
<NaCl> it was supposed to be kill pid signal
<ttamttam> hcarty: oups. I mixed versions of two of my machines. I will try with the right one.
<adrien> NaCl: ah, ok, well, labels help a lot here
<hcarty> ttamttam: I can't provide much more help - to be honest, I'm waiting for Batteries 2.0 which will remove the Camomile dependency :-)
<adrien> and strace
<hcarty> ttamttam: But thelema should be able to provide you with some more information on how to accomplish this
<hcarty> ttamttam: Ah - it looks like you need Camomile 0.8.2 or later
<hcarty> Not 0.8.1 or later
<ttamttam> hcarty: you already helped! Thanks. I will ask when I have more up-to-date versions.
<hcarty> ttamttam: You're welcome, and good luck!
<kaustuv> I don't like the BatLazyList implementation. Instead of:
<kaustuv> type 'a node_t = Nil | Cons of 'a * 'a t and 'a t = 'a node_t lazy_t
<kaustuv> It ought to be:
<kaustuv> ... and 'a t = NIL | CONS of 'a * 'a t | LAZY of 'a node_t lazy_t
<kaustuv> so that the price of laziness is paid only when needed
fraggle_ has joined #ocaml
fraggle_ has quit [Read error: Connection reset by peer]
fraggle_ has joined #ocaml
<kaustuv> As another benefit of this representation, BatLazyList.of_list can just be Obj.magic.
<hcarty> kaustuv: As one who doesn't use BatLazyList, those seem like good ideas.
dnolen has quit [Quit: dnolen]
<kaustuv> All right, submitted a patch/pull request.
edwin has left #ocaml []
drake01 has quit [Quit: Ex-Chat]
kaustuv has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<eikke> is it possible to force the GC of an object at a given point in time?
<eikke> basically, say: I'm pretty sure this object won't be used anymore, could you please check and finalize it if so?
<hcarty> flux: I just got an email from Andrew Ross, one of the PLplot developers and the maintainer of the Debian packages. He is working on getting the 5.9.8 release ready for Debian, including the OCaml bindings.
<adrien> flux: run! hcarty is going to make sure you can't not use plplot this time :P
<adrien> eikke: Gc.compact
<eikke> adrien: that's a full GC cycle, I guess?
<adrien> eikke: implies everything else
<adrien> so, yes
<hcarty> adrien: Everyone ... must ... use ... PLplot
<adrien> I'm going to start the resistance!
<adrien> Graphics forever!
<NaCl> adrien: make a flam3-render implementation that draws the flames to the screen as they are rendered?
<adrien> and draws on graphics?
* adrien runs away
<adrien> s/g/G/
<NaCl> adrien: yes
<NaCl> draws on graphics
<NaCl> or plplot
<NaCl> yeah
<NaCl> wouldn't that be cool?
<adrien> SVG would be c00l3r
<NaCl> wat?
<NaCl> svg flames?
<adrien> with animations too (considering pretty much nothing handles these...)
<adrien> NaCl: yeah, to "save" space :P
<hcarty> adrien: It has been known for a while that PLplot's biggest fault is its lack of support for the Graphics module
<hcarty> I'm guessing that the two could be made to work together...
<hcarty> It may not be useful, but I'm sure it could be done!
<NaCl> adrien: uh. how would that even work?
<NaCl> adrien: do it!
<adrien> hcarty: actually I think that cairo/gtk is more valuable ;-)
<adrien> and I think there's some gtk<->graphics thing if needed ;-)
<hcarty> adrien: Cairo/Gtk is already supported, so clearly the next step should be using the Gtk <-> Graphics integration to complete this horrible oversight :-)
<hcarty> s/complete/correct/
<adrien> NaCl: I've already done SVG Animation from the progress of the Prim and Kruskal algorithms on a map of Paris (minimum spanning-tree) and I'm not doing it again because the only thing that could display that was a webkit-gtk compiled with support for svg animations
Modius has quit [Quit: "Object-oriented design" is an oxymoron]
<adrien> hcarty: actually it might be through some other library that this would work: plplot <-> gtk <-> lablgtk <-> X <-> Graphics
<NaCl> adrien: wat
<adrien> I'm pretty sure some library did that
<adrien> NaCl: or you meant the Graphics stuff?
<NaCl> svg animation
<adrien> there's no widespread SVG Animation reader currently (or 6 months ago), so avoid them ;-)
<NaCl> why not make one? :P
<adrien> your next project? :-)
lopex has quit []
<hcarty> librsvg and Cairo would give you a start. The result may not perform well.
<NaCl> wait.
<NaCl> what?
<NaCl> why would I want to do such a thing? that sounds like a disaster
<adrien> hcarty: I found rsvg to be pretty bad actually
<adrien> NaCl: who knows, it might work out well ;p
<adrien> ah, I remember: librsvg has a pluging for browsers and FF used to use it, slackware hopefully stopped building it (maybe because I would have mentionned it): FF's own renderer had gotten better (and I think librsvg's crashed on me when I might have complained)
<hcarty> adrien: I haven't used rsvg, but given how complex SVG appears to be that seems reasonable.
<adrien> but making a renderer which targets OpenVG (accelerated 2D graphics) would be fun too ;-)
<NaCl> would be fun?
<NaCl> try maddening
<NaCl> in ocaml, nonetheless?
<adrien> oh, you want to make ocaml bindings to openvg too? :P
<NaCl> I do?
<NaCl> why would I want to do such a thing that nobody would use?
<NaCl> and would be a massive, massive undertaking
<NaCl> even more massive than my thought about rewriting NM
<hcarty> Oh, and bindings for OpenCV too!
<NaCl> hcarty: now *that* makes more sense
<adrien> I hated its automated memory management which wasn't mentionned (oh, why does it crash? ah, it freed what I'm trying to free...)
<NaCl> adrien: uh, maybe I'll be able to do stuff with openCV
<NaCl> but
Ptival has quit [Quit: Leaving]
<NaCl> oh.
<NaCl> yes.
<NaCl> why would I want to do such a thing?
<adrien> ^ ^
<NaCl> why did I want to make this flam3 interface again?
<adrien> because it makes pretty pictures but my own version was in a bad state
<NaCl> openCV or the vector graphics acceleration thing?
<adrien> flamel ;-)
<NaCl> oh
<NaCl> I could actually have a reason to bind openCV to ocaml
<adrien> and, opencv, I'm actually surprised there aren't bindings yet
<NaCl> guess I'll contribute something to the world besides polkit and wicd
avsm has quit [Quit: Leaving.]
<NaCl> adrien: ok, yeah, I'll look into it.
<NaCl> adrien: wait, wouldn't these applications need to be multithreaded a lot of the time?
<adrien> and might be a good idea to ask on the caml-list
<adrien> NaCl: "these" applications? which ones?
<NaCl> CV stuff
ankit9_ has quit [Quit: Leaving]
<NaCl> asking the list about what?
<vext01> what is the easiest way to extend ocaml, ie calling c functions?
<NaCl> "extend"?
<vext01> cool
<NaCl> adrien: more fun: it has a ton of its own data types
<adrien> and don't forget cowboy to bind the wild functions! :P
<adrien> (disclaimer: only useful for big APIs without "surprises")
<adrien> NaCl: if you don't find anything about opencv and ocaml, ask on the caml-list, someone might have something on his/her hard drive
<NaCl> adrien: "surprises"?
<adrien> NaCl: differences in the API: it has to follow an easy logic
eikke has quit [Ping timeout: 252 seconds]
<NaCl> and the first three pages of google don't return anything
<NaCl> differences in the API?
<NaCl> like changes between versions?
<adrien> typically, for module X, functions will be foo(object_of_type_x, other parameter)
<adrien> if the first argument isn't always the "object" (like it is in glib for instance), it's going to be a nightmare
<NaCl> oh
<adrien> that's an "easy" one but there might be poorly chosen function prototypes everywhere
<NaCl> oh, ok.
<NaCl> I'll look into it
<NaCl> and poke the caml-list tonight maybe.
<NaCl> bbl
<adrien> in other words, cowboy helps you create a program and you can't expect a program to be intelligent and guess what to do
larhat has quit [Quit: Leaving.]
thomasga has quit [Quit: Leaving.]
ankit9 has joined #ocaml
nimred has quit [Ping timeout: 252 seconds]
nimred has joined #ocaml
nimred has quit [Changing host]
nimred has joined #ocaml
drake01 has joined #ocaml
caligula has joined #ocaml
joewilliams_away is now known as joewilliams
drake01 has quit [Ping timeout: 276 seconds]
Ptival has joined #ocaml
ulfdoz has joined #ocaml
junsuijin has joined #ocaml
ftrvxmtrx has quit [Quit: This computer has gone to sleep]
<sgnb> can someone knowledgeable in C bindings have a look at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=524908 (memory leak in cairo bindings)? looks pretty strange to me...
<hcarty> sgnb: It may not help with this specific bug, but Christophe Troestler wrote a separate Cairo binding. Part of the reason he state for doing this is the large number of memory management bugs in the existing binding.
<hcarty> s/state/stated/
<hcarty> Christophe Troestler's bindings also seem to be more complete in their API coverage.
tautologico has joined #ocaml
ztfw has joined #ocaml
ftrvxmtrx has joined #ocaml
<sgnb> hcarty: well... I don't use either myself, but there are other packages in Debian that depend on these (mlpost, ocamlviz)
ftrvxmtrx_ has joined #ocaml
avsm has joined #ocaml
ftrvxmtrx has quit [Ping timeout: 240 seconds]
ftrvxmtrx_ has quit [Read error: Connection reset by peer]
ftrvxmtrx_ has joined #ocaml
tautologico has quit [Quit: tautologico]
lopex has joined #ocaml
BiDOrD has joined #ocaml
BiDOrD_ has quit [Ping timeout: 258 seconds]
ygrek has joined #ocaml
drake01 has joined #ocaml
arubin has quit [Read error: Connection reset by peer]
arubin has joined #ocaml
<_habnabit> if I was trying to make several sets of functions which operate on some data, and the functions would all implement the same interface, what would be the easiest way of structuring the code so that I could swap sets of functions easily?
<adrien> functors?
<_habnabit> it seems like this is something that objects would be good for, but I have this feeling like functors would do it too.
<_habnabit> but I'm also not seeing how you'd do it with functors.
<_habnabit> like if you had a module Interface and two modules that included it called ImplA and ImplB, AFAIK you can't do something like `let x = ImplA.make in Interface.perform x`
<adrien> "module X = Interface(ImplA)", or am I missing something?
<_habnabit> no, like if I wanted to do something like `let x = if y then ImplA.make else ImplB.make in Interface.perform x`
Coueek has joined #ocaml
<_habnabit> it seems like it would be trivial to do with objects.
<adrien> I've never tried it on an actual example but "let module X = Intf(ImplA) in ..." seems to work
<_habnabit> I think we're talking past each other, but I'm not sure how to clarify what I want.
<adrien> I had misread a bit, if you want to be able to pass the result to a function or something like that, you might want to have a look at first-class modules in 3.12
<_habnabit> yeah, this is in 3.11.
ChristopheT has joined #ocaml
ChristopheT has left #ocaml []
trch has joined #ocaml
trch has left #ocaml []
ygrek has quit [Ping timeout: 250 seconds]
ulfdoz has quit [Ping timeout: 240 seconds]
_andre has quit [Quit: leaving]
<NaCl> adrien: hmmmm
ftrvxmtrx_ has quit [Read error: Connection reset by peer]
ftrvxmtrx has joined #ocaml
ftrvxmtrx has quit [Client Quit]
<adrien> fancy a barbecue? me too
<NaCl> yeah, srsly
<adrien> weather is crap around here however
<NaCl> awww
<adrien> note to everyone: summer in the netherlands is like autumn in other countries
<adrien> and as far as I know, winter, spring and autumn are correspondingly worse
<NaCl> sweet
<adrien> don't be fooled, expect awful summer and having to wear several layers during July and August
<NaCl> adrien: I'll ask about OpenCV tonight, see if anyone decides to chirp up
<NaCl> if not, then I'll just... MAKE IT FROM SCRATCH
<NaCl> *lightning strikes in the background*
<NaCl> MUAHAHAHAHAHA
<adrien> heheh :-)
ztfw has quit [Read error: Operation timed out]
ftrvxmtrx has joined #ocaml
caligula has quit [Remote host closed the connection]
caligula has joined #ocaml
hcarty has quit [Ping timeout: 240 seconds]
hcarty has joined #ocaml
<NaCl> adrien: although, you would think that if someone didi something with openCV and ocaml, they would have mentioned it
<adrien> not necessarily
<adrien> 5~5~need to go to bed, good night :-)
eikke has joined #ocaml
Cyanure has quit [Remote host closed the connection]
<hcarty> _habnabit: The example you gave should work just fine
<_habnabit> oh, really?
<hcarty> let x = if y then ImplA.make else ImplB.make in Interface.perform x --> as long as ImplA.make and ImplB.make have the same type
<_habnabit> if it's Interface.t ?
<hcarty> Should work
<hcarty> Functions can be passed around as values
drake01 has quit [Quit: Ex-Chat]
dgfitch has joined #ocaml
drake01 has joined #ocaml
drake01 has quit [Read error: Connection reset by peer]
drake01 has joined #ocaml
drake01 has quit [Client Quit]
drake01 has joined #ocaml
Ptival has quit [Read error: Connection reset by peer]
drake01 has quit [Quit: Ex-Chat]
drake01 has joined #ocaml
joewilliams is now known as joewilliams_away
drake01 has quit [Ping timeout: 240 seconds]
eikke has quit [Read error: Operation timed out]
dnolen has joined #ocaml
drake01 has joined #ocaml
goncalo has quit [Ping timeout: 276 seconds]
jonathandav has quit [Ping timeout: 240 seconds]
jonathandav has joined #ocaml
goncalo has joined #ocaml
Coueek has quit [Quit: Quitte]
drake01 has quit [Quit: Ex-Chat]
groovy2shoes has joined #ocaml