2022-02-06 03:49:50 forth on GPUs? is that a thing? 2022-02-06 12:14:16 joe9: I've not personally found myself using case to differentiate stuff, to each their own 2022-02-06 15:56:04 ACTION is reading Easy Forth from Nick Morgan. 2022-02-06 15:56:14 how is it 2022-02-06 15:57:59 Interesting I heard about collapse os the other day and / forth. Never heard of Forth so reading in now. 2022-02-06 16:01:10 yeah collapse os, nice use of forth 2022-02-06 16:04:18 or for microcontrollers like Arduino pi pico etc. I know a little bit of Python and Racket/Scheme. 2022-02-06 18:45:18 is the backslash used an escape character in forth? 2022-02-06 18:45:32 or, is there a different character that is used instead? 2022-02-06 18:45:40 \ 2022-02-06 18:46:06 \\ for just the backslash or such? 2022-02-06 19:44:16 joe9 inside string literals or generally? 2022-02-06 19:45:19 backslash space is a comment to end of the line in many forths 2022-02-06 19:45:37 outside string literals 2022-02-06 20:10:28 yes, inside string literals 2022-02-06 20:45:26 some forths support string literals that include backslash-escapes, but these often have to be specifically invoked, e.g. with .\" or s\" , and there is no given any particular Forth will support these 2022-02-06 20:46:30 Jeremio: there are two Forths I know of for the Raspberry Pi Pico, specifically Mecrisp-Stellaris and my zeptoforth 2022-02-06 21:06:15 tabemann, what do you find useful about the RPi pico boards? 2022-02-06 22:12:26 a88: they're cheap and plentiful in this age of the Great Chip Shortage, and they support SMP unlike the F4, L4, and F7 otherwise supported by zeptoforth 2022-02-06 22:13:38 the big downside of the RPi Pico is their tiny XIP cache, only 16K, which mades for long and frequent cache misses when executing code out of external Quad SPI flash 2022-02-06 22:13:46 *makes 2022-02-06 22:15:46 the other downside, which is far less significant, is that they generally require soldering to be useful (if you're soldering-averse like myself - I ruined two RPi Picos before I got one that soldered correctly) or you have to pay extra to get one from someone who has pre-soldered it 2022-02-06 22:18:21 you mean to solder pin headers? 2022-02-06 22:18:30 yeah 2022-02-06 22:19:11 ahh I see, I have a hard time soldering too, but I've managed to do it 2022-02-06 22:19:41 how big is the flash? 2022-02-06 22:20:01 2 MB - on some other compatible boards the flash is larger, like 8 MB or so 2022-02-06 22:20:29 i just looked at your forth page, it looks great 2022-02-06 22:21:01 can you do the programmable i/o with it also? 2022-02-06 22:21:02 my GitHub or my Hackaday.io project page? 2022-02-06 22:21:07 yep 2022-02-06 22:21:24 I saw the hackaday one 2022-02-06 22:21:55 zeptoforth fully supports PIO, but it's not as user-friendly as the PIO support in MicroPython because it's far more low-level 2022-02-06 22:22:41 I've got demos in the test/rp2040 directory for controlling the LED with PIO 2022-02-06 22:26:34 ahh I see, just looked at pio_blinker.fs 2022-02-06 22:27:15 pio_blinker_1.fs is a more advanced example 2022-02-06 22:27:34 the continue-module just adds to the vocabulary right? 2022-02-06 22:27:56 yes 2022-02-06 22:28:29 the forth wordlist/module is the default global wordlist/module 2022-02-06 22:28:54 the point of using continue-module forth is that it defines a limited-scope namespace that things can be imported into 2022-02-06 22:29:01 which ends when one executes end-module 2022-02-06 22:29:33 I was wondering what you can do with pio, e.g. if you can simulate spi , i2c or generate clocks i wonder what the freq. limitations of pio are 2022-02-06 22:31:07 the PIO can run at up to the system clock 2022-02-06 22:31:17 and it can change outputs on a per-cycle basis 2022-02-06 22:31:41 and yes, the PIO is ideal for very fast bit-banging 2022-02-06 22:32:20 especially in an environment like zeptoforth which is not ideal for bit-banging due to being a preemptive multitasking environment 2022-02-06 22:32:50 interesting, can it produce two signals with a 1Hz difference at around 100Mhz? 2022-02-06 22:33:10 (wondering about its precision) 2022-02-06 22:34:06 IIRC the only real limitation is that if you change pins at above a certain Hz (I don't remember which offhand) you don't get a clean square wave in practice 2022-02-06 22:34:39 I see 2022-02-06 22:42:44 if you want to try out zeptoforth I'd highly recommend getting an RPi Pico if you don't already own one - as it comes in UF2 format, loading it is as simple as using the USB mass storage device interface 2022-02-06 22:43:11 I don't have one, but this PIO capability triggered my interest 2022-02-06 22:43:55 it also includes a little hack where it erases all the data up to the 1 MB mark when first loaded as a UF2 file, so you don't need to use a special "eraser" UF2 file first 2022-02-06 22:46:26 that's convenient, i can see by looking at zeptoforth that you pay attention to the details 2022-02-06 22:50:54 do you support all nine pio instructions in zeptoforth? 2022-02-06 22:51:22 ( p. 336 in the datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf) 2022-02-06 22:51:43 yep 2022-02-06 22:53:35 https://github.com/tabemann/zeptoforth/blob/master/src/rp2040/forth/pio.fs 2022-02-06 22:54:07 jmp, wait, in, out, push, pull, mov, irq, set, 2022-02-06 22:54:47 it also supports variants of these which, depending on the configuration, either have arbitrary delays or frob arbitrary pins simultaneously 2022-02-06 22:59:36 have you seen these pio facility in any other board? 2022-02-06 23:01:32 nah, the PIO itself is RP2040-specific 2022-02-06 23:01:50 but apparently there are some other MCU's that also come with channel controller-like functionality 2022-02-06 23:02:15 but they would not be compatible with the RP2040 PIO were I to add support for these on MCU's which have them 2022-02-06 23:06:05 interesting, appreciate the info 2022-02-06 23:12:11 btw, if you're interested more in zeptoforth, I'd recommend coming to #mecrisp on hackint.org — while that officially is the Mecrisp-Stellaris channel, in practice it's the center of a small embedded Forth community and most discussion of zeptoforth goes on there 2022-02-06 23:14:11 thanks! 2022-02-06 23:17:28 tabemann, just curious, is the pico xip cache worse than a normal cache the way they have it set up? 2022-02-06 23:19:20 MrMobius: it seems that cache misses are more expensive 2022-02-06 23:19:39 because they're using Quad SPI flash rather than internal flash 2022-02-06 23:20:42 right. i mean though if it starts caching some 16k chunk from the external flash and you jump outside that, does it invalidate the whole 16k chunk or is it split up where it only invalidates part and keeps part? 2022-02-06 23:20:52 dunno the name for that. cache line? 2022-02-06 23:21:32 e.g. when I first ported zeptoforth to the RPi Pico compilation was gruelingly slow because it was constantly missing the XIP flash; I had to add code to provide essentially a mini-dictionary in RAM to allow looking up words in a more efficient fashion 2022-02-06 23:21:41 yeah, cache line is the term 2022-02-06 23:22:20 I highly doubt that it invalidates the entire XIP cache or otherwise cache misses would be extremely expensive 2022-02-06 23:41:02 okay, I'm gonna hit the sack shortly 2022-02-06 23:43:32 g'night guys 2022-02-06 23:46:38 thanks!