Holy Dev Newsletter February 2023
Welcome to the Holy Dev newsletter, which brings you gems I found on the web, updates from my blog, and a few scattered thoughts. You can get the next one into your mailbox if you subscribe.
I’am been busy working on the small Fulcro RAD ERP system for a friend. I have leveraged the work to publish a couple of live coding videos:
Fulcro live coding: Delete mutation to list of dependants, part 1 - I create a custom mutation that only deletes an entity if nothing depends on it. If there are any dependants then it displays a popup with a list of these entities … (sorry for the terrible sound, it is better in all future recordings)
Fulcro live coding 3 - Simplify with UISM - here I learn how to replace complicated logic in a component and mutations with a UI state machine
I have also created an archive of all past newsletters so you can more easily find interesting links you know I have mentioned.
Finally, I am starting a new Fulcro teaching video series with a friend, where we will go from (almost) 0 to a Fulcro app in production. I will keep you posted :-).
🎥 Simpler User Interfaces with Membrane (by Adrian Smith)
An interesting discussion what a true functional UI programming / framework would look like and what is wrong with essentially all current, non-pure UI frameworks. The key problem is that view functions and event handlers are impure and side-effecting. Instead, views (i.e. components) should return immutable data describing the UI and even handlers should just produce effect / "intent" description as data. Components should be pure functions - only relying on their arguments and producing data. Then they are truly reusable, no matter what framework you use.
The talk essentially describes the status quo and design principles behind Membrane, and is very relevant even if you do not care about Membrane, which is only mentioned marginally. It is a UI framework created as an exploration into extremely functional UI, which turned out to be very possible and practical.
Note: In the same domain is Clojure + UI = ❤️ by Nikita Prokopov, which introduces his Humble UI - a new, practical UI framework for Clojure desktop applications (b/c Java frameworks suck and Electron has its issues....). It is built on Skia, which powers Chrome, Flutter & more. It doesn't try to be functional but, contrary to HTML, provides a simple layout, sane text metrics (i.e. no random, OS-based space around letters), REPL-ability, and truly composable components (such as label, rect, shadow, clickable, hoverable, padding, center, ... that you put together to make a button of your dreams).
Automated, runtime correctness analysis for core.async, based on instrumentation and checking of communication against predefined spec. (Can A talk to B? Does the message satisfy a predicate?) It can detect when the wrong processes communicate and a number of cases of deadlocks. There is a ClojureDays 2022 talk introducing the library.
Currently it only supports basic blocking read/write operations + timeout, thread, alts!!. I hope it will continue developing, because I missed such a thing multiple times.
A lightweight, ultra-fast tool for building observability pipelines / getting observability data from sources to sinks - collect logs and metrics from various sources, process them with programmable transforms (structure, sample, aggregate), send to various sinks (S3, Prometheus, ...). Used e.g. by Fly.io. Written in Rust. Deploy as a daemon, sidecar, or aggregator. Created by Datadog.
A thought-provoking criticism of React. Highlights:
React’s greatness is more in what it meant at the time—and in what it inspired—than what it currently is today. It has aged a lot, and not well - React’s velocity, and its ceiling, have long lagged behind that of its comparable colleagues.
The author compares React with other modern frameworks such as Vue, Svelte, Solid etc. on performance, learning curve (JSX :'( ), bundle size, dev experience, and more.
Thank you for reading!