YuGiOhJCJ has quit [Remote host closed the connection]
YuGiOhJCJ has joined #ocaml
tomku has quit [Ping timeout: 268 seconds]
tomku has joined #ocaml
myrkraverk__ has joined #ocaml
myrkraverk_ has quit [Read error: Connection reset by peer]
motherfsck has joined #ocaml
mbuf has joined #ocaml
vb has quit [Ping timeout: 256 seconds]
vb has joined #ocaml
dh` has joined #ocaml
bartholin has joined #ocaml
micro has joined #ocaml
micro is now known as Guest4416
Guest4416 has quit [Client Quit]
micro_ has joined #ocaml
micro_ has quit [Changing host]
micro_ has joined #ocaml
hannes_ has quit [Remote host closed the connection]
dreadedfrog has joined #ocaml
tomku has quit [Read error: Connection reset by peer]
tomku has joined #ocaml
Serpent7776 has joined #ocaml
deadmarshal_ has quit [Remote host closed the connection]
deadmarshal_ has joined #ocaml
faldor20 has joined #ocaml
myrkraverk_ has joined #ocaml
Fardale has quit [Quit: WeeChat 3.8]
myrkraverk__ has quit [Ping timeout: 252 seconds]
myrkraverk__ has joined #ocaml
Fardale has joined #ocaml
myrkraverk_ has quit [Ping timeout: 252 seconds]
myrkraverk_ has joined #ocaml
myrkraverk__ has quit [Ping timeout: 268 seconds]
tomku has quit [Ping timeout: 246 seconds]
myrkraverk_ has quit [Read error: Connection reset by peer]
myrkraverk__ has joined #ocaml
tomku has joined #ocaml
myrkraverk_ has joined #ocaml
myrkraverk__ has quit [Ping timeout: 272 seconds]
myrkraverk__ has joined #ocaml
myrkraverk_ has quit [Read error: Connection reset by peer]
Tuplanolla has joined #ocaml
myrkraverk_ has joined #ocaml
myrkraverk__ has quit [Read error: Connection reset by peer]
torretto has quit [Remote host closed the connection]
torretto has joined #ocaml
myrkraverk__ has joined #ocaml
myrkraverk_ has quit [Ping timeout: 268 seconds]
myrkraverk_ has joined #ocaml
myrkraverk__ has quit [Read error: Connection reset by peer]
myrkraverk__ has joined #ocaml
myrkraverk_ has quit [Ping timeout: 256 seconds]
myrkraverk__ has quit [Read error: Connection reset by peer]
myrkraverk_ has joined #ocaml
myrkraverk__ has joined #ocaml
tomku has quit [Read error: Connection reset by peer]
myrkraverk_ has quit [Read error: Connection reset by peer]
tomku has joined #ocaml
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
cr1901 has quit [Read error: Connection reset by peer]
jabuxas has joined #ocaml
<discocaml>
<kaitrna> hello, i'm using js_of_ocaml and there's a stack overflow in List.map. the github issue [1] suggests we should use a different stdlib, but the map call is deep in library code and it's not something we can easily change. is there some way to patch this stdlib function's js implementation? or any other suggestions?
<discocaml>
<deepspacejohn> The stdlib List.map is tail-recursive since 5.1, if upgrading OCaml is an option for you.
<discocaml>
<kaitrna> possibly, but a less preferred option
waleee has joined #ocaml
<discocaml>
<limp.biskit> is it your library?
<discocaml>
<limp.biskit> you can monkeypatch map in each file you need it as a temporary solution; you can then vendor those patched versions in dune
<discocaml>
<limp.biskit> or just do a find and replace across your codebase from `List.map` to `CCList.map`
<companion_cube>
Does jsoo even support tail rec modulo cons?
<Fardale>
I was wondering the same and I did not find anything in the manual page of tail rec modulo cons
<octachron>
jsoo starts from bytecode. Since tail rec modulo cons is a lambda transformation pass, it doesn't require any jsoo specific support.
tomku has quit [Read error: Connection reset by peer]
cr1901 has joined #ocaml
<Fardale>
OK, that was my impression, thanks for the confirmation.
tomku has joined #ocaml
tomku has quit [Quit: Lost terminal]
<companion_cube>
oh good
<companion_cube>
it happens before lambda then
<discocaml>
<kaitrna> yes it's my library, but I wouldn't want to rely on a manual find and replace. is there some compiler flag to effect the same thing?
jabuxas has quit [Ping timeout: 256 seconds]
<discocaml>
<leviroth> I suppose that it might be possible to link against a different List module?
<discocaml>
<limp.biskit> no compiler flag but you can redefine List to a new module including Stdlib.List but replacing map with a tail recursive version
waleee has quit [Ping timeout: 272 seconds]
<discocaml>
<kaitrna> they sounds possibly reasonable
<discocaml>
<kaitrna> that sounds possibly reasonable
gareppa has joined #ocaml
<discocaml>
<limp.biskit> ```ocaml
<discocaml>
<limp.biskit> module List = struct include Stdlib.List;; let map = CCList.map end;;
<discocaml>
<limp.biskit> ```
<discocaml>
<limp.biskit> replace cclist with your own impl if you don't want to link in containers
<companion_cube>
or just copy the 5 lines of code, go for it
mbuf has quit [Quit: Leaving]
wbooze has quit [Remote host closed the connection]