@alcinnz@floss.social
@alcinnz@floss.social avatar

alcinnz

@alcinnz@floss.social

A browser developer posting mostly about how free software projects work, and occasionally about climate change.

Though I do enjoy german board games given an opponent.

Pronouns: he/him

This profile is from a federated server and may be incomplete. Browse more on the original instance.

alcinnz, to random
@alcinnz@floss.social avatar

We could get far on our hypothetical string-centric hardware collaborating peer-to-peer using the CRDT version control system I described the other day! But giving the project a central server (running on our custom hardware, lets say) can streamline development whilst adding quality control, so how'd we implement it?

We'll implement our "codeforge" as a suite of independent services, using an (as yet, proprietary) <form> control for authentication.

1/?

alcinnz,
@alcinnz@floss.social avatar

To start we'd want to build a viewer upon an AutoMerge document, including the contained directory of text files or whatever the CRDT encodes. Annotated with who added each bit of text when. In addition to displaying all the commit messages for the whole repository, specific file, or line there-of with links to each change's diffs.

We may want to run this viewer offline as well for our own local repos! It'd be implemented as a handful of parameterised converters from AutoMerge to HTML.

2/?

alcinnz,
@alcinnz@floss.social avatar

Furthermore I'd include transcoders from any state snapshot to a tarball, & from the doc history to a ATOM webfeed!

Our OS (for far more than just this!) would include a tool for concatenating multiple HTTP fetched/cached webfeeds, sorting them, & deduplicating them. RSS would be rendered via CSS (as long we ensure their links work), & I'd incorporate a handful of those links into our new-tab page (perfect place!).

Authorised users can merge updated docs into the hosted version.

3/5?

alcinnz, to random
@alcinnz@floss.social avatar

Generating text colors - Robin Rendle "The Cascade":
https://csscade.com/generating-text-colors/

alcinnz, to random
@alcinnz@floss.social avatar

Design interviews - Robin Rendle:
https://robinrendle.com/notes/design-interviews/

alcinnz, to random
@alcinnz@floss.social avatar

"Is This Project Still Maintained?" - Matt Palmer "Brane Dump":
https://www.hezmatt.org/~mpalmer/blog/2024/05/14/is-this-project-still-maintained.html

alcinnz, to random
@alcinnz@floss.social avatar

Upgrade PostgreSQL from 15 to 16 on Ubuntu 24.04 - Paolo Melchiorre:
https://www.paulox.net/2024/05/20/upgrading-postgresql-from-version-15-to-16-on-ubuntu-24-04-noble-numbat/

alcinnz, to random
@alcinnz@floss.social avatar

I want it all but, it is impossible - Ana Rodrigues:
https://ohhelloana.blog/i-want-it-all/

alcinnz, to random
@alcinnz@floss.social avatar

Baseline - Robin Rendle "The Cascade":
https://csscade.com/baseline/

Like Robin & Jeremy I'd like to see Baseline indicate whether a new feature degrades gracefully!

alcinnz, to random
@alcinnz@floss.social avatar

Prefer do notation over Applicative operators when assembling records - Gabriella Gonzalez "Haskell For All":
https://www.haskellforall.com/2024/05/prefer-do-notation-over-applicative.html

alcinnz, to random
@alcinnz@floss.social avatar

Exploring Seamless Rust Interop for Newer Languages, Part 1 - Evan Ovadia "Vale Lang":
https://verdagon.dev/blog/exploring-seamless-rust-interop-part-1

Could save me some headaches I'm experiencing...

alcinnz, to random
@alcinnz@floss.social avatar

P&B: Rebecca Toh - Manuel Moreale:
https://manuelmoreale.com/@/page/KULfiggfOmaBTxp9

alcinnz, to random
@alcinnz@floss.social avatar

Data portability: API getter and setter methods - Go Make Things:
https://gomakethings.com/data-portability-api-getter-and-setter-methods/

alcinnz, to random
@alcinnz@floss.social avatar

Your new tool will be used in the worst possible way - Cory Dransfeldt:
https://feedpress.me/link/23795/16692935/your-new-tool-will-be-used-in-the-worst-possible-way

alcinnz, (edited ) to random
@alcinnz@floss.social avatar

Building pages from data in Eleventy - Cory Dransfeldt:
https://feedpress.me/link/23795/16692970/building-pages-from-data-in-eleventy

alcinnz,
@alcinnz@floss.social avatar

@teleclimber Yes, muscle memory! Thanks for the correction!

alcinnz, to random
@alcinnz@floss.social avatar

Wow, I like this talk...

Psychedelic Billionaires: Healing in an Age of Inequality - Neşe Devenot @ Harvard Medical School:
https://invidious.materialio.us/watch?v=z_PfFiXMwiU (YouTube via Invidious)

