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/
tjammer has joined #ocaml
tjammer_ has quit [Ping timeout: 260 seconds]
xd1le has quit [Quit: xd1le]
jmcantrell has left #ocaml [WeeChat 4.0.4]
mongol has joined #ocaml
mongol has quit [Remote host closed the connection]
mongol has joined #ocaml
mima has quit [Ping timeout: 248 seconds]
mongol has quit [Remote host closed the connection]
mongol has joined #ocaml
mongol has quit [Remote host closed the connection]
mongol has joined #ocaml
mongol has quit [Ping timeout: 250 seconds]
mongol has joined #ocaml
mongol has quit [Remote host closed the connection]
jmcantrell has joined #ocaml
jmcantrell has quit [Client Quit]
jmcantrell has joined #ocaml
jmcantrell has left #ocaml [#ocaml]
chrisz has quit [Ping timeout: 245 seconds]
chrisz has joined #ocaml
<discocaml> <loves_curry> this is more of a general question: is it possible to make useful, complex programs in OCaml without using any imperative features?
<discocaml> <loves_curry> i.e mutable variables, normal loops etc
<discocaml> <Kali> just as much as it is in haskell
<discocaml> <Kali> there are plenty of ocaml programs which utilize no imperative features
<discocaml> <Kali> understand that it is not really recommended to use imperative features except for parts where you want speed guarantees
<discocaml> <Kali> and the syntax is a little ugly too, not very readable compared to the equivalent functional program
<discocaml> <Kali> all the `:=`s and `!`s and `<-`s and `;`s become visually dirty after a bit
<discocaml> <loves_curry> cool thanks!
<discocaml> <loves_curry> also, OCaml lists are internally linked lists right? do they have the same cache locality issues inherent to linked lists in general or is there something specific about the implementation to avoid this?
<discocaml> <Kali> yes, they are linked lists just as in haskell
<discocaml> <Kali> however, ocaml has a native array type
<discocaml> <Kali> if you wish to use that instead
<discocaml> <Kali> the syntax is practically identical
<discocaml> <Kali> [| |] instead of [ ]
<discocaml> <Kali> to access, you do `array.(n)`
<discocaml> <Kali> to set, `array.(n) <- n'`
<discocaml> <Kali> there are also mutable lists provided as `'a Seq.t`
<discocaml> <Kali> or, rather, single-use lists
<discocaml> <Kali> additionally, seqs are lazy
<discocaml> <Kali> they are modified in-place
<discocaml> <Kali> to avoid duplication
<discocaml> <contificate> They can have issues, but most cases the lists are small enough that it doesn't really matter. Lots of patterns tend to result in cons cells being local to each other on the minor heap, so they're commonly as distant as you might think (or could achieve with a poor implementation of `malloc` and linked lists in C). I can't speak to the layout of OCaml's major heap, but, in simpler schemes, it's an explicit goal to try and improve locality
<discocaml> <contificate> As mentioned, there's pretty idiomatic altenatives to cons lists if you need them.
<discocaml> <contificate> As mentioned, there's pretty idiomatic alternatives to cons lists if you need them.
<discocaml> <contificate> They can have issues, but most cases the lists are small enough that it doesn't really matter. Lots of patterns tend to result in cons cells being local to each other on the minor heap, so they're commonly not as distant as you might think (or could achieve with a poor implementation of `malloc` and linked lists in C). I can't speak to the layout of OCaml's major heap, but, in simpler schemes, it's an explicit goal to try and improve local
waleee has quit [Ping timeout: 245 seconds]
Hammdist has joined #ocaml
bartholin has joined #ocaml
src has joined #ocaml
jmcantrell has joined #ocaml
jmcantrell has quit [Client Quit]
jmcantrell has joined #ocaml
jmcantrell has left #ocaml [#ocaml]
jmcantrell has joined #ocaml
Hammdist has quit [Quit: Client closed]
bgs has joined #ocaml
jmcantrell has left #ocaml [WeeChat 4.0.4]
troydm1 has joined #ocaml
troydm has quit [Ping timeout: 245 seconds]
Hammdist has joined #ocaml
bartholin has quit [Quit: Leaving]
uncomfy has joined #ocaml
xd1le has joined #ocaml
bgs has quit [Remote host closed the connection]
mima has joined #ocaml
Serpent7776 has joined #ocaml
uncomfy has quit [Remote host closed the connection]
Bitwiser has joined #ocaml
random-jellyfish has joined #ocaml
Bitwiser has quit [Ping timeout: 248 seconds]
rgrinberg has joined #ocaml
Anarchos has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
Anarchos has joined #ocaml
azimut has quit [Ping timeout: 246 seconds]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
Anarchos has joined #ocaml
Hammdist has quit [Quit: Client closed]
random-jellyfish has quit [Quit: Client closed]
uncomfy has joined #ocaml
random-jellyfish has joined #ocaml
uncomfy has quit [Remote host closed the connection]
uncomfy has joined #ocaml
uncomfy has quit [Remote host closed the connection]
uncomfy has joined #ocaml
random-jellyfish has quit [Quit: Client closed]
chrisz has quit [Ping timeout: 246 seconds]
chrisz has joined #ocaml
dnh has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
micro has quit [Ping timeout: 256 seconds]
micro has joined #ocaml
Bitwiser has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
rgrinberg has joined #ocaml
Hammdist has joined #ocaml
Anarchos has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Hammdist has quit [Quit: Client closed]
Hammdist has joined #ocaml
uncomfy has quit [Remote host closed the connection]
uncomfy has joined #ocaml
Bitwiser has quit [Ping timeout: 250 seconds]
rgrinberg has joined #ocaml
bgs has joined #ocaml
bartholin has joined #ocaml
dhil has joined #ocaml
gentauro has quit [Read error: Connection reset by peer]
uncomfy has quit [Remote host closed the connection]
gentauro has joined #ocaml
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
random-jellyfish has joined #ocaml
dnh has joined #ocaml
jmcantrell has joined #ocaml
jmcantrell has left #ocaml [#ocaml]
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jmcantrell has joined #ocaml
jmcantrell has left #ocaml [WeeChat 4.0.4]
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Hammdist has quit [Ping timeout: 246 seconds]
dnh has joined #ocaml
rgrinberg has joined #ocaml
<discocaml> <kakadu18> Folks, does opam resolve dependencies very slow on your machines too? https://gist.github.com/Kakadu/7eb873118ba9fec92bc568fdcce16e2b#file-log-txt-L20 I observed how it takes 8 seconds to check that no dependecies of ppx_compare should be installed. It looks like very slow...
waleee has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
azimut has joined #ocaml
<Anarchos> kakadu18 opam update takes more than 40min for me...
random-jellyfish has quit [Quit: Client closed]
<discocaml> <kakadu18> 40 minutes is too much. The --debug switch may explain what is going on....
azimut has quit [Remote host closed the connection]
azimut has joined #ocaml
rgrinberg has joined #ocaml
<Anarchos> kakadu18 it is the tar/untar of the repo which is really long
<discocaml> <kakadu18> I heard rumors about this in the curcumstances where people untarring on NTFS drive connected to WSL2... But very likely it is not your case...
<Anarchos> kakadu18 it is a spinning hard drive on a OLPC laptop...
<discocaml> <kakadu18> poor children TT
<Anarchos> kakadu18 indeed
<Anarchos> kakadu18 i will try with --debug next time
dhil has quit [Ping timeout: 256 seconds]
bgs has quit [Remote host closed the connection]
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
mechap has joined #ocaml
mechap has left #ocaml [#ocaml]
Anarchos has joined #ocaml
waleee has quit [Ping timeout: 244 seconds]
waleee has joined #ocaml
rgrinberg has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bartholin has quit [Quit: Leaving]
Tuplanolla has joined #ocaml
John_Ivan has joined #ocaml
Serpent7776 has quit [Ping timeout: 246 seconds]
Bitwiser has joined #ocaml
mima has quit [Ping timeout: 252 seconds]
waleee has quit [Ping timeout: 252 seconds]
Tuplanolla has quit [Quit: Leaving.]
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tjammer_ has joined #ocaml