Functions now infer the type of what you are inferring and explicitly state it in the translated code, as required by Rust. I’ve also been filling in the gaps in my coding language by adding continue, break, and mod operators. Comments were a struggle due to my incompetence with Rust, but I eventually got them working as well. Again, you can see the source code on the right and the translated code on the left.
After quite a bit of code refactoring, all of the above work!
Nudl now tracks where in the source code a token is written for concise error messages. To make function parameters work, I had to change the generated code to use closures instead of functions in order for the parameters to work without explicit types.
Below is code with an intentional syntax error (on the right) and the error message in the console below. On the left is the generated Rust code (before I made the syntax error)
The parser and lexer now support math operations and comparisons! If statements can be nested as well, and plenty of cursed customization options also work with a simple edit of a JSON file. I’ve mostly been working on reworking the translator and parser to allow for nesting and operations, but now it (mostly) works! In the image below, the translated code is visible on the left, the source code is on the right, and on the bottom is the terminal output of running the project.
I started writing the translator and I got the first couple of lines to translate. Right now, only variable definitions, assignments and the print function translate over. In the image below, you can see the generated Rust code on the left and the source code on the right.
Now after the raw source code is tokenized, I feed the raw tokens to the parser, which matches different patterns of tokens to various types of nodes like defining a variable and calling a function! I’ve started working on building AST trees from these nodes. The image below shows the output of the parser, correctly identifying when I call a function or define a variable
First bit of parsing works! Right now, I’m working on the lexer, which turns your source code into tokens. The image below is what I got working so far: for now it prints the type of token it detects and then moves on to the next one. It correctly identifies the var keyword and String literals and assignment operators.
It is my own programming language with no set syntax. The way it works is you define your own syntax in the flavor.json file, and nudl will parse and translate your code into a Rust project. You can then build your nudl program to a native binary that runs blazingly fast. For support for Rust libraries, maps are used to translate Rust libraries into whatever syntax or names you want. So far, I’ve started learning Rust and coding the basic implementation of the nudl CLI interface in Rust. Running nudl create your-project will create a project folder set up like the one in the image below.
Made and troubleshooted a Windows build, as well as publishing the first release on Github
Made a demo website that doesn’t use the server, adding a popup to avoid confusion and showing a message when trying to use unavailable features
User details editing in settings + revamped user selection screen + creating new users at login screen
Fixed touchbar button + added desktop app names in device selection screen
Settings page with server url customization
Removing songs from playlists and adding songs to your queue
Fixed search results + added search on mobile, improved skip/previous animation on mobile, and finished offline implementation.
Playlist name editing + started offline playback implementation
Re-coded smart shuffle + made the queue show the currently playing song
Cross-device sync with playback on multiple clients, as well as some (pretty bad) latency compensation