Crates.io | core-mumu |
lib.rs | core-mumu |
version | 0.6.0 |
created_at | 2025-07-01 03:21:09.640748+00 |
updated_at | 2025-08-29 16:11:14.374969+00 |
description | Mumu is a language for those in the now and that know |
homepage | https://lava.nu11.uk |
repository | https://gitlab.com/tofo/mumu |
max_upload_size | |
id | 1732686 |
size | 731,860 |
Mumu is an extensible, embeddable scripting language for data pipelines, array programming, and functional workflows. Mumu is written in Rust and supports high-level scripting, powerful plugin APIs, and a modern REPL with partial application, placeholder, and Fantasy Land style functional conventions.
./target/release/mumu
You'll see:
Burn in Lava 0.3.0
>
Create a file example.mu:
extend("array")
double = n => n * 2
slog(array:map(double, [1,2,3,4]))
// Output: [2,4,6,8]
Run with:
mumu example.mu
First-class functionals, closures, composition (compose, pipe), partial application with placeholder support
Example:
compose(
slog,
x => x + 1,
x => x * 2
(10) // Output: 21
Partial Application & Placeholders
add3 = math:add(3)
sput(add3(10)) ## 13
subtractFrom = math:subtract(, 5)
sput(subtractFrom(20)) # 15
Arrays and Objects
b = [name: "Alice", age: 30]
getter = array:prop("name")
sput(getter(b)) // "Alice"
GPU Acceleration (if Vkulan available)
extend("gpu")
A = gpu:to_tensor([[1,2],[3,4]])
B = gpu:to_tensor([[5,6],[7,8]])
C = gpu:add(A, B)
slog(gpu:o_array(C))
Event, Net, File, and More
Sample:
extend("event")
event:timeout(1000, () => {
slog("1 second elapsed!")
})
extend("file")
file:write("hello.txt", "Hello, world!")
&gap ## See the /examples/ and /tests/ folders for usage.
.
`-- src/ # Core interpreter and language engine
. -- array/ # Array plugin
. -- math/ # Math plugin
. -- flow/ # Streaming/functional plugin
. -- gpu/ # GPU plugin (Vulkan compute)
. -- event/ # Async/timers
. -- file/, fs/, net/, process/, sqlite/ # System/IO
. -- examples/ # Sample scripts (.mu)
. -- tests/ # Self-tests (.mu)
```
### Documentation
- [Main documentation](src/public/main.html) -- static site with all functions, docs, and examples
- Syntax highlighting: [src/public/syntax-highlighting.json](src/public/syntax-highlighting.json(
- For a full reference, see /examples/ and /src/public/functions/.
### Running Tests
```sh
make test # or run `test:all()` on the REPL
```
### Contributing
Contributions are welcome! Please open issues or pull requests for bugfixes, new plugins, or language ideas.
- Minimum supported Rust version: 1.67+
- Code is MIT or Apache-2.0, see [LICENSE](LICENSE).
### License
MIT and Apache-2.0
----
Lava -- Burn the code, melt the bugs, flow the data.