frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Moving Forth: a series on writing Forth kernels

https://www.bradrodriguez.com/papers/index.html
71•todsacerdoti•9mo ago

Comments

benji-york•9mo ago
Some trivia for those who might not be aware: the tile of the series is a reference to the beloved 1981 book "Starting FORTH" which you can now read online at https://www.forth.com/wp-content/uploads/2018/01/Starting-FO...

Do yourself a favor and read a few chapters.

sitkack•9mo ago
I would also recommend "R. G. Loeliger Threaded Interpretive Languages Their Design And Implementation" between these two books the whole beauty of Forth and their implementation should just click.

Forth isn't one of those languages that you _use_. You extend the language from the inside, so you need to know how your Forth is implemented. I'd say it is the only language where users of the language could all recreate the language.

Verdex•9mo ago
Also recommending Thinking Forth by Leo Brodie. The book feels like it was written in the 2010s but the original publish date was mid 80s.
RetroTechie•9mo ago
Recently released under a CC license:

https://thinking-forth.sourceforge.net

anthk•9mo ago
Now I'd love the same with Starting Forth set to ANS Forth standards, and not just in web form. Yes, I know how to use wget --mirror and such, but I'm used to MuPDF and the editor terminal switching back and forth. No pun intended.
anthk•9mo ago
That's more for ANS Forth. PForth for instance has a block editor, but is not documented ( edit-blockfile file -- ).

I would love a Starting Forth book on PDF form but updated, as the web does.

zck•9mo ago
Writing a Forth myself, I find it somewhat frustrating that I have relatively different design restrictions than these guides. I don't need to be incredibly low-power, so I'm using C, not assembly. I'm not a great C coder, and I've never done assembly, so I find it hard (but not impossible) to learn from assembly. Also, because it's not assembly, I can't just JUMP to code the same way assembly can.

It's also frustrating trying to understand some of the lowest-level information. For example, a few systems have a very fundamental `w` variable -- but what is is used for? You can't search for it. Or just using registers and having to remember that %esi is the program counter (aka instruction pointer).

I keep wanting to make a series of diagrams to really understand Forth's program flow. It makes sense in concept, but when I go to program it, there are a lot of nuances I keep missing.

crq-yml•9mo ago
It took me a few tries(over a few years) to properly approach the task of writing a Forth, and when I approached it, I made my Forth in Lua, and all I really did was implement the wordlist in FORTH-83 as the spec indicated, and rewrite every time my model assumptions were off. No diving into assembly listings. Eventually I hit the metaprogramming words and those were where I grasped the ways in which the parser and evaluator overlap in a modal way - that aspect is the beating heart of a bootstrappable Forth system and once you have it, the rest is relatively trivial to build when starting from a high level environment.

The thing is, pretty much every modern high level language tends to feel a bit clumsy as a Forth because the emphasis of the execution model is different - under everything with an Algol-like runtime, there's a structured hierarchy of function calls with named parameters describing subprograms. Those are provisions of the compiler that automate a ton of bookkeeping and shape the direction of the code.

It's easier to see what's going on when starting from the metaphor of a line-number BASIC (as on most 8-bit micros) where program execution is still spatial in nature and there usually aren't function calls and sometimes not even structured loops, so GOTO and global temporaries are used heavily instead. That style of coding maps well to assembly, and the Forth interpreter adds just a bit of glue logic over it.

When I try to understand new systems, now, I will look for the SEE word and use that to tear things down word by word. But I still usually don't need to go down to the assembly(although some systems like GForth do print out an assembly listing if asked about their core wordset).

zck•9mo ago
I understand implementing words as you think they should be. However, you need the core first, and that's where I'm working right now. I'm trying to get the central loop, dictionary, and threading model functional.

Which brings up another complication -- the threading model. There are multiple, of course. But sometimes I want to figure out, for example, what the `w` variable does. Is it different between indirect threading and subroutine threading? Maybe!

anthk•9mo ago
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, 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.

anthk•9mo ago
Well I made a typo in the former comment; in order to run the NEW subleq.fth image, as you might guessed it's './subleq ./new.dec' .

I post this because I can't edit my comment any more.

GPT-5.4

https://openai.com/index/introducing-gpt-5-4/
652•mudkipdev•8h ago•568 comments

The next generations of Bubble Tea, Lip Gloss, and Bubbles are available now

https://charm.land/blog/v2/
116•atkrad•3h ago•42 comments

Where things stand with the Department of War

https://www.anthropic.com/news/where-stand-department-war
204•surprisetalk•2h ago•149 comments

