Next: , Previous: Getting started, Up: Top   [Contents]


2 Initializing mu-guile

We now have installed mu-guile, and in Making sure it works confirmed that things work by trying some simple script. In this and the following chapters, we take a closer look at programming with mu-guile.

It is possible to write separate programs with mu-guile, but for now we’ll do things interactively, that is, from the Guile-prompt (“REPL”).

As we have seen, we start our mu-guile session by starting guile:

$ guile
GNU Guile 2.0.5.123-4bd53
Copyright (C) 1995-2012 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)>

The first thing we need to do is loading the modules. All the basics are in the (mu) module, with some statistical extras in (mu stats), and some graph plotting functionality in (mu plot)3. Let’s load all of them:

scheme@(guile-user)> (use-modules (mu) (mu stats) (mu plot))

The first time you do this, guile will probably respond by showing some messages about compiling the modules, and then return to you with another prompt. Before we can do anything with mu guile, we need to initialize the system:

scheme@(guile-user)> (mu:initialize)

This opens the database for reading, using the default location of ~/.mu4

Now, mu-guile is ready to go. In the next chapter, we go through the modules and show what you can do with them.


Footnotes

(3)

(mu plot) requires the gnuplot program

(4)

If you keep your mu database in a non-standard place, use (mu:initialize "/path/to/my/mu/")