Installing the Binaries
To get the source, for the compiler, standard library, and myrbuild, you download it from git:
$ git clone git://git.eigenstate.org/ori/mc.git
$ cd mc
# Set the prefix to anything you want, but
# make sure that $prefix/bin is in $PATH
$ ./configure --prefix=/usr
# On BSD, use gmake
$ make
$ sudo make install
Plan 9 is also supported:
% hg clone https://bitbucket.org/oridb/mc
% cd mc
% mk
% mk install
On some systems, you can also install Myrddin through your package system.
Useful Supporting Tools
There are a number of useful utilities for working with Myrddin that are not shipped with the above.
vim myr support
The mc repository comes with indent and syntax scripts for vim. These scripts are fairly sparse, but they serve me well. To get them, you can take
https://git.eigenstate.org/ori/mc.git/tree/support/vim
And put it into your vim path.
I also suggest setting the indentation and shift widths for Myrddin files with an autocommand. To do that, add the text below to your .vimrc:
" Indent .myr files with tabs
autocmd FileType myr
\ setlocal noet |
\ setlocal sw=8
ctags
Universal ctags supports Myrddin out of the box.
mleakdump
There are some rudimentary leak checking tools. Mleakdump is shipped with
Myrddin, and is able to interpret the trace files that
std.startalloctrace("path")
creates. The output is a bit obtuse,
as it isn't symbolized, but it's easy to convert the addresses into function
names using gdb.
acid
There are some support files shipped for the Plan 9 debugger. To get stack traces on Plan 9, use:
acid -l mc/support/acid/myr your-binary