Giao diện
TeguNews
Công nghệ

Teaching Kids Forth – Anna Liberty

Article URL: https://gracefulliberty.com/articles/teaching-kids-forth/ Comments URL: https://news.ycombinator.com/item?id=49062700 Points: 5 # Comments: 0

Hacker News4 phút đọc

2026-04-14 · 11 min · #computing Forth is uncommonly used to teach programming to kids. Scripting languages like Python and visual environments like Scratch are far more popular options. But when I got the opportunity to introduce middle and high school students to programming, I chose the stack-oriented concatenative language from 1970.

I was ecstatic about this opportunity. I'm passionate about giving people just a bit more control over the potential locked up in the devices they carry with them every day. When people know more about computers in general and about making their own software in particular, whole worlds open up.

This gave me the chance to pry the door to that world open for people who likely would have never discovered it otherwise. While I had taught people programming to individuals previously, this was my first experience teaching in a classroom environment. I went from knowing next to nothing about teaching to designing my own curriculum, including lesson plans, curriculum, and a digital learning environment.

I could have chose to teach any programming language. I could have chosen Python or Scratch, but I wanted to explore a path less commonly chosen and maybe find some gems that are otherwise overlooked. Because of the limited amount of time I had to teach, and the fact that I wanted to teach more fundamental concepts, I wanted to avoid teaching syntax.

While Python makes sense as pseudocode to someone who understands what code is, it is still nearly incomprehensible to new learners, which I discovered in previous years teaching programming one-on-one. I decided I wanted to either teach Forth or Haskell. Forth was appealing because it's a concatenative language.

You write the instructions and it simply executes everything in order. As long as you understand what a stack is you can write Forth programs. Haskell was appealing because it integrates well with how students are already taught about how to think about variables and functions in mathematics.

I've seen too many new programmers get confused that in programming variables are boxes that can contain any value instead of the algebraic definitions they've learned in math class. I ended up choosing Forth for two reasons. First, it was easier to integrate into a custom learning environment I could prepare for the students.

Second, I figured procedural programming would be easier to conceptualize than functional programming for the in-class final demo. As a side benefit, the use of a semi-obscure language like Forth ensured that even students who did programming before would learn something from the experience without alienating new learners. When designing the cirriculum, I knew I would be pressed for time.

I had 12 sessions, once per week, each one hour long. I also knew it wasn't likely they were going to complete much homework if I had assigned it considering they had lives outside of my class. The tangible learning outcome was for students to create their own art in the Forth environment.

This could be anything from a simple drawing to an animation to a game. I wanted them to have something they could see and keep with them after the course had ended. It can be discouraging to learn a lot of technical details on a topic and feel like you had little to show for it.

It was important that the students could run the code the wrote on their own computers. It was doubly important that they didn't have to download or install anything for it to work, since students could be using a variety of operating systems—some of which may not be capable of installing third party software. My first choice for our learning environment involved writing my own Forth from scratch in Rust and embedding it in our course website with WASM.

Unfortunately, ironing out the bugs in my implementation took longer than I intended. So I switched gears and chose to use Nick Morgan's Easy Forth as both our cirriculum and Forth interpreter. For each lesson, I created slides and a lesson plan which I uploaded to an online portal which the students could access.

This included a copy of Easy Forth. It was then time to start going over the actual lessons with the students. I plugged my laptop into the large TV to display my slides and began the introductory lecture.

We started by going over the history of computing and what a computer is. One of my favorite parts was showing them various devices and asking them if they were computers. They were initially perplexed when I showed them an abacus and told them it was a computer.

Our working definition was, "Anything that calculates numbers." They soon realized that almost anything could be a computer, including themselves! This is a computer!

After breaking their idea of what a computer could be and setting their expectations, I began to teach them about Forth in particular. I explained the places it's used and its embedded applications. Once the fundamentals were down, the next step was to move to our cirriculum and dive into

Nguồn: Hacker News

Đọc thêm từ Công nghệ

Hackaday Links: July 26, 2026
Công nghệ

Hackaday Links: July 26, 2026

At a time when so-called “artificial intelligence” seems inescapable, we were encouraged to see news that Amazon will be cracking down on third-party sellers that use AI-generated images for their …read more

Hackaday (Deep Tech)