[ English · German · Italian ]
Last modified: 02/02/2012 6:02 PM
[ <No JavaScript: webmaster at racer-systems dot com> ]

Follow us on Twitter:

Get notified about new builds through twitter!

MiniLisp server extension in RacerPro 2.0::

A way to add customized functionality to RacerPro 2.0 is to define server functions in "MiniLisp". Here we explain how to add the "(say-hello-to)" example which is supplied also as a (pre-compiled) server plugin. In the examples archive we also added a Sudoku example implemented with MiniLisp.

As said, you can also implement this new simple server function using MiniLisp. You will not need Allegro Express then. Writing server extensions in MiniLisp is easier, but the expressivity of the language is limited in order to ensure termination and also, native plugins are executed faster than MiniLisp functions.

Enter the following in the Shell Tab of RacerPorter:

[1] ? (define minilisp-say-hello-to (name)
             (format nil
        "Hello ~A, this is RacerPro ~A Build ~A. How are you today? This is 
your first MiniLisp server extension!"
        name
        (get-racer-version)
        (get-build-version)))
[1] > minilisp-say-hello-to

The function can now be evaluated:

[2] ? (evaluate (minilisp-say-hello-to "Michael"))
[2] > "Hello Michael, this is RacerPro 2.0 Build 2009-06-03. How are you 
today? This is your first MiniLisp server extension!"

However, it is not yet part of the server API and thus not recognized outside of evaluate:

[3] ? (minilisp-say-hello-to "Michael")
[3] > (:ERROR "Illegal operator in (minilisp-say-hello-to Michael)")

You will have to decalre the function as a server function as follows to make it become part of the RacerPro API:

[4] ? (server-function minilisp-say-hello-to)
[4] > t

[5] ? (minilisp-say-hello-to "Michael")
[5] > "Hello Michael, this is RacerPro 2.0 Build 2009-06-03. How are you 
today? This is your first MiniLisp server extension!"
Blumenau 50 · 22089 Hamburg · Germany · http://www.racer-systems.com/products/racerpro/preview/minilisp.phtml
ATTENTION: This page uses cascading style sheets (CSS). Unfortunately the CSS data is missing or your browser doesn't support CSS! For this reason this page may look different than the author intended.
ATTENTION: This page uses JavaScript for some functionality. Without JavaScript some information might be missing or some things may not work as intended.