Taaus changed the topic of #ocaml to: http://caml.inria.fr/oreilly-book/
}Topaz{ has quit ["Client Exiting"]
tav`` has joined #ocaml
malc has quit ["no reason"]
physarum has left #ocaml []
<timmy> when i have classes etc in other files, is it best to make a signature in like a .mli file and then am i supposed to include it into the .ml file i want to use it in?
<timmy> i just don't know how i'm 'supposed to do it' when i'm working with more than one source file... right now i'm thinking the C way because i want to compile natively
<timmy> well can anyone tell me if ocaml has support for threads and preempitative (however it's spelled) multitasking because i want to make threads and block read on them
Demitar has joined #ocaml
Demitar has quit []
gl has quit [Read error: 113 (No route to host)]
gl has joined #ocaml
Atcho has joined #ocaml
Atcho has left #ocaml []
two-face has joined #ocaml
<two-face> Hi
two-face has quit [Client Quit]
Demitar has joined #ocaml
gl has quit [Read error: 104 (Connection reset by peer)]
gl has joined #ocaml
Demitar has quit []
owll has joined #ocaml
owll has quit [Client Quit]
beschmi has joined #ocaml
<beschmi> hi
<smkl> hello beschmi
<smkl> timmy: ocaml supports posix threads if you have systhreads installed. for read, you should check the documentation so that you'll get non-blocking version
<smkl> timmy: about .mli files, they are just used as interfaces and the .ml file is just checked against them. if you want a module that only has definitions, just use .ml file with the definitions, without .mli file
<timmy> smkl: ok thanks. it looks when i make a lot of modules and compile them together, i don't have to do any sort of including to access them, so are they all just available everywhere?
<smkl> timmy: they are available if their .cmi files are in the include path
<timmy> is there a quick way to check if i have sys threads installed?
gl has quit [Read error: 104 (Connection reset by peer)]
gl has joined #ocaml
<smkl> try if you can compile a program that uses threads into native code
<smkl> or check if you have ocaml/libthreadsnat.a
nyoshi has joined #ocaml
nyoshi has quit [Client Quit]
<timmy> No implementations provided for the following modules:
<timmy> Unix referenced from main.cmx
<timmy> i don't know what i'm supposed to do
tmcm has joined #ocaml
beschmi has quit ["Hey! Where'd my controlling terminal go?"]
steele_ has joined #ocaml
<timmy> ok i figured that out
<timmy> ok now i want to try to open a file in a the current users home directory. am i supposed to use environmental variables?
<smkl> i cannot think any other way
<timmy> are class methods allowed to be recursive
<timmy> like here is what i wrote
<timmy> method private get_line (s:string) =
<timmy> let character = String.make 1 '\n' in
<timmy> let characters_read = Unix.read fd c 0 1 in
<timmy> match c with
<timmy> "\n" -> s
<timmy> "\r" -> get_line s
<timmy> _ -> get_line (s ^ character)
<timmy> oops s/c/character
<timmy> well i guess it doesn't like recursive methods
<smkl> sure, you just need to call them with self#get_line
<timmy> yeah i figured that out
<timmy> thanks
<timmy> what is annoying me is this likning
<timmy> linking
<timmy> i'm using Unix so i have to link it when i just compile this unit?
<timmy> i was hoping i could just link at the end
<smkl> ? there is no linking when something is just compiled
<timmy> oh man
<timmy> i put unix.cmxa after the file that gave the error
<timmy> so oops
<timmy> i don't see anything in the docs i have about reading environmental variables
<timmy> i thought about trying to read /etc/passwd but then i run into the problem of figuring out the current user
<timmy> which may be more complicated than ti should be
gl has quit [Read error: 113 (No route to host)]
<smkl> try Sys.getenv
<timmy> cool thanks
steele_ has quit ["g'night"]