Haudegen has quit [Remote host closed the connection]
kushal has quit [Quit: Leaving]
grouzen has joined #ocaml
tennix has joined #ocaml
rgrinberg has joined #ocaml
igoroliveira has joined #ocaml
whirm has joined #ocaml
strmpnk has quit []
OnkV has joined #ocaml
lwlvlpl has joined #ocaml
OnkV has quit [Ping timeout: 252 seconds]
uris77 has joined #ocaml
rgrinberg has quit [Ping timeout: 246 seconds]
t4nk333 has joined #ocaml
OnkV has joined #ocaml
<t4nk333>
Does anyone know how Core.Std.Set is implemented under the hood? Hashtable? And is there a practical upper limit to how many elements you can have in a set before performance degrades terribly? I know Set.Make only relies on sexp functions and a compare function that are used for creating a comparator witness. But if a binary comparison has to be made for equality using that comparison function between all elements in a set upon eve
<companion_cube>
your message has been truncated
<companion_cube>
I assume Set is built on AVL trees, as in the stdlib
OnkV is now known as Haudegen
<t4nk333>
I was wondering b/c heard Erlang dictionaries used to implement a set suffer from a practical upper limit...about 1000, due to explosion of comparisons that must be made on every insert.
<companion_cube>
it's a logarithmic number of comparisons, here
mfp_ is now known as mfp
<t4nk333>
\quit
t4nk333 has quit []
<mfp>
wow I hard a hard time believing this so I checked it, and yes, erlang dicts are really O(n) in most ops of interest (!!!) http://www.erlang.org/doc/man/dict.html
<companion_cube>
sad
<mfp>
Why would anybody have such a thing in the std lib? It's not like they don't have < and > operators...
<mfp>
oh there's "An efficient implementation of Prof. Arne Andersson's General Balanced Trees" which is claimed to be in general better than AVL trees
<mfp>
"Original balance condition h(T) <= ceil(c * log(|T|)) has been changed to the similar (but not quite equivalent) condition 2 ^ h(T) <= |T| ^ c. This should also be OK."
Kakadu has quit [Quit: Page closed]
tennix has quit [Ping timeout: 256 seconds]
tane has quit [Remote host closed the connection]
tennix has joined #ocaml
jeffmo has joined #ocaml
jeffmo has quit [Client Quit]
zpe has quit [Remote host closed the connection]
tennix has quit [Ping timeout: 250 seconds]
<ollehar>
valgrind gives me this
<ollehar>
Address 0x61db938 is 2,660,600 bytes inside a block of size 3,936,288 free'd
<ollehar>
when using the ocaml gc.
<ollehar>
so, I'm freeing something that shouldn't be freed yet?
<ollehar>
(and "Invalid read of size 8")
Haudegen has quit [Ping timeout: 246 seconds]
<adrien>
sounds like it
jeffmo has joined #ocaml
<ollehar>
hm
rand__ has quit [Quit: leaving]
<ggole>
Or a stale (eg, unrelocated) pointer
<ollehar>
ggole: ?
<ollehar>
googling
<adrien>
the Gc can (and does) move things around
<ollehar>
oh
<ollehar>
llvm statepoint feature relevant?
<ggole>
Safepoints are a bit different (if that's what you mean)
shinnya has joined #ocaml
<ggole>
Well
<ggole>
Depends on the terminology a bit
<ollehar>
ok
araujo has quit [Quit: Leaving]
psy has joined #ocaml
<ggole>
Are you generating the frame info?
Haudegen has joined #ocaml
sepp2k has joined #ocaml
<ollehar>
ggole: don't know. so no, I guess.
<ollehar>
ggole: for each function call? or each block?
<ollehar>
block = scope
<ggole>
For each point at which the GC could run
<ggole>
allocations + function calls, basically
psy has quit [Ping timeout: 255 seconds]
<ollehar>
ok
malc_ has joined #ocaml
toomuchtvrotsurb has joined #ocaml
grouzen has quit [Ping timeout: 265 seconds]
tennix has joined #ocaml
MercurialAlchemi has joined #ocaml
<ollehar>
ggole: is there an ocaml C function for generating frame info?
<ollehar>
or do you mean CAMLparam and those macros?
<ggole>
Er, are you generating C?
<ollehar>
no LLVM IR
<ggole>
Well, then you need a way to generate the frame tables
<ggole>
I dunno what support LLVM has for that
<ollehar>
ggole: would it be possible - although less efficient - to call a c function that generates the frame tables?
<ggole>
No
<ggole>
Frame tables are information about pointer locations generated by the compiler
<ollehar>
ok
uris77 has quit [Quit: leaving]
lobo has joined #ocaml
Hetu has joined #ocaml
darkf has quit [Quit: Leaving]
micrypt has joined #ocaml
rgrinberg has joined #ocaml
ollehar1 has joined #ocaml
ollehar has quit [Ping timeout: 244 seconds]
ollehar1 is now known as ollehar
whirm has quit [Ping timeout: 255 seconds]
mea-culpa has joined #ocaml
zpe has joined #ocaml
toomuchtvrotsurb has quit [Remote host closed the connection]
<ollehar>
mrvn: because I need to send in strings to PHP's runtime.
<mrvn>
that doesn't mean you have to allocate it yourself
<mrvn>
/usr/include/caml/alloc.h:CAMLextern value caml_alloc_string (mlsize_t); /* size in bytes */
<ollehar>
hm
<mrvn>
There is also copy_string
<mrvn>
and caml_alloc_sprintf
<ollehar>
ok
<ollehar>
but then I would need to copy (or just point to) this data to a zend_string struct before using PHP runtime functions. but that's possible.
shinnya has joined #ocaml
<ollehar>
brb
<mrvn>
you also can't release the runtime lock because the GC might move the string. You might want to put the string into a temporary buffer instead on the ocaml heap.
<mrvn>
look at Unix.read/write for examples.
<apache2>
a value can be allocated across several smaller buffers
<ggole>
ollehar: the result of caml_alloc should be guarded with one of the CAMLlocal macros
LnL has quit [Ping timeout: 246 seconds]
ontologiae has joined #ocaml
higgs has quit [Remote host closed the connection]
freehck has quit [Ping timeout: 246 seconds]
<ollehar>
mrvn: thanks, I'll check out unix
<mrvn>
and reread thre chapter about interfacing with the GC again.
rgrinberg has quit [Ping timeout: 255 seconds]
NingaLeaf has quit [Quit: Leaving]
rgrinberg has joined #ocaml
_andre has quit [Quit: leaving]
<ollehar>
mrvn: yeah, the real trick is to get the LLVM IR to do it, but I will.
Simn has quit [Quit: Leaving]
BitPuffin|osx has joined #ocaml
obadz has quit [Ping timeout: 255 seconds]
jwatzman|work has joined #ocaml
Hetu has quit [Remote host closed the connection]
obadz has joined #ocaml
ggole has quit []
Haudegen has quit [Ping timeout: 244 seconds]
tane has quit [Quit: Verlassend]
Haudegen has joined #ocaml
rgrinberg has quit [Ping timeout: 252 seconds]
mcclurmc has quit [Remote host closed the connection]
jeffmo has quit [Quit: jeffmo]
ril has joined #ocaml
rgrinberg has joined #ocaml
mac10688 has joined #ocaml
MrScout_ has joined #ocaml
MrScout has quit [Ping timeout: 272 seconds]
rgrinberg has quit [Ping timeout: 252 seconds]
rgrinberg has joined #ocaml
jeffmo has joined #ocaml
jeffmo has quit [Read error: Connection reset by peer]
jeffmo has joined #ocaml
rgrinberg has quit [Ping timeout: 264 seconds]
Guest38 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jeffmo has quit [Quit: jeffmo]
ril is now known as ril[away]
ril[away] is now known as ril
JuggleTux has quit [Ping timeout: 244 seconds]
MrScout_ has quit [Remote host closed the connection]
Guest38 has joined #ocaml
MrScout has joined #ocaml
Kakadu has quit [Remote host closed the connection]
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ontologiae has quit [Ping timeout: 246 seconds]
MrScout has quit [Remote host closed the connection]
ollehar1 has joined #ocaml
ollehar has quit [Ping timeout: 246 seconds]
ollehar1 is now known as ollehar
emmanueloga has quit [Ping timeout: 252 seconds]
pootler has quit [Ping timeout: 252 seconds]
tg has quit [Ping timeout: 252 seconds]
jeroud has quit [Ping timeout: 252 seconds]
_2can has quit [Ping timeout: 252 seconds]
oldmanistan_ has quit [Ping timeout: 252 seconds]
stux|RC-only has quit [Ping timeout: 252 seconds]
andreypopp_ has quit [Ping timeout: 252 seconds]
igitoor has quit [Ping timeout: 252 seconds]
_2can has joined #ocaml
pootler has joined #ocaml
igitoor has joined #ocaml
stux|RC-only has joined #ocaml
oldmanistan_ has joined #ocaml
tg has joined #ocaml
emmanueloga has joined #ocaml
jeroud has joined #ocaml
andreypopp_ has joined #ocaml
Denommus has quit [Quit: going home]
igitoor has joined #ocaml
igitoor has quit [Changing host]
johnf__ has quit [Read error: Connection reset by peer]
sepp2k has quit [Quit: Leaving.]
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
systmkor has quit [Quit: Leaving]
MercurialAlchemi has quit [Ping timeout: 255 seconds]