adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | Current MOOC: https://huit.re/ocamlmooc | OCaml 4.04.0 release notes: http://ocaml.org/releases/4.04.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
ncthom91 has joined #ocaml
maxirater has joined #ocaml
ncthom91 has quit [Quit: Textual IRC Client: www.textualapp.com]
strykerkkd has quit [Quit: Leaving]
jabroney has quit [Quit: Leaving.]
average_ has quit [Ping timeout: 245 seconds]
cbot has joined #ocaml
j_king has joined #ocaml
mengu has quit [Remote host closed the connection]
mfp has quit [Ping timeout: 245 seconds]
maxirater has quit [Quit: Leaving]
pilne has quit [Quit: Quitting!]
AndChat504 has joined #ocaml
AndChat|504 has quit [Ping timeout: 240 seconds]
govg has quit [Ping timeout: 258 seconds]
spew has joined #ocaml
infinity0 has joined #ocaml
MercurialAlchemi has joined #ocaml
govg has joined #ocaml
AndChat504 has quit [Ping timeout: 240 seconds]
ryanartecona has joined #ocaml
govg has quit [Ping timeout: 260 seconds]
govg has joined #ocaml
razwelles has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 260 seconds]
<razwelles> Is there an advantage to running ocaml for bioinformatics like, say, metabolic pathways, as opposed to haskell?
mengu has joined #ocaml
spew has quit [Quit: foobar]
cheater2 has quit [Quit: leaving]
segmond has quit [Quit: l8r]
psacrifice has joined #ocaml
toolslive has quit [Remote host closed the connection]
Simn has joined #ocaml
govg has quit [Ping timeout: 260 seconds]
MercurialAlchemi has joined #ocaml
mengu has quit [Remote host closed the connection]
ryanartecona has quit [Quit: ryanartecona]
govg has joined #ocaml
ryanartecona has joined #ocaml
freusque has joined #ocaml
alfredo has joined #ocaml
<companion_cube> some people do use OCaml for that, I think
<companion_cube> as for why, both are good languages
orbifx has joined #ocaml
ollehar has joined #ocaml
dmi3y has joined #ocaml
mengu has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
mengu has quit [Ping timeout: 240 seconds]
Fistine has quit [Ping timeout: 240 seconds]
ollehar has quit [Ping timeout: 260 seconds]
tobiasBora has quit [Ping timeout: 240 seconds]
_y has quit [Ping timeout: 260 seconds]
freusque has quit [Quit: WeeChat 1.7]
tobiasBora has joined #ocaml
_y has joined #ocaml
freusque has joined #ocaml
Fistine has joined #ocaml
<reynir> _y: what's in your .ocamlinit or whatever?
orbifx has quit [Ping timeout: 260 seconds]
xmonader2 has joined #ocaml
TheLemonMan has joined #ocaml
xmonader has quit [Ping timeout: 252 seconds]
zpe has joined #ocaml
AltGr has joined #ocaml
tennix has joined #ocaml
ryanartecona has joined #ocaml
tennix has quit [Client Quit]
govg has quit [Ping timeout: 240 seconds]
dmi3y has quit [Quit: dmi3y]
dmi3y has joined #ocaml
argent_smith has joined #ocaml
ryanartecona has quit [Ping timeout: 260 seconds]
govg has joined #ocaml
MK__ has joined #ocaml
ski has quit [Ping timeout: 240 seconds]
psacrifice has quit [Remote host closed the connection]
ski has joined #ocaml
cdidd has joined #ocaml
ryanartecona has joined #ocaml
mfp has joined #ocaml
psacrifice has joined #ocaml
kakadu has joined #ocaml
ryanartecona has quit [Ping timeout: 240 seconds]
AltGr has quit [Remote host closed the connection]
psacrifice has quit [Ping timeout: 240 seconds]
govg has quit [Ping timeout: 240 seconds]
psacrifice has joined #ocaml
<_y> reynir, i don’t have time to investigate now, but here is my .ocamlinit http://paste.awesom.eu/Zwq1&ln
dmi3y has quit [Quit: dmi3y]
govg has joined #ocaml
cbot has quit [Quit: Leaving]
g0d355__ has joined #ocaml
ryanartecona has joined #ocaml
sepp2k has joined #ocaml
ryanartecona has quit [Ping timeout: 260 seconds]
AltGr has joined #ocaml
govg has quit [Ping timeout: 268 seconds]
dmi3y has joined #ocaml
mengu has joined #ocaml
cdidd_ has joined #ocaml
cdidd has quit [Ping timeout: 255 seconds]
orbifx-m has joined #ocaml
<orbifx-m> if match expressions can match exceptions too, will _ match any exception too?
<reynir> No, you match on exceptions with »match ... with ... | exception PATTERN -> ...«
<reynir> try e.g.: match failwith "test" with _ -> 1 | exception _ -> 2;;
psacrifice has quit [Remote host closed the connection]
ryanartecona has joined #ocaml
dmi3y has quit [Quit: dmi3y]
ryanartecona has quit [Ping timeout: 240 seconds]
_y has quit [Ping timeout: 252 seconds]
tobiasBora has quit [Ping timeout: 252 seconds]
_y has joined #ocaml
Fistine has quit [Ping timeout: 255 seconds]
Fistine has joined #ocaml
tobiasBora has joined #ocaml
vincenzoml has joined #ocaml
<vincenzoml> hi there
<vincenzoml> I have been using ocaml for years, but seldomly implemented algorithms. Now I'm implementing Tarjan's algorithm for strongly connected components and it's really hard for me to get rid of the non-tail-recursive behaviour. I had been following the pseudocode from wikipedia https://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm#The_algorithm_in_pseudocode
maxirater has joined #ocaml
<vincenzoml> I tried to use continuations as typically advised. But it's problematic to do it right, as the recursive call is inside a for statement, that, in my case, is actually a function calling a function (an "iterator" if you wish) called, in fact "iter_post", that is used throughout the project to abstract from the specific implementation of a graph.
<vincenzoml> And even if I would get this right, which I doubt, I also am concerned that calling a series of closures would not be as efficient as a sequence of functions separated by ';'
<vincenzoml> any advice?
<Drup> Sometimes, the simplest way is also the right one: use your own stack. ;)
<companion_cube> or continuations
<vincenzoml> yes, I am trying to do that, but ... I thought I could put on the stack just the (only) function argument
<companion_cube> ah in this case, it's better with an explicit stack though
<vincenzoml> but that seems not sufficient: I need to execute code "after" the call (that's the whole point) but in order to do the "call" at the right point, I can push the argument on the stack and then restart my iteration
<vincenzoml> and there's no "after". Seems like I have to encode a state machine
<orbifx-m> thanks reynir
<vincenzoml> companion_cube: great! I see that I need also a flag on the stack ("enter","exit" in the example)
<vincenzoml> this must be standard theory of interpreters that I have forgotten
<companion_cube> it's the state machine you were talking about ^^
segmond has joined #ocaml
<vincenzoml> yes, clearly! :) thanks. And `Exit(v,cell) takes a pair since "cell" is local data prior to the function call, isn't it?
<companion_cube> must be something like that, it's been a while
<companion_cube> yeah, it's associated to v, but it's on the stack to avoid a table lookup, iirc
<vincenzoml> the only other problem is that for efficiency I was using a stack on top of a bigarray... but then I need to encode flags and tuples manually (how?) and also be able to predict stack usage properly
<vincenzoml> or I could start with a dynamic stack and then see :)
<companion_cube> on top of a bigarray?
<companion_cube> you could have struct-of-arrays
<companion_cube> (or struct-of-stacks, anyway)
<companion_cube> one with unsigned 8 bit integers for the flag
<vincenzoml> yes, true. This means more bigarrays, but on the other hand I expect memory size of a labelled integer to be less than 8+64, is this the case?
<companion_cube> an integer living in a bigarray has no overhead
<vincenzoml> yes indeed, what I mean is, if I would use a dynamic stack to see how much it does impact performance, at least I would use less memory or maybe it would not change that much?
maxirater has quit [Quit: Leaving]
<companion_cube> type state = { mutable vertices: (int, int64_signed_elt) Array1.t; mutable flags: (int, int8_signed_elt) Array1.t; mutable len: int; }
<companion_cube> ^ this can contain both the two stacks (say) + the height of the stack
<companion_cube> height being used to reallocate arrays if the stack is full
<vincenzoml> I think I could predict the exact size in the case of Tarjan, but that's an assumption I should check
<companion_cube> oh, right
<companion_cube> you could also pair a bigarray for the vertex indices, with a bitset to know if it's enter/exit
<vincenzoml> well, great, I have to understand this better. Indeed since Tarjan's algorithm also needs other flags (the "onstack" flag) I could as well pack my flags in the same 8-bit array.
<companion_cube> yeah
<companion_cube> do you really deal with such huge graphs? :)
psacrifice has joined #ocaml
<Drup> hum, the algorithm in ocamlgraph is not tail rec
<vincenzoml> companion_cube: I treat images as graphs, so yes, increasing stack size is not an option :)
<companion_cube> ouch :D
<companion_cube> I see
<def`> vincenzoml: may I ask what is this for? (out of curiosity)
<vincenzoml> sure, it's a ... spatial model checker, that is, you specify properties of points via logic, and the model checker finds the points satisfying your properties
<Drup> what kind of properties ?
<vincenzoml> we're using the tool even for medical image analysis -- here it is: https://github.com/vincenzoml/topochecker (* end publicity moment *)
<vincenzoml> properties are like "points that are close to points that are surrounded by red points"
<Drup> I see
<vincenzoml> but for image analysis we also need operators that deal with textures
<Drup> this is cool
<vincenzoml> yes I think so too :)
<def`> oh cool :)
<vincenzoml> now I'm in the process of studying an additional fragment of the logical language that deals with connected regions, and that's what led me here
<def`> (I asked because I also worked with graph algorithms applied on images a long time ago, but in C++ at that time)
<vincenzoml> def`: we considered that, but ocaml is really a blessing when you don't touch the code for long periods and then come back to it
<companion_cube> you could have picked rust 0:-)
<Drup> graphs in rust are a mess
<def`> Actually... C++ was used for performance, but I like to think (maybe I am wrong) we would have been more efficient with OCaml combinators and good codegen (llvm)
<Drup> you get lifetime issues in all directions due to the recursive nature of it
<def`> rust didn't exist at that time. Neither did C++11
<Drup> or you need up using Rc, and then everything is boxed everywhere, and it's horrible to use
<vincenzoml> ocaml is good for our purposes performance-wise, but I use static bigarrays for everything. On the other hand, I see CPU usage never gets to 100% in our algorithm and I will soon or later need to find out why
<companion_cube> Drup: well, not with this particular representation
<companion_cube> it's encouraging you to use struct-of-arrays and vertices as integers
ryanartecona has joined #ocaml
ryanartecona has quit [Ping timeout: 255 seconds]
ziyourenxiang has joined #ocaml
spew has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
vincenzoml has quit [Quit: Page closed]
cdidd_ is now known as cdidd
freusque has quit [Quit: WeeChat 1.7]
freusque has joined #ocaml
moei has joined #ocaml
moei has quit [Client Quit]
moei has joined #ocaml
sh0t has joined #ocaml
johnelse_ has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 258 seconds]
johnelse has quit [Ping timeout: 240 seconds]
sepp2k has quit [Quit: Leaving.]
sepp2k has joined #ocaml
shinnya has joined #ocaml
sepp2k has quit [Client Quit]
freusque has quit [Quit: WeeChat 1.7]
freusque has joined #ocaml
dmi3y has joined #ocaml
kakadu has quit [Quit: Konversation terminated!]
spew_ has joined #ocaml
spew has quit [Ping timeout: 260 seconds]
spew_ is now known as spew
freusque has quit [Ping timeout: 260 seconds]
MercurialAlchemi has joined #ocaml
freusque has joined #ocaml
zpe has quit [Remote host closed the connection]
ryanartecona has joined #ocaml
ryanartecona has quit [Ping timeout: 260 seconds]
xmonader2 has quit [Quit: Leaving]
dmi3y has quit [Quit: dmi3y]
strykerkkd has joined #ocaml
freusque has quit [Quit: WeeChat 1.7]
shinnya has quit [Ping timeout: 260 seconds]
orbifx-m has quit [Ping timeout: 260 seconds]
alfredo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
psacrifice has quit [Remote host closed the connection]
psacrifice has joined #ocaml
hongbo_ has joined #ocaml
ryanartecona has joined #ocaml
john51 has quit [Write error: Broken pipe]
john51_ has joined #ocaml
al-damiri has joined #ocaml
clockish has quit [Quit: bye]
clockish has joined #ocaml
manizzle has quit [Remote host closed the connection]
jabroney has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
orbifx-m has joined #ocaml
ryanartecona has joined #ocaml
AltGr has left #ocaml [#ocaml]
g0d355__ has quit [Max SendQ exceeded]
hcarty has joined #ocaml
<hcarty> Does opam have a way to say "install the dependencies list in this opam file/these opam files" without creating a pin?
alfredo has joined #ocaml
MK__ has quit [Ping timeout: 240 seconds]
orbifx-m has quit [Ping timeout: 260 seconds]
alfredo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
govg has joined #ocaml
copy` has joined #ocaml
maarhart has joined #ocaml
alfredo has joined #ocaml
alfredo is now known as alfredo[away]
alfredo[away] has quit [Client Quit]
alfredo has joined #ocaml
orbifx has joined #ocaml
dmi3y has joined #ocaml
psacrifice has quit [Remote host closed the connection]
freusque has joined #ocaml
freusque has quit [Ping timeout: 260 seconds]
SpiceGuid has joined #ocaml
maarhart has quit [Ping timeout: 240 seconds]
maarhart has joined #ocaml
maarhart has quit [Remote host closed the connection]
argent_smith has quit [Quit: Leaving.]
SpiceGuid has quit [Quit: ChatZilla 0.9.93 [SeaMonkey 2.46/20161213183751]]
ryanartecona has quit [Quit: ryanartecona]
alfredo has quit [Quit: Textual IRC Client: www.textualapp.com]
<orbifx> is opam suitable for releasing applications? or is it intended for development libraries?
<companion_cube> mostly development, I think
<companion_cube> not many people would want to install a program by compiling it entirely from source…
<flux> yes, if your audience is ocaml aficionados :)
pitcomplete has joined #ocaml
<flux> a tool to package all opam deps into one release tarball would be nice.
<flux> a regular unix-wielding person might be expected to have the ocaml compiler itself installed, but requiring opam might be pushing it.
<hcarty> FWIW it looks like opam 2 will do what I was looking/hoping for (opam install . --deps-only)
<hcarty> flux: There have been a few "opam bundle"-like efforts. It would be pretty nice to have something like that available.
<companion_cube> yes indeed
<companion_cube> especially to interact with non OCaml programmers
freusque has joined #ocaml
<orbifx> ok
<orbifx> I was considering about releasing it on opam as an app for ocamlers
pitcomplete has quit [Quit: Leaving]
<orbifx> but it has resource files
<flux> big ones?
<orbifx> not really
<orbifx> but a few
<orbifx> and it would be weird to use them out of .opma
<orbifx> .opam^
<mrvn> flux: I would like a opam2deb tool
cbot has joined #ocaml
Simn has quit [Ping timeout: 240 seconds]
fraggle_ has joined #ocaml
<hcarty> orbifx: It makes sense to have it in opam too, in part because it would then be included in future compiler compatibility and regression testing
<hcarty> orbifx: Even if that isn't your primary mode of distribution
<flux> mrvn, doesn't sound like too difficult to implement, if one can parse the .opam file..
<orbifx> hcarty: it will be in opam anyway, as a library
ryanartecona has joined #ocaml
elyrae has joined #ocaml
sepp2k has joined #ocaml
elyrae has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<mrvn> flux: should be relatively trivial. Might need a list of existing packages so dependencies can be changed to them.
<mrvn> The volume of a a cylinder with radius z and height a is PIZZA.
<orbifx> o0
<orbifx> w00t
larhat has joined #ocaml
freusque has quit [Ping timeout: 245 seconds]
MercurialAlchemi has quit [Ping timeout: 260 seconds]
larhat has quit [Quit: Leaving.]
larhat has joined #ocaml
hongbo_ has quit [Quit: Connection closed for inactivity]
AndChat504 has joined #ocaml
psacrifice has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
hcarty has quit [Quit: WeeChat 1.5]
dmi3y has quit [Quit: dmi3y]
Simn has joined #ocaml
sepp2k has quit [Quit: Leaving.]
lukky513_ has quit [Quit: ZNC - http://znc.in]
lukky513 has joined #ocaml
lukky513 has quit [Remote host closed the connection]
lukky513_ has joined #ocaml
lukky513_ has quit [K-Lined]
kakadu has joined #ocaml
moei has quit [Quit: Leaving...]
sh0t has quit [Remote host closed the connection]
AndChat504 has quit [Ping timeout: 255 seconds]
ryanartecona has quit [Quit: ryanartecona]
Xadnem has joined #ocaml
hongbo_ has joined #ocaml
Xadnem has quit [Quit: leaving]
ollehar has joined #ocaml
noddy has joined #ocaml
pilne has joined #ocaml
jabroney has left #ocaml [#ocaml]
Simn has quit [Ping timeout: 240 seconds]
spew has quit [Ping timeout: 240 seconds]
psacrifice has quit [Remote host closed the connection]
orbifx has quit [Quit: WeeChat 1.7]
spew has joined #ocaml
spew has quit [Ping timeout: 240 seconds]
larhat has quit [Quit: Leaving.]
kakadu has quit [Remote host closed the connection]
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0 has quit [Killed (rajaniemi.freenode.net (Nickname regained by services))]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
jack5638 has joined #ocaml
infinity0 has joined #ocaml