Does anyone code with LISP?
-
Paul Watt wrote:
I found that I approached my problem solving in a different way, even though I was no longer using a functional programming language.
Interesting. I am interested in learning functional programming, but haven't had the time yet. I am currently working on developing agents to do robotic trading on the Foreign Exchange market. Do you think functional programming will have relevance in market analysis?
Paul Watt wrote:
One of the things that I learned to do was complete a complex task in a very elegant manner, with very little code when I was using functional programming constructs.
Very interesting. Can you be coaxed into an article explaining how to implement functional programming constructs in non-functional languages? Thanks for the insight.
The report of my death was an exaggeration - Mark Twain
Simply Elegant Designs JimmyRopes Designs
Think inside the box! ProActive Secure Systems
I'm on-line therefore I am. JimmyRopesJimmyRopes wrote:
Do you think functional programming will have relevance in market analysis?
I am sure that there is some place for it, but I do not have enough knowledge of ForEx or the market itself to make a suggestion. My instinct tells me that any of the math equations or collection of similar constructs is a good place to start.
JimmyRopes wrote:
Very interesting. Can you be coaxed into an article explaining how to implement functional programming constructs in non-functional languages?
Yes, however what I plan on doing is building up a TMP-based solution on my blog. The blog is also fed into CodeProject so you will be able to follow it as I build up the solution. I wrote an initial entry on TMP here: Template Meta-Programming[^]. The short answer, is that you think of everything like a function in math. Zero or more inputs are passed in, and only one result at most is returned. If you pass in that same set of inputs to the same function, you will get the exact same results every time. This is very valuable when you want to prove that something is working properly because there is only one possible answer for any set of inputs. Contrast this with the potential of programming with global variables, intermediate state, and potential side-effects. It does take some practice to get used to solving problems this way. In the end, it becomes another tool in your belt to solve problems. If you keep your mind open, programming in other languages even just casually, can help you expand your approach to solving problems. The key is to not try and use every language like it is C++, or whatever your programming language of choice happens to be. I am surprised how interested programmers have become with TMP recently. The TMP blog entry I gave you the link to has been one of my more popular entries. So, once I am done building up the solution through the series of blog entries, I could imagine writing a summary article.
To know and not do, is not yet to know http://www.codeofthedamned.com
-
JimmyRopes wrote:
Do you think functional programming will have relevance in market analysis?
I am sure that there is some place for it, but I do not have enough knowledge of ForEx or the market itself to make a suggestion. My instinct tells me that any of the math equations or collection of similar constructs is a good place to start.
JimmyRopes wrote:
Very interesting. Can you be coaxed into an article explaining how to implement functional programming constructs in non-functional languages?
Yes, however what I plan on doing is building up a TMP-based solution on my blog. The blog is also fed into CodeProject so you will be able to follow it as I build up the solution. I wrote an initial entry on TMP here: Template Meta-Programming[^]. The short answer, is that you think of everything like a function in math. Zero or more inputs are passed in, and only one result at most is returned. If you pass in that same set of inputs to the same function, you will get the exact same results every time. This is very valuable when you want to prove that something is working properly because there is only one possible answer for any set of inputs. Contrast this with the potential of programming with global variables, intermediate state, and potential side-effects. It does take some practice to get used to solving problems this way. In the end, it becomes another tool in your belt to solve problems. If you keep your mind open, programming in other languages even just casually, can help you expand your approach to solving problems. The key is to not try and use every language like it is C++, or whatever your programming language of choice happens to be. I am surprised how interested programmers have become with TMP recently. The TMP blog entry I gave you the link to has been one of my more popular entries. So, once I am done building up the solution through the series of blog entries, I could imagine writing a summary article.
To know and not do, is not yet to know http://www.codeofthedamned.com
Paul Watt wrote:
My instinct tells me that any of the math equations or collection of similar constructs is a good place to start.
Yes there are a lot of math equations. In fact, all of the analysis are mathematical interpretations of the market data. I will look into the implication of a functional language to do the calculations. I will have a look at your blog to try to understand TMP to see if it has utility in any of the systems I am building. Thanks for the information.
The report of my death was an exaggeration - Mark Twain
Simply Elegant Designs JimmyRopes Designs
Think inside the box! ProActive Secure Systems
I'm on-line therefore I am. JimmyRopes -
I like ARM as a processor (and they are a nice company to speak to as well) - I used ARM7/ARM9 ten or so years ago in assembler and Embedded C++ and was very impressed. But...the software developer kit costs were ridiculous at around $7500 per user back then! :omg: Nowadays you can (in theory) target VS2012 at ARM and it should compile C++, but I have no idea about libraries and so forth for a bare-bones system. I'll admit that Eclipse is one of the things that has put me off learning Android development! :laugh:
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
-
JimmyRopes wrote:
That is the nature of experimental development.
Yes it is. Over the years I've done a lot of R&D and when it works it's awesome but when it don't...
VS2010/Atmel Studio 6.1 ToDo Manager Extension Relax...We're all crazy it's not a competition!
In answer to the question, I don't programme with Lisp; I would need a very good reason to start, curiosity in this case would not by itself justify the investment of time and effort. Whereas other languages such as Python are commercial, hobbyist, free and fun to learn, which is probably why they succeed.
-
Mike Hankey wrote:
after about 2 days I think what the hell would I do with it?
That is what has stopped me so far, what can I do with it? Sorry to hear your beagle is sick.
The report of my death was an exaggeration - Mark Twain
Simply Elegant Designs JimmyRopes Designs
Think inside the box! ProActive Secure Systems
I'm on-line therefore I am. JimmyRopes -
If so, what are the advantages over other programming languages. I always hear it mentioned when reading about programming theory, but never had the opportunity, or inclination, to try it out because I was busy learning other languages for which I was getting paid. Is there anything I can learn from getting familiar with LISP or is it a language that was once ahead of it's time but now relegated to the annals of 20th century computer history?
The report of my death was an exaggeration - Mark Twain
Simply Elegant Designs JimmyRopes Designs
Think inside the box! ProActive Secure Systems
I'm on-line therefore I am. JimmyRopesUsing LISP currently... First it is not crazy efficient, and is usually interpreted. But it was the key for me learning OOP at the university in the late 80s. The concept of a function was such that you could subclass your class, and then declare EITHER (before, after, instead of) function, which simply determined when it would execute your code, relative to the original code. CDR = Contents of Destination Register CADR = Contents of Address Register LISP = Lots of Incessant Stupid Parenthesis :-) Wow, you brought a bunch of memories back from a LONG time ago. EMACS uses LISP for macros/extensions. So, one way to learn LISP in a functional way, would be to learn to write extensions for the editor (or read a bunch of them).
-
If so, what are the advantages over other programming languages. I always hear it mentioned when reading about programming theory, but never had the opportunity, or inclination, to try it out because I was busy learning other languages for which I was getting paid. Is there anything I can learn from getting familiar with LISP or is it a language that was once ahead of it's time but now relegated to the annals of 20th century computer history?
The report of my death was an exaggeration - Mark Twain
Simply Elegant Designs JimmyRopes Designs
Think inside the box! ProActive Secure Systems
I'm on-line therefore I am. JimmyRopesI don't know of many commercial applications, though reading some stuff (perhaps dubious) that may be because companies don't want their competition to know about their competitive advantage. I can only speak from my own experience. Other than some indicating that Lisp is more a university teaching tool, I found it the other way round: At uni I learned Pascal, C++ & Java. I learned Basic & Lisp for myself before I went to uni. And because I do a lot of work in CAD I've been using AutoLisp "in anger" :rolleyes: since the early 90's. Though AutoLisp (and even the Visual Lisp since the late 90's) is far removed from a full-fledged Lisp/Scheme - it still indicates a lot of stuff where other languages (at least of the time) struggled or made the programmer's life difficult. So you can imagine how I find a full Lisp in comparison to something like Java/C#. Only later did I see languages such as Python, which I consider to have come close enough to Lisp to be deemed "as powerful" - to an extent. Linq gives C# "some" of Lisps abilities, but far from all. I'm NOT trying to say any language is "bad" or "inferior" to any other, each one I learned taught me something (at least). And I might even go as far as to say some excel in certain uses. Though I must say that Lisp has yet (for me) to be relegated to a superseded language, it's still the only one which has so much scope, multi-paradigm mix-ability, concise code, decent-to-excellent compiler optimization, ease of patching / debugging on the fly, etc. Remember, Lisp was actually invented "by accident" - it was intended as an intermediate step to inventing a more Fortran-like language which would incorporate all the special constructs and use cases which Fortran lacked at the time. Only that last took too long and people started seeing just how simple Lisp is to use while adding so much power for so little input. This last thing is still an issue today: I can attest to using C# and AutoLisp to do the exact same thing inside AutoCAD. The Lisp code is on average 1/3 of that which I need to actually type into the C# (note not counting the "autogenerated" stuff or the pre-made templates, otherwise it would be more like 1/5) in order for the 2 to do exactly the same thing. Many say less code is not a big issue, but I have to state that my Lisp code tends to take not just less time to type but also a lot less time to debug - it's a near exponential increase in my productivity.
-
If so, what are the advantages over other programming languages. I always hear it mentioned when reading about programming theory, but never had the opportunity, or inclination, to try it out because I was busy learning other languages for which I was getting paid. Is there anything I can learn from getting familiar with LISP or is it a language that was once ahead of it's time but now relegated to the annals of 20th century computer history?
The report of my death was an exaggeration - Mark Twain
Simply Elegant Designs JimmyRopes Designs
Think inside the box! ProActive Secure Systems
I'm on-line therefore I am. JimmyRopesI program in Emacs Lisp (ELisp) all the time, and love Lisp in that application, so much that I would like to use Lisp for other things. However, I've only used Common Lisp a little bit, for very small things, and almost always opt for something else when I have something that needs to get done. I think the difference is the "atoms". The atoms in Emacs Lisp are geared for text processing and it makes Emacs a very effective text processing framework, for me, anyway. Apparently only 1% of Emacs users actually write ELisp. Common Lisp I guess just doesn't appeal to me as a general purpose language, because in my limited experience with it, the atoms just don't do it for me. Maybe if I gave it a harder push, but in the presence of other options, I tend toward the other options. I would not discourage you from learning Lisp, because it changes how you think about programming and yes, will make you a better programmer in any language for the experience. If you google Paul Graham, he provides some advantages of Lisp; he used it to write I believe Yahoo's Shopping Cart. A more interesting story for me can be found if you google "Lisping at JPL".
-
Oooo...nasty. Did they just laugh when you told them, or are they going to do something? (This is why I may be old-fashioned, but I like a minimum boot loader in EPROM rather than flash...)
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
Maybe http://en.wikipedia.org/wiki/LISP[^]is what ALL here, discussing LISP should read to gain a comon understaning ground AND understand LISP in the larg. i.e Autocad as a CAD systems was able to use LISP, and I (even as a Autocad novice) was able to code new CAD parameterised drawing elements. Not so bad for me 20 years ago. Josef
-
If so, what are the advantages over other programming languages. I always hear it mentioned when reading about programming theory, but never had the opportunity, or inclination, to try it out because I was busy learning other languages for which I was getting paid. Is there anything I can learn from getting familiar with LISP or is it a language that was once ahead of it's time but now relegated to the annals of 20th century computer history?
The report of my death was an exaggeration - Mark Twain
Simply Elegant Designs JimmyRopes Designs
Think inside the box! ProActive Secure Systems
I'm on-line therefore I am. JimmyRopesNot personally but my brother does. There are certain types of research and engineering problems that LISP handles well (which is the type of work he does). The language is fully recursive in nature so imagine using it to solve a problem which is also recursive in nature.
-
If so, what are the advantages over other programming languages. I always hear it mentioned when reading about programming theory, but never had the opportunity, or inclination, to try it out because I was busy learning other languages for which I was getting paid. Is there anything I can learn from getting familiar with LISP or is it a language that was once ahead of it's time but now relegated to the annals of 20th century computer history?
The report of my death was an exaggeration - Mark Twain
Simply Elegant Designs JimmyRopes Designs
Think inside the box! ProActive Secure Systems
I'm on-line therefore I am. JimmyRopesYou could do some Clojure or Iron Scheme which are both considered dialects of Lisp. Also I'd check out Lisp in the real world. Also these
-
If so, what are the advantages over other programming languages. I always hear it mentioned when reading about programming theory, but never had the opportunity, or inclination, to try it out because I was busy learning other languages for which I was getting paid. Is there anything I can learn from getting familiar with LISP or is it a language that was once ahead of it's time but now relegated to the annals of 20th century computer history?
The report of my death was an exaggeration - Mark Twain
Simply Elegant Designs JimmyRopes Designs
Think inside the box! ProActive Secure Systems
I'm on-line therefore I am. JimmyRopesHaven't used it since my Artificial Intelligence term project in grad school. It was a frame-based system for playing chess endgames. The ability to treat LISP code as objects was convenient for this application. Haven't had the opportunity or inclination to use it since then.
-
In answer to the question, I don't programme with Lisp; I would need a very good reason to start, curiosity in this case would not by itself justify the investment of time and effort. Whereas other languages such as Python are commercial, hobbyist, free and fun to learn, which is probably why they succeed.
Simon O'Riordan from UK wrote:
I don't programme with Lisp; I would need a very good reason to start
Me too. That is why I am asking if anyone uses it and for what.
Simon O'Riordan from UK wrote:
curiosity in this case would not by itself justify the investment of time and effort.
Ditto
Simon O'Riordan from UK wrote:
Whereas other languages such as Python are commercial, hobbyist, free and fun to learn, which is probably why they succeed.
I've thought about looking into Python but just haven't had the time.
The report of my death was an exaggeration - Mark Twain
Simply Elegant Designs JimmyRopes Designs
Think inside the box! ProActive Secure Systems
I'm on-line therefore I am. JimmyRopes -
Using LISP currently... First it is not crazy efficient, and is usually interpreted. But it was the key for me learning OOP at the university in the late 80s. The concept of a function was such that you could subclass your class, and then declare EITHER (before, after, instead of) function, which simply determined when it would execute your code, relative to the original code. CDR = Contents of Destination Register CADR = Contents of Address Register LISP = Lots of Incessant Stupid Parenthesis :-) Wow, you brought a bunch of memories back from a LONG time ago. EMACS uses LISP for macros/extensions. So, one way to learn LISP in a functional way, would be to learn to write extensions for the editor (or read a bunch of them).
Member 10389821 wrote:
LISP = Lots of Incessant Stupid Parenthesis :)
Wow, you brought a bunch of memories back from a LONG time ago.Sorry for your pain.
The report of my death was an exaggeration - Mark Twain
Simply Elegant Designs JimmyRopes Designs
Think inside the box! ProActive Secure Systems
I'm on-line therefore I am. JimmyRopes -
I don't know of many commercial applications, though reading some stuff (perhaps dubious) that may be because companies don't want their competition to know about their competitive advantage. I can only speak from my own experience. Other than some indicating that Lisp is more a university teaching tool, I found it the other way round: At uni I learned Pascal, C++ & Java. I learned Basic & Lisp for myself before I went to uni. And because I do a lot of work in CAD I've been using AutoLisp "in anger" :rolleyes: since the early 90's. Though AutoLisp (and even the Visual Lisp since the late 90's) is far removed from a full-fledged Lisp/Scheme - it still indicates a lot of stuff where other languages (at least of the time) struggled or made the programmer's life difficult. So you can imagine how I find a full Lisp in comparison to something like Java/C#. Only later did I see languages such as Python, which I consider to have come close enough to Lisp to be deemed "as powerful" - to an extent. Linq gives C# "some" of Lisps abilities, but far from all. I'm NOT trying to say any language is "bad" or "inferior" to any other, each one I learned taught me something (at least). And I might even go as far as to say some excel in certain uses. Though I must say that Lisp has yet (for me) to be relegated to a superseded language, it's still the only one which has so much scope, multi-paradigm mix-ability, concise code, decent-to-excellent compiler optimization, ease of patching / debugging on the fly, etc. Remember, Lisp was actually invented "by accident" - it was intended as an intermediate step to inventing a more Fortran-like language which would incorporate all the special constructs and use cases which Fortran lacked at the time. Only that last took too long and people started seeing just how simple Lisp is to use while adding so much power for so little input. This last thing is still an issue today: I can attest to using C# and AutoLisp to do the exact same thing inside AutoCAD. The Lisp code is on average 1/3 of that which I need to actually type into the C# (note not counting the "autogenerated" stuff or the pre-made templates, otherwise it would be more like 1/5) in order for the 2 to do exactly the same thing. Many say less code is not a big issue, but I have to state that my Lisp code tends to take not just less time to type but also a lot less time to debug - it's a near exponential increase in my productivity.
irneb wrote:
Lisp code tends to take not just less time to type but also a lot less time to debug - it's a near exponential increase in my productivity.
Intersting.
The report of my death was an exaggeration - Mark Twain
Simply Elegant Designs JimmyRopes Designs
Think inside the box! ProActive Secure Systems
I'm on-line therefore I am. JimmyRopes -
I program in Emacs Lisp (ELisp) all the time, and love Lisp in that application, so much that I would like to use Lisp for other things. However, I've only used Common Lisp a little bit, for very small things, and almost always opt for something else when I have something that needs to get done. I think the difference is the "atoms". The atoms in Emacs Lisp are geared for text processing and it makes Emacs a very effective text processing framework, for me, anyway. Apparently only 1% of Emacs users actually write ELisp. Common Lisp I guess just doesn't appeal to me as a general purpose language, because in my limited experience with it, the atoms just don't do it for me. Maybe if I gave it a harder push, but in the presence of other options, I tend toward the other options. I would not discourage you from learning Lisp, because it changes how you think about programming and yes, will make you a better programmer in any language for the experience. If you google Paul Graham, he provides some advantages of Lisp; he used it to write I believe Yahoo's Shopping Cart. A more interesting story for me can be found if you google "Lisping at JPL".
Thanks for the insight.
The report of my death was an exaggeration - Mark Twain
Simply Elegant Designs JimmyRopes Designs
Think inside the box! ProActive Secure Systems
I'm on-line therefore I am. JimmyRopes -
Not personally but my brother does. There are certain types of research and engineering problems that LISP handles well (which is the type of work he does). The language is fully recursive in nature so imagine using it to solve a problem which is also recursive in nature.
Thanks for the information
The report of my death was an exaggeration - Mark Twain
Simply Elegant Designs JimmyRopes Designs
Think inside the box! ProActive Secure Systems
I'm on-line therefore I am. JimmyRopes -
You could do some Clojure or Iron Scheme which are both considered dialects of Lisp. Also I'd check out Lisp in the real world. Also these
Thanks for the links.
The report of my death was an exaggeration - Mark Twain
Simply Elegant Designs JimmyRopes Designs
Think inside the box! ProActive Secure Systems
I'm on-line therefore I am. JimmyRopes -
Haven't used it since my Artificial Intelligence term project in grad school. It was a frame-based system for playing chess endgames. The ability to treat LISP code as objects was convenient for this application. Haven't had the opportunity or inclination to use it since then.
Thanks for the information.
The report of my death was an exaggeration - Mark Twain
Simply Elegant Designs JimmyRopes Designs
Think inside the box! ProActive Secure Systems
I'm on-line therefore I am. JimmyRopes -
If so, what are the advantages over other programming languages. I always hear it mentioned when reading about programming theory, but never had the opportunity, or inclination, to try it out because I was busy learning other languages for which I was getting paid. Is there anything I can learn from getting familiar with LISP or is it a language that was once ahead of it's time but now relegated to the annals of 20th century computer history?
The report of my death was an exaggeration - Mark Twain
Simply Elegant Designs JimmyRopes Designs
Think inside the box! ProActive Secure Systems
I'm on-line therefore I am. JimmyRopes