In my first blog post I had said I would use the CMUCL Implementation of Common Lisp, and provided a link. As I read into the tutorial site I plan on using to learn the language, it recommends having a text editor for bigger and more complex programs. As I looked into solving this issue without changing compilers, it became clear that a change would be necessary. I have since found an IDE for Common Lisp that works on MAC OS X - LispWorks.
If you would like to try out Lisp using LispWorks, here is a link to the download site:
LispWorks Download - http://www.lispworks.com/downloads/index.html
It has become clear through some tests using LispWorks that it will be far more efficient to use than CMUCL, so a switch is for the best.
Welcome! Hopefully this blog will be mildly entertaining for all readers...
In LispWorks, the Listener acts as a command line executer of Lisp code. The string, "Hello, World!" can be displayed by simply writing out Hello, World, and surrounding it with quotes (" "). A screenshot below shows the execution of a very simple Hello, world! line of Lisp code:
Another way to write code in LispWorks is to use the Editor.
Below is a variation of the Hello World program using the write function and showing the use of parentheses in Lisp, while also showing semi-colons ( ; ) as the character used for comments. The code below is written in the LispWorks editor:
After pressing the compile button, we are taken to the output tab, and shown the output:
The compiler provides other information with the output, which could provide more information about bugs in our code.
---
Overall, my experiences working with Lisp have been very reasonable. The Hello World program is very easy to run, and I've begun exploring some of the math functions of Lisp, which are neat and I look forward to exploring further.
Peter Short, CS 270, Feb. 3, 2016, Blog #2
No comments:
Post a Comment