Banana changed the topic of #ocaml to: OCaml 3.08.1 available! | Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A tutorial: http://merjis.com/richj/computers/ocaml/tutorial/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
smimou has quit ["?"]
GreyLensman has joined #ocaml
wreel has joined #ocaml
gim has quit ["night"]
wreel has left #ocaml []
xerox has quit [Connection timed out]
Hanji has joined #ocaml
WReel has joined #ocaml
malc_ has quit [Read error: 60 (Operation timed out)]
clog has quit [^C]
clog has joined #ocaml
mlh has quit [Client Quit]
WReel has left #ocaml []
dan2 has quit []
Herrchen_ has joined #ocaml
Herrchen has quit [Read error: 110 (Connection timed out)]
xerox has joined #ocaml
dd__ has joined #ocaml
GreyLensman has quit ["Leaving"]
mrvn has joined #ocaml
Submarine has joined #ocaml
mrvn_ has quit [Read error: 110 (Connection timed out)]
Herrchen_ is now known as Herrchen
monochrom has quit ["hello"]
vezenchio has joined #ocaml
Submarine has quit ["Leaving"]
smimou has joined #ocaml
srv_ has joined #ocaml
srv has quit [Read error: 104 (Connection reset by peer)]
Smerdy has joined #ocaml
Smerdyakov has quit [Read error: 110 (Connection timed out)]
Nutssh has quit ["Client exiting"]
smimou has quit ["?"]
Submarine has joined #ocaml
gim has joined #ocaml
mlh has joined #ocaml
mlh has quit [Client Quit]
Axioplase has joined #ocaml
<Axioplase> Chat Lu!
two-face has joined #ocaml
<two-face> hi
<Submarine> chalut
<two-face> chalut auchi
gim has quit [Read error: 113 (No route to host)]
srv_ is now known as srv
smimou has joined #ocaml
gim has joined #ocaml
two-face has quit [Read error: 60 (Operation timed out)]
det_ has joined #ocaml
det has quit [Read error: 104 (Connection reset by peer)]
GreyLensman has joined #ocaml
gim has quit [Read error: 113 (No route to host)]
gim has joined #ocaml
Axioplase has quit ["error 8.6 (Connection reset by beer)"]
smimram has joined #ocaml
smimou has quit [Nick collision from services.]
smimram is now known as smimou
Smerdy is now known as Smerdyakov
gpciceri has joined #ocaml
shrimpx has left #ocaml []
Riastradh has quit [Remote closed the connection]
Riastradh has joined #ocaml
Riastrad1 has joined #ocaml
Riastradh has quit [Nick collision from services.]
Riastrad1 is now known as Riastradh
Demitar has quit [Read error: 104 (Connection reset by peer)]
Demitar has joined #ocaml
two-face has joined #ocaml
gim has quit [Read error: 113 (No route to host)]
pango has quit [Nick collision from services.]
pango has joined #ocaml
two-face has quit [Read error: 110 (Connection timed out)]
haakon has joined #ocaml
gpciceri has quit ["Ciao, sono un virus dei messaggi di quit. Sostituisci la tua vecchia linea di quit con questa cosi potro continuare a moltipl]
<haakon> i have a recursive function which, to describe it abstractly, computes A as some_operation(recur(B), recur(C)). this overflows the stack on large enough inputs. can a function like that be made tail recursive? i cannot see how i could use accumulators, for instance
<Submarine> do you have exception handlers inside that function?
<haakon> no
<Riastradh> haakon, it would help to be more specific about the recursive algorithm.
<vincenz> Apparently he recurses down some binary structur
<haakon> vincenz: correctly
<mflux> haakon, note that you can use also put functions into accumulators, if that may help you..
<vincenz> I doubt it's possible
<haakon> -ly :)
<haakon> mflux: hm.
<vincenz> the fact of the matter is, no matter how you do it, you'll need space somehow
<haakon> yeah ... can i increase the stack space, at least?
<vincenz> due to the some_operation...
<haakon> s/space/size/
<avlondono> hum ... does the binary tree has some restriction? (like being complete for example?)
<haakon> it's a parse tree, so just some nodes have two children (but when they do, they have exactly two), others have only one
GreyLensman has left #ocaml []
monochrom has joined #ocaml
<avlondono> I guess there isn't any really good solution unless you represent the tree in some other way (like an array).
<haakon> not an option :)
<avlondono> I can imagine :-)
<haakon> i can also imagine that for these kinds of problems, there are no ways to rewrite the code into using constant-space imperative loops
two-face has joined #ocaml
<haakon> well, have to go, thanks for your input
haakon has quit ["leaving"]
vezenchio has quit ["smile, Rakka ..."]
haakonn has joined #ocaml
pflanze has joined #ocaml
<vincenz> Anyone have a simple example of a server with "select"
Submarine has quit ["Leaving"]
<Demitar> No, but I've got plenty of complicated ones. ;-) In essence it's not really different from a C server.
<vincenz> yeah but I've never done it in any lang...
<two-face> info libc :-) sockets section
<Demitar> In essence you create the socket (socket), bind and listen. You then start to loop using select and calling accept if the accept socket is in the result set and recv/send on the others. If a socket is in the read set but gives you no data then it's disconnected, and you close it and throw it away.
<vincenz> :/
<Smerdyakov> vincenz, have you read Beej's socket tutorial?
<two-face> you can't get away from learning theoretical basics
* Smerdyakov chuckles at the idea of "theoretical basics" and "C libraries" in the same thought.
<vincenz> I know how it works
<two-face> Smerdyakov: bah, you got the idea
<vincenz> just trying to find a clean way to get an application-independent server-code
<vincenz> so that you can use it as a pluginmodule
<Smerdyakov> two-face, not really
<two-face> Smerdyakov: remove "theoretical"
<Smerdyakov> But where woulld we be without theory?
<two-face> It is me that don't follow you new
<two-face> now
<two-face> Mister Karamazoff
<Smerdyakov> We'd be digging in the dirt with llama blood dripping from our ears, that's where.
<two-face> depends
<Demitar> vincenz, what do you mean by plugin?
<vincenz> basically a class/module that takes care of starting a server, and accepting sockets, and then based on a protocol (aka it's a functor) reads input and then passes it to the application, similarly it will ahve functions to write to a specific connection or to all connections
<Smerdyakov> vincenz, why not use inetd?
<vincenz> hmm?
<Smerdyakov> What?
<vincenz> exactly
<two-face> Smerdyakov: the world is made of cargo cult programers!
<vincenz> what is inetd?
<Smerdyakov> vincenz, ask the Internet.
<mflux> inetd is great for making any application talk to the network, but doesn't actually make things easier if the server needs to pass messages between clients or a central database (which would be inside the server process)
<Smerdyakov> Even better, ask your man pages.
<Demitar> vincenz, that would be faitly simple to do.
<two-face> what SCM are you using, everyone?
<two-face> I tried, darcs, tla, monotone, svk
<two-face> still evaluating
<mflux> I guess you could try subversion too, but it's far from perfect too
<mflux> oh, svk is based on svn
budjet has joined #ocaml
<two-face> i want a distributed one, so svn doesn't fit
<mflux> how was svk?
<two-face> i'm not pleased with svn as a backend
<mflux> problems?
<two-face> Smerdyakov: the survey in your blog is interesting
<two-face> mflux: yes, bdb breakages
<Smerdyakov> two-face, you mean the automatically generated religion deal?
<mflux> two-face, well, I think nowadays you can use file backends too, which I think is the preferred solution
<mflux> nice, svk has given some thought to merging
two-face has quit [Remote closed the connection]
jeff2 has joined #ocaml
budjet has quit [Connection timed out]
Shammah has quit [Connection timed out]
Shammah has joined #ocaml
gim has joined #ocaml
smimou has quit ["?"]
pango is now known as pangoafk
malc_ has joined #ocaml
jeff2 has quit [Read error: 110 (Connection timed out)]
pangoafk is now known as pango
haakonn_ has joined #ocaml
haakonn has quit [Read error: 110 (Connection timed out)]
malc_ has quit ["leaving"]