Live data from Hacker News

Lisp Wins (Steve Yegge article)

steve.yegge.googlepages.com

11–19 of 19 posts

Re: Lisp Wins (Steve Yegge article)

#11
post #2

"Note: although I came to the conclusion in this article that Lisp beats Java hands-down as a language, more research has got me thinking that Java beats Lisp hands-down as a platform..." These days (article is from 2004) we have the luxury of being able to use expressive languages within a large library ecosystem by using implementations of them in the giant platforms that have been built by Sun and Microsoft. Perso…

In 2004 I had already been using Kawa Scheme on the JVM in my day job for 4 years. That's also the year I began OurDoings using the same technology.

http://ourdoings.com/2004-08-24

Re: Lisp Wins (Steve Yegge article)

#12
post #8
post #5

this is not true is it? there must be a way to make this shorter, otherways that is completely ridiculous. """" The equivalent code in Java, as reasonably compressed as I could make it, is: import java.util. ; public class Fugger { public static void main ( String[] args ) { List numbers = new ArrayList(); for ( int i = 0; i } """" and his example in python: ' '.join([`x x` for x in range(1, 6)]) rofl...

Interestingly, the author didn't show that program in lisp ... which do you think is better style: (mapc #'(lambda (x) (print (expt x 2))) (list 1 2 3 4 5)) or (loop for i from 1 upto 5 do (print (expt i 2))) interestingly, they are both longer than python/perl ... Not to turn this into a game of Golf, but is there any shorter way?

Scheme:

  (define nums '(1 2 3 4 5))
  (write (map * nums nums))

Re: Lisp Wins (Steve Yegge article)

#13
post #11
post #2

"Note: although I came to the conclusion in this article that Lisp beats Java hands-down as a language, more research has got me thinking that Java beats Lisp hands-down as a platform..." These days (article is from 2004) we have the luxury of being able to use expressive languages within a large library ecosystem by using implementations of them in the giant platforms that have been built by Sun and Microsoft. Perso…

In 2004 I had already been using Kawa Scheme on the JVM in my day job for 4 years. That's also the year I began OurDoings using the same technology. http://ourdoings.com/2004-08-24

There's also SISC, which purports to be a full implementation of R5RS Scheme for the JVM.

http://sisc-scheme.org/

Re: Lisp Wins (Steve Yegge article)

#14
post #8
post #5

this is not true is it? there must be a way to make this shorter, otherways that is completely ridiculous. """" The equivalent code in Java, as reasonably compressed as I could make it, is: import java.util. ; public class Fugger { public static void main ( String[] args ) { List numbers = new ArrayList(); for ( int i = 0; i } """" and his example in python: ' '.join([`x x` for x in range(1, 6)]) rofl...

Interestingly, the author didn't show that program in lisp ... which do you think is better style: (mapc #'(lambda (x) (print (expt x 2))) (list 1 2 3 4 5)) or (loop for i from 1 upto 5 do (print (expt i 2))) interestingly, they are both longer than python/perl ... Not to turn this into a game of Golf, but is there any shorter way?

If you just want to print the same output, you can be ever so slightly shorter than his Perl/Python:

(dotimes (i 5) (print (expt (1+ i) 2)))

This doesn't follow his semantic steps, so it's kind of cheating, though in a real program I have a bunch of utility functions to help me out so it's about the same:

(join " " (mapcar #'sq (range 1 5)))

I think the point is not that Lisp is shorter for any given toy problem, but that Lisp allows you to build such abstractions. Even if you had join() and range() and sq() in Java, what's Java for (f x (mapcar #'g (h y z)))?

Re: Lisp Wins (Steve Yegge article)

#15
post #11
post #2

"Note: although I came to the conclusion in this article that Lisp beats Java hands-down as a language, more research has got me thinking that Java beats Lisp hands-down as a platform..." These days (article is from 2004) we have the luxury of being able to use expressive languages within a large library ecosystem by using implementations of them in the giant platforms that have been built by Sun and Microsoft. Perso…

In 2004 I had already been using Kawa Scheme on the JVM in my day job for 4 years. That's also the year I began OurDoings using the same technology. http://ourdoings.com/2004-08-24

Are you also familiar with Clojure? How would you compare the two?

Re: Lisp Wins (Steve Yegge article)

#16
post #11

Earlier quoted context omitted.

In 2004 I had already been using Kawa Scheme on the JVM in my day job for 4 years. That's also the year I began OurDoings using the same technology. http://ourdoings.com/2004-08-24

Are you also familiar with Clojure? How would you compare the two?

I'm not familiar with Clojure, but as I understand it's a new language. Kawa is R5RS Scheme except it can't capture continuations. Kawa has the advantage of being a fast compiler. SISC is an interpreter, but it is more completely standards-compliant Scheme.

Re: Lisp Wins (Steve Yegge article)

#17
post #5

this is not true is it? there must be a way to make this shorter, otherways that is completely ridiculous. """" The equivalent code in Java, as reasonably compressed as I could make it, is: import java.util. ; public class Fugger { public static void main ( String[] args ) { List numbers = new ArrayList(); for ( int i = 0; i } """" and his example in python: ' '.join([`x x` for x in range(1, 6)]) rofl...

Yeah, I got the opinion that he was taking the mickey on that one.

Re: Lisp Wins (Steve Yegge article)

#18
post #8
post #5

this is not true is it? there must be a way to make this shorter, otherways that is completely ridiculous. """" The equivalent code in Java, as reasonably compressed as I could make it, is: import java.util. ; public class Fugger { public static void main ( String[] args ) { List numbers = new ArrayList(); for ( int i = 0; i } """" and his example in python: ' '.join([`x x` for x in range(1, 6)]) rofl...

Interestingly, the author didn't show that program in lisp ... which do you think is better style: (mapc #'(lambda (x) (print (expt x 2))) (list 1 2 3 4 5)) or (loop for i from 1 upto 5 do (print (expt i 2))) interestingly, they are both longer than python/perl ... Not to turn this into a game of Golf, but is there any shorter way?

Clojure:

  user=> (map #(* % %) (range 1 6))
  (1 4 9 16 25)
  user=>

Re: Lisp Wins (Steve Yegge article)

#19
post #10
post #3

I don't accept that his particular verbose version of doing things in java is acceptable. Just because dynamic language x does x things hidden behind a bunch of code means that you have to emulate the exact same things in another language to achieve the same result. It's bad smalltalk to emulate C while your programming for it, and similarly it's bad C to emulate smalltalk with it. It's like I would take his original…

Can you give a few examples of SML's "many, many restrictions"? The only things I can think of that fit that description are the value restriction and lack of first-class polymorphism, but neither of these should have a serious effect on productivity.

When I was given assignments for SML, I was constantly running into x or y restriction whenever I tried something. Maybe my prof knew how to setup his assignment for maximum frustration using SML, and normal usage is not so bad (after you gain some skill in it), I don't know. But consensus from my class & some people on the net is that it shouldn't take hours to get a 10 line program working. Principle of least surprise is something SML does not follow. Also there's a lack of a support network & decent documentation for it compared to more popular languages out there. I'd rather use lisp than the traumatic experience SML was. At least the syntax isn't much to learn.
Post reply on HN