The Best Programming Language for the End of the World
https://www.wired.com/story/forth-collapse-os-apocalypse-programming-language/
#forth

The Best Programming Language for the End of the World
https://www.wired.com/story/forth-collapse-os-apocalypse-programming-language/
#forth
!
> Forsp: A #Forth+#Lisp Hybrid #LambdaCalculus Language
https://xorvoid.com/forsp.html
@neauoire @chrisamaphone Have you ever played around with L-Systems (I bet you did :)? It seems there's a lot of conceptual overlap here, even though they don't offer much in terms of control flow or Turing completeness. I just think they generally still remain somewhat under exposed/explored (beyond the traditional Turtle graphics applications). If you attach different kinds of interpreters, they can be pushed pretty far... In the past I have used them for genetic programming, text & code generation, music composition, and even basic stack machines (where the L-System acts as an iterative macro expansion stage)...
A couple of FizzBuzz examples (incl. a super basic Forth-like VM) using https://thi.ng/lsys...
https://gist.github.com/postspectacular/7d0ae7d90e0eafb69e60fb97e2838221
My gf is learning to program in order to switch careers and she is learning javascript in a bootcamp.
One interesting thing I saw while she was trying to program for the first time was that she expected results from the previous statement to be used by the next one. Something like this
1 + 2
console.log
And she was frustrated it didn't work. Should I teach her #forth? Clearly she is already in the stack-based mindset
I did more #OSDev programming. I'm very pleased with the progress made today.
The main thing accomplished is caching the blocks in RAM. This increases the memory requirement by about 16MB (4,096 blocks, at 4,096 bytes per block). The blocks are now loaded on startup. While startup is now slower, it is much faster to use once loaded. This can also save considerable power as it's no longer stuck in a polling loop while waiting on disk read operations after the initial load.
A second change was the addition of NOP skipping in the ilo vm code, reducing the function calls when encountering NOP in instruction bundles. Based on past experience with doing this on the hosted system it can save a decent amount of processing time & power consumption, depending on the programs being run.
Mouse data was being returned by the keyboard driver when the mouse was moved. The keyboard code now filters this out. I think I can have it start grabbing the movement deltas, so I might attempt writing a mouse driver in the future.
The final bit of work today was to write a new boot loader for a 1.44MB 3.5" floppy disk, and preparation of a flat binary version of the ilo kernel. This is now working, so it's finally possible to boot the system without needing GRUB or another bloated boot loader. I'm not quite ready to publish the source to this just yet, but probably will have it ready within a couple of days.
The total size of the kernel now sits at 540 lines (494 in C, 46 in assembly). The floppy boot loader is an additional 140 lines. Drivers in this are keyboard, text display (with partial DEC/ANSI escape sequence support), PATA hard disk, port I/O, and physical RAM. The Konilo system running on it adds optional serial, CMOS, and RTC drivers. The kernel binary is 15kb.
I've tested running the system with my Konilo #Forth system image under qemu, v86 (see http://forth.works/native for an example [warning: will transfer ~20MB of data]), and on an actual hardware from the early 2000's.
You know you're making progress when you send a pull request to the forth2012 test suite. Admittedly, it's a small fix to a tiny bit of code that wouldn't compile for a case-sensitive implementation, but....
All languages have life cycles. Hell, some even go dormant and become popular — or unexpectedly critical – again.
What would qualities would a language need to have to eventually threaten Python's dominance? My fear is any innovative ideas will just get absorbed. Yes, I realize much of #Python's muscle is marketing by big industry players.
@Aqsaqal celebrating his latest PragProg release -
Seven Obscure Languages in Seven Weeks
Let seven older, obscure languages open your eyes to new ways of thinking about programming, and change the way you code today.
http://pragprog.com/titles/dzseven
#Forth #Occam #APL #Simula #SNOBOL #Starset #m4 #7in7
Hey all! I'm due for an (re-)introduction: I'm Jack, an engineer in the NYC area from a firmware & cybersecurity background, currently working in something like hardware-software co-design.
Technical work is often with #rust #kicad #python #verilog #c, and in all-too-rare moments stuff like #haskell #forth #agda and #prolog
I've never been much for social media, usually preferring to keep interests local: a better-detailed #introduction to follow as I figure this out
For my Konilo #Forth, I've been keeping the system image and block storage as separate files. I'm starting to experiment with using a combined file for this instead. Doing this matches more closely to what I'm doing on my embedded & standalone systems, so it might be worthwhile.
@mcc to learn #forth I can highly recommend "Starting Forth" (https://www.forth.com/starting-forth/) by Leo Brodie.
@mcc Hmmm ... zForth is very simple, is written in C and has a "trace" option:
1. The "traditional" path to learning Forth is to install 'gforth' and use this as a textbook: https://www.forth.com/starting-forth/
2. Writing your own Forth is a labor of love, but if you have the time to spare, go for it.
@mcc You'd probably like "Moving Forth" then. It's in the Kindle bookstore but the original is here on the web:
https://www.bradrodriguez.com/papers/
P.S.: Now I know *three* Forth programmers under 50!
Someone I was chatting with mentioned #Forth language and there's actually a project to build and maintain a minimal OS and tools to run on a scavenged Z80 (and now they also support 6502, 8086, and 6809 CPUs) for after civilization and the global supply chain collapse and we have no new CPUs for the foreseeable future.
It's a bit dystopian but hey, why not be prepared, right? There's a slightly larger 32-bit OS called Dusk OS to bootstrap and cross-build Collapse OS.
I want to give a shout out to Leo Brodie and FORTH, Inc. for having the heart and commitment to release Brodie's beautiful books Starting Forth and Thinking Forth online for free (quite some time ago!). The former is available both as a PDF of its original form and in an online update, and the latter in a revised edition under the Creative Commons. The #Forth community and programmers and learners of all kinds are lucky to have these high-quality resources.