Taaus changed the topic of #ocaml to: http://caml.inria.fr/oreilly-book/
malc has quit ["no reason"]
thelema|away is now known as thelema
skylan is now known as Laura
Laura is now known as skylan
ni has joined #ocaml
<ni> Can anyone point me to an interesting, active opensource project written in a ML?
<thelema> ni: looking for a project?
<ni> Probably not, but I'd like to look through the code, and if I found it especially interesting I'd probably contribute..
<thelema> ni: oh well; we're just starting coding on ethel. We don't even have the CVS set up yet, but you can check out savannah.gnu.org/projects/ethel
<ni> Thanks.
<thelema> if you can hang around #ocaml, I'm sure me and travis will talk to people here more about it once we get the CVS up.
<thelema> you can check out liber/ofcp at www.sf.net/projects/liberator
<ni> Thanks.
<thelema> there's a decent amount of ml invested in a simple (well, not very simple anymore) client for freenet.
<thelema> ethel is going to be a implementation of a freenet node.
<timmy> can anyone tell me what transit endpoint is not connected means when i try to read/recv from a socket fd
<samx> dunno.. maybe that you have not connected the socket anywhere?
<ni> thelema: Thanks for the pointer, I'll check in again in a few days.
ni has quit ["Client Exiting"]
<samx> so, is there any content in freenet, that would not be found on the web, or what's the point of the project?
<timmy> samx: here is what i did:
<timmy> let () = Unix.connect fd (Unix.ADDR_INET(hostname.(0),port)) in
<timmy> let () = my_status_gui#set_progress "Socket connected" 3.0 in
<timmy> let () = my_stream#set_fd fd in
<timmy> let () = my_status_gui#set_progress (my_stream#get_line()) 4.0 in
<timmy> i think it fails on the last line
<timmy> with the get_line
<jemfinch> timmy: you can use the semicolon to sequence those expressions.
<timmy> which seems to work on all the other sockets i've faced
<timmy> jemfinch: i know
<timmy> i don't like it though
<jemfinch> timmy: you're the only one :)
<jemfinch> that's a lot more typing and it makes your code hard to read.
<samx> jem, have you installed smlnj on unix? i got it running on windows just fine, but can't seem to be able to install any version on my freebsd
<timmy> well i'll change it later
<jemfinch> samx: did you install it from ports?
<jemfinch> last time I was in FreeBSD, it installed fine from lang/smlnj-devel.
<samx> jem, tried from ports (both release version and devel version), and from the packages (both release and devel)
<jemfinch> samx: what error do you get?
<jemfinch> and when was the last time you cvsupped ports?
<timmy> so anyone have any ideas? it seems like i connected it
<samx> i cvsuped right before trying to install them.. the devel version complains something about not having a heap image.. and the non devel version, starts doing something.. and does it for a long time.. with no visible progress.. after some 7 hours and 300 megs of swap space used, i just cancelled it
<jemfinch> that's strange.
<jemfinch> I don't have a FreeBSD box to test it on now, since I'm running Windows XP, but last I used FreeBSD it worked great.
<samx> how long did the ports install take for you? (as in, max tens of minutes, or many hours?)
<jemfinch> maybe an hour or so, maybe a couple hours. Nothing too extreme.
<jemfinch> It was slower than O'Caml, for sure.
<samx> last thing it prints is '[Loading int-inf.sml.bin]'.. after that it just does something for ages without printing anything
<jemfinch> hmm. Can't say I know why :)
<jemfinch> have you tried perhaps an older version, or installing outside of ports?
<samx> yes, tried both.. tried the release version (110.0.7) (year and a half old, or so).. and the most recent version.. both, outside of ports and from ports
<samx> i'm running on windows too, but i run freebsd under vmware.. i can't stand the unix desktops, nor windows as a developing environment
<timmy> will semicolons work when the expression doesn't return unit also?
<timmy> hmm well i get a warning at least with the interpreter
<samx> you can do 'ignore (....);' to get rid of the warning.. or just keep the 'let () = ...'
<samx> just updating ports tree on my other freebsd machine.. will see it installing smlnj will work on it
<jemfinch> samx: I'm probably going to do the opposite of you -- run FreeBSD and Windows in VMware :)
<jemfinch> timmy: you'll get a warning if you use semicolons with non-unit expressions.
<jemfinch> timmy: and that's generally considered bad. Use the ignore function to ignore those.
<thelema> timmy: but only if you really mean to ignore the return values. The proper way would be to use functions that don't return values.
<jemfinch> samx: how much do you know about sml/nj so far?
<samx> jem, not that much.. i've been wanting to get more into it, but the installation problem is keeping me back.. i have this big thing about cross platform development, and i just can't get motivated with it, when i have it only running on windows
<jemfinch> samx: well, I'm sure it's going to be resolved shortly.
<jemfinch> you might send a bug report to the port maintainer, he seems to keep up with smlnj development pretty well.
<samx> yep.. if i didn't think it was likely only some 'triviality', i would've given up on it a while back :-)
thelema is now known as thelema|away
<jemfinch> I'm writing a unit-testing module for SML as an exercise, and so I can use it as I write my IRC bot :)
yangsx has joined #ocaml
<yangsx> hi, any suggestion for working with database in ocaml?
<jemfinch> what do you need to do?
<yangsx> i need to work with wordnet database. maybe convert it to a format ocaml can use directly.
<timmy> ok i have this weird problem now: i have an app that is like a server--it binds to a port and makes a separate thread for each connection. the main thread doesn't fork into the background. but i am doing something to make the program fork into the background and i think the only way i can kill it ( i cant login anymore) is to kill -9
<timmy> i don't know why it goes into the background
<timmy> i'm guessing something happens on a thread
<jemfinch> yangsx: you might find it easier to wrap the C api for the wordnet database.
<yangsx> ok. but how about the ndbm module?
<jemfinch> timmy: I don't know about O'Caml threads, but I know in Python you need to make your threads "daemonized" if you want the program to exit even though they're not finished.
<jemfinch> yangsx: what about it?
<jemfinch> timmy: so maybe you've got some threads handling connections just sitting around, and they're not letting your program exit. See if you can find a way to tell O'Caml that you want the program to exit even if they're hanging around.
<yangsx> jemfinch: i mean how about use ndbm for wordnet database?
<jemfinch> yangsx: ndbm works with ndbm files. Not wordnet files.
<timmy> hmmm
<yangsx> jemfinch: which is better: convert wordnet files to ndbm files or wrap the wordnet c api?
<jemfinch> yangsx: you can't convert wordnet files to ndbm files.
<timmy> jemfinch: well the problem is that the main thread goes into the background, so i assume that the main thread is dying but i can't figure out why because it doesn't seem to catch any errors in my try..with.. statement that surrounds like the main code
<jemfinch> timmy: how do you tell O'Caml that what you call "the main thread" is in fact the main thread? How do you tell O'Caml that the other threads are subordinate to that thread, and that "the main thread" is the only thread that should keep the O'Caml process alive?
<timmy> jemfinch: the main thread is the original one that is executed by the program and it makes other threads for each connection so i don't know why it wouldn't be the main thread
skylan has quit ["Reconnecting"]
skylan has joined #ocaml
<jemfinch> timmy: having not worked with threads in O'Caml, I don't know for sure how it works. But in Python, the language I have worked with threads in, *every* thread is a "main thread" unless you call a certain function to subordinate it.
<timmy> hmm ok
<timmy> well even if they are all main threads, the one that not letting me return to the command line in the shell is killed or something some how without printing an exception or anythnig
<jemfinch> sounds like a problem for the mailing list.
<timmy> i don't see anything in the Thread module that would let me make it like a child thread
<timmy> strace says killed by SIGPIPE
<timmy> i don't know what that means
<timmy> after accept(5, 0xbffff648, [112]) = ? ERESTARTSYS (To be restarted)
skylan has quit ["Reconnecting"]
skylan has joined #ocaml
jemfinch has quit []
smkl has quit [Read error: 110 (Connection timed out)]
yangsx has left #ocaml []
smkl has joined #ocaml
malc has joined #ocaml
malc has quit ["no reason"]
yangsx has joined #ocaml
yangsx has quit ["Client Exiting"]
exa has joined #ocaml
exa has quit [carter.openprojects.net irc.openprojects.net]
yamamoto has joined #ocaml
kjs3 has joined #ocaml
yamamoto has quit [Read error: 113 (No route to host)]
smkl has quit [Read error: 110 (Connection timed out)]
kjs3 has quit [Read error: 104 (Connection reset by peer)]
gl has joined #ocaml
Demitar has joined #ocaml
smkl has joined #ocaml
<Demitar> Hello smkl.
<smkl> hi Demitar
skylan has quit [Read error: 104 (Connection reset by peer)]
skylan has joined #ocaml
yamamoto has joined #ocaml
gl has quit [Remote closed the connection]
yamamoto has quit ["Lost terminal"]
puffin has quit ["bluuuuuuuuuuuuuuuuu"]
Demitar has quit []
gl has joined #ocaml
<timmy> when i use Unix.send from my server, i think ocaml(?) just kills some of my thread processes(and not all) when one of them is trying to send text on a broken pipe, so i have to kill the last thread with kill -9. anyone know how i can stop this sigpipe from happening?
<timmy> i can fix the client that breaks the pipe easily but i want a more robust server
<samx> there's functions signal and set_signal in module Sys, that you can use to ignore signals
<Dieb> hello
<timmy> ok i'll see if that stops it
<samx> hello
<timmy> samx: great!
<timmy> it works and now it raises an exception
<timmy> so i can catch it
Dieb has quit [Remote closed the connection]
gl has quit [Read error: 104 (Connection reset by peer)]
<timmy> anyone know how to get the selected row in a clist with lablgtk? i tried focus_row but that doesn't seem to be it
<smkl> focus_row should work. if not, try keeping track of it yourself
malc has joined #ocaml
<timmy> smkl: ok it seems to work but it was weird that it returned 0 when there was nothing selected in the list
<timmy> there was 1 item though