adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.07.1 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.07/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml | Due to ongoing spam, you must register your nickname to talk on the channel
orbifx has quit [Read error: Connection reset by peer]
orbifx has joined #ocaml
mengu has quit [Quit: Leaving...]
ostera1974 has joined #ocaml
spew has quit [Quit: Connection closed for inactivity]
ostera1974 has quit [Ping timeout: 246 seconds]
orbifx has quit [Quit: WeeChat 2.3]
kjak has quit [Ping timeout: 240 seconds]
pgiarrusso has left #ocaml [#ocaml]
iovec has joined #ocaml
mfp has quit [Ping timeout: 268 seconds]
FreeBirdLjj has joined #ocaml
ostera1974 has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
ostera1974 has quit [Ping timeout: 240 seconds]
silver has quit [Read error: Connection reset by peer]
kjak has joined #ocaml
<cemerick> where are "inline" record variants described in the manual? I'm not seeing them (https://www.reddit.com/r/ocaml/comments/2jbhz8/ocaml_trunk_now_supports_inlined_records/)
kjak has quit [Ping timeout: 250 seconds]
<companion_cube> type foo = A of {x: int; mutable y: string} | B
cobreadmonster has joined #ocaml
twopoint718 has joined #ocaml
twopoint718 has quit [Changing host]
twopoint718 has joined #ocaml
twopoint718 has quit [Client Quit]
tormen_ has joined #ocaml
tormen has quit [Ping timeout: 246 seconds]
dtornabene2 has joined #ocaml
dtornabene has joined #ocaml
<companion_cube> cemerick: if you have time, can you try to `opam pin https://github.com/c-cube/ocaml-containers.git` and rerun your tests?
<companion_cube> I pushed a change that should improve inlining
ostera1974 has joined #ocaml
ostera1974 has quit [Ping timeout: 245 seconds]
dtornabene2 has quit [Ping timeout: 272 seconds]
JimmyRcom has quit [Ping timeout: 245 seconds]
gravicappa has joined #ocaml
jao has quit [Ping timeout: 250 seconds]
kvda has joined #ocaml
sagotch has joined #ocaml
nicoo has quit [Remote host closed the connection]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
nicoo has joined #ocaml
ostera1974 has joined #ocaml
FreeBirdLjj has joined #ocaml
ostera1974 has quit [Ping timeout: 250 seconds]
FreeBirdLjj has quit [Ping timeout: 250 seconds]
gravicappa has quit [Ping timeout: 245 seconds]
sagotch has quit [Read error: Connection timed out]
ostera1974 has joined #ocaml
ostera1974 has quit [Ping timeout: 246 seconds]
gravicappa has joined #ocaml
dtornabene has quit [Ping timeout: 240 seconds]
sagotch has joined #ocaml
ostera1974 has joined #ocaml
shmibs has quit [Quit: leaving =o]
rymdhund has joined #ocaml
recj has quit [Read error: Connection reset by peer]
shmibs has joined #ocaml
shmibs has quit [Quit: leaving =o]
rymdhund has quit [Ping timeout: 244 seconds]
sagotch has quit [Quit: Leaving.]
shmibs has joined #ocaml
shmibs has quit [Client Quit]
shmibs has joined #ocaml
zmt01 has joined #ocaml
recj has joined #ocaml
zmt00 has quit [Ping timeout: 240 seconds]
Spetznaz_ has quit [Ping timeout: 240 seconds]
ostera1974 has quit [Ping timeout: 268 seconds]
sagotch has joined #ocaml
cobreadmonster has quit [Quit: Connection closed for inactivity]
dtornabene3 has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
sagotch has quit [Quit: Leaving.]
dtornabene3 has quit [Remote host closed the connection]
dtornabene has joined #ocaml
ostera1974 has joined #ocaml
dtornabene2 has joined #ocaml
sagotch has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
freyr69 has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ostera1974 has quit [Ping timeout: 246 seconds]
ostera1974 has joined #ocaml
Haudegen has joined #ocaml
ostera1974 has quit [Ping timeout: 244 seconds]
ollehar has joined #ocaml
b0rg has joined #ocaml
b0rg has quit [Client Quit]
lorp has joined #ocaml
<lorp> hi OCaml people! i'm very new to the language, so bare with me, question: i'm using dune for building my project, and would like to add a C file to an exe build, could you point me in a direction explaining how to do that?
<lorp> sorry for spam, got it working... anyway sticking around :)
<haesbaert> lorp: this is a very minimal library with a c file, maybe it helps you: https://github.com/haesbaert/rawlink
<haesbaert> with dune
<lorp> haesbaert, thank you! i managed to get it working, my mistake was trying to use `c_names` in an executable definition ; extracting to a library with no modules made it work :)
<cemerick> companion_cube: we have a winner! https://gist.github.com/cemerick/7beaf7006b050d4358c302ec8b21d16d
<cemerick> Thank you companion_cube and Drup 👋
mfp has joined #ocaml
lorp has quit [Ping timeout: 240 seconds]
gravicappa has quit [Ping timeout: 240 seconds]
lorp has joined #ocaml
zolk3ri has joined #ocaml
asymptotically has joined #ocaml
gareppa has joined #ocaml
kvda has joined #ocaml
ostera1974 has joined #ocaml
ostera1974 has quit [Ping timeout: 272 seconds]
gareppa has quit [Quit: Leaving]
<cemerick> Leonidas: thank you. Odd that that section live on in later revs of the manual.
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbifx has joined #ocaml
<Leonidas> cemerick: I don't know if you have the time, but maybe it would be cool to document your findings on performance somewhere.
<cemerick> Leonidas: you mean related to the monomorphic float stuff?
<Leonidas> cemerick: lots of the manual is "append-only". I think there was an effort recently to incorporate some of the new features into the proper sections where they make sense.
<Leonidas> cemerick: yes, exactly.
<cemerick> or that contrived benchmark I posted on the discuss?
<cemerick> yeah, maybe
<cemerick> there's honestly not a lot to talk about, I don't think? I just happen to be using floats heavily/exclusively, and am keeping tabs on timings, etc.
<Leonidas> http://caml.inria.fr/distrib/ocaml-4.03/ocaml-4.03-refman.html#sec215 e.g. this was at least a great offender in append-only manual, where it describes all the cool things added over time
<cemerick> yeah, it's a _very_ strange approach to documentation
<cemerick> it's like the earlier chapters were locked down in 2006 or something, and now only the "extensions" chapter is writable
<cemerick> (an exaggeration on the year, but the point stands I guess)
dtornabene has quit [Quit: Leaving]
<Drup> cemerick: this is actually pretty close to reality x)
<Drup> (the last few versions of the manual are making progress towards a more unified approach)
notnotdan has quit [Quit: leaving]
jao has joined #ocaml
silver has joined #ocaml
ostera1974 has joined #ocaml
JimmyRcom has joined #ocaml
omarramo has joined #ocaml
ostera1974 has quit [Ping timeout: 245 seconds]
layeredeggplant has quit [Remote host closed the connection]
layeredeggplant has joined #ocaml
dtornabene2 has quit [Remote host closed the connection]
<cemerick> Fatal error: exception File "src/data/CCIntMap.ml", line 209, characters 4-10: Assertion failed
<cemerick> companion_cube: I am full of good news
<cemerick> bizarrely, I can't replicate it by inserting the same values in the same order :-|
Haudegen has quit [Remote host closed the connection]
<freyr69> How is owl doing?
<freyr69> Its page says "This software is currently maintained by Komposio, a Helsinki-based software consulting company."
<freyr69> Which leads to a hello world dummy page
<Leonidas> there have been commits 3 days ago, so it seems active
sagotch has quit [Quit: Leaving.]
kjak has joined #ocaml
omarramo has quit [Ping timeout: 252 seconds]
bartholin has joined #ocaml
<Bronsa> Last I tried owl most of the examples in the docs caused errors, didn't fill me with much confidence :/
<Drup> owl is very young and very WIP
<Bronsa> looks like a solid effort though, can't wait for it to stabilize
ollehar has quit [Quit: leaving]
spew has joined #ocaml
Haudegen has joined #ocaml
<freyr69> Is Lwt.catch tail recursive?
<freyr69> Regular catch does not allow tc elimination, right?
<theblatte> right
<cemerick> is there a reliable way to get the current dune workspace root during test runtime? I don't see anything appropriate in the environment
jao has quit [Ping timeout: 245 seconds]
MadcapJake has quit [Ping timeout: 268 seconds]
marsam has joined #ocaml
<companion_cube> cemerick: \o/
sagotch has joined #ocaml
freyr69 has quit [Remote host closed the connection]
twopoint718 has joined #ocaml
<orbifx> 🐫
<orbifx> have we got a strict dependency on the double humped camel?
omarramo has joined #ocaml
omarramo has quit [Ping timeout: 250 seconds]
JimmyRcom has quit [Quit: Leaving]
sagotch has quit [Quit: Leaving.]
MadcapJake has joined #ocaml
marsam has quit [Ping timeout: 252 seconds]
ostera1974 has joined #ocaml
marsam has joined #ocaml
MadcapJake has quit [Quit: MadcapJake]
MadcapJake has joined #ocaml
ostera1974 has quit [Ping timeout: 246 seconds]
sagotch has joined #ocaml
Haudegen has quit [Remote host closed the connection]
tane has joined #ocaml
omarramo has joined #ocaml
ostera1974 has joined #ocaml
sagotch has quit [Quit: Leaving.]
sagax has quit [Ping timeout: 272 seconds]
orbifx has quit [Quit: WeeChat 2.3]
ostera1974 has quit [Ping timeout: 272 seconds]
sagax has joined #ocaml
ostera1974 has joined #ocaml
bugabinga has joined #ocaml
jao has joined #ocaml
ostera1974 has quit [Ping timeout: 246 seconds]
ostera1974 has joined #ocaml
marsam has quit [Ping timeout: 252 seconds]
ostera1974 has quit [Ping timeout: 268 seconds]
waleee has joined #ocaml
steenuil has joined #ocaml
Serpent7776 has joined #ocaml
waleee has quit [Quit: WeeChat 2.3]
jnavila has joined #ocaml
zolk3ri has quit [Remote host closed the connection]
ravenousmoose has joined #ocaml
omarramo has quit [Ping timeout: 246 seconds]
kakadu has quit [Quit: Konversation terminated!]
sagax has quit [Ping timeout: 268 seconds]
bugabinga has quit [Quit: bugabinga]
tarptaeya has joined #ocaml
kakadu has joined #ocaml
<Leonidas> heh, replacing biniou with buffer made the code… faster.
<companion_cube> :D
<companion_cube> even for writing integers?
<Leonidas> honestly, I did not expect that
<companion_cube> re-check the results :)
<Leonidas> companion_cube: check out my post in the PR
<Armael> what's biniou for ?
<Leonidas> companion_cube: 387.98us vs 371.72us. Not much. But writing strings got a pretty solid speedup
<Leonidas> Armael: Binary data format designed for speed, safety and ease of use
<Armael> hmm, ok
<companion_cube> wow
<Leonidas> so it is like protobuf, except nobody really uses it
<companion_cube> can you also try with flambda?
<Leonidas> maybe tomorrow. building all this stuff with flambda probably takes upwards of 30 minutes
<companion_cube> :D
<companion_cube> that's what you get for using core_bench
<Leonidas> heh, point taken
<companion_cube> anyway, it seems that it won't affect performance negatively, which is great
<companion_cube> smaller dep tree, smaller binaries…
<Leonidas> also using a more common type is helpful for interaction with other code
<companion_cube> sure it does
<companion_cube> Buffer.t has many flaws, but at least it's there
<Leonidas> it is faster than Bi_outbuf.t at least in this instance. Even without that ensure trick and the unsafety.
<Leonidas> but the difference can be practically neglected
<Leonidas> No CCBuffer?
<companion_cube> nope, I just use Buffer.t, and it doesn't expose enough for meaningful additions that would justify CCBuffer
<companion_cube> https://github.com/ocaml/ocaml/pull/129 ah, memories…
<Leonidas> > NB. this module is not yet ported to bytes
<Leonidas> probably still not since we're talking Ocamlnet
<companion_cube> does Gerd still use it? :D
tarptaeya has quit [Quit: Konversation terminated!]
<Leonidas> my favourite bit from Yojson is this readme section: https://github.com/ocaml-community/yojson/#miscellaneous
<companion_cube> :DDD
<companion_cube> technically correct
<companion_cube> (reminds me I have this utf8 string somewhere, and it wasn't that easy writing the decoder…)
pierpal has quit [Ping timeout: 246 seconds]
ravenousmoose is now known as ravenousmoose[aw
wagle has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
wagle has joined #ocaml
orbifx has joined #ocaml
<Armael> does yojson handle utf8 at all? :D
<Leonidas> now that I skimmed the docs; core_benchmark is surprisingly comprehensive when it comes to analytics, one might even think JST uses it a lot
<companion_cube> I wonder, iirc Bunzli's jsonm's docs mention that yojson doesn't validate strings
<Leonidas> json is also a pretty terrible format
<companion_cube> yes, but one that everybody uses, so…
<cemerick> pity me with a hard node.js dependency then :-P
<companion_cube> I still should take time and write ppx_deriving_bencode, but well, it won't make it more popular :D
<Leonidas> aren't there at least 3 bencode-variants?
<companion_cube> I'm not aware of that
<companion_cube> bencode is extremely simple and, afaik, stable (as used by bittorrent)
<Leonidas> ah, no, must've mixed it up with something else.
<Leonidas> maybe base64
<Armael> companion_cube: and also nobody uses it? :p
<companion_cube> yeah, I know
<companion_cube> it's incredibly better than json for binary content, though
<Armael> sounds familiar
<companion_cube> (no esscaping)
<Leonidas> hey, if your criterion is nobody uses it, I have the perfect format for you :D
<Drup> but json is not made for binary content to begin with, and there are already tons of option for that in ocaml :p
<Drup> (binprot, capnp, protobuf ...)
<Drup> (biniou, ...)
<companion_cube> I mean, when you want a simple format and still want to put arbitrary content inside
<companion_cube> (which is the use case for bencode anyway)
<Armael> what's "arbitrary content"? bytes?
<companion_cube> yep
<Leonidas> Drup: msgpack!
<Drup> ah, that one as well
<Leonidas> except msgpack manages to combine bad things from json and binary formats
<Drup> truly a crowded space
<Drup> obviously, everyone rolls it's own new format anyway
<Leonidas> also everyone rolls their own compression lately
<Drup> everyone ? I only know of dinosaure
<Armael> well for sure if you just want to send a fixed amount of bytes it's not very hard to come up with a "custom" format
<Drup> but he's slightly crazy that way
<companion_cube> well bencode is just a richer version of netstrings anyway
ravenousmoose[aw has quit [Quit: Taking a quick nap...ZZzzz]
<companion_cube> something that you can parse without becoming mad, and can safely contain arbitrary content (unlike json where you ± have to use base64 or such)
Serpent7776 has quit [Quit: leaving]
<Leonidas> Drup: not in ocaml specifically, but in tech in general. to me it seems that the linux kernel has been gobbling up more compression algorithms that filesystems lately, which is out of character ;-)
<Drup> oh, right, I do not follow that particular domain with great attention
<Leonidas> companion_cube: base64 encoded binary in json, please shoot me
<companion_cube> well how else do you put arbitrary stuff in strings? :D
<Leonidas> yeah, I can't think of another way
<companion_cube> anyway, the PR looks even better now
<companion_cube> maybe mjambon will have something to say
Denommus has joined #ocaml
Spetznaz_ has joined #ocaml
spew has quit [Quit: going home]
Denommus has quit [Read error: Connection reset by peer]
omarramo has joined #ocaml
jnavila has quit [Remote host closed the connection]
Schroeder has quit [Remote host closed the connection]
bartholin has quit [Remote host closed the connection]
bartholin has joined #ocaml
asymptotically has quit [Quit: Leaving]
ravenousmoose has joined #ocaml
ravenousmoose has quit [Client Quit]
nikivi has quit [Ping timeout: 240 seconds]
igitoor has quit [Ping timeout: 250 seconds]
kvda has joined #ocaml
igitoor has joined #ocaml
nikivi has joined #ocaml
igitoor has quit [Changing host]
igitoor has joined #ocaml
iovec has quit [Quit: Connection closed for inactivity]
ravenousmoose has joined #ocaml
ravenousmoose has quit [Client Quit]
bartholin has quit [Remote host closed the connection]
twopoint718 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kakadu has quit [Remote host closed the connection]
assemblyman has joined #ocaml
cmk_zzz has joined #ocaml
<cmk_zzz> Pretty new to ocaml. Looking to write a curses like interface to a few json backends. Have researched a few libraries needed and just doing a sanity check that they are considered OK or if I should look elsewhere. build: dune, curses: lambda-term, http client: cohttp, json: adbgen (or perhaps yojson)
<companion_cube> atdgen, you mean? it uses yojson anyway
<companion_cube> that sounds good, although lambda_term might be a bit scary for a newcomer
omarramo has quit [Ping timeout: 268 seconds]
<cmk_zzz> companion_cube: yes, atdgen. Are there any alternatives to lambda-term (which I think looked OK from doing the examples). I guess an ncurses c library wrapper?
<companion_cube> nothing as modern or nice, no (assuming you want multiline stuff and all, not just a readline)
<companion_cube> lambda-term is fine, it's what powers utop after all
<cmk_zzz> cool. Thanks. I'll start off with this.
tane has quit [Quit: Leaving]