sectorforth VS bootOS

Compare sectorforth vs bootOS and see what are their differences.

sectorforth

sectorforth is a 16-bit x86 Forth that fits in a 512-byte boot sector. (by cesarblum)

bootOS

bootOS is a monolithic operating system in 512 bytes of x86 machine code. (by nanochess)
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
sectorforth bootOS
10 9
374 1,775
- -
0.0 4.1
almost 2 years ago 4 months ago
Assembly Assembly
MIT License BSD 2-clause "Simplified" License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
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.

sectorforth

Posts with mentions or reviews of sectorforth. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-05-01.
  • Cognition: The Revolutionary Antisyntax Language Redefining Metaprogramming
    2 projects | news.ycombinator.com | 1 May 2024
    I think it's fine to show that you can do it, I think the main thing is to flip the order a bit.

    E.g. "here's a cool thing thing we can do outcome of significantly changing a readable syntax>" to hook people, "here's how ", "and if you really want to know how to bootstrap this from basics ".

    Maybe compare how e.g. Forth is often introduced, with how people describe bootstrapping of a simplistic Forth like Jonesforth or Sectorforth [2]. Showing people how they can define their own words and it fundamentally changes how they work with the language afterwards is cool to a lot of people who have no interest in details like how you an implement even numbers with a minimal set of primitives (e.g. Sectorforth relies on that).

    Both are interesting to me, but I'm weird, and I think for most people it'd be easier to maintain their interest if those two aspects are either separate articles or at least if the bootstrapping is relegated to a standalone section they're clearly told they can skip.

    [1] https://news.ycombinator.com/item?id=31368212

    [2] https://github.com/cesarblum/sectorforth

  • Konilo: A personal computing system in Forth
    5 projects | news.ycombinator.com | 2 Mar 2024
  • Fourteen Years of Go
    13 projects | news.ycombinator.com | 11 Nov 2023
    > I'm not sure here how you differentiate minimalist from restrictive.

    The flexibility of the language and its syntax. The more constructs are syntactic, the less minimalistic it is, and Go is a very syntactic language.

    > I've always considered Go to be minimalist in terms of available tokens to the programmer: https://github.com/e3b0c442/keywords/blob/main/chart.png

    No language on this chart has even a passing resemblance to minimalistic. I don't think anything does when it reaches double digit keywords.

    For reference, I believe Smalltalk has 6.

    And forth is more complicated because it doesn't really have keywords at all, and barely any syntax, instead it has assembly-coded / runtime-provided words (~functions) and variables. SectorForth (https://github.com/cesarblum/sectorforth/) is down to 8 builtin words, 2 IO words, and 5 variables (milliforth packs those behind a word instead). And so far 2 of the words have been found unnecessary / redundant.

  • MilliForth
    4 projects | news.ycombinator.com | 5 Nov 2023
    https://github.com/cesarblum/sectorforth/issues
  • Interesting Article About a C compiler in 512 bytes That Uses Forth Inspired Tricks to Fit an Extremely Tight Space Constraint
    1 project | /r/Forth | 2 Jun 2023
    Probably well known, but I'll let it here anyway: SectorForth
  • Ask HN: What are some impressive software projects that fit in 512 bytes?
    5 projects | news.ycombinator.com | 20 Jul 2022
  • That's pretty much it!
    7 projects | /r/ProgrammerHumor | 26 Feb 2022
    sectorforth
  • A Forth bootable by old 386 PCs?
    4 projects | /r/Forth | 17 Oct 2021
    If you want to go allll the way down to the metal, you could put https://github.com/cesarblum/sectorforth in a floppy boot sector and then work your way up from there, enabling line A20 and switching into 32-bit protected mode yourself. Certainly on the "DIY" end of the spectrum, but it sure would be satisfying.
  • suckless programming languages?
    5 projects | /r/suckless | 10 Oct 2021
    Forth - More powerful and minimal than C, can fit in 512 bytes
  • BootOS operating system in 512 bytes
    3 projects | news.ycombinator.com | 27 Aug 2021

bootOS

