flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.01.0 http://bit.ly/1851A3R | http://www.ocaml.org | Public logs at http://tunes.org/~nef/logs/ocaml/
tautologico has quit [Quit: zzz]
Simn has quit [Quit: Leaving]
malvarez has quit [Read error: Connection reset by peer]
csakatoku has joined #ocaml
malvarez has joined #ocaml
talzeus has quit [Read error: Connection reset by peer]
sheijk_ has joined #ocaml
sheijk has quit [Ping timeout: 250 seconds]
struktured_ has joined #ocaml
tautologico has joined #ocaml
csakatoku has quit [Remote host closed the connection]
csakatoku has joined #ocaml
csakatoku has quit [Remote host closed the connection]
csakatoku has joined #ocaml
thomasga has joined #ocaml
malvarez has quit [Read error: Connection reset by peer]
peterbb has quit [Ping timeout: 250 seconds]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
Guest24232 is now known as amiller
amiller has quit [Changing host]
amiller has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
tautologico has quit [Quit: zzz]
peterbb has joined #ocaml
Neros has quit [Ping timeout: 245 seconds]
talzeus has joined #ocaml
_5kg_ has quit [Read error: Connection reset by peer]
ygrek has joined #ocaml
thomasga has quit [Quit: Leaving.]
_5kg has joined #ocaml
csakatok_ has joined #ocaml
Xenasis has joined #ocaml
csakatok_ has quit [Remote host closed the connection]
csakatok_ has joined #ocaml
csakatok_ has quit [Remote host closed the connection]
csakatoku has quit [Ping timeout: 272 seconds]
tautologico has joined #ocaml
csakatoku has joined #ocaml
peterbb has quit [Ping timeout: 265 seconds]
csakatoku has quit [Remote host closed the connection]
sheijk_ has quit [Quit: .]
peterbb has joined #ocaml
strobegen has joined #ocaml
wolfnn has quit [Ping timeout: 246 seconds]
boogie has quit [Remote host closed the connection]
peterbb has quit [Ping timeout: 260 seconds]
peterbb has joined #ocaml
tautologico has quit [Quit: Entscheidungsproblem]
ollehar has joined #ocaml
ygrek has quit [Ping timeout: 260 seconds]
peterbb has quit [Ping timeout: 272 seconds]
ygrek has joined #ocaml
Xenasis has quit [Remote host closed the connection]
cesar_ has joined #ocaml
peterbb has joined #ocaml
cesar_ is now known as Guest89259
michael_lee has joined #ocaml
ollehar has quit [Ping timeout: 260 seconds]
iZsh has quit [Ping timeout: 246 seconds]
lostcuaz has joined #ocaml
iZsh has joined #ocaml
iZsh has quit [Ping timeout: 240 seconds]
jave has quit [Ping timeout: 272 seconds]
jave has joined #ocaml
iZsh has joined #ocaml
zRecursive has left #ocaml []
Xenasis has joined #ocaml
manizzle has quit [Ping timeout: 240 seconds]
tlockney has quit [Ping timeout: 245 seconds]
tlockney has joined #ocaml
tlockney has quit [Excess Flood]
tlockney has joined #ocaml
MitoticSpindle has joined #ocaml
mal`` has quit [Ping timeout: 246 seconds]
pkrnj has joined #ocaml
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tulloch has joined #ocaml
mal`` has joined #ocaml
struktured_ has quit [Ping timeout: 252 seconds]
ggole has joined #ocaml
yacks has quit [Quit: Leaving]
iZsh has quit [Ping timeout: 272 seconds]
iZsh has joined #ocaml
boogie has joined #ocaml
tulloch has quit [Ping timeout: 240 seconds]
tulloch has joined #ocaml
michael_lee has quit [Quit: Ex-Chat]
tulloch_ has joined #ocaml
Xenasis has quit [Remote host closed the connection]
justdit has joined #ocaml
justdit is now known as sea-gull
tulloch has quit [Ping timeout: 272 seconds]
mreca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sea-gull has quit [Quit: leaving]
tulloch_ has quit [Ping timeout: 272 seconds]
tulloch has joined #ocaml
tulloch_ has joined #ocaml
tulloch has quit [Ping timeout: 272 seconds]
MitoticSpindle has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
tulloch_ has quit [Ping timeout: 272 seconds]
tulloch has joined #ocaml
groovy2shoes has quit [Quit: groovy2shoes]
tulloch_ has joined #ocaml
tulloch has quit [Ping timeout: 252 seconds]
tulloch has joined #ocaml
tulloch_ has quit [Ping timeout: 250 seconds]
groovy2shoes has joined #ocaml
groovy2shoes has quit [Client Quit]
<flux> adrien, windows does it via ad-hoc strings?
_5kg has quit [Ping timeout: 248 seconds]
ygrek has quit [Ping timeout: 248 seconds]
gustav_ has joined #ocaml
tulloch has quit [Ping timeout: 246 seconds]
strobegen has quit [Quit: Leaving.]
tulloch has joined #ocaml
tulloch has quit [Ping timeout: 240 seconds]
strobegen has joined #ocaml
ggole has quit [Ping timeout: 252 seconds]
jao has quit [Ping timeout: 240 seconds]
ygrek has joined #ocaml
yezariaely has joined #ocaml
wwilly has joined #ocaml
<wwilly> bonjour
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
dant3 has joined #ocaml
dant3 has quit [Client Quit]
dant3 has joined #ocaml
<adrien> flux: yup; and each "module" can add an error message; and there's something like 16k error messages on msdn
dant3 has quit [Remote host closed the connection]
dant3 has joined #ocaml
<flux> adrien, but atleast there is documentation for them, whereas it doesn't seem it exists for sdl2..
<flux> I think there must be a golden way between the 16k error messages and the unix shoehorning of errors to E* :)
<adrien> well
<adrien> you get some error code, windows turns it into "the reparse point buffer contains invalid data"
<adrien> documentation
<adrien> the data in the reparse point buffer is invalid
<adrien> :)
<adrien> I haven't put much thought in it but I don't know how to turn that into Unix-style exception
<adrien> (Unix, the ocaml module)
mika1 has joined #ocaml
cago has joined #ocaml
agnoctone has joined #ocaml
_5kg has joined #ocaml
jonludlam has quit [Ping timeout: 252 seconds]
dant3 has quit [Remote host closed the connection]
ollehar has joined #ocaml
<companion_cube> o/
zacts_ has joined #ocaml
aggelos_ has joined #ocaml
milosn has joined #ocaml
ggole has joined #ocaml
dkg_ has joined #ocaml
bobry has quit [*.net *.split]
flux has quit [*.net *.split]
PM has quit [*.net *.split]
amiller has quit [*.net *.split]
bentnib has quit [*.net *.split]
tristan_1 has quit [*.net *.split]
dkg has quit [*.net *.split]
companion_cube has quit [*.net *.split]
whitequark has quit [*.net *.split]
ambul has quit [*.net *.split]
ivan\ has quit [*.net *.split]
swistak35 has quit [*.net *.split]
zacts has quit [*.net *.split]
aggelos has quit [*.net *.split]
teiresias has quit [*.net *.split]
zpe has joined #ocaml
dant3 has joined #ocaml
Simn has joined #ocaml
bobry has joined #ocaml
flux has joined #ocaml
PM has joined #ocaml
amiller has joined #ocaml
bentnib has joined #ocaml
tristan_1 has joined #ocaml
companion_cube has joined #ocaml
whitequark has joined #ocaml
ambul has joined #ocaml
ivan\ has joined #ocaml
swistak35 has joined #ocaml
teiresias has joined #ocaml
dant3 has quit [Read error: Connection reset by peer]
dant3 has joined #ocaml
Simn is now known as Guest43261
Guest43261 is now known as Simn
ambul has quit [Ping timeout: 252 seconds]
divyansr has quit [Ping timeout: 245 seconds]
Simn has quit [*.net *.split]
bobry has quit [*.net *.split]
flux has quit [*.net *.split]
PM has quit [*.net *.split]
amiller has quit [*.net *.split]
bentnib has quit [*.net *.split]
tristan_1 has quit [*.net *.split]
companion_cube has quit [*.net *.split]
whitequark has quit [*.net *.split]
ivan\ has quit [*.net *.split]
swistak35 has quit [*.net *.split]
teiresias has quit [*.net *.split]
divyansr has joined #ocaml
Kakadu has joined #ocaml
Simn has joined #ocaml
bobry has joined #ocaml
flux has joined #ocaml
PM has joined #ocaml
amiller has joined #ocaml
bentnib has joined #ocaml
tristan_1 has joined #ocaml
companion_cube has joined #ocaml
whitequark has joined #ocaml
ivan\ has joined #ocaml
swistak35 has joined #ocaml
teiresias has joined #ocaml
ggole has quit [Read error: Connection timed out]
ggole has joined #ocaml
dant3_ has joined #ocaml
dant3 has quit [Read error: Connection reset by peer]
ocp has joined #ocaml
boogie has quit [Remote host closed the connection]
ambul has joined #ocaml
Guest89259 has quit [Remote host closed the connection]
osa1_ has joined #ocaml
osa1 has quit [Ping timeout: 240 seconds]
yacks has joined #ocaml
jonludlam has joined #ocaml
ollehar has quit [Ping timeout: 260 seconds]
avsm has joined #ocaml
dant3_ has quit [Remote host closed the connection]
yacks has quit [Remote host closed the connection]
dant3 has joined #ocaml
skchrko has joined #ocaml
talzeus has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 260 seconds]
watermind has joined #ocaml
ygrek has joined #ocaml
watermind has quit [Read error: Connection reset by peer]
watermind has joined #ocaml
yacks has joined #ocaml
Yoric has joined #ocaml
talzeus has joined #ocaml
thomasga has joined #ocaml
dant3 has quit [Remote host closed the connection]
talzeus has quit [Remote host closed the connection]
adrien_o1w has joined #ocaml
talzeus has joined #ocaml
snyp has joined #ocaml
adrien_oww has quit [Ping timeout: 245 seconds]
adrien_o1w is now known as adrien_oww
dant3 has joined #ocaml
ygrek has quit [Ping timeout: 246 seconds]
thomasga has quit [Quit: Leaving.]
<Kakadu> I think that it is a good candidate to gasche's list of small libraries: http://stackoverflow.com/questions/20654800/ocaml-mock-module-generation
snyp has quit [Quit: Leaving]
milosn has quit [Ping timeout: 246 seconds]
yacks has quit [Ping timeout: 252 seconds]
dant3 has quit [Remote host closed the connection]
dant3 has joined #ocaml
dsheets has quit [Ping timeout: 245 seconds]
sepp2k has joined #ocaml
<orbitz> Anyone have experience with unit testing async code?
milosn has joined #ocaml
kyrylo has joined #ocaml
thomasga has joined #ocaml
milosn has quit [Ping timeout: 240 seconds]
snyp has joined #ocaml
milosn has joined #ocaml
tulloch has joined #ocaml
yacks has joined #ocaml
dinosaure has joined #ocaml
kyrylo has quit [Ping timeout: 248 seconds]
snyp has quit [Quit: Leaving]
troydm has quit [Ping timeout: 252 seconds]
watermind has quit [Quit: Konversation terminated!]
watermind has joined #ocaml
ollehar has joined #ocaml
watermind has quit [Read error: Connection reset by peer]
watermind has joined #ocaml
dant3 has quit [Remote host closed the connection]
watermind has quit [Client Quit]
watermind has joined #ocaml
tulloch has quit [Ping timeout: 260 seconds]
dant3 has joined #ocaml
thomasga has quit [Quit: Leaving.]
watermind has quit [Quit: Konversation terminated!]
watermind has joined #ocaml
dant3 has quit [Read error: Connection reset by peer]
ollehar has quit [Ping timeout: 260 seconds]
osa1_ has quit [Quit: Konversation terminated!]
dant3 has joined #ocaml
wolfnn has joined #ocaml
fds has quit [Read error: Operation timed out]
fds has joined #ocaml
dsheets has joined #ocaml
ollehar has joined #ocaml
fds has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
watermind has quit [Quit: Konversation terminated!]
watermind has joined #ocaml
watermind has quit [Client Quit]
watermind has joined #ocaml
lostcuaz has joined #ocaml
lostcuaz has quit [Max SendQ exceeded]
lostcuaz has joined #ocaml
lostcuaz has quit [Client Quit]
lostcuaz has joined #ocaml
lostcuaz has quit [Client Quit]
fds has joined #ocaml
lostcuaz has joined #ocaml
ollehar has quit [Ping timeout: 260 seconds]
lostcuaz has quit [Ping timeout: 240 seconds]
lostcuaz has joined #ocaml
thomasga has joined #ocaml
mreca has joined #ocaml
gargaml has joined #ocaml
thomasga has quit [Quit: Leaving.]
introom has joined #ocaml
cago has quit [Quit: Leaving.]
struktured has joined #ocaml
thomasga has joined #ocaml
<companion_cube> hnrgrgr_: poke
introom has quit [Ping timeout: 246 seconds]
ygrek has joined #ocaml
<adrien_oww> run!
darkf has quit [Quit: Leaving]
mika1 has quit [Quit: Leaving.]
<companion_cube> he's hiding
Leviathan has joined #ocaml
Leviathan has left #ocaml []
yezariaely has quit [Quit: Leaving.]
yezariaely has joined #ocaml
<toordog> Hi, i got a new type of segfault. Some help would be welcome. https://www.refheap.com/df8f62b48a728d4266fd4846c
<adrien_oww> hmm, deep call-stack
<adrien_oww> easily reproducible?
<adrien_oww> which ocaml already?
<toordog> ocaml -version
<toordog> The Objective Caml toplevel, version 3.12.1
<toordog> not easily, in 20h 52 process generated 2 coredump
introom has joined #ocaml
<companion_cube> hey, it would be nice to be able to compile ocaml for the erlang runtime (which is apparently great for concurrency)
* adrien_oww grabs companion_cube, ties his hands, gags his mouth, blindfold him and sends him to mongolia so noone can hear his crazy ideas again
<adrien_oww> toordog: you're able to recompile ocaml?
<companion_cube> adrien_oww: heyyyyyyy
<companion_cube> there's a compilation backend for JS, so any other target can't be that crazy
<companion_cube> (php, maybe)
<jbrown> companion_cube: isn't the erlang runtime basically a bytecode interpreter?
<Drup> companion_cube: evm_of_ocaml ? :D
<companion_cube> jbrown: I think so
<jbrown> the ghc runtime on the other hand...
<companion_cube> it has tail call
<companion_cube> it may even have weak tables...
<companion_cube> also, hot swapping of code
<toordog> adrien_oww not really
<adrien_oww> ok
<toordog> i believe it's coming from the code we created which is a module for liquidsoap
<adrien_oww> there isn't a lot of info there
<toordog> but i don't have a clue to where these call come from
WraithM_ has joined #ocaml
<toordog> ok
<adrien_oww> I suspect a stack overflow because of the depth of the callstack but it's not _that_ deep either
<adrien_oww> otoh the fact that it crashes in some code that catches an exception is quite surprising
<toordog> yesterday, we raised the stack size limit on the OS to allow ocaml to run without segfaulting
<toordog> we raised it to 8M
<thomasga> if someone wants to make me a nice gift for christmas, I would happily accept a build system which just works
<adrien_oww> well, it's an upper limit
* toordog snap his finger and once the smoke disapeared, a build system that actually works appear in front of thomasga
<thomasga> toordog: if only
<toordog> you have to believe for it to works thomasga ;)
<adrien_oww> thomasga: every time I've thought long about that, I ended up with the conclusion that we all ask quite a lot of different things that start very simple then grow _a_ _lot_
<adrien_oww> I'm not sure it's that doable
<adrien_oww> that said, ocamlbuild with less dynamic discovery is something I'd like to see
watermind has quit [Read error: Connection reset by peer]
watermind has joined #ocaml
<thomasga> adrien_oww: indeed
<thomasga> not sure such a thing exists, but that would be cool to have anyway
<toordog> adrien_oww so you think the issue could be the same as before with a not well managed memory allocation?
<thomasga> would be happy to have something which solves only 99% of my problems
<adrien_oww> I recently ended up having to add C code right inside yypkg; that's not something I ever expected to do
rom1504 has joined #ocaml
<adrien_oww> (at least it found a bug in cross-compilation patches)
<adrien_oww> toordog: dunno; I'd probably start finding what the exception is about
<adrien_oww> "caml_raise_exn"
jonludlam has quit [Ping timeout: 248 seconds]
<toordog> ok, i'll send it to the dev
<toordog> we might end up hiring a consultant in the end
dant3 has quit [Remote host closed the connection]
<adrien_oww> I'd look at the (C) code of caml_raise_exn() while doing "frame 2" in gdb and checking the parameters to the function to know which excepted has been triggered
<adrien_oww> you need to build with debug symbols too ;-)
<adrien_oww> and not strip
kyrylo has joined #ocaml
<adrien_oww> or strip to a separate file that gdb will be able to find when you load the core
jonludlam has joined #ocaml
shinnya has joined #ocaml
* companion_cube thinks the cloud of smoke will not disappear before years
<adrien_oww> companion_cube: err, ok
groovy2shoes has joined #ocaml
dsheets has quit [Quit: Leaving]
Xenasis has joined #ocaml
dsheets has joined #ocaml
travisbrady has joined #ocaml
dsheets has quit [Client Quit]
dsheets has joined #ocaml
chingfantsou has joined #ocaml
yezariaely has quit [Quit: Leaving.]
chingfantsou has left #ocaml []
Yoric has quit [Ping timeout: 260 seconds]
Kakadu has quit [Quit: Page closed]
Xenasis has quit [Remote host closed the connection]
skchrko has quit [Ping timeout: 260 seconds]
agnoctone has quit [Quit: Page closed]
oriba has joined #ocaml
dant3 has joined #ocaml
dant3 has quit [Ping timeout: 252 seconds]
Axord has quit [Quit: I'm sure it's perfectly safe]
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
dant3 has joined #ocaml
jwatzman|work has joined #ocaml
rwmjones has quit [Ping timeout: 245 seconds]
<whitequark> gasche_: hello
<whitequark> are GADTs powerful enough to represent the universal quantifier? say val concat : 'a stream -> 'a stream -> 'a stream
<companion_cube> this is already possible without GADT
<companion_cube> what becomes possible is the existential quantifier
<companion_cube> type exists_stream = | Foo : 'a stream -> exists_stream
<whitequark> companion_cube: sorry, you've missed the context of the question
rwmjones has joined #ocaml
Kakadu has joined #ocaml
<companion_cube> aww
<whitequark> is it more clear now?
<ggole> Is this the thing where you want to say "this type variable conveys no information about this variant", ie, it can be any leg?
<Drup> whitequark: don't use Stream :/
<whitequark> ggole: no, this is an entirely different problem
<whitequark> Drup: hm? why?
<ggole> Righto
<Drup> whitequark: because it's full of so many issues it's not even funny anymore
* ggole wishes there was a way to do that without a silly wrapper
<whitequark> Drup: I'm using Lwt_stream in my actual code
<Drup> I'm talking about the stream from the standard library
<whitequark> yeah, in the example it's just for demonstration purposes
<Drup> ok
introom has quit [Ping timeout: 272 seconds]
<Drup> whitequark: a reason why you don't want to describe this stuff in caml with some sort of dsl ?
<toordog> adrien_oww is there anything in the runtime of ocaml that could fill a buffer unlessly leading to a stack overflow or segfault ?
<whitequark> Drup: I want to be able to load a plan at runtime without recompilation
<Drup> whitequark: and compilation + runtime dynlink doesn't suit you, I suppose
<whitequark> Drup: yes, I would like to avoid that
<Drup> make sense
demonimin has quit [Ping timeout: 245 seconds]
<whitequark> for a variety of reasons, starting with the fact you cannot unload a dynlinked library
<adrien_oww> toordog: there shouldn't be; if you can, you should really try to reproduce the issue on a separate machine and put a newer ocaml there
<adrien_oww> there have been quite a lot of changes which could help you a lot when trying to find such issues
<adrien_oww> (especially stack overflow since you should get an earlier warning)
<toordog> i don't have any idea how to reproduce it actually. on 52 process running, only 2 segfault like that in 20h lenght of time.
<toordog> i think that the segfault happen when an error is raised but not handled correctly
<Drup> whitequark: what issues do you have with concat ?
milosn has quit [Ping timeout: 272 seconds]
<toordog> i have 2 server running with ocaml 4.x
<whitequark> Drup: say, `square' has an OCaml signature int stream -> int stream and is defined like this: let square : _ typed = (Fun (Stream Int, Stream Int), square)
<whitequark> `concat' has an OCaml signature 'a stream -> 'a stream -> 'a stream and would be defined like this: let concat : _ typed = (Fun (Stream ?, Fun (Stream ?, Stream ?)), concat)
<whitequark> in the place of ? should be the GADT representation of the type variable
<whitequark> but I don't know how to define it
jonludlam has quit [Read error: Operation timed out]
<companion_cube> isn't more a "compose" function?
<whitequark> companion_cube: well, I think it's called "append" in Lwt_stream
<companion_cube> oh, all the type variables are the same?
<whitequark> but that doesn't really matter
<companion_cube> the three "?"
<whitequark> companion_cube: yes
ocp has quit [Ping timeout: 246 seconds]
<companion_cube> ah
<whitequark> I can add a branch, say, | Typevar : int -> 'a typ
<companion_cube> you can write "forall", conceptually, with a record containing a function
<whitequark> but I don't know how to actually check for equivalence with such definition
<Drup> whitequark: I don't think it's a good idea
<companion_cube> type 'a foo = {'b. ('a -> 'b) -> 'b; }
<companion_cube> type 'a foo = {call:'b. ('a -> 'b) -> 'b; }
<companion_cube> (that's to do CPS)
<whitequark> companion_cube: I'm not sure I see how is this relevant
<companion_cube> well, you asked for a universal quantifier ;)
<companion_cube> (but I'm not sure either)
<whitequark> Drup: I just had an idea
jonludlam has joined #ocaml
<whitequark> Drup: if I somehow know the type bound to the type variable in advance, it's possible to do this:
<whitequark> let a = Int (* Float, String, ... *) in
<whitequark> Dyn (Fun (Stream a, Fun (Stream a, Stream a)), fun (S x) (S y) -> S (Lwt_stream.append x y))
<toordog> adrien_oww this one is on ocaml 4.x *different type of segfault. https://www.refheap.com/f57b17367ad4824d745a0a656
<toordog> they are maybe not related, it's quite possible that I have 3-4 separate bugs taht generate segfault
<whitequark> but, there still needs one leap before this could become usable
<adrien_oww> toordog: most probably unrelated, yeah
<Drup> whitequark: doesn't really help to have polymorphism
<adrien_oww> toordog: but you got all these issues at once or you were not taking care of them before and they accumulated?
<adrien_oww> anyway, that last one is probably something a C dev can handle
<whitequark> Drup: see, with the code above, I could, say, have a family of functions named "concat.Int", "concat.Float" with the appropriate types
<whitequark> which is not really polymorphism but it is close
<adrien_oww> toordog: the only thing to know is that an ocaml string has its length at the beginning of the string
<Drup> whitequark: it's not polymorphism at all x)
dant3 has quit [Remote host closed the connection]
<whitequark> Drup: sure
dant3 has joined #ocaml
dkg_ is now known as dkg
<Drup> whitequark: maybe I'm saying completly stupid, because this is not my strongest area
<Drup> but it may be possible to add a constructor "Poly : ('a typ -> 'b typ) -> 'b typ"
<whitequark> oh, interesting. how would you use one?
<Drup> and in this case, you can have : let concat : _ typed = Poly (fun a -> Fun (Stream a, Fun (Stream a, Stream a))), Stream.concat
<Drup> I didn't try to write the run function, I will let it at an exercise for the reader =°
boogie has joined #ocaml
<whitequark> oh, amazing, thank you
<Drup> write the run function first, then thanks me. I'm not sure it will work
groovy2shoes has quit [Ping timeout: 240 seconds]
<whitequark> hm, the problem with your Poly variant is that it's impossible to deconstruct it
<whitequark> it's essentially the same as my solution
<whitequark> except a little cleaner
<Drup> yeah, that was what I was afraid of
<Drup> (well, you can deconstruct it, but you end up with an existential)
<companion_cube> it may be the right time to use universal types ;) https://ocaml.janestreet.com/?q=node/18
<Drup> companion_cube: it's already a universal (an existential inside a negation)
<companion_cube> not this meaning of universal
<Drup> and the use case it's just not the good one
mreca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<companion_cube> well too bad, that's the cleanest way to bypass the type system I know ^^
<ggole> Univ is such a nice hack, but I dunno if I would want to *use* it...
<whitequark> companion_cube: ha, I've seen sweeks' solution in someone's universal hash table, I think it was called Multitbl or like that
<Drup> ggole: same
<whitequark> Drup: I could make it work if I would have some kind of template to match against
<whitequark> (isn't this how parametric types work in ML?)
Kakadu has quit [Remote host closed the connection]
Kakadu has joined #ocaml
<Simn> I hope you don't mind if I chime in with a non-OCaml GADT question while you're on the subject. Should it be allowed to have constructors of different types in an or-pattern while matching? Here's a Haxe example of what I mean: https://github.com/HaxeFoundation/haxe/issues/2473
<Drup> whitequark: not irrelevant to the subject : http://cs.au.dk/~mpuech/typeful.pdf
<Simn> I don't have OCaml 4 installed to test at the moment. :)
<Drup> whitequark: there is another paper on the subject, but I don't find it right now
mreca has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
<Drup> Simn: not authorised in ocaml
<Drup> it could probably be possible in theory
boogie has quit [Remote host closed the connection]
<Drup> but I don't want to know how you decide when it's possible
<Drup> :)
<Simn> Yes, that's what I'm currently thinking about.
boogie has joined #ocaml
<Drup> imho, it doesn't worth the effort
thomasga has quit [Quit: Leaving.]
jonludlam has quit [Remote host closed the connection]
boogie has quit [Ping timeout: 245 seconds]
sepp2k has quit [Quit: Konversation terminated!]
Simn has quit [*.net *.split]
bobry has quit [*.net *.split]
flux has quit [*.net *.split]
PM has quit [*.net *.split]
amiller has quit [*.net *.split]
bentnib has quit [*.net *.split]
tristan_1 has quit [*.net *.split]
companion_cube has quit [*.net *.split]
whitequark has quit [*.net *.split]
ivan\ has quit [*.net *.split]
swistak35 has quit [*.net *.split]
teiresias has quit [*.net *.split]
troydm has joined #ocaml
boogie has joined #ocaml
swistak35 has joined #ocaml
milosn has joined #ocaml
Simn has joined #ocaml
bobry has joined #ocaml
flux has joined #ocaml
PM has joined #ocaml
amiller has joined #ocaml
bentnib has joined #ocaml
tristan_1 has joined #ocaml
companion_cube has joined #ocaml
whitequark has joined #ocaml
ivan\ has joined #ocaml
teiresias has joined #ocaml
xkb has quit [Ping timeout: 245 seconds]
lopex has quit [Ping timeout: 245 seconds]
xkb has joined #ocaml
lopex_ has joined #ocaml
ygrek has quit [Ping timeout: 248 seconds]
lopex_ is now known as lopex
zpe has quit [Remote host closed the connection]
boogie has quit [Read error: Connection reset by peer]
boogie has joined #ocaml
wwilly has quit [Ping timeout: 272 seconds]
ollehar has joined #ocaml
demonimin has joined #ocaml
thomasga has joined #ocaml
ttamttam has joined #ocaml
Sim_n has joined #ocaml
ttamttam has quit [Client Quit]
ttamttam has joined #ocaml
ttamttam has quit [Client Quit]
Simn has quit [Read error: Connection reset by peer]
dsheets has quit [Ping timeout: 246 seconds]
malvarez has joined #ocaml
thomasga has quit [Ping timeout: 245 seconds]
jonludlam has joined #ocaml
avsm has quit [Quit: Leaving.]
<whitequark> um, I broke camlp4
<whitequark> Assertion failed, file "camlp4/Camlp4/Struct/Camlp4Ast2OCamlAst.ml", line 284, char 8
* Kakadu rises in appalause
nlucaroni has joined #ocaml
<ggole> "Well, there were other factors in play there. htmlspecialchars was a very early function. Back when PHP had less than 100 functions and the function hashing mechanism was strlen()."
<ggole> Wat
travisbrady has quit [Quit: travisbrady]
travisbrady has joined #ocaml
<malvarez> yeah, that's php for you
zpe has joined #ocaml
Xenasis has joined #ocaml
jonludlam has quit [Remote host closed the connection]
zpe has quit [Ping timeout: 252 seconds]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
zpe has joined #ocaml
malvarez has quit [Ping timeout: 248 seconds]
jave has quit [Quit: ZNC - http://znc.in]
Yoric has joined #ocaml
jave has joined #ocaml
osa1 has joined #ocaml
noddy has quit [Quit: "it's a bit backwards around here"]
mcclurmc has joined #ocaml
jave has quit [Quit: ZNC - http://znc.in]
jave has joined #ocaml
jave has quit [Client Quit]
ggole has quit []
<orbitz> My second attempt at an Erlang-like gen_server for Ocaml/Async https://github.com/orbitz/gen_server
<orbitz> maybe third
mort___ has joined #ocaml
jave has joined #ocaml
ulfdoz has joined #ocaml
<travisbrady> orbitz: I know nothing about Erlang. What problem does gen_server solve?
<diginux__> orbitz: nice!
<whitequark> > type ('i, 's, 'm, 'ie, 'he) s = { callbacks : ('i, 's, 'm, 'ie, 'he) t
<whitequark> this looks really contrived O_o
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Kakadu has quit []
wagle has quit [Read error: Connection reset by peer]
nullFxn has joined #ocaml
wagle has joined #ocaml
wwilly has joined #ocaml
ulfdoz has quit [Ping timeout: 252 seconds]
nullFxn has quit [Quit: leaving]
nullFxn has joined #ocaml
ulfdoz has joined #ocaml
ocp has joined #ocaml
tane has joined #ocaml
nullFxn has quit [Ping timeout: 246 seconds]
nullFxn has joined #ocaml
nullFxn has quit [Client Quit]
mcclurmc has quit [Remote host closed the connection]
nullFxn has joined #ocaml
<whitequark> companion_cube: hm, actually your snippet will be useful for me
<whitequark> the one with universal quantifier.
gnuvince has quit [Ping timeout: 272 seconds]
nullFxn has quit [Quit: leaving]
nullFxn has joined #ocaml
Sim_n is now known as Simn
manizzle has joined #ocaml
tulloch has joined #ocaml
mreca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<orbitz> whitequark: i'm not sure a better way to do it
<orbitz> whitequark: of course one acn use the functor to make all of those explicit
<orbitz> travisbrady: Basically a tiny server in a concurrent program
<orbitz> travisbrady: an event loop within an eventloop! It just generifies a common way one writes concurrent code
<whitequark> orbitz: I'd probably use (or at least try to) an Lwt version
<whitequark> it should be trivial to rewrite it so, if you're interested
<travisbrady> orbitz: cool. TCP specifically? Could you feasibly use it with cohttp?
<whitequark> travisbrady: afaik cohttp includes its own version of gen_server, specialized for cohttp
<whitequark> Cohttp.Server
<orbitz> whitequark: I'm notsure how that changes the basic problem?
<orbitz> whitequark: the type there has nothing to do with Async
<whitequark> orbitz: that wasn't related
<orbitz> whitequark: ah, I prefer Async to lwt
<orbitz> but pull requests accepted :)
<whitequark> okay
<whitequark> why do you prefer Async ?
mcclurmc has joined #ocaml
<orbitz> travisbrady: no, thnk even more general https://github.com/orbitz/gen_server/blob/master/examples/simple.ml
<whitequark> to me it looks like a NIH version of Lwt
<orbitz> whitequark: I use Core, and Async is consistent with the rest of Core
<whitequark> I see
<orbitz> I've only written one thing in lwt and I found the API a bit messy and unorganized
<Drup> if your code is already using core all over the place, not using it sounds like a difficult mission.
<orbitz> But I was a young, inexperienced, ocaml developer at the time. It started out as a modeling contract and next thing I know they wanted meto do two things...at once
zacts_ has quit [Quit: leaving]
<whitequark> I found Lwt rather well-designed, sans few obviously legacy parts
zacts has joined #ocaml
<whitequark> and I've tried to pick up Core several times but gave up after looking at compile times and executable sizes
<orbitz> yep, a serious flaw of Core
zacts is now known as Guest32833
<orbitz> hopefully some good deadcode detection will make its way into Ocaml soon
Guest32833 has quit [Client Quit]
<orbitz> I like teh general design of Core enough to use it, but I think it has some serious flaws
<whitequark> ... or maybe Core will become more modular. :p
<orbitz> I think they inverted a lot of the container stuff, which is an ok idea if you control the whole library, but doesn't compose at all
zacts_ has joined #ocaml
<orbitz> Like String.Map
<Drup> I don't know about the design, I'm still waiting for some documentation. (yes, I like to bring this point back)
<whitequark> anyone knows how to fix this error? https://gist.github.com/whitequark/4a7114d404c9c4cc7d79
zacts_ is now known as zacts
zacts has quit [Client Quit]
<orbitz> yeah the docs suck, I end up reading .mli's a lot, but so far it all works well enough for me
zacts has joined #ocaml
<whitequark> er, nevermind, I think I didn't give enough context.
jave has quit [Quit: ZNC - http://znc.in]
mcclurmc has quit [Remote host closed the connection]
<orbitz> GADTs are above my paygrade :)
<whitequark> hah
nullFxn has left #ocaml []
fds has quit [Ping timeout: 246 seconds]
fds has joined #ocaml
ulfdoz has quit [Ping timeout: 250 seconds]
chturne has joined #ocaml
<whitequark> hm, I think I understood it myself
<chturne> Apparently the semantics of <expr1> ; <expr2> are that <expr1> is evaluated for side-effects, and then <expr2> is evaluated and the becomes the result of the entire expression. How come this ~ http://codepad.org/STOFo1g8 ~ only prints 10, and not 10 followed by "5 not even"?
<chturne> Oh crap, parsing rules
<chturne> need parens
<chturne> Sorry for the noise
<whitequark> ocp-indent can make these kinds of errors apparent
mreca has joined #ocaml
<chturne> I did notice tuareg indenting the second match way over to the right, but like an idiot I assumed it was being silly and lined it up manually.
<chturne> Always trust in tuareg :)
tane has quit [Quit: Verlassend]
dant3 has quit [Remote host closed the connection]
dant3 has joined #ocaml
tulloch has quit [Ping timeout: 248 seconds]
Yoric has quit [Quit: Instantbird 1.5a1pre -- http://www.instantbird.com]
dant3 has quit [Ping timeout: 265 seconds]
zpe has quit [Remote host closed the connection]
tulloch has joined #ocaml
<rks`> « 23:00:22 < chturne> Always trust in tuareg :) »
<rks`> that's the silliest thing I've heard in a long time :')
bjorkintosh has quit [Read error: Operation timed out]
nikki93 has joined #ocaml
mcclurmc has joined #ocaml
bentnib has quit [Quit: leaving]
mcclurmc has quit [Ping timeout: 265 seconds]
nikki93 has quit [Ping timeout: 252 seconds]
nikki93 has joined #ocaml
<whitequark> lolwhat
<whitequark> now it works, but I don't understand why
<whitequark> because it shouldn't and the code doesn't make any sense
<whitequark> why does Int have type tvar typ ?!
<whitequark> and as a side note, I didn't get this idea myself, Poly used to be defined as | Poly : tvar * 'a typ * ('b typ -> 'c typ) -> 'c typ
<whitequark> the compiler complained:
<whitequark> ! Error: This expression has type tvar typ but an expression was expected of type
<whitequark> ! b#1 typ
<whitequark> ! Type tvar is not compatible with type b#1
tulloch has quit [Ping timeout: 265 seconds]
<whitequark> o_O
Xenasis has quit [Remote host closed the connection]
osa1 has quit [Ping timeout: 240 seconds]
osa1_ has joined #ocaml
<nlucaroni> wouldn't that be from a restriction on signature substitution?
<nlucaroni> opp. nvm. i'm not sure.
<whitequark> though when I replace Int with ex typ (where ex is locally abstract), it doesn't work
<oriba> I'm looking for simple examples of GADTs. Is there some explanatory code somewhere, that explains the advantages by examples?
Simn has quit [Quit: Leaving]
lostcuaz has joined #ocaml
<smondet> oriba: there: http://www.meetup.com/NYC-OCaml/files/ the slides of the GADTs meetup were pretty good
CamelFodder has joined #ocaml
nikki93 has quit [Ping timeout: 241 seconds]
nikki93 has joined #ocaml
strobegen has quit [Quit: Leaving.]
<Drup> whitequark: well done ! you just discovered the super power of existential.
jave has joined #ocaml
<whitequark> Drup: hm?
jao has quit [Ping timeout: 265 seconds]
<Drup> making your type error impossible to understand.
<whitequark> no no, in this case the lack of type error is impossible to understand
<whitequark> it's arguably worse :p
<Drup> whitequark: I'm talking about the type error you posted =)
<whitequark> no, that was easily understandable
darkf has joined #ocaml
malvarez has joined #ocaml
<Drup> my existential type errors where not nice x)
<Drup> were*
<whitequark> yeah, it requires some wrapping of your mind around them
<oriba> smondet, thanks
<whitequark> gah! I can either write a run function, or construct a term it accepts
<whitequark> this is frustrating.
<Drup> I warned you that Poly may not be a good idea =D
<whitequark> Drup: the alternative is Obj.magic
<Drup> there is "simple" alternative, in fact
<whitequark> hm?
<Drup> just use a real function instead of a pair for Fun
<Drup> but the (big) down side is that you can't inspect those terms anymore
<whitequark> and no currying
<whitequark> ah, no, that stays
CamelFodder has quit [Remote host closed the connection]
<whitequark> hm, I wonder if I can extend check_eq to verify equivalence under substitution
<whitequark> that would also solve it
travisbrady has quit [Quit: travisbrady]
<Drup> you don't really need check_eq anymore
<whitequark> oh?
<Drup> huum, not sure if it will work, then :x
<Drup> whitequark: try to code run, assuming you have check_eq
<Drup> whitequark: did you read the article I linked earlier ?
<whitequark> Drup: not yet
<Drup> do it =)
<whitequark> I didn't yet exhaust all my own ideas :p
<malvarez> this conversation looks interesting! sorry to interrupt, but what's it about?
<Drup> whitequark: you should really read it, it solve the same problem
<whitequark> I'm now trying to extend that to handle (first-order) polymorphism
<malvarez> whitequark: thanks, looks like an interesting problem
<Drup> (aka, embedding lambda calculus in a type system with gadt)
wwilly has quit [Ping timeout: 252 seconds]
ocp has quit [Ping timeout: 252 seconds]
jave has quit [Quit: ZNC - http://znc.in]
mreca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jave has joined #ocaml
<whitequark> Drup: *facepalm* I just realized that thing before
<whitequark> type tvar = int
<whitequark> of course Int has type tvar typ.
gnuvince has joined #ocaml
gnuvince has quit [Changing host]
gnuvince has joined #ocaml
mcclurmc has joined #ocaml
zpe has joined #ocaml
zpe has quit [Read error: Operation timed out]
mcclurmc has quit [Ping timeout: 272 seconds]
nikki93 has quit [Ping timeout: 252 seconds]
nikki93 has joined #ocaml
<chturne> rks`, it was sarcastic
mreca has joined #ocaml
oriba has quit [Quit: oriba]
BiDOrD has quit [Remote host closed the connection]
BiDOrD has joined #ocaml
q66_ has joined #ocaml
thomasga has joined #ocaml
mcclurmc has joined #ocaml
q66 has quit [Ping timeout: 246 seconds]
WraithM_ has quit [Ping timeout: 240 seconds]
mcclurmc has quit [Ping timeout: 272 seconds]
dsheets has joined #ocaml
kyrylo has quit [Ping timeout: 245 seconds]
thomasga has quit [Quit: Leaving.]
nikki93 has quit [Remote host closed the connection]
jonludlam has joined #ocaml
nikki93 has joined #ocaml
nikki93 has quit [Remote host closed the connection]
mreca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
madroach has quit [Read error: Connection reset by peer]
introom has joined #ocaml
madroach has joined #ocaml
mcclurmc has joined #ocaml
<nicoo> whitequark: What is your specific problem when encoding your language in a GADT?
nikki93 has joined #ocaml
mcclurmc has quit [Ping timeout: 250 seconds]