CBerJun

CBerJun

0-day streak
Continue working on Muffin, a programming language I made that allows you to write programs that look like cooking recipes. I started doing the dreadful frontend today---an online playground for Muffin. Finally got the CodeMirror editor to work. Then I added syntax highlighting and autocompletion for Muffin.
https://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/c78f1c09-e0dc-4d57-b3cd-6f3326412057-scrapbook241201.png
pan_with_egg emoji
Today I wrote a Hello World! program. In fact, it was written in a programming language I invented. The Muffin language lets you write programs that look like cooking recipes. The picture below shows how the compiler compiles the Hello world recipe into a big chunk of js code that (surprisingly) prints out Hello world. Most part of the code generator was done now. Repo: github.com/CBerJun/Muffin
https://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/ee60dfd5-0569-41cd-aaa7-df1768ce0ed1-scrapbook241130.pnghttps://imgutil.s3.us-east-2.amazonaws.com/fb169ccbecdf2d0adbe8c8d8f5cee9dce1c534289db068090cdde8abff3cbcea/5a6ba514-774a-4d42-95e8-d215f6c6a3d4.png
Continue working on Muffin (a weird programming language that allows you to write programs that look like cooking recipes). Day four working on the parser---it is now done (all the statements have been implemented). Next step would be doing some semantic analysis to make sure the program is valid and generating target code (JavaScript) (gonna figure out a way to implement goto in js) (Day 5 on Scrapbook)
https://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/ae26ebac-d545-4da1-bb98-f3cde8d30ef5-scrapbook241129.png
js emoji
goose-honk-technologist emoji
pan_with_egg emoji
Continue working on Muffin (a weird programming language that allows you to write programs that look like cooking recipes) Regarding the syntax I changed the "dilute" statement into "add water" to make it less redundant. Day three working on the parser; today I implemented the "add ... into ..." grammar; the picture below shows a sample program that doesn't make sense and the AST generated for it by the compiler. Look at github.com/CBerJun/Muffin for the draft design of Muffin. (Day 4 on Scrapbook)
https://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/734c4a6b-aa85-4527-aced-d0d8a2444ea9-scrapbook241128.pnghttps://imgutil.s3.us-east-2.amazonaws.com/fb169ccbecdf2d0adbe8c8d8f5cee9dce1c534289db068090cdde8abff3cbcea/6c7e158a-5031-44c5-909d-a8ef7dd14e22.png
Continue to work on Muffin (a weird programming language that allows you to write programs that look like cooking recipes) Day two working on the parser; today I implemented the "if" predicate and "set up" grammar; the picture below shows a sample program that doesn't make sense and the AST generated for it by the compiler. (Day 3 on Scrapbook)
https://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/86a4ce30-e01f-4adb-b6fc-605ab4b55d0e-scrapbook241127.png
Continue my work on Muffin (a weird programming language I invented that allows you to write programs that look like cooking recipes) Today I worked on the parser; all "toplevel" grammars have been implemented; now the parser only lacks a function that generates the AST node for each statement.
https://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/9113b2fa-52bb-4fbc-86d9-98f1f91eac3b-scrapbook241126.png
pan_with_egg emoji
A few days ago I started making this weird programming language called Muffin in which you can write programs that look like cooking recipes. Currently I have a tokenizer done. Today I spent time changing the design of a few statements. Repo: github.com/CBerJun/Muffin
https://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/addf4389-a6c2-4ad2-a43a-f428096acf3e-scrapbook241125.pnghttps://imgutil.s3.us-east-2.amazonaws.com/fb169ccbecdf2d0adbe8c8d8f5cee9dce1c534289db068090cdde8abff3cbcea/f336ecfc-9f8e-4375-b234-d575dd54f681.png