https://github.com/raulil/snek
Kinda like Python meets TypeScript
https://github.com/raulil/snek
interpreter programming-language
Last synced: 11 months ago
JSON representation
Kinda like Python meets TypeScript
- Host: GitHub
- URL: https://github.com/raulil/snek
- Owner: RauliL
- License: bsd-2-clause
- Created: 2020-09-01T07:40:01.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-02-10T21:20:09.000Z (12 months ago)
- Last Synced: 2025-02-10T21:34:52.537Z (12 months ago)
- Topics: interpreter, programming-language
- Language: C++
- Homepage:
- Size: 476 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# snek

Experimental functional programming language which combines TypeScript typing
system with Python like syntax. Still a work in progress.
## Features
- Syntax inspired by [Python].
- Typing system inspired by [TypeScript].
- Supports following builtin data types, all immutable:
- Booleans
- Functions
- Numbers (separate integers and floats)
- Strings (full Unicode support)
- Lists
- Records (think of dictionaries in python or objects in JavaScript)
- Null
- [Prototype-based programming] just like in [JavaScript].
- Module system where functions, values and types can be imported from other
files located on your file system. In the future possibly from the Internet
as well.
- [REPL].
- Relatively easy to embed into other C++ libraries/applications.
[Python]: https://www.python.org
[TypeScript]: https://www.typescriptlang.org
[Prototype-based programming]: https://en.wikipedia.org/wiki/Prototype-based_programming
[JavaScript]: https://en.wikipedia.org/wiki/JavaScript
[REPL]: https://en.wikipedia.org/wiki/REPL
## How to compile?
You need to have [CMake] and C++17 compiler installed on your system, then do
this:
```bash
$ mkdir build
$ cd build
$ cmake ..
$ make
```
And tada! You can either execute `build/cli/snek` directly or install the
executable to your system by running `sudo make install`. Head over to the
`examples` directory to see what this language has to offer.
[CMake]: https://cmake.org