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.

Show HN: Red Squares – GitHub outages as contributions

https://red-squares.cian.lol/
253•cianmm•2h ago•52 comments

The bottleneck was never the code

https://www.thetypicalset.com/blog/thoughts-on-coding-agents
39•Anon84•2d ago•15 comments

Agents can now create Cloudflare accounts, buy domains, and deploy

https://blog.cloudflare.com/agents-stripe-projects/
416•rolph•9h ago•216 comments

Setting up a Sun Ray server on OpenIndiana Hipster 2025.10

https://catstret.ch/202605/srss-hipster202510/
19•jandeboevrie•1h ago•1 comments

StarFighter 16-Inch

https://us.starlabs.systems/pages/starfighter
426•signa11•10h ago•219 comments

CARA 2.0 – “I Built a Better Robot Dog”

https://www.aaedmusa.com/projects/cara2
232•hakonjdjohnsen•2d ago•27 comments

Cat (YC S22) Seeks Fractional Engineer to Build AI-Native Growth Toolkit

https://www.coveragecat.com/careers/engineering/fractional-growth-engineer
1•botacode•28m ago

Batteries Not Included, or Required, for These Smart Home Sensors

https://coe.gatech.edu/news/2026/04/batteries-not-included-or-required-these-smart-home-sensors
73•gnabgib•2d ago•23 comments

Knitting bullshit

https://katedaviesdesigns.com/2026/04/29/knitting-bullshit/
148•ColinEberhardt•7h ago•75 comments

Reverse-engineering the 1998 Ultima Online demo server

https://draxinar.github.io/articles/2026-05-01-uodemo-reverse-engineering.html
87•notsentient•5h ago•16 comments

DNSSEC disruption affecting .de domains – Resolved

https://status.denic.de/pages/incident/592577eab611ce1e0d00046f/69fa60ef9d12f5057a974f38
692•warpspin•16h ago•360 comments

Accelerating Gemma 4: faster inference with multi-token prediction drafters

https://blog.google/innovation-and-ai/technology/developers-tools/multi-token-prediction-gemma-4/
599•amrrs•20h ago•281 comments

Virtual violin produces realistic sounds

https://news.mit.edu/2026/mit-engineers-virtual-violin-produces-realistic-sounds-0429
19•gmays•2d ago•20 comments

YouTube, your RSS feeds are broken

https://openrss.org/blog/youtube-your-feeds-are-broken
177•veeti•11h ago•70 comments

Multi-stroke text effect in CSS

https://yuanchuan.dev/multi-stroke-text-effect-in-css
103•cheeaun•7h ago•11 comments

Wolfenstein 3D for Gameboy Color on custom cartridge (2016)

https://www.happydaze.se/wolf/
27•ksymph•1d ago•3 comments

245TB Micron 6600 ION Data Center SSD Now Shipping

https://investors.micron.com/news-releases/news-release-details/industry-leading-245tb-micron-660...
118•neilfrndes•8h ago•82 comments

Write some software, give it away for free

https://nonogra.ph/write-some-software-give-it-away-for-free-05-05-2026
292•nohell•15h ago•201 comments

Computer Use is 45x more expensive than structured APIs

https://reflex.dev/blog/computer-use-is-45x-more-expensive-than-structured-apis/
418•palashawas•19h ago•242 comments

Three Inverse Laws of AI

https://susam.net/inverse-laws-of-robotics.html
471•blenderob•21h ago•319 comments

EEVblog: The 555 Timer is 55 years old [video]

https://www.youtube.com/watch?v=6JhK8iCQuqI
297•brudgers•20h ago•78 comments

Telus Uses AI to Alter Call-Agent Accents

https://letsdatascience.com/news/telus-uses-ai-to-alter-call-agent-accents-a3868f63
169•debo_•10h ago•139 comments

Make some art with your phone sensors

https://tautme.github.io/phone-sensors/sensor-etch.html
64•adm4•2d ago•10 comments

Why most product tours get skipped

https://productonboarding.com/articles/why-product-tours-get-skipped
167•pancomplex•15h ago•142 comments

Google Chrome silently installs a 4 GB AI model on your device without consent

https://www.thatprivacyguy.com/blog/chrome-silent-nano-install/
1491•john-doe•1d ago•1004 comments

Today I've made the difficult decision to reduce the size of Coinbase by ~14%

https://twitter.com/brian_armstrong/status/2051616759145185723
397•adrianmsmith•1d ago•613 comments

Wiki Builder: Skill to Build LLM Knowledge Bases

https://academy.dair.ai/blog/wiki-builder-claude-code-plugin
74•omarsar•2d ago•10 comments

I'm scared about biological computing

https://kuber.studio/blog/Reflections/I%27m-Scared-About-Biological-Computing
236•kuberwastaken•20h ago•191 comments

Show HN: Airbyte Agents – context for agents across multiple data sources

123•mtricot•21h ago•31 comments

Behavior-Oriented Concurrency for Python

https://microsoft.github.io/bocpy/
37•mpweiher•6h ago•3 comments