adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.07.0 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
jao has quit [Ping timeout: 252 seconds]
pierpal has quit [Ping timeout: 252 seconds]
pmetzger has joined #ocaml
|jbrown| has joined #ocaml
<zozozo> _y: personnaly I use ocp-indent with vim, and it correctly indents ocamldoc comments without needing stars
ziyourenxiang has joined #ocaml
^MillerBoss20 has joined #ocaml
^MillerBoss20 has quit [K-Lined]
<_y> zozozo, i also use ocp-indent, but when i type “(** blabla<CR>” (<CR> standing for carriage return), i get a star inserted on the new line [ aligned with the first star of (** ], and i need to remove it manually
<_y> but now i have figured out why: this is because of vim’s option 'comments'; ocp-indent sets it to "sr:(*,mb:*,ex:*)" so that it applies to any comment which starts with "(*", even those that start with "(**"
<_y> if changing the option to eg. "sr:(*\ ,mb:*,ex:*)" , it only applies to comments whose opening delimiter is followed by a space, so it ignores "(**"
<_y> which more or less solves my problem
<_y> not sure why you do not face this behavior
Haudegen has quit [Remote host closed the connection]
pmetzger has quit []
moei has quit [Ping timeout: 268 seconds]
dedgrant has quit [Quit: Leaving]
mfp has quit [Ping timeout: 252 seconds]
mfp has joined #ocaml
keep_learning has joined #ocaml
mfp has quit [Ping timeout: 252 seconds]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
tormen_ has joined #ocaml
tormen has quit [Ping timeout: 252 seconds]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
Fusl21 has joined #ocaml
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
pierpa has quit [Quit: Page closed]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
Fusl21 has quit [Remote host closed the connection]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
_whitelogger has joined #ocaml
|jbrown| has quit [Ping timeout: 268 seconds]
keep_learning has quit [Quit: Ping timeout (120 seconds)]
ziyourenxiang has quit [Quit: Leaving]
ziyourenxiang has joined #ocaml
roygbiv has joined #ocaml
roygbiv has quit [Quit: ™]
orbifx has joined #ocaml
orbifx has quit [Ping timeout: 252 seconds]
thomas_scrace has joined #ocaml
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
sagotch has joined #ocaml
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
bartholin has joined #ocaml
xa0 has joined #ocaml
xa0 has quit [Excess Flood]
keep_learning has joined #ocaml
xa0 has joined #ocaml
AltGr has joined #ocaml
caltelt has quit [Ping timeout: 272 seconds]
|jbrown| has joined #ocaml
jnavila has joined #ocaml
|jbrown| has quit [Ping timeout: 272 seconds]
kakadu has joined #ocaml
Rosslaew_ has joined #ocaml
jnavila has quit [Ping timeout: 252 seconds]
FreeBirdLjj has joined #ocaml
Rosslaew_ has quit [Ping timeout: 252 seconds]
pierpal has joined #ocaml
<zozozo> _y: hm.. maybe because I'm actually using neovim ?
raduom has quit [Ping timeout: 265 seconds]
Rosslaew_ has joined #ocaml
mfp has joined #ocaml
Rosslaew_ has quit [Remote host closed the connection]
thomas_scrace has quit [Ping timeout: 252 seconds]
sagotch has left #ocaml [#ocaml]
pierpal has quit [Read error: Connection reset by peer]
shw has left #ocaml [#ocaml]
moei has joined #ocaml
jnavila has joined #ocaml
moei has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
jnavila has quit [Ping timeout: 252 seconds]
gtrak has quit [Ping timeout: 252 seconds]
gtrak has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
jao has joined #ocaml
FreeBirdLjj has joined #ocaml
Haudegen has joined #ocaml
jnavila has joined #ocaml
thomas_scrace has joined #ocaml
thomas_scrace has quit [Ping timeout: 272 seconds]
jnavila has quit [Ping timeout: 252 seconds]
thomas_scrace has joined #ocaml
demonimin has joined #ocaml
moei has joined #ocaml
grumble has joined #ocaml
grumble has left #ocaml [#ocaml]
orbifx has joined #ocaml
<flux[m]> I suppose there's no nice web crawler -able library for OCaml?
<Drup> flux[m] if you mean like scrapy in python, no, not really
<Drup> it's easy to hand-make one with cohttp+lwt though
<Drup> there is mechaml for handling forms and things like this
<Drup> making an ocaml equivalent of scrapy has been on my todo list for a while, but I'll probably never get to it
<discord> <thangngoc89> there is https://github.com/aantron/lambda-soup
<discord> <thangngoc89> that support css selectors
<flux[m]> well, that's nice. but I think I'll go ahead with lftp's "find" as that's sufficient for my current needs and consider a more sophisticated solution later :).
Guest36045 is now known as nore
jnavila has joined #ocaml
mar77i_ has joined #ocaml
mar77i_ has quit [Remote host closed the connection]
nore has quit [Quit: WeeChat 2.0.1]
nore has joined #ocaml
quipa has joined #ocaml
orbifx has quit [Ping timeout: 252 seconds]
silver has joined #ocaml
orbifx has joined #ocaml
thomas_scrace has quit [Ping timeout: 252 seconds]
poxifide24 has joined #ocaml
poxifide24 has quit [Ping timeout: 252 seconds]
tane has joined #ocaml
silver_ has joined #ocaml
silver has quit [Ping timeout: 268 seconds]
<_y> zozozo, maybe
<_y> by the way, i should have read merlin’s doc sooner :-)
Napsterbater has joined #ocaml
Napsterbater has quit [Remote host closed the connection]
leastbit has joined #ocaml
leastbit has quit [Excess Flood]
leastbit has joined #ocaml
leastbit has quit [Excess Flood]
leastbit has joined #ocaml
leastbit has quit [Excess Flood]
leastbit has joined #ocaml
quipa_ has joined #ocaml
leastbit has quit [Excess Flood]
quipa has quit [Ping timeout: 244 seconds]
orbifx has quit [Ping timeout: 268 seconds]
wagle has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
wagle has joined #ocaml
thomas_scrace has joined #ocaml
thomas_scrace has quit [Ping timeout: 264 seconds]
AltGr has left #ocaml [#ocaml]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
quipa_ is now known as quipa
quipa has quit [Quit: Leaving]
jnavila has quit [Ping timeout: 252 seconds]
orbifx has joined #ocaml
ziyourenxiang has quit [Ping timeout: 268 seconds]
gitfaf has joined #ocaml
thomas_scrace has joined #ocaml
Jesin has joined #ocaml
Jesin has quit [Remote host closed the connection]
Jesin has joined #ocaml
caltelt has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
wagle has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
jnavila has joined #ocaml
<_y> i wish so badly that Printf.printf could print thousands separator
|jbrown| has joined #ocaml
wagle has joined #ocaml
<companion_cube> :D
cobreadmonster has joined #ocaml
Haudegen has quit [Remote host closed the connection]
<discord> <Christophe> You can, just not within a number :P
slash^ has joined #ocaml
wagle_ has joined #ocaml
jnavila has quit [Ping timeout: 252 seconds]
wagle_ has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
orbifx has quit [Read error: Connection reset by peer]
orbifx1 has joined #ocaml
<octachron> or when 4.08 will be released
orbifx1 has quit [Ping timeout: 272 seconds]
sagax has quit [Ping timeout: 260 seconds]
<_y> really?
nullifidian has quit [Remote host closed the connection]
fds has joined #ocaml
nullifidian has joined #ocaml
Guest58857 has joined #ocaml
gitfaf has quit [Remote host closed the connection]
Guest58857 has quit [Remote host closed the connection]
philtor has joined #ocaml
philt has joined #ocaml
<reynir> what would be the separator, '_'?
thomas_scrace has quit [Ping timeout: 252 seconds]
Haudegen has joined #ocaml
thomas_scrace has joined #ocaml
philt has left #ocaml [#ocaml]
<_y> \o/
ChristopheT has joined #ocaml
jnavila has joined #ocaml
tormen_ has quit [Quit: Lost terminal]
tormen has joined #ocaml
<_y> so i see that there a type “floatarray” and a new module Float.Array
jack5638 has quit [Ping timeout: 255 seconds]
<_y> will the “float array” optimization be removed from OCaml in a close future (or is it already)?
loli has joined #ocaml
jack5638 has joined #ocaml
<_y> (speaking of which, is there any chance to see a boolarray in stdlib some day ? it would be handy right now ^^)
slash^ has quit [Quit: Leaving]
<companion_cube> heh, just use a 3rd party lib of bitvectors :)
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
<_y> do you happen to have one? :-°
<_y> i found backtrackings’ one https://github.com/backtracking/bitv
tormen has quit [Quit: Lost terminal]
<_y> but i did not found one in the first place i looked for (containers) ;-)
<companion_cube> its' called CCBV :)
<companion_cube> it's in containers.data
<octachron> _y, for now, there is a compiler configuration option that removes the magic float array optimization
<companion_cube> can't wait
<companion_cube> for once I hope for a speedup
tane has quit [Quit: Leaving]
silver_ is now known as silver
<_y> cool :-)
<_y> companion_cube, ah! i grepped for “bit” and “bool” on https://c-cube.github.io/ocaml-containers/last/containers/index.html
<companion_cube> heh, my bad
<companion_cube> the documentation for containers.data isn't that good
<_y> anyway, i think that i will stick to my custom implementation, specialized for my use case
<_y> i guess it will most likely be faster than your general-purpose one
<_y> by the way, i did not benchmark it, but wouldn’t it be faster to use “bytes” rather than “int array”?
<_y> this way, bits are fully packed, and instead of divisions by 30 or 62, the indexing logic only involves divisions by 8, that is, bitwise operations (and that does not depend on the architecture)
<companion_cube> it was designed to make `iter` and such faster (fewer blocks to decompose?) but you're probably right
<_y> plus, i see that your bitvectors are resizable; you could use “Buffer.t” and have resizability for free!
<companion_cube> nope nope nope, Buffer doesn't give access to its internals
<companion_cube> but I'm interested in benchmarks anyway.
<_y> remind me to do that some day :-)
<_y> the one thing that i keep using containers for, is CCHeap
<_y> no week passes by without Merlin reminding me kindly that Heap is not in the stdlib
tormen has joined #ocaml
<companion_cube> :D
<companion_cube> yeah, it's kind of weird that it's not in the stdlib
<companion_cube> also `CCVector`, but well
pierpa has joined #ocaml
<_y> yes
<_y> i wonder whether implementing resizable arrays (for a specific datatype) on top of Buffer, by bit-packing the elements, would be efficient
neatonk has joined #ocaml
<companion_cube> that sounds terrible, especially for the GC
<companion_cube> I mean, normal arrays are fine
neatonk has quit [Ping timeout: 264 seconds]
<_y> well, with { mutable length : int ; mutable contents : 'a array } you have to pay two extra levels of indirection for each get / set (that said, i do not know how Buffer is implemented…)
<_y> coming back to heaps, something i sometimes need is adding an ordered list of elements to a heap
revi21 has joined #ocaml
revi21 has quit [Remote host closed the connection]
<companion_cube> Buffer is built on top of bytes
<_y> if i am not mistaken, it happens that adding N arbitrary elements is in O(N × log N), but that adding N elements given in order can be achieved in O(N) (at least for binary heaps)
<companion_cube> CCHeap is a functional structure though
<companion_cube> I'm not sure, but PR accepted :)
<companion_cube> today I'm playing with rust
<_y> oh, in fact that holds for an arbitrary list of elements https://en.wikipedia.org/wiki/Heap_(data_structure)#cite_ref-7
<_y> companion_cube, apparently there is also a persistent variant of Brodal’s heaps with the same O(N) complexity https://en.wikipedia.org/wiki/Brodal_queue
<_y> and according to the table in this page, Brodal’s heaps are asymptotically better on all fronts :-)
<_y> the trap being that they are horrible to implement
<companion_cube> CCHeap is using leftist heaps
<companion_cube> they work well and are simple to write
<_y> i will try, one day
<companion_cube> intuitively I'd say it's faster to insert big elements first, then small ones
<companion_cube> but you won't have the O(n)
<companion_cube> I also have an imperative (binary) heap somewhere in my fork of msat if you really need perf
<_y> thanks for the advice!
<companion_cube> (although it kind of requires that elements store their own index)
<companion_cube> O(1) for merge oO
<companion_cube> wat
<_y> :D
<companion_cube> ah yeah, the constant factor and effort of implem are probably terrible
<_y> and it is not even an amortized cost
<companion_cube> these days I'm thinking that if you really need super high perf, imperative is the way
<_y> don’t worry, CCHeap has been enough for me until now
<_y> so what about Rust?
<companion_cube> it's pretty cool
<_y> i already knew that
<_y> so you embrace mutability?
gtrak has quit [Ping timeout: 268 seconds]
gtrak has joined #ocaml
gtrak has quit [Ping timeout: 252 seconds]
<companion_cube> well I guess, although linear typing is a special kind of mutability
maarhart has joined #ocaml
maarhart has quit [Excess Flood]
<companion_cube> my OCaml style has always been relatively imperative anyway
maarhart has joined #ocaml
maarhart has quit [Excess Flood]
maarhart has joined #ocaml
maarhart has quit [Excess Flood]
maarhart has joined #ocaml
maarhart has quit [Excess Flood]
maarhart has joined #ocaml
maarhart has quit [Excess Flood]
bezirg has joined #ocaml
wagle has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
pyx has joined #ocaml
pyx has quit [Client Quit]
ChristopheT has left #ocaml ["ERC (IRC client for Emacs 25.2.2)"]
FreeBirdLjj has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 252 seconds]
orbifx1 has joined #ocaml
wagle has joined #ocaml
orbifx1 has quit [Ping timeout: 252 seconds]
malina has joined #ocaml
thomas_scrace has quit [Ping timeout: 252 seconds]
wagle has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
jnavila has quit [Ping timeout: 252 seconds]
Guest78852 has joined #ocaml
thomas_scrace has joined #ocaml
thomas_scrace has quit [Ping timeout: 244 seconds]
bartholin has quit [Remote host closed the connection]
wagle has joined #ocaml
wagle has quit [Client Quit]
wagle has joined #ocaml
jao has quit [Ping timeout: 244 seconds]
<_y> now for an enginering problem:
wagle has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<_y> suppose i use something like: let precomputed_data = "\002\003\108...[very very large]..."
<_y> including it in a source code file looks like a bad idea (it would crash any line-based editor)
<_y> and these data are easy to generate
<_y> but still i don’t want them to be re-computed each time my program is launched
<_y> so is there a way, with current build systems, to generate data like this when building the program?
<_y> without resorting to MetaOCaml, of course
kakadu has quit [Remote host closed the connection]
ziyourenxiang has joined #ocaml
bezirg has quit [Remote host closed the connection]
<companion_cube> you could generate it into a foo.ml at build time
malina has quit [Remote host closed the connection]
wagle has joined #ocaml
wagle has quit [Remote host closed the connection]
<_y> companion_cube, how would i do that using oasis ?
<discord> <rizo> Maybe ocaml-crunch could be useful in this case.