

Discover more from hrbrmstr's Daily Drop
grapviz (wasm)
Graphviz is open-source graph visualization software. This is likely not news to anyone reading this newsletter. It's been around for ages, and you likely come across graph visualizations made with Graphviz quite regularly. The DOT Language is used to specify graph vertices/edges, plus various features of the resultant graph rendered by Graphviz.
For years, one has been able to use Graphviz on the web the clever vis.js [GH] library (which was built with emscripten and is now on the slow path to obsolescence).
One replacement for viz.js is HPCC Systems' WebAssemply port of the Graphviz library [GH] [NPM]. It's dead simple to use:
<meta charset="UTF-8">
<title>GraphViz WASM</title>
<script src="https://cdn.jsdelivr.net/npm/@hpcc-js/wasm/dist/index.min.js"></script>
<script> var hpccWasm = window["@hpcc-js/wasm"]; </script>
<div id="gv"></div>
<script>
const dot = `DOT FILE CONTENTS`;
hpccWasm.graphviz.layout(dot, "svg", "dot").then(svg => {
const div = document.getElementById("gv");
div.innerHTML = svg;
});
</script>
(Yes, that's a valid web page; browser HTML parsing/rendering engines are quite forgiving.)
I made a dependency graph of a recent Rust project of mine (just run cargo deps
in any Rust project), embedded it where the above says DOT FILE CONTENTS
and, voilà! (An aside: that's a gnarly graph! Whining about dependencies is a big thing in R land, of late, but an R package/project's worst dependency tree ain't got nuthin' on Rust or JavaScript projects).
While you can roll your own online graphs using this technique, this same Wasm'd Graphviz is baked into ObservableHQ and Quarto.
Observable Teams
This section is short (I am essentially passing along the equivalent of a press release and a promise), but it's a big step forward into getting more folks to check out and adopt the Observable Platform.
I'm increasingly using Observable about as much daily as I am Visual Studio Code and RStudio (I mean, I've even used it twice now in today's edition!). While, at work, we're not yet ready to drop some coin on the platform for private collaboration, I (and you!) can now set up a public team for free!
Here's their pitch:
The community is the heart of Observable: it’s how people learn and get inspired; it’s how people find examples, templates, and components to accelerate their work. They build upon each other’s creativity, approaches, and skills. In fact, the majority of our users get started by forking someone else’s example: it’s the easiest way to get started. But what an individual can do is just a tiny part of what is possible when people come together in Observable and start collaborating with each other.
To date, our free accounts have limited collaboration with others to 5 folks in a notebook. Our Paid Teams customers have shared how powerful it has been for their data teams to get on the same page with Observable’s collaborative platform: It has helped them create more streamlined data workflows, and get better insights faster by working together. We realized that our community as a whole would benefit from the same data collaboration support those using Paid Teams get. So why keep this hidden away within private workspaces only?
I'll be making a free team for my organization and will report back on how it goes. And, as far as my above comment on shelling out $, ~$150 USD for a single editor + multiple viewers (for private notebooks/collections) is something I can potentially justify testing as well. Stay tuned!
I did ^^ after scheduling this post, and you can follow along with the GreyNoise Team as we try this ride out. And, I shall indeed report back on public/private Observable Teams in a future edition.
OpenAI Codex Walkthrough
One either hates, loves, or knows nothing about Microsoft's Copilot (they own GitHub), which is an "AI pair programmer" that "helps you write code faster and with less work." Microsoft illegally and unethically (I guess you now know what bucket I'm in) trained this AI model on nearly the entirety of GitHub repositories and tried to scam 💰 out of lazy developers with it until they just (basically) gave it away.
Copilot itself is, essentially, just an autocompletion helper. OpenAI took this one (big) step further. You tell it what language you want to use, give it a bunch of natural language prompts dictating what tasks you need the program to perform, and it generates the resultant codebase faster than you can copypasta insecure answers from StackOverflow.
Now that I've sufficiently berated these models, let me direct your attention to a real world (toy) project built using OpenAI.
Gustav Westling (@zegl) (and his team) decided to put OpenAI through the challenge of "Building a backend from scratch using only OpenAI Codex". The post is well-written, is a complete walkthrough (complete with some "DANGER, WILL ROBINSON"'s), and comes with a side of complete, generated source code and demo
I'm still skeptical of all these prompt-based AI helper tools (programming or otherwise), but I am keeping half a mind open to them in the event some reset does happen and the builders of this new assisted future start actually caring about ethics and take half-a-mo' to consider unintended consequences.
FIN
If you've built anything with OpenAI, I'd bet there are more than a few readers who'd be interested in a bit of exposition in the comments. ☮