2026-05-23 00:12:39 MrMobius, dedicated GPIOs to shift keys 2026-05-23 00:14:09 Ignore multipress if non-shift keys are involved (non-modifier) 2026-05-23 00:30:18 hello 2026-05-23 00:31:14 forthBot: LOAD ini.fth 2026-05-23 00:31:15 File ini.fth with MOON loaded 2026-05-23 00:31:29 forthBot: CREDIT 2026-05-23 00:31:29 Brought to you by Cleobuline updated with hashtable with the help of Grok https://github.com/cleobuline/forth-bot-gmp-irc-threaded-multi-users/tree/main Site https://labynet.fr 2026-05-23 00:33:41 forthBot: 1 QUOTE 2026-05-23 00:33:41 When we are dead we do not know that we are dead. It is for others that it is difficult. When we are jerk it is the same - Jean Claude Vandamme - 2026-05-23 00:36:40 forthBot, 2 5 + . 2026-05-23 00:37:15 forthBot: 2 5 + EMIT 2026-05-23 00:37:25 cleobuline, doesn't work 2026-05-23 00:39:12 xentrac, I'm not an elderly and not an engineer, but I wanted a programming calculator when I was in high school and I wanted just a calculator when I was 6 maybe. I remember even getting one on my birthday and being excited about 2026-05-23 00:48:41 forthBot: 70 EMIT CR 2026-05-23 00:48:41 F 2026-05-23 00:49:13 Stalevar: you must do a CR after EMIT 2026-05-23 00:50:17 Stalevar: EMIT put a char in a buffer 2026-05-23 00:50:47 forthBot: 10 2 5 + emit emit 2026-05-23 00:50:48 Error: Unknown word: emit 2026-05-23 00:50:55 forthBot: 10 2 5 + EMIT EMIT 2026-05-23 00:51:11 CR Stalevar 2026-05-23 00:51:23 cleobuline, but 10 EMIT should be equivalent? 2026-05-23 00:52:03 forthBot: 2 5 + EMIT CR 2026-05-23 00:52:03  2026-05-23 00:52:20 forthBot: 10 2 5 + . EMIT CR 2026-05-23 00:52:20 7 2026-05-23 00:52:21  2026-05-23 00:53:47 CR flush the buffer 2026-05-23 00:54:00 forthBot, see cr cr 2026-05-23 00:54:11 forthBot: SEE CR CR 2026-05-23 00:54:12 : CR CR ; 2026-05-23 00:54:17 forthBot: SEE CAT 2026-05-23 00:54:17 : CAT 32 EMIT 32 EMIT 32 EMIT 47 EMIT 95 EMIT 47 EMIT 32 EMIT CR 40 EMIT 32 EMIT 111 EMIT 46 EMIT 111 EMIT 32 EMIT 41 EMIT CR 32 EMIT 32 EMIT 62 EMIT 32 EMIT 94 EMIT 32 EMIT 60 EMIT CR ; 2026-05-23 00:54:30 forthBot: CAT 2026-05-23 00:54:30 /_/ 2026-05-23 00:54:30 ( o.o ) 2026-05-23 00:54:31 > ^ < 2026-05-23 01:03:37 cleobuline, dc -e 'A 60 32 94 32 62 32 A 41 32 111 46 111 32 40 A 32 47 95 47 32 32 [Pz0 Stalevar: the people who remember specifically RPN calculators with fondness (as opposed to other programmable calculators) are mostly engineers 2026-05-23 01:04:30 I guess Forth should be able to do that too? Or use some stack start marker if z is unavaialbe 2026-05-23 01:04:52 xentrac, I do, because I like dc. I have never used any other RPN calculator 2026-05-23 01:05:03 aha 2026-05-23 01:10:16 forthBot: 2 127 ^ 2026-05-23 01:10:23 forthBot: . 2026-05-23 01:10:23 125 2026-05-23 01:16:49 forthBot: 1 127 << . 2026-05-23 01:16:49 170141183460469231731687303715884105728 2026-05-23 01:17:56 forthBot: 170141183460469231731687303715884105728 NUM-TO-BIN 2026-05-23 01:17:56 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 2026-05-23 01:19:51 Stalevar: since dc is arbitrary-precision, do you know about Minsky's two-counter machine? Or Fractran? 2026-05-23 01:21:00 I have read about it but forgot the details. Anyway, using super-big integer as a tape is a little perverted 2026-05-23 01:24:48 forthBot: : cat 10 60 32 94 32 62 32 32 10 41 32 111 46 111 32 40 10 32 47 95 47 32 32 32 BEGIN EMIT DEPTH UNTIL CR ; cat 2026-05-23 01:24:48 2026-05-23 01:25:15 forthBot: SEE DEPTH CR 2026-05-23 01:25:16 : DEPTH DEPTH ; 2026-05-23 01:25:28 forthBot: DEPTH . CR 2026-05-23 01:25:28 25 2026-05-23 01:25:49 forthBot: EMIT EMIT EMIT EMIT CR 2026-05-23 01:25:49 /_ 2026-05-23 01:26:17 cleobuline, why my cat doesn't work? lowercase cat? 2026-05-23 01:29:17 no 2026-05-23 01:35:08 forthBot: : cat 10 60 32 94 32 62 32 32 10 41 32 111 46 111 32 40 10 32 47 95 47 32 32 32 BEGIN DEPTH WHILE EMIT REPEAT CR ; 2026-05-23 01:35:13 forthBot: cat 2026-05-23 01:35:13 /_/ 2026-05-23 01:35:26 forthBot: cat 2026-05-23 01:35:27 /_/ 2026-05-23 01:35:33 mmm 2026-05-23 01:38:28 : cat 10 60 32 94 32 62 32 32 10 41 32 111 46 111 32 40 10 32 47 95 47 32 32 32 BEGIN DEPTH WHILE DUP 10 = IF CR ELSE EMIT THEN REPEAT ; cat 2026-05-23 01:38:41 forthBot: : cat 10 60 32 94 32 62 32 32 10 41 32 111 46 111 32 40 10 32 47 95 47 32 32 32 BEGIN DEPTH WHILE DUP 10 = IF CR ELSE EMIT THEN REPEAT ; cat 2026-05-23 01:38:41 /_/ 2026-05-23 01:39:08 forthBot: : cat 10 60 32 94 32 62 32 32 10 41 32 111 46 111 32 40 10 32 47 95 47 32 32 32 BEGIN DEPTH WHILE DUP 10 = IF DROP CR ELSE EMIT THEN REPEAT ; cat 2026-05-23 01:41:03 cleobuline, oops, sorry. The idea was to CR if 10 otherwise EMIT 2026-05-23 01:42:02 lol 2026-05-23 01:42:52 : cat CLEARSTACK CR 10 60 32 94 32 62 32 32 10 41 32 111 46 111 32 40 10 32 47 95 47 32 32 32 BEGIN DEPTH WHILE DUP 10 = IF DROP CR ELSE EMIT THEN REPEAT ; cat 2026-05-23 01:42:56 This works in gforth 2026-05-23 01:43:02 ok 2026-05-23 01:47:16 this is due to irc limitation with CR 2026-05-23 01:47:25 /n 2026-05-23 01:48:15 irc does not accept newline 2026-05-23 01:49:13 you must send the cat line by line Stalevar 2026-05-23 01:52:21 This is a security bug in forthbot if I get it right. One can use forth code to make it send arbitrary IRC commands 2026-05-23 01:53:03 Including PMing unrelated people, killing itself, changing nick and doing other such stuff 2026-05-23 01:56:29 forthBot: : cat CLEAR-STACK CR 10 60 32 94 32 62 32 32 10 41 32 111 46 111 32 40 10 32 47 95 47 32 32 32 BEGIN DEPTH WHILE DUP 10 = IF DROP CR ELSE EMIT THEN REPEAT ; cat 2026-05-23 01:56:29 /_/ 2026-05-23 01:56:30 ( o.o ) 2026-05-23 01:56:30 > ^ < 2026-05-23 01:56:53 yes it works Stalevar 2026-05-23 01:57:43 may be the memory was corrupted Stalevar 2026-05-23 01:58:03 or it was an old version 2026-05-23 01:59:22 forthBot: cat 2026-05-23 01:59:23 /_/ 2026-05-23 01:59:23 ( o.o ) 2026-05-23 01:59:24 > ^ < 2026-05-23 02:00:58 forthBot: LOAD ini.fth 2026-05-23 02:00:59 File ini.fth with MOON loaded 2026-05-23 02:01:02 forthBot: fee 2026-05-23 02:01:45 https://i.ibb.co/wFd34pQ7/zozo-img.png 2026-05-23 02:01:48 forthBot: : nick CLEAR-STACK 10 88 116 111 66 104 116 114 111 70 32 75 67 73 78 10 BEGIN DEPTH WHILE EMIT REPEAT ; nick CR 2026-05-23 02:02:00 cleobuline, security hole confirmed 2026-05-23 02:02:14 lol 2026-05-23 02:02:31 forthBot: : nick CLEAR-STACK 10 116 111 66 104 116 114 111 70 32 75 67 73 78 10 BEGIN DEPTH WHILE EMIT REPEAT ; nick CR 2026-05-23 02:02:38 :) 2026-05-23 02:02:42 nice ! 2026-05-23 02:07:25 bravo Stalevar i was not figure that 2026-05-23 02:13:24 ForthBot: see fee 2026-05-23 02:13:32 ForthBot: CR 2026-05-23 02:13:52 Does it just emit URL? 2026-05-23 02:14:58 ForthBot: fee 2026-05-23 02:15:16 forthBot: 3 4 + . 2026-05-23 02:15:16 7 2026-05-23 02:15:22 ForthBot: 3 4 + . 2026-05-23 02:15:31 ForthBot: see fee CR 2026-05-23 02:15:44 Stalevar: you must LOAD ini.fth first 2026-05-23 02:16:03 each user have it's own env 2026-05-23 02:16:22 forthBot: SEE fee CR 2026-05-23 02:16:22 SEE: Unknown word: fee 2026-05-23 02:16:36 cleobuline, it also doesn't recognize upper case? 2026-05-23 02:16:42 ForthBot: SEE fee CR 2026-05-23 02:16:42 Stalevar: LOAD ini.fth first 2026-05-23 02:17:20 forthBot: : nick CLEAR-STACK 10 116 111 66 104 116 114 111 70 32 75 67 73 32 + 10 BEGIN DEPTH WHILE EMIT REPEAT ; nick 2026-05-23 02:17:33 forthBot: 3 4 + . 2026-05-23 02:17:34 7 2026-05-23 02:17:43 forthBot: : nick CLEAR-STACK 10 116 111 66 104 116 114 111 102 32 75 67 73 78 10 BEGIN DEPTH WHILE EMIT REPEAT ; nick CR 2026-05-23 02:20:41 forthBot: LOAD ini.fth SEE fee CR 2026-05-23 02:20:41 Error: Error: LOAD: Cannot open file 'ini.fth SEE fee CR' 2026-05-23 02:21:06 forthBot: LOAD ini.fth 2026-05-23 02:21:07 File ini.fth with MOON loaded 2026-05-23 02:21:15 forthBot: LOAD ini.fth 2026-05-23 02:21:16 File ini.fth with MOON loaded 2026-05-23 02:21:21 forthBot: SEE fee CR 2026-05-23 02:21:21 : fee S" une image photoréaliste d'une fée dans un paysage enchanté "S IMAGE ; 2026-05-23 02:21:39 forthBot: fee 2026-05-23 02:22:14 Hm... it's connected to some neural generator? 2026-05-23 02:22:21 https://i.ibb.co/whGt7b3y/zozo-img.png 2026-05-23 02:22:21 forthBot: CR 2026-05-23 02:22:52 forthBot: : monster S" Un affreux montre plein de tentacules avec des gros yeux "S IMAGE ; 2026-05-23 02:22:58 forthBot: monster 2026-05-23 02:23:11 cleobuline, you need CR 2026-05-23 02:23:35 https://i.ibb.co/W48tRRC9/zozo-img.png 2026-05-23 02:23:41 Or not? 2026-05-23 02:23:47 no 2026-05-23 02:24:06 cr is just to flush the buffer on the channel 2026-05-23 02:25:45 forthBot: S" Furry anthro she-wolf bathing under small waterfall "S IMAGE 2026-05-23 02:26:28 DEBUG: no b64_json found 2026-05-23 02:26:29 { 2026-05-23 02:26:31 Error: IMAGE: Failed to generate or upload image 2026-05-23 02:27:07 Hm, it has to be in French or in compiled word or both? 2026-05-23 02:27:12 no sexual purpose 2026-05-23 02:28:46 forthBot: S" Furry anthro she-wolf in enchanted forest "S IMAGE 2026-05-23 02:29:12 and ; 2026-05-23 02:29:27 https://i.ibb.co/spcppBpr/zozo-img.png 2026-05-23 02:29:49 :) 2026-05-23 02:30:09 If it draws her without nipples then it could as well add a waterfall 2026-05-23 02:30:54 forthBot: S" Furry anthro she-wolf under small waterfall knee deep in rivulet "S IMAGE 2026-05-23 02:31:13 https://i.ibb.co/d0kQkHjw/zozo-img.png 2026-05-23 02:31:15 forgot ; 2026-05-23 02:31:30 cleobuline, it's not a word 2026-05-23 02:31:34 woua 2026-05-23 02:31:37 ok 2026-05-23 02:32:44 Are you sure bathing was rejected because "sexual"? 2026-05-23 02:33:02 may be 2026-05-23 02:33:35 forthBot: S" Furry anthro vixen bathing under a small waterfall "S IMAGE 2026-05-23 02:34:16 DEBUG: no b64_json found 2026-05-23 02:34:17 { 2026-05-23 02:34:19 Error: IMAGE: Failed to generate or upload image 2026-05-23 02:34:39 bathing 2026-05-23 02:35:00 forthBot: S" Furry anthro vixen under a small waterfall soaking into her fur "S IMAGE 2026-05-23 02:35:22 DEBUG: no b64_json found 2026-05-23 02:35:23 { 2026-05-23 02:35:25 Error: IMAGE: Failed to generate or upload image 2026-05-23 02:35:44 forthBot: S" Furry anthro vixen under a small waterfall "S IMAGE 2026-05-23 02:36:02 DEBUG: no b64_json found 2026-05-23 02:36:02 { 2026-05-23 02:36:03 Doesn't like wet fur? 2026-05-23 02:36:04 Error: IMAGE: Failed to generate or upload image 2026-05-23 02:36:37 forthBot: S" Furry anthro vixen "S IMAGE 2026-05-23 02:37:15 https://i.ibb.co/7J1X2ttY/zozo-img.png 2026-05-23 02:39:24 i don't want my bot to be banned Stalevar 2026-05-23 02:39:37 On image generation server? 2026-05-23 02:39:48 here 2026-05-23 02:40:16 is there a risk of that? 2026-05-23 03:01:15 Stalevar: you could have dedicated GPIOs for shift keys but the count goes up quick that way. some have 3 different shift keys 2026-05-23 03:02:02 the ghosting problem only appears with three keys pressed at once so no problem from a hardware point of view with pressing two keys at once 2026-05-23 03:06:49 details at https://en.wikipedia.org/wiki/Key_rollover#Ghosting 2026-05-23 03:07:03 Stalevar: you could get an HP-48G for under $100. Old hardware but much more capable software than the DM42 2026-05-23 03:10:19 my problem with that is that you can get an Orange Pi Zero3W for US$83.99: https://www.aliexpress.us/item/3256811888308744.html 2026-05-23 03:11:05 or an Orange Pi Zero for US$41: https://www.aliexpress.us/item/3256805599380429.html 2026-05-23 03:12:45 right and then maybe you could get something like a uconsole or Pico calc if you want it to be handheld 2026-05-23 03:13:10 which has 1GiB of SDRAM, three USB ports, Wi-Fi, Ethernet, and a quad-core Cortex-A53 running at 1.5GHz 2026-05-23 03:13:13 right 2026-05-23 03:13:29 im just saying if you want a calculator specifically, there are way cheaper options than DM42 and similar 2026-05-23 03:15:13 I mean you the Orange Pi can certainly be a pretty decent calculator 2026-05-23 03:15:19 I mean the Orange Pi can certainly be a pretty decent calculator 2026-05-23 03:18:28 MrMobius, uconsole looks like non-foldable open pandora 2026-05-23 03:19:57 for better battery life you could imagine using something like an STM32H503: https://www.digikey.com/en/products/detail/stmicroelectronics/STM32H503CBU7TR/25577915 2026-05-23 03:20:25 with maybe some external RAM that is powered down most of the time 2026-05-23 03:20:59 the chip costs US$2.22 and is a Cortex-M33F running at 250MHz 2026-05-23 03:22:30 Nice 2026-05-23 03:22:36 with floating-point 2026-05-23 03:22:36 at which speed it uses 25mA, scaling down to 2.5mA if you run it at 25MHz 2026-05-23 03:23:31 in Standby mode it uses 3-5 μA 2026-05-23 03:23:44 all of this anywhere from 1.8 to 3.3 volts 2026-05-23 03:24:58 you'd need a good amount of flash though. the OS from my TI-89 from 2000 was about 2mb. a Casio I had back then had a 6mb flash chip with a good bit free for users to store files 2026-05-23 03:25:52 it has 128KiB of Flash built in, but you can easily wire up a MicroSD card to it over SPI 2026-05-23 03:25:52 the floats are decimal so the floating point unit wouldn't be needed but users might like having it if they write their own programs 2026-05-23 03:26:26 could use an SD card but can't execute code from that 2026-05-23 03:27:13 well, you can copy code into its 32KiB of on-chip SRAM to execute 2026-05-23 03:27:50 it's a question of what fraction of the time you're stalled waiting on it to fault in code from the external Flash 2026-05-23 03:28:25 I have a Casio fx-cg50 that I'm mostly finished making a forth for. less than $100 in the US. 118mhz SH4 so probably less horsepower than what you posted. 500k ram in various places on the chip with 8mb parallel ram and 16mb flash. it's really nice 2026-05-23 03:29:45 I think ST have some higher-end microcontrollers with more on-chip memory too 2026-05-23 03:29:47 that might work for a simpler calculator. an HP from 2000 had 512K RAM available all at once so even back then loading things in chunks like that was outdated 2026-05-23 03:30:02 but if it's a fantasy/fun project you could do it whatever way you like :) 2026-05-23 03:30:11 loading things in chunks like that is how every mainstream CPU works actually 2026-05-23 03:30:25 instruction cache misses are a big performance issue 2026-05-23 03:31:23 like, on my laptop 2026-05-23 03:32:17 ya you could emulate the cache mechanism if you only have 32k ram. you can get STs with over a megayte of RAM though and some have external memory buses for more RAM 2026-05-23 03:32:48 yeah, although generally they're still faulting stuff into an internal cache over that external memory bus 2026-05-23 03:33:26 ya hopefully. most microcontrollers have no cache and some have just a few bytes 2026-05-23 03:35:08 those that have tens of kilobytes of RAM usually have a cache. this particular one advertises "8-Kbyte instruction cache allowing https://www.st.com/resource/en/datasheet/stm32h503eb.pdf 2026-05-23 03:35:12 0-wait-state execution from flash memory 2026-05-23 03:35:13 (frequency up to 250 MHz" 2026-05-23 03:35:14 but ya to your point about orangepi, when we start adding caches and parallel memory buses, it blurs the line between MCU and MPU 2026-05-23 03:35:23 sorry I screwed up that paste 2026-05-23 03:35:41 yeah 2026-05-23 03:35:48 so kind of makes you wonder why even use an MCU if you're just forcing it into an MPU tolle since there are boards for that 2026-05-23 03:35:58 tolle=roll 2026-05-23 03:36:11 well, because you don't need the board 2026-05-23 03:36:20 you just need the chip and 1.8 to 3.3 volts 2026-05-23 03:36:49 and the external RAM and the external flash you added :P 2026-05-23 03:36:51 and it costs US$2 2026-05-23 03:37:19 yes, true. but those are also astoundingly cheap nowadays 2026-05-23 03:37:35 MrMobius, uconsole / picocalc are cool, but it is still over $100. I'd say too much for the class of hardware they have. I got HP 39gs for $20 a while ago. 2026-05-23 03:37:41 I mean on the scale of US$41 for an Orange Pie Zero or US$100 for an HP 48G 2026-05-23 03:37:59 I mean it's only 2.5 times as cheap as DM42 2026-05-23 03:38:34 Stalevar: could you afford a Casio fx-cg50? decent specs and full color screen and can be programmed in C 2026-05-23 03:38:36 Of course STM chip is cheaper, but it means soldering stuff myself which isn't ideal either 2026-05-23 03:38:56 I hearyou can get JLCPCB, PCBWay, or Aisler to solder it for you 2026-05-23 03:39:03 xentrac: $41 for an orangepi but how much more to make a handheld? 2026-05-23 03:39:35 Casio fx-cg50 is about same price as PicoCalc 2026-05-23 03:39:54 MrMobius: you can make a handheld for much less than that 2026-05-23 03:40:16 Stalevar, so what's the target price? 2026-05-23 03:41:05 Maybe $10? 2026-05-23 03:41:21 At least I can get a used MK-61 for that 2026-05-23 03:42:37 Stalevar: TI-83? you'd get to program a Z80 like you mentioned before 2026-05-23 03:42:46 50¢ for two LR44-cell batteries, 20¢ for a microcontroller, 83¢ for an 88×48 OLED display: https://www.lcsc.com/product-detail/C18723010.html 2026-05-23 03:43:16 an NKRO keyboard involves something like 50 diodes, which adds another cent or two 2026-05-23 03:44:29 Stalevar: Mk-61 is awesome. The first digit on mine doesn't work anymore :( 2026-05-23 03:44:35 that display is I²C so it only needs two lines from the microcontroller which can be shared with any other I²C devices 2026-05-23 03:45:20 oh, I guess it needs 7.5 volts for the display, regulated, so maybe an LCD would be better 2026-05-23 03:45:27 FX-991EX clone is also about $10 2026-05-23 03:47:32 Stalevar: the goal is a programmable calculator? 2026-05-23 03:48:45 I guess LCSC doesn't have any graphical LCD matrices in stock, because OLED has displaced them entirely apparently, so you need a boost converter chip, an inductor, and a couple of capacitors. this is pushing the price up to nearly US$2 for a handheld 2026-05-23 03:49:35 xentrac: LCDs are alive and well. check out buydisplay.com for example 2026-05-23 03:49:46 RPN calculator specifically. But I guess MK-61 is the best option out there, a new RPN calculator is going to be either expensive or you'd need to build it from scratch 2026-05-23 03:49:51 MrMobius: can you find one for 83¢? 2026-05-23 03:50:01 a dot-matrix one, not 7-segment 2026-05-23 03:50:19 xentrac: have a click and see for yourself 2026-05-23 03:51:43 MrMobius: I'm not finding a search on that site with which I can see how to answer that question 2026-05-23 03:51:50 xentrac: I used this in one of my calculators https://www.buydisplay.com/cog-serial-spi-132x32-graphic-lcd-display-no-backlight-st7567a?srsltid=AfmBOornmMF_ftozYvPjSxOth-uOUppag0wg0Xe7eseH8g4jDgwbKeht 2026-05-23 03:53:05 yeah, that looks awesome! 2026-05-23 03:53:09 you could use that if the orangepi is just a calculator but then there's no reason to use an orangepi. you would need a different screen if the calculator can also do Linux tasks 2026-05-23 03:53:18 I had found https://www.buydisplay.com/bar-type-0-72-inch-ips-serial-spi-60x160-lcd-display-module-gc9d01 but it is much less suitable 2026-05-23 03:53:51 what are the LR44s for? 2026-05-23 03:54:03 powering the device with about 3.2 volts 2026-05-23 03:54:23 it seems like two LR44s are a little cheaper than a CR2032 and about the same energy content 2026-05-23 03:55:00 wrt the orange pi, it might be nice for your calculator to be able to do difficult calculations that involve gigabytes of intermediate data, like simulating an analog circuit or something 2026-05-23 03:55:21 you can only draw about 10mah from a cr2032 and presumably less from an LR44 before the voltage drops 2026-05-23 03:55:49 the CR2032 I measured last yielded about 220mAh 2026-05-23 03:56:03 Duracell rates theirs at 250mAh 2026-05-23 03:56:41 right 220mah but what I meant to say is only 10ma at a time 2026-05-23 03:56:57 if you pull 15ma, it won't give you 3v anymore 2026-05-23 03:57:05 oh, yeah, I don't think either of them can handle 10mA 2026-05-23 03:57:29 those tiny OLEDs can draw 5-10ma by themselves and still need some for the MCU 2026-05-23 03:57:31 even at the start of my discharge test I was only drawing 5mA 2026-05-23 03:57:57 yeah, depending on how much of them you light up. Did you measure how much that 132×32 LCD takes? 2026-05-23 03:58:44 xentrac, power it from 14500 2026-05-23 04:01:29 xentrac: datasheet says less than 1ma with no backlight iirc 2026-05-23 04:01:43 Stalevar: we have a 78¢ display, a 20¢ microcontroller, 2¢ of diodes, and you want to add a 700¢ battery? 2026-05-23 04:02:42 there's also key caps which is the hardest part of all this to get right 2026-05-23 04:02:55 xentrac, well, then maybe AA 2026-05-23 04:03:10 or better to support both AA and 14500 2026-05-23 04:04:54 Stalevar: if two LR44 batteries can supply 200mAh and the whole system runs on 2mA, that's 100 hours of operation. why inflate the cost and mass by orders of magnitude with a humongous AA or 14500? 2026-05-23 04:05:46 you could very reasonably use a small Li-ion pouch cell in place of the two LR44s to avoid spending so much money on batteries 2026-05-23 04:06:08 but it's not 01987 anymore, you don't need an entire AA battery to power a pocket computer 2026-05-23 04:07:26 xentrac, because AA is cheaper than LR44? 2026-05-23 04:07:48 And because everybody already has AA lying around. But if it's too big then AAA 2026-05-23 04:08:25 I wonder if NaION or LiIon exist for AAA size 2026-05-23 04:09:25 it's not, an LR44 costs about 15¢ at retail and an AA is about 60¢ I think 2026-05-23 04:10:08 at least in Argentina, I'll check California 2026-05-23 04:10:09 I got 10 pack alcaline AA for $3 2026-05-23 04:10:52 At least 1 AA is cheaper than two LR44 2026-05-23 04:12:10 there are AA and AAA in lithium made by Energizer and they are awesome because they don't leak 2026-05-23 04:12:31 also Pale Blue makes USB rechargeable AAAs 2026-05-23 04:13:00 I would never leave alkalines in any of my calculators 2026-05-23 04:15:02 the other thing is the battery consumption when it spikes. you could idle at 2ma which is most of what calculators do but might draw way more during calculations 2026-05-23 04:22:16 Do energizer lithium batteries differ from li-ion + step down? 2026-05-23 04:34:56 MrMobius, anyway point was that new RPN calculator costs more than a cheap laptop. For example I got a small laptop with dead battery for just $30 last year 2026-05-23 04:35:54 Cheapest option would actually be a keyboard smartphone plus RPN app in sisx or j2me 2026-05-23 04:36:28 You are right that hardware to make one from scratch is fairly cheap 2026-05-23 04:36:52 But for some reason things like ClockworkPi are not cheap, if you buy existing kit 2026-05-23 04:46:36 MrMobius, xentrac, why do you even need extra RAM, Flash or µSD if forth (or dc-like) can fit in any half-decent MCU with space to spare? 2026-05-23 04:47:22 But one can probably make a Forth µSD for clockwork Pi instead of BASIC 2026-05-23 05:12:27 Stalevar: not sure of chemistry in the energizers. They output 1.8v new then quickly drop to 1.5v 2026-05-23 05:12:53 supposed to be good for high drain applications but main thing to me is they don't leak and ruin the device 2026-05-23 05:14:42 Stalevar: "space to spare" is relative. Free42 which runs on DM42 is about 400K not counting floating point lib 2026-05-23 05:15:28 Well, MCUs with Cortex-M0 and such have more, right? 2026-05-23 05:15:57 You wouldn't use attiny for a calculator 2026-05-23 05:16:53 MrMobius, Free42 APK has issue rendering menu on my Android phone, white on white, and default skin is ugly. But the APK was 7 megabytes 2026-05-23 05:17:41 I wonder what to do with it though, it's not very obvious to work on. I guess it makes sense why RPN calcs didn't gain much traction 2026-05-23 05:18:58 right. if you strip out all the android stuff and just look at core object files, it's under a megabyte for various architectures 2026-05-23 05:19:14 I got it outputting pixels as asterisks in a terminal window 2026-05-23 05:32:04 Stalevar: what a out getting an old TI-83+ for $10 and programming it in z80 as to be RON? 2026-05-23 05:32:21 RON? 2026-05-23 05:32:28 Sorry, RPN 2026-05-23 05:35:08 MrMobius, I don't think I can get an TI-83+, especially for $10 2026-05-23 05:35:24 MK-61 is available 2026-05-23 05:37:07 https://aliexpress.ru/item/1005008590725127.html 2026-05-23 05:37:23 MrMobius, TI-83+ is more like $100 than $10 2026-05-23 05:37:46 I guess PicoCalc with full kb is better for that price 2026-05-23 05:38:34 I can report that in Target in Richmond, California, you can get a 20-pack of AA batteries for US$15 (75¢ per battery) or a 6-pack of CR2032 batteries for US$12 (200¢ per battery) 2026-05-23 05:39:20 That's a lot 2026-05-23 05:39:43 MrMobius: you would idle at 5 μA for the microcontroller (0.005 mA). The display could conceivably use a lot more than that 2026-05-23 05:40:36 but I don't think you need to spend 2 mA on idling the display. Maybe 1 or 0.5. Sharp's memory-in-pixel LCDs use 0.05 mA to retain the display (for the largish 400×240 model) but are very expensive 2026-05-23 05:41:10 Stalevar: 1 AA is not cheaper than two LR44s. 75¢ for an AA vs. 30¢ for two LR44s 2026-05-23 05:41:24 Stalevar: I can't say anything about prices in Russia other than I bought an MK-61 there in 2011 for 250 rubles :P 2026-05-23 05:41:45 $10-12 is what I was seeing for used ones on ebay 2026-05-23 05:42:04 used TI-83s I mean 2026-05-23 05:43:06 I agree that you can write a Forth that works entirely in Flash or RAM in a pretty large variety of MCUs, although maybe not, for example, the Padauk PMS152G-S14 https://www.lcsc.com/product-detail/C49173922.html (3.76¢, 1.25 kilowords of OTP program memory, 80 bytes of RAM) 2026-05-23 05:43:37 I couldn't find any LR44s at Target 2026-05-23 05:44:28 15¢ was the retail price I found them at in Argentina last year 2026-05-23 05:44:45 with AAs at about 65¢ 2026-05-23 05:45:01 xentrac: could be 5uA if no external RAM or flash 2026-05-23 05:45:13 MrMobius: or if you have them turned off when idling 2026-05-23 05:46:38 I think you could totally use an ATTiny for a calculator 2026-05-23 05:46:47 I know they do that in cell phones. I don't think you see it much in microcontroller stuff. some of them have a low power mode the go into when they're deselected 2026-05-23 05:47:15 most microcontroller datasheets spend more pages describing their power-down modes than anything else 2026-05-23 05:47:35 and they typically have like 2-4 different power-down modes 2026-05-23 05:48:03 so I infer that it's pretty common for engineers who are selecting microcontrollers to care a lot about power-down modes 2026-05-23 05:48:22 right. you'd use one of the ones you can wake up from with a timer to check for key presses. some of the lowest power modes require an external signal 2026-05-23 05:49:12 I don't think I've seen any that can't wake up from a timer, but a lot of them can wake up directly from key presses, even capacitive touch key presses, so you don't have to leave the timer running 2026-05-23 05:49:50 xentrac: sorry for confusion - my comment was "I don't think you see that much in microcontroller stuff" meaning I don't think you see the microcontroller completely turning off a flash chip with a MOSFET or anything 2026-05-23 05:49:55 integrating capacitive touch peripherals has been a big trend the last 20 years, and being able to wake up on captouch keypresses is one of the benefits (I think one of the primary benefits) 2026-05-23 05:50:04 oh, yeah, I did misunderstand, sorry 2026-05-23 05:50:24 flash chips usually do have a shutdown mode that requires microamps though 2026-05-23 05:50:24 MSP430 for example gets down to 0.1ua in lpm4 but needs external signal to wake up 2026-05-23 05:50:41 that's pretty impressive! it's too bad we lost tpbsd 2026-05-23 05:51:48 I think he'll be back soon. he has his own forth channel on hackint if you ever want to talk to him 2026-05-23 05:51:49 I got some S34MS01G2 NAND Flash chips I want to use for a low-power project. according to my notes on their datasheet they each use 18μW in standby, which I guess is 6μA 2026-05-23 05:51:56 oh, what's hackint? 2026-05-23 05:52:06 Another irc network 2026-05-23 05:52:28 I hope so. he got pissed off on ##electronics because someone there said they used Microsoft Windows and he kind of overreacted :-D 2026-05-23 05:52:34 and then he left 2026-05-23 05:52:44 Right so chips like that have a low power mode but I don't think your MCU can wake up lots of times a second to read key presses and have a flash chip in power power mode for only 5ua 2026-05-23 05:52:44 hackint.org? 2026-05-23 05:53:29 yeah, you definitely can't use only 5μA if your Flash chip is in standby mode and using 6μA 2026-05-23 05:53:39 his channel is #forth-hardware-projects 2026-05-23 05:53:45 thanks! 2026-05-23 05:54:26 you *can* do the MOSFET thing, but also I think SPI and I²C Flash chips are likely to be targeted at lower-power applications than the S34MS01G2 was; it uses a parallel interface 2026-05-23 05:54:39 and at full power it uses 27000μW 2026-05-23 05:58:06 hmph, I guess I should join the 21st century and figure out how to enable TLS in my IRC client 2026-05-23 06:01:16 it's worth it to speak to the oracle tp 2026-05-23 06:01:36 I ask him lots of PCB questions. he knows a lot 2026-05-23 06:01:45 he does, yeah 2026-05-23 06:02:00 oh speaking of tiny cheap computers apparently this just dropped: https://m5stack.com/cardputerzero 2026-05-23 06:02:51 not shipping yet, but it's a Raspberry Pi CM0, a shitty thumb keyboard, and a screen for US$59, and fully free-software-supported so you can make it do whatever you want including a calculator 2026-05-23 06:03:50 85×54mm, the size and shape of a rather thick stack of credit cards 2026-05-23 06:07:29 xentrac, for $59 it's better to add 40 more and get clockwork pi 2026-05-23 06:10:35 maybe! 2026-05-23 06:11:02 so this is what I take to be a typical SPI Flash chip: https://www.digikey.com/en/products/detail/renesas-electronics-corporation/AT25SL321-MBUE-T/6827495 2026-05-23 06:12:02 32 megabits (4 megabytes), SPI/2SPI/QSPI interface, 2μA deep power-down current, 71.56¢ 2026-05-23 06:13:38 you could pair something like that with a fairly small microcontroller and get in effect much larger Flash 2026-05-23 06:27:37 suppose you have 32KiB of RAM on the microcontroller. At 104MHz and QSPI you can reload that RAM from the Flash in 0.63 milliseconds, or read through the entire 4MiB Flash chip in 81 milliseconds. So I feel like this kind of virtual memory ought to be usable at interactive speeds 2026-05-23 07:21:46 You would pay a huge penalty in speed 2026-05-23 07:21:58 Why not get an MCU with enough flash to begin with? 2026-05-23 07:22:05 or XIP? 2026-05-23 07:23:15 Check out the RP2040 for XIP. About $2 for the chip and memory together 2026-05-23 07:27:11 how much of a penalty you pay in speed depends on the locality of reference; for many purposes it's a tiny penalty 2026-05-23 07:28:28 but I don't think you can get an MCU with 4 megabytes of Flash for 72¢, can you? 2026-05-23 07:31:50 yeah, the cheapest microcontrollers in stock at Digi-Key with 4 megabytes or more are a PIC32 in a 144-BGA https://www.digikey.com/en/products/detail/microchip-technology/PIC32CZ4010CA80144-I-LUX/25616870 for US$8.69, another similar PIC, and an NXP Cortex-M7 in a 144-LQFP https://www.digikey.com/en/products/detail/nxp-usa-inc/MIMXRT1024DAG5B/18713185 2026-05-23 07:32:00 for US$8.87 2026-05-23 07:32:36 300MHz and 500MHz respectively 2026-05-23 07:32:47 you don't need anywhere near that much CPU power for a pocket calculator 2026-05-23 07:34:22 so I think the answer to "Why not get an MCU with enough flash to begin with?" is that MCUs normally have about enough memory that they can read it all in about 10 milliseconds, because they're optimized for response times in the milliseconds, and interactive personal computing devices normally have about enough memory that they can read all of it in about a second, because they're optimized for response 2026-05-23 07:34:28 times of about a tenth of a second 2026-05-23 07:36:55 so if you pay for an MCU with enough Flash, you are buying about 100× as much CPU speed as you need, and also, in these cases, things like onboard Ethernet, CANBus, USB, and AES encryption 2026-05-23 07:40:43 XIP is a more reasonable approach, and yeah, you can use the RP2040: https://www.digikey.com/en/products/detail/raspberry-pi/SC0914-13/14306010 2026-05-23 07:41:28 (76¢!) 2026-05-23 07:41:41 but XIP isn't fundamentally changing the speed penalty from faulting in code from off-chip when you need it. it's just doing it in hardware 2026-05-23 07:49:06 MrMobius, 6L 22 04 6- 12 6C 12 11 21 4Г 6L 0L 6Г 11 02 6- 12 13 6L 0L 6Г 10 02 6- 12 13 50 2026-05-23 07:51:23 It's fun to encode the commands in pseudo machine code, but I guess it'd make more sense to use dot matrix display or perhaps alphanumeric matrix to make more sense with readable commands like Lr Sr for registers, numbers as they are, and so on 2026-05-23 07:52:57 xentrac: ya definitely don't need 3-500mhz for all calculators but the tip of the line HP and TI models have been that fast for 10 years at least 2026-05-23 07:53:56 MrMobius: sure, useful for sure 2026-05-23 07:54:19 but at that speed you probably want a lot more RAM than that 2026-05-23 07:54:59 xentrac: XIP works in the background with a cache so a lot more efficient than loading from a flash chip yourself. you also have to manually manage the cache. I don't think that type of setup is feasible 2026-05-23 07:55:18 manually manage if you do it yourself I mean 2026-05-23 07:56:50 MrMobius, can you read MK61 code? 2026-05-23 07:57:21 not feasible? What, because you're doing it in software rather than hardware? It seems obvious to me that it's feasible, it's just potentially less efficient 2026-05-23 07:59:07 what I mean is the overhead in complexity is not reasonable. you have to chop up the program into pieces and figure out what to load and unload 2026-05-23 07:59:51 some type of mechanism has to figure out if the function you're calling is already I memory and if not where it is, how much of it to load into RAM, etc 2026-05-23 08:00:26 too bad we can't do it in hardware :) 2026-05-23 08:05:02 oh, it's not as complicated as you're thinking 2026-05-23 08:05:29 well. I shouldn't say that because I haven't actually implemented this, but I did spend a bunch of time thinking about how to do it 2026-05-23 08:06:49 but I mean overlays (as they were called) are obviously a feasible thing and were common in the 50s and early 60s on mainframes and in the 80s on microcomputers 2026-05-23 08:07:09 That's a good reference xentrac, I've not seen Charlieplexing before 2026-05-23 08:07:19 veltas: glad you liked it! 2026-05-23 08:08:13 but typically overlays involved a certain amount of manual fiddling around to minimize the amount of overlay switching you had to do. but that was mostly because you were loading in the overlays from a hard disk or even, on microcomputers, a floppy 2026-05-23 08:08:52 I was thinking about two approaches to "automatic overlays" that free the programmer from that burden 2026-05-23 08:10:19 xentrac: ya I've done bank switching in assembly before. I'm imagining programming the stm32 in C but it may be easier if you're thinking about Forth 2026-05-23 08:10:56 1. The Simple Approach, requiring the code for the full momentary call stack to fit in RAM. Every subroutine call goes to a stub which checks to see if the called subroutine is in RAM yet, and loading it into RAM if not, before transferring control to it. It can scan the stack to see which subroutines are currently "pinned" in memory because a return address on the stack points into them, so that it can 2026-05-23 08:11:02 toss out a non-pinned subroutine to make room for the one it's loading in. 2026-05-23 08:12:28 2. The Complex Approach, where not just calls but also returns go through this overlay manager, so that if the subroutine being returned into has been evicted from RAM, it can load it back into RAM and fix up the return address to point to the corresponding offset into its new load location. 2026-05-23 08:13:46 I think that, with at least a few kilobytes of RAM, most programs will be runnable with approach #1 2026-05-23 08:15:32 Intense optimisation going on here 2026-05-23 08:17:32 Intense optimization? 2026-05-23 08:19:13 MrMobius: the reason I was actually thinking about these software-managed virtual memory schemes was actually to JIT-compile each subroutine to machine code on demand from a very compact bytecode 2026-05-23 08:22:54 Well bank switching etc is optimisation of the amount of memory available, I would say? 2026-05-23 08:23:48 I'm not criticising just interested in this optimisation, I've not done much of this myself 2026-05-23 08:28:25 you can definitely put different overlays in different memory banks and switch between them 2026-05-23 08:28:51 I think it's most intensively used in shitty 8-bit game consoles whose fucking crappy address space is only 16 fucking bits 2026-05-23 08:29:07 so every cartridge that goes in them has a memory mapper chip 2026-05-23 08:29:56 by writing a byte or two to an address that goes to the memory mapper you can map in a different memory bank 2026-05-23 08:30:10 it's a royal pain in the patootie for preserving old games 2026-05-23 08:30:58 in a sense it's an optimization but really it's a backwards compatibility hack with brain-damaged system designs without enough address bus lines 2026-05-23 08:32:11 LIM EMS was a standard for MS-DOS bank switching hardware because the 8088 also was a brain-damaged system design without enough address bus lines 2026-05-23 08:40:30 there was definitely software that supported it but I never had hardware that supported it 2026-05-23 08:45:22 I reckon the lack of effective or physical address lengths was to get best performance with the transistor budget 2026-05-23 08:49:51 16 bits was more than enough for a lot of things 2026-05-23 08:50:34 Z80 for example was originally imagined to go into devices like a microcontroller not a full-fledged CPU. it got reused for that later 2026-05-23 09:13:23 in the case of the 8088 I think it was a design mistake to shift the segment address by only 4 bits, giving only a 20-bit address space 2026-05-23 09:14:22 if they'd shifted by 6 or 7 bits they would have had the "paragraph" boundaries on which segment starts had to be aligned be 64 or 128 bytes instead of 16, which would have been fine 2026-05-23 09:15:22 and it would have had 22 or 23 bits of address space, which would have given the instruction set another 4 or 6 years of life 2026-05-23 09:16:38 even if the 8088 itself only had 20 address lines, later ISA-compatible chips could have had more, so the transistor budget would have been exactly the same 2026-05-23 09:17:37 the original intention was to have the segmentation mechanism select real segments, with a base address register and a bound register for each one, and *that* would have involved more transistors 2026-05-23 09:17:57 but what they cut it down to was far worse than it could have been 2026-05-23 09:19:23 12 or 16 bits of address space is enough for a self-hosting development system, but 16 bits was a bad address space size for game consoles released in the late 80s. I mean computers with more than 64KiB of RAM were already commonplace for playing videogames on 2026-05-23 10:06:48 MK61 only has four registers for the stack: X Y Z T. I wonder if HP has more 2026-05-23 10:10:39 Stalevar: haha, no cant read it. I did a little programming on it 20 years ago but dont remember 2026-05-23 10:11:10 yes, HP-41 and 42 had those same four 2026-05-23 10:15:06 Why they can't just use standard hex digits A B C D E F and use - L C Г E " " instead. Anyway it seems it works in this emulator if you convert to hex: https://mk-61.moy.su/emulator.html#_%D0%9C%D0%9A-61 2026-05-23 10:15:14 6B 22 04 6A 12 6C 12 11 21 4D 6B 0B 6D 11 02 6A 12 13 6B 0B 6D 10 02 6A 12 13 50 2026-05-23 10:15:33 MrMobius, but why? Four data stack is tiny 2026-05-23 10:15:57 nice! 2026-05-23 10:16:21 four is decent for calculations. there is other memory storing things 2026-05-23 10:16:31 ИПB x^2 4 ИПA * ИПC * - КвКор ПD 2026-05-23 10:16:31 ИПB /-/ ИПD - 2 ИПA * / ИПB /-/ 2026-05-23 10:16:48 It can conver into mnemonics if you load hex and read back 2026-05-23 10:17:47 I got a couple of the displays used in those calculators and thought about trying to solder in the replacement but ive heard sometimes the chips themselves go bad 2026-05-23 10:18:03 also the PCBs in those are very thin with very thin traces 2026-05-23 10:18:23 anyway, I used to think about making a replacement PCB to put in there so good to know there's an emulator 2026-05-23 10:18:46 Lb ² 4 La * Lc * - √ Sd Lb ± Ld - 2 La * / Lb ± Ld + 2 La * / STOP 2026-05-23 10:18:56 That's what it would look like in English mnemonic 2026-05-23 10:19:50 Does it make more sense then hex? 2026-05-23 10:20:13 yep 2026-05-23 10:46:09 my HP-48GX had an arbitrary number of registers for the stack 2026-05-23 10:46:33 four items on the data stack is a reasonable number 2026-05-23 10:47:03 it does limit your subroutine nesting depth a bit 2026-05-23 11:02:22 xentrac, subroutine nesting level is five or six, it seems 2026-05-23 11:03:07 But return address is just one byte, while number is bigger, so it makes sense data stack is just 4, though there is also extra X1 and X2 registers. The latter is for display and is synced with X most of time 2026-05-23 11:24:37 MrMobius, https://github.com/myak555/MK-52_Resurrect/ 2026-05-23 11:25:01 They have a project to put a modern MCU into a calculator case, it could work if calculator died 2026-05-23 11:33:45 sweet 2026-05-23 11:34:45 although nowadays i want a backlight for my calculator (hence using a HP Prime) 2026-05-23 11:47:00 Riviera, is HP Prime any better than a smartphone with keyboard? 2026-05-23 11:47:43 Or PicoCalc which basically full keyboard with 320x320 display 2026-05-23 11:48:13 Can HP Prime do RPN? 2026-05-23 12:04:51 Yesz Prime can do RPN 2026-05-23 12:04:59 but it's way more than $10 2026-05-23 12:05:14 Newer ones have 700mhz processor iirc 2026-05-23 12:06:39 Big difference is Prime has decent math software and an interpreted language built in but can't run machine code 2026-05-23 12:40:37 MrMobius, is it locked down (like digital signing of firmware)? 2026-05-23 12:40:46 yes 2026-05-23 12:40:57 same as most of the current TI models 2026-05-23 12:41:19 I guess to avoid cheating on exams? 2026-05-23 12:41:28 and the newest Casio cg100 but the cg50 they still make is not locked down 2026-05-23 12:41:30 right 2026-05-23 12:42:16 since engineers dont need calculators like they used to, they make them for education now so preventing cheating is their priority 2026-05-23 12:42:35 compared to years ago when they released information about the hardware and SDKs for C programming 2026-05-23 12:44:27 Actually, SwissMicro isn't only RPN calculator design https://github.com/apoluekt/OpenRPNCalc 2026-05-23 12:44:33 This has deeper data stack 2026-05-23 12:53:55 that looks great 2026-05-23 13:24:33 Hm, they say that if you order 5pcs then it would cost about $100 per unit, which is actually similar to existing graphing calculators including that one with qwerty 2026-05-23 13:29:45 the screen is probably $40 of it 2026-05-23 13:29:52 that's a really great screen 2026-05-23 13:38:04 https://www.rskey.org/ctt991 found my model 2026-05-23 13:38:11 Indeed fake solar cell 2026-05-23 13:40:38 https://www.keesvandersanden.nl/calculators/elektronika_mk52.php this is only soviet calculator with EEPROM (offline storage) 2026-05-23 13:43:12 https://www.thimet.de/CalcCollection/Calculators/HP-IR-Printer/Contents.htm I wonder what happens if you try to connect them via USB IrDA to a PC or flash a TV remote on it 2026-05-23 13:43:55 And can you maybe use a linux computer and socat to emulate it with a regular USB thermal printer and Ir receiver 2026-05-23 15:33:42 Stalevar: I wouldn't know of any smartphone with a decent keyboard conveniently usable as calculator. Let me know of one :) 2026-05-23 15:34:38 MrMobius: Yeah would be nice to run native code on the prime; for having (e.g.) a HP48/50 emulator on the prime. :) 2026-05-23 15:35:15 but then, i really don't need advanced calculators anymore. sadly, slide rules need good eyes. :) 2026-05-23 15:59:40 ( X -- X! ) 40 0r 01 60 12 5r 03 50 (MK61), or alternatively 40 0D 01 60 12 5D 03 50 or STO_0 CX 1 RCL_0 * L0_03 HALT where L0_03 is `dec(r0) if (r0>0) goto 03` 2026-05-23 16:01:17 For example 20! = 2.432902e18 2026-05-23 16:03:02 11! = 39916800 biggest it fits without sci notation 2026-05-23 16:08:37 In dc it is `s0 1 [ l0 * l01-ds0 0 Another factorial, without arithmetic loop: 0E 01 14 0E 0E 01 11 25 12 25 25 14 25 5E 03 14 50 2026-05-23 16:56:59 ^ 1 <-> ^ ^ 1 - -> * -> 2026-05-23 16:56:59 -> <-> -> x=0 03 <-> С/П 2026-05-23 16:59:17 (dup 1) swap (03:) dup (dup 1) - rot * rot rot swap rot (if X=0 goto 03) swap halt 2026-05-23 17:01:09 dup 1 is necessary because if you just do 1 it will be appended and get you 51 from 5 or something 2026-05-23 17:11:03 Logic of x=0 is actually inverted. I use x=0 key but it means goto if X not zero 2026-05-23 19:07:43 02hello, i don't know anything about forth, but i'm curious. Do forth programmers use variables / variable names? 2026-05-23 19:08:04 02or do they just operate on that implied stack 2026-05-23 19:08:33 02and just always remember the order of all of their stack and the meaning of every single thing on the stack? 2026-05-23 19:16:53 pyzozord, forth has variables, but usually one would use something else 2026-05-23 19:17:20 02what is usually used? 2026-05-23 19:19:45 pyzozord, I try to use data stack mostly, but I don't write much forth 2026-05-23 20:14:56 pyzozord: have you also checked the postscript programming language? 2026-05-23 20:15:55 https://personal.math.ubc.ca/~cass/graphics/manual/ 2026-05-23 21:18:36 in my experience trying to use the data stack mostly instead of variables is one of the biggest pitfalls for new Forth programmers 2026-05-23 21:20:35 but it's true that Forth generally uses variables a bit less than, say, C 2026-05-23 21:22:59 I wrote about this at greater length at https://news.ycombinator.com/item?id=33264506 2026-05-23 22:23:57 hehe 2026-05-23 22:24:16 always good to start with an impactful motivator as a first sentence "I got to being about 25% as productive in Forth as in C" :-) 2026-05-23 22:25:24 also nice linked tcl article 2026-05-23 22:27:41 haha, well, I don't want to overstate my credentials 2026-05-23 22:28:08 if vdupras or Bernd Paysan or Anton Ertl comes in and says I'm totally full of shit and got everything wrong, you should believe them