fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

9.8K
active users

#forth

6 posts6 participants0 posts today

I know it's going to ruin me for every other programming language, and possibly make me unemployable, but I've got some time-off next week and I'm going to spend some of it learning more about #forth

I created a command line note taking tool called ffff. It started as a mere one liner:

# ffff note paris is magical
b6660fc8-783c-441b-9612-6706ec56a807

Then:

# ffff note paris is magical and pricey
15832645-98ec-4595-a8c1-ffebd007b19c

And forth:

# ffff note may the forth be with you
7c84dc9c-bf32-4531-a16f-4e9fe60e3444

There is a search engine that allows to query notes two ways:

# ffff question paris is ?
paris is magical

or

# ffff question is ...
paris is magical
paris is magical and pricey

Also, it is possible to play notes that are #forth-like:

# ffff play 40 2 +
42

Or store that as a note, and play it:

# ffff play $(ffff note 40 2 +)

The code is boring af, but here it is: git.afpy.org/amirouche/ffff/sr

Summary card of repository amirouche/ffff
La forge de l'AFPyffff/ffff.py at mainffff

Charles Moore, creator of #FORTH, has spoken of an ultra minimal OS he made, called OK. I sometimes wonder what an ultra minimal OS could be like. The COSMIC ELF had a very tiny OS. I only played with it in emulation, and don't remember much.

One thing I liked about the DOS age, was that, to reference the Simpsons, I could "walk on the pipes". IE tell the CPU exactly what I wanted it to do.

There's a trade off between the Altair front panel, and vibe coding though! xD

ultratechnology.com/okad.htm

www.ultratechnology.comOKAD (Oh CAD)
Continued thread

Ps. If this was more of a #Forth-like language (e.g. via thi.ng/pointfree-lang), the same could be expressed just like so (and much better reflecting the linear flow of data and order of transformations):

```
normal ( gaussian generator )
1e6 repeatedly ( take N samples )
0.1 -3 3 binned ( clip to interval & bin values )
frequencies ( compute histogram )
asArray ( convert map to array of [bin, count] tuples )
0 compareByKey sort ( sort by bin position )
1 pluck ( select bin counts only )
10 barChartVStr ( generate ASCII bar chart string )
print
```

thi.ng/pointfree-langForth style syntax layer/compiler & CLI for the @thi.ng/pointfree DSL