Joseph Lyons
mydeathmachine.bsky.social
Joseph Lyons
@mydeathmachine.bsky.social
Dev, audio engineer, metal fanatic, dad. I post about code, tech, and cool software I run into. Works at @zed.dev
The Brainfuck extension (v0.0.4) now correctly installs again in Zed! Now you can get back to your #super #important work!
December 12, 2024 at 6:02 PM
So now back to the prod code. When the user runs this wait function, process.sleep is called, when the tests run it, the function to advance the fake clock is called, which in turn advances the real clock in production code.
November 29, 2024 at 6:41 AM
In my test, I created a fake clock, derived a real clock from it, and passed that one into the prod code, and then pass a wrapped version of the clock advancing function into the fake wait function, one that captures the fake clock as well.
November 29, 2024 at 6:41 AM
I created a function to advance the fake clock..
November 29, 2024 at 6:41 AM
I have a recursive private function that runs, that handles the attempts, keeps track of errors, and now, keeps track of duration of the execution of the recursive function. This is where the wait function is called. In prod, wait is process.sleep, in tests, its dummy function.
November 29, 2024 at 6:41 AM
I published a new @gleam.run package last night, persevero. It is a package that can retry fallible operations. You can easily construct different backoff strategies with the built-ins, or make your own using raw gleam yielders.

github.com/JosephTLyons...
November 27, 2024 at 7:01 PM