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
FreeBirdLjj has quit [Ping timeout: 260 seconds]
Haudegen has quit [Remote host closed the connection]
unyu has joined #ocaml
b_ga has joined #ocaml
silver has quit [Read error: Connection reset by peer]
Fare has quit [Ping timeout: 260 seconds]
b_ga has quit [Quit: Buh-bye]
Fare has joined #ocaml
FreeBirdLjj has joined #ocaml
shinnya has joined #ocaml
sz0 has quit [Quit: Connection closed for inactivity]
zolk3ri has quit [Remote host closed the connection]
sh0t has quit [Ping timeout: 248 seconds]
mfp has quit [Ping timeout: 240 seconds]
pierpa has quit [Quit: Page closed]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
tormen has joined #ocaml
tormen_ has quit [Ping timeout: 240 seconds]
pierpal has joined #ocaml
spew has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
pierpal has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
pierpal has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 265 seconds]
FreeBirdLjj has joined #ocaml
spew has quit [Ping timeout: 256 seconds]
cbot has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #ocaml
jao has quit [Ping timeout: 264 seconds]
granttrec has joined #ocaml
<granttrec> is the opam package in ubuntu good?
<Fare> OK, I wrote a great implementation of tries, and I want to extend to cache node hashes, and I'm in Lisp I'd use inheritance, but with OCaml modules I'm not sure how to do it. How do you extend every type in your module?
FreeBirdLjj has quit [Ping timeout: 248 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
<discord3> <bobby> Fare, would wrapping it in another module (i.e. functorizing it) work?
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 264 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
FreeBirdLjj has joined #ocaml
Fare has quit [Ping timeout: 265 seconds]
granttrec has quit [Quit: granttrec]
mk9 has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 268 seconds]
pyx has joined #ocaml
pyx has quit [Client Quit]
cbot has quit [Quit: Leaving]
granttrec has joined #ocaml
malina has quit [Ping timeout: 248 seconds]
webshinra has quit [Quit: Leaving]
webshinra has joined #ocaml
ozzymcduff has joined #ocaml
granttrec has quit [Quit: granttrec]
mk9 has quit [Quit: mk9]
mk9 has joined #ocaml
kakadu has joined #ocaml
_whitelogger has joined #ocaml
mk9 has quit [Ping timeout: 240 seconds]
argent_smith has joined #ocaml
whitequark has joined #ocaml
<whitequark> there's still no way to put a `'a foo` into a hash table short of using an existential, right?
<octachron> more a universal quantification, no? (type 'a l = { x:'a . 'a list } let x = {x=[]} ). But yes, polymorphic types cannot be stored inside mutable data structures.
<whitequark> not with that attitude they can't
<whitequark> I just rewrote some horrible code in Coq with GADTs
<whitequark> octachron: https://hastebin.com/sahoyazipa.ml
rbocquet has left #ocaml ["WeeChat 1.0.1"]
mk9 has joined #ocaml
<whitequark> and I meant use `'a foo` as a key, not as a value
<whitequark> why is the 'a. 'a syntax only legal in records, anyway
<octachron> note that you probably want to add an [@@unboxed] annotation on value and boxkey value
<octachron> with the implementation of hashtable, values and keys are both stored inside mutable values
<whitequark> no, not on boxkey
<whitequark> the fact that every instance of an extensible type, even without arguments, is a new block, is an implementation detail
<whitequark> it doesn't even have to be a block at all
<octachron> you are right, sorry
mk9 has quit [Quit: mk9]
<octachron> wait; no you could add unboxed, why add one more layer of boxing just for a type-level trick?
<whitequark> ephemerons
<whitequark> if the key of an ephemeron is dead (or an int!) the mapping is removed
<whitequark> ha, I found a soundness bug in OCaml
<whitequark> pretty fundamental too
<whitequark> well, fundamental to the runtime
jnavila has joined #ocaml
mfp has joined #ocaml
dhil has joined #ocaml
<whitequark> oh, hm, not actually a *soundness* bug
<whitequark> darn
<whitequark> just a bug in equality i think
zolk3ri has joined #ocaml
<whitequark> octachron: you are actually right, I can unbox the key too.
Haudegen has joined #ocaml
ozzymcduff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nahra has joined #ocaml
zozozo has quit [Ping timeout: 265 seconds]
zozozo has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
jao has joined #ocaml
jnavila has quit [Ping timeout: 240 seconds]
orbifx has joined #ocaml
silver has joined #ocaml
Fare has joined #ocaml
orbifx has quit [Ping timeout: 245 seconds]
drewr has joined #ocaml
sz0 has joined #ocaml
jnavila has joined #ocaml
sh0t has joined #ocaml
pierpal has quit [Remote host closed the connection]
malina has joined #ocaml
shinnya has quit [Ping timeout: 256 seconds]
dejanr has quit [Ping timeout: 245 seconds]
FreeBirdLjj has joined #ocaml
pierpal has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
sh0t has quit [Remote host closed the connection]
FreeBirdLjj has quit [Ping timeout: 264 seconds]
dejanr has joined #ocaml
mbuf has joined #ocaml
spew has joined #ocaml
sh0t has joined #ocaml
FreeBirdLjj has joined #ocaml
neiluj has joined #ocaml
<neiluj> Hi ! I'm wrestling with ocaml's package manager opam : there's a lot of packages which can't compile because of the error "Unbound module Toploop"
<neiluj> I'm using ocaml 4.06 and opam 1.2.2 if it might help
ozzymcduff has joined #ocaml
whitequark has left #ocaml [#ocaml]
shinnya has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
spew has quit [Ping timeout: 240 seconds]
neiluj has quit [Ping timeout: 240 seconds]
spew has joined #ocaml
neiluj has joined #ocaml
<octachron> neiluj, if you are using archlinux, you are missing the ocaml-compiler-libs package
<octachron> also opam-owned installation of ocaml(i.e. opam switch 4.06.1) are often more reliable than system-wide installation
<neiluj> octachron: yes, I'm using archlinux, I'll look at it
<neiluj> thank you
jmiven has quit [Quit: co'o]
jmiven has joined #ocaml
ozzymcduff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Fare has quit [Ping timeout: 260 seconds]
Fare has joined #ocaml
<neiluj> yes, it eventually compiled !
spew has quit [Ping timeout: 268 seconds]
<dmbaturin_> octachron: I'm wondering what would be the best way to reconcile opam-owned compilers with package build tools that use a fake root.
tane has joined #ocaml
shinnya has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
mk9 has joined #ocaml
<octachron> dmbaturin_, I have no idea
mk9 has quit [Client Quit]
agravier has joined #ocaml
agravier has quit [Client Quit]
mbuf has quit [Quit: Leaving]
neiluj has quit [Ping timeout: 265 seconds]
neiluj has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 245 seconds]
spew has joined #ocaml
magicbit has quit [Quit: leaving]
ozzymcduff has joined #ocaml
malina has quit [Ping timeout: 264 seconds]
octarin has joined #ocaml
<octarin> Hi
<octarin> Is it possible to make a function couples x k, such that couples x 0 = x, couples x k = (x, couples x (k-1)) or is is forbidden by the fact OCaml is static ?
neiluj has quit [Read error: Connection reset by peer]
<Fardale> octarin: have you try to write the type of such function ?
<octarin> Fardale: I can’t of course
<octarin> I don’t know the result type, it depends of the second argument
<Fardale> If you can't write the type then you can't have such function
<thizanne> octarin: why exactly would you want to write this ?
<octarin> thizanne: i have a program that constructs intersections of finite automatons
<thizanne> yeah you'll need to be a little more precise :)
<octarin> the automatons are represented by their transition function which is a ('a * 'b * 'a) list
<thizanne> but as you wrote it, your result is basically a list of k elements (each one being x)
<octarin> well, the problem is the intersection of two automatons has a different type
<octarin> inter : ('a * 'b * 'a) list -> ('c * 'b * 'c) list -> (('a * 'c) * 'b * ('a * 'c))
<octarin> list
Haudegen has quit [Read error: Connection reset by peer]
<octarin> So, for example, if I have a bunch of (int * int * int) automatons, for which I know 0 is the init state
<octarin> How do I construct the init state of the intersection ?
<octachron> with "let pair init_1 init_2 = init_1, init_2" ?
<thizanne> ↓
<thizanne> ↑ and repeatedly calling pair
<octarin> what’s the difference with my previous function ?
<thizanne> but you can't write this for an arbitrary number (a list) of automatas
<thizanne> because you don't know yet what will the type of the resulting automaton's states will be
<octarin> well, that’s what I wanted to do
<thizanne> then you'll want a list, as I suggested
<thizanne> if you want to intersect a list of automatas, the resulting automaton states are lists
<octarin> ok
<octarin> so it should be inter : ('a, 'b, 'a) list -> ('a, 'b, 'a) list -> ('a list, 'b, 'a list) list
<thizanne> yes
<octachron> but could keed pair when the number of intersection is statically known
<octachron> i.e. tuples for a statistically known number of intersections, and lists for when the number of automatons are not known
ozzymcduff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
malina has joined #ocaml
Guest12953 has joined #ocaml
pzp has joined #ocaml
arthur_rainbow has joined #ocaml
<arthur_rainbow> Hi. Apart from having true:traverse in _tags and having -r when calling ocamlbuild, is there anything else I can do to tell it to consider files in subdirectories ? 
<arthur_rainbow> I've got a file formula/Ast.ml and formula/Ast.mli, but they are not copied by ocamlbuild into _build, and I can't understand why
<arthur_rainbow> thus, I obtain the message Error: Unbound module Ast Command exited with code 2.
steenuil has quit [Remote host closed the connection]
<octachron> you probably need to add "<formula>: include"
<thizanne> I don't have any traverse thing and I don't use -r
<thizanne> but yeah octachron said it
<thizanne> I have a src/ dir containing all diles, and <src>: include
<thizanne> and <src/*>: include and <src/*/*>: include
<thizanne> (I guess I have two subdirs nested somewhere)
<arthur_rainbow> 1) it works, so thank you
<arthur_rainbow> 2) this makes no sens. Whats the point of traverse, of -r, in this case ?
<thizanne> I don't remember
<thizanne> isn't it when you go upwards ?
Guest12953 has quit [Remote host closed the connection]
<arthur_rainbow> I don't know what «upward» means here.
<arthur_rainbow> according to documentation "If the option -r (for recursive) is passed, then all subdirectories (recursively) are considered part of the source directories by default, except the build directory and directories that look like version-control information"
<arthur_rainbow> Well, I'll just accept that I put this magic line in _tag, and it works, thanks
<octachron> the point of -r and traverse is that they make ocamlbuild look at the corresponding subdirectories
<octachron> however, it does not mean that ocamlbuild knows that it should pass the "-I subdirectory" option to the compiler when building code outside of this subdirectory
<arthur_rainbow> oh
<arthur_rainbow> ok
<arthur_rainbow> I guess It kind of makes sens
<arthur_rainbow> thank you
dhil has quit [Ping timeout: 256 seconds]
magicbit has joined #ocaml
jack5638 has quit [Ping timeout: 248 seconds]
jack5638 has joined #ocaml
ozzymcduff has joined #ocaml
Fare has quit [Ping timeout: 260 seconds]
Fare has joined #ocaml
malina has quit [Remote host closed the connection]
steenuil has joined #ocaml
tane has quit [Quit: Leaving]
ozzymcduff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Fare has quit [Ping timeout: 248 seconds]
Fare has joined #ocaml
pzp has quit [Quit: Connection closed for inactivity]
spew has quit [Ping timeout: 248 seconds]
jnavila has quit [Remote host closed the connection]
Fare has quit [Ping timeout: 240 seconds]
spew has joined #ocaml
slf has joined #ocaml
slf has quit [Client Quit]
argent_smith has quit [Quit: Leaving.]
soupladler has joined #ocaml
Fare has joined #ocaml
spew has quit [Ping timeout: 260 seconds]
Fare has quit [Ping timeout: 265 seconds]
pitastrudl has quit [Remote host closed the connection]
pierpal has quit [Ping timeout: 260 seconds]
granttrec has joined #ocaml
kakadu has quit [Remote host closed the connection]
pierpa has joined #ocaml
silver_ has joined #ocaml
pitastrudl has joined #ocaml
cbot has joined #ocaml
silver has quit [Ping timeout: 264 seconds]
shinnya has joined #ocaml
soupladler has quit [Ping timeout: 248 seconds]
pitastrudl has quit [Remote host closed the connection]
pitastrudl has joined #ocaml
octarin has quit [Quit: leaving]
arthur_rainbow has quit [Read error: Connection reset by peer]