1 | So now you have the ABCL Lisp system compiled, and can run the resulting JAR |
---|
2 | file to give you a Lisp prompt, what do you do with it? |
---|
3 | |
---|
4 | * First, get that JAR file onto a pendrive. You can take Lisp with you |
---|
5 | where-ever you go. Now how cool is that? |
---|
6 | * Lisp IS NOT an artificial intelligence (AI) programming language. It IS a |
---|
7 | general purpose programming language, can can, as well, do AI stuff. |
---|
8 | * Lisp is a refreshing alternative to the Fortran-like languages you see all |
---|
9 | around you (C, C++, Java, PHP, etc). Its syntax is weird and different, |
---|
10 | and very flexible (well to be honest Lisp doesn't really have any |
---|
11 | syntax, which is why it is so flexible). |
---|
12 | * Start by trying to get into the Lisp way of programming. Try to write code |
---|
13 | in Lisp instead of your current programming language. For example, try |
---|
14 | to write Lisp versions of what you would do in Java. |
---|
15 | * Lisp is a big language, but once you have learned a small element, the rest |
---|
16 | of the language will become obvious -- it has everything you need. As |
---|
17 | your knowledge grows, so you will see there is an answer in Lisp. (This |
---|
18 | is just like Java or C++, once you know the basics you can simply write |
---|
19 | your own, or hunt down the ready-made solutions that the language has |
---|
20 | -- somewhere. |
---|
21 | * Lisp is very flexible. You won't see this until you've been using it awhile, |
---|
22 | but you will find that it is the most natural way to think through |
---|
23 | solutions. |
---|
24 | * There are lots of Lisp textbooks around. Don't be worried if these are 20 |
---|
25 | years old or more. You will still say 'wow' when you see what sort of |
---|
26 | things are in these books. The things you can do with functions is |
---|
27 | amazing -- but you don't know this because your current languages don't |
---|
28 | support it, so you don't think that way. |
---|
29 | * Finally, write Lisp code. Everytime you have to solve a problem in Java or |
---|
30 | C++, think about how you could do it in Lisp. |
---|
31 | |
---|
32 | Java/Lisp examples. |
---|
33 | |
---|
34 | ------------------------------------------------------------------------------- |
---|
35 | Count to 10: |
---|
36 | Java |
---|
37 | |
---|
38 | for(i = 1; i < 11; i++) { |
---|
39 | System.out.println("i=" + i); |
---|
40 | } |
---|
41 | |
---|
42 | Lisp |
---|
43 | |
---|
44 | (dotimes (x 10) |
---|
45 | (print (1+ x))) |
---|
46 | |
---|
47 | ------------------------------------------------------------------------------- |
---|
48 | |
---|