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 joined #ocaml
Anarchos has quit [Quit: Vision[0.10.2]: i've been blurred!]
FreeBirdLjj has quit [Read error: Connection timed out]
silver_ has joined #ocaml
infinity0_ has joined #ocaml
infinity0 has quit [Killed (kornbluth.freenode.net (Nickname regained by services))]
infinity0_ is now known as infinity0
infinity0 has joined #ocaml
infinity0 has quit [Changing host]
silver has quit [Ping timeout: 240 seconds]
orbifx has quit [Ping timeout: 264 seconds]
spew has quit [Quit: Connection closed for inactivity]
FreeBirdLjj has joined #ocaml
zolk3ri has quit [Quit: leaving]
mfp has quit [Ping timeout: 272 seconds]
FreeBirdLjj has quit [Ping timeout: 265 seconds]
shinnya has quit [Ping timeout: 248 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
nicoo has quit [Write error: Connection reset by peer]
webshinra_ has joined #ocaml
silver_ has quit [Read error: Connection reset by peer]
rostero_ has joined #ocaml
arecaceae has quit [*.net *.split]
jbrown has quit [*.net *.split]
rostero has quit [*.net *.split]
webshinra has quit [*.net *.split]
averell has quit [*.net *.split]
dx has quit [*.net *.split]
arecacea1 has joined #ocaml
rostero_ is now known as rostero
dx has joined #ocaml
jbrown has joined #ocaml
kassens has quit [Ping timeout: 255 seconds]
averell has joined #ocaml
ziyourenxiang has quit [Quit: Leaving]
axesd9 has joined #ocaml
rostero has quit [Quit: Connection closed for inactivity]
axesd9 has quit [Ping timeout: 256 seconds]
enterprisey has joined #ocaml
axesd9 has joined #ocaml
cobreadmonster has quit [Quit: Connection closed for inactivity]
jao has quit [Ping timeout: 248 seconds]
nicoo has joined #ocaml
ygrek has quit [Ping timeout: 260 seconds]
pierpa has quit [Quit: Page closed]
kassens has joined #ocaml
kassens has quit [Ping timeout: 255 seconds]
sz0 has joined #ocaml
cthuluh has quit [Ping timeout: 240 seconds]
kassens has joined #ocaml
xa0 has quit [Quit: Divided by zero]
xa0 has joined #ocaml
tsani_ has joined #ocaml
joni has joined #ocaml
kalio_ has joined #ocaml
hxegon_ has quit [Ping timeout: 255 seconds]
ski has quit [Ping timeout: 255 seconds]
kalio has quit [Ping timeout: 255 seconds]
j0ni has quit [Ping timeout: 255 seconds]
tsani has quit [Ping timeout: 255 seconds]
joni is now known as Guest62991
hxegon has joined #ocaml
ski has joined #ocaml
mbuf has joined #ocaml
solrize has quit [Ping timeout: 255 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
cthuluh has joined #ocaml
liu has joined #ocaml
raduom has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
picolino has quit [Ping timeout: 248 seconds]
mbuf has quit [*.net *.split]
enterprisey has quit [*.net *.split]
kassens has quit [*.net *.split]
mcspud has quit [*.net *.split]
lynn has quit [*.net *.split]
rom1504 has quit [*.net *.split]
troydm has quit [*.net *.split]
cschneid has quit [*.net *.split]
bigs has quit [*.net *.split]
caw__ has quit [*.net *.split]
jeroud has quit [*.net *.split]
emliunix has quit [*.net *.split]
mbuf has joined #ocaml
picolino has joined #ocaml
jpdeplaix has quit [Ping timeout: 248 seconds]
butterthebuddha has quit [Ping timeout: 260 seconds]
eikke has quit [Ping timeout: 260 seconds]
eikke has joined #ocaml
jpdeplaix has joined #ocaml
troydm has joined #ocaml
kassens has joined #ocaml
mcspud has joined #ocaml
cschneid has joined #ocaml
caw__ has joined #ocaml
bigs has joined #ocaml
jeroud has joined #ocaml
rom1504 has joined #ocaml
enterprisey has joined #ocaml
lynn has joined #ocaml
caw__ has quit [Max SendQ exceeded]
butterthebuddha has joined #ocaml
saemcro has joined #ocaml
petercommand has joined #ocaml
BitPuffin|osx has joined #ocaml
caw__ has joined #ocaml
MercurialAlchemi has joined #ocaml
kassens has quit [*.net *.split]
enterprisey has quit [*.net *.split]
mcspud has quit [*.net *.split]
lynn has quit [*.net *.split]
rom1504 has quit [*.net *.split]
cschneid has quit [*.net *.split]
bigs has quit [*.net *.split]
jeroud has quit [*.net *.split]
raduom has joined #ocaml
argent_smith has joined #ocaml
KeyJoo has joined #ocaml
kerrhau has quit [Ping timeout: 264 seconds]
cschneid has joined #ocaml
rom1504 has joined #ocaml
lynn has joined #ocaml
enterprisey has joined #ocaml
bigs has joined #ocaml
jeroud has joined #ocaml
raduom has quit [Quit: Textual IRC Client: www.textualapp.com]
solrize has joined #ocaml
solrize has quit [Changing host]
solrize has joined #ocaml
mcspud has joined #ocaml
whoman has quit [Remote host closed the connection]
whoman has joined #ocaml
malina has joined #ocaml
Haudegen has joined #ocaml
cbot has quit [Quit: Leaving]
andreas_ has joined #ocaml
axesd9 has quit [Quit: WeeChat 2.0]
cthuluh has quit [Ping timeout: 240 seconds]
cthuluh has joined #ocaml
raphaelss has quit [Remote host closed the connection]
enterprisey has quit [Remote host closed the connection]
mfp has joined #ocaml
_andre has joined #ocaml
KeyJoo has quit [Ping timeout: 252 seconds]
freusque has joined #ocaml
jrslepak has quit [Ping timeout: 240 seconds]
KeyJoo has joined #ocaml
Serpent7776 has joined #ocaml
<_andre> does anyone think it would be a good idea to have a "magic" type 'a try = Success of 'a | Failure of exn such that a function annotated to return this type would automatically catch exceptions in its body?
<_andre> i'm not a scala programmer but seeing some code examples i believe they have something that works like that
<johnelse> _andre: that's a common use of type ('a, 'b) result
<johnelse> although exceptions don't get caught automatically
jrslepak has joined #ocaml
<_andre> yes, i know... i really dislike exceptions because they're hidden from the type system, so i thought this could be a good idea
<_andre> i guess the idea could go full-magic and let result to that if the Error type is exn :P
KeyJoo has quit [Ping timeout: 252 seconds]
malina has quit [Remote host closed the connection]
malina has joined #ocaml
malina has quit [Ping timeout: 264 seconds]
KeyJoo has joined #ocaml
malina has joined #ocaml
arecacea1 has quit [Remote host closed the connection]
arecacea1 has joined #ocaml
zolk3ri has joined #ocaml
KeyJoo has quit [Ping timeout: 252 seconds]
ptroja has joined #ocaml
ptroja has quit [Client Quit]
webshinra_ is now known as webshinra
Muzer has quit [Ping timeout: 255 seconds]
<_y> _andre, the problem i see is that, when using this, you state that your function can raise an exception but you don’t know which exceptions are possible
<_y> since in practice you have a rather good idea of possible exceptions, it seems to me like a very gross over-approximation, especially since exn is an open sum type
<_andre> yeah, you'd have to pattern-match on the exception later
<_andre> i don't see a way to specify the possible exceptions directly in the type
<_y> it is not possible for an arbitrary set of exceptions
<_y> (at least i guess so :->)
<_y> however i think that for a fixed, finite set of exceptions, you can encode it using open variant types as phantom types
silver has joined #ocaml
malina has quit [Ping timeout: 256 seconds]
jimt has quit [Quit: leaving]
Haudegen has quit [Read error: Connection reset by peer]
jimt has joined #ocaml
malina has joined #ocaml
borgtu has joined #ocaml
freusque has quit [Quit: WeeChat 1.9.1]
spew has joined #ocaml
spew has quit [Read error: Connection reset by peer]
malina has quit [Ping timeout: 264 seconds]
mbuf has quit [Quit: Leaving]
Haudegen has joined #ocaml
<zozozo> when install deps with opam, is it possible to install all deps only, (i.e including test ones, optional ones, but not the package itself), but without triggering the tests of each installed packages ? setting OPAMBUILDTEST=true makes it so that the test deps are installed but also run their tests
malina has joined #ocaml
<Drup> zozozo: `opam install --deps -t -d <pkg>` ?
<zozozo> Drup: looks like that triggers the tests on the dependencies on my machine
<Drup> zozozo: which version of opam ?
<zozozo> 1.2.2
<zozozo> well actually, maybe not
<Drup> ah, right, the behavior was changed at some point
<zozozo> hm.. that's a bit of a problem
<Drup> not sure when though
<companion_cube> I hope travis will use docker images, some day -_-
<zozozo> launching dependencies test seems wasteful in travis CI scripts, :p
<Drup> companion_cube: well, you can make it :p
<companion_cube> it stills spawns a full VM for every test, right?
<Drup> zozozo: in 2.0 at least, -t affects only packages that are actually present on the CLI
<zozozo> Drup: is it the same when using the env variable ?
dhil has joined #ocaml
<zozozo> companion_cube: sure, new VM every time, whose first task is to compile and install ocaml, :p
<Drup> zozozo: yes
<zozozo> Drup: nice, so the question now becomes, do I try and use opam2 in the travis CI scripts ?
<Drup> well, that would mean you would have to also compile opam 2 :D
<companion_cube> zozozo: exactly
<zozozo> Drup: or I could just fetch the pre-compiled bianries hosted on github
<companion_cube> i wish something like opam-datakit-ci was available for all opam packages :)
<Drup> companion_cube: me too
<Drup> maybe it's time to ask anil about it :D
<companion_cube> question is, who's gonna pay for the computing time? if it's hosted on the same machines…
dhil has quit [Client Quit]
spew has joined #ocaml
freusque has joined #ocaml
shinnya has joined #ocaml
SpiceGuid has joined #ocaml
SpiceGuid has quit [Client Quit]
arecacea1 has quit [Remote host closed the connection]
arecacea1 has joined #ocaml
danielglh has quit [Ping timeout: 255 seconds]
silver has quit [Read error: Connection reset by peer]
silver has joined #ocaml
<Leonidas> zozozo: my CI scripts just install ocaml from the debian packages.
breitenj- has joined #ocaml
nahra` has joined #ocaml
breitenj- has quit [Max SendQ exceeded]
<zozozo> Leonidas: yeah, but i actually want opam, since I try different versions of ocaml
breitenj- has joined #ocaml
breitenj has quit [Read error: Connection reset by peer]
nahra has quit [Ping timeout: 248 seconds]
shinnya has quit [Ping timeout: 252 seconds]
raphaelss has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
ziyourenxiang has joined #ocaml
FreeBirdLjj has joined #ocaml
tane has joined #ocaml
sz0 has joined #ocaml
jao has joined #ocaml
Denommus` has quit [Remote host closed the connection]
_andre has quit [Quit: leaving]
Denommus` has joined #ocaml
jimmyrcom has joined #ocaml
Denommus` has quit [Ping timeout: 272 seconds]
ziyourenxiang has quit [Ping timeout: 252 seconds]
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
<thizanne> could have been worse :)
raphaelss has quit [Remote host closed the connection]
<companion_cube> I like it
Serpent7776 has quit [Quit: Leaving]
<jpdeplaix> thizanne: +1
<companion_cube> rgrinberg is now a dune author! :D
Jesin has joined #ocaml
zolk3ri has quit [Ping timeout: 250 seconds]
malina has quit [Ping timeout: 260 seconds]
zolk3ri has joined #ocaml
FreeBird_ has quit [Remote host closed the connection]
<orbifx[m]> :)
<argent_smith> hi ppl. how to make a special target to explicitely make a static executable from the same source (the difference is in ocamlopt flags)
<argent_smith> ?
<argent_smith> in jbuild
<companion_cube> -static?
<argent_smith> that's clear ) how to make that special target in jbuild file?
<companion_cube> this I don't know, sorry :/
<argent_smith> me too unfortunately )
tane has quit [Quit: Leaving]
tane has joined #ocaml
andreas_ has quit [Quit: Connection closed for inactivity]
kakadu has quit [Quit: Konversation terminated!]
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
troydm has joined #ocaml
<whoman> me either*
<whoman> or neither
MercurialAlchemi has quit [Ping timeout: 265 seconds]
andreas_ has joined #ocaml
<argent_smith> thx )
<argent_smith> i just want to specify the alternate static target from the same source :/
<argent_smith> to build it for docker image
Haudegen has quit [Read error: Connection reset by peer]
cross has joined #ocaml
kerrhau has joined #ocaml
VermillionAzure has joined #ocaml
Haudegen has joined #ocaml
kakadu has joined #ocaml
orbifx has joined #ocaml
ubertaco has joined #ocaml
<ubertaco> Hi folks. I had a question about List.sort_uniq, especially as it pertains to a custom compare function
<ubertaco> given
<tane> ubertaco, what is your question?
rostero has joined #ocaml
<ubertaco> given this definition of compare: https://pastebin.com/1BvqQntj I would assume that List.sort_uniq [("a", "b"); ("a", "c"); ("b", "a"); ("c", "a")] should result in [("a", "b"); ("a", "c")]
<ubertaco> oh, hmm. In my repl, it does. In my larger code, I'm seeing different behavior. I must have a bug in my own code somewhere
<ubertaco> nevermind then
<ubertaco> Sorry for the "false alarm"
<tane> alright :)
ubertaco has quit [Quit: Page closed]
jnavila has joined #ocaml
tane has quit [Ping timeout: 256 seconds]
orbifx has quit [Ping timeout: 265 seconds]
cbot has joined #ocaml
BitPuffin|osx has quit [Ping timeout: 272 seconds]
dtornabene has joined #ocaml
KeyJoo has joined #ocaml
argent_smith has quit [Quit: Leaving.]
jimmyrcom_ has joined #ocaml
jimmyrcom has quit [Ping timeout: 248 seconds]
jimmyrcom_ has quit [Ping timeout: 248 seconds]
jnavila has quit [Remote host closed the connection]
igarnier has joined #ocaml
<igarnier> Hi everyone! I have a question about phantom times. Is it possible to combine private and phantom types so as to be able to use coercions? e.g., in my structure :
<igarnier> type 'a t = float constraint 'a = [< `Foo | `Bar ]
<igarnier> and in my sig : type 'a t = private float constraint 'a = [< `Foo | `Bar ]
<igarnier> in my current code, I can't coerce back values of type e.g. [`Hertz] t to float.
<igarnier> (where `Hertz = `Foo -- you get what I want to do)
tane has joined #ocaml
<octachron> This should work. What error message did you get?
<igarnier> this expression cannot be coerced to type float; it has type [< `Foo | `Bar ] t but is here used with type float
<thizanne> what is your code ?
<igarnier> hey thizanne - what's the best way to share ocaml online
<thizanne> something like http://paste.awesom.eu
<thizanne> (hey)
<igarnier> cool, thanks - here it is : http://paste.awesom.eu/igarnier/1Qis&ln
<igarnier> the variance annotations do not alter the result I get btw
<igarnier> and the error is triggered on line 50
fraya has joined #ocaml
<octachron> igarnier, first, using a double coercion (step: _ U.t :> float) fixes this problem
<igarnier> ooh, interesting
VermillionAzure has quit [Ping timeout: 248 seconds]
<igarnier> I guess the typechecker does only a shallow check when verifying the subtyping constraint
malina has joined #ocaml
VermillionAzure has joined #ocaml
<octachron> it is more than the double coercion is the more general form, and with simple coercion, the expected type is inferred from the target type
<octachron> (with (x:expected_type:>target_type) )
Muzer has joined #ocaml
fraya has quit [Quit: Leaving]
<octachron> and visibly the type-checker could not infer that the expected type was ` _ U.t` from the `float` target
<thizanne> second solution:
<igarnier> oh, I see - that makes a lot of sense
<thizanne> let extent ({ vi; step; values } as f : (U.all_dims, _) t) =
<igarnier> right, anotating the argument allows to guide the type-checker
<thizanne> I guess so
nicoo has quit [Remote host closed the connection]
<igarnier> (*annotating)
<igarnier> awesome guys
<copy`> I'm getting an error from the OCaml compiler ("Fatal error: exception Ctype.Unify(_)"), can somebody give me a sanity check that this doesn't compile on 4.06.0+flambda? http://paste.awesom.eu/f9WB
<thizanne> it doesnt in 4.05 at least
<igarnier> I think I would have been looking for a solution for a long time without your help, thanks a lot! (and, maybe, see you soon thizanne !)
nicoo has joined #ocaml
<thizanne> :)
igarnier has quit [Quit: bye!]
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
VermillionAzure has quit [Ping timeout: 256 seconds]
<octachron> copy`, the Unify exception is here with 4.06 (and on trunk too), without flambda
<copy`> My first compiler bug?! Reporting ...
tane has quit [Quit: Leaving]
butterthebuddha has quit [Max SendQ exceeded]
butterthebuddha has joined #ocaml
ziyourenxiang has joined #ocaml
malina has quit [Ping timeout: 248 seconds]
malina has joined #ocaml
zolk3ri has quit [Ping timeout: 265 seconds]
orbifx has joined #ocaml
malina has quit [Ping timeout: 272 seconds]
jimmyrcom has joined #ocaml
whoman has quit [Ping timeout: 248 seconds]
whoman has joined #ocaml
orbifx has quit [Ping timeout: 256 seconds]
_whitelogger has joined #ocaml
andreas_ has quit [Quit: Connection closed for inactivity]
pierpa has joined #ocaml