// guess the programming language of the day

$ whois mojo

Mojo

first released in 2023 · by Chris Lattner, Modular

$ guessprog --inspect mojo

year
2023
paradigm
multi paradigm
family
other
memory
ownership
binding
static
safety
strong

MOJO(7)

AUTHORS
Chris Lattner, Modular
HISTORY
Mojo was announced in 2023 by Modular, the company co-founded by Chris Lattner, who had previously created LLVM and Swift. It aims to combine Python's syntax with the performance of C++ and CUDA, so that AI developers can write fast kernels for CPUs and GPUs in a single language. It is built on MLIR, a compiler framework for heterogeneous hardware, and borrows value semantics, ownership and borrow checking from Rust and Swift to manage memory without a garbage collector.
USAGE
A young language, used mainly with Modular's AI inference platform and for GPU programming. Its standard library is open source, and the community is small but growing.
SEE ALSO
Mojo on Wikipedia ↗
$ cat fib.mojo
fn fib(n: Int) -> Int:
    # typed, compiled to native code
    if n < 2:
        return n
    return fib(n - 1) + fib(n - 2)

def main():
    for i in range(10):
        print(i, fib(i))