companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 4.12 released: https://ocaml.org/releases/4.12.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
cross has quit [Quit: leaving]
cross has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
xd1le has joined #ocaml
brettgilio has quit [Quit: The Lounge - https://thelounge.chat]
vicfred has quit [Quit: Leaving]
brettgilio has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
waleee has quit [Ping timeout: 252 seconds]
favonia has quit [Quit: Leaving]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gravicappa has joined #ocaml
Skyfire has joined #ocaml
rgrinberg has joined #ocaml
mro has joined #ocaml
mro has quit [Ping timeout: 256 seconds]
Skyfire has quit [Quit: brb]
Skyfire has joined #ocaml
Haudegen has joined #ocaml
mro has joined #ocaml
wilfred has joined #ocaml
mro has quit [Remote host closed the connection]
hendursa1 has joined #ocaml
hendursaga has quit [Ping timeout: 276 seconds]
olle has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xd1le has quit [Quit: xd1le]
bartholin has joined #ocaml
mbuf has joined #ocaml
wonko has joined #ocaml
wilfred has quit [Quit: Connection closed for inactivity]
Haudegen has quit [Quit: Bin weg.]
mro has quit [Remote host closed the connection]
mro has joined #ocaml
Haudegen has joined #ocaml
mro has quit [Ping timeout: 245 seconds]
mro has joined #ocaml
mro has quit [Ping timeout: 240 seconds]
<olle> How many memory allocation strategies are there?
<olle> Buffer, pool, region, gc, ...
<olle> Maybe a better question is, how many memory allocation strategy use-cases are there...?
mro has joined #ocaml
mro has quit [Ping timeout: 256 seconds]
mro has joined #ocaml
<olle> Possibly called "Temporal Allocation Patterns"
<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> o o is: val oo :
<jcob> ('_weak1 -> '_weak2 -> '_weak3) ->
<jcob> '_weak1 -> ('_weak4 -> '_weak2) -> '_weak4 -> '_weak3 = <fun>
<olle> Phew
<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…]