Dev Diary 8

Curzon Raku, my beloved old friend There's a larger post bubbling in the back of my head about this, but for now, lets say that digging into Raku feels a lot like rediscovering an old friend. At the same time, I'm realizing that I've changed. Raku is… brilliant. I regret not having stayed in touch with it during it's rather prolonged development (21 years!!). You see, I loved Perl 5.
Read more →

Dev Diary 5

Back to writing a Language target Or… not. It turns out that I dramatically overestimated the amount of documentation available for creating a new language target for Antlr4. Basically it boils down to "edit one of the existing targets" Except there are all sorts of template directives in there that aren't explained. I suspect the String Template documentation will probably address the syntax enough for me to understand the "what" of these templates but not the "why".
Read more →

Dev Diary 7

Target Woes Started writing a tiny grammar in Janet last night just to get a feel for it. Wrote one that matches my multi-line comments which I'll need for the initial pass of the parser. Discovered some problems. Janet's PEG doesn't support unicode out of the box. It's stuck in ASCII land. Gods forbid anyone wants to try and match a string that was written in another language.
Read more →

Dev Diary 6

Nanopass Compiler? I realized that in order to really leverage my contract stuff I'm going to need a multi-pass compiler. For example, I want to have the compiler let you know that there's a problem when you feed the output of a function that returns an Integer to the input of a function that takes a String. You can't do that until you've ingested all the functions in your app, and processed their contract definitions.
Read more →

Dev Diary 4

Lambda Lambda Lambda I'd come up with the temporary syntax of ~>[args]{function body} for lambdas but it was very not in line with the rest of the language, and not at all self-evident, and I just didn't like it. Then i saw how python handles it: # lambda arguments : expression x = lambda a : a + 10 print(x(5)) So what if we built off of that?
Read more →

Dev Diary 2

The Language So far In the prior post I described how Tuplet came to be. This post is going to lay out where the language stands today. What is actually written As of today, it's just a grammar. Antlr can convert this into a lexer and parser for me, but before I do that I'll have to create a new language target for Antlr. Specifically, I need to create a target for Janet.
Read more →

Dev_diary_3

Building an Antlr4 Language Target As mentioned in the last post I need to create an Antlr4 language target for Janet (the language Tuplet will compile to). There are 4 minor problems. I've never created an Antlr language target There are no existing Antlr language targets for a lisp to learn / copy from. I haven't touched Java since like 2009 (13yrs). I've never programmed anything more sophisticated than a "hello world" in Janet.
Read more →

Dev Diary 1

This first development diary is going to be long. There's a lot of thinking to write down before I can catch you up to where I today; July 23, 2022. The origins of Tuplet I write a lot of utility scripts. For years I've been writing them in Bash becasue I've wanted them to be something I could share with my peers. One day, I just got sick of having to fight with yet another piece of Bash's weird syntax.
Read more →