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
ftrvxmtrx has quit [Ping timeout: 255 seconds]
sebz has quit [Quit: Computer has gone to sleep.]
avsm has quit [Quit: Leaving.]
sebz has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
destrius has joined #ocaml
oriba has quit [Quit: oriba]
caaakeeey has quit [Ping timeout: 240 seconds]
ikaros has quit [Quit: Ex-Chat]
jimmyrcom has left #ocaml []
everyonemines has joined #ocaml
copumpkin is now known as gourd
gourd is now known as copumpkin
struktured has quit [Ping timeout: 244 seconds]
Boscop has quit [Ping timeout: 258 seconds]
arsenm1 has joined #ocaml
BiDOrD has joined #ocaml
BiDOrD_ has quit [Ping timeout: 245 seconds]
sebz has joined #ocaml
emmanuelux has quit [Remote host closed the connection]
mlh has joined #ocaml
ankit9 has quit [Read error: Connection timed out]
ankit9 has joined #ocaml
ulfdoz has joined #ocaml
nb-ben has quit []
EmmanuelOga has quit [Ping timeout: 252 seconds]
Snark has joined #ocaml
gmcabrita has quit [Ping timeout: 240 seconds]
joewilliams has quit [Ping timeout: 248 seconds]
ulfdoz has quit [Ping timeout: 252 seconds]
ttamttam has joined #ocaml
joewilliams has joined #ocaml
ygrek has joined #ocaml
ttamttam has quit [Quit: Leaving.]
ikaros has joined #ocaml
ankit9 has quit [Quit: Leaving]
sebz has quit [Quit: Computer has gone to sleep.]
Associat0r has joined #ocaml
Associat0r has quit [Changing host]
Associat0r has joined #ocaml
ztfw has joined #ocaml
thomasga has joined #ocaml
zorun has quit [Read error: Connection reset by peer]
edwin has joined #ocaml
zorun has joined #ocaml
avsm has joined #ocaml
ankit9 has joined #ocaml
Cyanure has joined #ocaml
Kakadu has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
avsm has quit [Quit: Leaving.]
everyonemines has quit [Quit: Leaving.]
Cyanure has quit [Remote host closed the connection]
thomasga has quit [Quit: Leaving.]
avsm has joined #ocaml
ttamttam has joined #ocaml
avsm has quit [Quit: Leaving.]
ygrek has quit [Ping timeout: 248 seconds]
ikaros has joined #ocaml
musically_ut has quit [Read error: Connection reset by peer]
Cyanure has joined #ocaml
Associat0r has quit [Quit: Associat0r]
larhat has joined #ocaml
_andre has joined #ocaml
sepp2k has joined #ocaml
ikaros_ has joined #ocaml
musically_ut has joined #ocaml
thomasga has joined #ocaml
destrius has quit [Quit: Leaving.]
avsm has joined #ocaml
raichoo has joined #ocaml
corecode has quit [Quit: Reconnecting]
corecode has joined #ocaml
Associat0r has joined #ocaml
Associat0r has quit [Changing host]
Associat0r has joined #ocaml
Associat0r has quit [Client Quit]
Associat0r has joined #ocaml
Associat0r has quit [Changing host]
Associat0r has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
ygrek has joined #ocaml
ygrek has quit [Ping timeout: 248 seconds]
ygrek has joined #ocaml
sepp2k has quit [Remote host closed the connection]
ikaros has joined #ocaml
emmanuelux has joined #ocaml
andre___1 has joined #ocaml
andre___1 has quit [Client Quit]
_andre has quit [Ping timeout: 256 seconds]
_andre has joined #ocaml
_andre has quit [Client Quit]
_andre has joined #ocaml
ikaros_ has quit [Quit: Ex-Chat]
ViciousPlant has quit [Ping timeout: 276 seconds]
ViciousPlant has joined #ocaml
leboulanger has joined #ocaml
ygrek has quit [Ping timeout: 248 seconds]
caaakeeey has joined #ocaml
avsm1 has joined #ocaml
avsm has quit [Ping timeout: 244 seconds]
ftrvxmtrx has joined #ocaml
smerz has joined #ocaml
ttamttam has quit [Quit: Leaving.]
raichoo has quit [Read error: Connection reset by peer]
raichoo has joined #ocaml
avsm1 has quit [Ping timeout: 260 seconds]
copumpkin has quit [Ping timeout: 240 seconds]
copumpkin has joined #ocaml
pheredhel` has quit [Ping timeout: 260 seconds]
pheredhel has joined #ocaml
avsm has joined #ocaml
avsm has quit [Client Quit]
avsm has joined #ocaml
oriba has joined #ocaml
avsm has quit [Client Quit]
copumpkin has quit [Quit: Computer has gone to sleep.]
EmmanuelOga has joined #ocaml
leboulanger has quit [Ping timeout: 258 seconds]
Boscop has joined #ocaml
leboulanger has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
leboulanger has quit [Ping timeout: 245 seconds]
leboulanger has joined #ocaml
copumpkin has joined #ocaml
avsm has joined #ocaml
avsm has quit [Ping timeout: 276 seconds]
ttamttam has joined #ocaml
Kakadu has quit [Quit: Page closed]
ikaros has quit [Quit: Ex-Chat]
avsm has joined #ocaml
musically_ut has quit [Ping timeout: 240 seconds]
sepp2k has joined #ocaml
ankit9 has quit [Quit: Leaving]
ikaros has joined #ocaml
oriba has quit [Quit: oriba]
avsm has quit [Quit: Leaving.]
copumpkin has quit [Ping timeout: 245 seconds]
copumpkin has joined #ocaml
Cyanure has quit [Remote host closed the connection]
raichoo has quit [Quit: leaving]
musically_ut has joined #ocaml
sepp2k has quit [Remote host closed the connection]
sebz has joined #ocaml
fraggle_ has joined #ocaml
ankit9 has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
Cyanure has joined #ocaml
sebz has joined #ocaml
larhat has quit [Quit: Leaving.]
emmanuelux has quit [Remote host closed the connection]
leboulanger has quit [Remote host closed the connection]
ygrek has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
ygrek has quit [Ping timeout: 248 seconds]
thomasga has quit [Quit: Leaving.]
HaikuUser has joined #ocaml
sebz_ has joined #ocaml
ankit9 has quit [Ping timeout: 248 seconds]
<HaikuUser> Hello. To implement callbacks I have to write a function which returns other functions with many very different signatures. What is the easiest way to do it?
<_habnabit> what part are you stuck on
<HaikuUser> Creating a type to specify signatures of all functions which can be returned takes a lot of time. I'm not really stuck, but I want something like 'a -> 'b :)
<_habnabit> okay, and ?
<_habnabit> I don't know what you want from us
<flux> haikuuser, typically you have a type that embeds the type of the callback
<flux> like type ('a, 'b) callback
<flux> then you have functions with signatures like val doit : ('a, 'b) callback ->'a -> 'b, or some varation of the theme
<flux> I nay yave somerelated code around, but I'm two hours away from home ;)
<HaikuUser> Unfortunately callbacks are too "generic". For example, if I need to write "let callback x = match x with 1 -> ((+) 1) | 2 -> ((/.) 2)", there would be no common return type. Of course I can write a type which includes all possible variants, but I hoped there is a faster way
<_habnabit> HaikuUser, what is the actual problem you're trying to solve?
<_habnabit> HaikuUser, do you have some code?
<HaikuUser> The actual problem is easy passing of OCaml functions to C++ objects.
<_habnabit> so... what part are you getting stuck on?
ulfdoz has joined #ocaml
hyperboreean has quit [Ping timeout: 255 seconds]
hyperboreean has joined #ocaml
ankit9 has joined #ocaml
hyperboreean has quit [Ping timeout: 248 seconds]
as has joined #ocaml
as has quit [Client Quit]
mjonsson has joined #ocaml
Snark has quit [Quit: Quitte]
_andre has quit [Quit: leaving]
sebz_ has quit [Quit: Computer has gone to sleep.]
arsenm1 has quit [Read error: No route to host]
sebz has joined #ocaml
fraggle_ has quit [Quit: -ENOBRAIN]
<hcarty> HaikuUser: 'a -> 'b is only possible with Obj.magic and similar type system-breaking functions
<hcarty> HaikuUser: You would need to create a variant with all of the possible options or something similar.
<hcarty> HaikuUser: Where "something similar" would probably be more verbose than using a variant
emmanuelux has joined #ocaml
<_habnabit> I doubt it
<hcarty> _habnabit: Doubt...?
<_habnabit> I don't think there's actually a problem here; it seems just like an unspecified question
<_habnabit> er, underspecified
<hcarty> It sounds reasonably well specified
<hcarty> HaikuUser wants to define a function that can return multiple types
<_habnabit> yes, but I mean the reason for wanting to do that
<hcarty> This is only possible if those types are somehow wrapped
<hcarty> The reason is up to HaikuUser to decide :-)
<hcarty> If they want feedback on reasoning they are free to ask of course
<HaikuUser> The reason is: I have to either pass all callbacks to a C++ objects, or to provide a single callback function which returns every other callback. Now I see that the first method is not elegant, but much easier to implement. Obj.magic is dangerous, right?
<_habnabit> oh, pffft
<hcarty> HaikuUser: Obj.magic is always the wrong answer :-)
fraggle_ has joined #ocaml
avsm has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
ccasin has quit [Ping timeout: 258 seconds]
ccasin has joined #ocaml
pumpkin has joined #ocaml
pumpkin has quit [Changing host]
pumpkin has joined #ocaml
sebz_ has joined #ocaml
copumpkin has quit [Ping timeout: 260 seconds]
pumpkin is now known as copumpkin
thomasga has joined #ocaml
ohwow has joined #ocaml
ohwow has left #ocaml []
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
thomasga has quit [Client Quit]
gmcabrita has joined #ocaml
avsm has quit [Read error: Connection reset by peer]
avsm has joined #ocaml
iris1 has quit [Ping timeout: 255 seconds]
ztfw has quit [Remote host closed the connection]
copumpkin has quit [Quit: Computer has gone to sleep.]
edwin has quit [Remote host closed the connection]
ttamttam has quit [Quit: Leaving.]
Associat0r has quit [Quit: Associat0r]
Cyanure has quit [Remote host closed the connection]
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
Gulli has joined #ocaml
<Gulli> Hey everyone
<Gulli> Im makinga function that computes the mean of a float list. I need to declare a variable inside the function to hold the list length, hoow do I do that?
<Gulli> on second thought... thats not going to help me ><
avsm has quit [Ping timeout: 252 seconds]
Amorphous has quit [Ping timeout: 260 seconds]
sebz_ has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
copumpkin has joined #ocaml
avsm has joined #ocaml
dnolen has joined #ocaml
Amorphous has joined #ocaml
Gulli has quit [Quit: Page closed]
ikaros has quit [Quit: Ex-Chat]
HaikuUser has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
sebz has quit [Quit: Computer has gone to sleep.]
ulfdoz has quit [Ping timeout: 260 seconds]
ikaros has joined #ocaml