You are browsing as a guest. Sign up (or log in) to start making projects!

Open comments for this post

43m 34s logged

Devlog 3

I have fixed major bugs concerning the basic workings of Goa.

Attached below is a screenshot showing all the fixes and new additions in one program.

First, nested commands now work.

Fixing nested commands

Commands like RETURN (BASE (MAX (MULT (ADD (INPUT SUB (INPUT 5)) EXP (2 3)) MIN (10 20)) 2))
now work! I had to add a recursive parser. The old system was based on string splitting, which does not work for nested commands, and caused the system to read nested commands as arguments instead of different commands.

If commands now work

When running If statements in Goa, an error would come out, saying that “handled is not defined.” This is because handled was being declared outside the scope of the function that it need to be in. However, if, else if, and else statements should now work.

Return statements now return values on different lines

I forgot to list this in the commit, but now when you use multiple RETURN statements (like in a while loop or printing out multiple values), each value will print on a different line in the output. Originally, each number would print on the same line, separated by a space. This happened even though I added “\n” to the end of each number. I fixed this by changing the tag that held the output from to to hold pre-formatted text.

Light mode added

Hooray! Light mode now exists for anyone who wants to burn their eyes! I just chose the opposite color for every color on the page. However, I’m not sure if I like the idea of using white lines to divide sections instead of something like dark gray, as white seems like it stands out too much for being a divider. Other than that, I’m pretty proud of how it looks.

I’m not sure if I added this in a previous devlog, but saving and loading works.

You can now save to browser local storage, save to a .goa file on your drive, or load a .goa file :)

Things to do in the future

Firstly, obviously documentation. It is the last thing to go before the basic skeleton of the editor is done. Secondly, I want to add more functions to Goa. Thirdly, I am considering adding string and float compatibility, but I’m not sure yet. Fourthly, I need to save the user’s choice for light/dark mode to localstorage. Finally, just for fun, I want to solve a Codeforces problem with Goa (just to prove that it can work).

0
19

Comments 2

@immaturegoat

OH CRAP I just realized that If statements aren’t perfected yet T-T as you can see, 4 values have been returned instead of 2

@nithilgadde

This is really cool! Will be sure to keep an eye on this.