Git Product home page Git Product logo

myrddin's Introduction

Myrddin

Myrddin Website and Documentation

Myrddin is a systems language that is both powerful and fun to use. It aims for C like low level control, a lightweight high quality implementation, and features you may find familiar from languages like like rust and ocaml.

This combination makes Myrddin suitable for anything ranging from desktop applications, to embedded systems and potentially even kernel development.

Build

If you are building from development then issue make bootstrap after the call to ./configure.

  • ./configure
  • make
  • make install

The result will be, among other things, the binaries 6m and mbld.

Usage

Compile and execute: mbld -R test.myr

Compile into a binary: mbld -b binary test.myr

Examples

A classic:

use std

const main = {

	for var i = 0; i < 1000; i++
		/* pattern match on a tuple */
		match (i % 3, i % 5)
		| (0, 0): std.put("fizzbuzz\n")
		| (0, _): std.put("fizz\n")
		| (_, 0): std.put("buzz\n")
		| _:
		;;
	;;
}

How about regex, destructuring and algebraic data types?

use regex
use std

const main = {
	var re, str

	str = "match against this!"
	match regex.compile(".*")
	| `std.Ok r:	re = r
	| `std.Err m:	std.fatal("couldn't compile regex: {}\n", m)
	;;
	match regex.exec(re, str)
	| `std.Some _:  std.put("regex matched\n")
	| `std.None:	std.fatal("regex did not match\n")
	;;
	regex.free(re)
}

More examples and a complete feature list can be found on the website.

Status

Solid Engineering

Try It Online

The online playground is a good place to get started with little setup.

Online Playground Environment

API Documentation

Myrddin ships with standard library which covers many common uses. It is becoming more useful every day.

API Reference

Mailing List

Annoucements of major changes, questions, complaints. We also give relationship advice.

Mailing List Archives

Subscribe Here

Supported Platforms

Myrddin currently runs on a number of platforms

  • FreeBSD
  • Linux
  • NetBSD
  • OSX
  • OpenBSD
  • Plan9front

myrddin's People

Contributors

oridb avatar s-gilles avatar typeless avatar andrewchambers avatar michaelforney avatar cbvi avatar iriri avatar lucasvuotto avatar fsx avatar mpu avatar refi64 avatar nayuki avatar rcorre avatar mna avatar bitmappergit avatar snocl avatar adrianparvino avatar andrewla avatar jturner avatar krytarowski avatar akkartik avatar meai1 avatar iitalics avatar henesy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.