Getting started

Note: This tutorial assumes you have a decent amount of programming knowledge.

Installation

To install Quark, you must clone and compile the source.


git clone https://github.com/nate-telecomm/quark-lang
cd quark-lang/src/
go build
cd -
sudo mv quark-lang/src/quark /usr/bin/
rm -rf quark-lang/
    

I know most times you compile some big project, you get like 50 million errors and you have to configure a bunch of stuff. But, this is written in Go, therefore compilation should be quick and easy.

1. Everyone starts somewhere??

Hello, World!

Create a new project directory like helloworld and run quark new HelloWorld, you should then see


[LOG] Created new project HelloWorld
    

Go ahead and create a file, but make sure it ends with .quark and add the following


print("Hello, World!");
    

Then, run quark glue this, and it should output HelloWorld.gluon.


To run it, do quark superglue HelloWorld.gluon, to which you should get


[LOG] Created Gluon mount
Hello, World!
[LOG] Cleaning up...
    

If so, then, congrats! You wrote your first Quark program!

Well... what happened?

Firstly, Quark goes through all .quark files and converts their source into bytecode for the Quark VM. Once thats done, all the bytecode is combined into a single source file. Then, a 'mount' is created, where the new source file (source.glue) and quark-proj.json is placed. It is then compressed, and outputs a Gluon.

What is Glue and what is a Gluon??

A Gluon is a self-contained Quark program. It contains the bytecode and metadata of the program.

Glue is the package manager for Quark. It is in charge of