Lisp is King

Started by
325 comments, last by bishop_pass 20 years, 6 months ago
quote:Original post by RedSweater
Allegro, I didn't bother to try out.


That's funny, cause Allegro is completely free with almost no limitations for non-commercial uses.


[edited by - micepick on March 8, 2003 12:56:00 PM]
Advertisement
quote:
Here''s another complaint: C++ isn''t a practical language for large projects. How do you evaluate such complaints?


The fact that it is found to be practical so often kind of makes it hard to accept such a complaint without significant justification.

quote:For almost every use I''ve seen of C and C++, Lisp would have offered a better solution, with only a few exceptions.


I still don''t understand why you think it would be a better solution. Would it be easier to maintain? Easier to write? Faster?

quote:
Why not?


It''s not going to make the problems easier to understand or implement. I don''t think in terms of Lisp yet. Thinking in an imperative way has been proven to work for me.

I''ll definitely take a look at Lisp and try to use it for something non-trivial as soon I finish doing what I want to do. Lisp would be a costly (in terms of time) diversion.

quote:
Which version of "not sure" is that? Is it "I don''t know how to do it in Lisp, so I''m not sure" or is it "I''m not sure that it would be helpful, so I''ve decided it wouldn''t be"?


Both. I''m confident I could overcome the first easily with a bit of practice.

Algorithms are usually easy to express in C. The hard details are usually related to data structures -- they can be a lot of work.

It''s easy to overexaggerate the problem, though.

quote:Why is your attitude towards Lisp "hey, I don''t know about Lisp, but I''m not letting that stop me from concluding it can''t be much practical use"?


Why is your attitude "Lisp is the best programming language around for most applications?" What do you feel is better than Lisp for most applications that C/C++ are used for?

And what of the other functional languages or Lisp derivatives that actually are gaining popularity because they are practical?

----
Bart
----Bart
quote:Original post by RedSweater
How do I get a function to return a value?

Every Lisp statement evaluates to something. That is what is returned.
_______________________________
"To understand the horse you'll find that you're going to be working on yourself. The horse will give you the answers and he will question you to see if you are sure or not."
- Ray Hunt, in Think Harmony With Horses
ALU - SHRDLU - WORDNET - CYC - SWALE - AM - CD - J.M. - K.S. | CAA - BCHA - AQHA - APHA - R.H. - T.D. | 395 - SPS - GORDIE - SCMA - R.M. - G.R. - V.C. - C.F.
One thing I find easy in lisp is function pointers. In C/C++ function pointers are a mess and without typedefing the different function prototypes you need, you can end up with very hard to read code. In lisp, all you have to do is prefix a function name with #' and you have a function pointer. Since Lisp is dynamically typed (values have types, not variables), you don't have to do anything special to set a variable to a function pointer.

I think my first lisp project is going to be a test of genetic programming because it seems really easy to do with C. All the abilities for dynamic code manipulation greatly simplify the problem of 'randomly' creating programs and testing their fitness. Also, the way Lisp syntax is a text represnetation of a tree makes it easier to calculate crossover because its not too hard to find subtrees using the same root operator and swap them.

----------
Almost typo-ified using Extrarius' AUTOMATIC Typo Generator, but I decided to be nice =-)

[edited by - Extrarius on March 8, 2003 4:25:01 PM]
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk
quote:
Maybe not, but it''s expressivity is. We could scoff at the functionality of C if you consider that, without the Standard Libraries, it is not Turing-complete.


O/T: but aren''t the standard libraries themselves written in C (or could be)?


"And that whole philosophy has crept into everything we do now. Music''s the last thing where people can go and pay the same amount of money for a piece of shit or a diamond. And that''s why we''ve got to care about it."
- Ashcroft
quote:Original post by trzy
The fact that it is found to be practical so often kind of makes it hard to accept such a complaint without significant justification.

What is practical about it? I will concede one point: there's a lot of documentation and example code out there due strictly to its popularity.
quote:Original post by trzy
I still don't understand why you think it would be a better solution. Would it be easier to maintain? Easier to write? Faster?

