Home

Awesome

q

Godoc Report Tests Coverage Sponsor

This is a very early version of a programming language I'm currently working on.

Installation

git clone https://github.com/akyoto/q
cd q
go build

This will produce the q compiler in your current directory.

./q build examples/hello
./examples/hello/hello

Features

Todo

Compiler

Optimizations

Linter

Operators

Architecture

Platform

Goals

FAQ

How do I navigate the source code?

How do I view the produced assembly output?

q build -a
q build --assembly

How can I make a performance optimized build?

q build -O
q build --optimize

This will disable all expect and ensure checks.

How can I see where my compilation time is spent on?

q build -t
q build --time

How do I install it system-wide?

sudo ln -s $PWD/q /usr/local/bin/q

How can I include information about my system in bug reports?

q system

The output should look like this:

Platform:          linux
Architecture:      amd64
Go version:        go1.13.5
Working directory: /home/eduard/projects/akyoto/q
Compiler path:     /home/eduard/projects/akyoto/q/q
Standard library:  /home/eduard/projects/akyoto/q/lib
Last modified:     2019-12-27 11:06:47.841459978 +0900 KST
CPU:               Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
CPU threads:       12

Which editor can I use to edit Q code?

There is a simple VS Code extension with syntax highlighting.

git clone https://github.com/akyoto/vscode-q ~/.vscode/extensions/vscode-q

Is the syntax final?

Unlikely. There will be changes in the near future.

Which builtin functions are available?

There are currently 2 builtin functions, syscall and print. In the future we'd like to remove print so that syscall becomes the only builtin function.

How do I run the tests?

go test -coverpkg=./...

How do I run the benchmarks?

go test -bench=. ./benchmarks

Style

Please take a look at the style guidelines if you'd like to make a pull request.