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
SpiceGuid has quit [Quit: ChatZilla 0.9.93 [SeaMonkey 2.49.4/20180713174829]]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
silver has quit [Read error: Connection reset by peer]
ygrek has joined #ocaml
mfp has quit [Ping timeout: 257 seconds]
Haudegen has quit [Remote host closed the connection]
ziyourenxiang has joined #ocaml
ziyourenxiang has quit [Ping timeout: 255 seconds]
iovec has joined #ocaml
keep_learning_M has joined #ocaml
keep_learning has joined #ocaml
keep_learning has quit [Client Quit]
emersion has quit [Ping timeout: 246 seconds]
emersion has joined #ocaml
keep_learning has joined #ocaml
ziyourenxiang has joined #ocaml
ygrek has quit [Ping timeout: 268 seconds]
tormen has joined #ocaml
gravicappa has joined #ocaml
tormen_ has quit [Ping timeout: 246 seconds]
AnAverageHuman has joined #ocaml
kvda has joined #ocaml
marvin2 has quit [Ping timeout: 246 seconds]
rwmjones_ has joined #ocaml
AnAverageHuman has quit [Ping timeout: 256 seconds]
rwmjones has quit [Ping timeout: 250 seconds]
JimmyRcom has quit [Ping timeout: 245 seconds]
ggole has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pierpal has quit [Ping timeout: 246 seconds]
pierpal has joined #ocaml
kvda has joined #ocaml
freyr69 has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
JeanMax has joined #ocaml
dmiles has quit [Ping timeout: 255 seconds]
ziyourenxiang has quit [Ping timeout: 255 seconds]
mbrock has quit [Read error: Connection reset by peer]
dmiles has joined #ocaml
mfp has joined #ocaml
cantstanya has quit [Remote host closed the connection]
cantstanya has joined #ocaml
asymptotically has joined #ocaml
marvin2 has joined #ocaml
freyr69 has quit [Ping timeout: 246 seconds]
dhil has joined #ocaml
JeanMax has quit [Ping timeout: 268 seconds]
mal`` has quit [Quit: Leaving]
JeanMax has joined #ocaml
ygrek has joined #ocaml
mal`` has joined #ocaml
freyr69 has joined #ocaml
picolino has quit [Ping timeout: 245 seconds]
picolino has joined #ocaml
jmiven has quit [Quit: co'o]
jmiven has joined #ocaml
picolino has quit [Ping timeout: 245 seconds]
picolino has joined #ocaml
picolino has quit [Ping timeout: 244 seconds]
Haudegen has joined #ocaml
picolino has joined #ocaml
freyr69 has quit [Ping timeout: 245 seconds]
silver has joined #ocaml
bartholin has joined #ocaml
kvda has joined #ocaml
ygrek has quit [Ping timeout: 255 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dhil has quit [Ping timeout: 272 seconds]
troydm has quit [Ping timeout: 246 seconds]
zolk3ri has joined #ocaml
Haudegen has quit [Remote host closed the connection]
breitenj has quit [Ping timeout: 252 seconds]
ygrek has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
q9929t has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
pippijn has quit [Ping timeout: 272 seconds]
pippijn has joined #ocaml
JeanMax has quit [Ping timeout: 255 seconds]
q9929t has quit [Remote host closed the connection]
q9929t has joined #ocaml
Haudegen has joined #ocaml
spew has joined #ocaml
FreeBirdLjj has joined #ocaml
breitenj has joined #ocaml
JeanMax has joined #ocaml
<cemerick> anyone aware of a persistent finger tree impl floating around besides the one in batteries?
<Leonidas> what's wrong with the one in batteries?
<companion_cube> you want the banana, but it comes with the whole gorilla? :D
<Drup> it's LGPL, you can copy it
govg has quit [Ping timeout: 245 seconds]
<theblatte> <licensing flamewar>
tane has joined #ocaml
dhil has joined #ocaml
q9929t has quit [Quit: q9929t]
mildtaste has quit [Remote host closed the connection]
<Drup> those are slightly out of fashion nowadays ^^'
ehirdoy has joined #ocaml
<companion_cube> yeah, because people are mostly moving away from GPL :p
jbrown has quit [Ping timeout: 258 seconds]
aristos has joined #ocaml
ehirdoy has quit [Ping timeout: 256 seconds]
<theblatte> companion_cube: thanks for trying to help start the flamewar, that Friday is a bit slow
<companion_cube> I know right?
<companion_cube> has batteries moved to dune yet? :p
<theblatte> lol
<companion_cube> hey it would help them have module aliases
webshinra has quit [Remote host closed the connection]
webshinra has joined #ocaml
<rks`> why would they want that?
<companion_cube> 1/ why would they not want that 2/ diminish the bloat impact of `open Batteries`
omarramo has joined #ocaml
SpiceGuid has joined #ocaml
FreeBirdLjj has quit [Read error: Connection reset by peer]
<omarramo> hey guys, I want to debug my program using an external module and i need to print a datastructure represented by a deeply nested recursive variant type
<omarramo> is there an easy way to just conver that to a string
<omarramo> or do I have to write my own function for that type
FreeBirdLjj has joined #ocaml
dhil has quit [Ping timeout: 246 seconds]
<companion_cube> you can write your own, or use ppx_deriving.show
<omarramo> companion_cube: is there a way to use ppx_deriving for external modules whose source file I can't edit?
<companion_cube> in combination with ppx_import, possibly
FreeBirdLjj has quit [Remote host closed the connection]
<companion_cube> type foo = [%import Foo.t] [@@deriving show]
FreeBirdLjj has joined #ocaml
<ggole> You can use the type t = Foo.t = <definition here> [@@deriving show] trick
<ggole> The ppx readme mentions it.
<companion_cube> ah yeha, that's what ppximport does anyway
<ggole> Yeah
<ggole> import can be worthwhile if the type definition is huge though
<ggole> Or if you expect it to have to change
jbrown has joined #ocaml
<companion_cube> or if you're doing it for 20 types and can't be bothered
aristos has quit [Quit: Leaving]
SpiceGuid has quit [Ping timeout: 255 seconds]
<cemerick> companion_cube: right, the bloat is one thing (my executable size went up by more than 2x), but beyond that, the batteries impl has an…idiosyncratic API
<companion_cube> hmmmm, really? what's special in this?
<cemerick> it's not clear to me why it's within a stdlib in the first place, aside perhaps from making it more convenient for its own implementation
<companion_cube> ahhhh finger trees, not zig zag trees
<companion_cube> that's a bit more special yeah
<companion_cube> I'm not sure of how useful this is in OCaml, tbh
<cemerick> zig zag? You mean splay trees?
<companion_cube> right
<companion_cube> (duh)
<companion_cube> I knew it wasn't the right name, just not what was the right name 😅
<cemerick> The win for finger trees is cheap amortized append and nth, etc
<companion_cube> but the constant is big, I think
<cemerick> e.g. elsewhere I rely on Data.Sequence heavily (http://hackage.haskell.org/package/containers-0.6.0.1/docs/Data-Sequence.html)
Jesin has quit [Quit: Leaving]
<companion_cube> I recall that someone was implementing one of these crazy Tarjan structures recently
<cemerick> goodness, no, append is true O(1). nth and related ops (take, etc) are log
<companion_cube> Armael maybe?
<companion_cube> I mean the constant factor
<Armael> uh, dunno
<companion_cube> https://github.com/dbuenzli/pvec also
Jesin has joined #ocaml
<companion_cube> it's similar to scala's sequences, I think
<companion_cube> (a kind of HAMT)
zolk3ri has quit [Remote host closed the connection]
<cemerick> it's the "finger" part of finger trees that ensures actual O(1) on prepend + append. There's no bogeyman constants waiting to bite you :-)
SpiceGuid has joined #ocaml
<companion_cube> but the other operations are not that cheap :p
<companion_cube> like, accessing the elements?
<cemerick> right, all of those are log of the size of the shorter end
<cemerick> but a HAMT might be fine, too, will look around for some of those as well
<cemerick> (I guess I've been doing haskell for too long :-P)
<companion_cube> I think finger trees are useful if you actually need the internal monoid for weird stuff
<companion_cube> otherwise, HAMT-like trees will probably be faster
<companion_cube> (maybe not for concatenation :s)
<cemerick> right, that's the nut of it for me
<cemerick> single-element appends are the bulk of my ops, outside of simple traversals
<companion_cube> right
<companion_cube> funnily i have a very very simple thing I call `bag` which is an unbalanced tree with O(1) append, and normal traversal
<companion_cube> and nothing else :D
<ggole> "A list but the right way around"
<companion_cube> it's literally `type 'a bag = Empty | Leaf of 'a | Append of 'a bag * 'a bag`
<companion_cube> with constructors that make Empty neutral wrt Append
<def`> type 'a tsil = (::) of 'a tsil * 'a | [] ?
<companion_cube> how does that buy you O(1) append?
<def`> (Unfortunately, precedence and syntax sugar will work against you with this one :P)
<Armael> companion_cube: O(1) single element append ;)
<def`> :)
<companion_cube> :D
<rks`> :)
dhil has joined #ocaml
<companion_cube> I've seen that somewhere…
<companion_cube> "similar to inuit but not emacs specific" 😍
Serpent7776 has joined #ocaml
ygrek has quit [Ping timeout: 246 seconds]
<cemerick> here's a coq version of finger trees FWIW :-P https://www.irif.fr/~sozeau/research/russell/fingertrees.fr.html
dhil has quit [Ping timeout: 245 seconds]
ravenousmoose has joined #ocaml
ravenousmoose has quit [Ping timeout: 258 seconds]
ravenousmoose has joined #ocaml
ravenousmoose has quit [Client Quit]
omarramo has quit [Ping timeout: 245 seconds]
SpiceGuid has quit [Quit: ChatZilla 0.9.93 [SeaMonkey 2.49.4/20180713174829]]
ygrek has joined #ocaml
q9929t has joined #ocaml
kakadu_ has joined #ocaml
JeanMax has quit [Ping timeout: 240 seconds]
gravicappa has quit [Ping timeout: 240 seconds]
davs has joined #ocaml
davs has quit [Client Quit]
assemblyman has joined #ocaml
jbrown has quit [Ping timeout: 244 seconds]
ggole has quit [Quit: Leaving]
bartholin has quit [Remote host closed the connection]
JeanMax has joined #ocaml
q9929t has quit [Quit: q9929t]
JeanMax has quit [Remote host closed the connection]
roygbiv has joined #ocaml
assemblyman has quit [Ping timeout: 268 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
roygbiv has quit [Quit: ™]
Haudegen has quit [Remote host closed the connection]
iovec has quit [Quit: Connection closed for inactivity]
Serpent7776 has quit [Quit: leaving]
asymptotically has quit [Quit: Leaving]
tane has quit [Quit: Leaving]
kakadu_ has quit [Remote host closed the connection]
Geimhreadh has joined #ocaml
olle has joined #ocaml
<olle> What happened to the "-package" compiler switch? Not valid anymore? Using 4.06.0.
<companion_cube> it's only when you `ocamlfind ocamlopt …` I think, not with just the compiler
<olle> companion_cube: OK
<olle> hm
<olle> my makefile failed after upgrade.
<olle> I'll try to adjust. thanks.
<companion_cube> or, you know, try dune ;-)
<olle> companion_cube: now what is that?
<olle> another builder?
<olle> I think Menhir built my makefile.
<companion_cube> hmm, honest question, are you back after a leave or something? :)
<olle> companion_cube: yeah
<olle> companion_cube: I mean, I didn't work on my ocaml project for a long time.
<companion_cube> dune (formerly jbuilder) is a new-ish build system that has gained a lot of ground in the least years
<olle> I've seen a lot of dune posts on the subreddit.
<companion_cube> ok, cool
<olle> bah
<olle> change
<olle> what is it good for?
<companion_cube> it builds things faster and maintains merlin files for you ;)
<olle> ah
<companion_cube> and it's reasonably easy to use, and well documented
<olle> ok
<olle> wait, seems like nothing is installed after my switch.
<olle> companion_cube: You're still working with OCaml? Academy?
<companion_cube> I'm working at https://imandra.ai , so a startup but still doing cool logic related stuff
<olle> companion_cube: That looks pretty awesome :)
<olle> companion_cube: You're using ReasonML too?
<olle> test
<olle> companion_cube: May I ask which server OS you use? Linux distro?
Geimhreadh has quit [Quit: *vanishes into the mythical real world*]
ziyourenxiang has joined #ocaml
<companion_cube> I use normal OCaml
<companion_cube> on archlinux