<whitequark>
"FIXME: A direct way now exists", which is that?
tennix has joined #ocaml
<companion_cube>
probably `let h: type a. a -> a = r.g in h x, h y`?
<companion_cube>
(not sure it works)
<whitequark>
mhmhmmmm
<whitequark>
yes, it does
aphprentice has joined #ocaml
larhat has quit [Quit: Leaving.]
<def`>
companion_cube: then just let h = r.g in ...
<companion_cube>
oh, really? nice
<def`>
I don't know what this direct way is?! This is suspicious.
<whitequark>
more like let h: type a. a -> a = fun x -> x in h 1, h 1.0;;
<def`>
whitequark: this always worked
<def`>
hinler-milner is about let-generalization, it's when you have an argument that it is problematic
<companion_cube>
ohhh
<def`>
(and I don't know any direct way)
mistermetaphor has quit [Remote host closed the connection]
mistermetaphor has joined #ocaml
<ggole>
As far as I know you need to go through a record or object to get polymorphic arguments
<def`>
Yes. There is a direct way in the ast (there is a node for type quantification)
averell has joined #ocaml
<def`>
but it will make the type-checker fails randomly
<def`>
(you can still write a ppx for introducing this node)
<ggole>
It would be sorta nice if you could do it directly (requiring annotations, of course)
<ggole>
The record/etc workaround isn't difficult but it is a bit tedious
lindig has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<whitequark>
when were locally abstract types introduced? 4.01?
<whitequark>
oh, 3.12
toomuchtvrotsurb has joined #ocaml
<whitequark>
companion_cube: wait
<whitequark>
that doesn't actually work
<whitequark>
you cannot write a signature of f
<whitequark>
let f g = let h: type a. a -> a = g in h x, h y;;
<whitequark>
this would let a escape
<ggole>
If you want a type variable that is 'rigid', rather than abstract, let f g = let h: 'a . 'a -> 'a = g in h x, h y;;
<ggole>
(But this won't type check either.)
<whitequark>
exactly
<ggole>
So for this you really do need the silly record
<ggole>
type poly_id = { f : 'a . 'a -> 'a } let f g = let h = g.f in h 0, h '0' or whatever
<octachron>
This ocaml.org faq really needs to be updated . Comparisons between Ocaml and Caml light scare me.
<whitequark>
guess what rampage I'm on
<whitequark>
the part that really pissed me off was how it referred to chapter 7 as "subject to change at any time"
dsheets has quit [Remote host closed the connection]
<ggole>
Sounds like you need to subject it to some change.
amnn_ has quit [Read error: Connection reset by peer]
dsheets has joined #ocaml
amnn has joined #ocaml
<octachron>
whitequark: well, would you prefer "the chapter for all the new shiny features, some quite stable, some not, some even very stable, but good luck understanding the difference by yourself"?
<flux>
octachron, honesty in advertising :)
<whitequark>
octachron: yes
shinnya has joined #ocaml
lokien_ has joined #ocaml
<whitequark>
and I would even more prefer for the vast majority of chapter 7 to graduate into "stable features"
<whitequark>
possibly just all of it, since I'm not sure if extensions were ever *removed*
<whitequark>
in any case there is no meaningful notion of the "OCaml core language" and hence no meaningful notion of "extensions" either
<whitequark>
it is an arbitrary distinction that communicates absolutely nothing to a reader
<companion_cube>
but, isn't the current policy to enforce almost perfect retrocompatibility?
<whitequark>
exactly
<edwin>
I think it should be language version or something like that
amnn has quit [Read error: Connection reset by peer]
<edwin>
the extensions are mostly sorted by the compiler version they were introduced, no?
<ggole>
Compatibility modulo naughty stuff (and some corner cases of disreputable operations like ==)
amnn has joined #ocaml
<whitequark>
well the link was broken
<ggole>
But I don't think that's what chap. 7 has in mind
<whitequark>
in the FAQ
<whitequark>
so clearly section anchors change at least
amnn has quit [Read error: Connection reset by peer]
amnn has joined #ocaml
ril is now known as ril[away]
ril[away] has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<whitequark>
rampage finished
<whitequark>
just 4 PRs this time
<companion_cube>
so efficient
<companion_cube>
my secret wish would be a oasis fork by whitequark :]
<octachron>
My main problem with this chapter 7 is that it mixes unstable features (that might break in the future) and somewhat recent stable feature without any indication of the difference between the two
<companion_cube>
which features are likely to break?
<companion_cube>
(I don't think, for instance, that recursive modules are going to disappear)
<whitequark>
companion_cube: why do you hate me so much
<octachron>
Not disappear, but being changed enough to break existing code seems possible for the recursive value/module extension
yunxing has joined #ocaml
<companion_cube>
whitequark: I don't hate you :p
<whitequark>
>oasis fork
<companion_cube>
well, you are so efficient it would be easy! ;)
<whitequark>
yes but the levels of hatred would be overwhelming
<companion_cube>
:D
orbifx has joined #ocaml
mistermetaphor has quit [Read error: Connection reset by peer]
Simn has joined #ocaml
tennix has quit [Ping timeout: 276 seconds]
dsheets has quit [Remote host closed the connection]
vanesssa has joined #ocaml
mistermetaphor has joined #ocaml
shinnya has quit [Ping timeout: 265 seconds]
dsheets has joined #ocaml
octachron has quit [Quit: Page closed]
dsheets has quit [Ping timeout: 250 seconds]
govg has joined #ocaml
toomuchtvrotsurb has quit [Remote host closed the connection]
whitequark has left #ocaml [#ocaml]
ygrek has joined #ocaml
govg has quit [Ping timeout: 252 seconds]
govg has joined #ocaml
lindig has joined #ocaml
vanesssa has quit [Read error: Connection reset by peer]
ygrek has quit [Ping timeout: 250 seconds]
govg has quit [Ping timeout: 252 seconds]
rgrinberg has quit [Ping timeout: 276 seconds]
yunxing has quit [Remote host closed the connection]
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lindig has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
orbifx has quit [Read error: Connection reset by peer]
rgrinberg has joined #ocaml
lindig has joined #ocaml
tane has joined #ocaml
kakadu has quit [Quit: Page closed]
butts_butts has joined #ocaml
lindig has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lindig has joined #ocaml
tane has quit [Ping timeout: 240 seconds]
lindig has quit [Client Quit]
toomuchtvrotsurb has joined #ocaml
leyyin has joined #ocaml
ggole has quit []
<rseymour>
you folks ^ are so productive in ocaml it has made me start learning
yunxing has joined #ocaml
tane has joined #ocaml
lindig has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
butts_butts has quit [Ping timeout: 252 seconds]
hay207 has quit [Ping timeout: 252 seconds]
hay207 has joined #ocaml
mistermetaphor has quit [Read error: Connection reset by peer]
octachron has joined #ocaml
darkf has quit [Read error: Connection reset by peer]
mistermetaphor has joined #ocaml
govg has joined #ocaml
octachron has quit [Ping timeout: 260 seconds]
NingaLeaf has joined #ocaml
<seliopou>
any "sequence" implementations floating around out there that support push/pop on both the head and the tail?
<flux>
my guess is 'yes' :)
<seliopou>
:D
<flux>
"CCFQueue, a purely functional double-ended queue structure"
<flux>
so Containers.data has one
<seliopou>
ah
<seliopou>
thx
<flux>
now that there is are tools for searching functions by their signature..
<flux>
we should also have a tool for searching modules by their signature!
<flux>
not sure if it would be that helpful for such queries without descriptive function names though :)
<flux>
"have at least 4 functions of type 'a t -> 'a -> 'a t"
<companion_cube>
heh
<companion_cube>
it would be nice to be able to search by random test
<companion_cube>
i.e. by law
<flux>
now that would be something indeed
<flux>
you could write a test and it would just start trying with whichever functions it finds
<seliopou>
CCDeque's close to what i'm looking for
<flux>
..but?-)
<seliopou>
i suppose i could vendor the module :)
octachron has joined #ocaml
<flux>
so what is it missing?
<companion_cube>
are you looking for a mutable or immutable version?
idegen has joined #ocaml
<seliopou>
companion_cube: mutable
<flux>
you can make it mutable by using references. but I suppose a true mutable double-ended linked list would be faster.
<seliopou>
it's mutable
<seliopou>
containers is too big a dep tho, but like i said, vendoring is an option
hay207_ has joined #ocaml
<flux>
..altering? copying? I'm not quite familiar with this use of 'vendor'..
amnn has joined #ocaml
<companion_cube>
the deque is definitely faster than the fqueue
<companion_cube>
seliopou: I suggest that you test it a bit with containers as a dep, and then vendor it if it fits
hay207 has quit [Ping timeout: 276 seconds]
<seliopou>
companion_cube: for sure
<flux>
oh I didn't notice there was plain CCQueue as well
<companion_cube>
(although, well, containers is not big a dep: if you use only one module, you only link one module)
<seliopou>
there's perception and then there's reality :)
amnn has quit [Read error: No route to host]
amnn has joined #ocaml
<seliopou>
companion_cube: you should emblazon that fact in the README
<companion_cube>
heh
<seliopou>
like right at the top
<companion_cube>
oh, maybe I should
<seliopou>
and also (constructive feedback), I'm a fan of hypercubes as much as the next guy, but whenever I see README's with images at the top, I never read them
<companion_cube>
hmmmm
<companion_cube>
ok, give me 5s
amnn has quit [Read error: Connection reset by peer]
amnn_ has joined #ocaml
<flux>
"so now the cube is rotating, better?"
<companion_cube>
:p
<seliopou>
lol
sfri has quit [Ping timeout: 260 seconds]
<seliopou>
flux: vendoring is when you copy code into your own repository rather than adding a dependency to your project
<flux>
what's wrong with embedding or copying.. :)
<seliopou>
it's a common way in a lot of web languages to pin versions or include versions of libraries with custom changes, bug fixes, features, etc that haven't been upstreamed
<seliopou>
it's a standard term in a lot of engineering circles
<flux>
hmph, I imagine a lot of web engineering circles ;)
<companion_cube>
seliopou: better now?
<seliopou>
usually you put the code in a directory called `vendor/`
<seliopou>
companion_cube: \o/
<seliopou>
wooo
<companion_cube>
I hope images are not forbidden everywhere in the readme :)
<seliopou>
if i had my way, but this is a very nice compromise
Simn has quit [Ping timeout: 260 seconds]
<flux>
though I've seen a vendor-directory at least in one project.
<flux>
or was it perhaps "3rdparty"
<companion_cube>
containers is designed so that vendoring is easy, but of course you don't benefit from bugfixes or perf improvements
<flux>
probably, because I don't have a source tree with 'vendor' on my ~/src/ext ;)
yunxing has quit [Remote host closed the connection]
toomuchtvrotsurb has quit [Remote host closed the connection]
toomuchtvrotsurb has joined #ocaml
govg has quit [Ping timeout: 265 seconds]
govg has joined #ocaml
sfri has joined #ocaml
yunxing has joined #ocaml
bba has quit [Ping timeout: 246 seconds]
ygrek has joined #ocaml
zozozo has quit [Quit: WeeChat 1.5]
zozozo has joined #ocaml
dsheets has joined #ocaml
mistermetaphor has quit [Read error: Connection reset by peer]
<seliopou>
companion_cube: i am a fan of your @since annotations
<companion_cube>
oh, thanks! It's one of the parts of ocamldoc I use a lot
<seliopou>
I will attempt to adopt it as well
bba has joined #ocaml
dsheets has quit [Ping timeout: 276 seconds]
mistermetaphor has joined #ocaml
amnn_ has quit [Read error: Connection reset by peer]
amnn has joined #ocaml
ygrek has quit [Ping timeout: 246 seconds]
amnn has quit [Read error: No route to host]
amnn has joined #ocaml
dsheets has joined #ocaml
sfri has quit [Ping timeout: 260 seconds]
ril has joined #ocaml
sfri has joined #ocaml
<gasche>
seliopou: for the record, Batteries has Dllist (mutable circular doubly-linked lists), Deque (functional double-ended queues), and FingerTree if you want to go amortized for a faster concat/append
<gasche>
(it's also immutable)
amnn has quit [Read error: Connection reset by peer]
amnn has joined #ocaml
dsheets has quit [Ping timeout: 276 seconds]
<seliopou>
gasche: good to know!
<seliopou>
looks like they're all indepdendent too!
MercurialAlchemi has quit [Ping timeout: 276 seconds]
<seliopou>
the fingertree is giving me haskell nostalgia :)
<seliopou>
it'll be short-lived, i'm sure
<companion_cube>
hmm, i don't remember, what is Deque based on?
govg has quit [Ping timeout: 260 seconds]
govg has joined #ocaml
mistermetaphor has quit [Read error: Connection reset by peer]
toomuchtvrotsurb has quit [Remote host closed the connection]
A1977494 has quit [Remote host closed the connection]
sfri has quit [Ping timeout: 260 seconds]
toomuchtvrotsurb has joined #ocaml
Algebr`` has joined #ocaml
mistermetaphor has joined #ocaml
rgrinberg has quit [Ping timeout: 276 seconds]
sfri has joined #ocaml
lokien_ has quit [Quit: Connection closed for inactivity]
dsheets has joined #ocaml
leyyin has quit [Quit: So Long, and Thanks for All the Fish]
sfri has quit [Quit: No Ping reply in 180 seconds.]
toomuchtvrotsurb has quit [Remote host closed the connection]
sfri has joined #ocaml
dsheets has quit [Ping timeout: 246 seconds]
yegods has joined #ocaml
lindig has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 260 seconds]
mistermetaphor has quit [Read error: Connection reset by peer]
octachron has quit [Read error: Connection reset by peer]
octachron has joined #ocaml
dsheets has joined #ocaml
mistermetaphor has joined #ocaml
dsheets has quit [Ping timeout: 260 seconds]
tane has quit [Quit: Verlassend]
rwmjones has quit [Ping timeout: 252 seconds]
rgrinberg has joined #ocaml
dsheets has joined #ocaml
lokien_ has joined #ocaml
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dsheets has quit [Ping timeout: 276 seconds]
lokien_ has quit [Client Quit]
ril has joined #ocaml
toomuchtvrotsurb has joined #ocaml
rwmjones has joined #ocaml
ril has quit [Client Quit]
govg has quit [Ping timeout: 260 seconds]
govg has joined #ocaml
bba has quit [Read error: Connection reset by peer]
ril has joined #ocaml
bba has joined #ocaml
dsheets has joined #ocaml
mistermetaphor has quit [Ping timeout: 260 seconds]
mistermetaphor has joined #ocaml
dsheets has quit [Ping timeout: 240 seconds]
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 252 seconds]
toomuchtvrotsurb has quit [Ping timeout: 250 seconds]
yunxing has quit [Remote host closed the connection]
toomuchtvrotsurb has joined #ocaml
mistermetaphor has quit [Read error: Connection reset by peer]
toomucht_ has joined #ocaml
amnn has quit [Read error: Connection reset by peer]
toomuchtvrotsurb has quit [Ping timeout: 250 seconds]
amnn has joined #ocaml
mistermetaphor has joined #ocaml
butts_butts has joined #ocaml
dsheets has joined #ocaml
Sorella has joined #ocaml
dsheets has quit [Ping timeout: 276 seconds]
mistermetaphor has quit [Read error: Connection reset by peer]
mistermetaphor has joined #ocaml
dsheets has joined #ocaml
yunxing has joined #ocaml
toomucht_ has quit [Remote host closed the connection]
toomuchtvrotsurb has joined #ocaml
bba has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
toomuchtvrotsurb has quit [Remote host closed the connection]
dsheets has quit [Ping timeout: 260 seconds]
octachron has quit [Quit: Leaving]
toomuchtvrotsurb has joined #ocaml
toomuchtvrotsurb has quit [Remote host closed the connection]
dsheets has joined #ocaml
butts_butts has quit [Ping timeout: 260 seconds]
dsheets has quit [Ping timeout: 244 seconds]
nicholasf has joined #ocaml
dsheets has joined #ocaml
destrius has quit [Remote host closed the connection]
hay207__ has joined #ocaml
hay207_ has quit [Ping timeout: 260 seconds]
dsheets has quit [Ping timeout: 260 seconds]
lindig has joined #ocaml
theblatte has quit [Ping timeout: 250 seconds]
Denommus has joined #ocaml
dsheets has joined #ocaml
lindig has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dsheets has quit [Ping timeout: 250 seconds]
madroach has quit [Ping timeout: 244 seconds]
madroach has joined #ocaml
walter|r has joined #ocaml
mistermetaphor has quit [Read error: Connection reset by peer]
dsheets has joined #ocaml
mistermetaphor has joined #ocaml
dsheets has quit [Ping timeout: 260 seconds]
pierpa has quit [Ping timeout: 240 seconds]
dsheets has joined #ocaml
mistermetaphor has quit [Read error: Connection reset by peer]