widget.quest
Installing 3rd party iframes for chats, guestbooks, oekaki boards, etc is great, but what if you could build your own?
The mission of widget.quest is to empower YOU to build a cooler web, by giving you tools to build your own dynamic widgets with persistent data for your Neocities, Nekoweb, or any other website!
Go deeper with PHP, a database, and even realtime sockets to build whatever you want!
Start small with a visit counter, comments form, etc. Copy pre-made templates and tweak them to make them your own, learn by doing, and share your widgets/code with others.
There is no limit to what you can build once you grow your skills. Make surveys, realtime chat applets. Collaborative, multiplayer puzzle games. Create a shared widget with other sites in your community to build systems that work across sites. A passport stamp system? You are only limited by your imagination!
A Universal Rendering Framework (for Svelte) -> SURF
Note: SURF's code is still closed-source. It will be open sourced when ready.
This is the spiritual successor to Svelte-Archipelago (Github), which was the spiritual successor to SvelTempl (Github) (Demo).
SvelTempl proved that we could do Svelte SSR embedded in Go, by embedding V8 into the go webserver. It kicked off this journey. It was based on Svelte 4, and was limited to Go as a host language. It was powerful but difficult to deploy.
Svelte Archipelago took the concept in a different direction. Updated for Svelte 5, and made 'universal', it was based on a tiny nodejs sidecar to your host application, easily managed with premade Docker image, and npm tooling for bootstrapping. It was submitted for Svelte Hackathon. It worked well, but just wasn't that exciting (running Node alongside your application)...
SURF is the culmination of these ideas. It goes in a new direction, leveraging WASM and an embedded JS runtime to be both embedded directly into your application, AND universally portable for any backend language. Svelte components are AOT compiled to QuickJS bytecode, such that they can be rendered from an embedded Zig-built WebAssembly renderer running inside your application.
Not only that, but SURF also does cross-language type generation giving you end to end type safety and generates a thin api in your host language letting you discover and autocomplete your components directly in your templates. Acheiving cross-language, typesafe, embedded Svelte SSR, is a matter of installing a library!
The goal: drop-in Svelte SSR + hydration for any language that can run wasm. Go is the reference implementation, with more to come.
Writing an interpreter in Zig
I'm following along with Thorsten Ball's excellent book: Writing an Interpreter in Go, but implementing everything in Zig. Zig is a very cool language and an excellent introduction to manual memory management through its unique use of typed allocators. Ball never claimed his Monkey-language compiler was optimized for performance (quite the opposite), so Zig's memory management patterns have presented obvious opportunities to re-think things: "Is there a way to do this bit without heap allocations? Fun.