Jump to content
  • Advertisement
Sign in to follow this  
Nathan Baum

Lisp Pimpin'

This topic is 4820 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok, I see my arguments aren't very perceptible. I'll let someone else take over. I'll just answer one point.
Quote:
Original post by Max_Payne
My point is that debugging in C++ is not really an issue, nor is recompilation.

Let's see. It takes about five seconds to start up the java application I'm working on. Another five seconds to log in. And about five seconds for compilation of my changes. A total of fifteen seconds. While I'm fixing incorrect behavior I make changes->recompile->restart. Every two minutes. All day long. That means I lose about 12% of my development time (it's a lot more than that in practice, but whatever). If I do this for four hours every day, that accounts for half an hour of lost productivity every day, two and a half hours every week, 130 hours every year. Considering that average software developer costs about $50 per hour (including benefits, etc.) that accounts for $6,500 lost every year *per developer*. For a large company that employes, say, a thousand developers in different areas that accounts for six and a half million dollars of wasted time every year! Enough, in fact, to hire at least 65 developers!

Share this post


Link to post
Share on other sites
Advertisement
Quote:

From what I see, those products are "using lisp", they were not made completely in lisp, or even primarily in lisp.

Aren't you a picky one. I know for a fact that emacs is made of at least 80% lisp--the extension modules that come with it. Perhaps you should be a bit more open-minded instead of demanding examples which are already right in front of you.
Quote:

Lisp has been around for quite a while now. Longer than C++ has. Yet its not really catching on when it comes to professional software development. Don't tell me its because people are "resistant to progress" either, or anything of that kind. I constantly see people ranting about the latest and most efficient programming techniques and languages. Languages like Lisp and OCaml have had plenty of times to prove their usefulness, yet they are still only present in a handful of useful applications, and some extremely specialized solutions designed by I-don't-know-who with special constraints in mind.

You've got to be kidding. You seem to be basing that solely on the fact that languages rise to the top based on how good they are; well, I've got news for you--they don't. Generally, it's a mix of productivity (learning curve counts), perceived usefulness, and how much it got shoved down your throat. Mostly the latter.
Quote:


I have been using python for some time. My personal experience is that it works O.K. Its main advantage is portability (to some degree). Thats about it. It is more portable than C++ for sure. But other than that, its also much slower, and not as powerful or nicely constructed in some areas. The main thing I like about it is that it has some easy to use libraries. Things are done in a simpler manner. However, this is not really a C++ problem: its a library design problem. Many C and C++ libraries make things much more complex than they really need to be. The reason people like C# is mostly for winforms, because, lets face it, the win32 API is simply backwards.

"Not as powerful"? Show me list comprehension, heterogeneous data structures, lambda functions, and closures in C++ without some ugly hacks, and then we'll talk.
Quote:

As for playing around. I can't modify code while its running. At least not with current compilers, because the code is compiled. But from my experience, its easier to debug C++ code than lisp code. Because of its typeless nature, lisp will allow errors to slip many levels deep, and when the problem arises, it can be very hard to track the source, but then, I might be biased, because the DrScheme debugger sucked. But again, my point is not to diss lisp here. My point is that debugging in C++ is not really an issue, nor is recompilation.

I don't see what being typeless has to do with debugability of a language. That's completely dependant on the development environment. There's nothing stopping anyone from creating a type-inferrable IDE for lisp that shows you the types of variables as you write it, so don't blame it on the language when it's the editor's fault. If I wanted to, I could create an IDE that completely strips off types from C++ source code and reinserts them before compiling--does that make C++ impossible to debug?
Quote:

Well, it should be possible to write drivers in lisp. With a flexible language like C++, you can do pretty much anything in a reasonable manner. From game engines to operating systems to server-side scripting for websites.

From what I hear, lisp can be compiled, meaning it can do all of those things. The point of him saying that was that lisp isn't very suitable for driver writing, not that it isn't possible. C++ is only suitable for one of those things--game engines, and even that kind of sways towards C.
Quote:

As for the efficiency... Efficiency in terms of development time, or running time, or something else? If you mean speed... Faster than python? Possible. Python is entirely interpreted. Faster than java? Well... Considering java is JIT compiled, and still quite fast (easily millions of function calls per second on a modern CPU), I'm not sure. Lisp is bound to require more overhead for its special features (functions as first-class objects, for example). Faster than a language like C or C++, I don't think so. C++ is designed to easily map to hardware features, which makes it hard to beat in terms of speed, no matter what kind of fancy runtime optimization that hardly applies to the real world you use.

If O'Caml can run neck-to-neck with C++, I'm sure lisp can.

Share this post


