A Forth-inspired language for writing websites

45 points by EvanHahn a day ago on lobsters | 15 comments

neauoire | a day ago

The example at the top looks just like how I generate my own website :)

"hey" <h1>

I tried gathering folks who's websites are written in concatenative languages, thinking we could make a webring or something, share the ideas, but even within the catlang community I couldn't really find anyone who's given this a honest try.

If you're reading this old thread, person from the future who are looking for likeminded folks, and you have made a website with more than 10ish pages, are not using AI at any point of the process, all written in some flavor of a catlang, let me know! I'd love to at least make a shortlist of example sites.

yumaikas | a day ago

https://stk.junglecoder.com is all written in StackTalk, including the implementation of the playground itself, though the site is still a bit small (I plan on addressing that once I have my rebuild of StackTalk off the ground). I'm also using a similar process to build some of my pages on https://junglecoder.com, most recently https://junglecoder.com/blarg/tired-of-csharp.html. The site is still mostly built using Mendoza, but I do plan on actively switching pages from Mendoza to pstk, since I enjoy using StackTalk as the basis for SSGs quite a lot.

neauoire | a day ago

Hey Yumaikas :)

Yes, once it has grown a bit, it'll be an excellent candidate, but ideally it wouldn't itself be about documenting a catlang, I was thinking websites that use catlangs to showcase their work, blog, and whatnot. Do you have plans to make a websites with stacktalk that would be more of general interest?

yumaikas | a day ago

Yep, did you catch that last link?

neauoire | a day ago

Right yes! Sorry I wasn't sure what Mendoza meant and couldn't find a link to the source, but you're saying junglecoder is in the process of being entirely catlang generated, that would be a PERFECT candidate if the sources become available.

yumaikas | a day ago

Aye. It isn't there yet, Mendoza is a Janet-based SSG, but I do plan on converting the existing content over to StackTalk, and everything new gets written in StackTalk atm.

I'll be sure to gather the source into a readable location as I do.

beto | a day ago

It was definitely inspired by uxn!

neauoire | a day ago

Ah, damn, I'm glad it inspired you, but also damn, I was honestly hoping there might have been someone else out there who also realized how beautiful xml trees map to postfix.

h3rald | 22 hours ago

Hey! I actually use min as the rule engine for a few of my sites like https://min-lang.org itself for example. My SSG (HastySite) is written in Nim and it uses mustache for templating, but everything is exposed via the min API.

Here's an example of the rules.min file used for the min language web site.

neauoire | 22 hours ago

Hey h3rald :) Dang the whole gang is here.

So, https://h3rald.com/ is written in min, does it use the same 200 lines min script to build? It'll be the first entry on my list!

h3rald | 22 hours ago

Well, same thing: h3rald.com is powered by HastySite as well, but it uses more like 450 lines of min 😜

The "canonical" rules.min file is the one used by hastysite.h3rald.com itself, and it is statically bundled into the hastysite executable itself (it will be created in your folder when you run hastysite init).

neauoire | 22 hours ago

That's great, no this is perfect, that 450 lines is what I'll use, it has this nice: "here's the website, here's the catlang source". Congrats on the release of min 47 btw.

toastal | 10 hours ago

Wild. I was looking at min & hex just last week.

beto | a day ago

I was surprised to see my blog post here, since it has very little context! Happy to answer questions.

For context, Forge is written in Rust and compiles to webassembly (the stack based language) and a native web server. I'm traveling for a few days, but I'm planning to release the source next week when I'm back.

I really like how it's easy to keep composing blocks to build a DSL for pages. It's much more expressive than I anticipated!

This is part of a series of explorations I've been doing on alternative ways of writing websites.

yumaikas | 22 hours ago

I've found concat/stack based languages to be -really- nifty for this sort of thing. Stacks do a great job of representing the process of traversing and/or building trees, and the low-punctuation nature of Forth and friends lends itself quite nicely to document-shaped code, IME.

I've got half of an article written on how I think the spirit of Starting Forth's old Washing Machine example could be transitioned to the more modern era by being about The DOM, so I'm glad to see other folks pulling on that thread