Cyanure has quit [Remote host closed the connection]
ikaros has quit [Quit: Ex-Chat]
sw2wolf has joined #ocaml
travisbrady has joined #ocaml
mattrepl has joined #ocaml
destrius has joined #ocaml
madroach has quit [Ping timeout: 244 seconds]
madroach has joined #ocaml
travisbrady has quit [Quit: travisbrady]
travisbrady has joined #ocaml
weie has joined #ocaml
metasyntax has quit [Ping timeout: 260 seconds]
metasyntax has joined #ocaml
sw2wolf has left #ocaml []
lolcathost has joined #ocaml
mye has quit [Ping timeout: 244 seconds]
travisbrady has quit [Quit: travisbrady]
paolooo has joined #ocaml
mye has joined #ocaml
mye has quit [Ping timeout: 256 seconds]
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
jewel has joined #ocaml
mye has joined #ocaml
andreypopp has joined #ocaml
ankit9 has joined #ocaml
mye has quit [Quit: mye]
andreypopp has quit [Quit: sleep]
testcocoon has quit [Quit: Coyote finally caught me]
jewel has quit [Ping timeout: 244 seconds]
ulfdoz has joined #ocaml
testcocoon has joined #ocaml
ulfdoz has quit [Read error: Operation timed out]
ankit9 has left #ocaml []
Cyanure has joined #ocaml
paolooo has quit [Quit: Page closed]
hkBst has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
groleo has quit [Quit: Leaving.]
groleo has joined #ocaml
hkBst has quit [Ping timeout: 244 seconds]
jpdeplaix has quit [Ping timeout: 264 seconds]
Snark has joined #ocaml
jpdeplaix has joined #ocaml
hkBst has joined #ocaml
djcoin has joined #ocaml
mika4 has joined #ocaml
hkBst has quit [Ping timeout: 265 seconds]
cago has joined #ocaml
Yoric has joined #ocaml
Submarine has quit [Ping timeout: 244 seconds]
mika4 has quit [Quit: Leaving.]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
mika4 has joined #ocaml
mattrepl has quit [Read error: Connection reset by peer]
mattrepl has joined #ocaml
destrius has quit [Ping timeout: 248 seconds]
destrius has joined #ocaml
hkBst has quit [Remote host closed the connection]
thomasga has joined #ocaml
hkBst has joined #ocaml
Kakadu has joined #ocaml
ftrvxmtrx has joined #ocaml
mika4 has quit [Quit: Leaving.]
lolcathost has quit [Ping timeout: 255 seconds]
andreypopp has joined #ocaml
mika4 has joined #ocaml
lolcathost has joined #ocaml
Guest12569 is now known as sgnb
sgnb is now known as Guest28471
Guest28471 is now known as sgnb`
hkBst has quit [Ping timeout: 264 seconds]
sgnb` is now known as sgnb
andreypopp has quit [Quit: sleep]
hyperboreean has quit [Read error: Operation timed out]
hyperboreean has joined #ocaml
ontologiae has joined #ocaml
ontologi1e has joined #ocaml
Kakadu has quit [Read error: Connection reset by peer]
hkBst has joined #ocaml
Kakadu has joined #ocaml
ocp has joined #ocaml
mika4 has quit [Quit: Leaving.]
Kakadu has quit [Read error: Connection reset by peer]
eikke has joined #ocaml
Kakadu has joined #ocaml
lolcathost has quit [Ping timeout: 252 seconds]
mika4 has joined #ocaml
hkBst has quit [Remote host closed the connection]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
beckerb has joined #ocaml
Kakadu has quit [Ping timeout: 252 seconds]
sepp2k has quit [Remote host closed the connection]
myx has quit [Ping timeout: 255 seconds]
Yoric has quit [Ping timeout: 240 seconds]
hkBst_ has joined #ocaml
hkBst_ has quit [Changing host]
hkBst_ has joined #ocaml
hkBst has quit [Read error: Connection reset by peer]
lolcathost has joined #ocaml
thomasga has quit [Read error: Connection reset by peer]
cago has quit [Ping timeout: 240 seconds]
thomasga has joined #ocaml
Yoric has joined #ocaml
destrius has quit [Quit: Leaving.]
mika4 has quit [Quit: Leaving.]
Kakadu has joined #ocaml
cago has joined #ocaml
paolooo has joined #ocaml
mika4 has joined #ocaml
rwmjones has quit [Ping timeout: 255 seconds]
larhat has quit [Quit: Leaving.]
andreypopp has joined #ocaml
thomasga has quit [Read error: Connection reset by peer]
andreypopp has quit [Read error: Connection reset by peer]
mika4 has quit [Quit: Leaving.]
andreypopp has joined #ocaml
thomasga has joined #ocaml
rwmjones has joined #ocaml
andreypopp has quit [Read error: Connection reset by peer]
andreypopp has joined #ocaml
eikke has quit [Ping timeout: 252 seconds]
ikaros has joined #ocaml
andreypopp has quit [Quit: sleep]
andreypopp has joined #ocaml
lolcathost has quit [Ping timeout: 248 seconds]
answer_42 has joined #ocaml
dwmw2_gone has quit [Ping timeout: 245 seconds]
dwmw2_gone has joined #ocaml
Yoric has quit [Ping timeout: 252 seconds]
jonafan has quit [Ping timeout: 260 seconds]
larhat has joined #ocaml
Neros has quit [Ping timeout: 246 seconds]
chambart has joined #ocaml
mika4 has joined #ocaml
ontologi1e has quit [Ping timeout: 250 seconds]
ontologiae has quit [Ping timeout: 256 seconds]
jonafan has joined #ocaml
lolcathost has joined #ocaml
xavierm02 has joined #ocaml
eikke has joined #ocaml
ontologi1e has joined #ocaml
ontologiae has joined #ocaml
hkBst_ has quit [Read error: Connection reset by peer]
hkBst__ has joined #ocaml
hkBst__ has quit [Ping timeout: 244 seconds]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
UncleVasya has joined #ocaml
fraggle_laptop has joined #ocaml
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
lolcathost has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
hkBst has quit [Remote host closed the connection]
hkBst has joined #ocaml
gnuvince has quit [Ping timeout: 245 seconds]
Neros has joined #ocaml
lolcathost has joined #ocaml
Neros has quit [Remote host closed the connection]
Neros has joined #ocaml
Neros has quit [Remote host closed the connection]
Neros has joined #ocaml
dwmw2_gone has quit [Ping timeout: 260 seconds]
metasyntax|work has joined #ocaml
m_m has joined #ocaml
sepp2k has joined #ocaml
smondet has joined #ocaml
thomasga has quit [Read error: Connection reset by peer]
thomasga1 has joined #ocaml
<companion_cube>
can I put constraints on types in function or module types? like val f : ('a :> my_class_type) -> unit
<companion_cube>
to say that f is polymorphic, but only on types that are subtypes of a class type
groleo has quit [Quit: Leaving.]
<Qrntz>
companion_cube, «val f : #my_class_type -> unit»
<thizanne>
companion_cube: typing of object goes naturally this way, if I understand your problem
<Qrntz>
companion_cube, or wait, did I misunderstand that…
<Qrntz>
you want f to accept any value of my_class_type and all its subclasses, right?
<companion_cube>
I would like
<Qrntz>
then my example suffices
<companion_cube>
hmm, wait, I would rather have actual type of the class 'a, rather than my_class_type
<companion_cube>
but i think it's too complicated :/
<Qrntz>
you can't coerce to a base class without changing the type
<companion_cube>
I would like to keep the type, but be sure it conforms to the given interface
<Qrntz>
have you tried not annotating the function and checking what the type inference gives you as the type?
<companion_cube>
well, it would be for a datatype more than a function, let's say the function is the datatype constructor
<companion_cube>
my goal is to parametrize the datatype with a (functional) object, while keeping the real type of the object so I don't lose the other methods of the object
<thelema>
companion_cube: then you need a polymorphic type - try writing an example of the function you want and looking at its type.
<thelema>
(as Qrntz has suggested)
<companion_cube>
I know I want a polymorphic type, that's why I want a 'a, I just need the 'a to conform to some class type to be able to use it
<thelema>
type 'a t = 'a constraint 'a : #my_class_type
<thelema>
or something like that.
<Qrntz>
«type 'a t = 'a constraint 'a = #my_class_type», rather
<thelema>
that looks good; I've never successfully used this feature
Kakadu has quit [Ping timeout: 260 seconds]
<companion_cube>
I'm testing
<companion_cube>
did I say the class type has a type parameter and is functional? :D
<thelema>
"functional"?
<companion_cube>
like class type ['a] foo = object ('b) method add : 'a -> 'b end
<thelema>
if the class type has type parameters, tack them on.
<thelema>
the methods of the class aren't a problem.
<thelema>
they're pretty irrelevant.
<companion_cube>
is this #('a foo) then ?
<thelema>
`type ('a, 'b) t = 'a constraint 'a = 'b #my_class_type` is my guess
m_m has quit [Ping timeout: 264 seconds]
<companion_cube>
so, I can put what I want in place of the second occurrence of 'a ?
<companion_cube>
like an actual type definition ?
<thelema>
type ('a, 'b) t = 'a * int constraint 'a = 'b #mct
<companion_cube>
wow, looks like the syntax you gave works
<companion_cube>
thank you very much, that's pretty impressive
<thelema>
being syntactically valid doesn't necessarily mean it'll work.
<thelema>
as you expect
<companion_cube>
(if you're curious, the ('a, 'b) t is a set of 'a elt with some additional data 'b, in which 'a elt are added and removed)
<companion_cube>
(and I need to keep the 'b to perform other 'b-specific operations on the metadata)
<companion_cube>
I'm really amazed by this constraint thing :)
jewel has joined #ocaml
<thelema>
glad it's working nicely for you
<companion_cube>
I hope it will!
<companion_cube>
but the .mli checks, I'll wait for the .ml to compile
Submarine has quit [Ping timeout: 255 seconds]
Cyanure has quit [Remote host closed the connection]
Tobu has quit [Ping timeout: 260 seconds]
mattrepl has quit [Quit: mattrepl]
ftrvxmtrx has quit [Quit: Leaving]
myx has joined #ocaml
thomasga1 has quit [Quit: Leaving.]
thomasga has joined #ocaml
thomasga has quit [Client Quit]
hkBst has quit [Quit: Konversation terminated!]
paolooo has quit [Quit: Page closed]
BiDOrD has joined #ocaml
BiDOrD_ has quit [Ping timeout: 252 seconds]
Neros has quit [Read error: Connection reset by peer]
Cyanure has joined #ocaml
gnuvince has joined #ocaml
smondet` has joined #ocaml
smondet has quit [Read error: Operation timed out]
tac has joined #ocaml
cago has left #ocaml []
mika4 has quit [Quit: Leaving.]
eikke has quit [Ping timeout: 252 seconds]
Kakadu has joined #ocaml
mattrepl has joined #ocaml
beckerb has quit [Ping timeout: 245 seconds]
mattrepl has quit [Ping timeout: 248 seconds]
ontologi1e has quit [Ping timeout: 250 seconds]
ontologiae has quit [Ping timeout: 250 seconds]
smondet` has quit [Ping timeout: 252 seconds]
fraggle_laptop has quit [Remote host closed the connection]
fraggle_laptop has joined #ocaml
mattrepl has joined #ocaml
sepp2k has quit [Remote host closed the connection]
cdidd has quit [Remote host closed the connection]
tac has quit [Ping timeout: 245 seconds]
larhat has quit [Quit: Leaving.]
ocp has quit [Quit: Leaving.]
milosn_ has joined #ocaml
milosn has quit [Ping timeout: 265 seconds]
tane has joined #ocaml
smondet has joined #ocaml
dwmw2_gone has joined #ocaml
jamii has joined #ocaml
andreypopp has quit [Quit: sleep]
mattrepl has quit [Quit: mattrepl]
ftrvxmtrx has joined #ocaml
tac has joined #ocaml
gnuvince has quit [Ping timeout: 260 seconds]
Submarine has joined #ocaml
larhat has joined #ocaml
chambart has quit [Ping timeout: 264 seconds]
gnuvince has joined #ocaml
Snark has quit [Quit: Quitte]
ousado has quit [Ping timeout: 265 seconds]
jewel has quit [Ping timeout: 265 seconds]
jamii has quit [Ping timeout: 252 seconds]
eikke has joined #ocaml
ikaros_ has joined #ocaml
jamii has joined #ocaml
ikaros has quit [Ping timeout: 260 seconds]
ikaros has joined #ocaml
ikaros has quit [Read error: Connection reset by peer]
ikaros has joined #ocaml
ikaros_ has quit [Ping timeout: 260 seconds]
gnuvince has quit [Ping timeout: 260 seconds]
UncleVasya has quit [Ping timeout: 248 seconds]
dwmw2_gone has quit [Ping timeout: 245 seconds]
<jonafan>
It'd be cool if Ohm's docs existed and the tutorial code worked
Neros_ has joined #ocaml
dwmw2_gone has joined #ocaml
dwmw2_gone has quit [Excess Flood]
dwmw2_gone has joined #ocaml
Kakadu has quit []
<orbitz>
Hrm, what's the best way to turn [1; 2; 3] into [(1, 2); (2, 3)]
<orbitz>
jonafan: brand spankin new I suppose
<jonafan>
yeah, i suppose
<thelema>
orbitz: match [1;2;3] with [x;y;z] -> [(x,y);(y,x)]
<thelema>
err, y,z
Pantoufle has quit [Quit: leaving]
<orbitz>
thelema: ;)
<jonafan>
I'd use List.map2
<jonafan>
List.map2 (fun a b -> (a,b)) lst (List.tl lst)
<thelema>
jonafan: guaranteed to raise an exception; map2 needs equal length lists
<orbitz>
How often do you use streams btw? On one hand they are a swell way to decouple code, on the other I'm not sure how much overhead they offer
<jonafan>
oh, then i'd implement a similar function that stops instead
Haseo has quit [Quit: Bye]
<thelema>
I use enums freely in non-performance intensive situations.
<orbitz>
I there a good pattern for getting a similar effect in performance code? Mostly I end up implementing something like java's iterator where you have a 'next' function
<orbitz>
Qrntz: yeah, implementing is easy just curious if one already existed
<Qrntz>
orbitz, if that makes you feel better, Ruby doesn't have a standard way to do that either (my code is a translation of a hacked-up Ruby function on arrays) :-p
<orbitz>
:)
<orbitz>
Qrntz: It doesn't, but thanks for the offer :)
Neros_ has quit [Ping timeout: 264 seconds]
Neros_ has joined #ocaml
ousado has joined #ocaml
ousado has quit [Changing host]
ousado has joined #ocaml
jamii has quit [Read error: Connection reset by peer]
ontologi1e has joined #ocaml
ontologiae has joined #ocaml
mattrepl has joined #ocaml
answer_42 has quit [Ping timeout: 248 seconds]
chambart has joined #ocaml
thomasga has joined #ocaml
Haseo has quit [Quit: Bye]
emmanuelux has joined #ocaml
weie_ has joined #ocaml
lolcathost has quit [Ping timeout: 255 seconds]
weie has quit [Ping timeout: 256 seconds]
pkrnj has joined #ocaml
ontologi1e has quit [Ping timeout: 260 seconds]
ontologiae has quit [Ping timeout: 260 seconds]
mye has joined #ocaml
Submarine has quit [Ping timeout: 252 seconds]
chambart has quit [Ping timeout: 246 seconds]
djcoin has quit [Quit: WeeChat 0.3.9.2]
eikke has quit [Ping timeout: 248 seconds]
tane has quit [Quit: Verlassend]
ikaros has quit [Quit: Ex-Chat]
Cyanure has quit [Read error: Connection timed out]
eikke has joined #ocaml
srcerer has joined #ocaml
gnuvince has joined #ocaml
thomasga has quit [Quit: Leaving.]
emmanuelux has quit [Quit: emmanuelux]
tac has quit [Ping timeout: 245 seconds]
smondet has quit [Ping timeout: 260 seconds]
pkrnj has quit [Quit: Computer has gone to sleep.]
fraggle_ has quit [Ping timeout: 264 seconds]
eikke has quit [Ping timeout: 240 seconds]
Neros_ has quit [Ping timeout: 260 seconds]
pkrnj has joined #ocaml
Neros_ has joined #ocaml
xavierm02 has quit [Remote host closed the connection]
pkrnj has quit [Quit: Computer has gone to sleep.]