UI and a Lisp experiment

This commit is contained in:
Yura Dupyn 2026-04-25 01:10:49 +02:00
parent 38ff06ea45
commit f55b437037
24 changed files with 2746 additions and 89 deletions

View file

@ -1,20 +1,20 @@
https://git.meatbagoverclocked.com/omedusyo/source-region.git
VERY IMPORTANT: All the implementation work and running of commands I'll do by myself. You'll act as an intelligent rubber duck, or as a helpful assistant who will suggest particular commands for me to type in, or how certain functions work, or as a checker for what I'm doing etc. I don't want you to make decisions for me, only help me to check my work/thinking please. You can when appropriate generate snippets of code that could solve my concrete problem - I'll use them as an off ramp to write my own code.
I have this `https://git.meatbagoverclocked.com/omedusyo/source-region.git` ts package that I developed that basically defines its own Char/CodePoint type and uses it to have sane UTF8 strings in typescript. The resulting fat string (the `SourceText`) also tracks newline information and also defines basic abstractions for source location and spans.
CONTEXT:
I have this `https://git.meatbagoverclocked.com/omedusyo/source-region.git` ts package that I developed that basically defines its own Char/CodePoint type and uses it to have sane UTF8 strings in typescript. The resulting fat string (the `SourceText`) also tracks newline information and also defines basic abstractions for source location and spans. It is included as a submodule.
I consider myself a language designer and often have many programming language ideas that I want to try out by making a new toy language.
This time I wish to make something like a very simple Lisp - and the purpose of making it is to use the `source-region` library that I made and perhaps during the development develop another library that would allow to do scanning/tokenization pretty easily over my `SourceText` etc.
Also I'm not really bound for the tokenization to be a simple linear stream of tokens. I'm also considering returning concrete syntax trees even in this basic phase.
But before we do all that, let's create a new typescript project that submodules the `https://git.meatbagoverclocked.com/omedusyo/source-region.git` (via ssh preferably) and then creates a fat string from e.g. just a simple "hello, world" just to make sure everything is working correctly. I'm ok with using e.g. vite for development and doing some toy web app where later we'll implement a REPL/UI as a webapp.
Right now I'm trying to think through of how to write a simple parser for a number. Let's say number is just a simple positive integer like `0` or `1` or `123` or `00122` etc.
All the implementation work and running of commands I'll do by myself. You'll act as an intelligent rubber duck, or as a helpful assistant who will suggest particular commands for me to type in, or how certain functions work, or as a checker for what I'm doing etc. I don't want you to make decisions for me, only help me to check my work/thinking please.
Start of by reading the README.md of the source-region library.
```
git submodule add git.meatbagoverclocked.com:omedusyo/source-region.git libs/source-region
```
npm run parser:experiments