adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.06.0 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.06/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
maattdd_ has quit [Ping timeout: 240 seconds]
ziyourenxiang has quit [Ping timeout: 256 seconds]
isd has quit [Quit: Leaving.]
maattdd_ has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
maattdd_ has quit [Ping timeout: 256 seconds]
zolk3ri has quit [Remote host closed the connection]
infinity0 has quit [Ping timeout: 240 seconds]
infinity0 has joined #ocaml
pierpa_ has joined #ocaml
maattdd_ has joined #ocaml
maattdd_ has quit [Ping timeout: 256 seconds]
mfp has quit [Ping timeout: 276 seconds]
gtrak has joined #ocaml
bramford has quit [Ping timeout: 260 seconds]
zlsyx has quit [Quit: Leaving...]
maattdd_ has joined #ocaml
isd has joined #ocaml
maattdd_ has quit [Ping timeout: 252 seconds]
isd has quit [Quit: Leaving.]
okeuday_bak has joined #ocaml
<okeuday_bak> Do .cmo files need to be installed to allow cross-module inlining to occur, or is that native compilation (.cmx files) only?
<okeuday_bak> (i.e., even if you have an archive containing the .cmo files, a .cma file)
<okeuday_bak> only two .cmo files exist in the installation, profiling.cmo and std_exit.cmo , so they must not have an archive?
<okeuday_bak> (and compiler-libs has an additional 3)
<okeuday_bak> based on that, the answer should be no
bartholin has quit [Ping timeout: 248 seconds]
jimmyrcom has joined #ocaml
maattdd_ has joined #ocaml
maattdd_ has quit [Ping timeout: 240 seconds]
mbuf has joined #ocaml
jimmyrcom has quit [Ping timeout: 268 seconds]
maattdd_ has joined #ocaml
maattdd_ has quit [Ping timeout: 240 seconds]
sz0 has joined #ocaml
spew has joined #ocaml
gtrak has quit [Ping timeout: 260 seconds]
sh0t has quit [Remote host closed the connection]
p_d has joined #ocaml
spew has quit [Ping timeout: 240 seconds]
maattdd_ has joined #ocaml
maattdd_ has quit [Ping timeout: 268 seconds]
zaltekk has joined #ocaml
govg has quit [Ping timeout: 268 seconds]
maattdd_ has joined #ocaml
maattdd_ has quit [Ping timeout: 240 seconds]
jimmyrcom has joined #ocaml
p_d has quit [Quit: Take my advice. I don't use it anyway]
jimmyrcom has quit [Ping timeout: 260 seconds]
maattdd_ has joined #ocaml
maattdd_ has quit [Ping timeout: 260 seconds]
cbot has joined #ocaml
sz0 has quit [Quit: Connection closed for inactivity]
maattdd_ has joined #ocaml
jao has quit [Ping timeout: 240 seconds]
maattdd_ has quit [Ping timeout: 248 seconds]
pierpa_ has quit [Quit: Page closed]
jimmyrcom has joined #ocaml
mbuf has left #ocaml ["Leaving"]
maattdd_ has joined #ocaml
maattdd_ has quit [Ping timeout: 248 seconds]
<companion_cube> only .cmx files
<companion_cube> there is not much inlining going on for bytecode anyway
<okeuday_bak> ok, thanks
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
MercurialAlchemi has joined #ocaml
troydm has joined #ocaml
jimmyrcom has quit [Ping timeout: 240 seconds]
maattdd_ has joined #ocaml
maattdd_ has quit [Ping timeout: 248 seconds]
jimmyrcom has joined #ocaml
jimmyrcom has quit [Ping timeout: 260 seconds]
jimmyrcom has joined #ocaml
jimmyrcom has quit [Ping timeout: 240 seconds]
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
maattdd_ has joined #ocaml
troydm has joined #ocaml
maattdd_ has quit [Ping timeout: 252 seconds]
cbot has quit [Quit: Leaving]
kakadu has joined #ocaml
<_xvilka_> is it possible to get the member of incomplete structure using Ctypes? I suspect not, asking in a limited hope
argent_smith has joined #ocaml
zpe has quit [Remote host closed the connection]
maattdd_ has joined #ocaml
<Enjolras> _xvilka_: with cstruct you mean ?
<Enjolras> I think if you define only a prefix of the C struct, it should work
maattdd_ has quit [Ping timeout: 256 seconds]
<_xvilka_> Enjolras: yes
<_xvilka_> ok, will try, thx
govg has joined #ocaml
dtornabene has joined #ocaml
Enjolras has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 256 seconds]
maattdd_ has joined #ocaml
dhil has joined #ocaml
maattdd_ has quit [Ping timeout: 256 seconds]
bartholin has joined #ocaml
ygrek has joined #ocaml
zpe has joined #ocaml
maattdd_ has joined #ocaml
zpe_ has joined #ocaml
zpe has quit [Read error: Connection reset by peer]
maattdd_ has quit [Ping timeout: 240 seconds]
mfp has joined #ocaml
<Leonidas> I love it when an old project suddenly gains speed again :-)
<rgr[m]> Leonidas: \o/
<rgr[m]> We gotta create some hype for this renovation too
maattdd_ has joined #ocaml
Haudegen has joined #ocaml
<_xvilka_> what project?
maattdd_ has quit [Ping timeout: 240 seconds]
jimmyrcom has joined #ocaml
jimmyrcom has quit [Ping timeout: 260 seconds]
maattdd_ has joined #ocaml
<Leonidas> _xvilka_: ocaml-zmq
<Leonidas> rgr[m]: ocaml-zmq-kernel to have it compile to JS ;-)
<rgr[m]> Haha, well node backends have their use for sure
<rgr[m]> Not in this case though. Our ocaml building blocks are superious in every way in this case I think
maattdd_ has quit [Ping timeout: 256 seconds]
maattdd_ has joined #ocaml
malc_ has joined #ocaml
tsani has quit [Ping timeout: 248 seconds]
ziyourenxiang has joined #ocaml
dhil has quit [Ping timeout: 260 seconds]
tsani has joined #ocaml
dtornabene has quit [Remote host closed the connection]
soupault has joined #ocaml
dhil has joined #ocaml
zpe_ has quit [Remote host closed the connection]
shinnya has joined #ocaml
p_d has joined #ocaml
p_d has quit [Ping timeout: 260 seconds]
jbrown has joined #ocaml
webshinra has joined #ocaml
zpe has joined #ocaml
zpe_ has joined #ocaml
zpe has quit [Read error: Connection reset by peer]
MercurialAlchemi has quit [Ping timeout: 256 seconds]
MercurialAlchemi has joined #ocaml
zolk3ri has joined #ocaml
soupault has quit [Remote host closed the connection]
groovy2shoes has quit [Remote host closed the connection]
sh0t has joined #ocaml
sh0t has quit [Remote host closed the connection]
sh0t has joined #ocaml
maattdd_ has quit [Ping timeout: 240 seconds]
AltGr has joined #ocaml
dhil has quit [Ping timeout: 268 seconds]
gtrak has joined #ocaml
AltGr has left #ocaml [#ocaml]
<_xvilka_> Leonidas: yeah, cool, using zeromq heavily
sh0t has quit [Remote host closed the connection]
gtrak has quit [Ping timeout: 240 seconds]
xutux has joined #ocaml
maattdd_ has joined #ocaml
xutux has quit [Ping timeout: 260 seconds]
spew has joined #ocaml
bartholin has quit [Remote host closed the connection]
am55 has joined #ocaml
tarptaeya has joined #ocaml
<Drup> at some point I should try to understand what it does and when you need it
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
troydm has quit [Ping timeout: 252 seconds]
maattdd_ has quit [Ping timeout: 252 seconds]
maattdd_ has joined #ocaml
troydm has joined #ocaml
shinnya has quit [Ping timeout: 256 seconds]
jimmyrcom has joined #ocaml
Enjolras has joined #ocaml
gtrak has joined #ocaml
gtrak has quit [Ping timeout: 260 seconds]
gtrak has joined #ocaml
dhil has joined #ocaml
jimmyrcom has quit [Ping timeout: 256 seconds]
maattdd_ has quit [Ping timeout: 268 seconds]
sh0t has joined #ocaml
Haudegen has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
p_d has joined #ocaml
rwmjones is now known as rwmjones|afk
MercurialAlchemi has quit [Ping timeout: 245 seconds]
Guest69154 has joined #ocaml
tarptaeya has quit [Quit: Leaving]
Guest69154 is now known as Haudegen
maattdd_ has joined #ocaml
trochdewei has joined #ocaml
tarptaeya has joined #ocaml
bartholin has joined #ocaml
al-damiri has joined #ocaml
p_d has quit [Ping timeout: 248 seconds]
Haudegen has quit [Read error: Connection reset by peer]
Jesin has joined #ocaml
maattdd_ has quit [Ping timeout: 240 seconds]
dhil has quit [Ping timeout: 245 seconds]
bruce_r has joined #ocaml
<bruce_r> Hey guys. I'm running this in an interpreter and it doesn't print anything:
<bruce_r> Lwt_main.yield () >>= (fun () -> print_endline "test";Lwt.return ());;
<bruce_r> is that expected?
<bruce_r> if I replace the yield with Lwt.return (), then it does print
<bruce_r> I am confused
<bruce_r> The state of my thread is "sleeping", why doesn't it wake up?
Jesin has quit [Quit: Leaving]
<Armael> did you run your whole program using Lwt_main.run?
<octachron> bruce_r, otherwise, it would depend on the whim of the scheduler and the rest of the program
<bruce_r> are you asking this specifically because of the yield?
<bruce_r> I'm just running this command in the ocaml interpreter
<octachron> then it is behaving as expected
<octachron> (and you should use utop)
<bruce_r> I started with Lwt_unix.sleep 1., and it didn't print anything
<bruce_r> how do you know I'm not using utop?
<octachron> Lwt is cooperative threads library, if your program is not cooperating with it by not giving back control to the scheduler; nothing can happen
Faster-Fanboi has quit [Quit: ZNC 1.7.x-git-876-42939c9 - https://znc.in]
<bruce_r> ok that makes sense. How do I do that please?
<bruce_r> I'm surprised, I've been using lwt inside my eliom project for quite a while, and I've never run into this before
<octachron> bruce_r, utop automatically waits for Lwt expression to terminate, so the behavior that you are describing does not happen
ziyourenxiang has quit [Ping timeout: 248 seconds]
<bruce_r> interesting
<octachron> bruce_r, if you are in a environment that uses Lwt heavily, Lwt function would yield to the scheduler, so it is not surprising that you did not witness this behavior with eliom
<bruce_r> thanks octachron
noddy has joined #ocaml
bruce_r has quit [Ping timeout: 240 seconds]
dhil has joined #ocaml
neiluj has joined #ocaml
noddy has quit [Read error: Connection reset by peer]
noddy has joined #ocaml
jao has joined #ocaml
justin_smith has left #ocaml ["WeeChat 1.6"]
neiluj has quit [Ping timeout: 255 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
rwmjones|afk is now known as rwmjones
troydm has quit [Ping timeout: 256 seconds]
TheLemonMan has joined #ocaml
SiGe has joined #ocaml
govg has quit [Ping timeout: 240 seconds]
troydm has joined #ocaml
malc_ has quit [Quit: ERC (IRC client for Emacs 25.0.50.2)]
ygrek has quit [Ping timeout: 240 seconds]
noddy has quit [Ping timeout: 252 seconds]
andreas_ has joined #ocaml
SiGe has quit [Remote host closed the connection]
maattdd_ has joined #ocaml
maattdd_ has quit [Ping timeout: 240 seconds]
trochdewei has quit [Remote host closed the connection]
SiGe has joined #ocaml
SiGe has quit [Remote host closed the connection]
dhil has quit [Ping timeout: 268 seconds]
<Drup> Data structure people! I'm proposing a new game
<Drup> I give a signature and you propose a cool datastructure to go with it
<Drup> cc companion_cube, because i know he's going to play anyway
shinnya has joined #ocaml
<Drup> My first proposition for the game: https://bpaste.net/show/88591965f944
<Drup> (I already used OCaml's sets, and sorted thunklists :p)
<Drup> Cool propositions will get a mention in my next paper :>
<kakadu> Waht is a sorted thunklist?
<Drup> kakadu: type 'a node = Nil | Cons of ('a * 'a t) and 'a t = unit -> 'a node
<Drup> (but sorted, so that union is fast)
<octachron> Drup, I imagine that "cross_product" is a pseudonym for cartesion product ?
<Drup> octachron: yes
<Drup> it's the "difficult" operation of the lot
<Drup> (at least if you want an efficient one)
<Drup> (well, that, and the n-way merge)
<companion_cube> Drup: a patricia tree used as a hashmap
<Drup> That reminds me that there is no n-way merge for OCaml's sets, which is sort of unsatisfying
<companion_cube> maybe
<Drup> companion_cube: why hashmap ?
<companion_cube> or hashset
<companion_cube> well, if `elt` is not int, you don't have much of a choice? :D
<Drup> fair enough
<Drup> (it's not int)
<Drup> companion_cube: so, just like an hashtable, but instead of an array of buckets, it would be a tree ?
<Drup> hmm
<companion_cube> a patricia tree, I think
<companion_cube> the thing is that it should give you a pretty good merge
shinnya has quit [Ping timeout: 240 seconds]
<Drup> companion_cube: wouldn't that require hashing to be consistent with the order of the elements ?
<companion_cube> ah yeah, if order matters it's dead
<companion_cube> (what's the order you expect from cross_product? lexico?)
<Drup> in this case, yes, the elements are words ordered by lexicographic order
<companion_cube> tough
<Drup> but it doesn't *necesarely* matters in practice
jao has quit [Remote host closed the connection]
<Drup> I might work around it
<Drup> companion_cube: I suppose the "words" in the patricia trees are the integer hashes ?
<companion_cube> yes
<Drup> mmmh
<companion_cube> a hashtrie, in other words :p
<companion_cube> haven't tried, but it might be a good hashset for merging
<Drup> do you have one implemented at hand ? :D
<octachron> doesn't the discreteness/density of the set matters?
<Drup> (hashtrie, I like it, it's a cute name)
<Drup> octachron: it might, but in my case, density is arbitrary (it can be very dense of very sparse depending on the input)
<companion_cube> but fast cross product *and* fast merge sounds not that easy
<Drup> companion_cube: well, that's why I'm proposing it here, otherwise it wouldn't be fun! :D
<companion_cube> have you tried sqlite in memory? :-]
<Drup> huh, I don't see how that could possibly work here
<companion_cube> well it's good for merge and products ;-)
<companion_cube> not so much for the functional aspects.
<Drup> the overhead is going to kill me, and I need the functional
<Drup> +aspects*
<Drup> You are right about merge and products though. What sort of datastructure do they use ?
<companion_cube> tons of b-trees, I think
<companion_cube> plus custom code generation
<companion_cube> you know, the cool part is that sqlite, in a way, compiles your whole query into a specialized program that is optimized for the merges and products
<companion_cube> so in OCaml you could also go with a GADT like stuff that can be re-arranged to minimize the intermediate structures
<companion_cube> but you're the GADT wizard
<Drup> companion_cube: in my particular case, I know the "queries" already, I don't need some fancy things
<Drup> (oh, mfp might enjoy that question too, if he's around :p)
<companion_cube> I've wanted to write a T-tree in OCaml for years…
<companion_cube> I think the merge requirement more or less requires an ordered tree (if you go with a persistent structure and not a stream)
jao has joined #ocaml
<companion_cube> unrelated, but has anyone here every used caml_add_global_root() for storing OCaml closures in C global variables?
<octachron> I know that kakadu has a manual PR on a related subject that I need to copy-edit at some point, but that's all
<kakadu> Oh, I totally forgot about it
<octachron> Do you think you will have a bit a time to finish it in the coming months?
<kakadu> Yeah, I want to
<companion_cube> a PR to the ocaml manual?
<kakadu> It's about documentation
<octachron> kakadu: ok, I am adding it to my list of assigned PRs
<kakadu> companion_cube: we used it in lablqml
<companion_cube> https://github.com/fxfactorial/ocaml-linenoise/commit/5e83e25a07195e0764b83d0e90d125d21bf49386 <-- been trying to register the callbacks to the GC, but I think they are still moved
<companion_cube> (I mean, I think the GC still moves the closures upon compaction, and C doesn't know about it, something like that)
<octachron> that's why you register a pointer to the value (aka a pointer to a pointer to a block ) rather than a value directly
<companion_cube> yeah, but still, after compaction there's a segfault whwne C tries to call the function
<companion_cube> so I suppose it's still not aligned
Pierpa has joined #ocaml
<Drup> mhh
zolk3ri has quit [Remote host closed the connection]
<Drup> companion_cube: it's not so good with the hashes for the product
<Drup> I mean, you end up creating a new structure from scratch
<companion_cube> like most trees, I guess
<companion_cube> well sure
zolk3ri has joined #ocaml
<companion_cube> ahh, do you mean that `cross_product` guarantees that the function is monotonic or something?
<companion_cube> cause otherwise I don't see how would can avoid just re-creating a result from scratch
<Drup> So, in my case, yes
<Drup> Actually, I can be more concrete: the elements are word-type things (strings for example) and I'm only doing `cross_product append`
<Drup> I also know by construction that all elements in one "set" are of the same lenght, although I doubt that's helpful
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
<Drup> hmm, if I use a trie, I could just duplicate the second trie at the leafs of the first one ...
<companion_cube> I was going to suggest a trie indeed…
<companion_cube> (good merging properties)
<companion_cube> you would *graft* the second trie at every leaf of the first, yes
<Drup> yeah
<companion_cube> I have something similar somewhere, but for a kind of decision tree
<Drup> That's promising
<companion_cube> you could even keep some sharing I guess
<Drup> I can totally keep all the sharing, even
<companion_cube> :p
<Drup> (which is good, because this thing blows up like crazy)
<Drup> companion_cube: however, iterating on tries is not great :(
<companion_cube> welcome my son, welcome to, HASHCONSIIIIIIIING ♪♩
<companion_cube> why not?
<companion_cube> you can also store the key in every leaf
<companion_cube> instead of reconstructing it
<Drup> hmm, I would have to test this
<Drup> Okay, food, and then let's Trie.
<companion_cube> Trie again? [y/n]
<companion_cube> (ahem)
jnavila has joined #ocaml
<zolk3ri> lol
jnavila has quit [Remote host closed the connection]
bruce_r has joined #ocaml
argent_smith has quit [Quit: Leaving.]
l1x has quit [Ping timeout: 256 seconds]
bruce_r has quit [Ping timeout: 240 seconds]
l1x has joined #ocaml
zpe_ has quit [Remote host closed the connection]
barcabuona has joined #ocaml
tarptaeya has quit [Remote host closed the connection]
tarptaeya has joined #ocaml
tarptaeya has quit [Read error: Connection reset by peer]
gtrak has quit [Ping timeout: 256 seconds]
kakadu has quit [Remote host closed the connection]
shinnya has joined #ocaml
isd has joined #ocaml
shinnya has quit [Ping timeout: 256 seconds]