Posts with mentions or reviews of bootOS. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-05-24.
  • A monolithic operating system in 512 bytes of x86 machine code
    1 project | /r/patient_hackernews | 7 Jun 2023
    1 project | /r/hackernews | 7 Jun 2023
    1 project | /r/hypeurls | 7 Jun 2023
    1 project | news.ycombinator.com | 7 Jun 2023
  • SectorC: A C Compiler in 512 bytes
    7 projects | news.ycombinator.com | 24 May 2023
    wow, this is impressive.

    I wrote a similar x86-16 assembler in < 512 B of x86-16 assembly, and this seems much more difficult <https://github.com/kvakil/0asm/>. I did find a lot of similar tricks were helpful: using gadgets and hashes. Once trick I don't see in sectorc which shaved quite a bit off of 0asm was self-modifying code, which 0asm uses to "change" to the second-pass of the assembler. (I wrote some other techniques here: <https://kvakil.me/posts/asmkoan.html>.)

    bootOS (<https://github.com/nanochess/bootOS>) and other tools by the author are also amazing works of assembly golf.

  • StoneKnifeForth
    5 projects | news.ycombinator.com | 17 Jul 2022
    I'm glad you enjoyed it! Have you tried running it?

    One could reasonably argue that SKF isn't really "booting" on an old 386 PC; though it'll probably run on one, you need to get Linux running on the PC first, because SKF can't read the input source code from disk or write the output executable to disk on its own, and it needs something to load it into memory and start it running as well. And, unlike real Forths, it's a batch-mode compiler: it can't be used interactively. The sense in which it's a "tiny bootstrap" is that it's a compiler that compiles itself, not the sense of "bootstrapping" that means to load oneself into RAM.

    — ⁂ —

    In 02007 I wrote https://github.com/kragen/tokthr as an investigation into precisely the question of "just how small a fully functional Forth environment could be packed". By using bytecode ("token threading") rather than DTC or ITC, tokthr provides "90% of" a traditional interactive Forth environment in about 1400 bytes, all bytecode except for a 239-byte machine-code core. Unfortunately, because it's incomplete, it's impossible to know whether the remaining 10% of the functionality requires adding another 10% to the code or another 90%—as in the old joke about how the first 90% of the project takes the first 90% of the schedule, and the remaining 10% takes the other 90%.

    My best guess, though, is that it'd be about 1700 bytes, so in 2KiB you'd have about 350 bytes left for the user program, which is probably about 64–128 lines of code. Interpretation can be slow, but it sure makes for denser code, and you don't need to have two copies of the interpreted code in RAM when you're bootstrapping.

    There have definitely been 8KiB interactive Forth systems, and I think there have been 4KiB ones, which was also the size Wozniak required for a BASIC interpreter on the Apple. tokthr suggests that 2KiB might be achievable for a stripped-down Forth.

    Óscar Toledo G.'s bootOS https://github.com/nanochess/bootOS is a particularly interesting non-Forth system in this OS/IDE/debugger vein, because it has enough functionality to write programs (in hexadecimal machine code), load them from disk, edit them, and save them, all in 512 bytes of code. It does require somewhat more than 512 bytes of RAM, but still very little—much less than has ever been present on a machine that it could run on.

    — ⁂ —

    My thinking on Forth, which is something I'm an amateur at, has changed a little bit since I wrote tokthr and SKF. I think that if you evaluate Forth as a programming language, it's generally going to look pretty deficient. It's more bug-prone and harder to read than alternatives like C, Lisp, BASIC, or assembly language, although it does support compile-time metaprogramming and powerful abstraction facilities.

    But if you ask the question, "What's the simplest usable development environment I can build?" the answer starts to look a lot like Forth, especially if you're running on a poorly characterized piece of hardware where you need to prioritize interactive experimentation with I/O ports. It gives you an interactive, scriptable environment for poking around, similar to what Tcl gives you https://yosefk.com/blog/i-cant-believe-im-praising-tcl.html but in 4 kilobytes rather than the megabyte and a half Tcl demands. And the environment includes not just a scriptable command line and the usual programming-language things like arithmetic, subroutines, variables, and arrays, but also compile-time metaprogramming, virtual memory, an editor that allows you to recompile code at screenful granularity (usually), a memory dumper, access to raw hardware devices, an assembler (usually), sometimes multithreading, and a sort of debugger.

    As in BASIC or Lisp or Python or Tcl, your UI is a REPL, so your programming language is also your command language; but, unlike in BASIC, your command language is extensible, so in many cases it can also work as the user interface to your application.

    In BASIC or in a C debugger you number the lines of code in your program; in Forth you name them, so you can "single-step" your program by running them one at a time. Then the ? word gives you a quick way to examine your variable values interactively, again as in a debugger. Like, here's me trying to interactively debug a square-root routine into existence in GForth on Linux:

        variable square variable guess  ok
  • BootOS operating system in 512 bytes
    3 projects | news.ycombinator.com | 27 Aug 2021
  • BootOS: A monolithic operating system in 512 bytes of x86 machine code
    1 project | news.ycombinator.com | 31 Jul 2021
  • The Kilobyte's Gambit: Can you beat 1024 bytes of JavaScript [at chess]?
    2 projects | news.ycombinator.com | 7 Mar 2021
    He also wrote bootOS, "a monolithic operating system in 512 bytes of x86 machine code."

    https://github.com/nanochess/bootOS

What are some alternatives?

When comparing sectorforth and bootOS you can also consider the following projects:

sectorlisp - Bootstrapping LISP in a Boot Sector

sunfish - Sunfish: a Python Chess Engine in 111 lines of code

porth - It's like Forth but in Python

stoneknifeforth - a tiny self-hosted Forth implementation

book8088 - Examples from my book Programming Boot Sector Games

bcc - bcc is a b compiler

colorForth - colorForth running in Bochs for Windows

bootstrap-seeds - The roots of trust for all architectures

jonesforth - Mirror of JONESFORTH

sectorc - A C Compiler that fits in the 512 byte boot sector of an x86 machine

harm-less - Inspired by suckless and cat-v, this is a simple single document wiki of suckless practices and minimal software.

live-bootstrap - Use of a Linux initramfs to fully automate the bootstrapping process