1. 29
    1. 5

      I use Retro a lot. Especially for writing programs like one might use Perl or something, short but not short enough for a oneliner, or as a supplementary tool. The programs packaged with it are also intermittently useful, unu actually being really great. The Freenode channel #retro is dead quiet but the developer (crc) is always around. This is the other homepage.

      1. 4

        Do you have any examples of the programs you write in retro?

        I’ll I’ve played with it a lot, I haven’t written anything “useful” as of yet and would like to start doing so.

        1. 3

          I would like to see some real-world examples too.

    2. 4

      It’s already packaged for some operating systems: https://repology.org/project/retro12/versions

    3. 4

      Retro is not a standard Forth, but I feel that it is the best starting point for anyone who wants to get started with Forth. It is simpler for modern programmers to grasp than older more traditional Forths. It is incredibly well documented also.

      1. 4

        cc @banana_oatmeal

        Could you describe some ways that Retro differs from other Forths?

        1. 6

          Not in any particular order, and certainly not complete, but:

          • portability: Retro runs on a tiny, easy to implement virtual machine, which allows any non-host dependent code to work across systems. As such, it runs on bare x86 hardware, or under an
          • uses a somewhat literate source format with code blocks, test blocks, and commentary, typically written in a Markdown subset
          • the language uses prefixes/sigils to denote actions for tokens (similar to colors in colorforth)
          • word behaviour at compile/interpret time grouped into classes (an idea borrowed from helforth)
          • more packaged data structures (arrays, strings, etc) in the core language
          • flat namespace, using short prefixes to group related words
          • extensive use of quotations and combinators
          • no forward parsing of input stream
          • it’s used daily for a variety of real-world, non-embedded, tasks (I use Retro to implement significant parts of a browser-based application my employer uses for order management, in addition to running tools written in it for many of my own purposes)
          • documentation: I find most Forths to be lacking on this front, so I try to provide useful documentation, and work to continually improve on it based on feedback I receive.
          1. 2

            You should consider applying for a hat

        2. 3

          The big differences are:

          • There are no only a few “immediate” words, a concept which can be confusing to newcomers
          • There are no “parsing words”, words that operate on the entire buffer of text input. You can do some cool stuff with parsing words, but I always felt like it was too much power and made it hard to read other people’s code.
          • Forth and Retro are both untyped (not to be confused with dynamically typed), which is a big change for most newcomers. In Retro, you get more syntax than a normal Forth for dealing with different types of data. In regular Forth, everything is either a number or a dictionary entry. Retro adds “word classes” so that numbers start with #, strings start with ', chars start with $, etc…
          • Retro does not have the historic baggage that Forth might have, since Forth was invented in 1969. A lot of Forth systems will still make reference to things like “blocks”. Although a lot of devs like working with blocks, I feel like they are just a remnant of the past, given that few people work on machines that have decent filesystem support in 2021.
          • Retro also uses quotations in a way that is different than traditional Forths, though I do believe quotations were added to Forth in the last 10 years.

          I write more Retro than Forth. No hard feelings if someone reading this wants to fact check me.

          1. 6

            A minor correction: there are immediate words, but very few.

            In the core language:

            hook } { ) ( again repeat ] [ ; 0; pop push

            And I flag the prefix handlers as immediate as well.

            1. 2

              Thanks for the fact-check, Charles!

          2. 3

            Thank you!

    4. 2

      I’ve played with retro quite a bit! It is a little different from other forths, but I love how it treats literate programs as first-class-citizens.