I've demoed my Kopi language and Rect-Desktop proj...
# share-your-work
I've demoed my Kopi language and Rect-Desktop projects a few weeks ago. In my experience writing Kopi, I've always wanted to write a "How to Write a Programming Language" tutorial based on it, since the core language is simple and familiar (infix operators, assignment, anonymous functions, etc.). Here's the start of something (written in Markdown, presented using the React-Desktop Markdown app: https://mike-austin.com/react-desktop/?app=markdown&args=/Let%27s%20Build%20a%20Language.md&width=1280&height=1440 It's in an early draft. I like presenting ideas very incrementally, and being able to see and even interact with each small change. You can modify any of input or parser code and see the result value change.
I'm excited to see more of this. Don't have my head properly wrapped around Kopi yet (especially the
syntax) but I love how concise and powerful it looks.
Is there a GitHub repo for Kopi, React Desktop, etc?
Thanks Yoz! The recent version of Kopi is in a private repo, which I need to migrate to my public Kopi repo - maybe over the holidays. The '(expression) syntax is like LISP's quotes, meaning you get the unevaluated expression tree back.
is literally a StringLiteral AST node. I hijacked it to support calling methods so you can write
'sin 30
'(toFixed 2) 5
to call methods. I've only really used it for this purpose (calling methods), so maybe I should just limit it to that. You can say
'foo == 'foo
, which is true, which can be used like atoms/symbols in other languages.