Live data from Hacker News

Lisp Wins (Steve Yegge article)

steve.yegge.googlepages.com

1–10 of 19 posts

Re: Lisp Wins (Steve Yegge article)

#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. Personally, I'm using Clojure, a Lisp dialect on the JVM, for all my explorative programming. Yegge himself seems to be working with Rhino (JavaScript on the JVM) these days.

Re: Lisp Wins (Steve Yegge article)

#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 java version and made it into perl, insisting that the perl script HAS to be in a class definition, and HAS to be in a main method, I MUST define the resultset in a static class list, and output with separate methods. Saying that perl couldn't reproduce my 'reusable object' java functionality with doing that is just pedantic.

He should of just extracted a real example where it's impossible to do something in a short amount of code due to the lack of a specific feature, or being chained to java's static typing. Like converting a JDBC ResultSet to an int[]. (5 lines of code, 15 if you don't compress the curly brackets)

A real life implementation of his example: public class Out { public static void main(String args[]){ for (int i = 0; i Also just because a language is succinct, doesn't mean it's productive. Just look at SML. It's many, many restrictions act as a straitjacket to do simple things, yet also keeps things succinct. It's would be better to say that because of intentional restrictions x (static typing) or lack of feature y (first class functions), it makes it that doing some simple thing z is forced to used workaround a. Because language b has this feature set, this leads to general bureaucratic overload.

Java isn't bureaucratic just because of the language alone, Sun & apache contributes a lot of this itself in how they've programmed their standard libraries and their love affair with XML.

Re: Lisp Wins (Steve Yegge article)

#4
That 0.5 million line java game of his must be really something. I saw some screenshots and it reminded me of things I played on Windows 3.1. Dollars to donuts he's going some wtf-worthy stuff in there.

ED: Oh, yeah, reading through the article, I see it must be true. His "print the squares" example is pretty bad. If I did it (using some home[green]spun libraries) it would look like this, more or less:

  List squares=Util.makeList(Util.makeList(1,2,3,4,5),Util.class,"square");
  System.out.println(squares);
(Reflection is being performed, with "square" being a static method from Util.class) Really, I would need a Util.makeRange(1,5) function to get closer to perl.

Re: Lisp Wins (Steve Yegge article)

#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...

Re: Lisp Wins (Steve Yegge article)

#6
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…

"and their love affair with XML."

You just gave me an idea for an excellent April's Fools prank.

Re: Lisp Wins (Steve Yegge article)

#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?

Re: Lisp Wins (Steve Yegge article)

#9
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?

Arc:

(pr (map [* _ _] (range 1 5)))

Re: Lisp Wins (Steve Yegge article)

#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.
Post reply on HN