Sunday, June 23, 2013

Programming in Maple Language

Maple IDE
In this article I want to discuss the right way to store and build Maple code.

As mentioned in the Introducing the Maple IDE post, over 90 percent of the algorithms built into Maple are implemented using Maple language. The code of the algorithms is stored as Maple Libraries (.mla files).

As Managing Maple Repositories help page states, a Maple Library (also Maple Repository) is the recommended way for storing Maple procedures and packages. Moreover, the concept of Code Libraries is standard and widely used in programming, for example JARs in Java. The libraries help you to store, reuse and share your code easily.

Maple IDE automates creating of Maple Libraries completely. Your library will be build automatically during the coding and will be updated immediately after each code change. No manual actions are required to pack your code into a Maple Library.

Nevertheless, there are important cases, when you do not need to create Maple Libraries. The cases require the in-place code editor in Maple interface which was introduced in Maple 17.

These cases are:
- creating of temporary small procedures which will be used once.
- creating of documents where Maple code should be shown in place. For example, Maple help pages or tutorials about Maple language.
- creating of documents where the author want to show a small part of the code to the reader.

Of course, if your work is one of the above, but you have many lines of code or your code is not temporary, use the IDE to:

- develop using full-featured code editor (syntax coloring and error detection, code formatting and outline, content assist, code navigation, refactoring, code templates etc.)
- create Maple Libraries on-the-fly with automated builders
- test and debug your code directly from the environment
- be sure that the code will not be lost using build-in history or version control systems (SVN, GIT etc.)
- spread your work easily using version control services such as Github, Sourcefordge, Google Code etc.
Post a Comment