cleverdra has quit [Read error: 110 (Connection timed out)]
mr_bubbs has joined #ocaml
whee has quit ["Leaving"]
incogito has quit ["Client Exiting"]
zack has joined #ocaml
* zack
is away: I'm busy
gl has joined #ocaml
nopcode has joined #ocaml
<
nopcode>
how can i parse a block of data by reading bytes, words, dwords etc. ?
<
nopcode>
like, a network packet
mrvn_ has joined #ocaml
mrvn has quit [Read error: 60 (Operation timed out)]
<
mr_bubbs>
nopcode: you can use Pervasives input functions
<
mr_bubbs>
such as input_char, input_line, input, input_byte
<
nopcode>
what do they operate on ?
<
mr_bubbs>
they read from OCaml channels
<
mr_bubbs>
you can convert a file descriptor to a channel, btw
<
mr_bubbs>
Unix.in_channel_of_descr
<
nopcode>
a string as well, then ?
<
mr_bubbs>
input_line would read from an in_channel into a string
<
mr_bubbs>
if you wanted to operate on a string itself, there are things in String and Pervasives to do just that
<
mr_bubbs>
is there anything in particular you are stuck with?
<
nopcode>
just thinking about parsing quake protocol stuff
<
nopcode>
that'd be reading an udp packet and then ploughing through byte / word / dword-wise
<
nopcode>
because the structure is not static
<
nopcode>
when reading packets, i get them as strings i reckon
<
mr_bubbs>
you could use...
<
mr_bubbs>
val input_byte : in_channel -> int
<
mr_bubbs>
Same as Pervasives.input_char, but return the 8-bit integer representing
<
mr_bubbs>
the character. Raise End_of_file if an end of file was reached.
<
nopcode>
or is there something like bitstrings ?
<
nopcode>
which can read 1-32 bits ?
<
mr_bubbs>
hmm.. you should check in the manual for that.. I don't generally need that
<
mrvn_>
And return what?
<
mrvn_>
array of bool?
<
nopcode>
no, an int
<
mrvn_>
int is only 31 or 63 bits.
<
mrvn_>
also when you read 16 Bit, should they be big or little endian?
<
nopcode>
hmm good question
<
nopcode>
i don't know :)
<
nopcode>
but on x86, i could still use 63 bit ints, right ?
two-face has joined #ocaml
<
two-face>
hey zack
<
two-face>
how doing?
gl has quit [Read error: 60 (Operation timed out)]
<
two-face>
zack: sven is talking about mini-freeze, do i have the right to upload updaes for cameleon?
<
zack>
I think that cameleon is a non problem because it isn't in testing
<
zack>
so it doesn't inhibit the ocaml package entering
<
two-face>
hmm true
gl has joined #ocaml
<
two-face>
it takes a long time to upload :p
<
zack>
I've an ADSL now :-P
<
two-face>
but upload bandwidth is 128 kb/s
<
two-face>
althought download is 512 :p
<
nopcode>
in germany, you can get 1,5 mbits adsl now :)
<
two-face>
for how much?
<
nopcode>
dunno, but they make tv spots for it
<
nopcode>
so it cant be that much
<
nopcode>
and 128 up / 768 down is cheap as a flatrate
<
nopcode>
like < 50 euro or sth
<
two-face>
here in .fr you can have 128/512 for 30 euros
<
two-face>
mine is 45 and i have a static IP
<
nopcode>
but flatrate ?
<
zack>
I've a 128/256 for 36 euros, flat, dynamic ip
<
two-face>
what's this?
<
zack>
I'm in italy for who don't know
<
two-face>
what's flatrate?
<
zack>
no hour limit I suppose ...
<
zack>
here in italy many provider propose 20 hours at month or similar
<
zack>
anyway, dynamic ip is not really a problem with ddts.net
<
two-face>
zack: with ADSL?
<
zack>
two-face: sure
<
two-face>
zack: you have limits?
<
zack>
20 hours month with band as mine is about 15 euros
<
two-face>
they suck, i have no limit here
<
zack>
obviously you than pay an extra for the additional time
<
zack>
two-face: I have no limit too, but the price is higher than the time limited one
<
zack>
for non-geek people 20 hours per month is reasonable :)
<
two-face>
i used to have cable
<
two-face>
they used to limit the amount of upload
<
two-face>
so i changed to DSL
<
two-face>
zack: FYI, quantz.debian.org is up and running and it'll have the sourceforge installed on it soon
<
zack>
two-face: great!
<
zack>
my server is going to be ... acquired :-(
<
two-face>
zack: how?
<
zack>
do you remember that I told you about a possible CVS space in a server of mine?
<
two-face>
yes i do
<
zack>
ok, it's a server acquired by me and some friends that will host ftp2.it.debian.org
<
zack>
we plan to use this server for general supports to free software projects ...
<
zack>
and I thought about having there our CVS ...
<
zack>
but ... it will be probably up and running at the end of November ...
<
zack>
so IMO is better to go for the debian's sourceforge
<
two-face>
i think so yeah
<
two-face>
zack: did you know that a free book "Pgramming Linux Games" is available?
<
zack>
uhm ... no, never heard about it
<
two-face>
maybe you wouldn't be interested :)
nopcode has quit ["Lost terminal"]
systems has joined #ocaml
zack has quit ["Client Exiting"]
zack has joined #ocaml
<
two-face>
zack: back ? :)
<
zack>
xchat crash ...
* zack
is away: I'm busy
Miwong has joined #ocaml
two-face has quit ["Client Exiting"]
Yurik has joined #ocaml
systems has quit [Read error: 110 (Connection timed out)]
Yurik has quit [Read error: 104 (Connection reset by peer)]
gl has quit [Read error: 104 (Connection reset by peer)]
gl has joined #ocaml
revanthn has joined #ocaml
clog has joined #ocaml
Miwong has quit ["Miwong has no reason"]
<
zack>
two-face: bye
zack has left #ocaml []
revanthn has joined #ocaml
two-face has left #ocaml []
clog has joined #ocaml
gene9 has joined #ocaml
gene9 has quit [Client Quit]
Miwong has joined #ocaml
Miwong has quit ["Miwong has no reason"]
Yurik has joined #ocaml
gl has quit [Read error: 104 (Connection reset by peer)]