Remix.run Logo
sourcepluck 4 days ago

Looks very cool!

Relatedly, there's http://tumbleforth.hardcoded.net/, which I think looks lovely. Has anyone gone through that and would like to share their experience?

forth_throwaway 4 days ago | parent | next [-]

I got about halfway through it during a slow work week. It was a throwback to my hardware classes from college. It got me thinking differently about computing.

I am young and stupid, but from a rear-view perspective it looks like maybe certain abstractions were chosen in the old days when there were hardware limitations, and that our current "evolutionary branch" of programming languages has a lot of abstractions that have not aged well, leading to a lot of layers of load-bearing cruft --much like any engineering project.

Collapse OS might not be practical today, but it has a "liberating" appeal. Freeing yourself from all these layers of abstraction sounds really enticing. A way to enjoy computing as it existed in the 1960s, but without the terrible developer experience. (or so I imagine)

Currently my pie-in-the-sky project would be to work through these projects, get Dusk OS building on a virtual machine, then physical machine, then write a Scheme interpreter for Dusk OS in C --and go hog-wild from there.

I have a couple of rivers to cross before I get there. I implemented a Scheme interpreter in Python in a couple of hours, then improved the scanner/Tokenizer in a couple more hours. Now I'm reading through crafting interpreters to see how I would go about implementing a Scheme interpreter in C. After that's done and I implement an interpreter in C, I'll revisit this guide and try to jump headfirst into DuskOS.

sourcepluck 4 days ago | parent | next [-]

Ok, I'm tempted to go back to it, thanks for sharing your experience! I have had some ideas similar to what you describe. I wonder if you've seen https://wiki.xxiivv.com/site/uxntal.html. Some of the projects listed here might be of interest to you either https://malleable.systems/catalog/

forth_throwaway 4 days ago | parent [-]

That malleable systems manifesto really resonated with me. I actually did a project recently where I tried to adhere to that sort of ethos: https://pickles976.github.io/Hari-Recipes/

It is nice to see others with similar feelings.

exe34 4 days ago | parent | prev | next [-]

I found this quite easy to follow: https://www.buildyourownlisp.com/ for building a not-quite-Scheme in C. I didn't get massively far but only because of the sheer amount of other shiny things.

forth_throwaway 4 days ago | parent [-]

Yes I have seen that one! It's on my list of resources. There's also this, which I have been studying the code of as I follow along with Crafting Interpreters, to try and incrementally understand the codebase:

https://github.com/vibhavp/skeem/blob/master/src/builtins.c#...

The simplicity of the eval function is so cool!

codr7 3 days ago | parent | prev [-]

Famous last words :)

I was adding a scripting language to an application, I just needed a scripting language, that was 16 years ago.

fuzztester 4 days ago | parent | prev | next [-]

Just started looking at it, thanks for sharing.

I already like his style of talking.

Examples:

>Much terser than the C version right?

>This little assembler crash course gives us a better understanding of what is compiled by the C compiler, but not how it compiles it. We don't know how it's ran either. To know that, we'd have to dig through software that weighs millions of lines of code. Maybe you'd have the patience to do it, I don't, so let's continue tumbling down the rabbit hole. We'll go bare metal and then build an operating system of our own, with a C compiler of our own. It's simpler this way.

>What’s a linker? Aw, forget about it, it’s another piece of overcomplicated software that has convinced the world that it’s essential. We won’t need one in what’s coming.

:)

sourcepluck 4 days ago | parent [-]

Yes, he's great! More character and joking around in technical writing. Donald Knuth, Ketman, Starting Forth, Land of Lisp, probably lots of others I'm forgetting... it can be done, people!

fuzztester 3 days ago | parent [-]

The Crafting Interpreters book author is another one, at least mildly. I've not read the book fully yet, but have skimmed the first chapter or so.

sourcepluck 3 days ago | parent [-]

Yes, absolutely, agreed! I read a couple chapters too. And another one I forgot earlier is Janet for Mortals.

xelxebar 4 days ago | parent | prev | next [-]

Virgil Dupras, the author of the Tumble Forth series there, also authors DuskOS, an OS written entirely in a custom Forth. His consistent and prodigious output really is quite impressive. I don't really hold to the collapse philosophy, but the DuskOS mailing list has just the right amount of volume that it's perfect for lurking.

Virgil's work inspired me to give Forth a bit of a go, and last year I spent some time hand decompiling SmithForth[1]. It really is remarkable how little assembler is required to bootstrap the language. I can totally see how Forth could give you a repl in embedded environments, which sounds way more fun than the typical dev cycle I hear about.

[0]:https://duskos.org/ [1]:https://dacvs.neocities.org/SF/

sourcepluck 4 days ago | parent | prev [-]

Just following up on this - this comment was my initial excitement at seeing some real Forth-based thing. I've had time since then to follow up and read the wikipedia page for ChipWits now and the blog post: the original game looks very cool. The logo from the manual on WP is so great.

I'd been making a list recently of games (old and new) that have puzzles and programming type stuff in them. It's going on the list! I could very well get on to it next after I'm finished the ketman assembly "game" (although it's not really a game, I suppose).

I hope the new ChipWits does excellently!

homarp 4 days ago | parent | next [-]

for your list, a few more entries, if not there already: https://news.ycombinator.com/item?id=7118649

and you should post your list here.

sourcepluck 4 days ago | parent [-]

Added! Thank you, how lovely, that is indeed very good. You've prompted me to get on with that project, and I'm organising, compiling, and getting that list ready to publish here now.

chipwits 4 days ago | parent | prev | next [-]

That's so cool - where can we find the list?

DougDroogSharp 4 days ago | parent | prev [-]

Thanks a bunch. We have high hopes for our game.