A JavaScript implementation of Git
github.com
github.com
If you go to this[0] link, you'll see a bunch of nodes in a graph. Each one represents an AWS Lambda that will be deployed (and an API endpoint). The edges between are "microservice" calls between Lambdas that get configured with the deploy too.
That's all coming from a Git repo here[1].
And if you edit the project by adding more blocks, it will actually push a commit to Git (if you're signed up and auth'd GitHub). Each block is just a folder, and the "project" is a YAML file. We have a bi-directional "compiler" that lifts/drops the project in either direction.
This library made it super easy to ship this. We tried using the server first and it was a huge pain. We just had to setup a GitHub proxy to make this work. It's stateless now (your browser does the work) :)
Browser-based coding environments are becoming huge (an observation, not a suggestion of what should be).
This is a natural fit for those environments.
Browser-based coding is pretty popular these days, it seems.
But also: why not? It's cool, and it's probably a good learning resource for JS devs who want to learn how git works
Ideally, an in-language git implementation would also let you model & compute on git in a more enduring fashion.
I don't think isomoprhic-get is particularly set up to allow folks to do incremental-computation, but one could imagine having the git tree in memory, & manipulating it there across a series of operations, & then generating a diff or what not, without needing to touch the file system or re-read the tree while multiple operations are happening.
This is a bit of a leap of topics, but I think one of the main things missing in JS is a good representation, an abstraction for files. Node has an api for opening files & reading & writing, very normal stuff, but it relies entirely on the platform. There's no abstract concept of a file at a path. Because of this, one can not easily substitute in something powered by S3 or something powered by WebDAV, since there is no abstraction in the language.
The once-well-known Node.js build tool Gulp is based very much around one of the libraries out there filling this gap, called vinyl-fs[1]. From the start of it's readme, "Vinyl is a very simple metadata object that describes a file. When you think of a file, two attributes come to mind: path and contents. These are the main attributes on a Vinyl object." By defining a file in an abstract manner, it allows for non-platform implementations, like S3, or WebDAV, or in-memory. It allows talking about files, without having to actually do unto files.
It's a bit hard to connect back to the discussion on git and git executable's run-to-completion model, but this idea, of the language having it's own abstractions & being able to do computing inside the runtime without having to keep going back to the platform as the one & only source of truth, allows a lot of flexibility for manipulating the system that is otherwise often cumbersome & involves redundant back & forth work.
Getting away from git's normal run-and-execute command model, & comprehending git is the sort of thing that's super useful if you're writing editors, ides, github-like systems, & gitops tools.