Live data from Hacker News

Why Racket? Why Lisp? (2014)

practicaltypography.com

71–80 of 168 posts

Re: Why Racket? Why Lisp? (2014)

#71

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

See the resources organized under XML and Scheme, by Oleg Kiselyov:

http://okmij.org/ftp/Scheme/xml.html

There is a Racket "package" (not quite a port) of SXML and SXSLT:

http://pkg-build.racket-lang.org/doc/sxml/

Re: Why Racket? Why Lisp? (2014)

#72

It's about a month since I've started seriously diving into lisp. The last couple of weeks I've spent my days reading 'The joy of Clojure', Structure and Interpretation of Computer programs, lots of tutorials and documentation, playing around in the repl + experimenting with all kinds of frameworks and libs in clojure (eg. Om). I've spent today implementing the brainfuck interpreter in Racket. I can't explain it, it'…

When you start to reach to point where metalevel, evaluation, transformation, compilation all fit into your mind you feel even weirder.

Re: Why Racket? Why Lisp? (2014)

#73
post #17

Earlier quoted context omitted.

Racket also defaults to immutable cons and you have to require set-car! and friends. But I agree, most Lisps do not impose/favor immutability

Ah, right, but that doesn't mean the language is immutable to the degree that it would make for a steep learning curve. Mutating cons cells is arguably an obscure feature; you are free to mutate variables, vectors, structs, tables, and so on (even if you might have to specify that you want mutability).

My experience with racket is certainly not one of steep learning curve. Plus it is _thoroughly_ documented. If I had to recommend a Lisp implementation for someone that wants to learn a Lisp it would definitely be Racket as it is easy to install (and works on windows), has great documentation and a super friendly and interesting community.

The only thing I'm not fond of Racket is that compared to CL w/ Slime it feels way less interactive, a step up from Python, but still not CL (nor Smalltalk)

But lets focus on the positive, the OP is highlighting that the trite criticism of non-lispers about parens is bogus.

Re: Why Racket? Why Lisp? (2014)

#74
post #40

> (x + (if is_true(): 1 else: 2)) [is invalid in Python] be­cause the if–else con­di­tional is a state­ment, and can only be used in cer­tain positions. Point taken, but troll-mode pedantry: (x + (1 if is_true() else 2)) would be valid :)

...but, in that case, the `X if Y else Z` syntax is considered to be an expression in Python. You can't, for example, omit the `else Z` part. In Haskell -- again, in which everything's an expression -- conditionals are the same, just written in the "normal" order: `if Y then X else Z`.

Re: Why Racket? Why Lisp? (2014)

#75

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

In the long run it's true. The abstraction levels shift, you think in systems, data, bandwidth, maintenance, etc, which are outside of language scope (for now). Lisp is different though, it's not really a language, or it's just enough of a language to express ideas the way you need them to, so it does matter a little.

Re: Why Racket? Why Lisp? (2014)

#76
As someone who thinks Lisp is pretty cool and uses Emacs to study it and is about 100 pages into SICP: I still don't get it. Common Lisp macros went entirely over my head too. A programmable programming language? Aren't all languages like that? I've only been programming for a couple years so I'm afraid I might not recognize the value of Lisp until I use more of the "less powerful" alternatives.

Re: Why Racket? Why Lisp? (2014)

#77
post #51

Earlier quoted context omitted.

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?

IMO the analogy to human languages is a distraction and best avoided, since we're not able to say meaningful things about both.

> is there any concrete example you could give of an idea that is easier to express in one programming language than in another

Sure. Since this thread is about Lisps: writing code that works with other code is an order of magnitude easier in Lisp. Therefore people tend to do it a lot more.

Re: Why Racket? Why Lisp? (2014)

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

MZ Scheme was a precursor to Racket. Same people, AFAIK same core codebase.

http://docs.racket-lang.org/mzscheme

Re: Why Racket? Why Lisp? (2014)

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

Good discussion of the advantages of Arc versus Racket. http://stackoverflow.com/questions/8555440/the-advantage-of-...

"I wish they had implemented Arc as a Racket module language since then you could actually develop in DRracket, debug, and make executables."

Re: Why Racket? Why Lisp? (2014)

#80

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

Why do you expect things that really improve your life to come with sales pitches?
Post reply on HN