• OCaml 99.1%
  • Emacs Lisp 0.5%
  • Standard ML 0.2%
Find a file
2026-03-02 22:32:13 +01:00
.github/workflows Update OCaml version for github ci 2026-02-01 20:54:17 +01:00
bin Print proper error if input file is missing 2026-02-12 19:28:40 +01:00
lib Remove pipe last operator 2026-03-02 22:32:13 +01:00
std Add opt fmter 2026-02-12 19:28:32 +01:00
test Remove pipe last operator 2026-03-02 22:32:13 +01:00
.gitattributes Fix stats 2021-10-29 20:37:17 +02:00
.gitignore Add random module 2026-01-02 23:36:55 +01:00
.ocamlformat Specify ocamlformat version 2025-06-30 22:51:28 +02:00
.woodpecker.yml Bump container 2026-02-09 22:06:07 +01:00
.woodpecker_release.sh Update container to fix CI 2026-01-14 08:46:39 +01:00
dune-project Pass a few more tests 2026-01-27 23:04:55 +01:00
LICENSE License under EUPL v. 1.2 2024-03-26 22:57:16 +01:00
README.md Remove pipe last operator 2026-03-02 22:32:13 +01:00
schmu-mode.el Fmt on save in schmu mode 2026-02-05 07:58:32 +01:00
schmu.opam Pass a few more tests 2026-01-27 23:04:55 +01:00
schmu.opam.locked Use LLVM 14 2023-04-21 22:00:54 +02:00

schmu

Strongly typed, compiled pet programming language.

Disclaimer schmu is a passion project which I develop for fun. Please don't use it for anything too serious. Also, the name will most likely change.

schmu is the language I'd like to program in: A strongly typed, type-inferred compiled language that can be programmed in a functional way (see below). It prefers stack- over heap allocations, and can easily interface with C code. Think OCaml, but slightly more control over allocations and data layout.

Here's what it looks like:

Fibonacci example

-- variable binding
let number = 35

-- calculate fibonacci number
fun rec fib(n) {
  match n {
    0 | 1 -> n
    _ -> fib(n - 1) + fib(n - 2)
  }
}

-- and print it
use fmt
println(int, fib(number))

More examples can be found in the skeleton std library or the test directory.

Features

  • Functional schmu is a functional language based on a Hindley-Milner type system. This means all the basic features one might expect from an ML style language are (will be) present, like

    • Parametric polymorphism
    • Higher order functions and automatic closures
    • Algebraic data types and pattern matching
    • Module system
    • Full type inference within a module, but interfaces between modules
    • Focus on recursion
  • Mutable Value Semantics schmu implements mutable value semantics a la hylo/val. This means references are second-class citizens and cannot be stored in records or returned from functions. To make this feasible, schmu has move semantics and a simple borrow checkers for downward borrows, such as arguments to functions.

  • Practical schmu aims to be a practical language. Data types are unboxed to make it straightforward to use C code. It doesn't try to compete with the fastest languages out there, but should be reasonably fast thanks to LLVM. It also doesn't try to be a system programming language. Some low-level access necessary to interface with C code, but that's not what schmu excels at.

Current focus

  • Tree sitter grammar
  • Test-driving the language