CBP tapped into the online advertising ecosystem to track peoples’ movements

https://www.404media.co/cbp-tapped-into-the-online-advertising-ecosystem-to-track-peoples-movements/
373•ece•1d ago•156 comments

The Brand Age

https://paulgraham.com/brandage.html
238•bigwheels•9h ago•211 comments

Labor market impacts of AI: A new measure and early evidence

https://www.anthropic.com/research/labor-market-impacts
66•jjwiseman•3h ago•72 comments

10% of Firefox crashes are caused by bitflips

https://mas.to/@gabrielesvelto/116171750653898304
311•marvinborner•1d ago•169 comments

A standard protocol to handle and discard low-effort, AI-Generated pull requests

https://406.fail/
97•Muhammad523•4h ago•27 comments

Good software knows when to stop

https://ogirardot.writizzy.com/p/good-software-knows-when-to-stop
344•ssaboum•12h ago•195 comments

Wikipedia was in read-only mode following mass admin account compromise

https://www.wikimediastatus.net
893•greyface-•10h ago•311 comments

Hardware hotplug events on Linux, the gory details

https://arcanenibble.github.io/hardware-hotplug-events-on-linux-the-gory-details.html
121•todsacerdoti•3d ago•7 comments

A GitHub Issue Title Compromised 4k Developer Machines

https://grith.ai/blog/clinejection-when-your-ai-tool-installs-another
334•edf13•10h ago•78 comments

Hacking Super Mario 64 using covering spaces

https://happel.ai/posts/covering-spaces-geometries-visualized/
10•nill0•3d ago•0 comments

A ternary plot of citrus geneology

https://www.jlauf.com/writing/citrus/
96•jlauf•2d ago•10 comments

Show HN: Jido 2.0, Elixir Agent Framework

https://jido.run/blog/jido-2-0-is-here
251•mikehostetler•11h ago•55 comments

Stop Using Grey Text (2025)

https://catskull.net/stop-using-grey-text.html
13•catskull•3h ago•4 comments

Remotely unlocking an encrypted hard disk

https://jyn.dev/remotely-unlocking-an-encrypted-hard-disk/
93•janandonly•8h ago•51 comments

Structured AI (YC F25) Is Hiring

https://www.ycombinator.com/companies/structured-ai/jobs/3cQY6Cu-mechanical-design-engineer-found...
1•issygreenslade•5h ago

Judge orders government to begin refunding more than $130B in tariffs

https://www.wsj.com/politics/policy/judge-orders-government-to-begin-refunding-more-than-130-bill...
815•JumpCrisscross•12h ago•610 comments

GLiNER2: Unified Schema-Based Information Extraction

https://github.com/fastino-ai/GLiNER2
42•apwheele•6h ago•3 comments

Proton Mail Helped FBI Unmask Anonymous 'Stop Cop City' Protester

https://www.404media.co/proton-mail-helped-fbi-unmask-anonymous-stop-cop-city-protestor/
232•sedatk•5h ago•117 comments

AI and the Ship of Theseus

https://lucumr.pocoo.org/2026/3/5/theseus/
60•pixelmonkey•11h ago•67 comments

Ethiopia gets $350M World Bank financing for its digital ID project (2024)

https://www.mariblock.com/stories/ethiopia-to-get-350-million-world-bank-financing-for-its-digita...
32•tinfoilhatter•5h ago•22 comments

Converting dash cam videos into Panoramax images

https://www.openstreetmap.org/user/FeetAndInches/diary/408268
34•marklit•3d ago•6 comments

OpenTitan Shipping in Production

https://opensource.googleblog.com/2026/03/opentitan-shipping-in-production.html
85•rayhaanj•8h ago•10 comments

Let's Get Physical

https://m4iler.cloud/posts/lets-get-physical/
105•MBCook•7h ago•15 comments

How to install and start using LineageOS on your phone

https://lockywolf.net/2026-02-19_How-to-install-and-start-using-LineageOS-on-your-phone.d/index.html
8•todsacerdoti•2h ago•0 comments

Launch HN: Vela (YC W26) – AI for complex scheduling

36•Gobhanu•9h ago•37 comments

Optimizing Recommendation Systems with JDK's Vector API

https://netflixtechblog.com/optimizing-recommendation-systems-with-jdks-vector-api-30d2830401ec
68•mariuz•2d ago•4 comments

Greg Kroah-Hartman Stretches Support Periods for Key Linux LTS Kernels

https://fossforce.com/2026/03/greg-kroah-hartman-stretches-support-periods-for-key-linux-lts-kern...
67•brideoflinux•3d ago•21 comments