/sack

Primary LanguagePythonApache License 2.0Apache-2.0

Contributors Forks Stargazers Issues Apache License


Logo

Sack

A simple, non-typed, compiled programming language!
Explore the docs »

Report BugRequest FeatureExample Code

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgements

About The Project

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.

Built With

Here's a few languages, libraries, and tools that I personally use to develop Sack

Getting Started

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

Prerequisites

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

Installation

  1. Clone the repo
    git clone https://github.com/nobody5050/Sack.git
  2. Compile Sack to c
    python3 compile.py example.sk
  3. Compile the out.c to an executable
    gcc -o example out.c
  4. Run the executable, and see your program in action!
    ./example

Usage

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

Roadmap

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).

Contributing

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.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Project Link: https://github.com/nobody5050/sack

Acknowledgements