Violet

An expressive, type-safe programming language [![Release v0.1.0][release-badge]](https://github.com/zyrrus/violet/releases) [![Haskell][haskell-badge]](https://www.haskell.org/) [release-badge]: https://img.shields.io/badge/v0.1.0-996677?colorA=151515&style=for-the-badge [haskell-badge]: https://img.shields.io/badge/Haskell-5e5086?logo=haskell&logoColor=white&style=for-the-badge
Table of Contents
  1. About the Project
  2. Getting Started
  3. Usage
  4. Roadmap
## About the Project The Violet programming language draws inspiration from Python's expressiveness, Rust's syntax clarity, and TypeScript's type system. The goal is to create a versatile tool for developers that is easy to learn and doesn't sacrifice performance or type-safety. ## Getting Started Follow these steps to set up a development environment. ### Prerequisites You'll need to have Haskell and Stack set up on your system. I advise installing [GHCup](https://haskell.org/ghcup/install) to manage your Haskell environment. These are the versions I had installed while developing Violet. | | Version | | ----- | -------: | | GHCup | 0.1.20.0 | | GHC | 9.4.8 | | Stack | 2.13.1 | | Cabal | 3.10.2.1 | | HLS | 2.5.0.0 | ### Installation 1. Clone the repo ```sh git clone https://github.com/zyrrus/violet.git ``` 2. Build the project ```sh stack build ``` --- ### Development Guides This section contains small, miscellaneous guides for anything I find helpful that is not specifically tied to setting up the environment for this project. #### Installing Dependencies 1. In `stack.yaml`, add `package-name-version` to `extra-deps` 2. In `package.yaml`, add `package-name` to `dependencies` 3. Build the project again ```sh stack build ``` #### Running GHCI 1. Run the interpreter ```sh stack ghci ``` 2. Run `:set -XOverloadedStrings` in GHCI ## Usage > **⚠️ Warning:**\ > Violet is a hobby project that is still under development. ### Release v0.1.0 (Parser executable) This release contains an executable, `violet.exe`, that just parses a file and prints the program in the form of a list of `Statements` The program expects a single file path argument (demonstrated below). ```sh ./violet.exe path/to/file.vi ``` ## Roadmap - [x] Basic lexer/parser - [x] Comments (block + single-line) - [x] Imports - [x] Function definitions - [x] Variable declaration + assignment - [x] Conditionals - [x] Expressions - [ ] Full lexer/parser - [ ] Type system (definitions + operations) - [ ] Lists - [ ] List comprehensions - [ ] Ternary operations - [ ] Bit-wise operations - [ ] Syntactic sugar (`elif`, compound assignment operators like `x += 4`) - [ ] Semantic analysis - [ ] Compiler ---