Quest Language!
Hey guys! Today, I’ll be outlining our entry for the Repl.it Language Jam!
What’s Quest?
Quest is an extremely object-oriented programming language for console (and soon to be web [see Roadmap section]) development written by @SpicedSpices and @bramley. It was made to simple, quick, and efficient.
Our website is https://questlang.repl.co
How Do I Code With Quest?
We have 2 methods currently. You can either:
- A. Fork the Quest source repl and edit the main.qst file. Quest's source repl is at https://repl.it/@QuestLang/Quest#main.qst
- B. Use the very outdated online IDE that doesn’t support input() or many other features. It can be found at https://ide.questlang.repl.co/ (if that doesn’t work then try https://quest-ide.spicedspices.repl.co/).
How Do I Write Quest Code?
Our documentation website is here (https://docs.questlang.repl.co/), but I’ve outlined some basic things here:
- Printing to the console
print(‘Hello World!’);
- Defining variables
var x = 0;
const y = ‘Hello World!’;
- Math
var x = 3;
var y = 1 + 1;
x + y; // x = x + y //
- Concatenation
var x = ‘World’;
print(‘Hello &x !’);
- Comments
// This won’t affect the program’s output //
// Comments are always define like this, even
multi-lined ones! //
- Accepting input from the console
input(‘What’s your age’, $userAge);
Note: userAge is a variable assigned to the user’s input from the console. All built-in functions with returns work like this.
- Defining/calling functions
func functionName {
print(‘Hello World!’);
} // defines function //
functionName(); // calls function //
- For Loops
for(0 to 10 as i){
print('&i iterations complete!');
}
for(5 to 2){
print('iterating again');
}
- While Loops
while(x > y){
x - y;
}
- If Statements
if(x < y){
print('x is less than y');
} else {
print('y is less than x');
}
- Using Extended Features
Random(0, 100, $randNum);
Note: those 2 first numbers are called “parameters” in Quest, and can be called in your code. The $randNum is to set variable randNum to the random number
Also, our full standard library is in our docs: https://docs.questlang.repl.co
More Advanced Quest
- Using variable parameters
Random(0, 100, $randNum);
print(‘A random number has been generated as &randNum . The range to decide the value was &randNum.min to &randNum.max‘);
Roadmap / What We’d Do With The Money
In the future, we plan to build webservers and a rendering engine into Quest (this was actually the thing that was originally going to set us apart, but we realized about a week ago that variable parameters would be easier to make in the time we had). We also plan on making the rendering engine usable with local apps. With the money, we want to buy a domain (questlang.org looks nice, don’t you think?), and sponsor programming YouTubers (JomaTech, Michael Reeves come to my mind) and other creators to use our language in order to reach a wider audience.
Links:
- Quest Source Repl: https://repl.it/@QuestLang/Quest
- Github Repository: https://github.com/QuestLang/Quest
- Showcase: https://questlang.repl.co
- Documentation: https://docs.questlang.repl.co
- Package Manager (incomplete): https://packages.questlang.repl.co
Thank you for checking this out, and we hope you enjoy!
spicy
nice
Looks pretty pog, ngl
@bramley i know right this language is really cool
@bramley what's that profile pic lol?
@DynamicSquid last summer, savannah georgia, 3am, sunburnt
@bramley ah, okay
Neat!
One question: What is the behavior of:
Does it consider everything from the first // to the second // as a comment (and find "Some more comments" invalid), or does it treat each as a line comment?
@fuzzyastrocat everything from the first to the second double slash is a comment no matter what is in it. This is meant to eliminate the need for 2 different types of comments.
In this circumstance, it would throw an error because Some is not a variable or function
@SpicedSpices Ok, interesting.
@fuzzyastrocat yes, it would not read anything from
// A comment
all the way to the second//
, but then readMore things
as part of the code@SpicedSpices Yeah, read your docs — probably should've done that first :D