Prev: Can this be "refactored"? A simple 'wrapper function' to display MySQL data sets in tabular form
Next: The correct choice for implementation (was: A simple web client library)
From: Hugh Aguilar on 8 Mar 2010 17:44 I have been vaguely intending to learn Lisp for a long time (several decades now). I recently wrote a Forth program to generate gcode for a CNC milling machine to etch the faces of a slide-rule: http://www.forth.org/novice.html I think that porting this program over to Lisp might be a good way to learn Lisp. My slide-rule program uses lists for holding data, so Lisp should be a good fit for the program. Right now my program just generates gcode. With the port however, I might upgrade the program to have a GUI for constructing slide-rules and simulating their use. I would need some facilities to support this kind of programming. Does anybody have an opinion on CLOS vs. Scheme and/or a recommendation for a Lisp system that I could use? I want to work under Linux and not spend any money. I also want plenty of documentation available to help me learn. I am assuming that CLOS is the flavor of Lisp that I should use as it seems to have more libraries available. On the other hand, I know that STAAPL is written in Scheme, and I would like to get into STAAPL later on, so maybe Scheme is the way to go. How much difference is there between CLOS and Scheme? If I learn one, will that ruin me forever in regard to the other? Does either have some way of binding C libraries? I will likely be lurking on this forum for a while, just to see what you Lisp folks are doing. I haven't really decided if I want to learn Lisp or not. I mostly only like Forth programming, and I dislike C programming. Lisp seems to be closer to Forth than to C though, so it might be a good language for me to learn. Your macros are somewhat similar to our immediate words.
From: joswig on 8 Mar 2010 18:10 On 8 Mrz., 23:44, Hugh Aguilar <hughaguila...(a)yahoo.com> wrote: > I have been vaguely intending to learn Lisp for a long time (several > decades now). I recently wrote a Forth program to generate gcode for a > CNC milling machine to etch the faces of a slide-rule:http://www.forth.org/novice.html > I think that porting this program over to Lisp might be a good way to > learn Lisp. My slide-rule program uses lists for holding data, so Lisp > should be a good fit for the program. Right now my program just > generates gcode. With the port however, I might upgrade the program to > have a GUI for constructing slide-rules and simulating their use. I > would need some facilities to support this kind of programming. Does > anybody have an opinion on CLOS vs. Scheme and/or a recommendation for > a Lisp system that I could use? I want to work under Linux and not > spend any money. I also want plenty of documentation available to help > me learn. > > I am assuming that CLOS is the flavor of Lisp that I should use as it > seems to have more libraries available. On the other hand, I know that > STAAPL is written in Scheme, and I would like to get into STAAPL later > on, so maybe Scheme is the way to go. How much difference is there > between CLOS and Scheme? If I learn one, will that ruin me forever in > regard to the other? Does either have some way of binding C > libraries? > > I will likely be lurking on this forum for a while, just to see what > you Lisp folks are doing. I haven't really decided if I want to learn > Lisp or not. I mostly only like Forth programming, and I dislike C > programming. Lisp seems to be closer to Forth than to C though, so it > might be a good language for me to learn. Your macros are somewhat > similar to our immediate words. The language is called 'Common Lisp', not CLOS. CLOS is a part of Common Lisp. CLOS stands for Common Lisp Object System. If you are using Linux, then SBCL or Clozure CL will be fine for many purposes. You should get in touch with some users to get you started with Emacs&Slime, HyperSpec, SBCL/Clozure CL and the usual things. Read the book Practical Common Lisp, which should help you starting with programming Common Lisp http://www.cliki.net/Practical%20Common%20Lisp For milling and Lisp see this: Manuel Odendahl wrote CL-MILL : http://code.google.com/p/cl-mill/ See his blog post here: http://ruinwesen.com/blog?id=387
From: Nicolas Neuss on 9 Mar 2010 03:33 Hugh Aguilar <hughaguilar96(a)yahoo.com> writes: > I will likely be lurking on this forum for a while, just to see what > you Lisp folks are doing. If you do that make sure that you use a decent news server and not Google groups which does not filter out spam. People have recommended news.eternal-september.org as an alternative. Nicolas
From: Hugh Aguilar on 9 Mar 2010 13:28 On Mar 9, 3:20 am, Slobodan Blazeski <slobodan.blaze...(a)gmail.com> wrote: > > If I learn one, will that ruin me forever in > > regard to the other? > > No. Does this forum only support Common Lisp? I browsed through and didn't find any mention of Scheme or Clojure or anything else, although there was one brief mention of LFE. I am leaning towards Common Lisp rather than Scheme primarily because of the abundance of literature available. We have several books on Common Lisp, but only one ("The Little Schemer") available on Scheme. I learned a little bit of Factor previously, but got somewhat bogged down due to not knowing the terminology, most of which seems to come from the Common Lisp world. Hopefully with all these books I can learn something! > There is a advanced common lisp book with a chapter of embedding Forth > into common lisphttp://letoverlambda.com/index.cl/toc . The author of Let Over Lambda > Dough Hoyte evidently > regards highly Forth. That book looks very interesting; I will buy it later on after digesting "Practical Common Lisp." Do any of you guys on comp.lang.lisp know Forth? Lisp has always been described as "a programmable programming language." That is a pretty good description of Forth too. Other than Lisp and Forth, I don't know of any language that allows the programmer to write compile-time code --- our two languages are pretty much alone in that regard.
From: Hugh Aguilar on 9 Mar 2010 17:18
On Mar 9, 1:33 pm, Slobodan Blazeski <slobodan.blaze...(a)gmail.com> wrote: > I want to learn at least one concatenative language, since Joy is dead > will have to choose between Forth and Factor but that will have to > wait until we ship oops publish the app. I read about Joy but didn't try it. A problem with Joy was that it used the same syntax for quotations (code) and sequences (data). Factor uses square brackets for quotations and curly brackets for sequences, which simplifies the compiler and makes the language more powerful. Isn't it true though, that Lisp is like Joy in that there is no syntactic difference between code and data? You use round brackets for both. Your choice isn't entirely between Forth and Factor --- there is also STAAPL. It is a Forth-like language written in PLT-Scheme and targeting the PIC18. I've encouraged Tom Stoughton to upgrade to the PIC24, but STAAPL is just for the PIC18 right now. I have a Forth for the PIC24 on the back burner and may eventually release it. Forth is a very "thin" language. The ANS-Forth document is short enough to read over a weekend. A lot of features were excluded from the standard on the assumption that the users would implement these features themselves. This is similar to the Scheme philosophy. Factor is a fat language; this is similar to the Common Lisp philosophy. Factor has also drifted a long ways away from Forth, with its emphasis on quotations and its de-emphasis of compile-time code. As a practical matter, Factor also has a huge footprint; Slava told me that the ColdFire is the smallest processor he foresees Factor running on. By comparison, Forth can run on processors such as the PIC24 or even the 65c02. I wrote a program to crack a linear-congruential encryption system in both Factor and Forth and obtained these times on my laptop: assembly-language 17 seconds SwiftForth 22 seconds Factor 9 minutes 14 seconds I expect that Common Lisp would be even worse than Factor, although I haven't tried it yet. The Factor community also has a concern about being "idiomatic," which is largely alien to the Forth culture. I read a little into that book "Let Over Lambda" and I liked the quote in the introduction: "Style is necessary only where understanding is missing." If you do decide to learn Forth, be sure to download a copy of my novice package: http://www.forth.org/novice.html I think that a problem novices have with Forth is that they are hit with the prospect of implementing basic data structures (records, arrays, etc.) too soon. This forces them into writing compile-time code before they are ready. With my package you get a lot of basic programming already done for you, which allows you to start writing applications right away. After writing some application software (perhaps porting some programs from C or some other language that lacks compile-time code), you will have graduated from novice to intermediate-level Forth. At this time you will be better able to delve into writing compile-time code yourself. This is my theory in regard to C programmers learning Forth. As a Lisp programmer you might want to tackle the compile-time aspect of Forth right away. Your background is a lot different from that of a C programmer --- the concept of compile-time code won't result in a neurological melt-down for you, which is the typical effect on C programmers. :-) |