Hacker's guide

I'm assuming by now you've managed to run omath either on the command line or using the applet, and played around a little.

Let's say you're convinced, and want to get started extending and modifying omath. The first place to look is the file. To get at this file, you can either In any case,  is in the directory. is run automatically when omath starts, and it's all written in omath syntax. Obviously this means that quite a bit has gone on in the background already before omath starts reading, but you may be surprised how little!
 * unarchive omath.jar using a zip utility, or
 * use SVN to check out a copy of http://svn.omath.org/core/trunk/ or
 * browse to http://svn.omath.org/core/trunk/omath-source/init.t

Reading through, you'll find several different types of lines.
 * Comments
 * These are usually just bare strings, in double quotes. omath interprets these are strings, and then does nothing with them.
 * Unfortunately for now we can't use the usual (* *) comment syntax, because of a problem with the parser.


 * omath commands
 * For example, you'll find somewhere the line, which pretty much sets up the function First to do what you expect.


 * Unit test
 * There are lines like . Don't worry too much about these at first, although please add more like them! Read Unit tests later for ways to run these tests, or just browse to.


 * Java method invocations
 * Other lines are a bit more mysterious. They look something like

FixedPoint[f_, x_] := FindExtensionInstance["org.omath.core.functional.FixedPoint"]["fixedPoint"[f, x]] (I'll warn you now -- I'm going to tell a lie when explaining this. See Creating ReplacementRuleMethodCallImplementation instances from FindExtensionInstance expressions, or look at the method  in  and at, for the full story. It's just an optimisation trick.) What's going on here? If you run  by itself, you'll see that it evaluates to something like.