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•11mo ago

Comments

benji-york•11mo 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•11mo 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•11mo 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•11mo ago
Recently released under a CC license:

https://thinking-forth.sourceforge.net

anthk•11mo 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•11mo 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•11mo 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•11mo 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•11mo 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•11mo 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•11mo 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.

RaTeX: KaTeX-compatible LaTeX rendering engine in pure Rust

https://ratex.lites.dev/
49•atilimcetin•2d ago•17 comments

Valve releases Steam Controller CAD files under Creative Commons license

https://www.digitalfoundry.net/news/2026/05/valve-releases-steam-controller-cad-files-under-creat...
1589•haunter•22h ago•524 comments

Indian matchbox labels as a visual archive

https://www.itsnicethat.com/features/the-view-from-mumbai-matchbook-graphic-design-130426
57•sahar_builds•3d ago•17 comments

Boris Cherny: TI-83 Plus Basic Programming Tutorial (2004)

https://www.ticalc.org/programming/columns/83plus-bas/cherny/
94•suoken•2d ago•40 comments

Agent-harness-kit scaffolding for multi-agent workflows (MCP, provider-agnostic)

https://ahk.cardor.dev
43•enmanuelmag•3h ago•8 comments

Grand Theft Oil Futures: Insider traders keep making a killing at our expense

https://paulkrugman.substack.com/p/grand-theft-oil-futures
196•Qem•2h ago•134 comments

Cloudflare responded to the "Copy Fail" Linux vulnerability

https://blog.cloudflare.com/copy-fail-linux-vulnerability-mitigation/
7•mobeigi•43m ago•3 comments

SQLite Is a Library of Congress Recommended Storage Format

https://sqlite.org/locrsf.html
418•whatisabcdefgh•16h ago•127 comments

Appearing productive in the workplace

https://nooneshappy.com/article/appearing-productive-in-the-workplace/
1373•diebillionaires•21h ago•549 comments

GovernGPT (YC W24) Is Hiring Engineers to Build Thinking Systems in Montreal

https://www.ycombinator.com/companies/governgpt/jobs/hRyltS0-backend-engineer-thinking-systems
1•owalerys•2h ago

Permacomputing Principles

https://permacomputing.net/principles/
200•andsoitis•11h ago•104 comments

The brave souls who bought a used, 340k-mile rental camper van

https://www.thedrive.com/news/meet-the-brave-souls-who-bought-a-used-340000-mile-rental-camper-van
39•PaulHoule•1d ago•23 comments

LinkedIn profile visitor lists belong to the people, says Noyb

https://www.theregister.com/offbeat/2026/05/05/noyb-cries-foul-on-linkedin-withholding-profile-vi...
101•robin_reala•3h ago•54 comments

Diskless Linux boot using ZFS, iSCSI and PXE

https://aniket.foo/posts/20260505-netboot/
131•stereo-highway•10h ago•71 comments

SingleRide: Longest route on NYC Subway without visiting the same station twice

https://singleride.nyc/
50•TMWNN•1d ago•20 comments

Chevrolet Performance eCrate package (400v/200hp)

https://www.chevrolet.com/performance-parts/crate-engines/ecrate
96•mindcrime•2d ago•68 comments

Vibe coding and agentic engineering are getting closer than I'd like

https://simonwillison.net/2026/May/6/vibe-coding-and-agentic-engineering/
669•e12e•23h ago•750 comments

Photoshop's challenges with focus, pt. 2

https://unsung.aresluna.org/photoshops-challenges-with-focus-pt-2/
88•frizlab•2d ago•35 comments

RSS feeds send me more traffic than Google

https://shkspr.mobi/blog/2026/05/rss-feeds-send-me-more-traffic-than-google/
180•SpyCoder77•13h ago•40 comments

ProgramBench: Can Language Models Rebuild Programs from Scratch?

https://arxiv.org/abs/2605.03546
92•jonbaer•10h ago•54 comments

The mechanical latching memory of an adhesive tape

https://iopscience.iop.org/article/10.1088/1367-2630/ae4acc
3•gnabgib•1d ago•0 comments

Show HN: Trust – Coding Rust like it's 1989

https://github.com/wojtczyk/trust
64•wojtczyk•8h ago•34 comments

Google Cloud fraud defense, the next evolution of reCAPTCHA

https://cloud.google.com/blog/products/identity-security/introducing-google-cloud-fraud-defense-t...
346•unforgivenpasta•20h ago•362 comments

Show HN: Agent-skills-eval – Test whether Agent Skills improve outputs

https://github.com/darkrishabh/agent-skills-eval
40•darkrishabh•7h ago•16 comments

Making LLM Training Faster with Unsloth and NVIDIA

https://unsloth.ai/blog/nvidia-collab
84•segmenta•6h ago•12 comments

From Supabase to Clerk to Better Auth

https://blog.val.town/better-auth
273•stevekrouse•20h ago•204 comments

Pen pal programs endure in a digital age

https://apnews.com/article/pen-pals-letters-comeback-bc87e1b9c229665bafd368e19751d6ca
69•petethomas•1d ago•15 comments

The Upper Middle Class Trap

https://ofdollarsanddata.com/the-upper-middle-class-trap/
17•speckx•2h ago•7 comments

Community firmware for the Xteink X4 e-paper reader

https://github.com/crosspoint-reader/crosspoint-reader
131•dmos62•2d ago•47 comments

Show HN: Hallucinopedia

http://halupedia.com/
262•bstrama•21h ago•231 comments