8 ms·
"Lisp is the language of loveliness. With it a great programmer can make a beautiful, operating thing, a thing organically created and formed through the intera
by michaelwww 13y ago
"Lisp is the language of loveliness. With it a great programmer can make a beautiful, operating thing, a thing organically created and formed through the interaction of a programmer/artist and a medium of expression that happens to execute on a computer."
It's this kind of statement that makes me suspect Lisp is not very practical. I'm not programming for the sake of programming to create something that "happens to execute on a computer." There are other artistic endeavors for my free time that are more interesting than a lovely computer language.
- enduser 13y agoThat's like saying that a walker allows you to traverse a floor more "practically" than dancing.
- michaelwww 13y agoSo in your estimation all other computer languages are walkers compared to the beautiful dance of Lisp? I'm curious, maybe I really do need to learn Lisp.
- enduser 13y agoThat is my estimation. If you don't need performance or macros, Python and Ruby may give you a similar development experience. However, neither of those languages AFAIK allows you to redefine (let alone recompile to native code) functions at runtime.
- Jimmy 13y agoRuby is an extremely dynamic language, where you can redefine almost anything at runtime: def f() puts "f1" end f() if true def f() puts "true" end else def f() puts "false" end end f() This outputs: f1 true As for native code, apparently MacRuby [1] compiles to native code, although I've never used it, so I don't know the details of that claim. Can you give an example where redefining a function at runtime is a useful feature to have? I don't mean this as a challenge, I'm just curious. I like the extreme flexibility that dynamic languages provide, but it seems like the most dynamic features are mainly useful for library writers. [1] http://stackoverflow.com/questions/1972388/is-it-possible-to-compile-ruby-to-byte-code-as-with-python http://stackoverflow.com/questions/1972388/is-it-possible-to...
- Munksgaard 13y agoI don't think this is what enduser means. Lisp is the only language i know of where you can run a function such as (defun foo () (progn (format t "~a~%" (read-line)) (foo))) and then, while it is recursing, change the function to (defun foo () (progn (format t "~a and john~%" (read-line)) (foo))) recompile it, and have the behavior of your program change, while it is running. This is part of what makes lisp excellent for rapid prototyping. I'd give more examples, but I'm lazy, and it's been properly described elsewhere.
- Groxx 13y agoSeems pretty simple to me in Ruby. $ irb >> def go > puts "what" > debugger > go > end >> go "what" # stops on debugger line >> Object.module_eval "def go; puts 'wat'; end" >> continue "wat" There are of course other ways to do that, I just picked a simple one. You can break at lines / statements in files, so you don't need to include that "debugger" line. You can do something other than Object.module_eval. You can use something like Pry that would make this simpler and give you in-line source code, even after editing (IIRC). You can use something like Hijack to modify any running Ruby process - when you disconnect, your modified code will still be running. Lisp is not special in what it is capable of. Period. It's special because a) it's very old, and b) it's tuned for these features, in its own unique, minimalistic way. Yes, not all languages can do this (though you can do crazy things with GDB / debuggers in general, including using it as a REPL for compiled languages (really! it's not hard!)). But Lisp / the Lisp family are not even remotely the only ones which can.
- Munksgaard 13y agoThat is indeed very handy, but I would argue that there's a difference between running a program in a debugger and running it normally. With regards to the rest of your post: macros and data-as-code. Have you read this http://www.paulgraham.com/diff.html http://www.paulgraham.com/diff.html ?
- 13y ago
- michaelwww 13y agoHow is dynamically changing function definitions not a side effect or state change?
- Munksgaard 13y agoWhat do you mean? Remember, that lisp isn't inherently a pure functional programming language. On the contrary, it's a very versatile multi-paradigm language.
- michaelwww 13y agoI thought LISP was a functional language and I'm wondering how redefining a function at runtime is not a state change, but no matter, I'm reading Steve Yegge at the moment and his old take down of LISP which confirms my suspicions (don't you love it when you read something that does that ;-) http://steve-yegge.blogspot.com/2006/04/lisp-is-not-acceptable-lisp.html http://steve-yegge.blogspot.com/2006/04/lisp-is-not-acceptab...
- Munksgaard 13y agoThanks, that was a very interesting blog post. I feel like the comments add a lot of balance to the discussion (especially Pascal's, which Steve also mention in the blog itself). There's no doubt that lisp has its problems, because if not, it would be a lot more popular today than is the case. Do note however, that a lot has changed since Steve posted that blog entry, most notably is the rise of clojure, which offers solutions to a lot of the problems mentioned.
- michaelwww 13y agoRich Hickey is a very interesting language designer and maybe the "benevolent dictator" that Lisp needs. Clojure works on the JVM and .Net as well as emitting JavaScript, so I'll probably take the plunge with it. I also thought the Light Table demo was extremely interesting. Good stuff.
- jbooth 13y agoIf my goal is to get across the floor, I'd prefer a brisk walk.