Live data from Hacker News

Why Racket? Why Lisp? (2014)

practicaltypography.com

61–70 of 168 posts

Re: Why Racket? Why Lisp? (2014)

#61
post #48

"Paul Graham’s programming language Arc, a dialect of Lisp, was built on top of Racket." Since that statement occurs in a section about Racket languages, I should probably clarify. Arc isn't technically a Racket language—that is, it doesn't use any of Racket's facilities for defining new languages. It compiles to Racket (and so you're all using it right now), but has its own distinct implementation. Historically, Arc…

I think it compiled to MzScheme first.

MzScheme came comparatively late. Here is a post from when it was Scheme48 and after it was Common Lisp:

http://www.reddit.com/r/programming/comments/bstl/arc_lisp_d...

A friend told me he used to track developments in Arc by noticing when pg had switched mailing lists. :)

Re: Why Racket? Why Lisp? (2014)

#62
post #37

Earlier quoted context omitted.

I'd encourage you to give it a longer try. When selecting a language, just pick R(5,6,7)RS and you're set. Liking syntax sugar is hardly a reason not to use the language with the most powerful macros around. You can write macros to provide nice literal syntax for whatever you want - this is part of the fun.

Have not yet learned to use or appreciate macros. The idea of everyone having to come up with their own syntax for such commonly-needed things as, say, hashes, seems counter-productive to me. That would lead to everyone's code looking like a different language.

Tell me you wouldn't want to avoid this boilerplate:

    public class HelloWorld {
        public static void main(String[] args) {
            System.out.println("Hello, World");
        }
    }

and instead write a nice little main macro, so you may just write:

    (main (print "Hello, World!"))
Do that a few times in an application, and instead of 10 million LoC, you can write it in 100,000 LoC. This becomes much more maintainable!

Also, see: Alan Kay "Programming and Scaling" 2011

    http://www.tele-task.de/archive/video/flash/14029/
    https://www.youtube.com/watch?v=gZmcmdsoAXU
    https://www.youtube.com/watch?v=-UOmItPa4iA
    https://www.youtube.com/watch?v=QlPavndhYxQ
    https://www.youtube.com/watch?v=y9xLi0iJg1g

Also have a look at:

    https://groups.google.com/forum/#!msg/comp.lang.lisp/gsQJOGKYUw4/oLLHW0f4Ce4J
    https://groups.google.com/forum/#!msg/comp.programming/FiNIiSm5cJE/JkF5wa6Ke54J

Re: Why Racket? Why Lisp? (2014)

#63

> What's in it for me? Expressiveness. I appreciate the author's wanting a more explicit and practical answer to this question, but I don't think his answer here ("expressiveness") does any better job than the other explanations he criticizes. > But [learning Lisp] also requires an investment of about 100–200 hours. That's asking too much. No, it's not. That's how long it takes sometimes, or longer. Why do we all exp…

Sure, that's true. But the problem is, there are dozens of things telling me that, if I invest that kind of time in them, they'll pay me back. Which one(s) should I pursue? In order to decide, I have to have some explanation of the benefits that I can grasp (at least in the abstract) before investing 100 hours. "Invest 100 hours and then you'll see why you should have done so" is not a sales pitch that will win with very many people.

Re: Why Racket? Why Lisp? (2014)

#64

What is a good resource to learn Lisp for an advanced (non Lisp) programmer? Most guides for most languages only cover declaration, simple functions and tiny applications. I want something that quickly goes through the basics and skips to advanced uses in bigger codebases.

Practical Common Lisp by Peter Seibel: http://www.gigamonkeys.com/book/

I'll second PCL. It really is incredibly good. Unlike some other introductions to Lisp, which tend to be of the algorithmic, CS side of things, PCL approaches things from more of a scripting/software-development side.

Common Lisp really is a great developer's language, and PCL helps show why. Peter Seibel's a great writer, too.

Re: Why Racket? Why Lisp? (2014)

#65
post #51

I have a feeling people tend to over estimate the importance of language choice. Might be just me though.

Many people agree with you but I have the opposite view. Of course you can write any program in any Turing complete language, but the programs people do write in a given language tend to have a family resemblance to one another. Therefore if we want different kinds of programs we should have different languages. A given language makes certain ideas easier or harder to formulate, and thus easier or harder to have in t…

Some have also said that the human language you speak has an effect on how you think, but that's pretty controversial among linguists if not altogether discredited.

I have no doubt the difference among human languages and programming languages could be completely different, but is there any concrete example you could give of an idea that is easier to express in one programming language than in another?

Re: Why Racket? Why Lisp? (2014)

#66
post #37

Earlier quoted context omitted.

Have not yet learned to use or appreciate macros. The idea of everyone having to come up with their own syntax for such commonly-needed things as, say, hashes, seems counter-productive to me. That would lead to everyone's code looking like a different language.

Tell me you wouldn't want to avoid this boilerplate: public class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World"); } } and instead write a nice little main macro, so you may just write: (main (print "Hello, World!")) Do that a few times in an application, and instead of 10 million LoC, you can write it in 100,000 LoC. This becomes much more maintainable! Also, see: Alan Kay "P…

Sure. And then imagine that you have to take over someone else's 100,000 LoC written with their own, unique, macros, some of which may invoke other macros, and interact with them in surprising ways, depending on what's passed into them. Now you have to be able to keep in your head what all those macros do (including to each other) while you're trying to read those 100,000 LoC.

At that point, you may not find the macros to be so much of an improvement on the boilerplate...

Re: Why Racket? Why Lisp? (2014)

#67

I have a feeling people tend to over estimate the importance of language choice. Might be just me though.

Think about this:

What kind of code do you think people will be writing 10,000 years from now? What will they be able to do that you can't? What will they have that you don't?

Re: Why Racket? Why Lisp? (2014)

#68
post #29

Has anyone tried to use Butterick's Pollen and written about it? The idea of debugging your website with racket as you write markup and styles seemed really interesting alternative to what I do; write styles, refresh, and then refine the stylesheet by incrementally adding changes with the inspector and then copying them to my stylesheet.

I'm working through the admittedly beautiful and very thorough documentation [1]. It's a very simple idea, really: you write your document and sprinkle racket s-expressions wherever you want. You can put your definitions at the top of your document, or in another file. You describe your templates in Racket also, because like Butterick says in his RacketCon video [2], "S-expressions and XML are the same thing". You ca…

The documentation is an absolute pleasure to read. I think I'm beginning to understand the use case for it more. I would definitely choose it if I had a large source text that I wanted to publish. I have to write the docs for a project I'm working on right now, maybe I'll get a chance to play with Pollen then.

Re: Why Racket? Why Lisp? (2014)

#69
Why hasn't XML been matched to Lisp very much? I think it's because Lisp programmers recoil in horror from XML. I mean, if you're already used to S expressions, XML looks disgusting. As verbose as Java, and less expressive. So I think most Lisp programmers look at XML and think "Ugh, don't get any of that on me..."

Re: Why Racket? Why Lisp? (2014)

#70

Why hasn't XML been matched to Lisp very much? I think it's because Lisp programmers recoil in horror from XML. I mean, if you're already used to S expressions, XML looks disgusting. As verbose as Java, and less expressive. So I think most Lisp programmers look at XML and think "Ugh, don't get any of that on me..."

IIRC, it was Naggum that said the issue with XML is the useless distinction between elements and attributes, leading to countless discussion, bikeshedding etc etc instead of actually solving problems.
Post reply on HN