A simple, non-typed, compiled programming language!
Explore the docs »
Report Bug
•
Request Feature
•
Example Code
Table of Contents
Building a programming language has been a personal dream of mine for a long time, so this repo is the culmiation of about 3 years of dreams, and a weekend's work. I personally intend to use it for my future projects, and I beleive you should too.
Here's why:
- Non-Typed.
Cast variables simply by just declaring them.
- Simple syntax.
The syntax of Sack, is heavily based on BASIC and this is no mistake. BASIC is easy to learn, and use while still having immense depth, so sack is a modernization of those same ideals.
- Highly Performant.
Since Sack compiles to C it runs close to machine code, with easy to understand while still allowing the fast speeds of bare-metal code.
At least, thats the theory. I've only started the implementation of Sack, and so at the moment it's little more than a modified implementation of BASIC with some renamed tokens. Some of the things i'll implement first include direct access to c code and a standard math library for working with more complex data structures like arrays and trees.
A list of articles, tutorials, etc that I find helpful are listed in the acknowledgements.
Here's a few languages, libraries, and tools that I personally use to develop Sack
To get started with the syntax check out the full documentation, the steps below will walk you through downloading and running the example program on a unix-like machine
First you'll need to install a few programs.
- python Currently the version of python that Sack uses in its compiler is 3.9.5. You can download it here
- gcc You'll also want a working version of gcc, in order to run the outputted c code. A branch is currently being developed which will allow interpretation on systems without gcc installed. You can download gcc here
- Clone the repo
git clone https://github.com/nobody5050/Sack.git
- Compile Sack to c
python3 compile.py example.sk
- Compile the
out.c
to an executablegcc -o example out.c
- Run the executable, and see your program in action!
./example
Follow the above Getting Started steps in order to compile your first Sack program. From there you can check out the documentation for Syntax and example programs. If you need help dont hesitate to ask me on discord at Nobody5050#8971
Please refer to the Documentation
The following are planned features which will be implmented at highest priority. Features are listed in no particular order.
- Standard math functions. ROUND, PI, SIN, COS, TAN, etc
- Graphics. Drawing a window, fonts, 2D and 3D shapes, Textures
- Access to the C standard library
See also the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Project Link: https://github.com/nobody5050/sack