Joe Riel

9615 Reputation

23 Badges

19 years, 206 days

MaplePrimes Activity


These are Posts that have been published by Joe Riel

The frontend command is a bit tricky. The basic idea is that it replaces expressions in the arguments to a procedure with names, evaluates the procedure with the replaced arguments, then back-substitutes the expressions for the the names in the final result. The first argument passed to frontend is the procedure that is to be evaluated. The second argument is a list containing the arguments to be passed to the procedure. Remaining arguments are optional, we'll get to those in a second.

Because my ISP no longer offers home pages, I'm putting the source to maplev-mode here.

maplev-mode is an Emacs major mode for developing Maple code. Its features include:

  • font-lock (highlighting) of Maple keywords
  • automatic indentation
  • syntax checking (via Mint)
  • online Maple help
  • online display of Maple procedures
  • imenu support
  • auto-fill support

It works properly with NTEmacs on a Windows machine and with GNU Emacs on a Linux box. It has been tested with GNU Emacs 21.2. It is supposed to work with Xemacs but the testing done with Xemacs has been minimal. The manual is badly out of date.

The current version supports Maple 11 and previous releases of Maple.

I use a dark background, but the maplev-mode can be configured to use a light background. Clicking on the highlighted "on line 13" message in the mint buffer moves the point to that location in the source buffer. Download 84_maplev.zip
View file details

This book entry describes a method, using text files and preprocessor macros, to measure the timing and memory usage of Maple procedures. Attached are the source code and compiled library for a small Maple package that does the actual measurements.
This book page describes and compares several methods for sorting lists of names. It revisits using attributes for rapid sorting, with attention to their global effect on strings. It demonstrates the use of the lexorder[n] option to sort and it illustrates the use of convert/local.
While responding to a question about creating a new type, I suggested that a module could be used as the data-structure. To type check a given expression against the new data-structure, one can use
type( some_expr, '`module`'( 'export1', 'export2' ))
where export1 and export2 are exports of the module. That technique, however, is not robust in that any module with those exports (and possibly others) matches the type. While that may not be a concern, there is a way to uniquely type check a constructed module: give it an export equal to a local value. Here is a demonstration of the technique:
First 9 10 11 12 13 14 15 Page 11 of 16