mbishop changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab Ocaml 3.10.0 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
screwt8 has quit [Remote closed the connection]
smimou has joined #ocaml
screwt8 has joined #ocaml
smimou has quit ["bli"]
delamarche has joined #ocaml
delamarche has quit []
what3 has joined #ocaml
tty56 has joined #ocaml
tty56_ has quit [Read error: 110 (Connection timed out)]
hcarty has joined #ocaml
hcarty has quit [Client Quit]
mbishop has quit [Remote closed the connection]
jao has quit []
jeffs has joined #ocaml
mbishop has joined #ocaml
mbishop_ has joined #ocaml
mbishop has quit [Read error: 110 (Connection timed out)]
mbishop_ is now known as mbishop
hcarty has joined #ocaml
pantsd has quit [Read error: 110 (Connection timed out)]
david_koontz has quit ["Leaving"]
pantsd has joined #ocaml
jeffs has left #ocaml []
screwt8 has quit [Remote closed the connection]
screwt887 has joined #ocaml
screwt887 has left #ocaml []
skal has joined #ocaml
skal has quit [kubrick.freenode.net irc.freenode.net]
Submarine has quit [kubrick.freenode.net irc.freenode.net]
smithzv has quit [kubrick.freenode.net irc.freenode.net]
Demitar has quit [kubrick.freenode.net irc.freenode.net]
skal has joined #ocaml
Submarine has joined #ocaml
smithzv has joined #ocaml
Demitar has joined #ocaml
ygrek has joined #ocaml
koye has joined #ocaml
koye has left #ocaml []
mbishop_ has joined #ocaml
Submarine has quit ["Leaving"]
mbishop has quit [Read error: 110 (Connection timed out)]
Cygal has joined #ocaml
Cygal has quit [Client Quit]
eumenides has joined #ocaml
screwt8 has joined #ocaml
jao has joined #ocaml
bluestorm_ has joined #ocaml
steele_ has joined #ocaml
eumenides has quit [Read error: 113 (No route to host)]
jao has quit []
G_ has joined #ocaml
eroyf has quit [Client Quit]
eroyf has joined #ocaml
G has quit [Nick collision from services.]
G_ is now known as G
EliasAmaral has quit [Read error: 110 (Connection timed out)]
smimou has joined #ocaml
Cygal has joined #ocaml
eroyf has quit [Client Quit]
eroyf has joined #ocaml
bluestorm_ has quit [Remote closed the connection]
garfiel59 has joined #ocaml
noteventime has joined #ocaml
Cygal has quit [Read error: 104 (Connection reset by peer)]
skal has quit [Remote closed the connection]
ygrek has quit [Remote closed the connection]
ygrek has joined #ocaml
Cygal has joined #ocaml
Cygal has left #ocaml []
rwmjones has joined #ocaml
olegfink has quit [Read error: 104 (Connection reset by peer)]
olegfink has joined #ocaml
pango has quit [Excess Flood]
pango has joined #ocaml
mbishop has joined #ocaml
steele__ has joined #ocaml
mbishop_ has quit [Read error: 110 (Connection timed out)]
sgillespie has joined #ocaml
<sgillespie> hello
<sgillespie> trying to figure out the whole module thing
love-pingoo has quit ["Connection reset by pear"]
<sgillespie> i keep getting
<sgillespie> Reference to undefined global `Print_ast'
eroyf has quit [Client Quit]
<sgillespie> after I do open Print_ast;;
eroyf has joined #ocaml
<sgillespie> if I reference it in the same file it seems to work well
steele_ has quit [Read error: 110 (Connection timed out)]
<Smerdyakov> "open" has nothing to do with making modules available.
<Smerdyakov> It just provides syntactic shorthand for accessing their members.
smimou has quit [Remote closed the connection]
<rwmjones> sgillespie, where does Print_ast come from?
<sgillespie> it comes from a file called print_ast.ml
smimou has joined #ocaml
<rwmjones> no I mean, which package? is it part of OCaml?
<sgillespie> no
<rwmjones> it's your module?
<sgillespie> its a file that I made
<sgillespie> yes
<rwmjones> ok, so did you compile print_ast.ml first?
<sgillespie> yes
<sgillespie> ocamlc -c print_ast.ml
<rwmjones> you should have files called print_ast.cmi and print_ast.cmo and perhaps a few others
<sgillespie> just those
<rwmjones> ok that's good
<rwmjones> now, when compiling your next module (whatever it's called - the one which needs Print_ast)
<rwmjones> the compiler needs to find print_ast.cmi
<rwmjones> so eg. if it's in the current directory where you're compiling that's good
<rwmjones> else you'll need to add -I <otherdir> to the compiler command
<rwmjones> eg:
<rwmjones> ocamlc -I ../otherdir other_module.ml
<rwmjones> ocamlc -c -I ../otherdir other_module.ml
<rwmjones> I mean
<sgillespie> I am trying to use it in the repl
<Smerdyakov> sgillespie, did you read the repl manual page?
<rwmjones> ok, so same thing applies - the toplevel needs to be able to find print_ast.cmi
<sgillespie> but what if it is in the current directory?
<rwmjones> then it should work
<flux> also you want to use #load "print_ast.cmo";;
<Smerdyakov> flux, not nice to say that, instead of helping him learn to read the manual.
<flux> :(
<sgillespie> oh...not "open Print_ast;;"?
<Smerdyakov> sgillespie, did you see what I said above?
<rwmjones> no, the open doesn't do anything
<Smerdyakov> "open" has nothing to do with making modules available.
<sgillespie> haha
<Smerdyakov> As you would know if you read the manual.
<sgillespie> Should've read that manual then
<sgillespie> where is the repl manual?
<flux> it's under the topic "The toplevel system"
<sgillespie> okay, i found the repl part...
<sgillespie> I appreciate the help everyone
smimou has quit [Remote closed the connection]
<Smerdyakov> sgillespie, and I don't appreciate your ignoring my question if you have had read the manual until now.
<sgillespie> it was 1 minute
GoNoGo has joined #ocaml
_JusSx_ has joined #ocaml
smimram has joined #ocaml
rwmjones has quit ["Closed connection"]
pango has quit [Remote closed the connection]
pango has joined #ocaml
mnemonic has joined #ocaml
kelaouch2 has quit ["leaving"]
kelaouchi has joined #ocaml
Submarine has joined #ocaml
Jessehk has joined #ocaml
<Jessehk> Should the "main" function bet declared as "main", or "main ()" ? When I declare it as returning unit, it doesn't run when executed.
<ulfdoz> Simply call it.
<Smerdyakov> There is no "main function" in OCaml.
<Smerdyakov> Side-effecting definitions are executed in linking order, file order within linking units.
<Jessehk> Smerdyakov: *slaps head*
<Jessehk> I think I just got it.
Demitar_ has quit [Read error: 113 (No route to host)]
<Jessehk> thanks. My mistake. :)
slipstream-- has joined #ocaml
slipstream has quit [Read error: 104 (Connection reset by peer)]
ygrek has quit [Remote closed the connection]
ygrek has joined #ocaml
benny has joined #ocaml
<flux> however, I've personally ended up using a main ()-function and adding the call to it after it, and not doing lots of side effects elsewhere
<flux> sometimes I use let main args = match args with .. let _ = main (List.tl (Array.to_list Sys.argv))
<flux> or even feed it some preprocesses block of parameter record
<flux> s/ses/sed/
<Jessehk> flux : I'm just going define a "main ()" and call it.
<Jessehk> :)
jeffs has joined #ocaml
benny_ has quit [Read error: 110 (Connection timed out)]
_JusSx_ has quit ["leaving"]
mbishop has quit [Read error: 110 (Connection timed out)]
Jessehk has quit ["Leaving"]
bluestorm_ has joined #ocaml
holo has joined #ocaml
<holo> hi
<holo> type expr =
<holo> | DISJ of expr * expr
<holo> this means constructor DISJ is fo type expr * expr?
<Smerdyakov> Please read the tutorial in the manual.
<holo> hm
<holo> ha
<holo> -.-
<holo> mistake of mine
<holo> after all, the types were correct
<holo> it was just a bad function call with a missing argument
malc_ has joined #ocaml
GoNoGo has quit ["beam me up sco..."]
CoffeeBuzz has joined #ocaml
malc_ has quit ["leaving"]
mbishop has joined #ocaml
garfiel59 has quit ["KVIrc 3.2.0 'Realia'"]
pango has quit [Remote closed the connection]
pango has joined #ocaml
<holo> erm
<holo> i made some 100 line code patch
<holo> and now i have an exception
<holo> :x
<holo> i'm paying my crimes
<holo> un uncaught exception
<holo> *an
<holo> was is the fast way to get throught this?
Riesz__ has quit ["Leaving.."]
<flux> compile with ocamlc -g and run with export OCAMLRUNPARAM=b and it'll tell a back trace
<holo> hmm. any idea what is that env equivalent in caml light?
<flux> no
<holo> :x
<holo> damm
<holo> and damm becouse ocaml implementation is incompatible with the light one
<flux> well, they are different languages, so it isn't that surprising
<mbishop> light hasn't been supported for quite some time
<flux> actually now that I look at it, it might be interesting for embedded targets, as its runtime environment is 100k :)
<holo> :o
<flux> but they (inria) themselves suggest to move on to ocaml
<holo> well.. if someone wishes to use my first order logic interpeter into some pda -.- be my guest
<holo> 732 lines of code till now
<holo> ok, some lines are whitespace
<holo> ok, pinpointed a the first function that creates exception
<holo> :D
<holo> divide and conquer method -.-
steele__ has quit ["Leaving"]
<bluestorm_> hum
<bluestorm_> i have a code that uses a lot of memory
ygrek has quit [Remote closed the connection]
<bluestorm_> i'm in the profiling phase, and i see the GC take 1/4 of the total time
<bluestorm_> i never tried to fine-tune the GC, do you have some pointer on that ?
<bluestorm_> (i have http://ocaml-tutorial.org/garbage_collection and http://caml.inria.fr/pub/docs/oreilly-book/html/book-ora088.html but they do not really describe what could and cannot be done)
<bluestorm_> hum
<bluestorm_> http://rafb.net/p/erC6XE88.html here are the profiling infos about the GC
<bluestorm_> is there something i can do about minor collections ?
<flux> I did some GC tuning a year, two ago, basically by dumping the gc stats periodically, profiling and then adjusting them via the GC interface, I think
<flux> so maybe that
<flux> 's something you could do
<flux> or is that what you're doing now?
<flux> it did increase the performance noticeably
<bluestorm_> hm
<bluestorm_> the problem is that i don't really know how to adjust the stats
<flux> this is my adjustment code: Gc.set ({ (Gc.get ()) with Gc.minor_heap_size = 1 lsl 18;(* space_overhead = 90;*) });
<flux> that is, what I ended up using, apparently some out commented code there too
<bluestorm_> :p
<bluestorm_> 1 lsl 18 is 2 ^ 18 ?
<flux> yes
<bluestorm_> hm
<bluestorm_> about 256 ko ?
<bluestorm_> seems fair
<flux> yes
<bluestorm_> i'll try that, thanks
<flux> you could fiddle with the other parameters too
<flux> imho it doesn't require understanding, perhaps you could hack up a genetic algorithm to find out optimal parameters :)
<bluestorm_> :D
<flux> you can set those parameters with OCAMLRUNPARAM too, perhaps it's easier to try out different values that way
<flux> but I'm off to sleep - good luck hacking it
<bluestorm_> thanks :p
CoffeeBuzz has quit [Remote closed the connection]
malc_ has joined #ocaml
descender has joined #ocaml
mbishop_ has joined #ocaml
descender has quit [Remote closed the connection]
holo has quit ["This computer has gone to sleep"]
mbishop has quit ["leaving"]
mbishop_ is now known as mbishop
<pango> bluestorm_: minor_heap_size unit is word, so 2^18 is 1MB on 32 bits archs and 2MB on 64 bits archs
the_dormant has joined #ocaml
<bluestorm_> pango: ok
bluestorm_ has quit ["Konversation terminated!"]
_blackdog has joined #ocaml
noteventime has quit ["Leaving"]
_blackdog_ has joined #ocaml
_blackdog has quit [Read error: 104 (Connection reset by peer)]
the_dormant has quit []
smimram has quit [Remote closed the connection]
smimou has joined #ocaml
_blackdog_ has quit [Read error: 110 (Connection timed out)]
malc_ has quit ["leaving"]
smimou has quit ["bli"]