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

Goa

  • 8 Devlogs
  • 12 Total hours

A small expression-based programming language designed to be lightweight and easy for people to understand.

Ship #1

Goa is a programming language made with javascript. It is designed to be lightweight and expression-based. It has a syntax inspired by Lisp, and focuses entirely on numerical computation. I tried to make it super easy to learn, and the error messages should be easy to understand. I’ll keep working on this in the future though.

  • 8 devlogs
  • 12h
  • 17.54x multiplier
  • 211 Stardust
Try project → See source code →
Open comments for this post

3h 46m 47s logged

Devlog 8 - Goa 1.0

The first full release of my coding language

i’m tired boss image here

Wow, I’m never writing documentation again. This sucks.

Anyway, lots of new things. First, bug fixes

Added RAND and ABS

I don’t even know how this happened. I swear I added this, and it was in past documentation, but it’s not just in the code. I had to quickly write them in.

More parser issues

More complex comparators like <= and >= were being split apart, and so it wasn’t being understood. I also had to rewrite the logic for IF and ELSE IF blocks.

BASE returning NaN for bases above 10

Ok I’m sorry, but I’m too lazy to actually fix this. BASE will now just return an error if you try to convert a number past base 10. I want to keep Goa without any strings.

New statements

Logarithms

The new LOG statement allows you to do logarithms for any base. Hooray!

Trig statements

I added SIN, COS, TAN, ARCSIN, ARCCOS, and ARCTAN statements. Should I call the last 3 ASIN, ACOS, and ATAN? Let me know your thoughts.

Rounding statements

You can now use the ROUND statement to round to a certain number of decimal places. I also added FLOOR and CEIL functions.

More random statements!!

I added RANDFLOAT and RANDSIGN for generating random floats and generating a random sign (-1, 1), respectively.

GCD and LCM

pretty self explanatory

Factorials

Guess my old programs doing factorials are now useless….

Documentation

I’m so exhausted reading through all of it. I’m done. I’m never writing any more documentation again. I hate writing error messages. I hate writing example programs. ARghh

0
0
8
Open comments for this post

1h 5m 25s logged

Devlog 7 - Goa 0.9 Beta

My coding language is now close to release!

Try it out at: https://goalang.vercel.app

In this update, I think I did a good amount of work on the language. I have added float support. Basically, for each variable, now instead of just storing a value, each variable also stores a type - integer or float.

With this new type, we have some things to define.

Firstly, I’m making Goa have strict typing. To convert between types, use the TOINT and the TOFLOAT statements. Goa also uses safe promotion, meaning calculations involving two integers will produce an integer, while calculations involving at least one float will always produce a float.

New stuff!!

New comparators!!!

I can’t believe I didn’t include this earlier, but now here they are! The <= and the >= comparators!

New changes and clarifications… (not as fun)

The DIV statement now only returns integers. The EXP statement now only takes positive exponents and if your base is negative, only odd exponents. The BASE statement now only takes integer statements.

New statements!!!!

With the DIV statement now only returning integers, run the FDIV statement to return floats! Now that the EXP statement no longer takes negative exponents, run the ROOT statement to do roots!

What’s next?

For the 1.0 full release, I plan to add a lot of statements. I also want to add OR and AND statements… but that’s a little too much work for me. I don’t know, I’ll see. I’m planning on adding trig functions, more random functions, gcd and lcm, and more.

I’ll see you guys later!

0
0
7
Open comments for this post

1h 13m 30s logged

Devlog 6 - Documentation for my Coding language!

visit the docs at: https://goalang.vercel.app/documentation.html

Documentation for Goa is now complete. This is Goa 0.8 Beta, because I’ve also finished some final touches to Goa. Before the full release, I plan to add more comparators, floats, and more math functions.

What i’ve added

Smooth scroll

Now when you use the left sidebar to navigate the documentation, the site smoothly scrolls to that section.

Theme changes now save across the IDE and Documentation.

Localstorage now saves theme choice, allowing your theme to be saved when switching pages and when reloading (which I think is kinda sick)

Added a back to top button

Once you scroll down a bit, a back to top button shows at the bottom right, allowing you to scroll all the way back up! (also, it has a pretty cool pop up animation)

Changed formatting

For the tag, I’ve added formatting making it stand out more from normal text!

Lots of animations!

I’ve added several hover animations for navigation links both on the sidebar and within the docs, animations for the back to top button, and a quick pop up animation when you first open up the docs!

Unique scrollbar

i made my own scrollbar :3-blahaj-spinning:

I fixed the parser for the code

now my nested commands work again heheheh

0
0
14
Open comments for this post

2h 20m 58s logged

Devlog 5

