2026-05-08 03:59:10 Wow - big day for you guys, veltas. 2026-05-08 07:04:56 i think forth coders dont really have a plan for what theyre going to do with 128 terrabytes of ram and 1 petabyte of ssd storage 2026-05-08 07:05:21 and I think forth best practices on a microconroller arent viable in cloud programming 2026-05-08 07:06:12 and I think these two problems are part of what has kept out the youth, and has kept out industries outside of microcontroller programming 2026-05-08 07:07:59 the things that feel intuitive for me to do in forth, the very reasons why I sought out a language like forth - these are highly ineffeficient operations that waste many machine instruction cycles 2026-05-08 07:09:08 i dont think the problem is that humanity will forget how to write good forth. this is well documented at the local library and digitally online 2026-05-08 07:10:47 the modality of "writing good forth" goes far against the grain of how modern software is made. so you either have to change how you do things to write good forth, or you have to stop writing good forth to accomidate how things are done 2026-05-08 07:12:33 what industry coders have frequently told me is "for 80% of applications it doesnt matter how well optimized your code is. it only matters if your code makes a human wait for a result longer than they want to" 2026-05-08 07:27:32 It's a fairly complex issue, IMO. When you develop an application that runs on consumer's computers (including .js-based webapps), it's cost-efficient to save development time by not optimizing much and instead demand that each of your customers buys better hardware. 2026-05-08 07:27:32 When you develop something that runs on your own computers, it's /sometimes/ more cost-efficient to spend effort on optimizations than on buying a new datacenter. 2026-05-08 07:33:31 As to Forth, my interest in the language lies in the fact that it's possible to have a self-hosting Forth /compiler/ running on resource-limited hardware. IMO, this is important for both embedded applications, as well as for teaching informatics. When, OTOH, I have gigabytes of RAM at hand, my preference would be to use Perl or (and) C. 2026-05-08 07:52:13 iv4nshm4k0v, you don't have gigabytes of RAM yet? My 16 yr old PC has 8G ram 2026-05-08 07:52:47 And some websites include javascript which eats 5gig with ease 2026-05-08 08:07:56 I don't have gigabytes of RAM on /some/ of my computers. Such as several Arduino boards I have. Moreover, I'm not particularly interested in running webapps in general, so their RAM requirements are of little concern to me in practice. 2026-05-08 08:20:11 ACTION listens to Рождённый в СССР — ДДТ  2026-05-08 08:50:18 iv4nshm4k0v, Arduino runs forth? 2026-05-08 08:50:43 I have several MCU including arduino mega 2026-05-08 08:55:57 Haven't tried it myself, but there's, e. g., http://amforth.sourceforge.net/ . If Brad Rodriguez' "Moving Forth" series of articles is anything to go by, then it /should/ be possible to implement a Forth compiler on some of ATmega MCUs. 2026-05-08 09:10:42 Other (and older) Forth implementations for resource-constrained systems include http://pygmy.utoh.org/pygmyforth.html for 8088/DOS and the classic http://github.com/ForthHub/cmFORTH.git (apologies for linking anything Microsoft) Pygmy is modelled after. 2026-05-08 09:10:43 As well as David Millington Forth http://spectrumcomputing.co.uk/entry/26880/ - that Hans Bezemer praised for outperforming other implementations for the machine in a news:comp.lang.forth post some months back. That's not a self-hosting compiler, though, AIUI. (JFTR, there's this webapp for Usenet: http://newsgrouper.org/do_guest , then http://newsgrouper.org/comp.lang.forth/ .) 2026-05-08 14:30:31 lisbeths: I think you're quite right - no one should expect the same techniques to work well at the embedded micro level and at the cloud level. They're just too different. 2026-05-08 14:30:51 What Forth does offer is the ability to construct extensions aimed at those different areas. 2026-05-08 14:31:23 Forth out of the box certainly doesn't deal with the scale you cited, but you can use it to build tools that do. 2026-05-08 14:32:46 I think it's "common knowledge" that using scalable tools for small scale introduces a lot of extra costs and overhead, it's better to use tools that match your real scale 2026-05-08 14:33:21 And this really applies all the way down the stack, OS concepts are no good in embedded, cloud concepts are no good for a platform that could run on one machine 2026-05-08 14:34:12 But it's true that Forth in theory can handle scale... I just don't know how well it would do so, and it would be a bit weird using such a small and low-feature language with such a richly complicated solution 2026-05-08 15:28:16 So can you write dc -e '2o[seq]sq1[d127n]dsnx' in Forth? The code is supposed to output 0000`0000 to 1111`1111 one per line (separator here to make it easier to count, the actual output doesn't have it) 2026-05-08 17:23:13 You can write it in Forth, although I have not 2026-05-08 17:24:00 I don't know dc well but I think that basically you'd be able to implement the macros etc as colon words, maybe R> DROP would be necessary to back out where 'q' is used 2026-05-08 17:24:33 And could change BASE to 2 before executing, would have effect of 2o 2026-05-08 17:27:00 Obviously it's easier to just run : X 256 0 ?DO CR I . LOOP ; 2 BASE ! X ( But it feels like this misses the point? ) 2026-05-08 17:28:33 You can have the separator in Forth: : SEP 0 <# # # # # [CHAR] ` HOLD #S #> TYPE SPACE ; : X 256 0 ?DO CR I SEP LOOP ; 2 BASE ! X 2026-05-08 18:04:58 veltas, that code doesn't print leading zeroes 2026-05-08 18:22:43 You're right sorry 2026-05-08 18:23:16 : SEP 0 <# # # # # [CHAR] ` HOLD # # # #S #> TYPE SPACE ; : X 256 0 ?DO CR I SEP LOOP ; 2 BASE ! X 2026-05-08 18:23:25 Does that work better? 2026-05-08 18:33:43 : .0R ( u padding -- ) SWAP 0 <# ROT 1- 0 MAX 0 ?DO # LOOP #S #> TYPE SPACE ; ( might come in handy to zero-pad a number? ) 2026-05-08 18:34:26 And then : X 256 0 ?DO CR I 8 .0R LOOP ; 2 BASE ! X 2026-05-08 19:57:05 it works, however I can't say I understand it intuitively. It has been far too long since I read forth manuals. Also why all caps?