I _suspect_ I am seeng performance problems where I am because Condition doesn't expose signal yet, but it'd be nice if I could confirm this. >_>
I wish there were an easier way to hook up a profiler here. perf doesn't work in gitpod and gprof hasn't worked with #OCaml since early in version 4.
Spent a while implementing a mailbox in #OCaml. This got me introduced to the benchmarking tools, the assembly code tools, and helped me get a lot more familiar with references.
I wanted my own because Eio.Stream has some significant drawbacks for the use cases I have in mind, unfortunately, and I wanted something with the capability to time-out messages built in.
In terms of difficulty:
1. This is largely a socialization problem. How do you get others to play ball? Doing it for yourself is easy. Doing it for others and gaining consensus around the choices is hard.
2. This is not _easy_ per se, but it is also not _difficult_. The biggest time sink here is going to be writing the drivers in cases where there's substantive divergence or where you are dealing with a more minimalistic tool than what SList inherently supports.
3. Very Difficult™
Broadly speaking I think I want one of three things for a standard library configuration in #OCaml. Probably all of the above.
1. The ability to have a canonical way of saying "include Iter (<args>)" and get a basic iter function that looks the same as every other iter function.
2. The ability to say "module List = SList (CoreDriver)" and use a standard interface backed by Core.
3. The ability to say "module List = SList (Lookup)" and have it look up the same implementation used elsewhere.
Okay this was a fun bug to diagnose. #OCaml
The problem is that when you call := (or ^:= in this case since it wraps it in a Some) it doesn't actually replace the value that the reference points to, it _updates_ the value of the reference.
so if you have:
let n = ref <foo> in
let s = {
x = n;
y = n;
} in
s.x := <bar>.
Now s.y will also equal <bar>.
If this isn't what you want you can do:
let n = <foo> in
let s = {
x = ref n;
y = ref n;
}
Now you have two separate objects.
This error feels like I'm in a Monty Python skit. Or the Joey/Phoebe conversation meme:
@sanityinc A wrapper is perfectly copacetic. That's how the Core.Time library works, for example ( https://ocaml.janestreet.com/ocaml-core/109.55.00/tmp/core/Time.html ).
It's also what Eio.Time.Mono does and backs its result with Mtime, which is exactly that: https://erratique.ch/software/mtime/doc/
What makes the #OCaml example a bit jarring in part is that:
Eio.Time.now -> float (https://ocaml-multicore.github.io/eio/eio/Eio/Time/index.html)
Eio.Time.Mono.now -> Mtime structure (https://ocaml-multicore.github.io/eio/eio/Eio/Time/Mono/index.html)
It's also how the modern #java time library works: https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/time/Instant.html
Developers: "my language gives me strong type constraints! it's amazing! you can just reason through the type system and have a working product."
Also developers: "what if time were a unitless float?"
hey #ocaml folks!
a while ago I saw this t-shirt artwork being shared separately and would like the artwork for personal use! has anyone seen this image or have it in high quality?
Took a step back on my #ActivityPub toy project and started mostly over with a clean template now that I know a heck of a lot more about #OCaml and have a clearer vision. So now things like my actor tools are not embedded inside of my JSON-LD experiment.
I also rewrote the actor component in the process now that I know more about how to manage around the type system there. Seems to work so far and is a _lot_ cleaner, relatively pleased with how it is progressing.
I really want this semaphore (Eio.Semaphore in #Ocaml) to have the ability to acquire multiple permits at the same time, but I don't think I want it badly enough to _implement_ it efficiently.
tl;dr i'm feeling hella validated in my last couple years' expenditure of time and spoons, language/community-wise.
i don't want to be somebody who uses one language for his whole career, (and i am absolutely not someone who thinks a single language is correct for Every Task) … but learning all this has me internally extending my "time i plan to spend mostly in the #OCaml-sphere" number outwards by another five or ten years?
anyway, the last bit from my notes, is a bit more personal:
I’ve always been harping, for years, on how #OCaml and #JavaScript VMs are just such a surprisingly-fantastic, low-impedance match (see the whole #Melange, #BuckleScript, #ReScript, category — they're _fantastic_ to use in practice); …
but now i’m learning that Wasm is … basically OCaml’s semantics, EVEN MORE DIRECTLY, in a bunch of cases, lmao.
#ocaml #javascript #melange #bucklescript #rescript
so, talk moved on to big new things coming in #Wasm 3.0 — and this stuff was super-exciting, and over and over has amazing parallels to #OCaml???
first: garbage collection? in a low-level VM???
reasoning: “GC is kinda the worst-case situation, for working on top of an abstraction-layer like WebAssembly”
tl;dr i'm feeling hella validated in my last couple years' expenditure of time and spoons, language/community-wise.
i don't want to be somebody who uses one language for his whole career, (and i am absolutely not someone who thinks a single language is correct for Every Task) … but learning all this has me internally extending my "time i plan to spend mostly in the #OCaml-sphere" number outwards by another five or ten years?
(i said 'finally' i lied i am sick leave me alone okay ugh)
actually-finally, he touched on the module system, the missing pieces there, what all has been missing … and how after working hard to add and reconcile all the missing pieces to the existing modularization, they basically ended up with #OCaml-style functors … and then realized that … and then just decided to add #functors to #Wasm. 😱
(i had to duck out, so, again, no screenshots. cool as fuck, though.)