omg i’m gonna literally combust

Anyway, so for the past like 2 hours of coding, I’ve been working on my documentation. And I’ve got to say, it absolutely sucks. It’s like I’m writing an essay for my English class. I’m have like 20000 characters, so in like one day my html becomes the largest file here. Big sigh. I’m not even done yet T-T. The reason that I’m so pissed off is I found another bug that I can’t even explained what happened.

Some issue in incrementing variables

So in programming languages, if you want to change a variable by some amount you would run (I’m just gonna explain in pseudocode)
x = x + 1
And this is what you would run (or x += 1 or x ++ or ++x but you get the idea).

So in Goa, you would run

SET (x ADD (x 1))
Basically, it sets the value of x to the sum of x and 1. However, when I run this, I get ERROR: Undefined variable: ADD. However, when I run
SET (x ADD(x 1)) with no space between the ADD statement and the arguments, it works! I have no idea why I can put a space after the SET statement but not after the ADD! I need to check through my tokenizer and parser to see where it is, but the closest issue I can think of is that my code is looking for the next character after the statement, not the next character after the first whitespace.

0
0
32
Open comments for this post

43m 57s logged

Devlog 4

wow I feel like i’ve coded a lot today cuz im jet lagged

Anyway, on to the actual devlog!

If loops ACTUALLY fixed this time

I noticed in the last devlog I posted an image of everything I worked on, like if loops, light mode, nested commands, etc. However, I realized that the output had 4 statements instead of 2. What happened was that the program produced both the outputs for the ELSE IF block AND the ELSE block. That’s now fixed by ensuring that blocks are skipped if the block above them is true. (Also something else I noticed in the screenshot was that the second line of the first IF block actually has an error - whoops, guess I suck at my OWN coding language)

Also, I got bored and started working on the README

It now has a description of the language, example code, and some examples of functions. I’m probably gonna work on it more later though.

Favicon added

There’s now an icon on the tab. I also renamed the code editor from “Goa Language” to “Goa IDE”; although IDE is an overstatement for something as basic as mines.

0
0
8
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).

2
0
47
Open comments for this post

1h 15m 14s logged

Devlog 2

I have finished coding the basic structure of the code. It uses parentheses in a lisp style, so the function is not connected to the parentheses. In the screenshot attached below, you can see a basic function that converts numbers into binary. Users will be able to add, multiply, divide, subtract, mod, abs, min, max, and use random numbers. There will also be while, for, and if loops. Comparators work, and comments use hashtags. I plan for Goa to basically act as a customizable calculator, as it only supports integers (I may add string support later). You can use it to automate boring actions ( cough like a binary worksheet in your Intro to Software Class). I’ve also added saving to localstorage and saving to files (it saves to a .goa file :)).

Known Issues

Nested commands do not work

As of right now, simpler commands like RETURN (ADD (INPUT INPUT)) do work. However, long nested commands like RETURN (ADD (INPUT ADD (INPUT INPUT))) do not work. I am yet to find out why. Probably due to problem 3 (look below)

If loops do not work

For some reason, For and While loops work, but If loops don’t. I don’t know why yet.

Commands that require only 1 argument throw back an error of needing 2, like ABS. RETURN doesn’t throw back and error, despite only needing 1 argument but using the same logic as the others. However, an error is thrown back once the RETURN statement gets really big, like RETURN (BASE (MAX (MULT (ADD (INPUT SUB (INPUT 5)) EXP (2 3)) MIN (10 20)) 2)). I’ll check it out later.

Change theme has no functionality

It’s not that it doesn’t work, I just haven’t implemented it yet :3

0
0
15
Open comments for this post

54m 11s logged

Devlog 1

I’ve been wanting to make a coding language for some time now. I want to make a language that can be easily learned. It’s not going to be that powerful, but I want it to basically allow anyone to repeat math functions.

I have finished the basic outline of the UI. It was heavily influenced by the USACO IDE (as you can see in the screenshot below). It gives a basic outline to the features that I want to build. First, on the left half of the screen is the area where you can code. It is basically a big textarea input. For the input area, this is where people will put in inputs for the code. Same thing here, it is a textarea input. Finally, there is also an output area. Right now, there is just a placeholder, but that will change later.

For the navbar at the top, there are 4 buttons. The first is a link to the documentation. I plan to build another website for the documentation, and I want it to be really easy to understand. Next is a “Save to browser” button that will save the code to localstorage. Next to that button is a “Save to file” button, which I plan to make the website download a .txt file to the computer. The “Load file” basically will allow users to upload code to the website.

That’s really it for now, I’ll come back when I want to explain how I plan how the language will work!

0
0
24

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…