https://github.com/azer0s/hadeslang
The Hades Programming Language
https://github.com/azer0s/hadeslang
csharp dotnet-core interpreter language programming-language scripting-language wip
Last synced: about 2 months ago
JSON representation
The Hades Programming Language
- Host: GitHub
- URL: https://github.com/azer0s/hadeslang
- Owner: Azer0s
- License: mit
- Created: 2016-12-15T10:03:12.000Z (over 8 years ago)
- Default Branch: develop
- Last Pushed: 2020-05-04T12:42:48.000Z (about 5 years ago)
- Last Synced: 2025-04-06T12:06:44.903Z (3 months ago)
- Topics: csharp, dotnet-core, interpreter, language, programming-language, scripting-language, wip
- Language: C#
- Homepage: https://hadeslang.gitbook.io/doc
- Size: 1.9 MB
- Stars: 36
- Watchers: 8
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
## [WIP] Hades Programming Language
[](https://travis-ci.org/Azer0s/HadesLang)
[](https://github.com/Azer0s/HadesLang/blob/master/LICENSE)## Welcome!
This is the official repository for the reference implementation of the Hades Programming Language (standard library & interpreter).
### Hello world
```js
with console from std:io
console.out("Hello world")
```### Pipelines
```js
with list fixed from std:collections
with console from std:iovar fruits = list.of({"Apple", "Banana", "Mango", "Kiwi", "Avocado"})
fruits
|> map(??, {x => x.toLower()})
|> filter({x => x.startsWith("a")})
//if ?? is not in the parameters, the method is inserted as the first parameter
|> forEach(??, {x => console.out(x)})
```### Function guards
```swift
with console from std:iofunc myFunction(a int) requires a < 10
console.out("a is smaller than 10")
endfunc myFunction(a int) requires a > 10
console.out("a is greater than 10")
endmyFunction(5) // a is smaller than 10
myFunction(17) // a is greater than 10
```### Actors
```swift
with msg from std:io
with sleep from std:timefunc ping()
receive(m)
{:ping, data} => {_ =>
sleep.seconds(1)
send(data, :pong)
}
end
ping()
endfunc pong()
receive(m)
{:pong, data} => {_ =>
sleep.seconds(1)
send(data, :ping)
}
end
pong()
endvar pingPid = spawn({_ => ping()}
var pongPid = spawn({_ => pong()}send(pingPid, {:ping, pongPid})
```### Fibonacci sequence
```js
with console from std:iofunc fib(n)
if((n is 0) or (n is 1))
put n
end
put fib(n-1) + fib(n-2)
endfib(10) |> console.out
```### Optional static typing
```js
with console from std:iofunc fib(n int64) -> int64
if((n is 0) or (n is 1))
put n
end
put fib(n-1) + fib(n-2)
endfib(10) |> console.out
```## Getting Started
Learning Hades and writing your first programs.
### [Installing Hades](https://hadeslang.gitbook.io/doc/getting-started/installing-hades)
Instructions for downloading HadesLang and/or embedding it into your programs.
### [Basic Syntax](https://hadeslang.gitbook.io/doc/getting-started/basic-syntax)
Hades basics and quick introduction into the language.
### [Coding Conventions](https://hadeslang.gitbook.io/doc/getting-started/coding-conventions)
Current coding style for HadesLang.
## References
### [Language Spec](https://hadeslang.gitbook.io/doc/language-spec)
The official HadesLang specification.
### [Package Documentation](https://hadeslang.gitbook.io/doc/core-libraries/standard-library)
Documentation and definition of the Hades standard library.
### [Tool Documentation](https://hadeslang.gitbook.io/doc/other/tools)
Documentation for HadesLang tools.
### [Examples](https://hadeslang.gitbook.io/doc/other/examples)
Examples of Hades in use.