<Algebr`>
from man htonl: htonl, htons, ntohl, ntohs -- convert values between host and network byte order
mau has joined #ocaml
<teknozulu>
if there's a system utility that provides these conversions you can always shell it out
ygrek has joined #ocaml
contempt has quit [Disconnected by services]
contempt has joined #ocaml
Stalkr^ has quit [Ping timeout: 265 seconds]
contempt has quit [Ping timeout: 272 seconds]
contempt has joined #ocaml
<Algebr`>
nvm, as usual needed to implement it. let byte_swap_32 value = ((value lsl 24) land 0xFF000000) lor ((value lsl 8) land 0x00FF0000) lor ((value lsr 8) land 0x0000FF00) lor ((value lsr 24) land 0x000000FF);;
Kakadu has quit [Remote host closed the connection]
yegods has quit [Remote host closed the connection]
<Algebr`>
thanks, looking.
lobo has quit [Quit: zleep]
<teknozulu>
Ugh. I have something along the lines of "type 'a msg". I need to somehow store a collection of msgs with different parameters, and 'a msg list won't do as that has to be homogenous
<teknozulu>
does such a conondrum indicate that I need to rethink my design, or this is plausible and there's a convenient solution
<Anarchos>
you have to rethink your design : or maybe use a list of marshalled values ?
<Drup>
teknozulu: you can use a type like this to hide the type parameter:
<Drup>
type any_msg : Any : 'a msg -> any_msg
<Drup>
type any_msg = Any : 'a msg -> any_msg
<Drup>
but once the type is hidden, you can't recover it
<Anarchos>
Drup isn't it dependent typing ?
<teknozulu>
the type parameter only exists because the type is used to store a function ('a -> unit), so 'a winds up being the type parameter
<Drup>
(if you want to know more, you can look up gadts/existential types)
<teknozulu>
so I think I'm fine with it disappearing
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
ygrek has quit [Ping timeout: 260 seconds]
Algebr` has quit [Ping timeout: 240 seconds]
Denommus has joined #ocaml
cody` has joined #ocaml
segmond has quit [Ping timeout: 240 seconds]
segmond has joined #ocaml
JacobEdelman has quit [Quit: Connection closed for inactivity]
badon has quit [Quit: Leaving]
pyon has quit [Quit: Loops are hard, let's GOTO shopping!]
JacobEdelman has joined #ocaml
badon has joined #ocaml
FreeBirdLjj has joined #ocaml
pierpa has quit [Ping timeout: 240 seconds]
Bahman has joined #ocaml
badon has quit [Quit: Leaving]
Guest29546 has quit [Ping timeout: 276 seconds]
cody` has quit [Quit: Connection closed for inactivity]
johnelse has joined #ocaml
johnelse is now known as Guest25781
struktured has joined #ocaml
badon has joined #ocaml
struktured has quit [Ping timeout: 272 seconds]
cody` has joined #ocaml
BitPuffin|osx has quit [Remote host closed the connection]
struktured has joined #ocaml
Guest1698 has quit [Ping timeout: 240 seconds]
wolfcore has joined #ocaml
wolfcore is now known as Guest97128
keep_learning has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
darkf has joined #ocaml
Guest97128 has quit [Ping timeout: 260 seconds]
wolfcore has joined #ocaml
wolfcore is now known as Guest73848
shinnya has quit [Ping timeout: 265 seconds]
Algebr` has joined #ocaml
Algebr` has quit [Ping timeout: 250 seconds]
mcint has joined #ocaml
badon has quit [Ping timeout: 272 seconds]
AlexRussia has quit [Ping timeout: 276 seconds]
Guest73848 has quit [Ping timeout: 246 seconds]
badon has joined #ocaml
wolfcore has joined #ocaml
wolfcore is now known as Guest14236
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
teknozulu has quit [Ping timeout: 260 seconds]
mcint has quit [Quit: hibernating...]
Simn has joined #ocaml
Bahman has quit [Read error: Connection reset by peer]
keep_learning has quit [Quit: This computer has gone to sleep]
contempt has joined #ocaml
cschneid has joined #ocaml
_habnabit has joined #ocaml
jyc has joined #ocaml
sh0t has quit [Ping timeout: 245 seconds]
tizoc has joined #ocaml
jerith has joined #ocaml
pyon has quit [Ping timeout: 265 seconds]
pyon has joined #ocaml
pyon has quit [Client Quit]
zpe has joined #ocaml
pyon has joined #ocaml
Anarchos has joined #ocaml
zpe has quit [Remote host closed the connection]
<Anarchos>
What is the best framework for unit test and code covergage ?
dubosec has quit [Ping timeout: 256 seconds]
FreeBirdLjj has quit [Ping timeout: 240 seconds]
mort___ has quit [Quit: Leaving.]
eikke has quit [Ping timeout: 245 seconds]
sz0 has quit [Quit: Bye.]
cdidd has quit [Ping timeout: 276 seconds]
cdidd has joined #ocaml
sh0t has joined #ocaml
ggole has quit []
FreeBirdLjj has joined #ocaml
ygrek has joined #ocaml
pyon has quit [Ping timeout: 245 seconds]
Anarchos has quit [Ping timeout: 265 seconds]
pyon has joined #ocaml
<groovy2shoes>
OCaml doesn't have any overloaded operators like Standard ML does, does it?
yegods has quit [Remote host closed the connection]
yegods has joined #ocaml
jonludlam has joined #ocaml
octachron has joined #ocaml
yegods has quit [Remote host closed the connection]
yegods has joined #ocaml
contempt has quit [Ping timeout: 276 seconds]
contempt has joined #ocaml
<malc_>
groovy2shoes: it does.. not the arithmetic ones though
yegods has quit [Remote host closed the connection]
yegods has joined #ocaml
yegods has quit [Remote host closed the connection]
<groovy2shoes>
malc_, thanks. What about a notion of equality types?
<malc_>
groovy2shoes: what little i've known about sml i've forgotten.. sorry
<octachron>
groovy2shoes, no equality types nor any kind of overloaded operators
<groovy2shoes>
malc_, if you're an OCaml programmer and you haven't had to worry about equality types, I'll assume OCaml doesn't have them ;) for some reason I think all types in OCaml are what SML would consider equality types, but I'm not sure
<groovy2shoes>
octachron, thanks, that's what I thought
<malc_>
octachron: comparison and equality operators are overloaded
<octachron>
not really equality and generic comparison works by comparing the underlyng memory structure
<groovy2shoes>
malc_, are they really overloaded or are the just polymorphic?
<malc_>
groovy2shoes: they are adhoc i'd say
<octachron>
there is no different behaviors for int or char or string, the functions works by looking at the memory representation
<groovy2shoes>
same with Hashtbl.hash, methinks
Madars has joined #ocaml
<malc_>
octachron: think custom ops
<malc_>
whois octachron
<malc_>
erm
<groovy2shoes>
a regular denizen of this channel, as far as I can tell :p
<octachron>
malc_, you can define your own version of equality or comparison operators, it is even advised in certain situations, but they are not overloaded in Pervasives
<octachron>
I am just me
sh0t has quit [Ping timeout: 272 seconds]
<octachron>
(and you cannot define a 'a -> 'a -> bool function that is not trivial in the limit of Ocaml type system)
<groovy2shoes>
I've always been on the fence about it... I think it's super convenient the way it works, but I've never liked that I can't write functions like that in OCaml (they have to be provided by the runtime)
<groovy2shoes>
of course, extending the type system to allow it would probably be a matter of immense research or a loss of certain other functionality
malc_ has quit [Ping timeout: 265 seconds]
<groovy2shoes>
octachron, is there somewhere I can read up on the situations in which it's advised to write your own comparison operators?
yegods has quit [Remote host closed the connection]
<types>
i want to store redis connection in a lwt thread local storage to later be able to close the connection. Is there something special to consider because i cant set the variable
palomer has joined #ocaml
Denommus has quit [Ping timeout: 246 seconds]
contempt has quit [Ping timeout: 264 seconds]
contempt has joined #ocaml
malc__ has joined #ocaml
malc__ has quit [Client Quit]
FreeBirdLjj has quit [Ping timeout: 240 seconds]
malc_ has quit [Ping timeout: 240 seconds]
palomer has quit [Quit: palomer]
palomer has joined #ocaml
Denommus has joined #ocaml
Denommus has quit [Max SendQ exceeded]
Denommus has joined #ocaml
Denommus has quit [Max SendQ exceeded]
Denommus has joined #ocaml
badon_ has joined #ocaml
tane has quit [Ping timeout: 260 seconds]
badon has quit [Disconnected by services]
tane has joined #ocaml
darkf has quit [Quit: Leaving]
Denommus` has joined #ocaml
ely-se has joined #ocaml
Denommus has quit [Ping timeout: 246 seconds]
keep_learning has joined #ocaml
contempt has quit [Ping timeout: 264 seconds]
Denommus has joined #ocaml
contempt has joined #ocaml
palomer has quit [Quit: palomer]
Denommus` has quit [Ping timeout: 240 seconds]
palomer has joined #ocaml
types has quit [Quit: Leaving]
tane has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #ocaml
tane has joined #ocaml
keep_learning has quit [Quit: This computer has gone to sleep]
eikke has joined #ocaml
keep_learning has joined #ocaml
pyon has quit [Ping timeout: 272 seconds]
zpe has joined #ocaml
zpe_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
contempt has quit [Disconnected by services]
contempt has joined #ocaml
zpe has quit [Ping timeout: 255 seconds]
Anarchos has joined #ocaml
d0nn1e has quit [Ping timeout: 272 seconds]
pyon has joined #ocaml
d0nn1e has joined #ocaml
palomer has quit [Quit: palomer]
palomer has joined #ocaml
<Anarchos>
hi everybody
palomer has quit [Quit: palomer]
esad has joined #ocaml
sz0 has joined #ocaml
Haudegen has quit [Ping timeout: 264 seconds]
esad has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
esad has joined #ocaml
Denommus has quit [Remote host closed the connection]
Kakadu has joined #ocaml
Guest25781 is now known as johnelse
keep_learning has quit [Quit: This computer has gone to sleep]
Denommus has joined #ocaml
Nahra``` has quit [Remote host closed the connection]
jkni has quit [Ping timeout: 240 seconds]
Nahra``` has joined #ocaml
ygrek has quit [Ping timeout: 265 seconds]
jkni has joined #ocaml
zpe_ has quit [Remote host closed the connection]
Haudegen has joined #ocaml
Denommus has quit [Remote host closed the connection]
raphaelss has joined #ocaml
Denommus has joined #ocaml
pyon has quit [Ping timeout: 260 seconds]
Stalkr_ has joined #ocaml
raphaelss has quit [Remote host closed the connection]
yegods has joined #ocaml
pyon has joined #ocaml
jonludlam has quit [Ping timeout: 246 seconds]
contempt has quit [Ping timeout: 264 seconds]
octachron has quit [Quit: Leaving]
keep_learning has joined #ocaml
Denommus has quit [Remote host closed the connection]
zpe has joined #ocaml
sz0 has quit [Quit: Bye.]
ygrek has joined #ocaml
pyon has quit [Quit: Loops are hard, let's GOTO shopping!]
pyon has joined #ocaml
keep_learning has quit [Quit: This computer has gone to sleep]