adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.02.2 announced http://ocaml.org/releases/4.02.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
<ollehar> maybe it's a problem where ocaml need some kind of alignment where zend/php does not :P
AltGr has joined #ocaml
<ollehar> or me not setting up LLVM IR properly
thomasga has quit [Quit: Leaving.]
<mrvn> .oO(Is there anything but O2 worth talking about?)
<mrvn> ups, ewin
nullcatx_ has joined #ocaml
nullcatxxx_ has quit [Read error: Connection reset by peer]
Guest38 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jeffmo has quit [Quit: jeffmo]
tibor_ has quit [Ping timeout: 246 seconds]
nullcatx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tennix has joined #ocaml
ollehar has quit [Quit: ollehar]
keen__________17 has joined #ocaml
keen__________16 has quit [Ping timeout: 246 seconds]
jeffmo has joined #ocaml
johnf__ has quit [Read error: Connection reset by peer]
swgillespie has joined #ocaml
swgillespie has quit [Client Quit]
jeffmo has quit [Read error: Connection reset by peer]
BitPuffin|osx has quit [Ping timeout: 264 seconds]
jeffmo has joined #ocaml
rgrinberg has quit [Ping timeout: 246 seconds]
martintrojer has quit [Ping timeout: 250 seconds]
martintrojer has joined #ocaml
martintrojer has quit [Ping timeout: 265 seconds]
higgs has joined #ocaml
genkito has joined #ocaml
martintrojer has joined #ocaml
genkito has quit [Client Quit]
michael_lee has joined #ocaml
root_empire has joined #ocaml
root_empire has quit [Read error: Connection reset by peer]
jao has joined #ocaml
johnf__ has joined #ocaml
psy has joined #ocaml
segmond has quit [Ping timeout: 246 seconds]
segmond has joined #ocaml
higgs has quit [Ping timeout: 244 seconds]
mac10688 has quit [Ping timeout: 250 seconds]
michael_lee has quit [Quit: Ex-Chat]
MercurialAlchemi has joined #ocaml
jao has quit [Ping timeout: 250 seconds]
darkf has joined #ocaml
MrScout has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 260 seconds]
MercurialAlchemi has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 246 seconds]
igoroliveira has quit [Quit: Connection closed for inactivity]
psy has quit [Ping timeout: 246 seconds]
swgillespie has joined #ocaml
segmond has quit [Ping timeout: 244 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
segmond has joined #ocaml
swgillespie has joined #ocaml
swgillespie has quit [Client Quit]
tane has joined #ocaml
grouzen has joined #ocaml
LnL has joined #ocaml
Simn has joined #ocaml
grouzen has quit [Ping timeout: 264 seconds]
grouzen has joined #ocaml
freehck has joined #ocaml
<freehck> good ugt morning
<companion_cube> o/
Haudegen has quit [Ping timeout: 246 seconds]
grouzen has quit [Ping timeout: 252 seconds]
sh0t has joined #ocaml
swgillespie has joined #ocaml
swgillespie has quit [Client Quit]
Haudegen has joined #ocaml
sh0t has quit [Remote host closed the connection]
sh0t has joined #ocaml
sh0t has quit [Client Quit]
obadz has quit [Ping timeout: 272 seconds]
Hetu has joined #ocaml
jeffmo has quit [Quit: jeffmo]
ggole has joined #ocaml
picachu has joined #ocaml
MrScout has quit [Ping timeout: 246 seconds]
johnf__ has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
ygrek_ has joined #ocaml
ollehar has joined #ocaml
<ollehar> how does caml_alloc align memory?
ygrek_ has quit [Ping timeout: 268 seconds]
<def`> on a word
<ollehar> hm
rand__ has joined #ocaml
Hetu has quit [Remote host closed the connection]
Hetu has joined #ocaml
Hetu has quit [Remote host closed the connection]
Hetu has joined #ocaml
freehck has quit [Ping timeout: 246 seconds]
whirm has joined #ocaml
Kakadu has joined #ocaml
Kakadu has quit [Client Quit]
Kakadu has joined #ocaml
tnguyen has quit [Read error: Connection reset by peer]
tnguyen has joined #ocaml
kushal has joined #ocaml
BitPuffin has joined #ocaml
freehck has joined #ocaml
Hetu has quit [Ping timeout: 256 seconds]
Simn has quit [Ping timeout: 252 seconds]
Haudegen has quit [Ping timeout: 256 seconds]
Haudegen has joined #ocaml
tennix has quit [Ping timeout: 250 seconds]
Denommus has joined #ocaml
zpe has quit [Remote host closed the connection]
Simn has joined #ocaml
iZsh has quit [Quit: ZNC - http://znc.in]
iZsh has joined #ocaml
zpe has joined #ocaml
_andre has joined #ocaml
AltGr has left #ocaml [#ocaml]
cball has quit [Quit: Leaving]
freehck has quit [Quit: Page closed]
cball has joined #ocaml
mfp_ has joined #ocaml
picachu has quit [Ping timeout: 252 seconds]
mfp__ has quit [Ping timeout: 264 seconds]
freehck has joined #ocaml
whirm has quit [Ping timeout: 250 seconds]
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]
rgrinberg has quit [Ping timeout: 260 seconds]
zpe has quit [Ping timeout: 256 seconds]
mac10688 has joined #ocaml
jwatzman|work has joined #ocaml
MrScout has joined #ocaml
NingaLeaf has joined #ocaml
psy_ has joined #ocaml
psy_ has quit [Max SendQ exceeded]
snyp has joined #ocaml
psy_ has joined #ocaml
obadz has joined #ocaml
Guest38 has joined #ocaml
rand__ has joined #ocaml
uris77 has joined #ocaml
grouzen has joined #ocaml
mea-culp` has joined #ocaml
mea-culpa has quit [Ping timeout: 260 seconds]
Guest38 has quit [Quit: Textual IRC Client: www.textualapp.com]
Guest38 has joined #ocaml
snyp has quit [Quit: WeeChat 1.3]
mac10688 has quit [Ping timeout: 268 seconds]
johnelse has quit [Ping timeout: 246 seconds]
siddharthv_away has quit [Ping timeout: 250 seconds]
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 250 seconds]
mea-culp` is now known as mea-culpa
Muzer has quit [Ping timeout: 264 seconds]
johnelse has joined #ocaml
siddharthv_away has joined #ocaml
johnelse is now known as Guest21325
uris77 has quit [Quit: leaving]
BitPuffin has quit [Ping timeout: 255 seconds]
Muzer has joined #ocaml
malc_ has quit [Quit: leaving]
rgrinberg has joined #ocaml
higgs has joined #ocaml
higgs has quit [Ping timeout: 246 seconds]
tane has joined #ocaml
Denommus has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
kushal has joined #ocaml
kushal has quit [Read error: Connection reset by peer]
Fleurety has joined #ocaml
johnf__ has joined #ocaml
higgs has joined #ocaml
kushal has joined #ocaml
ollehar has quit [Ping timeout: 256 seconds]
Algebr has joined #ocaml
shinnya has quit [Ping timeout: 255 seconds]
Denommus has joined #ocaml
Kakadu has joined #ocaml
Haudegen has quit [Ping timeout: 265 seconds]
Guest38 has quit [Read error: Connection reset by peer]
Guest38 has joined #ocaml
whirm has joined #ocaml
Haudegen has joined #ocaml
Guest38 has quit [Quit: Textual IRC Client: www.textualapp.com]
Guest38 has joined #ocaml
ollehar has joined #ocaml
whirm has quit [Ping timeout: 256 seconds]
Algebr has quit [Remote host closed the connection]
rand__ has quit [Quit: leaving]
NingaLeaf has quit [Read error: Connection reset by peer]
NingaLeaf has joined #ocaml
mea-culpa has quit [Remote host closed the connection]
<ollehar> is this use of caml_alloc batshit crazy?
<ollehar> zend_string *str = (zend_string *)caml_alloc(ZEND_MM_ALIGNED_SIZE(_STR_HEADER_SIZE + len + 1), 0);
<ollehar> caml_alloc returns value
jwatzman|work has quit [Quit: jwatzman|work]
<mrvn> ollehar: why not use the string functions?
<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]
obadz- has joined #ocaml
lobo has quit [Quit: leaving]
ril has joined #ocaml
Haudegen has quit [Ping timeout: 240 seconds]