Myrddin: Releases: 0.3

Myrddin 0.3.0: "Stand Back, We're Proffessionals"

Myrddin 0.3 has been released. This is the first Myrddin release that is being used in a commercial setting. Sure, it's a continuous build system, and one day we'll outgrow it within the org, but for now, that makes us a commercial success, right?

Stand Back, We're Proffesionals

Downloading

The release has been tagged with r0.3.0 in git. If you want a tarball, you can get it from here:

Reporting Bugs, Getting Help

Most discussion is on IRC, in #myrddin on irc.eigenstate.org. You can join using your favorite client, or through a web browser via something like kiwi IRC

We are also responsive on the mailing list.

Endorsements

"Wait, we're using this garbage? Why?" -- CTO, Markov Corporation

Major Highlights since 0.2

Lots of churn. The bulk of the code size increase has been adding tests for many of our libraries.

$ git diff --stat r0.2.2..HEAD | tail -n 1
322 files changed, 34451 insertions(+), 3860 deletions(-)
$ git log r0.2.2..HEAD --pretty=oneline | wc -l
359

Breaking changes

Other Developments

Feature Descriptions

In token

This change is pretty simple, but affects a lot of code:

for elt in sequence
    frob(elt)
;;

Can now only be written as

for elt : sequence
    frob(elt)
;;

This isn't a semantic change, but a trivial syntactic one. It frees up a perfectly good variable name that I've wanted to use more than once.

This was a warning in the 0.2 series, and now it's a hard error.

Dependent tags

Mbld now supports setting build tags that are dependent on other build tags. Beside your bld.proj, there may now live a bld.tags, which contains lines of the form:

foo
bar: baz sse4
baz: freebsd
baz: openbsd
quux: bar baz x64

These lines set the tag on the right hand side if all of the tags on the left hand side are satisfied. If there is no right hand side, then the tag is unconditionally enabled. If you want to have an or of the tag sets, repeat the line setting the tags. For example, if you want to enable baz on freebsd or openbsd, write:

baz: freebsd
baz: openbsd

These tags are unordered, so tags later in the file may enable tags earlier in the file.

These tags are used to enable futex tags when building the thread library. Look here for an example.

Auto operator

During the Myrcon last September we discussed an 'auto' operator that would evaluate what it applies to, store the result in a temporary t, and call dispose(t) when the current block exits.

This patch has been implemented. We added a unary operator. This, for instance, allows to have:

impl disposable regex# =
    __dispose__ = {r; regex.free(r)}
;;

regex.exec(auto std.try(regex.compile("f..bar")), "foobar")

Like before, it is guaranteed that dispose is called in reverse order of auto appearance.

Flate encoding

As an official summer of cod entry, we got a start for the libflate library, which will eventually contain Myrddin's [de]compression equipment.

It currently exposes a single function

const decode : (outf : bio.file#, inf : bio.file# -> std.result(void, err))

that decodes a DEFLATE stream in the inf file into the outf file. The function guarantees that it will not read more than necessary from inf to either, figure out that the stream is bogus, or fully uncompress the stream.

Libmath

As part of the Summer of Cod, we also got the start of libmath landed. Libmath is a library to implement some IEEE-754 functions (cos, sin, sqrt, &c). A first milestone has been pulled. Here's what we've got:

Right now, the algorithms are coming from the survey work of Muller, and in particular I'm working through an article series by Tang describing tabular + polynomial approximation methods: see lib/math/references in the tree.

Based on some informal analysis, we're achieving accuracy at least on par with glibc and musl, and better in some situations. Our speed appears to be at least within an order of magnitude of glibc for the software implementations, and where hardware implementations exist we're even better.

Packages and Installation

Myrddin 0.2 is being packaged for supported systems. Some of them may be behind, as packagers finish putting together updated packages.

It is also easy to install from source.

From Git

Myrddin is a young language. There are regular fixes to the language and libraries. Therefore, it's probably a good idea to install it from Git. To install Myrddin from source:

$ git clone git://git.eigenstate.org/ori/mc.git
$ cd mc
$ ./configure --prefix=/usr
# On BSD, use gmake
$ make bootstrap
$ sudo make install

The make bootstrap step should only be needed on the first build.

From Tarballs

Tarballs of this release are also available

Mac OSX

There is a brew tap for OSX. If you have Homebrew installed, here is how you can use it to install Myrddin:

$ brew install oridb/myrddin/myrddin

FreeBSD

The port for Myrddin is in the FreeBSD ports tree. You can install it using:

# pkg install myrddin

OpenBSD

The port for Myrddin is in the OpenBSD ports tree. You can install it using:

# pkg_add myrddin

Plan 9 (9front)

Because Mercurial is the version control mechanism for Plan 9, there is a mirror of the repository on Bitbucket. To install it:

% hg clone https://bitbucket.org/oridb/mc
% cd mc
% mk
% mk install

Supported Platforms

The 0.3 release comes with an amd64 compiler. The supported platforms are Linux, OSX, FreeBSD, OpenBSD, and Plan9. There is partial support for NetBSD. Threads are known to be unimplemented on NetBSD.