onramp
integrant


onramp | integrant | |
---|---|---|
2 | 14 | |
133 | 1,268 | |
3.0% | 0.9% | |
9.7 | 7.9 | |
13 days ago | about 1 month ago | |
C | Clojure | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
onramp
-
Why am I writing a Rust compiler in C?
It can be difficult to explain why bootstrapping is important. I put a "Why?" section in the README of my own bootstrapping compiler [0] for this reason.
Security is a big reason and it's one the bootstrappable team tend to focus on. In order to avoid the trusting trust problem and other attacks (like the recent xz backdoor), we need to be able to bootstrap everything from pure source code. They go as far as deleting all pre-generated files to ensure that they only rely on things that are hand-written and auditable. So bootstrapping Python for example is pretty complicated because the source contains code generated by Python scripts.
I'm much more interested in the cultural preservation aspect of it. We want to preserve contemporary media for future archaeologists, for example in the Arctic World Archive [1]. Unfortunately it's pointless if they have no way to decode it. So what do we do? We can preserve the specs, but we can't really expect them to implement x265 and everything else they would need from scratch. We can preserve binaries, but then they'd need to either get thousand-year-old hardware running or virtualize a thousand-year-old CPU. We can give them, say, a definition of a simple Lisp, and then give them code that runs on that, but then who's going to implement x265 in a basic Lisp? None of this is really practical.
That's why in my project I made a simple virtual machine, then bootstrapped C on top of it. It's trivially portable, not just to present-day architectures but to future and alien architectures as well. Any future archaeologist or alien civilization could implement the VM in a day, then run the C bootstrap on it, then compile ffmpeg or whatever and decode our media.
[0]: https://github.com/ludocode/onramp?tab=readme-ov-file#why-bo...
-
The Ken Thompson Hack
The team at bootstrappable.org have been working very hard at creating compilers that can bootstrap from scratch to prevent this kind of attack (the "trusting trust" attack is another name for it.) They've gotten to the point where they can bootstrap in freestanding so they don't need to trust any OS binaries anymore (see builder-hex0.)
I've spent a lot of my spare time the past year or so working on my own attempt at a portable bootstrappable compiler. It's partly to prevent this attack, and also partly so that future archaeologists can easily bootstrap C even if their computer architectures can't run any binaries from the present day.
https://github.com/ludocode/onramp
It's nowhere near done but I'm starting a new job soon so I felt like I needed to publish what I have. It does at least bootstrap from handwritten x86_64 machine code up to a compiler for most of C89, and I'm working on the final stage that will hopefully be able to compile TinyCC and other similar C compilers soon.
integrant
-
I Hate NestJS
Have a look at Integrant from Clojure: https://github.com/weavejester/integrant
-
A History of Clojure (2020) [pdf]
* Lifecycle management: Mount, Integrant or Component (https://github.com/tolitius/mount https://github.com/weavejester/integrant and https://github.com/stuartsierra/component)
-
Any resources for "current best practices and learnings?"
Allesandra Sierra’s Component has lots of competitors now: first mount which has since fallen out of favor for integrant. There’s newer ones too, like clip and donut-power.
- Clojure needs a Rails, but not for the reason you think
-
How can I learn functional programming?
This was the missing piece for me at least. As mentioned in another reply the Imperative shell, functional core helped me a lot with that. I discovered it through Clean Architecture and by using some micro-frameworks in Clojure that really emphasised the use of the pattern.
-
Reloaded workflow with nbb & expressjs
After reviewing the options, I settled on weavejester/integrant because it's small - only one dependency and two source files in total.
-
[ANN] Reveal Pro 1.3.308 — sticker windows for system libraries (component, integrant, mount)
Today I released a new version of Reveal Pro — dev.vlaaad/reveal-pro {:mvn/version "1.3.308"} — that adds sticker integration for system libraries such as mount, component and integrant!
- Little confusion trying to understand Integrant's source code
-
Forcing engineers to release by some arbitrary date results in shipping unfinished code - instead, ship when the code is ready and actually valuable
Component is nice but I found the records and protocols annoying to work with. Have you checked out Integrant? That ones been my preferred component-style library.
-
Tour of our 250k line Clojure codebase
I don't really like 'Component'. I seems very clunky and we had a lot of issues with it and a lot incidental complexity in our codebase (now converted to Java). It was the first real system that did these sort of things but if I start a project now, I much rather use Integrant or Clip.
https://github.com/weavejester/integrant
https://github.com/juxt/clip
I haven't used Clip a lot yet but my next project is defiantly going to be with Clip.
What are some alternatives?
ultra - A Leiningen plugin for a superior development environment
component - Managed lifecycle of stateful objects in Clojure
wonderland-clojure-katas - Clojure Katas inspired by Alice in Wonderland
mount - managing Clojure and ClojureScript app state since (reset)
sicp - HTML5/EPUB3 version of SICP
timbre - Pure Clojure/Script logging library

