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!)
seafoodX has joined #ocaml
seafoodX has quit []
seafoodX has joined #ocaml
seafoodX has quit [Client Quit]
tty56 has joined #ocaml
tty56_ has quit [Read error: 110 (Connection timed out)]
seafoodX has joined #ocaml
seafoodX has quit [Read error: 104 (Connection reset by peer)]
seafoodX has joined #ocaml
jlouis_ has joined #ocaml
jlouis has quit [Read error: 110 (Connection timed out)]
Jedai has quit ["KVIrc 3.2.6 Anomalies http://www.kvirc.net/"]
smimou has quit ["bli"]
thermoplyae has left #ocaml []
Mr_Awesome has quit [Read error: 110 (Connection timed out)]
fyodor has joined #ocaml
[azoic] has joined #ocaml
[azoic] has quit ["Leaving."]
[azoic] has joined #ocaml
[azoic1 has joined #ocaml
[azoic] has quit [Read error: 110 (Connection timed out)]
[azoic1 has quit ["Leaving."]
fyodor has quit [Remote closed the connection]
mordaunt has joined #ocaml
buluca has quit [Read error: 113 (No route to host)]
Mr_Awesome has joined #ocaml
mordaunt has quit [Read error: 104 (Connection reset by peer)]
[azoic] has joined #ocaml
[azoic] has quit [Client Quit]
joelr1 has joined #ocaml
Jedai has joined #ocaml
ramki has quit [Read error: 113 (No route to host)]
Nutssh has quit ["Client exiting"]
joelr1 has quit []
Mr_Awesome has quit [Read error: 110 (Connection timed out)]
smimou has joined #ocaml
velco has joined #ocaml
Demitar has quit ["Burn the land and boil the sea. You can't take the sky from me."]
Demitar has joined #ocaml
buluca has joined #ocaml
EliasAmaral has quit [Remote closed the connection]
Demitar has quit [Read error: 104 (Connection reset by peer)]
Demitar has joined #ocaml
Tetsuo has joined #ocaml
seafoodX has quit [Read error: 110 (Connection timed out)]
joshcryer has quit [Nick collision from services.]
joshcryer has joined #ocaml
seafoodX has joined #ocaml
velco has quit []
Tetsuo has quit ["Leaving"]
seafoodX has quit []
fritte has quit [Remote closed the connection]
fritte has joined #ocaml
fritte has quit ["Lost terminal"]
fritte has joined #ocaml
ramki has joined #ocaml
munga has joined #ocaml
<munga> what does it mean to write a function like :
<munga> external get: t -> elem list = "%identity"
<munga> something to do with an external reference ... but how does it work ?
<hcarty> munga: I'm not sure re: the "%identity" portion, but (for example) you can use external definitions to define the types for C function calls
<munga> I think %identity is something along the lines of a cast, saying : t t can also be see as elem list ... but I'm not sure. Ok for external. Can anybody confirm my interpretation ?
[azoic] has joined #ocaml
Demitar has quit [Read error: 110 (Connection timed out)]
munga has quit ["Leaving"]
pango has quit [Remote closed the connection]
[azoic] has quit ["Leaving."]
<flux-_> muidentity is basically a c-function that returns the same value as it gets as its input
<flux-_> and the types it takes and receives are defined there
<flux-_> I guess then operation is inlined also
<flux-_> oh, he left, hence tab-complete failed :)
pango has joined #ocaml
Mr_Awesome has joined #ocaml
<hcarty> flux-_: Is this documented somewhere? I don't see it in the C-interface portion of the manual
<hcarty> I've wondered for a while what the '%' implies and how it should be used
<flux-_> I don@t know if it@s documented (I don@t remember seei ng it( but I think % is just a reservedc character for special symbols
<flux-_> there might be others than just %identity, but it's the most commonly used - however, I think they should be only for ocaml internal use, really
<flux-_> sorry for typos, I'm typing from bed with lights off, from a cellphone :)
pango- has joined #ocaml
pango has quit [Remote closed the connection]
pango- is now known as pango
Demitar has joined #ocaml
<hcarty> flux-_: Thanks for the information
<flux-_> Obj.magic is the exposed version of that
<flux-_> infact the obj-module has a bunch of %-functions
kelaouchi has quit ["leaving"]
kelaouchi has joined #ocaml
joshcryer has quit [Client Quit]
pango has quit [Broken pipe]
pango has joined #ocaml
joshcryer has joined #ocaml
Mr_Awesome has quit [Read error: 110 (Connection timed out)]
kelaouchi has quit ["leaving"]
kelaouchi has joined #ocaml
psnively has joined #ocaml
<aij> are there any good references to understand the ocaml GC?
bluestorm__ has joined #ocaml
<psnively> The source code?
<aij> basically, I'm running into problems, because I was expecting l1@l2 to run in time proportional to the length of l1
<bluestorm__> aij: wich is the case, isn't it ?
<aij> well, I thoght so too...
<bluestorm__> hm
<aij> I'm appending a lot of lists (about 19408 of them), starting from the right of course
<aij> initially it takes less than 1/10th of a second
<aij> as it goes, the GC starts getting called more often
<bluestorm__> hm
<bluestorm__> why don't you use List.concat ?
<aij> eventually it ends up getting called a lot of times for each @
<aij> actually, I switched it to use List.rev_append on a reversed list
<bluestorm__> hm
<aij> because I was looking at the last element in the list for other reasons
<bluestorm__> i just checked @ code, and of course it is proportional to the length of l1
<aij> but, basically, with v=447 in OCAMLRUNPARAM it prints this between every one:
<aij> ref_table threshold crossed
<aij> <>!ref_table threshold crossed
<aij> <>!ref_table threshold crossed
<aij> <>!ref_table threshold crossed
<aij> <>!ref_table threshold crossed
<aij> <>!<>!<>!<>!<>!<>!<>!<>!<>!
<aij> It starts of printing only a single <>! after every 20 or so
<aij> psnively: wrt the source, is the GC stuff in the byterun directory used for native code?
Tetsuo has joined #ocaml
<psnively> That's a good question. I actually haven't spent much time with the source code.
psnively has quit []
<aij> well, I'm assuming yes, since grep says that's the only place the string "ref_table" appears
EliasAmaral has joined #ocaml
Torment has joined #ocaml
Tetsuo has quit [Remote closed the connection]
kelaouchi has quit ["leaving"]
Tetsuo has joined #ocaml
Jedai has quit [Read error: 110 (Connection timed out)]
<pango> there's a chapter on garbage collection in "developing applications with objective caml", but I'm not sure it will help understanding your problem
<pango> the amount of work the gc depends on how fast you generate garbage, it's only losely related to the efficiency of @
<aij> yeah, I know, but it seems odd that doing the same thing would generate more garbage later
<aij> I'm thinking maybe the fact that I'm interating over a hashtable and removing stuff from it might be causing the problem
<aij> but the hash function is pretty good in this case, so no bucket would end up with more than 3 elements
<pango> maybe creating temporary lists larger than minor heap is the problem... temporaries get promoted to the major heap instead of being (cheaply) discarded
<aij> the temporary lists are about 20 elements long
<bluestorm__> you may try to change some parameter's with the Gc module
<pango> ok, so it's not the case
<bluestorm__> i've tried that one time, and especially setting a highg major_heap_increment was very helpful
<bluestorm__> (of course it depends on your actual code a lot)
<pango> increasing the size of the minor heap can sometimes help too
* pango has OCAMLRUNPARAM='s=512k' in his environment
bluestorm__ has quit ["Konversation terminated!"]
buluca has quit [Read error: 113 (No route to host)]
<aij> i=8M,s=4M certainly helped... it now ran in 7 minutes rather than 12
<aij> Hmm, I wonder if it could have something to do with using ExtList
jonathanv has quit ["Leaving"]
jonathanv has joined #ocaml
Mr_Awesome has joined #ocaml
Tetsuo has quit ["Leaving"]
<aij> oh, I think I figured it out
<aij> there is other code that is doing work proportional to the size of the resulting list...
<aij> which also explains why the GC is doing so much more work...
<aij> yay, runs in 35 seconds now, with default GC parameters, and that part of the code is no longer the bottleneck
buluca has joined #ocaml
ntan1 has joined #ocaml
ntan1 has left #ocaml []
zmdkrbou has quit [Read error: 104 (Connection reset by peer)]
zmdkrbou has joined #ocaml