silver has quit [Read error: Connection reset by peer]
Mercuria1Alchemi has quit [Ping timeout: 240 seconds]
smondet has quit [Ping timeout: 256 seconds]
rcabaco has joined #ocaml
rcabaco has quit [Ping timeout: 252 seconds]
ltadeu has quit [Remote host closed the connection]
shinnya has joined #ocaml
antkong_ has joined #ocaml
madroach has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #ocaml
madroach has joined #ocaml
wtetzner has joined #ocaml
wtetzner has quit [Remote host closed the connection]
antkong_ has quit [Quit: antkong_]
rcabaco has joined #ocaml
rcabaco has quit [Ping timeout: 248 seconds]
moei has quit [Quit: Leaving...]
mfp has quit [Ping timeout: 245 seconds]
NJBS has quit [Quit: Catastrophic failure.]
rcabaco has joined #ocaml
rcabaco has quit [Ping timeout: 252 seconds]
unbalancedparen has quit [Read error: Connection reset by peer]
P4Titan has joined #ocaml
unbalanced has joined #ocaml
<P4Titan>
Hi all. Is there a way to export a module to be accessed in another file with a name different than its host file's name?
<P4Titan>
host file's names: ie -- the file in which this module resides
Algebr`` has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
average has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
copy` has quit [Quit: Connection closed for inactivity]
shinnya has quit [Ping timeout: 252 seconds]
jao has quit [Remote host closed the connection]
\h has quit [Ping timeout: 240 seconds]
\h has joined #ocaml
ansiwen has quit [Read error: Connection reset by peer]
<P4Titan>
Hi all. How should I approach serialization in Batteries?
ansiwen has joined #ocaml
<cheater>
thizanne: i have? i don't think i have.
wtetzner has joined #ocaml
wtetzner has quit [Ping timeout: 240 seconds]
ansiwen has quit [Ping timeout: 256 seconds]
ansiwen has joined #ocaml
FreeBirdLjj has joined #ocaml
wtetzner has joined #ocaml
wtetzner has quit [Remote host closed the connection]
wtetzner has joined #ocaml
wtetzner has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Ping timeout: 240 seconds]
P4Titan has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
ryanartecona has joined #ocaml
Algebr`` has quit [Ping timeout: 255 seconds]
trepta has quit [Ping timeout: 248 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
ryanartecona has quit [Quit: ryanartecona]
wtetzner has joined #ocaml
wtetzner has quit [Ping timeout: 256 seconds]
FreeBirdLjj has joined #ocaml
nkhodyunya has joined #ocaml
rgrinberg has joined #ocaml
pierpa has quit [Ping timeout: 256 seconds]
madroach has quit [Quit: leaving]
tmtwd has joined #ocaml
madroach has joined #ocaml
tmtwd has quit [Quit: Leaving]
soupault has quit [Remote host closed the connection]
shinnya has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
rgrinberg has quit [Ping timeout: 260 seconds]
moei has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 255 seconds]
freusque has joined #ocaml
snhmib has joined #ocaml
shinnya has quit [Ping timeout: 240 seconds]
slash^ has joined #ocaml
sspi has joined #ocaml
MercurialAlchemi has joined #ocaml
FreeBird_ has quit [Remote host closed the connection]
larhat has joined #ocaml
FreeBirdLjj has joined #ocaml
rcabaco has joined #ocaml
mfp has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
larhat has quit [Quit: Leaving.]
slash^ has quit [Read error: Connection reset by peer]
slash^ has joined #ocaml
sspi has quit [Quit: Connection closed for inactivity]
Algebr`` has joined #ocaml
infinity0_ has joined #ocaml
infinity0_ is now known as infinity0
infinity0 has joined #ocaml
infinity0 has quit [Killed (moon.freenode.net (Nickname regained by services))]
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
infinity0 has joined #ocaml
FreeBirdLjj has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
slash^ has quit [Remote host closed the connection]
silver has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
slash^ has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
silver_ has joined #ocaml
jnavila has joined #ocaml
silver has quit [Ping timeout: 248 seconds]
_whitelogger has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
silver_ is now known as silver
average has quit [Ping timeout: 245 seconds]
average has joined #ocaml
SkeThuVe has joined #ocaml
jnavila has quit [Ping timeout: 252 seconds]
madroach has quit [Quit: leaving]
AlfredENeuman has quit [Ping timeout: 240 seconds]
jnavila has joined #ocaml
AlfredENeuman has joined #ocaml
rand__ has joined #ocaml
<jerith>
I want to write some tests for code that uses lwt and cohttp to talk to the network.
<jerith>
Are there any specific tools I should be looking at?
<jerith>
Or any good examples I can borrow from?
FreeBirdLjj has joined #ocaml
jnavila has quit [Ping timeout: 240 seconds]
<jerith>
Is it safe to just call Lwt_main.run in each test function?
jnavila has joined #ocaml
vicfred has joined #ocaml
<Drup>
jerith: yes, that's perfectly fine. The important things is to avoid nesting Lwt_main.run calls, but calling it several time in a non-nested way is fine
<Algebr``>
is it dangerous to run -rectypes?
<Algebr``>
and how do you do the flag rectypes to merlin? FLG rectypes?
<Drup>
the problem with rectypes is that it quite often accept expressions that are not the one you actually wanted to write, so you need to be quite careful
Sakarah has joined #ocaml
<Algebr``>
so it might make some typing harder but not like something that can blow up at runtime?
octachron has joined #ocaml
<thizanne>
I would say it's the opposite, typing is made easier, but then typing is supposed to prevent things from blowing up at runtime :p
P4Titan has joined #ocaml
<thizanne>
or better said, not-typing is supposed to
<P4Titan>
Hi all. I am trying to serialize some data, and from what I read, it seems using sexprs is the ocaml way to go
<P4Titan>
How should I approach using sexprs in Batteries?
<octachron>
Algebr``, I would say, typing with rectypes can be surprising: for instance "let rec elements = function [] -> [] | a :: q -> a @ q ;;" works with rectypes
<Drup>
Algebr``: let's just say that it makes writing non-terminating recursion even easier
<Drup>
P4Titan: so, what kind of things do you want to serialiaze, and what are you going to do with the serialized data ?
<Drup>
Depending of the answer, different serialization techniques are appropriate
<Algebr``>
thanks
FreeBirdLjj has quit [Ping timeout: 240 seconds]
<P4Titan>
Drup: I would want to serialize a custom declared type where each of its constructors would probably contain, strings, ints, and possibly binary data
<P4Titan>
or, by binary data, that could be another object's serialization
<Drup>
P4Titan: yes, that's serialization, but what are you doing with it :)
<P4Titan>
ic, I'm going to be sending this over TCP to a OCaml driven client
<Drup>
ok, so network stuff. There are protobuf libraries in OCaml, including a deriving thing
<Drup>
not really, more like an extension, specialized for urls
orbifx has joined #ocaml
<Drup>
furl uses tyre
<Algebr``>
kk
<jerith>
Drup: I get an error that looks like it comes from lwt when I do that: Fatal error: exception Unix.Unix_error(Unix.EINTR, "select", "")
<jerith>
I guess I can find information about that on the internet.
<P4Titan>
Drup: thanks, I shall look into it
<Drup>
jerith: hu, no idea
<Drup>
(yes, it's from lwt, but don't know why)
<jerith>
It might be an OSX thing.
<Drup>
probably, yes, but it should be auto-detected
<jerith>
My other programs that use lwt are fine, though.
<Drup>
you can try to change the Lwt_engine to libuv
<jerith>
So maybe it's lwt and ounit or something.
<Drup>
see Lwt_engine
shinnya has joined #ocaml
<Drup>
Algebr``: if you have remarks on furl API, please do open bug reports
<Algebr``>
probably will
smondet has joined #ocaml
ziyourenxiang has joined #ocaml
<P4Titan>
Drup: what about the Marshal module
<Drup>
P4Titan: do not send Marshal things on the wire, it's not safe
<P4Titan>
why is that?
<Drup>
marshal is unsafe, if you try to unmarshal some data that has been garbled in one way or another, it will cause segfaults
<P4Titan>
hmm, but doesn't TCP ensure packet completeness? I'm just curious
<Algebr``>
why segfaults and not exceptions
<Drup>
Algebr``: marshal is designed to be as fast as possible
<P4Titan>
So it uses C internally or something?
<Drup>
yeah
<Drup>
and it loads things in the ocaml memory representation directly
<Drup>
so, yeah, unless you have important speed and sharing constraints and you are not afraid to get segfaults if your input get garbled, use something that is checked, like json, sexp or protobuf
shinnya has quit [Ping timeout: 258 seconds]
<Algebr``>
something isn't type checking where the only difference in the reported type difference is _.. > and .. > for this open object
<Algebr``>
maybe this is that rectypes oddities?
<Algebr``>
heh, probably is, well this was fun.
<octachron>
Algebr``, "_.." sounds more like the value restriction than rectypes
ziyourenxiang has quit [Quit: Leaving]
<Algebr``>
I think you're right
P4Titan has quit [Remote host closed the connection]
orbifx has quit [Ping timeout: 258 seconds]
pierpa has joined #ocaml
<Algebr``>
How can I turn a local abstract type into a subtype of an open object type? This type a should be an instance of type <foo: string; .. >
<octachron>
A locally abstract type cannot be a subtype of anything, since an abstract type means (more or less) "a type on which there is no information available"
<Algebr``>
hmm, then the compiler shouldn't tell me this error message
<Algebr``>
since this could never be satisified
vicfred has quit [Quit: Leaving]
rpip has quit [Quit: Sleep... sleep... Zzz-_-zzZ]
larhat has joined #ocaml
fraggle_ has quit [Remote host closed the connection]
nkhodyunya has quit [Quit: Leaving.]
<octachron>
Algebr``, which error message are you talking about?
rgrinberg has joined #ocaml
<Algebr``>
I made a locally abstract type and then was told I needed to make it a subtype
fraggle_ has joined #ocaml
<Algebr``>
cohttp can make a http server now over a unix socket??
Sakarah has quit [Remote host closed the connection]
Sakarah has joined #ocaml
freusque has quit [Ping timeout: 240 seconds]
<reynir>
I don't think that's new
jnavila has quit [Ping timeout: 252 seconds]
trepta has joined #ocaml
kareeeeem has joined #ocaml
dhil has joined #ocaml
<Algebr``>
new to me
mfp has quit [Ping timeout: 240 seconds]
jnavila has joined #ocaml
<dmbaturin>
Why ocplib-endian has no uint32 or uint64?
mfp has joined #ocaml
jnavila has quit [Ping timeout: 240 seconds]
Xadnem has joined #ocaml
jnavila has joined #ocaml
Algebr`` has quit [Ping timeout: 255 seconds]
nkhodyunya has joined #ocaml
jnavila has quit [Ping timeout: 252 seconds]
contempt has quit [Remote host closed the connection]
lucybun has quit [Quit: lucybun]
jnavila has joined #ocaml
lucybun has joined #ocaml
lucybun is now known as _avery
tane has joined #ocaml
fraggle_ has quit [*.net *.split]
fraggle_ has joined #ocaml
freusque has joined #ocaml
trepta has quit [Ping timeout: 240 seconds]
snhmib has quit [Read error: Connection reset by peer]
jnavila has quit [Ping timeout: 240 seconds]
sz0 has joined #ocaml
copy` has joined #ocaml
snhmib has joined #ocaml
chindy has joined #ocaml
gnuyoda has joined #ocaml
ryanartecona has joined #ocaml
chindy has quit [Remote host closed the connection]
nicoo has quit [Remote host closed the connection]
jnavila has joined #ocaml
nicoo has joined #ocaml
kareeeeem has quit [Quit: Connection closed for inactivity]
Xadnem has quit [Ping timeout: 258 seconds]
myst|fon has joined #ocaml
Flerex has joined #ocaml
cpdean has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
xorpse has joined #ocaml
shinnya has joined #ocaml
kakadu has joined #ocaml
henrytill has quit [Remote host closed the connection]
wtetzner has joined #ocaml
henrytill has joined #ocaml
shinnya has quit [Ping timeout: 252 seconds]
Sakarah has quit [Quit: No Ping reply in 180 seconds.]
Sakarah has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
wolfcore has quit [Ping timeout: 248 seconds]
wtetzner has quit [Remote host closed the connection]
octachron has quit [Quit: Leaving]
wolfcore has joined #ocaml
Xadnem has joined #ocaml
pyx has joined #ocaml
pyx has quit [Client Quit]
Sakarah has quit [Remote host closed the connection]
sz0 has quit [Quit: Connection closed for inactivity]
dhil has quit [Ping timeout: 240 seconds]
freusque has quit [Ping timeout: 248 seconds]
jnavila has quit [Ping timeout: 252 seconds]
<cojy>
is there any way to have a reserved mutable register as a variable?