3 ms·
Very much this. Even when programming for constrained environments, it's almost never necessary to self-host anymore. It's easy to use host-side tools to crunch
by eschneider 1y ago
Very much this. Even when programming for constrained environments, it's almost never necessary to self-host anymore. It's easy to use host-side tools to crunch code down to something that'll work on whatever the target is.
From a practical standpoint, one of the few modern uses where FORTH shines is as a REPL for new chips/SOCs so you can play around with the hardware and see how things actually work/debug the databook.
- kragen 1y agoHave you been using it for that? Which Forths and which chips have you been using?
- eschneider 1y agoYeah, I've been doing that a bit, mostly with STM32G474 (arm core) chips and my own Forth system. I'm not using it for production code, but I definitely use it for prototyping/experimenting with the SOC to see how the system actually behaves. A simple Forth REPL gives a nicer environment for poking at the low level hardware than going back and forth with C/C++. I could easily do production code this way, but TBH, I work with other people and have to share code, so C++ is generally the way to go there. :)
- kragen 1y agoThat makes a lot of sense. Have you found a lot of unreported datasheet errata, or is it more a matter of things where the datasheet/user manual just doesn't specify how things work? What's your turnaround time for loading a new C++ firmware image on the thing?
- eschneider 1y agoData sheets are usually 'accurate' as far as they go. I'm often working with pre-production samples so not everything _quite_ works and sometimes it's just handy to experiment and see for yourself what happens. As for getting a new C++ image on new hardware, usually it's just a few days for something basic.
- kragen 1y agoI see! I meant on existing hardware, as an alternative to typing a command in a REPL. I was thinking that recompiling and reflashing might be somewhere between 100 milliseconds and a minute.