mrsolo has joined #ocaml
mrsolo has quit ["Leaving"]
vincenz has quit ["leaving"]
Smerdyakov has joined #ocaml
vincenz has joined #ocaml
b00t has joined #ocaml
Smerdyakov has quit []
cjohnson has quit [""We live like penguins in the desert...""]
Smerdyakov has joined #ocaml
ulfdoz_ has joined #ocaml
ulfdoz has quit [Read error: 110 (Connection timed out)]
Smerdyakov has quit ["sleep"]
mlh_ has quit [Client Quit]
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
Nutssh has joined #ocaml
m3ga has joined #ocaml
Herrchen has joined #ocaml
m3ga has quit ["Client exiting"]
Nutssh has quit ["Client exiting"]
pango has quit [Remote closed the connection]
smimou has joined #ocaml
MisterC has joined #ocaml
bk_ has joined #ocaml
vincenz has quit [clarke.freenode.net irc.freenode.net]
cp has quit [clarke.freenode.net irc.freenode.net]
Amorphous has quit [clarke.freenode.net irc.freenode.net]
calvin_ has quit [clarke.freenode.net irc.freenode.net]
cmeme has quit [clarke.freenode.net irc.freenode.net]
senko has quit [clarke.freenode.net irc.freenode.net]
MisterC has quit [clarke.freenode.net irc.freenode.net]
noj has quit [clarke.freenode.net irc.freenode.net]
Hadaka has quit [clarke.freenode.net irc.freenode.net]
bk_ has quit [clarke.freenode.net irc.freenode.net]
Herrchen has quit [clarke.freenode.net irc.freenode.net]
mrvn has quit [clarke.freenode.net irc.freenode.net]
cognominal has quit [clarke.freenode.net irc.freenode.net]
mattam has quit [clarke.freenode.net irc.freenode.net]
johs has quit [clarke.freenode.net irc.freenode.net]
dan2 has quit [clarke.freenode.net irc.freenode.net]
det has quit [clarke.freenode.net irc.freenode.net]
rossberg has quit [clarke.freenode.net irc.freenode.net]
SLi has quit [clarke.freenode.net irc.freenode.net]
skylan has quit [clarke.freenode.net irc.freenode.net]
mflux has quit [clarke.freenode.net irc.freenode.net]
slashvar[lri] has quit [clarke.freenode.net irc.freenode.net]
joo_ has quit [clarke.freenode.net irc.freenode.net]
smimou has quit [clarke.freenode.net irc.freenode.net]
_qvisitor has quit [clarke.freenode.net irc.freenode.net]
gim has quit [clarke.freenode.net irc.freenode.net]
_fab has quit [clarke.freenode.net irc.freenode.net]
Demitar has quit [clarke.freenode.net irc.freenode.net]
avlondono has quit [clarke.freenode.net irc.freenode.net]
eydaimon has quit [clarke.freenode.net irc.freenode.net]
TaXules has quit [clarke.freenode.net irc.freenode.net]
mellum has quit [clarke.freenode.net irc.freenode.net]
mauke has quit [clarke.freenode.net irc.freenode.net]
shrimpx has quit [Remote closed the connection]
ulfdoz_ has quit [Remote closed the connection]
shawn_ has joined #ocaml
bk_ has joined #ocaml
MisterC has joined #ocaml
smimou has joined #ocaml
Herrchen has joined #ocaml
vincenz has joined #ocaml
SLi has joined #ocaml
_fab has joined #ocaml
cp has joined #ocaml
calvin_ has joined #ocaml
cmeme has joined #ocaml
Amorphous has joined #ocaml
senko has joined #ocaml
avlondono has joined #ocaml
Demitar has joined #ocaml
mrvn has joined #ocaml
cognominal has joined #ocaml
_qvisitor has joined #ocaml
mattam has joined #ocaml
joo_ has joined #ocaml
slashvar[lri] has joined #ocaml
skylan has joined #ocaml
det has joined #ocaml
dan2 has joined #ocaml
rossberg has joined #ocaml
johs has joined #ocaml
Hadaka has joined #ocaml
noj has joined #ocaml
mflux has joined #ocaml
gim has joined #ocaml
eydaimon has joined #ocaml
TaXules has joined #ocaml
mellum has joined #ocaml
mauke has joined #ocaml
hfhf has quit [Read error: 104 (Connection reset by peer)]
ulfdoz has joined #ocaml
hfhf has joined #ocaml
shrimpx has joined #ocaml
_shawn has quit [Connection timed out]
vincenz has quit [clarke.freenode.net irc.freenode.net]
cp has quit [clarke.freenode.net irc.freenode.net]
Amorphous has quit [clarke.freenode.net irc.freenode.net]
calvin_ has quit [clarke.freenode.net irc.freenode.net]
cmeme has quit [clarke.freenode.net irc.freenode.net]
senko has quit [clarke.freenode.net irc.freenode.net]
MisterC has quit [clarke.freenode.net irc.freenode.net]
noj has quit [clarke.freenode.net irc.freenode.net]
Hadaka has quit [clarke.freenode.net irc.freenode.net]
hfhf has quit [clarke.freenode.net irc.freenode.net]
ulfdoz has quit [clarke.freenode.net irc.freenode.net]
dan2 has quit [clarke.freenode.net irc.freenode.net]
bk_ has quit [clarke.freenode.net irc.freenode.net]
det has quit [clarke.freenode.net irc.freenode.net]
mrvn has quit [clarke.freenode.net irc.freenode.net]
cognominal has quit [clarke.freenode.net irc.freenode.net]
Herrchen has quit [clarke.freenode.net irc.freenode.net]
johs has quit [clarke.freenode.net irc.freenode.net]
mattam has quit [clarke.freenode.net irc.freenode.net]
rossberg has quit [clarke.freenode.net irc.freenode.net]
SLi has quit [clarke.freenode.net irc.freenode.net]
skylan has quit [clarke.freenode.net irc.freenode.net]
mflux has quit [clarke.freenode.net irc.freenode.net]
slashvar[lri] has quit [clarke.freenode.net irc.freenode.net]
joo_ has quit [clarke.freenode.net irc.freenode.net]
_qvisitor has quit [clarke.freenode.net irc.freenode.net]
shawn_ has quit [clarke.freenode.net irc.freenode.net]
gim has quit [clarke.freenode.net irc.freenode.net]
smimou has quit [clarke.freenode.net irc.freenode.net]
_fab has quit [clarke.freenode.net irc.freenode.net]
avlondono has quit [clarke.freenode.net irc.freenode.net]
Demitar has quit [clarke.freenode.net irc.freenode.net]
mellum has quit [clarke.freenode.net irc.freenode.net]
eydaimon has quit [clarke.freenode.net irc.freenode.net]
TaXules has quit [clarke.freenode.net irc.freenode.net]
mauke has quit [clarke.freenode.net irc.freenode.net]
shrimpx has quit [Remote closed the connection]
shrimpx has joined #ocaml
mrvn_ has joined #ocaml
hfhf has joined #ocaml
ulfdoz has joined #ocaml
shawn_ has joined #ocaml
bk_ has joined #ocaml
MisterC has joined #ocaml
smimou has joined #ocaml
Herrchen has joined #ocaml
vincenz has joined #ocaml
SLi has joined #ocaml
_fab has joined #ocaml
cp has joined #ocaml
calvin_ has joined #ocaml
cmeme has joined #ocaml
Amorphous has joined #ocaml
senko has joined #ocaml
avlondono has joined #ocaml
Demitar has joined #ocaml
mrvn has joined #ocaml
cognominal has joined #ocaml
_qvisitor has joined #ocaml
mattam has joined #ocaml
joo_ has joined #ocaml
slashvar[lri] has joined #ocaml
skylan has joined #ocaml
det has joined #ocaml
dan2 has joined #ocaml
rossberg has joined #ocaml
johs has joined #ocaml
Hadaka has joined #ocaml
noj has joined #ocaml
mflux has joined #ocaml
gim has joined #ocaml
eydaimon has joined #ocaml
TaXules has joined #ocaml
mellum has joined #ocaml
mauke has joined #ocaml
mrvn has quit [Read error: 60 (Operation timed out)]
vincenz has quit [clarke.freenode.net irc.freenode.net]
cp has quit [clarke.freenode.net irc.freenode.net]
Amorphous has quit [clarke.freenode.net irc.freenode.net]
calvin_ has quit [clarke.freenode.net irc.freenode.net]
cmeme has quit [clarke.freenode.net irc.freenode.net]
senko has quit [clarke.freenode.net irc.freenode.net]
MisterC has quit [clarke.freenode.net irc.freenode.net]
noj has quit [clarke.freenode.net irc.freenode.net]
Hadaka has quit [clarke.freenode.net irc.freenode.net]
ulfdoz has quit [clarke.freenode.net irc.freenode.net]
hfhf has quit [clarke.freenode.net irc.freenode.net]
dan2 has quit [clarke.freenode.net irc.freenode.net]
bk_ has quit [clarke.freenode.net irc.freenode.net]
det has quit [clarke.freenode.net irc.freenode.net]
cognominal has quit [clarke.freenode.net irc.freenode.net]
Herrchen has quit [clarke.freenode.net irc.freenode.net]
johs has quit [clarke.freenode.net irc.freenode.net]
mattam has quit [clarke.freenode.net irc.freenode.net]
rossberg has quit [clarke.freenode.net irc.freenode.net]
SLi has quit [clarke.freenode.net irc.freenode.net]
skylan has quit [clarke.freenode.net irc.freenode.net]
mflux has quit [clarke.freenode.net irc.freenode.net]
slashvar[lri] has quit [clarke.freenode.net irc.freenode.net]
joo_ has quit [clarke.freenode.net irc.freenode.net]
_qvisitor has quit [clarke.freenode.net irc.freenode.net]
shawn_ has quit [clarke.freenode.net irc.freenode.net]
gim has quit [clarke.freenode.net irc.freenode.net]
smimou has quit [clarke.freenode.net irc.freenode.net]
_fab has quit [clarke.freenode.net irc.freenode.net]
avlondono has quit [clarke.freenode.net irc.freenode.net]
mrvn_ has quit [clarke.freenode.net irc.freenode.net]
Demitar has quit [clarke.freenode.net irc.freenode.net]
mellum has quit [clarke.freenode.net irc.freenode.net]
eydaimon has quit [clarke.freenode.net irc.freenode.net]
TaXules has quit [clarke.freenode.net irc.freenode.net]
mauke has quit [clarke.freenode.net irc.freenode.net]
shrimpx has quit [Remote closed the connection]
shrimpx has joined #ocaml
mrvn_ has joined #ocaml
hfhf has joined #ocaml
ulfdoz has joined #ocaml
shawn_ has joined #ocaml
bk_ has joined #ocaml
MisterC has joined #ocaml
smimou has joined #ocaml
Herrchen has joined #ocaml
vincenz has joined #ocaml
SLi has joined #ocaml
_fab has joined #ocaml
cp has joined #ocaml
calvin_ has joined #ocaml
cmeme has joined #ocaml
Amorphous has joined #ocaml
senko has joined #ocaml
avlondono has joined #ocaml
Demitar has joined #ocaml
cognominal has joined #ocaml
_qvisitor has joined #ocaml
mattam has joined #ocaml
joo_ has joined #ocaml
slashvar[lri] has joined #ocaml
skylan has joined #ocaml
det has joined #ocaml
dan2 has joined #ocaml
rossberg has joined #ocaml
johs has joined #ocaml
Hadaka has joined #ocaml
noj has joined #ocaml
mflux has joined #ocaml
gim has joined #ocaml
eydaimon has joined #ocaml
TaXules has joined #ocaml
mellum has joined #ocaml
mauke has joined #ocaml
__DL__ has joined #ocaml
slashvar[lri] has quit ["leaving"]
xidaux has joined #ocaml
<
xidaux>
Anyone around around ?
b00t has quit [Remote closed the connection]
avlondono has quit [Read error: 110 (Connection timed out)]
raboof has joined #ocaml
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
Lycan359 has joined #ocaml
Lycan359 has left #ocaml []
maml has joined #ocaml
xidaux has quit ["leaving"]
Smerdyakov has joined #ocaml
_fab has quit [Read error: 113 (No route to host)]
Smerdyakov has quit []
Smerdyakov has joined #ocaml
<
raboof>
hi, i need a quick pointer: how is file i/o done in ocaml?
<
Smerdyakov>
There are many ways, since you can interface with any C library you choose, more or less.
<
Smerdyakov>
The most basic way involves only types and values from Pervasives, and they're quite helpfully organized in the manual page on that.
<
Smerdyakov>
There are also the traditional POSIX things in the Unix module.
<
raboof>
ah, Pervasives looks good :)
<
raboof>
(i'm new to ocaml)
<
Smerdyakov>
Then you must PERISH.
<
raboof>
i'm guessing that's an acronym for something? :)
<
Smerdyakov>
No, actually it is a portent of doom.
<
Smerdyakov>
Well, this isn't the place to report it. :P
Smerdyakov has quit ["gone"]
ionOS has quit ["Leaving"]
mflux has quit [Remote closed the connection]
<
raboof>
how does one write mutually recursive functions?
<
raboof>
oh, with `and'. never mind :)
raboof has left #ocaml []
vezenchio has joined #ocaml
maml has quit [Read error: 145 (Connection timed out)]
Snark has joined #ocaml
_JusSx_ has joined #ocaml
vodka-goo has joined #ocaml
vodka-goo has left #ocaml []
fam has joined #ocaml
Gueben has joined #ocaml
mflux has joined #ocaml
mrsolo_ has joined #ocaml
MisterC has quit ["Client exiting"]
Skal has joined #ocaml
monochrom has joined #ocaml
pango has joined #ocaml
maml has joined #ocaml
Herrchen has quit ["bye"]
_JusSx_ has quit ["leaving"]
__DL__ has quit [Read error: 54 (Connection reset by peer)]
Snark has quit ["Leaving"]
smimou has quit ["↓"]
cjohnson has joined #ocaml
mrvn has joined #ocaml
mrvn_ has quit [Read error: 110 (Connection timed out)]
fam has quit [".,"]
Smerdyakov has joined #ocaml
Gueben has quit ["plouf"]
Skal has quit ["Client exiting"]
Smerdyakov has quit []
<
mrvn>
What is a good way to read a binary int16_t from a Unix.fd into an int?
<
mrvn>
To me it looks like a C wraper with read and ntohl() call is the easiest.
<
SLi>
I don't know about the easiest one, but...
<
SLi>
I would do something like Unix.reading 2 bytes, then it's sth like (Char.code str.[0])*256+(Char.code str.[1]).
<
SLi>
Or str.[1]*256+str.[0], depending on the byte order.
<
SLi>
And if it's signed, you need to subtract 65536 from it if it's above 32767.