alcinnz, to random
@alcinnz@floss.social avatar

There's a handful of strategies used we use to design "algorithms" for computing answers to mathematical problems.

We have "divide & conquer" algorithms which splits the problem into smaller parts, recurses to solve those subproblems, & combines the solutions.

We have "greedy" algorithms which solves a simpler version of the problem & keeps extending it until we've solved our problem.

1/2

alcinnz,
@alcinnz@floss.social avatar

We have "Dynamic Programming" (named to sound impressive to the researchers' generals) which resembles "divide & conquer" algorithms, but we store the partial solutions so we can relate them in a non-obvious order.

These strategies describe most of the popular algorithms we see all over computing & computer science!

But where all the real ingenuity lies is in designing datastructures, which can require mindset changes!

2/2 Fin!

alcinnz, to random
@alcinnz@floss.social avatar

Diffing can be incredibly helpful for managing software! It can be used to retrofit CRDT support, monitor changes being made, guide how the software should be adjusted to match desired output(s), etc. Maybe for our Output Unit we'll have tool which autoruns & diffs a converter to guide its development, maybe adding automation where we find it worth the effort?

So how'd we implementing diffing on our string-centric hardware? Strings specifically? Its not trivial!

1/5?

alcinnz,
@alcinnz@floss.social avatar

If the document's already stored as a CRDT we could just ask which edits are in one CRDT-document vs the other. Maybe postprocessing it to determine when both peers made equivalent edits!

As for state snapshots...

The core (Dynamic Programming) algorithm for a optimal text diff involves a building table of the max number of common characters between 2 strings. Common chars increment this count, differing chooses an optimal path. Then traverse a path back-to-front to output.

2/5?

alcinnz,
@alcinnz@floss.social avatar

The increments & compares are well within the capabilities of even our Arithmetic Core. Though being a 16bit machine we may want to operate in UTF-16, or a custom variant with a larger character-space.

The catch is for strings a & b long this takes on the order a*b bytes. So if we're diffing 2 1kb files (not that big...) we'd need an entire mb! Whereas I've established that this Arithmetic Core has 64kb at most (in its slower Harvard mode).

We must optimize for it to fit!

3/5?

alcinnz,
@alcinnz@floss.social avatar

One thing to note is that the only reason we're keeping the entire table around is to read back a sliver of it as the diff. To build up a single row of it we only need to store that row & the previous one! So what if we leaned more on compute rather than storage to read back the diff?

If we run the core algorithm (possibly using alternate coordinates into the problem-space) both forwards & back to meet in the middle, we can run a Divide & Conquer algorithm to recursively split both halves.

4/6

alcinnz,
@alcinnz@floss.social avatar

Once both inputs to a recursion are equal or either's empty then we have a piece of our diff! Or maybe we'd switch to the unmodified Dynamic Programming algorithm once the inputs are small enough for the Arithmetic Core to handle?

This reduces how much data the Arithmetic Core must store to roughly the length of either or (depending on coordinate space) both files! Huge improvement, but in often not enough...

So what could we reasonably expect of our Parsing Unit to simplify this problem?

5/7

alcinnz,
@alcinnz@floss.social avatar

Utilizing its "dictionary" construct our Parsing Unit can readily extract all the unique lines within a file, & in turn the common unique lines between 2 files.

Assuming those unique lines are in the same order now only need to diff the text between them! Probably trying a recursion first! Maybe even splitting the text down further into e.g. words? Before falling back to a proper diffing algorithm, if we succeed in splitting the file up enough!

Except... Guess what?

6/7!

alcinnz,
@alcinnz@floss.social avatar

We must handle cases where those unique lines have been reordered between the 2 files. So we'd read them out in the order the order they occur in one file (by re-parsing that file, the list-keys operation I made sure to include orders keys alphabetically instead) & feed these line numbers to the Arithmetic Core so it can compute a common subsequence!

The Arithmetic Core would do so in a way which resembles playing a solitaire card game e.g. Patience!

7/7 Fin! Tomorrow: A codeforge, and RSS!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • kavyap
  • DreamBathrooms
  • cisconetworking
  • mdbf
  • InstantRegret
  • magazineikmin
  • Youngstown
  • thenastyranch
  • rosin
  • slotface
  • Durango
  • GTA5RPClips
  • ngwrru68w68
  • JUstTest
  • cubers
  • tacticalgear
  • tester
  • modclub
  • khanakhh
  • everett
  • normalnudes
  • osvaldo12
  • provamag3
  • Leos
  • ethstaker
  • anitta
  • lostlight
  • All magazines