gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.1 http://bit.ly/nNVIVH
sebz has quit []
jamii has joined #ocaml
dnolen has quit [Quit: dnolen]
sebz has joined #ocaml
khia0 has joined #ocaml
mal`` has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
khia0 has left #ocaml []
mal`` has joined #ocaml
lopex has quit []
sebz has quit [Ping timeout: 268 seconds]
sebz has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
sebz_ has joined #ocaml
sebz has quit [Ping timeout: 245 seconds]
sebz_ is now known as sebz
iratsu has joined #ocaml
dnolen has joined #ocaml
sebz has quit [Ping timeout: 258 seconds]
sebz has joined #ocaml
sebz has quit [Ping timeout: 276 seconds]
sebz has joined #ocaml
sebz has quit [Ping timeout: 250 seconds]
jimmyrcom has quit [Ping timeout: 246 seconds]
joewilliams is now known as joewilliams_away
sebz has joined #ocaml
sebz has quit [Ping timeout: 240 seconds]
sebz has joined #ocaml
marens has quit [Read error: Operation timed out]
marens has joined #ocaml
dark has joined #ocaml
sebz has quit []
sebz has joined #ocaml
joewilliams_away is now known as joewilliams
joewilliams is now known as joewilliams_away
ulfdoz has joined #ocaml
joewilliams_away is now known as joewilliams
bobry has quit [Ping timeout: 276 seconds]
ankit9 has quit [Quit: Leaving]
ankit9 has joined #ocaml
joewilliams is now known as joewilliams_away
bobry has joined #ocaml
dnolen has quit [Quit: dnolen]
sebz has quit [Quit: Computer has gone to sleep.]
larhat has joined #ocaml
ulfdoz has quit [Ping timeout: 260 seconds]
arubin has quit [Quit: arubin]
jamii has quit [Remote host closed the connection]
junsuijin has quit [Quit: Leaving.]
iratsu has quit [Ping timeout: 245 seconds]
bobry1 has joined #ocaml
mister_m has joined #ocaml
mister_m has left #ocaml []
Snark has joined #ocaml
rby has quit [Quit: leaving]
rby has joined #ocaml
avsm has joined #ocaml
avsm has quit [Client Quit]
nimred has joined #ocaml
jimmyrcom has joined #ocaml
edwin has joined #ocaml
ttamttam has joined #ocaml
jimmyrcom has quit [Ping timeout: 268 seconds]
avsm has joined #ocaml
ikaros has joined #ocaml
mnabil has joined #ocaml
avsm has quit [Quit: Leaving.]
ttamttam has quit [Ping timeout: 264 seconds]
marens has left #ocaml []
ygrek has joined #ocaml
avsm has joined #ocaml
Associat0r has joined #ocaml
Associat0r has quit [Changing host]
Associat0r has joined #ocaml
avsm has quit [Ping timeout: 252 seconds]
ttamttam has joined #ocaml
ftrvxmtrx_ has joined #ocaml
ftrvxmtrx has quit [Ping timeout: 250 seconds]
lopex has joined #ocaml
avsm has joined #ocaml
_andre has joined #ocaml
wolverian has quit [Ping timeout: 260 seconds]
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
Boscop has joined #ocaml
Boscop has quit [Client Quit]
Boscop has joined #ocaml
Boscop has quit [Changing host]
Boscop has joined #ocaml
Boscop has quit [Read error: Connection reset by peer]
Boscop has joined #ocaml
jimmyrcom has joined #ocaml
dark has quit [Ping timeout: 245 seconds]
dark has joined #ocaml
dnolen has joined #ocaml
Boscop has quit [Ping timeout: 268 seconds]
Boscop has joined #ocaml
Boscop_ has joined #ocaml
Boscop has quit [Ping timeout: 245 seconds]
avsm has quit [Quit: Leaving.]
sebz has joined #ocaml
waern has joined #ocaml
avsm has joined #ocaml
avsm1 has joined #ocaml
avsm has quit [Read error: Operation timed out]
dnolen has quit [Quit: dnolen]
Associat0r has quit [Quit: Associat0r]
lopex has quit []
avsm1 has quit [Quit: Leaving.]
larhat has quit [Quit: Leaving.]
<thelema> hopefully this is obvious to someone here:
<thelema> val eq : ('a -> (int * int) BatEnum.t) -> ('a -> (int * int) BatEnum.t) -> ('a, 'b) RS.t -> ('a, 'b) RS.t -> bool
<thelema> let diff to_ranges ~rs_in ~rs_out = not (eq Enum.singleton to_ranges rs_in rs_out)
<thelema> but diff has type: (int * int -> (int * int) BatEnum.t) -> rs_in:(int * int, 'a) RS.t -> rs_out:(int * int, 'a) RS.t -> bool
avsm has joined #ocaml
<thelema> I'm expecting to be able to have rs_out have type ('b,'a) RS.t, and diff's first parameter to be ('b -> (int*int) Enum.t)
<thelema> hmm, looking at the types again, the problem is in eq, as it's unified the 'a for both RS.t's
<thelema> ah, it's the fault of Option.eq having type `?eq:('a -> 'a -> bool) -> 'a option -> 'a option -> bool` when I want ('a -> 'b -> bool) -> 'a option -> 'b option -> bool
avsm has quit [Quit: Leaving.]
bobry1 has quit [Ping timeout: 245 seconds]
avsm has joined #ocaml
Boscop_ has left #ocaml []
ttamttam has quit [Remote host closed the connection]
joewilliams_away is now known as joewilliams
<thelema> Do any type theorists have a way to have Option.eq have type `?eq:('a -> 'b -> bool) -> 'a option -> 'b option -> bool` with ~eq defaulting to (=)?
<zorun> write an Option.eq2 function?
<thelema> yup, but it'd be nice to not need two functions just to have a default comparator
<thelema> two identical functions except for the default on ~eq, even.
<flux> thelema, no, there is no way
<flux> you think you could do it with Obj.magic, but no
<thelema> I imagine using Obj.magic would break (=)
<flux> the thing is, how would it know that you cannot call Option.eq (Some 1) (Some 1.0)? option types are basically just syntax candy for non-optional types that have type 'a option and that ocaml has no overloading
<flux> I guess it could work if it were a feature of the call site to fill in the default parmaeters
<thelema> I think the type of `Option.eq (Some 1)` could be clearly identified as `int option -> bool`
ulfdoz has joined #ocaml
<thelema> it would take more work on the part of the typechecker to "apply" the default function and re-infer the type. I guess avoiding this ugliness is reasonable.
avsm has quit [Quit: Leaving.]
sebz has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
blinky- has joined #ocaml
Anarchos has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
<mfp> thelema: there was a blogpost by lexify about a patch to the compiler that added implicit parameters allowing to do something along that line IIRC
<mfp> hmm lexifi
* thelema looks for that
ulfdoz_ has joined #ocaml
<thelema> ah, the implivit values patch worries me - just finding any function with the right type and using that as argument seems... icky somehow
sebz has joined #ocaml
sebz has quit [Client Quit]
ulfdoz has quit [Ping timeout: 240 seconds]
ulfdoz_ is now known as ulfdoz
<mfp> it's like hmm C++'s overloading rules, for values
<mfp> or something
<thelema> yes, but the name of the function matters for overloading; it doesn't (and can't, modulo modules) for implicit arguments
<mfp> yes there's something very evil about it
<thelema> I tried really hard to like their solution, but just couldn't.
<mfp> also would need to be accompanied by some sort of compiler warning/error for multiple _x/_y definitions with the same type
<thelema> I imagine adding a stupid function that just happens to have the same type as equality, and this breaking the whole system
<bitbckt> it reminds me of Scala implicits, but for arg defaults instead of casting defaults.
<mfp> introducing a typeclass-like restriction "there can only be one instance" (but at least it would be scoped to a module, not global)
<thelema> maybe flagging certain functions as elegible for this kind of compile-time dispatch would work.
<thelema> and it'd be a compile-time error to have two flagged functions with the same type
<bitbckt> and an error if no flagged function matches the default type, I suppose?
<thelema> bitbckt: of course
<thelema> err, "default type"?
<bitbckt> default arg's type.
<bitbckt> whatever. :P
<thelema> ah, yes.
Associat0r has joined #ocaml
Associat0r has quit [Changing host]
Associat0r has joined #ocaml
<bitbckt> this seems related to a recent Jane St. blog post...
<bitbckt> that one.
<thelema> I hope not - I thought that use of types not so useful.
<thelema> a great hack, but too much work just for defaults to show up in types
<bitbckt> I agree.
ttamttam has joined #ocaml
edwin has quit [Remote host closed the connection]
<flux> the 'overloading print' example they have is pretty compelling, but I'm not sure I like the machanism itself :)
Snark has quit [Quit: Quitte]
joewilliams is now known as joewilliams_away
joewilliams_away is now known as joewilliams
edwin has joined #ocaml
Dima has joined #ocaml
ttamttam has quit [Quit: Leaving.]
Dima has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
yezariaely1 has joined #ocaml
fraggle_ has quit [Quit: -ENOBRAIN]
fraggle_ has joined #ocaml
srcerer_ has joined #ocaml
srcerer has quit [Ping timeout: 258 seconds]
srcerer_ is now known as srcerer
avsm has joined #ocaml
yezariaely1 has quit [Quit: Leaving.]
zorun has quit [Ping timeout: 260 seconds]
zorun has joined #ocaml
tnguyen has joined #ocaml
ulfdoz has quit [Ping timeout: 258 seconds]
avsm has quit [Quit: Leaving.]
_andre has quit [Quit: leaving]
tnguyen has quit [Remote host closed the connection]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
betta_y_omega has quit [Ping timeout: 258 seconds]
betta_y_omega has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
edwin has quit [Remote host closed the connection]
jamii has joined #ocaml
mdmkolbe has joined #ocaml
<mdmkolbe> I believe the checksum for godi-ocaml-manual (3.12) is wrong in godi. Is anyone here involved in that?
jimmyrcom has quit [Ping timeout: 240 seconds]
Associat0r has quit [Quit: Associat0r]
Morphous has quit [Ping timeout: 245 seconds]
blinky- has quit [Quit: /quit]
mdmkolbe has quit [Quit: Leaving.]
joewilliams is now known as joewilliams_away
mdmkolbe has joined #ocaml
mdmkolbe has quit [Client Quit]
mdmkolbe has joined #ocaml
mdmkolbe has quit [Client Quit]
joewilliams_away is now known as joewilliams
mdmkolbe has joined #ocaml
joewilliams has quit [Changing host]
joewilliams has joined #ocaml
joewilliams is now known as joewilliams_away
mdmkolbe has quit [Client Quit]
mdmkolbe has joined #ocaml
BiDOrD has joined #ocaml
joewilliams_away is now known as joewilliams
Morphous has joined #ocaml
BiDOrD_ has quit [Ping timeout: 258 seconds]
mdmkolbe has quit [Quit: Leaving.]
mdmkolbe has joined #ocaml
mdmkolbe has quit [Quit: Leaving.]
ikaros has quit [Quit: Ex-Chat]
jamii has quit [Read error: Operation timed out]
joewilliams is now known as joewilliams_away
lopex has joined #ocaml
lopex has quit []
avsm has joined #ocaml
dnolen has joined #ocaml
avsm has quit [Quit: Leaving.]
<_habnabit> is there a way to just declare an interface in ocaml?
<_habnabit> like I have an object that implement some interface, and I'm going to write more. but I'm not sure what to do for the signatures of things.
<_habnabit> er, that was a little vague.
<_habnabit> say I have Impl_a.t and Impl_b.t, which implement #interface. if I wanted to make M.do: #interface -> unit, how would I declare #interface?
<zorun> for an object?
<_habnabit> yes.
<zorun> mmh, maybe use a "class type"
<_habnabit> ah, I see.
<_habnabit> looks perfect.
<zorun> cool then ;)
<_habnabit> yeah, excellent. that's exactly what I wanted.
zorun has quit [Quit: Lost terminal]
zorun has joined #ocaml
mcclurmc_ has joined #ocaml
jonathandav has quit [Read error: Connection reset by peer]
mcclurmc has quit [Read error: Connection reset by peer]
jonathandav has joined #ocaml
mcclurmc has joined #ocaml
ftrvxmtrx_ has quit [Read error: Connection reset by peer]
ftrvxmtrx_ has joined #ocaml
mcclurmc_ has quit [Ping timeout: 240 seconds]
arubin has joined #ocaml
<_habnabit> hmm, so you can't do `type t = {x: #i}`
<_habnabit> is there a workaround for this?
<_habnabit> and for now I'm doing `type 'a t = {x: #i as 'a}`, but I thought that #i was constrained to just those methods?
<_habnabit> so I'm not sure why I'm getting that same error.