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

Comments

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

https://thinking-forth.sourceforge.net

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

Heathrow scraps liquid container limit

https://www.bbc.com/news/articles/c1evvx89559o
75•robotsliketea•3d ago•135 comments

The hidden engineering of runways

https://practical.engineering/blog/2026/1/20/the-hidden-engineering-of-runways
240•crescit_eundo•6d ago•64 comments

ChatGPT Containers can now run bash, pip/npm install packages and download files

https://simonwillison.net/2026/Jan/26/chatgpt-containers/
259•simonw•10h ago•209 comments

Apple introduces new AirTag with longer range and improved findability

https://www.apple.com/newsroom/2026/01/apple-introduces-new-airtag-with-expanded-range-and-improv...
357•meetpateltech•16h ago•455 comments

There is an AI code review bubble

https://www.greptile.com/blog/ai-code-review-bubble
215•dakshgupta•14h ago•153 comments

People who know the formula for WD-40

https://www.wsj.com/business/the-secret-society-of-people-who-know-the-formula-for-wd-40-e9c0ff54
120•fortran77•9h ago•200 comments

Dithering – Part 2: The Ordered Dithering

https://visualrambling.space/dithering-part-2/
157•ChrisArchitect•10h ago•19 comments

Windows 11's Patch Tuesday nightmare gets worse

https://www.windowscentral.com/microsoft/windows-11/windows-11s-botched-patch-tuesday-update-nigh...
220•01-_-•15h ago•161 comments

JuiceSSH – Give me my pro features back

https://nproject.io/blog/juicessh-give-me-back-my-pro-features/
259•jandeboevrie•12h ago•120 comments

RIP Low-Code 2014-2025

https://www.zackliscio.com/posts/rip-low-code-2014-2025/
188•zackliscio•14h ago•81 comments

Model Market Fit

https://www.nicolasbustamante.com/p/model-market-fit
31•nbstme•6d ago•6 comments

AI code and software craft

https://alexwennerberg.com/blog/2026-01-25-slop.html
120•alexwennerberg•12h ago•76 comments

Show HN: TetrisBench – Gemini Flash reaches 66% win rate on Tetris against Opus

https://tetrisbench.com/tetrisbench/
88•ykhli•11h ago•34 comments

Television is 100 years old today

https://diamondgeezer.blogspot.com/2026/01/tv100.html
563•qassiov•15h ago•197 comments

France Aiming to Replace Zoom, Google Meet, Microsoft Teams, etc.

https://twitter.com/lellouchenico/status/2015775970330882319
621•bwb•13h ago•500 comments

New York Times games are hard: A computational perspective

https://arxiv.org/abs/2509.10846
4•PaulHoule•4d ago•1 comments

A list of fun destinations for telnet

https://telnet.org/htm/places.htm
8•tokyobreakfast•2h ago•4 comments

Porting 100k lines from TypeScript to Rust using Claude Code in a month

https://blog.vjeux.com/2026/analysis/porting-100k-lines-from-typescript-to-rust-using-claude-code...
181•ibobev•16h ago•122 comments

The Adolescence of Technology

https://www.darioamodei.com/essay/the-adolescence-of-technology
164•jasondavies•13h ago•114 comments

San Francisco Graffiti

https://walzr.com/sf-graffiti
163•walz•20h ago•181 comments

Qwen3-Max-Thinking

https://qwen.ai/blog?id=qwen3-max-thinking
437•vinhnx•14h ago•396 comments

Fedora Asahi Remix is now working on Apple M3

https://bsky.app/profile/did:plc:okydh7e54e2nok65kjxdklvd/post/3mdd55paffk2o
473•todsacerdoti•12h ago•173 comments

Pharos: The Lighthouse at Alexandria

https://penelope.uchicago.edu/encyclopaedia_romana/greece/paganism/pharos.html
32•teleforce•6d ago•6 comments

Visualizing the Collatz Conjecture as a Phase Transition

https://mathinspector.com/papers/collatz-polynomial-entropy.html
7•calhoun137•4d ago•1 comments

I let ChatGPT analyze a decade of my Apple Watch data, then I called my doctor

https://www.msn.com/en-us/news/technology/i-let-chatgpt-analyze-a-decade-of-my-apple-watch-data-t...
52•zdw•7h ago•71 comments

After two years of vibecoding, I'm back to writing by hand

https://atmoio.substack.com/p/after-two-years-of-vibecoding-im
718•mobitar•16h ago•532 comments

Over 36,500 killed in Iran's deadliest massacre, documents reveal

https://www.iranintl.com/en/202601255198
312•mhb•1d ago•169 comments

iPhone 5s Gets New Software Update 13 Years After Launch

https://www.macrumors.com/2026/01/26/iphone-5s-software-update/
96•angott•5h ago•30 comments

Show HN: Only 1 LLM can fly a drone

https://github.com/kxzk/snapbench
152•beigebrucewayne•19h ago•83 comments

Google AI Overviews cite YouTube more than any medical site for health queries

https://www.theguardian.com/technology/2026/jan/24/google-ai-overviews-youtube-medical-citations-...
377•bookofjoe•15h ago•200 comments