companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 5.0 released(!!1!): https://ocaml.org/releases/5.0.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
quernd has quit [Quit: Ping timeout (120 seconds)]
quernd has joined #ocaml
<companion_cube> He's off I think
h0rror has quit [Ping timeout: 250 seconds]
azimut has quit [Remote host closed the connection]
azimut has joined #ocaml
h0rror has joined #ocaml
count3rmeasure has quit [Read error: Connection reset by peer]
festerdam has joined #ocaml
festerdam has quit [Client Quit]
azimut has quit [Ping timeout: 255 seconds]
williewillus has joined #ocaml
azimut has joined #ocaml
chrisz has quit [Ping timeout: 265 seconds]
chrisz has joined #ocaml
chrisz has quit [Ping timeout: 252 seconds]
chrisz has joined #ocaml
azimut has quit [Remote host closed the connection]
azimut has joined #ocaml
bgs has joined #ocaml
waleee has quit [Ping timeout: 248 seconds]
bgs has quit [Remote host closed the connection]
williewillus has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.2)]
azimut has quit [Ping timeout: 255 seconds]
Haudegen has joined #ocaml
bartholin has joined #ocaml
wingsorc has quit [Ping timeout: 240 seconds]
Serpent7776 has joined #ocaml
<discocaml> <cameliacamelia888> I need to return a copy of a list in which odd-length lists have been doubled (and only with these predefined functions List.hd, List.tl or List.length)
<discocaml> <cameliacamelia888>
<discocaml> <cameliacamelia888> oddList [[]; [1];[1;2];[1;2;3];[];[5;4;3;2;1]]
<discocaml> <cameliacamelia888>
<discocaml> <cameliacamelia888> must return
<discocaml> <cameliacamelia888>
<discocaml> <cameliacamelia888> oddList [[]; [1; 1]; [1; 2]; [1; 2; 3; 1; 2; 3]; []; [5; 4; 3; 2; 1; 5; 4; 3; 2; 1]]
<discocaml> <cameliacamelia888>
<discocaml> <cameliacamelia888> When I test my function, it returns : "Line 1, characters 0-7: Error: Unbound value oddList" I don't know what's wrong
<discocaml> <cameliacamelia888>
<discocaml> <cameliacamelia888> let rec oddList l =
<discocaml> <cameliacamelia888> if l = [] then []
<discocaml> <cameliacamelia888> else
<discocaml> <cameliacamelia888> let fst = list.hd l in
<discocaml> <cameliacamelia888> let rest = list.tl l in
<discocaml> <cameliacamelia888> if length fst mod 2 = 0 then (fist :: (oddList rest))
<discocaml> <cameliacamelia888> else ((fst@fst):: (oddList rest));;
bartholin has quit [Quit: Leaving]
motherfsck has quit [K-Lined]
<discocaml> <octachron> Stop spamming channels please.
<discocaml> <cameliacamelia888> sorry messasage deleted
<discocaml> <cameliacamelia888> sorry message deleted
<discocaml> <octachron> Thanks a lot!
trillion_exabyte has quit [Ping timeout: 255 seconds]
random-jellyfish has joined #ocaml
random-jellyfish has quit [Client Quit]
trillion_exabyte has joined #ocaml
count3rmeasure has joined #ocaml
azimut has joined #ocaml
Serpent7776 has quit [Quit: WeeChat 1.9.1]
John_Ivan has joined #ocaml
spip has quit [Quit: Konversation terminated!]
count3rmeasure has quit [Read error: Connection reset by peer]
Nezteb has left #ocaml [#ocaml]
Tuplanolla has joined #ocaml
szkl has joined #ocaml
bartholin has joined #ocaml
waleee has joined #ocaml
Stumpfenstiel has joined #ocaml
oriba has joined #ocaml
azimut has quit [Ping timeout: 255 seconds]
h0rror has quit [Ping timeout: 252 seconds]
azimut has joined #ocaml
h0rror has joined #ocaml
spip has joined #ocaml
<discocaml> <xnoe> Does Ctypes clone / copy Bigarrays when passed to C functions? I'm seeing strange memory usage with a program I'm witing. I am using Domains to generate mesh data which is stored in Bigarrays and then loaded to the GPU via OpenGL. I am using Tgl3 library's Tgl3 module. Each of my domains creates four bigarrays, totalling 66MB, and uses these for mesh data. However, I am seeing the memory usage scale linearly with the amount of meshes I generate,
wingsorc has joined #ocaml
olle has quit [Ping timeout: 268 seconds]
bartholin has quit [Quit: Leaving]
Stumpfenstiel has quit [Ping timeout: 276 seconds]
olle has joined #ocaml
Haudegen has quit [Ping timeout: 264 seconds]
Tuplanolla has quit [Quit: Leaving.]
olle has quit [Ping timeout: 276 seconds]
doesntgolf has joined #ocaml
czy has joined #ocaml