adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml MOOC http://1149.fr/ocaml-mooc | OCaml 4.02.3 announced http://ocaml.org/releases/4.02.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
<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);;
mau has quit [Ping timeout: 240 seconds]
madroach has quit [Ping timeout: 246 seconds]
madroach has joined #ocaml
<mfp> Algebr: https://github.com/OCamlPro/ocplib-endian might be useful to you
ely-se has quit [Quit: Leaving...]
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]
Bahman has joined #ocaml
kido1412 has joined #ocaml
<kido1412> Hi, does anybody know what's "|!" short for? I saw this from https://github.com/kennyyu/scratchpad/blob/master/ocaml/rpc-example/server.ml
<kido1412> For example, Add.sexp_of_query query |! Sexp.to_string |! printf "%s\n";
JacobEdelman has quit [Quit: Connection closed for inactivity]
palomer has joined #ocaml
<flux> kido1412, seems to me like it's the the same as |>, that is, 'a -> ('a -> 'b) -> 'b
<flux> kido1412, |! is not an ocaml-defined operator, so you can find it by looking for code like let (|!) ..
<flux> |> is relatively newly introduced operator in the standard ocaml, so perhaps that code was written before that
<flux> kido1412, it's defined in Core, in the module Fn
<flux> I shall quote fn.mli: (** A 'pipe' operator. Deprecated. *) external ( |! ) : 'a -> ( 'a -> 'b) -> 'b = "%revapply"
<kido1412> Thanks
sbrouf has joined #ocaml
Sorella has quit [Quit: Connection closed for inactivity]
Kakadu has joined #ocaml
Kakadu has quit [Remote host closed the connection]
ygrek has joined #ocaml
Bahman has quit [Read error: Connection reset by peer]
keep_learning has quit [Quit: This computer has gone to sleep]
pyon has joined #ocaml
kido1412 has quit [Ping timeout: 252 seconds]
dubosec has quit [Ping timeout: 265 seconds]
Bahman has joined #ocaml
palomer has quit [Quit: palomer]
octachron has joined #ocaml
keep_learning has joined #ocaml
Bahman has quit [Quit: Ave atque vale]
nicoo has quit [Ping timeout: 276 seconds]
AlexRussia has joined #ocaml
nicoo has joined #ocaml
pyon has quit [Ping timeout: 276 seconds]
pyon has joined #ocaml
ygrek has quit [Ping timeout: 256 seconds]
Algebr` has joined #ocaml
Algebr` has quit [Ping timeout: 260 seconds]
mort___ has joined #ocaml
tane has joined #ocaml
yegods has joined #ocaml
Haudegen has quit [Ping timeout: 272 seconds]
pyon has quit [Ping timeout: 265 seconds]
Haudegen has joined #ocaml
yegods has quit [Remote host closed the connection]
lobo has joined #ocaml
tane has quit [Ping timeout: 240 seconds]
tane has joined #ocaml
pyon has joined #ocaml
cody` has quit [Quit: Connection closed for inactivity]
FreeBirdLjj has joined #ocaml
pyon has quit [Ping timeout: 260 seconds]
yegods has joined #ocaml
MercurialAlchemi has joined #ocaml
pyon has joined #ocaml
mort___ has quit [Quit: Leaving.]
lobo has quit [Ping timeout: 255 seconds]
struktured has quit [Ping timeout: 260 seconds]
lobo has joined #ocaml
yegods has quit [Remote host closed the connection]
yegods has joined #ocaml
tane has quit [Remote host closed the connection]
contempt has quit [Ping timeout: 246 seconds]
yegods has quit [Remote host closed the connection]
contempt has joined #ocaml
yegods has joined #ocaml
ggole has joined #ocaml
pyon has quit [Ping timeout: 256 seconds]
pyon has joined #ocaml
d0nn1e has quit [Ping timeout: 250 seconds]
lobo has quit [Ping timeout: 264 seconds]
lobo has joined #ocaml
d0nn1e has joined #ocaml
Algebr` has joined #ocaml
dsheets has joined #ocaml
Algebr` has quit [Ping timeout: 255 seconds]
dsheets has quit [Ping timeout: 265 seconds]
mau has joined #ocaml
Sorella has joined #ocaml
thesnowdog1 has quit [Read error: Connection reset by peer]
octachron has quit [Ping timeout: 250 seconds]
lobo has quit [Quit: leaving]
yegods has quit [Remote host closed the connection]
zpe has joined #ocaml
pierpa has joined #ocaml
thesnowdog1 has joined #ocaml
zpe has quit [Remote host closed the connection]
shinnya has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 245 seconds]
sz0 has quit [Quit: Bye.]
sz0 has joined #ocaml
FreeBirdLjj has joined #ocaml
mau has quit [Read error: Connection reset by peer]
mau has joined #ocaml
mau has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
tane has joined #ocaml
dubosec has joined #ocaml
tautologico has joined #ocaml
cyraxjoe_ has joined #ocaml
malc_ has joined #ocaml
cyraxjoe has quit [Ping timeout: 272 seconds]
Korhoset has quit [Read error: Connection reset by peer]
Korhonen has joined #ocaml
Korhonen has quit [Remote host closed the connection]
Korhonen has joined #ocaml
keep_learning has quit [Quit: This computer has gone to sleep]
mort___ has joined #ocaml
yegods has joined #ocaml
contempt has quit [Ping timeout: 245 seconds]
cody` has joined #ocaml
pyon has quit [Ping timeout: 272 seconds]
contempt has joined #ocaml
mort___ has quit [Quit: Leaving.]
Anarchos has joined #ocaml
malc_ has quit [Ping timeout: 272 seconds]
pyon has joined #ocaml
malc_ has joined #ocaml
octachron has joined #ocaml
<Anarchos> what is the best combination unit tests/code coverage framework ?
mort___ has joined #ocaml
keep_learning has joined #ocaml
JacobEdelman has joined #ocaml
malc_ has quit [Ping timeout: 264 seconds]
malc_ has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
contempt has quit [Ping timeout: 256 seconds]
contempt has joined #ocaml
contempt has quit [Ping timeout: 245 seconds]
contempt has joined #ocaml
octachron has quit [Ping timeout: 250 seconds]
jyc has quit [Ping timeout: 264 seconds]
cschneid has quit [Ping timeout: 250 seconds]
tizoc has quit [Ping timeout: 260 seconds]
jerith has quit [Ping timeout: 272 seconds]
_habnabit has quit [Ping timeout: 250 seconds]
d0nn1e has quit [Ping timeout: 245 seconds]
hay207_ has joined #ocaml
<hay207_> hi guys, how to edit ocaml tutorials wiki?
d0nn1e has joined #ocaml
contempt has quit [Ping timeout: 260 seconds]
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?
malc_ has joined #ocaml
<groovy2shoes> octachron, thanks a bunch
yegods has joined #ocaml
<malc_> groovy2shoes: http://adam.chlipala.net/mlcomp/
types has joined #ocaml
<groovy2shoes> malc_, cool :)
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]
contempt has joined #ocaml
BitPuffin|osx has joined #ocaml
sh0t has joined #ocaml
Algebr` has joined #ocaml
NingaLeaf has joined #ocaml
NingaLeaf has quit [Quit: Textual IRC Client: www.textualapp.com]
NingaLeaf has joined #ocaml
hay207__ has joined #ocaml
sh0t has quit [Ping timeout: 276 seconds]
hay207_ has quit [Ping timeout: 272 seconds]
Denommus has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 260 seconds]
zpe has quit [Remote host closed the connection]
Denommus has quit [Quit: Bye]
hay207 has joined #ocaml
hay207__ has quit [Ping timeout: 260 seconds]
pyon has quit [Ping timeout: 240 seconds]
jonludlam has joined #ocaml
jonludlam has quit [Remote host closed the connection]
pyon has joined #ocaml
Algebr` has quit [Remote host closed the connection]
sbrouf_ has joined #ocaml
sbrouf has quit [Ping timeout: 260 seconds]
mac10688 has joined #ocaml
Stalkr_ has quit [Quit: Leaving...]
cody` has quit [Quit: Connection closed for inactivity]
yegods has quit [Remote host closed the connection]
ryanartecona has joined #ocaml
JacobEdelman has quit [Quit: Connection closed for inactivity]
yegods has joined #ocaml
pyon has quit [Ping timeout: 255 seconds]
JacobEdelman has joined #ocaml
Nahra``` has joined #ocaml
Nahra``` has quit [Changing host]
<pierpa> It's correct that there's no way to get current time outside of Unix?
esad has quit [Ping timeout: 255 seconds]
esad has joined #ocaml
pyon has joined #ocaml
<Anarchos> pierpa yes
<pierpa> ty.
<pierpa> So, basically it's a joke. Why distribute windows versions at all
esad has quit [Ping timeout: 245 seconds]
esad has joined #ocaml
teknozulu has joined #ocaml
Simn has quit [Quit: Leaving]
tane has quit [Quit: Verlassend]
Anarchos has quit [Ping timeout: 265 seconds]
esad has quit [Ping timeout: 272 seconds]
<fds> Patches are (probably) welcome. But I agree they should drop Windows support, it's not 2006 any more.
esad has joined #ocaml
Anarchos has joined #ocaml
<pierpa> what's the matter with windoes in 2006? :)
esad has quit [Ping timeout: 246 seconds]
esad has joined #ocaml
<fds> I mean that the Windows desktop share among programmers has dropped enough since 2006 that it's no longer necessary to (pretend to) support it.
<pierpa> hmmm... anyway yes, better to not pretend to
esad has quit [Ping timeout: 240 seconds]
esad has joined #ocaml
yegods has quit [Remote host closed the connection]
yegods has joined #ocaml
<Drup> pierpa: wait a second here: the Unix module is accessible on windows
<Drup> some syscall are not implemented, but most are
<pierpa> none of th eones I tried were present
<pierpa> ok, I was unaware I ahd to link the lib. ty!
<Drup> gettimeofday is not mentionned, and therefor should be implemented
<pierpa> *I had to...
<pierpa> I was trying from the top level, of course...
<Drup> #require "unix" ;;
<pierpa> Unknown directive `require'.
<Drup> your toplevel is not well configured :)
<Drup> look in the intro of RWO