dark_light changed the topic of #ocaml to: OCaml 3.09.2 available! Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | 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 ["bli"]
mnemonic has quit ["leaving"]
jcreigh has joined #ocaml
dark_light has joined #ocaml
<dark_light> a socket connection is broken when Unix.recv returns 0 bytes. right? is it the only way to tell that the user has disconnected?
<dark_light> when the server receives the ^C character (end of text, 0x03 character) the socket stops receiving the text, but binary data might be using this character
<BetaTEST> in unix, recv returns -1 in case of error
<dark_light> really? it applies to ocaml's recv too?
<dark_light> and recv = 0, what means?
<dark_light> i am thinking in use Unix.establish_server instead..
jcreigh has quit ["Time to free up the phone line"]
coder_ has joined #ocaml
BetaTEST has quit []
masteraka has quit [Client Quit]
llama32 has joined #ocaml
chessguy has quit [" HydraIRC -> http://www.hydrairc.com <- The professional IRC Client"]
llama32 has quit ["Leaving"]
jcreigh has joined #ocaml
coder_ has quit ["Leaving"]
jcreigh has quit ["Do androids dream of electric sheep?"]
Svrog has joined #ocaml
<Svrog> hi
<Svrog> has anyone here recently tried to install godi under cygwin?
<dark_light> not me, but what is godi?
<Svrog> the only thing i need from there pretty much is ocamldap library - but i dont know whats worse, installing it through godi or doing it manually
<Svrog> it has a dozen dependancies all of which are a pain to build manually under cygwin
<dark_light> hmm.. well
<Svrog> godi should supposedly just work and sure enough on my mac it all build beautifully - but under cygwin i cant get past the bootstrap stage
<Svrog> builds*
<dark_light> you need ocamldap or ocamldep?
<Svrog> ocamldap
<dark_light> what is ocamldap?:)
<Svrog> ldap interface for caml
<dark_light> Ah.
<dark_light> i think installing the whole godi is better.. you might find some other libs useful too
<dark_light> but i am afraid i can't help you at all..
<dark_light> btw, intersting this godi
<Svrog> installing all of godi or just a number of packages doesnt matter - the problem is when i try to bootstrap godi
<dark_light> Svrog, what are the errors? and, your problem is when you initialize godi or when compiling?
<Svrog> problem is somewhere in the configure scripts - they dont seem to define all the macros such as HAVE_MEMSET
<Svrog> i tried to fix them up manually but there's always more and more of them
<Svrog> the script seems to detect them cause the log says "checking for memset... yes" but it doesn't add the macros to config.h
<dark_light> oh well :o
<Svrog> i dont know that much about autoconf and configure scripts... usually if the docs say something builds under cygwin i dont have to do that much to get stuff to build - but godi seems completely broken - i checked the mailing list and while there are a few people who appear to have a problem building under cygwin, they all got past the bootstrap stage
<Svrog> which is why i thought id check here
<Svrog> heh
<dark_light> maybe the ml gods are conspiring to you do not use such good tools under windows
<dark_light> :P
<Svrog> actually its going to be linux and windows - and in the end we'll most likely have to use either c++ or java heh
<Svrog> im hoping if i can get a prototype working in either erlang or caml (or haskell but i have an even bigger problem finding the right libs for haskell) then i might be able to convince management to let us use erlang or caml
<Svrog> erlang was my first choice - it comes with crypto libs, supports unicode, concurrency and i found an ldap lib - then i realized it doesnt support aes256 or sha256 heh
<dark_light> erlang? don't know this
<dark_light> Hm
<Svrog> if i had enough time i could just use haskell and write wrappers for ssl, ldap, etc myself - but this needs to be finished soon and i cant afford to waste time fiddling with that stuff
<dark_light> intersting that erlang..
<Svrog> yeah
Revision17 has joined #ocaml
<dark_light> anyone knows how can i tell the address of an user that are connecting to a server created with Unix.establish_server ?
<dark_light> i was attempting to create a good environment with the socket primitives but it was too hard for me :(
<fluxx> I don't think you can get it
<fluxx> no, wait
<dark_light> hmm
<fluxx> nope, I don't think that's possible
<fluxx> you would need to write your own. you could look at the ocaml implementation for an example..
<dark_light> i was wondering if it would be too hard to look at unix module code and simply modify what it pass to the calling function, but it don't seems to be written in ocaml..
<fluxx> oh, really
<fluxx> establish_server-function is written in ocaml
_jol_ has joined #ocaml
<fluxx> ocaml-src/otherlibs/unix/unix.ml
<dark_light> where can i find the ocaml-src path?
<fluxx> it's the extracted ocaml source
<fluxx> simply find for unix.ml
<dark_light> ah
<dark_light> downloading..
<dark_light> how nice! it's just to modify the server_fun inchan outchan to server_fun sockaddr inchan outchan. :o :o
<fluxx> a truly universal establish_server would also provide a function to be called before the fork, and allow its return value to be fed into the function
<dark_light> well, maybe..
<dark_light> i though to make compatible to the previous establish_server, with opt=value, but that way i must have to define a type for "establish_server input functions", and i give up
<dark_light> (well, i think variant types can be used with functions, but i never tried it)
m3ga has joined #ocaml
_jol_ has quit [Read error: 110 (Connection timed out)]
smimou has joined #ocaml
<dark_light> i have a let commatch x = Str.string_match (Str.regexp ("^" ^ x)) input_string 0 function, and when i do if commatch "quit" then, it executes only when input_string = "quit", not when input_string begins with "quit".. i am just misusing the Str.regexp ("^" ^ x) thing?
<dark_light> ps; forgot it, it's working correctly.. (.....)
<pango> <dark_light> anyone knows how can i tell the address of an user that are connecting to a server created with Unix.establish_server ?
<pango> maybe Unix.getpeername
<fluxx> you need file_descr for that
<dark_light> hmm.. the problem is that i need a file_descr
<fluxx> establish_server doesn't give you that
<dark_light> but i have alredy solved this
<pango> you don't have the descriptor ? mmmh
<dark_light> i created a new establish_server that passes to the handler function the address
<pango> Unix.descr_of_{in,out}_channel ...
<fluxx> funny, I looked over the Unix manual page but apparently I searched for the wrong thing
<dark_light> pango, :o
<fluxx> damn I now wish there was a tty-code-level buffer in a terminal so I could look up _what_ I was searching for :)
Svrog has quit []
m3ga has quit ["disappearing into the sunset"]
Bigb[a]ng is now known as Bigbang
_jol_ has joined #ocaml
descender has joined #ocaml
descender has quit ["Why has elegance found so little following? Elegance has the disadvantage that hard work is needed to achieve it and a good e]
love-pingoo has joined #ocaml
descender has joined #ocaml
descender has quit ["Why has elegance found so little following? Elegance has the disadvantage that hard work is needed to achieve it and a good e]
_jol_ has quit ["leaving"]
descender has joined #ocaml
_jol_ has joined #ocaml
ramkrsna has quit [Read error: 110 (Connection timed out)]
ramkrsna has joined #ocaml
love-pingoo has quit ["Connection reset by pear"]
_jol_ has quit ["leaving"]
coder_ has joined #ocaml
coder_ has quit ["Leaving"]
finelemon has quit [Read error: 104 (Connection reset by peer)]
finelemon has joined #ocaml
love-pingoo has joined #ocaml
mnemonic has joined #ocaml
Smerdyakov has quit ["Leaving"]
<mnemonic> hi *
<dylan> hi .+
Smerdyakov has joined #ocaml
mnemonic has quit ["leaving"]
mnemonic has joined #ocaml
rillig has joined #ocaml
Schmurtz has joined #ocaml
TeXitoi has joined #ocaml
<TeXitoi> hi
<TeXitoi> the difference between v2 and v3 of Ocaml is only "Labels and variants" ?
<Smerdyakov> I don't know. I don't think I ever used OCaml before versions 3.*.
<TeXitoi> (that's because I've read a book about Ocaml 2)
<Smerdyakov> OK. If by "variants," you mean "polymorphic variants," then the two features you list are features that I never use, so maybe it's not a big deal. :)
<TeXitoi> ;-)
<TeXitoi> the first line let me think that it's the only differences, but...
<Smerdyakov> Then I'm sure you can proceed as if that were so. I know there are new features like private row types in the latest releases, but really I suspect that all the changes are "advanced features" and maintain backward compatibility.
<TeXitoi> ok, thanks
cmeme has quit [Connection timed out]
shekmalhen has joined #ocaml
Schmurtz has quit ["Plouf !"]
shekmalhen has quit ["Bêêêêêêêêêh"]
slipstream-- has joined #ocaml
TeXitoi has left #ocaml []
slipstream has quit [Read error: 113 (No route to host)]
Bigbang is now known as Bigb[a]ng
lan1g1r0 has joined #ocaml
shekmalhen has joined #ocaml
cmeme has joined #ocaml
shawn has quit ["This computer has gone to sleep"]
mnemonic has quit ["leaving"]
lan1g1r0 has left #ocaml []
Revision17 has quit [Read error: 110 (Connection timed out)]
shawn has joined #ocaml
jcreigh has joined #ocaml
love-pingoo has quit ["Connection reset by pear"]
jcreigh has quit ["Do androids dream of electric sheep?"]