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

Comments

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

https://thinking-forth.sourceforge.net

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

Artemis II crew take 'spectacular' image of Earth

https://www.bbc.com/news/articles/ce8jzr423p9o
242•andsoitis•2h ago•113 comments

iNaturalist

https://www.inaturalist.org/
279•bookofjoe•4h ago•80 comments

What changes when you turn a Linux box into a router

https://patrickmccanna.net/7-configuration-changes-that-turn-a-multi-homed-host-into-a-switch-rou...
45•0o_MrPatrick_o0•3d ago•4 comments

Show HN: I built a frontpage for personal blogs

https://text.blogosphere.app/
589•ramkarthikk•9h ago•164 comments

Oracle Files H-1B Visa Petitions Amid Mass Layoffs

https://nationaltoday.com/us/tx/austin/news/2026/04/03/oracle-files-thousands-of-h-1b-visa-petiti...
179•kklisura•1h ago•90 comments

We replaced RAG with a virtual filesystem for our AI documentation assistant

https://www.mintlify.com/blog/how-we-built-a-virtual-filesystem-for-our-assistant
165•denssumesh•1d ago•85 comments

Go on Embedded Systems and WebAssembly

https://tinygo.org/
98•uticus•5h ago•14 comments

Charge Robotics (YC S21) Is Hiring Software and Hardware Engineers

https://jobs.ashbyhq.com/charge-robotics
1•banks_h•45m ago

How to Make a Sliding, Self-Locking, and Predator-Proof Chicken Coop Door (2020)

https://www.backyardchickens.com/articles/how-to-make-a-sliding-self-locking-and-predator-proof-c...
51•uticus•3h ago•19 comments

Show HN: TinyOS – A minimalist RTOS for Cortex-M written in C

https://github.com/cmc-labo/tinyos-rtos
4•hpscript•20m ago•1 comments

Samsung Magician disk utility takes 18 steps and two reboots to uninstall

https://chalmovsky.com/2026/03/29/samsung-magician.html
368•chalmovsky•5d ago•209 comments

Automatic Textbook Formalization

https://github.com/facebookresearch/repoprover
16•tzury•1h ago•5 comments

Async Python Is Secretly Deterministic

https://www.dbos.dev/blog/async-python-is-secretly-deterministic
39•KraftyOne•3h ago•21 comments

F-15E jet shot down over Iran

https://www.theguardian.com/world/2026/apr/03/us-fighter-jet-confirmed-shot-down-over-iran
259•tjwds•6h ago•614 comments

Show HN: Ismcpdead.com – Live dashboard tracking MCP adoption and sentiment

https://ismcpdead.com
17•sagirodin•2h ago•8 comments

Build your own Dial-up ISP with a Raspberry Pi

https://www.jeffgeerling.com/blog/2026/build-your-own-dial-up-isp-with-a-raspberry-pi/
77•arjunbajaj•6h ago•17 comments

April 2026 TLDR Setup for Ollama and Gemma 4 26B on a Mac mini

https://gist.github.com/greenstevester/fc49b4e60a4fef9effc79066c1033ae5
275•greenstevester•12h ago•109 comments

Iran Strikes Leave Amazon Availability Zones "Hard Down" in Bahrain and Dubai

https://www.bigtechnology.com/p/iran-strikes-leave-amazon-availability
27•upofadown•41m ago•5 comments

Show HN: TurboQuant for vector search – 2-4 bit compression

https://github.com/RyanCodrai/py-turboquant
79•justsomeguy1996•5d ago•5 comments

SSH certificates: the better SSH experience

https://jpmens.net/2026/04/03/ssh-certificates-the-better-ssh-experience/
187•jandeboevrie•12h ago•77 comments

Firm boosts H.264 streaming license fees from $100k up to staggering $4.5M

https://www.tomshardware.com/service-providers/streaming/h264-streaming-license-fees-jump-from-10...
100•MaximilianEmel•3h ago•49 comments

DCJ11Hack+ – DEC PDP/11 based homebrew computer

https://codeberg.org/TechPaula/DCJ11HackPlus
5•zdw•3d ago•0 comments

A Recipe for Steganogravy

https://theo.lol/python/ai/steganography/seo/recipes/2026/03/27/a-recipe-for-steganogravy.html
127•tbrockman•5d ago•29 comments

Update on the eBay Scam

https://kevquirk.com/update-on-the-ebay-scam
23•speckx•3h ago•28 comments

What Category Theory Teaches Us About DataFrames

https://mchav.github.io/what-category-theory-teaches-us-about-dataframes/
169•mchav•5d ago•57 comments

ESP32-S31: Dual-Core RISC-V SoC with Wi-Fi 6, Bluetooth 5.4, and Advanced HMI

https://www.espressif.com/en/news/ESP32_S31_Release
189•topspin•5d ago•106 comments

Show HN: Apfel – The free AI already on your Mac

https://apfel.franzai.com
624•franze•12h ago•136 comments

You can now run a full Linux operating system inside a 6mb PDF

https://twitter.com/oliviscusAI/status/2038563166431346865
63•matthewsinclair•3d ago•14 comments

PIGuard: Prompt Injection Guardrail via Mitigating Overdefense for Free

https://injecguard.github.io/
7•mettamage•2h ago•2 comments

Category Theory Illustrated – Types

https://abuseofnotation.github.io/category-theory-illustrated/06_type/
82•boris_m•12h ago•14 comments