🌕 Night - My Programming Language 🌑
DynamicSquid (4893)

Night

I feel like my logo is a little too fancy. I'm working on something simpler. Any suggestions?

Hey guys! This is my language I'm currently working on. It's still in early development, so it can't do much yet, but I still have a long way to go.

Also thanks to @ChezCoder and @targetfanttthat for helping me out in the early stages of my language. And thanks to @mathiasaboye as well for the logo idea.

You can also view my language on GitHub as well for more details and an inside look at future plans, and the code! And don't forget to leave star :)

Anyway, I modified it a bit here, so you can run the repl and code directly. All you have to do is run the repl, write your code in the console, and then, type in RUN, and hit ENTER to run the code.

Like this:

print "Hello World!\n";

RUN

Try it out!

Note: To paste text in the console, use Ctrl + Shift + V.

Another Note: The RUN command actually isn't part of my language, but I added it in so it's easy for you guys to run the code here.


Documentation

Standard input:

print "Hello World!\n";

// this is a comment

RUN

It can basically print any expression (you'll see later).

Variables:

// variable initialization
bit a = true && false; // bool
syb b = 's'; // char
int c = 2 + 3;
dec d = 3.14 * 2.73; // float
str e = "squid";

int f; // variable declaration
f = 10; // variable assignment

RUN

Expressions:

Note: operator precedence follows C++ style.

int a = 2 + 3; // supports '+ - / * % ( )' all of those
print a % (2 + 1);
print "\n";

bit b = !true && false; // supports `! && || == != ( )` all of those
print true && ("Squid" == "smart");
print "\n";

str c = "dynamic " + "squid"; // supports string concatenation
c = c + " is smart";
print c + "\n";

RUN

If Statements:

This is the good part :)

int numberOfLegs = 10;
bit isSmart = true;

if (isSmart && (numberOfLegs == 8 || numberOfLegs == 10))
{
	// nested if statements work fine!
	if (numberOfLegs == 8)
	{
		print "You're an octopus!\n";
	}
	else
	{
		print "You're a squid!\n";
	}
}
else if (!isSmart && numberOfLegs == 2)
{
	print "You're a human!\n";
}
else if (isSmart && numberOfLegs == 4)
{
	print "Hi pet!\n";

	if (true)
	{
		print "Dogs are better than cats\n";
	}
	else
	{
		print "Cats are better than dogs\n";
	}
}
else
{
	print "Who are you??\n";
}

RUN

And that's it! Make sure to check out my GitHub page for more info! And feel free to leave any feedback or questions in the comments below.

Enjoy :)

You are viewing a single comment. View All
StringentDev (223)

How did you create the programming language?
good job btw

DynamicSquid (4893)

@Lethdev2019 oh you can check out my github page for more info on the code. also thanks!!

StringentDev (223)

i cannot keep this in anymore:
can i help build and refine the website?

I have been building a css library called "Flightcss" which is fully customisable in theme. (even MarcusWeinberger likes it)

If i am able to help - i will need a nodejs repl (also, if you create a team called "night" you can get a url like "web.night.repl.co") called "web" (if you have a team called Night). that is literally it.

also, the current website violates one design recommendation (google even recommends this) - do not use black and white.
this is due to eyestrain so it is better if you use #222 and #eee or #222 #ddd.

still though great work so far! :)

@DynamicSquid

DynamicSquid (4893)

@Lethdev2019 hmm... sure I guess. I'm not that good with html (the only html I know is from w3schools lol) so I probably won't be of much help. want me to invite you?

also about the url, I'm just coding on repl.it, but i'll definitely switch over to another domain name once i'm done

StringentDev (223)

Hi dynamic squid - can i ask you to come look at the webpage. sadly, i could not accept the changes made as they would cramp the page on mobile and having search on references is not a good idea as the search is for the entire site. but search now works. search for "display" and then "hghhdgfj" (you need to press enter.) @DynamicSquid

StringentDev (223)

@DynamicSquid we also, we have 17 results so far, come on to the night repl so we can talk further.
thanks,
lethdev2019.

CuriousMonkey (48)

can you give me a link i cant find it [email protected]

CuriousMonkey (48)

can you give me a link to your github page where it shows you how to make a [email protected]

DynamicSquid (4893)

@CuriousMonkey you mean a tutorial on how to make a language?

CuriousMonkey (48)

ye you said it was on your github page but i couldn't find it there @DynamicSquid

CuriousMonkey (48)

@DynamicSquid OOF well can you make one in the future i wanna get 5000$ dollars for the jam xD

DynamicSquid (4893)

@CuriousMonkey too lazy lol. really busy with actually making the language. maybe once it's done idk