Knowledge Lab

The title refers to two things I'm planning with respect to this project:

  • A web service to ship updates

  • Applying* the okapi BM25 algorithm to search

    • *sort of - I used a library this time around

One of the features I'm thinking through right now is how I want to handle in app syncing. There probably will not be a web service in the near future, but my short list is

  • Git

  • ATProto records (for the text content of notes at least)

  • Dropbox

In other projects I've built, the challenge with Git is using it on mobile devices. When I was still using obsidian, I used git for syncing. Keeping notes in plaintext and using a database (SQLite) as a way to quickly query a graph and track tasks is at the core of this project's vision.

Beacon

Today I'm working through the first of five-ish milestones I made for the current release. So far I've written a new Tarjan implementation for module graphs. I almost wrote an abstraction but didn't reach the third implementation (it's driving me crazy that I can't remember where I read last week that at the third time code is duplicated, it should be abstracted). There may be a lot of those, because this release is about extending/replicating analysis across a workspace.

If you're interested, I wrote a short article/essay about Tarjan's algorithm here.

Again back to the absurd title, using the go:embed directive is a staple for me, especially when loading some templates or fixtures in my go projects. I'm surprised it took me so long to realize I could do a similar thing for AST construction in beacon with include_str! and serde. The PR would have had a reasonable diff if not for this. But look at these deletions! Glorious.

Anyways, the two key features I worked on so far today were taint analysis & transitive type propagation which I think warrant some explanation (based on how I understand them and defined them in the codebase).

Taint Analysis

This is an analysis that labels certain inputs as “tainted” and then tracks how that taint flows through the control flow graph into potentially unsafe sinks (like SQL, exec, io, etc.) without proper sanitization.

Type Propagation

Taint Analysis builds on this concept, which is the process of following type information through the entire graph so that a type discovered in one place is automatically applied to all program elements/symbols that are (directly or indirectly) dependent on it.

Iced.rs

I'm thinking of starting a twitch stream for video games. I recently picked up the new Digimon game and want to stream it. I don't have a working camera on my gaming PC so I made this silly little widget:

The panel shows up when you double click the image and you can drag and drop it onto the window. The idea is to have a little, draggable indicator for your OBS scene. Iced is a really powerful library. I highly recommend it if you like the elm architecture.