Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://gitlab.com/inko-lang/inko
Moved to https://github.com/inko-lang/inko
https://gitlab.com/inko-lang/inko
interpreted interpreter programming language rust virtual machine
Last synced: 2 months ago
JSON representation
Moved to https://github.com/inko-lang/inko
- Host: gitlab.com
- URL: https://gitlab.com/inko-lang/inko
- Owner: inko-lang
- License: mpl-2.0
- Archived: true
- Created: 2017-11-02T00:11:14.834Z (about 7 years ago)
- Default Branch: master
- Last Synced: 2024-08-01T19:54:48.374Z (6 months ago)
- Topics: interpreted, interpreter, programming language, rust, virtual machine
- Stars: 158
- Forks: 16
- Open Issues: 47
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Codeowners: .gitlab/CODEOWNERS
Awesome Lists containing this project
- awesome-programming-languages - Inko - Inko is a statically-typed, safe, object-oriented programming language for writing concurrent programs. (Uncategorized / Uncategorized)
README
# Inko
Inko is a language for building concurrent software with confidence. Inko makes
it easy to build concurrent software, without having to worry about
unpredictable performance, unexpected runtime errors, race conditions, and type
errors.Inko features deterministic automatic memory management, move semantics, static
typing, type-safe concurrency, efficient error handling, and more.Inko supports 64-bits Linux, macOS and Windows, and installing Inko is quick and
easy.For more information, see the [Inko website](https://inko-lang.org/). If you'd
like to follow this project but don't have a GitLab account, please consider
starring our [GitHub mirror](https://github.com/YorickPeterse/inko).## Features
- Deterministic automatic memory management based on single ownership
- Easy concurrency through lightweight isolated processes
- Static typing
- Error handling done right
- An efficient, compact and portable bytecode interpreter
- Pattern matching
- Algebraic data types## Examples
Here's what "Hello, World!" looks like in Inko:
```inko
import std::stdio::STDOUTclass async Main {
fn async main {
STDOUT.new.print('Hello, World!')
}
}
```And here's how you'd define a concurrent counter:
```inko
class async Counter {
let @value: Intfn async mut increment {
@value += 1
}fn async value -> Int {
@value.clone
}
}class async Main {
fn async main {
let counter = Counter { @value = 0 }# "Main" will wait for the results of these calls, without blocking any OS
# threads.
counter.increment
counter.increment
counter.value # => 2
}
}
```Inko uses single ownership like Rust, but unlike Rust our implementation is
easier and less frustrating to use. For example, defining self-referential data
types such as doubly linked lists is trivial, and doesn't require unsafe code or
raw pointers:```inko
class Node[T] {
let @next: Option[Node[T]]
let @previous: Option[mut Node[T]]
let @value: T
}class List[T] {
let @head: Option[Node[T]]
let @tail: Option[mut Node[T]]
}
```## Installing
Details about how to install Inko and its requirements can be found in the
["Installing
Inko"](https://docs.inko-lang.org/manual/master/getting-started/installation/)
guide in the Inko manual.## License
All source code in this repository is licensed under the Mozilla Public License
version 2.0, unless stated otherwise. A copy of this license can be found in the
file "LICENSE".