News for hackers. Stuff that matters.
Re:Running Forth Unikernels by delish on Monday April 01, 2019 @03:18PM (#19547070)
That list is probably inspired by Chuck Moore's article "1% the Code" https://web.archive.org/web/20060104084410/http://www.colorf...

Relevant excerpt:

>colorForth does it differently. There is no syntax, no redundancy, no typing. There are no errors that can be detected. Forth uses postfix, there are no parentheses. No indentation. Comments are deferred to the documentation. No hooks, no compatibility. Words are never hyphenated. There's no heirarchy (sic). No files. No operating system.

He probably means "blocks" instead of files and "a condition system or exception system" instead of "stack underflow."

Re:Running Forth Unikernels by astrobe_ on Tuesday April 02, 2019 @03:28AM (#19551813)
ColorForth is actually pretty much an image-based system. Moore observes that PCs have a lot more memory than he needs (indeed 1Mb is huge for a Forth system), so the image is loaded into memory and the memory is saved to disk.

It should be mentioned that Forth is one of those languages that do configuration by editing the source code. This is probably the recommendable practice, instead of INI files or worse, XML (why write another parser when you already have one?). For really big data, binary format would probably be preferred (I actually have no experience in the area), with blocks (as defined in an extension of the ANS Forth standard) acting like Linux' mmap. Strings are a little bit of a pain to deal with in Forth, so you'd rather avoid them where possible (in addition to the consideration that plain text data are inefficient). You'd rather use an hex editor or write visualization and manipulation tools for binary data rather than processing text strings. The fact that Colorforth uses a custom source format to be edited by a custom editor (the colors in the source code is not syntax highlighting, the colors are part of the "syntax") is symptomatic of this kind of approach.

A condition/exception system would probably be in the category of "hooks" according to Moore. Stack underflow/overflow are not even an error condition in some of the chips he made that feature circular stacks. However, it is true that for casual Forth programmers like me, a stack underflow condition is usually the result of an error in the program. In a way, just like Haskell programs are "most certainly correct when they compile", Forth programs are most certainly correct if they don't stack-underflow (or just segfault because that's a typical result of messing up the return stack).

Re:Running Forth Unikernels by agumonkey on Monday April 01, 2019 @04:04PM (#19547604)
has moore written books or articles ?
Re:Running Forth Unikernels by dang on Monday April 01, 2019 @04:24PM (#19547829)
Re:Running Forth Unikernels by agumonkey on Monday April 01, 2019 @09:53PM (#19550343)
dank u
Re:Running Forth Unikernels by 4thaccount on Monday April 01, 2019 @10:58PM (#19550674)
Safari online has a lengthy interview with him that is an excerpt from a book with lots of interviews on programming Titans. I read the one from Moore every year and I don't even write Forth. It is simply that good and thought provoking.
Re:Running Forth Unikernels by fizfaz on Tuesday April 02, 2019 @05:40AM (#19552414)
this one: https://www.oreilly.com/library/view/masterminds-of-programm... ? Very interesting interview indeed.
Re:Running Forth Unikernels by elisharobinson on Tuesday April 02, 2019 @04:48AM (#19552183)
yes I read it once and it genuinely is the stuff to start cults
Re:Running Forth Unikernels by 4thaccount on Tuesday April 02, 2019 @09:54AM (#19554057)
Haha, yes that is a good way to explain it. Moore isn't necessarily wrong, but I don't think he is 100% correct either. Not everybody is a software engineer who can spend all day writing code. There are a lot of folks who write shell scripts and the like who need to do talk to computers without getting into machine code and Forth. Does a lawyer need to know the machine? Sounds inefficient use of time.