Sujet : Re: The joy of FORTH (not)
De : bowman (at) *nospam* montana.com (rbowman)
Groupes : alt.folklore.computers comp.os.linux.miscDate : 24. Oct 2024, 00:02:45
Autres entêtes
Message-ID : <lntdklFquoqU1@mid.individual.net>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
User-Agent : Pan/0.149 (Bellevue; 4c157ba)
On Wed, 23 Oct 2024 14:36:25 -0700, John Ames wrote:
On Wed, 23 Oct 2024 20:57:51 -0000 (UTC)
Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
512kiB seems to be the recommendation for MicroPython. For the 32kiB
one, I would want to use a cross-compiler for some more
resource-efficient language, like C.
Which you certainly could do! Or, alternatively, you could embed a more
resource-efficient but interactive threaded interpreter, like Forth ;)
So far working with C++ and the Pico W has been interesting. Putting the
board in the BOOTSEL mode and copying the .uf2 works but I haven't been
able to get the 3 pin SWD interface with a Raspberry Pi 5 working. Not
insurmountable but the documentation isn't great. Getting to the BOOTSLE
mode requires holding down a button while unplugging/plugging the microUSB
which is cumbersome. It's even more complicated for a generic computer
without the Pi's GPIO pins.
Loading MicroPython the first time is similar but then the device comes up
on /dev/ttyACM0 and is faster to develop since it doesn't require
recompiling every time.
I've got another Pico W that I may try with one of the Forth variants.
Working with C++ and the Arduino Nano 33 BLE Sense was much easier but it
has the mbed RTOS as a loader. Unfortunately mbed is going away.
Digging into the Forth internals is instructive. When compared to CPython
it is either elegant or a kludgy mess depending on how much you hate
Forth.