third VS foth

Compare third vs foth and see what are their differences.

third

Third, a small Forth compiler for 8086 DOS (by benhoyt)
Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
third foth
3 9
72 70
- -
0.0 5.1
over 8 years ago 2 months ago
Forth Go
BSD 3-clause "New" or "Revised" License GNU General Public License v3.0 only
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

third

Posts with mentions or reviews of third. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-07-16.
  • Forth: The programming language that writes itself: The Web Page
    7 projects | news.ycombinator.com | 16 Jul 2023
    My first programming languages were x86 assembly and Forth. My Dad was into Forth, and I learned programming from him. I wrote several x86 Forth systems for DOS as a teenager, culminating in a somewhat-polished ANS compatible one I called "Third": https://github.com/benhoyt/third -- it's kind of amazing being able to have a fully bootstrapped Forth compiler (including an assembler) in a couple thousand lines of code.

    Just the other day I transcribed an old article I had co-written for the Forth Dimensions magazine. I still like the ideas in Forth, but the stack manipulation quickly gets tedious and is very hard to read. Just look at the code examples in https://benhoyt.com/writings/forth-lookup-tables/ -- especially Search-Table. Yikes! Yes, naming things is hard, but apparently not naming them is even harder.

  • Lookup Tables: article I co-authored for “Forth Dimensions” as a teen
    1 project | news.ycombinator.com | 1 Jul 2023
    I just finished transcribing this from the scanned PDF, and thought it might be interesting to others. It certainly took me back! I was really into Forth as a teenager, and wrote several of my own Forth compilers [1]. It's a unique and interesting language, though most Forthers spend too much time writing their own compilers and being language zealots instead of getting things done. It's hard to believe anyone could think the Search-Table code in "Figure Five" is sane. There's more stack-effect tracking than code!

    [1] For example, "Third", a 16-bit self-hosting Forth compiler for DOS: https://github.com/benhoyt/third

  • Byte Magazine: The FORTH programming language
    7 projects | news.ycombinator.com | 16 Jul 2022
    My dad, who was a minister by day and Forth hacker by night, got me into programming when I was a teenager, and Forth and x86 assembly were my first languages. I wrote a small self-hosting Forth compiler for 8086 DOS (https://github.com/benhoyt/third), a tiny 32-bit Forth operating system for the 386 (I guess you'd call it "bare metal" today). Incidentally, my brother used my Third compiler at his work for a few years to write test scripts for embedded systems.

    I still love the simplicity of Forth, and the fact that you can get a full Forth system going in a few KB on a new microcontroller. I learned the basics of assemblers, bootstrapped compilers (though not parsers, because Forth doesn't need a "real" parser), recursion, how to implement control structures, various kinds of bytecode (called "threaded code" in the Forth world), linked lists, hash tables, and so on. I also dislike 3rd party dependencies to this day (Forth has a pretty extreme not-invented here culture).

    I was really intrigued by Factor when it came out (https://factorcode.org/), as a modern incarnation of Forth, but I never really used it. By that point I had a "real" programming job and was doing absurd things like writing CGI scripts in C, until I discovered Python in the early 2000's. I stuck with Python for many years and really liked it, though more recently I've moved to Go.

    I learned a lot by playing with Forth as a teenager, and I'm really grateful for the language. It was an amazing way to start programming.

foth

Posts with mentions or reviews of foth. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-07-16.
  • Show HN: Writing a simple FORTH-like system, in simple steps
    1 project | news.ycombinator.com | 15 Feb 2024
  • Show HN: Implementing a simple FORTH, inspired by a Hacker News thread
    1 project | news.ycombinator.com | 19 Sep 2022
  • Byte Magazine: The FORTH programming language
    7 projects | news.ycombinator.com | 16 Jul 2022
    I hacked up a simple forth-like system in golang, by following the overview posted in this hackernews comment-chain:

    https://news.ycombinator.com/item?id=13082825

    The result is here:

    https://github.com/skx/foth

    It's not real, but it was a pretty fun experiment regardless.

  • Jonesforth – A sometimes minimal FORTH compiler and tutorial (2007)
    11 projects | news.ycombinator.com | 13 May 2022
    Here's one of the many forks that brings it up to 64-bit:

    https://github.com/matematikaadit/jombloforth

    If you like forth there's an awesome series of comments here on hacker news on building a simple variant in a few simple steps:

    https://news.ycombinator.com/item?id=13082825

    I took that, and built a simple forth-like system, in golang following the original recipe and breaking it down into simple steps for learning-purposes:

    https://github.com/skx/foth

  • Forth control flow execution steps.
    2 projects | /r/Forth | 10 Mar 2022
  • ColorForth (2009)
    1 project | news.ycombinator.com | 31 Oct 2021
    I'll always vote up submissions referencing anything FORTH related. For me FORTH is as much fun as lisp appears to be for others. I've never really done much with it, but I always like the simplicity and the ability to reason about it.

    Sure FORTH has problems of its own, but it's always nice to use. I've hacked up a couple of simple FORTH-like systems over the years, most recently this one which was inspired by a thread on this site:

    https://github.com/skx/foth

    A lot of people go through guides of writing a lisp, I'd love to urge people to try writing a simple FORTH interpreter instead, or even something somewhat related such as TCL.

  • Lang Jam: create a programming language in a weekend
    5 projects | news.ycombinator.com | 31 Jul 2021
    There's even a recipe posted in a couple of comments here:

    https://news.ycombinator.com/item?id=13082825

    I followed that guide to implement a simple FORTH-like system in golang:

    https://github.com/skx/foth

    As I was following the implementation recipe I broke it down into "educational steps". Although it isn't a true FORTH it is pretty easy to understand and useful enough to embed inside other applications.

    Now and again I consider doing it again, but using a real return-stack to remove the hardcoded control-flow words from the interpreter, but I never quite find the time.

  • Tutorial-style FORTH implementation written in Golang
    1 project | news.ycombinator.com | 11 Feb 2021
  • Wisp: A light Lisp written in C++
    10 projects | news.ycombinator.com | 28 Dec 2020
    I actually hacked up a simple forth-like system, after reading a brief howto here on hackernews:

    https://github.com/skx/foth/

    Here's the thread which has the barebones overview which inspired me:

    https://news.ycombinator.com/item?id=13082825

    I could have taken it further, but the implementation there is not "real" in the sense that there is no real return-stack, so you can't implement IF-statements using the lower-level primitives.

    That said it is a good starting point, and I had some fun doing it. I'd guesstimate it is more of a single weekend project though, rather than longer.

What are some alternatives?

When comparing third and foth you can also consider the following projects:

MiniForth - A tiny Forth I built in a week. Blog post: https://www.thanassis.space/miniforth.html

wisp - A little Clojure-like LISP in JavaScript

r216-forth - A Forth implementation for the R216K8B Powder Toy computer.

rustc_codegen_cranelift - Cranelift based backend for rustc

sightreading.training - 🎹 Sight reading training tool

cling - The cling C++ interpreter

jonesforth - Mirror of JONESFORTH

sectorlisp - Bootstrapping LISP in a Boot Sector

goforth - A fully compiled and forth-like language including a small virtual machine.

factor - Factor programming language

collapseos - Bootstrap post-collapse technology

zForth - zForth: tiny, embeddable, flexible, compact Forth scripting language for embedded systems