Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kajizukataichi/scripts
Awesome easy to understand script language, alternative of Python
https://github.com/kajizukataichi/scripts
alternative alternative-pythons programming-language programming-languages script-lang script-language script-languages secure simple small speed static transpiled-language transpiler transpilers
Last synced: about 1 month ago
JSON representation
Awesome easy to understand script language, alternative of Python
- Host: GitHub
- URL: https://github.com/kajizukataichi/scripts
- Owner: KajizukaTaichi
- License: mit
- Created: 2024-07-26T09:05:46.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2024-08-22T15:50:59.000Z (6 months ago)
- Last Synced: 2024-11-06T15:21:06.143Z (3 months ago)
- Topics: alternative, alternative-pythons, programming-language, programming-languages, script-lang, script-language, script-languages, secure, simple, small, speed, static, transpiled-language, transpiler, transpilers
- Language: Rust
- Homepage: https://kajizukataichi.github.io/script-s.html
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ScriptS
this programming language is design for alternative of Python.
Because Python function is very rich, but that grammar is too bad.ScriptS transpile from awesome ScriptS soruce code to Python code.
Python code will run on background.
[Sila](https://github.com/KajizukaTaichi/sila) is used as transpiler infrastructure.In meaning, S stands for Speed, Secure, Simple and Small.
## [Example code](/example.ss)
```
// This program is to solve FizzBuzz;fn fizzbuzz(i) {
if i % 15 == 0 {
return "FizzBuzz";
};
if i % 5 == 0 {
return "Buzz";
};
if i % 3 == 0 {
return "Fizz";
};
return str(i);
};fn add_text(source, text) {
return source + text + " "
};var i <- 0;
var result <- "";
while i < 100 {
var i <- i + 1;
var result <- add_text(result, fizzbuzz(i));
};
print result;
```## Usage
Rust is needed to use ScriptS. You have to install it.sub-command `code` is to run script.
```
cargo run -- run example.ss
```sub-command `code` is to show Python code generated.
```
cargo run -- code example.ss
```sub-command `ast` is to show abstract syntax tree.
```
cargo run -- ast example.ss
```