neuroevolutus has quit [Ping timeout: 256 seconds]
gdiazlo_caml has quit [Ping timeout: 246 seconds]
gdiazlo_caml has joined #ocaml
f[x] has quit [Remote host closed the connection]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
gdiazlo_caml has quit [Ping timeout: 252 seconds]
gdiazlo_caml has joined #ocaml
gdiazlo_caml has quit [Ping timeout: 272 seconds]
<discocaml>
<shawnfrostx> Retrofitting Parallelism into Ocaml — is this paper accurate wrt the garbage collector changes that made into ocaml 5.0? (since it’s from 2020)
gdiazlo_caml has joined #ocaml
gdiazlo_caml has quit [Ping timeout: 248 seconds]
gdiazlo_caml has joined #ocaml
neuroevolutus has joined #ocaml
neuroevolutus has quit [Ping timeout: 256 seconds]
gdiazlo_caml has quit [Ping timeout: 260 seconds]
gdiazlo_caml has joined #ocaml
gdiazlo_caml has quit [Ping timeout: 246 seconds]
gdiazlo_caml has joined #ocaml
<discocaml>
<bluddy5> No, it's not up to date.
myrkraverk has quit [Read error: Connection reset by peer]
myrkraverk has joined #ocaml
gdiazlo_caml has quit [Ping timeout: 252 seconds]
gahr has quit [Ping timeout: 260 seconds]
gahr has joined #ocaml
chiselfuse has quit [Read error: Connection reset by peer]
bartholin has joined #ocaml
chiselfuse has joined #ocaml
gdiazlo_caml has joined #ocaml
euphores has quit [Quit: Leaving.]
gdiazlo_caml has quit [Ping timeout: 260 seconds]
euphores has joined #ocaml
Serpent7776 has joined #ocaml
gdiazlo_caml has joined #ocaml
Serpent7776 has quit [Ping timeout: 252 seconds]
gdiazlo_caml has quit [Ping timeout: 252 seconds]
pi3ce has quit [Read error: Connection reset by peer]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
f[x] has joined #ocaml
ctk has joined #ocaml
gdiazlo_caml has quit [*.net *.split]
bartholin has quit [*.net *.split]
caasih has quit [*.net *.split]
CalimeroTeknik has quit [*.net *.split]
Armael has quit [*.net *.split]
adrien has quit [*.net *.split]
Johann has quit [*.net *.split]
bartholin has joined #ocaml
caasih has joined #ocaml
adrien has joined #ocaml
Johann has joined #ocaml
Armael has joined #ocaml
haesbaert has quit [Remote host closed the connection]
f[x] has quit [Remote host closed the connection]
Anarchos has joined #ocaml
infinity0 has quit [Ping timeout: 252 seconds]
Tuplanolla has joined #ocaml
infinity0 has joined #ocaml
f[x] has joined #ocaml
<Anarchos>
Is there a stdlib function to access the nth LAST element of a list ?
<discocaml>
<._null._> With how inefficient this has to be, you can go with `List.nth (List.rev l)`
<Anarchos>
._null_. i thought of that, but wonder if there is a better solution, or a better data structure for this need
<discocaml>
<._null._> let nth_last (type a) n : a list -> a = let exception Found of a in let rec explore = function [] -> 0 | a :: r -> let k = explore r in if k = n then raise (Found a) else if k < n then k+1 else raise Not_found in explore
<discocaml>
<._null._> But the better answer is that you need a better datastructure
ctk has joined #ocaml
ctk has quit [Changing host]
<Anarchos>
maybe a hashmap with key int ? (i can only push value but never remove )
<discocaml>
<._null._> Correction: et nth_last (type a) n (l: a list) : a = let exception Found of a in let rec explore = function [] -> 0 | a :: r -> let k = explore r in if k = n then raise (Found a) else if k < n then k+1 else raise Not_found in match explore l with exception Found a -> a | _ -> raise Not_found
<discocaml>
<._null._> I don't knw what else you use your list for, but the basic answer for random accesses is arrays
<Anarchos>
yes but is it possible to add elemebts to array ?
<companion_cube>
Use Dynarray ;)
<Anarchos>
companion_cube i didn't know this one !
<companion_cube>
It's fairly new
ctk is now known as CalimeroTeknik
<discocaml>
<._null._> (Since 5.2)
<Anarchos>
companion_cube i just switched to 5.2 :)
mbuf has quit [Quit: Leaving]
Inline has joined #ocaml
waleee has joined #ocaml
Inline has quit [Ping timeout: 244 seconds]
f[x] has quit [Remote host closed the connection]
neuroevolutus has joined #ocaml
Inline has joined #ocaml
philipwhite_ has joined #ocaml
arya_elfren_ has joined #ocaml
soni__ has joined #ocaml
rustyne_ has joined #ocaml
patrick__ has joined #ocaml
germ_ has joined #ocaml
delyan__ has joined #ocaml
cbarrett_ has joined #ocaml
reynir1 has joined #ocaml
drakonis1 has joined #ocaml
walee_ has joined #ocaml
gentauro_ has joined #ocaml
Inline has quit [Quit: Leaving]
arya_elfren has quit [Ping timeout: 246 seconds]
rustyne has quit [Ping timeout: 246 seconds]
patrick_ has quit [Ping timeout: 246 seconds]
soni_ has quit [Ping timeout: 246 seconds]
philipwhite has quit [Ping timeout: 246 seconds]
reynir has quit [Ping timeout: 246 seconds]
cbarrett has quit [Ping timeout: 246 seconds]
drakonis has quit [Ping timeout: 246 seconds]
waleee has quit [Ping timeout: 246 seconds]
Tuplanolla has quit [Ping timeout: 246 seconds]
germ has quit [Ping timeout: 246 seconds]
delyan_ has quit [Ping timeout: 246 seconds]
rak has quit [Ping timeout: 246 seconds]
patrick__ is now known as patrick
gentauro has quit [Ping timeout: 246 seconds]
rustyne_ is now known as rustyne
delyan__ is now known as delyan_
arya_elfren_ is now known as arya_elfren
cbarrett_ is now known as cbarrett
Tuplanolla1 has joined #ocaml
rak has joined #ocaml
<discocaml>
<leviroth> twobitsprite: I think the main point is that, by default, dune ignores anything in subdirectories. If you want everything in the subdirectory `foo/` to appear as part of a module `Foo`, you can use `include_subdirs`: https://dune.readthedocs.io/en/stable/reference/dune/include_subdirs.html
<discocaml>
<alfuin> is this unnecessary for ocaml because sequences?
<discocaml>
<alfuin> how do people do this kinda thing here?