companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 4.12 released: https://ocaml.org/releases/4.12.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
troydm has joined #ocaml
Tuplanolla has quit [Quit: Leaving.]
Nahra has quit [Remote host closed the connection]
zozozo has quit [Ping timeout: 264 seconds]
zozozo has joined #ocaml
zebrag has joined #ocaml
vb has joined #ocaml
vb_ has quit [Ping timeout: 258 seconds]
zebrag has quit [Remote host closed the connection]
sleepydog has quit [Quit: ZNC 1.8.2 - https://znc.in]
sleepydog has joined #ocaml
waleee has quit [Ping timeout: 268 seconds]
farn has quit [Ping timeout: 264 seconds]
welterde has quit [Ping timeout: 264 seconds]
farn has joined #ocaml
lisq has quit [Ping timeout: 264 seconds]
lisq has joined #ocaml
welterde has joined #ocaml
mbuf has joined #ocaml
unyu has quit [Quit: WeeChat 3.2]
mikess has joined #ocaml
gravicappa has joined #ocaml
wilfred has joined #ocaml
mikess has quit [Ping timeout: 252 seconds]
wingsorc has quit [Quit: Leaving]
mro has joined #ocaml
shawnw has quit [Ping timeout: 252 seconds]
mro has quit [Remote host closed the connection]
mro has joined #ocaml
elf_fortrez has joined #ocaml
elf_fortrez has quit [Quit: Client closed]
neiluj has joined #ocaml
Nahra has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
Nahra has quit [Remote host closed the connection]
Nahra has joined #ocaml
wilfred has quit [Quit: Connection closed for inactivity]
selimcan has joined #ocaml
shawnw has joined #ocaml
selimcan has quit [Quit: Leaving]
gravicappa has quit [Ping timeout: 258 seconds]
gravicappa has joined #ocaml
glassofethanol has joined #ocaml
selimcan has joined #ocaml
selimcan has quit [Client Quit]
selimcan has joined #ocaml
vizard has joined #ocaml
selimcan has quit [Quit: Leaving]
berberman_ has joined #ocaml
berberman has quit [Ping timeout: 264 seconds]
dhil has joined #ocaml
shawnw has quit [Ping timeout: 265 seconds]
yoctocell has joined #ocaml
olle has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Ping timeout: 244 seconds]
unyu has joined #ocaml
mro has joined #ocaml
mikess has joined #ocaml
<d_bot> <Kakadu> If the one would write a note for broad audience about FP peculiarities that got into mainstream languages, what stuff should be mentioned? async/await, functional rective progamming, LINQ, null-safety, ... something else?
<vizard> Pattern matching is making its way into some languages (I’m thinking about Ruby). There are three proposals for reverse application/pipelining in Javascript. Not sure what would count as intrinsically functional though.
<d_bot> <Christophe> python is also getting the pattern matching
<d_bot> <undu> and Java
<olle> and php
<olle> I wouldn't compare null-safety between languages
<olle> option type != flow sensitive types
bartholin has joined #ocaml
<d_bot> <Kakadu> You are probably right, but it looks like they still are trying to solve the same issue
<vizard> Maybe “everything is an expression” could be worth mentioning? Javascript’s getting proposals to that effect such as “throw expressions” and “do expressions”.
neiluj has quit [Quit: Leaving]
mro has quit [Remote host closed the connection]
cedric has joined #ocaml
unyu has quit [Quit: WeeChat 3.2]
bartholin has quit [Ping timeout: 268 seconds]
bartholin has joined #ocaml
Haudegen has joined #ocaml
mro has joined #ocaml
mro has quit [Remote host closed the connection]
<companion_cube> Kakadu: lambdas? :p
<kakadu> companion_cube: meh...
<companion_cube> isn't it a big one?
<d_bot> <ggole> A REPL?
<kakadu> In this kind of texts everybody mentiones lambdas, I want intentionally forget them
<companion_cube> sum types are also progressively spreading
<kakadu> really?
<companion_cube> well, rust has them :p
<companion_cube> C++ has std::variant, although it sucks
<companion_cube> zig has tagged unions, which, well, are the same thing
olle has quit [Read error: Connection reset by peer]
mro has joined #ocaml
mro has quit [Ping timeout: 252 seconds]
Tuplanolla has joined #ocaml
waleee has joined #ocaml
<d_bot> <Alistair> Is there a way to use Janestreet's `base` Map without making a `Comparator`, not really up for making a `sexp` function
mro has joined #ocaml
mro has quit [Remote host closed the connection]
<d_bot> <octachron> No. But having a non-implemented sexp function might be a workaround.
mro has joined #ocaml
vicfred has joined #ocaml
mbuf has quit [Quit: Leaving]
mro has quit [Remote host closed the connection]
mro has joined #ocaml
<d_bot> <monk> oh shoot, PLDI started yesterday https://pldi21.sigplan.org/
<d_bot> <monk> $10 to attend for those with financial difficulty
<d_bot> <monk> i think there's a talk on multicore ocaml in the schedule
<sadiq_> our retrofitting effect handlers paper is in there
<sadiq_> the talk is super short though
mro has quit [Remote host closed the connection]
sadiq_ is now known as sadiq
<d_bot> <monk> i think i only found out about PLDI because i saw the github repo -> the preprint -> saw the mention of PLDI and looked it up haha
mbuf has joined #ocaml
glassofethanol has quit [Quit: leaving]
glassofethanol has joined #ocaml
mikess has quit [Ping timeout: 252 seconds]
wagle has quit [Ping timeout: 272 seconds]
wagle has joined #ocaml
wagle has quit [Ping timeout: 252 seconds]
wagle has joined #ocaml
wagle has quit [Ping timeout: 252 seconds]
wagle has joined #ocaml
mbuf has quit [Quit: Leaving]
wagle has quit [Ping timeout: 252 seconds]
wagle has joined #ocaml
bartholin has quit [Quit: Leaving]
wagle has quit [Ping timeout: 268 seconds]
wagle has joined #ocaml
glassofethanol has quit [Quit: leaving]
Anarchos has joined #ocaml
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
Anarchos has joined #ocaml
Anarchos has quit [Ping timeout: 258 seconds]
vicfred has quit [Ping timeout: 268 seconds]
gravicappa has quit [Ping timeout: 252 seconds]
Anarchos has joined #ocaml
kakadu_ has joined #ocaml
kakadu has quit [Read error: Connection reset by peer]
<d_bot> <EduardoRFS> Do anyone know some work on getting refcounting in OCaml?
<d_bot> <EduardoRFS> Was playing with the idea but sadly the FFI allows you to do `Field() = 123` possible to work around but really curious to know if any other project hit this
<zozozo> @Eduardo : what would be the use of refcounting in OCaml ?
<d_bot> <EduardoRFS> I'm hoping for drastically reduced stop the world collection and instantaneous finalizers.
<companion_cube> it'd probably be slower though
mro has joined #ocaml
<d_bot> <EduardoRFS> why? You can skip a block if it's counter is 0, reducing the number of memory that needs to be scanned
<companion_cube> oh you mean a mix of GC and RC?
<d_bot> <EduardoRFS> yeah i'm not that smart to just do RC in OCaml
<d_bot> <EduardoRFS> Also was impressed on how easy was to change the object header without breaking the world. Because the gc color is already there it's a straightforward change
<d_bot> <EduardoRFS> like 30 lines and the header space and all tests are green
<d_bot> <EduardoRFS> the idea was to keep the fast allocation but things that allocate temporary memory in sequence like `List.map` will skipped entirely a lot of times, as the cells are in sequence in memory and I can fuse them when the counter is set to 0
Anarchos has quit [Ping timeout: 258 seconds]
mro has quit [Ping timeout: 244 seconds]
<sadiq> EduardoRFS: I have been giving it a think.
<d_bot> <EduardoRFS> same, for the FFI I thought about a compatibility mode where all blocks that enter the FFI will be marked as evil and it will never be collected through RC. So deprecate the old `Field` and do `Get_field` and `Set_field`, if your code uses the new API then you mark your external as `[@refcounted]` and get back your performance
<d_bot> <EduardoRFS> your FFI performance*
<sadiq> but I can't figure out a way to do it without a minor->major pointer set.
<sadiq> (right now we have a major->minor pointer set which is maintained in the write barrier)
<d_bot> <EduardoRFS> hmm I was putting the refcounter on the header
<sadiq> right but how do you deal with minor to major references?
<sadiq> oh you're planning to replace the whole GC?
<d_bot> <EduardoRFS> no, just count and skip blocks
<companion_cube> @EduardoRFS have you read the perceus paper?
<d_bot> <EduardoRFS> I probably should?
<sadiq> I need to go cook some dinner in a sec
<companion_cube> well it's refcounting with reuse, for a functional language
<d_bot> <EduardoRFS> on my test is not a problem if the counter never reaches 0, the goal was to just skip blocks
<sadiq> but I'd been pondering how you'd go about replacing the major collector with reference counting.
<d_bot> <EduardoRFS> oh that's a much more ambitious plan
<sadiq> tracing you do work proportional to the size of the live set, reference counting you do work proportional to the garbage.
<sadiq> so it makes sense to trace the minor heap (where mortaility is high and there's a lot of garbage) and, maybe, reference count the major heap (where things live for a long time and you might have very large amounts of mostly static stuff around).
<companion_cube> sadiq: what about compaction?
Anarchos has joined #ocaml
<d_bot> <EduardoRFS> my idea was to do counting for the minor to make tracing incremental and allow to increase the minor size without increasing tracing times considerably, as the mortality is higher anyway
<d_bot> <EduardoRFS> the goal is for latency sensitive applications, namely gaming, because it's a niche where people truly care about it, and it's fun to do sometimes
<d_bot> <Deadrat> Anyone looked at jst local stack alloc prototype?
<companion_cube> I thought people didn't allocate at all in gaming? :)
<companion_cube> in the main loop
<d_bot> <EduardoRFS> Well they try to avoid allocation which is a pain especially if you don't have linear types
kakadu_ has quit [Ping timeout: 265 seconds]
<d_bot> <Deadrat> @EduardoRFS will you post new streams on YouTube? (As a billionaire in Zimbabwe)
<d_bot> <EduardoRFS> I want to have something interesting to share, looking on types and OCaml runtime
dhil has quit [Ping timeout: 252 seconds]
kakadu_ has joined #ocaml
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
kakadu has joined #ocaml
<sadiq> Deadrat: I'm keenly watching that (and waiting to port it to Multicore).
<sadiq> companion_cube, how do you mean?
kakadu_ has quit [Ping timeout: 252 seconds]
mro has joined #ocaml
<companion_cube> how do I mean what
dhil has joined #ocaml
vicfred has joined #ocaml
<sadiq> (compaction)
<sadiq> in that scheme you'd just do a stop-the-world trace of the entire heap for compaction
<sadiq> could probably use the same implementation as in trunk
<companion_cube> ahhhh
<companion_cube> so you'd still have the same compaction algorithm, interesting
<companion_cube> but does that mean blocks would be more or less the same? with an extra word for the refcount?
<d_bot> <EduardoRFS> I was gonna try variable size size and refcount, to have variable size headers
<d_bot> <EduardoRFS> it would also allows 32bits to have bigger blocks
<companion_cube> so when you move a block from minor heap to major heap, its header might grow?
<d_bot> <EduardoRFS> no the only way for the block to grow is if it needs more than N bits in the size, and as no block is ever resized we can trust that a block never grows
<sadiq> companion_cube, yea. Maybe double word headers.
<sadiq> growing header on minor to major should be fine.
<sadiq> (tbh I haven't gone beyond the pondering stage with this, most of my thinking is going into multicore improvements)
<companion_cube> that's kind of a funny thought
dhil has quit [Ping timeout: 258 seconds]
<d_bot> <EduardoRFS> you can also do this which also allows minor refcounted and because the `Wosize_val` and `Wosize_hd` is readonly it doesn't break the FFI
<d_bot> <EduardoRFS> ```ocaml
<d_bot> <EduardoRFS> | refcount | additional_size | base_size | color | tag | is_block |
<d_bot> <EduardoRFS> | 64 32 | 32 31 | 31 11 | 11 9 | 9 1 | 1 0 |
<d_bot> <EduardoRFS> ```
<d_bot> <EduardoRFS> btw how does IRC reads this markdown?
<companion_cube> very badly :p
<companion_cube> well, now I'm intrigued
<sadiq> it's legible
selimcan has joined #ocaml
<d_bot> <monk> Null showed me the other day that OCaml's stdlib has man pages and i was wondering if there is any equiv to Base/Core?
<d_bot> <monk> looking at the repo doesn't appear so
dhil has joined #ocaml
shawnw has joined #ocaml
<d_bot> <Anurag> Not man-pages, but if you were looking for odoc generated docs janestreet published docs for their opensource libraries at <https://ocaml.janestreet.com/ocaml-core/latest/doc/index.html>
Haudegen has quit [Quit: Bin weg.]
mro has quit [Quit: Leaving...]
Stumpfenstiel has joined #ocaml
Haudegen has joined #ocaml
cedric has quit [Quit: Konversation terminated!]
vizard has quit [Ping timeout: 258 seconds]
Stumpfenstiel has quit [Ping timeout: 258 seconds]
Haudegen has quit [Ping timeout: 265 seconds]
aquijoule_ has joined #ocaml
Tuplanolla has quit [Quit: Leaving.]
richbridger has quit [Ping timeout: 265 seconds]
mikess has joined #ocaml
waleee has quit [Ping timeout: 264 seconds]
yoctocell has quit [Ping timeout: 268 seconds]