HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
howerj
subleq
Forth2023–2026
howerj / subleq

subleq

16-bit SUBLEQ CPU running eForth - just for fun

3Distinct people
11Mentions
1Explicit recommenders
83GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

16-bit SUBLEQ CPU running eForth - just for fun

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

I love both Forth and Lisp but SectorLisp it's far better. Also, for a small demo, check Eforth under Subleq/Muxleq: https://github.com/howerj/subleq edit subleq.fth/muxleq.fth…

anthk used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 9–Nov 16 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/16/2026, 1:56:48 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year11 dated mentions

Observed mentions: 2023-01-02 05:11:37 UTC to 2026-08-20 12:09:33 UTC.

0123452023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments20232024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20242025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC110
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC202
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC505
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC303

What Hacker News says

5 sources
The easiest example: an interpreter for the Subleq VM. One instruction. Literal three or four lines, three more (if any) for I/O. https://github.com/howerj/subleq/ As a goodie you can run Eforth on top which almost writtes itself. Compiler, interpreter, editor, IDE and a Sokoban, all in a simple VM. Let's scale. Mu808/n808. Interpreters in C and AWK, a compiler in Python. https://codeberg.org/luxferre/n808 You have the exact assembly algorithm in the page. What you see it's what you get. Now, for real, I'd suggest getting lvltl (VTL-02) interpreter written in C for a "bigger" language running not just under a VM, but for small machines and simulators such as the 6502 based Kim-1 and Apple1. With that "not enough to be called Basic" a Sokoban might be written with a bit of patience.
In Revisiting "Let's Build a Compiler"
This is fun too https://github.com/howerj/subleq/ but you might need to edit subleq.fth and create a new image with some of the constants named opt.* settings set to 1 (enabled) in order to enable do...loop support and such. After you enabled them, try ./sublec ./sublrec.dec < ./sublec.fth > new.dec, wait a lot, and then run ./subleq sublec.dec . In order to save lots of time, clone the muxleq repo https://github.com/howerj/muxleq , edit muxleq.fth as always, and then run ./muxleq ./muxlec.dec < muxlec.fth > new.dec, and ./muxlec ./new.dec to run the new DEC EForth image. Is not especially fast but it's a ready to run Forth and the Subleq machine can be compiled even under Windows XP and up with Min-C or any bundled C compiled on GNU/Linux BSD, from cproc to tcc, gcc or clang. If some of your code runs fast under Muxleq+EForth,
Read the rest
it will fly under PForth and GForth. https://minc.commandlinerevolution.nl/english/home.html The speeds I get under an n270 atom with Muxleq are almost like a Forth machine under a boosted up 8 bit machine, kinda like an 8MHZ z80 with a native Forth, or a very low end M68k machine.
In Moving Forth: a series on writing Forth kernels
True. pas.f in Forth : .r u.r ; : position ( row -- ) cr 33 swap 2 * - spaces ; : pas ( 0 ... 0 -- 0 ... 0 ) 0 >r begin over + >r dup 0= until begin r> dup while dup 4 .r repeat ; : pass ( -- ) 0 1 0 18 0 ?do dup position >r pas r> 1+ loop drop ; : pax ( 0 ... 0 -- ) drop begin 0= until ; : pascal ( -- ) pass pax ; pascal cr The same mod2: : .r u.r ; : position ( row -- ) cr 33 swap 2 * - spaces ; : pas ( 0 ... 0 -- 0 ... 0 ) 0 >r begin over + >r dup 0= until begin r> dup while dup 2 mod 4 .r repeat ; : pass ( -- ) 0 1 0 18 0 ?do dup position >r pas r> 1+ loop drop ; : pax ( 0 ... 0 -- ) drop begin 0= until ; : pascal ( -- ) pass pax ; pascal cr A Forth for people in a hurry: git
Read the rest
clone https://github.com/howerj/subleq cd subleq sed -i 's,0 constant opt.control,1 constant opt.control,g' subleq.fth gmake subleq ./subleq subleq.dec < subleq.fth > new.dec ./subleq new.dec < pas.f
In Sierpiński Triangle? In My Bitwise and?

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.