<olle>
Are there statistics of memory allocation patterns in OCaml?
mro has quit [Remote host closed the connection]
Everything has quit [Ping timeout: 252 seconds]
Everything has joined #ocaml
mro has joined #ocaml
<Corbin>
olle: Are you familiar with bump allocation and the story of "Cheney on the MTA"?
<Corbin>
Languages with mostly-immutable values and lots of recursion can have a very different allocation strategy than simply allocating within a frame on each call.
mro has quit [Remote host closed the connection]
<olle>
Hmmm
mro has joined #ocaml
waleee has joined #ocaml
zebrag has joined #ocaml
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #ocaml
mro has quit [Remote host closed the connection]
Haudegen has quit [Quit: Bin weg.]
Tuplanolla has joined #ocaml
mro has joined #ocaml
mro has quit [Quit: Leaving...]
berberman_ has quit [Ping timeout: 240 seconds]
mbuf has quit [Quit: Leaving]
berberman has joined #ocaml
olle has quit [Ping timeout: 250 seconds]
bartholin has quit [Quit: Leaving]
Skyfire has quit [Quit: WeeChat 3.2]
Skyfire has joined #ocaml
Haudegen has joined #ocaml
rgrinberg has joined #ocaml
<d_bot>
<carmysilna> If I want to cache the results of a recursive function and then enable the function to call itself by accessing the cache, will `BatCache` still work or do I need something more specialized?
mro has joined #ocaml
bobo has quit [Ping timeout: 250 seconds]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<sim642>
Should work as long as all the recursive calls are to the cache, not the function itself
<d_bot>
<carmysilna> I'm encountering errors with recursive types, because the function needs to be passed the cache to be able to call it, so the cache needs to be passed in calls to itself
olle has joined #ocaml
<olle>
Does a compiler even need to collect memory? Except between the passes or IRs.
Everything has quit [Quit: leaving]
jcob has joined #ocaml
<jcob>
Hi all!
<jcob>
I have a little question about ocaml typing rules
<jcob>
I asked it two days ago but then my internet cut out
<jcob>
Here it is:
<jcob>
when you have a funciton:
<jcob>
let o f g x = f (g (x))
<jcob>
how come you can apply o to itself: o o
<olle>
maybe partial application?
<olle>
what's the exact type of o o ?
<jcob>
o is:
<jcob>
val o : ('a -> 'b) -> ('c -> 'a) -> 'c -> 'b = <fun>
<jcob>
I cant see how o "fits the bill" for an ('a -> 'b)
<jcob>
like what part of o's type signature would be the 'a
<jcob>
and what part of o's type signature would be the 'b
<sim642>
You have to imagine some more parenthesis: ('a -> 'b) -> (('c -> 'a) -> ('c -> 'b))
<sim642>
('a -> 'b) fits into 'a, and the rest fits into 'b
<sim642>
It will be less confusing to unify the type parameters if you think with alternative type parameter names for the second copy of "o" in that expression
<octachron>
Also `'a -> 'b -> 'c` is shorthand for `'a -> ('b -> 'c)`, in other words functions only take one argument in OCaml
<jcob>
Thank you sim642 and octachroh. That was a rule that I was missing :D
<jcob>
octacron *
mro has quit [Remote host closed the connection]
mro has joined #ocaml
gravicappa has quit [Ping timeout: 252 seconds]
wonko has quit [Ping timeout: 252 seconds]
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mro has quit [Ping timeout: 240 seconds]
jcob has quit [Quit: Client closed]
Corbin has quit [Ping timeout: 252 seconds]
favonia has joined #ocaml
rgrinberg has joined #ocaml
spip has joined #ocaml
olle has quit [Ping timeout: 252 seconds]
average has joined #ocaml
shawn has joined #ocaml
Corbin has joined #ocaml
Haudegen has quit [Ping timeout: 240 seconds]
average has quit [Quit: Connection closed for inactivity]
Tuplanolla has quit [Quit: Leaving.]
vicfred has joined #ocaml
favonia has quit [Ping timeout: 252 seconds]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]