adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.07.1 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.07/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml | Due to ongoing spam, you must register your nickname to talk on the channel
<Armael> um, it creates a memory cell with a dummy value, constructs the value on the rhs, and then mutates the memory cell to point to the constructed value
jao has quit [Ping timeout: 240 seconds]
<unyu> Is this dummy value necessary even if the r.h.s. is a lambda abstraction?
<Armael> uh, yea, IIRC the compilation schema is the same for recursive functions and values
<unyu> Ah, thanks!
bartholin has quit [Remote host closed the connection]
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
mfp has quit [Ping timeout: 268 seconds]
ygrek has quit [Ping timeout: 246 seconds]
kjak has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
kjak has quit [Ping timeout: 246 seconds]
pierpal has quit [Ping timeout: 240 seconds]
pierpal has joined #ocaml
MadcapJake has quit [Quit: MadcapJake]
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
MadcapJake has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
pierpal has quit [Ping timeout: 250 seconds]
pierpal has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
tormen has joined #ocaml
iovec has quit [Quit: Connection closed for inactivity]
tormen_ has quit [Ping timeout: 240 seconds]
pierpal has quit [Ping timeout: 268 seconds]
kjak has joined #ocaml
pierpal has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
gravicappa has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
sonologico has joined #ocaml
sonologico has quit [Remote host closed the connection]
JimmyRcom has quit [Ping timeout: 244 seconds]
iovec has joined #ocaml
_whitelogger_ has joined #ocaml
recj has quit [Ping timeout: 244 seconds]
_whitelogger has quit [Ping timeout: 250 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
recj has joined #ocaml
mildtaste has joined #ocaml
zv has joined #ocaml
mfp has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
sz0 has joined #ocaml
recj has quit [Ping timeout: 250 seconds]
kakadu has joined #ocaml
johnelse has joined #ocaml
zv has quit [Ping timeout: 250 seconds]
zv has joined #ocaml
rnmhdn has joined #ocaml
rwmjones_ is now known as rwmjones
jaar has joined #ocaml
kakadu has quit [Quit: Konversation terminated!]
kakadu has joined #ocaml
zv has quit [Ping timeout: 252 seconds]
zv has joined #ocaml
nullifidian__ has joined #ocaml
nullifidian_ has quit [Read error: Connection reset by peer]
bartholin has joined #ocaml
nullifidian__ is now known as nullifidian
sz0 has quit [Quit: Connection closed for inactivity]
rnmhdn has quit [Ping timeout: 245 seconds]
jnavila has joined #ocaml
initiumdoeslinux has joined #ocaml
initiumdoeslinux has quit [Remote host closed the connection]
ggole has joined #ocaml
Guest49282 has joined #ocaml
Guest49282 has quit [Remote host closed the connection]
Haudegen has joined #ocaml
johnelse has quit [Ping timeout: 240 seconds]
Armael has quit [Quit: WeeChat 2.1]
Armael has joined #ocaml
johnelse has joined #ocaml
initiumdoeslinux has joined #ocaml
Serpent7776 has joined #ocaml
johnelse_ has joined #ocaml
johnelse has quit [Ping timeout: 240 seconds]
jao has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 250 seconds]
Denommus has joined #ocaml
FreeBirdLjj has joined #ocaml
Haudegen has quit [Ping timeout: 244 seconds]
tane has joined #ocaml
jmiven has quit [Quit: co'o]
jmiven has joined #ocaml
Haudegen has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 268 seconds]
jnavila has quit [Ping timeout: 252 seconds]
jaar has quit [Ping timeout: 252 seconds]
marvin2 has quit [Ping timeout: 246 seconds]
JimmyRcom has joined #ocaml
marvin2 has joined #ocaml
jnavila has joined #ocaml
rnmhdn has joined #ocaml
<initiumdoeslinux> How come len1 is faster than len2 here: https://pastecode.xyz/view/0c115b86? Also does len2 utilize less memory than len1 since it evaluates at each element? Does len1 not have to unfold to e.g. `1 + 1 + 1 + 0` until it may be computed?
<lyxia> maybe calling a function parameter is more expensive than popping the stack
<ggole> initiumdoeslinux: len2 allocates a closure for each element (due to the partial application of +), and makes indirect calls to its arguments. Both of those things are somewhat costly.
<ggole> You would normally write a tail recursive length as something like let len list = let rec loop n = function [] -> n | _::xs -> loop (n + 1) xs in loop 0 list
Haudegen has quit [Ping timeout: 268 seconds]
initiumdoeslinux has quit [Remote host closed the connection]
recj has joined #ocaml
spew has joined #ocaml
ygrek has joined #ocaml
Jesin has quit [Quit: Leaving]
KeyJoo has joined #ocaml
al-damiri has joined #ocaml
rnmhdn has quit [Ping timeout: 245 seconds]
Haudegen has joined #ocaml
gravicappa has quit [Ping timeout: 268 seconds]
_whitelogger has joined #ocaml
technomancy has joined #ocaml
<technomancy> I have an ocaml codebase from 2013 I was hoping to make some updates to. some changes to Core broke things; I'm wondering how I can make my dependencies declarative so the same code will continue to compile another five years in the future.
<technomancy> in particular now List.Assoc.find refuses to compile unless I add ~equal:(=) to every invocation
spew has quit []
<technomancy> (which seems very silly in and of itself)
kark has quit [Remote host closed the connection]
ggole has quit [Quit: ggole]
KeyJoo has quit [Quit: KeyJoo]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
demonimin has joined #ocaml
initiumdoeslinux has joined #ocaml
initiumdoeslinux has quit [Ping timeout: 244 seconds]
ygrek has quit [Ping timeout: 258 seconds]
Denommus has quit [Remote host closed the connection]
sonologico has joined #ocaml
nicooo has quit [Remote host closed the connection]
nicooo has joined #ocaml
loli has joined #ocaml
johnelse_ has quit [Read error: Connection reset by peer]
Serpent7776 has quit [Quit: leaving]
jnavila has quit [Ping timeout: 246 seconds]
sonologico has quit [Remote host closed the connection]
sonologico has joined #ocaml
jao has quit [Remote host closed the connection]
initiumdoeslinux has joined #ocaml
initiumdoeslinux has quit [Ping timeout: 268 seconds]
kakadu has quit [Remote host closed the connection]
al-damiri has quit [Quit: Connection closed for inactivity]
jao has joined #ocaml
bartholin has quit [Remote host closed the connection]