Link to post
Share on other sites
Quote:
Original post by CoffeeMug
Let's see. It takes about five seconds to start up the java application I'm working on. Another five seconds to log in. And about five seconds for compilation of my changes. A total of fifteen seconds. While I'm fixing incorrect behavior I make changes->recompile->restart. Every two minutes. All day long. That means I lose about 12% of my development time (it's a lot more than that in practice, but whatever). If I do this for four hours every day, that accounts for half an hour of lost productivity every day, two and a half hours every week, 130 hours every year. Considering that average software developer costs about $50 per hour (including benefits, etc.) that accounts for $6,500 lost every year *per developer*. For a large company that employes, say, a thousand developers in different areas that accounts for six and a half million dollars of wasted time every year! Enough, in fact, to hire at least 65 developers!


I hope you weren't serious when saying that, because, seriously, it couldn't be farther off from reality. I won't take the time to point out all details, but I'll just say this. Productivity of programmers is not a question of programming time. Its a question of thinking things through and doing them carefully. Most of the time I spend programming is spent looking at code. Testing is most often trivial. Run the program, it works, do a few tests here and there, close the program. And guess what? I can keep coding while its compiling, and even while the program is loading up. As for amounts of lost productivity and lost corporate money, they make you sound like some microsoft representative. Gross overestimates of the costs of an inexistent problem.

If you really think that programming productivity works like that, then you should start avoiding all contact with your co-workers, because talking to them makes you lose a few precious minutes everyday. You should also reduce the number of times you go to the bathroom, because you're wasting more precious time. Coffee and diner breaks should also be eliminated, think about all it costs the company!

Share this post


Link to post
Share on other sites
Quote:
Original post by Max_Payne
Quote:
Original post by CoffeeMug
Emacs. AutoCAD uses Lisp heavily. Just take a look at this.


From what I see, those products are "using lisp", they were not made completely in lisp, or even primarily in lisp.


I glanced through the emacs source code, it looks to me that the 7MB's of C code is there to set up a lisp enviroment for the 17.1MB of lisp code. And considering how terse LISP can be that's probaly why emacs has everything but the kitchen sink in it.

And complaining about lisp due to experience with scheme, is like saying C++ and Java sucks, because basic isn't that great.

Share this post


Link to post
Share on other sites
Quote:
Original post by Max_Payne

I haven't used common lisp myself, only scheme, for a class about programming languages where we had to write a simple interpreter. I don't know if all lisp dialects are like that, but the scheme variation we used made it for very hacked code, and was quite impractical. It was quick to write the interpreter, but I wouldn't say the result was neat and tidy. Its not something I see anyone writing real-world software with.


It's interesting how it happens that the poster in this thread that thinks the least of Lisp knows the least about it too.

Share this post


Link to post
Share on other sites
Quote:
Original post by Diodor
Quote:
Original post by Max_Payne

I haven't used common lisp myself, only scheme, for a class about programming languages where we had to write a simple interpreter. I don't know if all lisp dialects are like that, but the scheme variation we used made it for very hacked code, and was quite impractical. It was quick to write the interpreter, but I wouldn't say the result was neat and tidy. Its not something I see anyone writing real-world software with.


It's interesting how it happens that the poster in this thread that thinks the least of Lisp knows the least about it too.


Indeed, but I do have *some experience* with it. I don't bash OCaml because I haven't ever tried it (although they really seem to be exagerating things a bit). But why don't we change the focus of this thread. Show me, and those that don't know much about it, what is so great about lisp ;) The topic of this thread is "Lisp Pimpin'", after all :D

A raytracer implementation in lisp would be interesting, for example.

Share this post


Link to post
Share on other sites
Quote:
Original post by Max_Payne
A raytracer implementation in lisp would be interesting, for example.

Jeez, a two second google search yielded this. You could probably find dozens of other implementations if you look hard enough.

Share this post


Link to post
Share on other sites
Quote:
Original post by Diodor
It's interesting how it happens that the poster in this thread that thinks the least of Lisp knows the least about it too.

This applies to any Lisp discussion. You'll never find somebody who understands Lisp arguing against it. Two years ago I was on this board using Max_Payne's arguments. It took me many hours of hard work to actually understand Lisp but once I "got it" I saw programming in a completely different light. I'm not here to force my opinions on anyone. I'm merely trying to convince Max_Payne to give Lisp a closer look for his own benefit [grin]

Share this post


Link to post
Share on other sites
Quote:
Original post by CoffeeMug
Quote:
Original post by Diodor
It's interesting how it happens that the poster in this thread that thinks the least of Lisp knows the least about it too.

This applies to any Lisp discussion. You'll never find somebody who understands Lisp arguing against it. Two years ago I was on this board using Max_Payne's arguments. It took me many hours of hard work to actually understand Lisp but once I "got it" I saw programming in a completely different light. I'm not here to force my opinions on anyone. I'm merely trying to convince Max_Payne to give Lisp a closer look for his own benefit [grin]


Well, considering I'm mostly interested in graphics and 3D engines, you'd have to convince me that lisp can help me write simple, clean and very efficient code. I haven't seen many arguments for that. All the lisp code I see is always a dense pack of parentheses with few comments.

For the raytracer, maybe they're not experienced lisp programmers, but it seems nasty to me that they're performing vector operations by performing them on each individual component.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!