<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?
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
<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.
<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]
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