10 Day Challenge
challengerigz(Originally part of Rigging Things Together)
As someone who has written my fair share of Javascript I'm reminded that Brendan Eich created the first prototype for JS in ten days, since I'm rewriting a language I've built multiple times it should be possible (especially with a few crates to help out). My goal is to try to focus on simplicity and performance as I build this again, but there are some odd features that I want and that'll be the bulk of the complexity.
Requirements #
- Only 10 days to build it (no coding outside of stream, use whatever you want, only notes/planning)
- CLI: Run file, REPL
- Debug (stretch goal)
- Syntax Highlighting
- Ability to embed in a webpage (runtime compiled to wasm)
Goals #
Javascript was built with a specific set of goals in mind, this is the slightly arbitrary set I'll be applying to my language:
- duck like typed expressions, every operator can be applied to every type
- default immutable variables
- functions (polymorphic definitions for static like typing functions, elixir/java)
- type definitions (traits/interfaces) and extension functions
- scope based memory management, essentially Region-based memory management
- lifecycles (ability to define sequential stages, like terraform's plan & apply)
- source maps for vm instructions (debug related)
Steps I'll be Following: #
- Build Rigz VM
- rigz-treesitter 2.0
- lexer with logos
- FSM to convert tokens to VM (skip ast)
- CLI (run, repl, debug)
- Website/Docs
My challenge attempt starts with my first stream on August 5 and ends on August 14. I look forward to seeing other people give this challenge a shot; my goals & requirements are based on assumptions for my next steps with this language, if you build a language it can be much simpler. After this challenge I'd like to make an LSP then eventually use rigz for iac, rules/security checks, and eventually a shell/terminal (powered by tauri).