digitalcourage.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Diese Instanz wird betrieben von Digitalcourage e.V. für die Allgemeinheit. Damit wir das nachhaltig tun können, erheben wir einen jährlichen Vorausbeitrag von 1€/Monat per SEPA-Lastschrifteinzug.

Server stats:

810
active users

#forth

2 posts2 participants0 posts today

In Germany there we have this saying that talking about music is like dancing to architecture.

In a simillar way, I find it rather difficult to describe to people why I prefer coding in a language which is usually considererd one or all of the following: old / outdated / dead / feeding-to-a-niche / hard-to-understand - but I will give it a last try:

One of the things I like about the Forth programming language - in this case #esp32forth - is that you can easily add hardware specific words from the Arduino library.

I was missing analogWrite, analogWriteFrequency and analogWriteResolution so I just added those.

But aside from that, using Forth on the ESP32 makes prototyping so much easier: you save yourself the endless cycle of "code, compile, upload, test, code..." since you can actually write your code interactively on the device (using either the Block Editor or the Visual Editor).

Being able to remotely connect to this development environment via either #Http or #Telnet just rounds it up for me.

Maybe it's because it brings me back to the times when I was coding BASIC on my bedsit, but maybe it really is because it is a very efficient way to code ... 🤷‍♂️

#Forth
#ArduinoIDE
#Coding

Yay! 🥳

I just made my #TTGO #VGA32 use the #esp32forth variant with #fabgl enabled (a.k.a. #ESP32forthStation ) *and* properly recognize the onboard #sdcard !!

In the end the modification was quite simple, I had to tell the TTGO VGA32 the proper SPI pin configuration for the sd card via SPI.begin() and added that code to the SD.begin word definition.

By default, SD.begin would use the #esp32 default SPI pin configuration which is not being used on the TTGO VGA32 (see TTGO VGA32 pinout).

EDIT: but it took me hours to realize that I used a video resolution which consumed too much memory, causing each attempt to do a "SD.begin" in ESP32forth to fail ... lowering the resolution to 640x200@60 did do the trick! 😎

Time to go to bed ... 🥱

#Arduino
#Forth

One of the things that annoyed me when using #ESP32forth is that with recent versions of the #ArduinoIDE it is no longer possible to use plugins for uploading additional files to the #SPIFFS partition of the ESP32.

There is a workaround solution for ESP32forth that allows a user to copy-paste code into the terminal, which is then stored on the filesystem - but that didn't convince me.

So I spent the last two days tinkering with mkspiffs and esptool.py and finally found a way to not only upload files to the SPIFFS partition but also dumping files *from* that partition back to your computer. All from the command line, no ArduinoIDE and plugins required - see here:

ufud.org/posts/2025-08-07-esp3

#ESP32
#Forth
#ueforth

ufud.orgESP32forth: transfering files to and from the SPIFFS partition

Adding Numbers

VERSION 1:

0 variable sum
152 variable data
275 , 210 , 161 , 149 , 174 , 191 ,
144 , 153 , 153 , 148 , 160 ,
144 ,

: sumup
0 sum !
13 0 do
data I 2 * + @
sum @ + sum !
loop
;

( Usage: )
sumup
sum @ dup .

OR VERSION 2:

: sumup
0
BEGIN
OVER + SWAP 0=
UNTIL
;

( Usage: )

0 275 210 161 149 174 191
144 153 153 148 160
144 sumup
dup .

(EDIT: forgot "sum" in Version 1, third last line and Version 2 needed UNTIL loop)
#forth #poll

Oh no, not another #retrocomputers post!

I've managed to load a game onto the Ministrel Forth. Without using a tape recorder. I'm so proud I figured it out...

What do they say?

"Pride goeth before destruction, and an haughty spirit before a fall."

Interesting stuff at

github.com/markgbeckett/jupite

But beware the converted *.wav files didn't work for me. I had to rebuild them from *.tap files with castool.

Our submission for #Catjam is complete! @rek and I set out to make a little platformer game in a #forth-like language. We made it a tough parkour type little game, give it a shot! Try to finish it in less than a minute. If you record yourself doing it in less than 45 seconds, send us a link and we'll put it in the game description :maru:

play: hundredrabbits.itch.io/polycat
source: git.sr.ht/~rabbits/polycat
video: youtube.com/watch?v=kzH6GchYMN

now reading: Retrospective on High-Level Language Computer Architecture [Ditzel and Patterson 1980]: a summary of failed design approaches for

- reduction of the semantic gap between programming and machine languages
- reduction of software development costs
- aesthetics ("esoteric")
[High-level language computers] are aesthetically appealing to those not familiar with modern compiler writing technology. It is acknowledged that code generation may be simpler for a high-level language computer. What needs to be made more fully understood is that a high-level language instruction set does not eliminate the need for compilers, nor does it greatly simplify them. The need and complexity of compilers extends far beyond code generation. The amount of code necessary for preprocessing, lexical analysis, syntax analysis, assembly, optimization, loading, error detection, error recovery and diagnostics often dwarfs the part of the compiler concerned with code generation. The level of the target computer does not seem to have enough of an effect on the size of a compiler to warrant a totally new architecture.
ref: https://dl.acm.org/doi/pdf/10.1145/800053.801914

#compilers #computerarchitecture #forth #retrocomputing

@Wintermute_BBS Just saw this video and thought of you:

youtu.be/FY2WYXOdXoM?si=YGXzn-

Therre's a new programming language for #music written by the guy who wrote #Supercollider, and it's a #FORTH!

[EDIT/UPDATE: It's apparently not precisely a FORTH because it includes lexically scoped variables, so it's FORTH-like.]

How cool is that?

I can't wait to have time to play with it. When I think about it, stack based programming would lend itself to all kinds of creative generative sound and music experimentation very well I think!