fschwidom has quit [Remote host closed the connection]
<adrien>
are you looking for some functionality in particular?
<albacker>
the server that i will code (hopefully) should be able to get data, test their first byte, if it's a good value, than test the second data, which will tell information about the rest of the packet. etc.
<albacker>
second byte*
<adrien>
I was asking because lwt (light/green threads) would probably be useful here and the doc is good
<albacker>
thanks :)
<adrien>
but then there is also ohttp, ocamlnet, and several others
<albacker>
it's a school project, they have already precised the protocol of the server
<albacker>
server/client.
<adrien>
iirc ohttp is quite light and could be a good example
<adrien>
except for the fact the name is probably not "ohttp"
<albacker>
Error: Unbound value domain_of
<albacker>
> the function establish_server is made up of high-level functions from the Unix library
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
yezariaely has left #ocaml []
<adrien>
ah, in godi, 2.5x faster display for the list of packages ("2" after starting godi_console), with clean patches (compile with ocamlopt instead of ocamlc)
emmanuelux has joined #ocaml
Cyanure has joined #ocaml
emmanuelux has quit [Ping timeout: 240 seconds]
hekaZ is now known as zorun
turingtest has joined #ocaml
mnabil has joined #ocaml
mx has joined #ocaml
<Boscop>
does polymorphic variant just mean that 'A' is a subtype of 'A | B' ?
<thelema>
Boscop: [`A] is a subtype of [`A|`B], yes
<Boscop>
ok
<thelema>
that's not the only difference between polymorphic and regular variants, but it's an important one
<Boscop>
what are other differences?
albacker has quit [Ping timeout: 240 seconds]
<thelema>
they don't need to be declared ahead of time, and their representation isn't as optimized as normal variants
sepp2k has quit [Remote host closed the connection]
turingtest has quit [Quit: turingtest]
wtetzner has quit [Remote host closed the connection]
turingtest has joined #ocaml
mnabil has quit [Remote host closed the connection]
<Boscop>
thelema, and what exactly does it mean to lift something?
<Boscop>
make it higher order?
<turingtest>
In Haskell it usually lift is used to talk about bringing a value or operation into a monad.
<turingtest>
This also works to lift an operation on a value to a container of values.
<Boscop>
ah
flapjackery has quit [Quit: Leaving]
xarch has joined #ocaml
arubin has joined #ocaml
fraggle_ has joined #ocaml
albacker has joined #ocaml
turingtest has quit [Quit: turingtest]
ttamttam has quit [Quit: Leaving.]
edwin has quit [Ping timeout: 248 seconds]
ikaros_ has joined #ocaml
wtetzner has joined #ocaml
fraggle_ has quit [Remote host closed the connection]
fraggle_ has joined #ocaml
edwin has joined #ocaml
oriba has joined #ocaml
jonafan has quit [Ping timeout: 248 seconds]
jonafan has joined #ocaml
ulfdoz has joined #ocaml
Associat0r has joined #ocaml
Associat0r has quit [Changing host]
Associat0r has joined #ocaml
emmanuelux has joined #ocaml
everyonemines has joined #ocaml
junsuijin has joined #ocaml
struktured has quit [Ping timeout: 260 seconds]
albacker has quit [Quit: Leaving]
edwin has quit [Remote host closed the connection]
everyonemines has quit [Quit: Leaving.]
struktured has joined #ocaml
rostayob has joined #ocaml
arubin has quit [Quit: arubin]
<rostayob>
Using OCaml mode in emacs disables comments highlighting in other modes
<zorun>
that's an assertion; what are we supposed to do with that? :)
<zorun>
you should use the tuareg-mode
<zorun>
I think the ocaml mode bundled with OCaml is not longer maintained
<rostayob>
zorun: you see, it worked! :)
<zorun>
eh eh ;)
<rostayob>
anyway thanks, I'll try it out
<rostayob>
aha, it's from Jane Street! I've got an interview with them in 2 days
<rostayob>
the world is a small place
<rostayob>
or maybe the ocaml community is a small place
<zorun>
the functional world, you mean ;)
<zorun>
yeah
<rostayob>
well even in the functional world there are some languages with more traction
<rostayob>
(clojure, scala, etc)
<Associat0r>
F#
<rostayob>
isn't F# a flavour of OCaml?
<rostayob>
(more or less)
<_habnabit>
no, they're both ML languages
<rostayob>
yeah but it's pretty close to OCaml right?
<_habnabit>
in that they're both ML languages, yes
<Associat0r>
Caml with a .NET object model
<rostayob>
ah. I thought that it borrowed specific caml features
<rostayob>
*caml-specific features
<rostayob>
anyway, back to ocaml ehe
yroeht has quit [Ping timeout: 260 seconds]
yroeht has joined #ocaml
ygrek has quit [Remote host closed the connection]
ztfw has quit [Read error: Connection reset by peer]
<Kaedenn>
l1 and l2 are int lists. I just need to figure out the signature for f, base and args.
<_habnabit>
homework :(
<Kaedenn>
Now you see why I was unwilling to ask in here.
<Kaedenn>
But it isn't my homework! I'm the tutor!
<Kaedenn>
;-;
<_habnabit>
haha
<_habnabit>
I don't actually know what it's asking. [1; 2] [3; 9] -> [5; 1] ?
<Kaedenn>
yes!
<Kaedenn>
basically (map (+) (zip l1 l2)) but with modulus somewhere
<_habnabit>
I mean, I could tell you how to do it, but.
<_habnabit>
what part are you stuck on?
<Kaedenn>
what f should look like
<Kaedenn>
...aaaaaaaand my student tells me she figured it out, and then just signed out
<Kaedenn>
le sigh.
<_habnabit>
haha
<_habnabit>
anyway here's what I had: List.fold_left (fun (carry, accum) (a, b) -> let v = a + b + carry in v / 10, v mod 10 :: accum) (0, []) (List.combine (List.rev l1) (List.rev l2))
Amorphous has joined #ocaml
<Kaedenn>
that... doesn't compile with the code I have, when I try to piece it apart
<Kaedenn>
let f a x = (fun (carry...
<_habnabit>
let f a x = let carry, accum = a and a, b = x in let v = a + b + carry in ...
<_habnabit>
well, or `let f a x = let (carry, accum), (a, b) = a, x in ...`
<Kaedenn>
and how do I print a list xD
<_habnabit>
without batteries, not easily
<_habnabit>
I just did in the toplevel though
<Kaedenn>
meaning?
<_habnabit>
in this case List.iter (Printf.printf "%d, ") should be sufficient