Holy Dev Newsletter January 2022
Welcome to the very first issue of 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.
What’s going on: Two years ago I finished my first month of Rust and now I am finally getting back to studying it, while also learning about security and hacking via the Black Hat Rust book. I am enamored with Clojure yet I find it worthwile learning a language in a way opposite to it, regarding typing and low-level resource control, one applicable in domains where Clojure is not.
I have started thinking about how to help people model their domain with data entities and Fulcro components but am somewhat stuck. If you know what folks struggle with, please let me know!
I am also considering doing "Fulcro Office Hour" once a month, where anyone can join and get help with their problems and questions. Either on a first comes, first served basis or using something like the lean coffee format. What do you think about that?
GigSky app lets you grab a single data plan where and when you want – at home or in any of our 190+ destinations. Select a plan from the app, download an eSIM, and you’ll connect on the spot, no physical SIM card required.
Tips for running a teaching side-business as a software developer (series). On the importance of a "mailing list" of people interested in you, your opinions and creations, and how to build it eg. via a newsletter.
Allow essentially unbounded recursion and mutual recursion of seq operations => write recursive algorithms that work on very nested data structures in Clojure(Script) using familiar operations.
Core provides the seq operations reduce, transduce, into, and common transducer-producing fns and other non-seq ones.
Hike is like clojure.walk, but defines walk in a way that supports walking very large, nested data structures without using the call stack.
A clj Tool for building (Docker-compatible) containers (without using Docker) using jib from deps.edn-based projects, with dependencies in a separate layer. (Referring to those via Class-Path entry in Manifest.mf of the main .jar.) Uses gcr.io/distroless/java by default.
Script MacOS applications using ClojureScript. Example:
$ obb -e '(-> (js/Application "Safari") (.-documents) (aget 0) (.url))' https://clojure.org/
Finding out what functions a function calls via a static analysis or runtime magic. Some deep insights into the Clojure compiler and classloading. Not something you normally need, unless you are a tool author, but fascinating nonetheless.
It leverages the fact that a function is compiled into a class and has public static fields holding Vars of the functions it calls (excluding inlined fn calls and from within lambdas). To discover fns called from lambdas, and leverages the fact that lambdas are also compiled into classes whose name contains the parent function and searches the clojure Compiler's internal cache for classes (= fns) matching that pattern.
Why Volta.sh might be better than nvm for managing NodeJS versions. Key points: 1) It automatically switches to the correct Node version, as pinned in package.json; 2) It auto-installs the version, if missing; 3) uses project-local tool over a global one and pins global tool node version to the one it was installed with; 4) has support for typescript's tsc and likely more.
It works by installing shims for node, nvm etc. that check for and call the actual tool with the correct version
An interesting story, with tips for converting a PNG to webp and other great formats and draw.io to svg via pdf. Ends up running the draw.io JS library in a headless Chrome for export to PDF and converts that to svg via Inkscape/Poppler, the whole process controlled from Rust. (The detour through pdf is to ensure samme display on desktop, browser and to convert custom font to text paths to preserve it.)
A tool tip: svgo to optimizer svg size.
DeepSpeech is an open source embedded (offline, on-device) speech-to-text engine which can run in real time on devices ranging from a Raspberry Pi 4 to high power GPU servers.
An overview of CNCF projects, libraries, tools.
Small library to facilitate the implementation of calcite adapters in clojure.
Calcite allows you to expose any structured data as a SQL table and use SQL to query that data (relational algebra).
User-friendly messages for Spec errors. Similar to Expound but more data-oriented, centered around explain-data, and with support for parameterized error messages / custom display of failed predicates.
Distributed .wasm binaries via OCI registries (normally used for Docker images) such as Google Container Registry or GitHub Package Registry. (Obviously the OCI spec allows publishing different kind of artifacts, not just OCI images.)
(Source: Rust Linz, November 2021 - WebAssembly beyond the browser by Thorsten Hans.)
Warp is an interesting modern terminal (currently in closed beta) with features such as a command palette (popular from VS Code) making any action findable, visual menus for history and autocompletion (including docstring display <_3 its="its" terminal="terminal" performing="performing" building="building" full-fledged="full-fledged" _21st="_21st" including="including" cursors="cursors" _="_" ability="ability" move="move" command="command" century.="century." the="the" output="output" multiple="multiple" up="up" for="for" appreciate="appreciate" editor="editor" and="and" blocks="blocks" operations="operations" on="on" more="more" them.="them." i="i" a="a" somebody="somebody" span="span" to="to" offering="offering">
(Source: Rust Linz, November 2021 - WebAssembly beyond the browser by Thorsten Hans.)
Get an alternative or one-off email address, phone number, or credit card. A good overview of available services, apps, and their prices.
See each Docker image layer, its size, what has changed, and an estimate of efficiency / wastefulness.
A neat little library to simplify / beautify setup-heavy tests such as when you test your api layer and need to set up a Component system, fake authorisation etc. Makes it possible to replace nesting with a nice sequence of steps.
CLI to query and transform data in many formats with Clojure and a few useful libraries such as Specter and Medley. Currently supports EDN, YAML, JSON, XML, MsgPack, CSV, Transit, Text. Packs a number of useful reader macros and syntax conveniences that simplify writing transformation pipelines on the command line without paredit.
Since OpenJDK 14 you can set -XX:+ShowCodeDetailsInExceptionMessages for NullPointerException to show which variable was null.
Over the past year we saw several WebAssembly features that can be used to improve performance like the SharedArrayBuffer for use with WebAssembly threads, Fixed-Width SIMD, and exception handling. WebAssembly support was improved in .NET 6 and both .NET and the Uno Platform added AOT performance improvements.
Hoped for in 2022: Tail Call optimisation, multiple memory blocks for a thread, progress on WASI and the Component Model.
The capabilities project is a cross-company effort with the objective of making it possible for web apps to do anything iOS/Android/desktop apps can, by exposing the capabilities of these platforms to the web platform, while maintaining user security, privacy, trust, and other core tenets of the web.
"VisiData is an interactive multitool for tabular data. It combines the clarity of a spreadsheet, the efficiency of the terminal, and the power of Python, into a lightweight utility which can handle millions of rows with ease."
Reportedly a quick and powerful way to explore and summarize even largish CSV, Excel and other data sets quickly and/or convert them to HTML/JSON/Markdwon/.... A nice tutorial by Jeremy S.-V.
A weekly newsletter and an archive of useful/curious datasets. Useful if you need some data to play with :)
Examples: Local mortality and the 1918 pandemic, SARS-CoV-2 in local sewage, Europe’s primary forests.
A good case for Rust. Short, well written. Despite the title, I don't feel it is all that web - specific.
Pros include but are not limited to : Great rolling - built in package management, build, tests, docs.
"I do like functional programming and everything that is common in these languages – algebraic data types (with pattern matching), implicit returns, if expressions (plus if let and while let), using Options instead of nulls, and Result instead of throw/catch. I find it easier to read and understand. Rust is an imperative language, but it reads like a functional one (mostly). If we combine it with the beforementioned tooling, excellent packages, and active development, we have everything that is needed for a perfect language. Additionally, the fact that we may use macros to extend the language pushes the boundaries even further."
Retorted there is 75k Rust packages (compared to Python's 400k).
Rust Quote of the Week
Rust : We have a race condition bug in our standard filesystem library !
C++ : You guys have a concurrency safe standard filesystem library ?
C : You guys have a standard filesystem library ?
– redditmodsareshits on /r/cpp
Introducing the Block Protocol. All WYSIWYG editors for structured documents based on blocks (such as Heading, Paragraph, Table,...) that will implement it will be able to use the same blocks and thus have a richer selection. Block authors can create a new kind of block and get it working with all editors, and publish these in a global registry the Block Hub. Early stage.
Thank you for reading!