ChanServ changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.02.1 announcement at http://ocaml.org/releases/4.02.html | Public channel logs at http://irclog.whitequark.org/ocaml
pyon has joined #ocaml
segmond has joined #ocaml
AltGr has joined #ocaml
avsm has quit [Quit: Leaving.]
jonludlam has quit [Quit: Coyote finally caught me]
claudiuc_ has joined #ocaml
claudiuc has quit [Read error: Connection reset by peer]
manud___ has joined #ocaml
manud___ has quit [Ping timeout: 258 seconds]
<struktured> eh this travis thing is confusing the hell out of me.
<whitequark> it's down
<whitequark> because of some asshole who DDoSes DNSimple, their DNS provider
<struktured> ha, this is literally the very first day I ever tried submitting something to opam repo
<whitequark> bad luck.
<struktured> on the plus side, it's still 100 times better than maven's piece of crap interface
Puffin has joined #ocaml
<struktured> I hate this thing with a passion: https://oss.sonatype.org/#view-repositories
<struktured> also I choose to blame this downtime on comcast, because why not.
mcclurmc has joined #ocaml
avsm has joined #ocaml
avsm has quit [Client Quit]
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
madroach has quit [Ping timeout: 250 seconds]
madroach has joined #ocaml
manud___ has joined #ocaml
S11001001 has quit [Ping timeout: 272 seconds]
andreypopp_ has quit [Ping timeout: 272 seconds]
S11001001 has joined #ocaml
leifw has quit [Ping timeout: 272 seconds]
andreypopp_ has joined #ocaml
ggherdov has quit [Ping timeout: 272 seconds]
c74d is now known as Guest29672
Guest29672 has quit [Killed (morgan.freenode.net (Nickname regained by services))]
jamesgoIick has joined #ocaml
c74d has joined #ocaml
c74d has quit [Read error: Connection reset by peer]
c74d has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
c74d is now known as Guest2381
Guest2381 has quit [Ping timeout: 258 seconds]
ggherdov has joined #ocaml
c74d has joined #ocaml
chambart has quit [Ping timeout: 240 seconds]
Thooms has quit [Ping timeout: 272 seconds]
ygrek has joined #ocaml
nadako_ has quit [Read error: Connection reset by peer]
WraithM has joined #ocaml
c74d has quit [Remote host closed the connection]
Puffin has quit [Ping timeout: 245 seconds]
c74d has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
c74d has quit [Read error: Connection reset by peer]
c74d has joined #ocaml
ygrek has quit [Ping timeout: 264 seconds]
c74d has quit [Read error: Connection reset by peer]
darkf has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
c74d has joined #ocaml
c74d has quit [Killed (wilhelm.freenode.net (Nickname regained by services))]
enquora has joined #ocaml
shinnya_ has quit [Ping timeout: 240 seconds]
c74d has joined #ocaml
SomeDamnBody has joined #ocaml
struktured_ has quit [Quit: No Ping reply in 180 seconds.]
struktured_ has joined #ocaml
seanmcl has joined #ocaml
Submarine has joined #ocaml
q66 has quit [Quit: Leaving]
claudiuc_ has quit [Remote host closed the connection]
q66[lap] has quit [Ping timeout: 250 seconds]
darkf has quit [Read error: Connection reset by peer]
lordkryss has quit [Quit: Connection closed for inactivity]
q66[lap] has joined #ocaml
darkf has joined #ocaml
myyst has joined #ocaml
expo873 has quit []
skchrko has joined #ocaml
ygrek has joined #ocaml
enquora has quit [Quit: enquora]
jabesed has quit [Quit: Konversation terminated!]
MrScout_ has joined #ocaml
kdef has quit [Ping timeout: 255 seconds]
MrScout has quit [Ping timeout: 258 seconds]
MrScout_ has quit [Ping timeout: 258 seconds]
SomeDamnBody has quit [Quit: Leaving]
SomeDamnBody has joined #ocaml
jamesgoIick is now known as leifw
teiresias has joined #ocaml
struktured has quit [Ping timeout: 258 seconds]
igstan has joined #ocaml
Submarine has quit [Remote host closed the connection]
hellome has joined #ocaml
chinglish has joined #ocaml
mcclurmc has joined #ocaml
Puffin has joined #ocaml
mcclurmc has quit [Ping timeout: 250 seconds]
darkf_ has joined #ocaml
darkf has quit [Ping timeout: 272 seconds]
manud___ has quit [Quit: Be back later ...]
darkf_ is now known as darkf
Puffin has quit [Ping timeout: 258 seconds]
kapil__ has joined #ocaml
chinglish has quit [Ping timeout: 244 seconds]
chinglish has joined #ocaml
jao has quit [Ping timeout: 256 seconds]
lordkryss has joined #ocaml
psy_ has quit [Remote host closed the connection]
psy_ has joined #ocaml
Submarine has joined #ocaml
Submarine has joined #ocaml
mcclurmc has joined #ocaml
struktured has joined #ocaml
mcclurmc has quit [Ping timeout: 264 seconds]
araujo has quit [Ping timeout: 240 seconds]
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
araujo has joined #ocaml
SomeDamnBody has quit [Ping timeout: 256 seconds]
MercurialAlchemi has joined #ocaml
natrium1970 has joined #ocaml
natrium1970 has quit [Client Quit]
chaptastic has quit [Read error: Connection reset by peer]
chaptastic has joined #ocaml
pakchoi2 has joined #ocaml
pakchoi2 has quit [Remote host closed the connection]
chinglish has quit [Quit: Nettalk6 - www.ntalk.de]
chinglish has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
kdef has joined #ocaml
mcclurmc has joined #ocaml
mcclurmc has quit [Ping timeout: 264 seconds]
araujo has quit [Ping timeout: 264 seconds]
struktured has quit [Ping timeout: 256 seconds]
ygrek has joined #ocaml
testcocoon has quit [Quit: Coyote finally caught me]
mcc has joined #ocaml
testcocoon has joined #ocaml
<mcc> Hello I have a question… so let's say I have a record type, and it has a field x, and I want to take an existing value of that record and get the value which is "this exact record, but with x replaced with [other value]"
<mcc> is there sugar for that, or do i need to write out every single one of the fields?
AlexRussia has quit [Quit: WeeChat 1.1-dev]
skchrko has quit [Remote host closed the connection]
<flux> you're in luck!
<flux> { rec with x = 42 }
arj has joined #ocaml
<mcc> AWESOME
<flux> :-)
ygrek has quit [Ping timeout: 240 seconds]
kdef has quit [Quit: peace]
mcc has quit [Quit: This computer has gone to sleep]
ygrek has joined #ocaml
lordkryss has quit [Quit: Connection closed for inactivity]
manud___ has joined #ocaml
matason has quit [Quit: Leaving...]
MercurialAlchemi has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
oscar_toro has joined #ocaml
manud___ has quit [Quit: Be back later ...]
zwer has quit [Ping timeout: 250 seconds]
hyperbor1ean is now known as hyperboreean
manud___ has joined #ocaml
jhaberstro has joined #ocaml
matason has joined #ocaml
Thooms has joined #ocaml
Arsenik has joined #ocaml
darkf has quit [Ping timeout: 258 seconds]
darkf has joined #ocaml
araujo has joined #ocaml
nojb has joined #ocaml
avsm has joined #ocaml
larhat1 has quit [Quit: Leaving.]
badon has quit [Ping timeout: 250 seconds]
badon has joined #ocaml
ggole has joined #ocaml
avsm has quit [Quit: Leaving.]
thomasga has joined #ocaml
bitbckt has quit [Ping timeout: 258 seconds]
bitbckt has joined #ocaml
<companion_cube> o/
jhaberstro has quit [Quit: jhaberstro]
<matason> Hello, it seems like there's plenty of OCaml going on at Cambridge University in the UK, is anyone aware of much happening in the North West, UK?
kakadu has joined #ocaml
<Leonidas> haven't heard much…
<Leonidas> whitequark: turns out most of our patch was already fixed by you and but how about this: https://github.com/Leonidas-from-XIV/llvm/commit/0d12ad28022a403955ec57b60b636ed751b70879
<Leonidas> we need to construct mdnodes with some values being null because they are just… unknown.
jonludlam has joined #ocaml
ocp has joined #ocaml
ikaros has joined #ocaml
* companion_cube quite proud of his permutations/combinations generatorsL https://github.com/c-cube/gen/commit/3f730afe4b4f11ce155be9554253aa601005c2fc
<matason> OK, thanks
<Leonidas> matason: why are you asking? :)
Arsenik has quit [Remote host closed the connection]
<kakadu> Does anybody has 32bit system? What 'opam config var arch' says? i686 or x86?
<matason> Leonidas: Mainly because I live in the North West, I wondered whether there was a user group or something going on at a Uni nearer :)
<Leonidas> Kakadu: if you ask me tomorrow, I can answer that question :-)
<matason> Leonidas: Although I wouldn't be adverse to travelling to Cambridge for an event...
<Leonidas> matason: ah, I see. Have you checked meetup.com or similar sites? Often general functional programming user groups are supportive of ocaml users
<matason> Leonidas: Doh, no - that's a really good idea. Thanks!
Simn has joined #ocaml
avsm has joined #ocaml
thomasga has quit [Quit: Leaving.]
avsm has quit [Client Quit]
Puffin has joined #ocaml
larhat has joined #ocaml
thomasga has joined #ocaml
manud___ has quit [Quit: Be back later ...]
Thooms has quit [Quit: WeeChat 1.0.1]
Thooms has joined #ocaml
Submarine has quit [Remote host closed the connection]
Puffin has quit [Read error: Connection reset by peer]
BitPuffin has joined #ocaml
hugomg has joined #ocaml
oscar_toro has quit [Ping timeout: 272 seconds]
<companion_cube> whitequark: do you think the recursion hack could be added to ppx_deriving so that "unused let rec" disappears?
mcclurmc has joined #ocaml
toolslive has joined #ocaml
mcclurmc has quit [Ping timeout: 264 seconds]
<toolslive> can anyone point me to an OCaml based UDP multicast example ?
<nojb> if you are using the stdlib then the interface is the same as in C …
<nojb> ah sorry - multicast, I am not sure that is available in the stdlib ...
<toolslive> well, I'm sure it is not available there.
<companion_cube> I don't know if many people have been using UDP in OCaml anyway
<toolslive> I found a lib : Oni but it's a but hard to grok without an example.
<toolslive> udp works fine. the std lib is just a wrapper of the posix socket api, but they left out stuff for obscured reasons
<flux> you may find the missing bits (if any, I haven't looked) from the ExtUnix or Jane Street Core libraries
<nojb> yes, Async_unix in Core has some multicast functions
<nojb> sorry, Core_unix is the module that has the multicast functions
<companion_cube> no idea whether Lwt provides those
<toolslive> lwt does not.
<flux> I imagine they are mostly non-blocking functions anyway
jpdeplaix has quit [Ping timeout: 250 seconds]
<Leonidas> hmm, extunix doesn't seem to have UDP multicast
BitPuffin has quit [Ping timeout: 255 seconds]
<Leonidas> strange, since that would probably be a good place to look
<toolslive> Core_unix has a "mcast_join ?ifname sock addr"
<flux> toolslive, btw, whatcha writing?-)
<toolslive> basically there's some networked hardware that's announcing it's presence via UDP multicast. (Seagate's Kinetic drives) I'd like to listen to it from an ocaml process.
<mrvn> don't you just have to bind to the right ip?
<toolslive> yes, it's basically that and set the correct socket options
<companion_cube> it's sad that neither Extunix nor Lwt provide this primitive
<mrvn> extunix is easy to patch. Just write a stub and send in a patch.
<toolslive> it's 5 lines of C or so.
<nojb> or you could use ctypes :)
<companion_cube> contributing this to extunix sounds like a good idea though
jpdeplaix has joined #ocaml
<toolslive> a0 = "239.1.2.3"
<toolslive> mreq = struct.pack("=4sl",
<toolslive> socket.inet_aton(a0),
<toolslive> sock.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq)
<toolslive> socket.INADDR_ANY)
<toolslive> that's the python way of doing it
Thooms has quit [Quit: WeeChat 1.0.1]
mbac has quit [Remote host closed the connection]
<ia0> Is there a way to get the non-mutable version of a record? (I guess the answer is no, but just to be sure)
<ia0> type t = { mutable a : int; mutable b : float; }
<ia0> type s = { a : int; b : float; }
<nojb> no, you have to define a new type
<companion_cube> no, unless you make it private (privacy makes it immutable from the outside iirc)
<ia0> Is there a way to factorize both definitions ?
<ia0> interesting
<ia0> I test the private thing
<Drup> unfortunatly, private is all or nothing. You can't prevent mutation of one of the fields and let it for the others. :(
<companion_cube> well if it's private, you provide accessors anyway
<companion_cube> set_a : t -> int -> unit
<nojb> you might as well make the type abstract
<Drup> or you don't, and you only mutate it in your own code.
<Leonidas> wow building LLVM is more tricky than expected
<Leonidas> I'd go for making the type abstract and providing mutators…
<ia0> companion_cube> well if it's private, you provide accessors anyway <= is this necessary? It looks like it works without
<ggole> You can't assign to fields of private records.
<ggole> You can get em out though.
<ia0> yes, this is exactly what I wanted
<ia0> module A : sig type t = private { mutable a : int; } val create : int -> t end = struct type t = { mutable a : int; } let create x = { a = x; } end
<ia0> let () = let x = A.create 42 in x.A.a <- 31; Format.printf "%d@." x.A.a
<ia0> The [x.A.a <- 31;] fails at typing
<ggole> The idea is that you can maintain invariants by preventing assignment or construction except by going through the module's interface.
<ia0> yes, exactly what I want
axiles has quit [Quit: Quitte]
dsheets_ has joined #ocaml
arj has quit [Ping timeout: 264 seconds]
tane has joined #ocaml
Thooms has joined #ocaml
chinglish has quit [Quit: Nettalk6 - www.ntalk.de]
koderok has joined #ocaml
arj has joined #ocaml
avsm1 has joined #ocaml
koderok has quit [Client Quit]
arj has quit [Ping timeout: 272 seconds]
AlexRussia has joined #ocaml
nojb has quit [Quit: nojb]
bezirg has joined #ocaml
axiles has joined #ocaml
<toolslive> ok. got this UDP multicast thingy working via a ctypes wrapped setsockopt
<companion_cube> nice!
arj has joined #ocaml
hyperboreean has quit [Ping timeout: 250 seconds]
hyperboreean has joined #ocaml
avsm1 has quit [Quit: Leaving.]
<toolslive> well, I feel dirty now as I got the fd via Obj.magic
arj has quit [Ping timeout: 252 seconds]
panini_ has joined #ocaml
hyperboreean has quit [Ping timeout: 245 seconds]
hyperboreean has joined #ocaml
AltGr has left #ocaml [#ocaml]
<Leonidas> whitequark: where did Llvm_executionengine.ExecutionEngine.run_function go? It seems the examples use it, but doesn't exist in the 3.6 bindings anymore.
arj has joined #ocaml
oscar_toro has joined #ocaml
BitPuffin has joined #ocaml
arj has quit [Ping timeout: 256 seconds]
bitbckt has quit [Ping timeout: 258 seconds]
bitbckt has joined #ocaml
arj has joined #ocaml
Thooms has quit [Quit: WeeChat 1.0.1]
Thooms has joined #ocaml
avsm has joined #ocaml
panini_ has quit [Ping timeout: 250 seconds]
samrat has joined #ocaml
panini_ has joined #ocaml
ygrek has quit [Ping timeout: 258 seconds]
samrat has quit [Ping timeout: 264 seconds]
avsm has quit [Quit: Leaving.]
AlexRussia has quit [Quit: WeeChat 1.1-dev]
AlexRussia has joined #ocaml
<Leonidas> ok, I found https://github.com/llvm-mirror/llvm/commit/ced3d172f8d83f50b4c8dec136f8123133bad36f but what to do now, it I want to use run_function?
thomasga has quit [Quit: Leaving.]
Valdo has quit [Excess Flood]
chinglish has joined #ocaml
panini_ has quit [Ping timeout: 240 seconds]
Valdo has joined #ocaml
thomasga has joined #ocaml
samrat has joined #ocaml
chambart has joined #ocaml
samrat has quit [Client Quit]
panini_ has joined #ocaml
seanmcl has joined #ocaml
mcclurmc has joined #ocaml
mcclurmc has quit [Ping timeout: 255 seconds]
nox has quit [Ping timeout: 258 seconds]
nox_ has joined #ocaml
Thooms has quit [Quit: WeeChat 1.0.1]
bytbox has quit [Remote host closed the connection]
thomasga has quit [Quit: Leaving.]
yomimono has joined #ocaml
thomasga has joined #ocaml
davine has joined #ocaml
davine has left #ocaml [#ocaml]
jgjl has joined #ocaml
jgjl has quit [Ping timeout: 240 seconds]
ygrek has joined #ocaml
fraggle-boate has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
ollehar has joined #ocaml
fraggle-boate has joined #ocaml
nojb has joined #ocaml
chinglish has quit [Quit: Nettalk6 - www.ntalk.de]
slash^ has joined #ocaml
arj has quit [Quit: Leaving.]
ollehar1 has joined #ocaml
ollehar has quit [Ping timeout: 264 seconds]
shinnya has joined #ocaml
darkf has quit [Quit: Leaving]
rossberg has quit [Ping timeout: 258 seconds]
fraggle_ has quit [Ping timeout: 258 seconds]
rossberg has joined #ocaml
fraggle_ has joined #ocaml
johnf_ has joined #ocaml
yomimono has quit [Ping timeout: 255 seconds]
Thooms has joined #ocaml
Thooms has quit [Quit: WeeChat 1.0.1]
ocp has quit [Quit: Leaving.]
psy_ has quit [Read error: Connection reset by peer]
bitbckt has quit [Remote host closed the connection]
kapil__ has quit [Quit: Connection closed for inactivity]
psy_ has joined #ocaml
bitbckt has joined #ocaml
WraithM has quit [Quit: Lost terminal]
bezirg has quit [Ping timeout: 258 seconds]
mcclurmc has quit [Remote host closed the connection]
Thooms has joined #ocaml
rossberg has quit [Ping timeout: 258 seconds]
<toolslive> would the Lwt people be interested in a patch for this UDP multicast thing?
rossberg has joined #ocaml
<Drup> probably
panini_ has quit [Quit: Leaving]
mrpantou1le has quit [Ping timeout: 258 seconds]
<whitequark> Leonidas: use get_pointer_to_global
<whitequark> it will return an ocaml function, which you can simply call
<whitequark> companion_cube: yes, if you remove the mutation thing
fraggle_ has quit [Ping timeout: 258 seconds]
mrpantoufle has joined #ocaml
fraggle_ has joined #ocaml
<Drup> whitequark: is there map_loc implemented somwhere or do I add it to ppx_tools ?
rossberg has quit [Ping timeout: 258 seconds]
rossberg has joined #ocaml
nojb has quit [Quit: nojb]
<whitequark> map_loc?
<Drup> ('a -> 'b) -> 'a Location.loc -> 'b Location.loc
<Drup> (that should be in Location ...)
<whitequark> I don't think there is
<Drup> grmbl.
rossberg has quit [Ping timeout: 258 seconds]
rossberg has joined #ocaml
cthuluh has quit [Ping timeout: 250 seconds]
<companion_cube> whitequark: why?
<whitequark> companion_cube: it's just horrible code
<companion_cube> :/
<Drup> (I don't find it *that* terrible)
<whitequark> mmm
<Drup> a function "is_recursive : core_type -> bool" would be better
<whitequark> ^
<Drup> but you would implement it essentially the same way
<Drup> recursive descent + exception
bytbox has joined #ocaml
<whitequark> companion_cube: well, send a PR and I will either accept it or rework it
WraithM has joined #ocaml
nojb has joined #ocaml
axiles has quit [Quit: Quitte]
bezirg has joined #ocaml
badkins has joined #ocaml
oscar_toro has quit [Read error: Connection reset by peer]
<companion_cube> whitequark: still no simple way to run ppx_tools/rewriter with a ppx_deriving plugin ?
<whitequark> define "simple"?
<companion_cube> rewriter ppx_deriving.std foo.ml :s
<companion_cube> something like this
<whitequark> ah
<whitequark> so, findlib support
<whitequark> can you please file a ticket on ppx_tools, this can be improved
rossberg has quit [Ping timeout: 258 seconds]
<companion_cube> I don't even know how to use rewriter properly right now
<whitequark> uhhhhh
<whitequark> I tried to make a bash one-liner, but it was just too gnarly
ikaros has quit [Quit: Ex-Chat]
<companion_cube> ocamlfind ppx_tools/rewriter -ppx '`ocamlfind query ppx_deriving`/ppx_deriving `ocamlfind query ppx_deriving`/ppx_deriving_random.cma' foo.ml
<companion_cube> \o/
<whitequark> I'd write `ocamlfind query ppx_deriving`/ppx_deriving as ocamlfind ppx_deriving/ppx_deriving
<whitequark> otherwise, something like that
tane has quit [Quit: Verlassend]
rossberg has joined #ocaml
bytbox has quit [Ping timeout: 250 seconds]
axiles has joined #ocaml
mcclurmc has joined #ocaml
mcclurmc has quit [Ping timeout: 264 seconds]
bezirg has quit [Ping timeout: 272 seconds]
<Leonidas> whitequark: ok, thanks!
tharugrim has quit [Ping timeout: 252 seconds]
tharugrim has joined #ocaml
<whitequark> Leonidas: how should I attribute you in LLVM commits?
<whitequark> for the mdnull patch
<whitequark> usually I include Firstname Lastname <email>
cthuluh has joined #ocaml
koderok has joined #ocaml
Intensity has quit [Remote host closed the connection]
lordkryss has joined #ocaml
<Leonidas> whitequark: It's by a coworker of mine, so "Gideon Smeding <gideon.smeding@3ds.com>". Thanks!
SomeDamnBody has joined #ocaml
ygrek has quit [Ping timeout: 244 seconds]
koderok has quit [Quit: koderok]
<whitequark> r223129
Hannibal_Smith has joined #ocaml
SomeDamnBody has quit [Ping timeout: 256 seconds]
tharugrim has quit [Read error: Connection reset by peer]
gustav__1 is now known as gustav___
enquora has joined #ocaml
q66 has joined #ocaml
mbac has joined #ocaml
mbac has left #ocaml [#ocaml]
<Leonidas> whitequark: awesome. Wouldn't have thought contributing to llvm was this easy
<companion_cube> whitequark: I have a prototype of ppx_deriving.random here https://github.com/c-cube/ppx_deriving/tree/deriving_random
<whitequark> Leonidas: it's usually slower, but fortunately for you I'm the sole owner of ocaml bindings
<whitequark> companion_cube: that looks good to me
<whitequark> any specific questions?
jwatzman|work has joined #ocaml
jwatzman|work has quit [Changing host]
jwatzman|work has joined #ocaml
<companion_cube> I could not manage to make the attribute "range" work
<companion_cube> also, it's really hard to make good generators for recursive types :(
<struk_at_work> companion_cube:so that allows you to create random instances of some type, declaratively?
<companion_cube> yes
<companion_cube> struk_at_work: you know ppx_deriving?
<struk_at_work> companion_cube:yeah of course. very cool to add random, especially for test harnesses
<companion_cube> type tree = Leaf of int | Node of tree * tree [@@deriving random], something like this
<companion_cube> yes, testing, exactly
<companion_cube> random+show = quickcheck goodness
expo873 has joined #ocaml
<whitequark> companion_cube: what's the problem with range?
<whitequark> and wrt recursive types, didn't gasche have some kind of library?
<companion_cube> so I have an attribute for integers, say, [@range (1, 10)], but I don't know how to extract the pair into OCaml integers (it's commented in the code)
<companion_cube> yes, he doe
<companion_cube> s
<companion_cube> but I'm not sure I'm ready to generate this kind of code, it's hard enough to get it to type by hand
<whitequark> okay
<whitequark> the code you wrote should actually work
ygrek has joined #ocaml
davine has joined #ocaml
<whitequark> companion_cube: it built after I replaced pexp_descr with pexp_desc
<companion_cube> -_-
davine has left #ocaml [#ocaml]
<companion_cube> thanks
<companion_cube> I still should use some notion of fuel, the current depth mechanism is meh
nojb has quit [Quit: nojb]
bezirg has joined #ocaml
MrScout has joined #ocaml
dsheets_ has quit [Ping timeout: 264 seconds]
hehe has joined #ocaml
tharugrim has joined #ocaml
bezirg has quit [Ping timeout: 255 seconds]
ygrek has quit [Ping timeout: 264 seconds]
bytbox has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
bytbox has quit [Remote host closed the connection]
Thooms has quit [Quit: WeeChat 1.0.1]
kakadu_ has joined #ocaml
_andre has quit [Quit: leaving]
art-w has quit [Ping timeout: 258 seconds]
art-w has joined #ocaml
larhat has quit [Quit: Leaving.]
torono has joined #ocaml
manud___ has joined #ocaml
oscar_toro has joined #ocaml
oscar_toro has left #ocaml [#ocaml]
chambart has quit [Ping timeout: 245 seconds]
nojb has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
xavierm02 has joined #ocaml
nojb has quit [Quit: nojb]
nojb has joined #ocaml
<xavierm02> Is there some way to make a non-polymorphic type polymorphic? Something like type 'a t = let module M = Map.Make(struct t = 'a end) in M.t
<xavierm02> Hi. ^ Thank you in advance for your answers.
<companion_cube> no, sorry
<nojb> but you can play around a little with first-class modules
<nojb> module M (S : sig type t end) = struct type t = S.t end;;
bytbox has joined #ocaml
<nojb> module type T = sig type t end;;
<nojb> let f (type a) = (module M (struct type t = a end) : T)
<xavierm02> ok, thank you :)
nadako_ has joined #ocaml
pgomes has joined #ocaml
torono has quit [Ping timeout: 246 seconds]
nojb has quit [Quit: nojb]
hugomg has quit [Ping timeout: 272 seconds]
nadako_ is now known as nadako
nojb has joined #ocaml
rossberg has quit [Ping timeout: 258 seconds]
Intensity has joined #ocaml
claudiuc has joined #ocaml
bytbox has quit [Ping timeout: 245 seconds]
rossberg has joined #ocaml
nojb has quit [Quit: nojb]
fraggle_ has quit [Ping timeout: 258 seconds]
fraggle_ has joined #ocaml
ggole has quit []
claudiuc has quit [Remote host closed the connection]
claudiuc has joined #ocaml
chambart has joined #ocaml
mrpantoufle has quit [Ping timeout: 258 seconds]
badkins has quit [Remote host closed the connection]
Arsenik has joined #ocaml
claudiuc has quit [Read error: Connection reset by peer]
hehe has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
claudiuc_ has joined #ocaml
nojb has joined #ocaml
demonimin has joined #ocaml
demonimin_ has quit [Ping timeout: 264 seconds]
mrpantoufle has joined #ocaml
oscar_toro has joined #ocaml
claudiuc_ has quit [Read error: Connection reset by peer]
claudiuc has joined #ocaml
avsm has joined #ocaml
badon has quit [Ping timeout: 250 seconds]
demonimin has quit [Ping timeout: 258 seconds]
demonimin has joined #ocaml
demonimin has quit [Changing host]
demonimin has joined #ocaml
jpdeplaix has quit [Ping timeout: 245 seconds]
nojb has quit [Ping timeout: 244 seconds]
samuel02 has joined #ocaml
nojb has joined #ocaml
hbar has quit [Ping timeout: 264 seconds]
wwilly has joined #ocaml
badon has joined #ocaml
samuel02 has quit [Read error: Connection reset by peer]
nojb has quit [Ping timeout: 240 seconds]
nojb has joined #ocaml
shinnya has quit [Ping timeout: 258 seconds]
bytbox has joined #ocaml
shinnya has joined #ocaml
enquora_ has joined #ocaml
enquora has quit [Ping timeout: 258 seconds]
enquora_ is now known as enquora
matason has quit [Quit: Leaving...]
matason has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 255 seconds]
jonludlam has quit [Ping timeout: 252 seconds]
pgomes has quit [Quit: Leaving]
bezirg has joined #ocaml
Hannibal_Smith has quit [Quit: Sto andando via]
Arsenik has quit [Remote host closed the connection]
nojb has quit [Quit: nojb]
<Leonidas> OCaml errors out complaing about ?foo:string -> ?error:string -> unit -> _[> api_result ] Lwt.t not matching my expected type
<Leonidas> what does the _ in front of my result mean?
<Drup> it's the same as '_a
<Drup> do you know what that is ?
<Leonidas> No, I do not. I have seen it some times come up if Merlin wasn't able to infer a type completely but I don't know the real meaning behind it.
<Drup> Leonidas: so basically, it's a type that is non-polymorph, but not completely infer
<Drup> imagine "let x = ref None"
<Drup> you don't know the type yet
<Drup> so it's a type variable
<Drup> but it's not polymorphic, you can only put one type in a ref
<Drup> the typechecker signal that by this "_"
<Leonidas> but in my case, it did (correctly) infer [> api_result ] Lwt.t, so why the _?
<Leonidas> (background: I used flip on a function and am calling the function with the arguments in reverse order)
<Drup> inside [> api_result], there is a type variable hiddent
<Drup> hidden*
<Drup> the [> means that it's "something bigger"
<Leonidas> you mean that api_result contains polymorphic types and these are unknown, hence the _?
<Drup> yes
<Leonidas> but how can that happen?
<Drup> can you show the whole expression ?
<Leonidas> when I rewrite let query' y x = query x y it works
<Leonidas> sure, let me paste.
<Drup> in this case, it may just be value restriction
<Drup> you must bound variables in order for the compiler to properly generalize the types.
<Drup> yeah, value restriction
<Leonidas> is that similar to Haskells monomorphism restriction? https://www.haskell.org/haskellwiki/Monomorphism_restriction
<Drup> huum, it's the same sort of idea, yeah
<Leonidas> well, this seems to confirm it: http://blog.ezyang.com/2010/10/ocaml-for-haskellers/
wwilly has left #ocaml ["Leaving"]
<S11001001> Leonidas: related, but stricter
<Leonidas> is there some explanation that is explaining this restriction in ocaml terms?
<Leonidas> maybe this, though it is SML but I guess that is the same thing. http://mlton.org/ValueRestriction
kakadu_ has quit [Remote host closed the connection]
jao has quit [Ping timeout: 258 seconds]
badkins has joined #ocaml
<Leonidas> Drup: thanks for naming my problem, I think I can start understanding the problem from here :)
oscar_toro has quit [Ping timeout: 264 seconds]
lordkryss has quit [Quit: Connection closed for inactivity]
shinnya has quit [Ping timeout: 252 seconds]
art-w has quit [Ping timeout: 258 seconds]
badkins_ has joined #ocaml
ggherdov has quit [Ping timeout: 252 seconds]
fraggle_ has quit [Ping timeout: 258 seconds]
shinnya has joined #ocaml
deavid has joined #ocaml
mrpantoufle has quit [Ping timeout: 258 seconds]
badkins has quit [Ping timeout: 252 seconds]
deavidsedice has quit [Ping timeout: 252 seconds]
hyperboreean has quit [Ping timeout: 252 seconds]
art-w has joined #ocaml
hyperboreean has joined #ocaml
hyperboreean has quit [Changing host]
hyperboreean has joined #ocaml
fraggle_ has joined #ocaml
avsm has quit [Quit: Leaving.]
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bezirg has quit [Ping timeout: 264 seconds]
nadako has quit [Ping timeout: 252 seconds]
jonludlam has joined #ocaml
nadako has joined #ocaml
mrpantoufle has joined #ocaml
matason has quit [Quit: Leaving...]
ggherdov has joined #ocaml
Thooms has joined #ocaml
Thooms has quit [Client Quit]
BitPuffin has quit [Ping timeout: 240 seconds]
girrig has joined #ocaml
c74d has quit [Remote host closed the connection]
Simn has quit [Quit: Leaving]
c74d has joined #ocaml
badkins_ is now known as badkins
c74d has quit [Remote host closed the connection]
struktured has joined #ocaml
nadako has quit [Quit: Leaving]
badkins has quit [Ping timeout: 264 seconds]
TURAJAPELUA has joined #ocaml
TURAJAPELUA has left #ocaml [#ocaml]
xavierm02 has quit [Quit: Page closed]
badkins has joined #ocaml