Regarding it being easier to maintain: yes. Lisp allows for faster coding, and that means faster rewriting. Lisp allows for reprogramming at runtime, and the ability to add functionality through a user interface. In fact, most large Lisp applications evolve to the point where the coding model is not one of coding, but one of declaring knowledge or coding within a powerful language designed within the application which the Lisp program then translates into code. This is intermixed with the complete flexibility to enter raw Lisp code as well.

Regarding easier to write: haven't we been over this? Most code ultimately results in manipulation of data, and Lisp excels at that.

Regarding faster: Today's Lisp packages, using compilation and typed data, results in code nearly as fast as C, perhaps a little slower. What is amazing is the extra meta-level capability available despite it compiling to fast speeds. I believe if Lisp gained more popularity, Lisp could become even faster.
quote:Original post by trzy
Original post by trzy
I'll definitely take a look at Lisp and try to use it for something non-trivial as soon I finish doing what I want to do. Lisp would be a costly (in terms of time) diversion.

If you transfer your current coding model over to your Lisp diversions, you won't excel. The first thing you must do is become aware of the coding models used within Lisp.
quote:Original post by trzy
Why is your attitude "Lisp is the best programming language around for most applications?" What do you feel is better than Lisp for most applications that C/C++ are used for?

Perhaps it would be better to say that Lisp provides within its own very simple paradigm the capability to do everything. C obviously didn't do this. Thus C++, which added new paradigms to create a small subset of the Lisp paradigm. But notice that C++ is really an agglomeration of several paradigms that don't fit together very well.

What Lisp really needs, in my opinion, is something akin to the Perl community and CPAN - an enthusiastic body of people and a mechanism to effectively code, promote and distribute Lisp packages.

[edited by - bishop_pass on March 8, 2003 4:37:32 PM]
_______________________________
"To understand the horse you'll find that you're going to be working on yourself. The horse will give you the answers and he will question you to see if you are sure or not."
- Ray Hunt, in Think Harmony With Horses
ALU - SHRDLU - WORDNET - CYC - SWALE - AM - CD - J.M. - K.S. | CAA - BCHA - AQHA - APHA - R.H. - T.D. | 395 - SPS - GORDIE - SCMA - R.M. - G.R. - V.C. - C.F.
quote:Original post by MDI
O/T: but aren''t the standard libraries themselves written in C (or could be)?

Not, for example, the parts that talk to the BIOS. I assume that was the point.

"C combines all the power of assembly language with all the ease of use of assembly language"
quote:Original post by Extrarius
All the abilities for dynamic code manipulation greatly simplify the problem of ''randomly'' creating programs and testing their fitness.

Be sure to read up all you can on Karl Sims'' work and Koza''s work for starters. Also, I still strongly suggest you go to the library and photocopy the papers on AM and EURISKO.

_______________________________
"To understand the horse you'll find that you're going to be working on yourself. The horse will give you the answers and he will question you to see if you are sure or not."
- Ray Hunt, in Think Harmony With Horses
ALU - SHRDLU - WORDNET - CYC - SWALE - AM - CD - J.M. - K.S. | CAA - BCHA - AQHA - APHA - R.H. - T.D. | 395 - SPS - GORDIE - SCMA - R.M. - G.R. - V.C. - C.F.
yay, my first lisp line:

(defun helloworld() (print "hello world"))

now to figure our the if''s...

When would you use if instead of cond?
I think a better first Lisp program is this:

(setf fruits ''(apples bananas oranges pears))


Exectute that. Then at the prompt type and execute:
fruits

Then at the prompt type and execute:
(car fruits)

Then type and execute:
(cdr fruits)
_______________________________
"To understand the horse you'll find that you're going to be working on yourself. The horse will give you the answers and he will question you to see if you are sure or not."
- Ray Hunt, in Think Harmony With Horses
ALU - SHRDLU - WORDNET - CYC - SWALE - AM - CD - J.M. - K.S. | CAA - BCHA - AQHA - APHA - R.H. - T.D. | 395 - SPS - GORDIE - SCMA - R.M. - G.R. - V.C. - C.F.

This topic is closed to new replies.

Advertisement