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