Live data from Hacker News

Why Racket? Why Lisp? (2014)

practicaltypography.com

111–120 of 168 posts

Re: Why Racket? Why Lisp? (2014)

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

This is Matthew Butterick. I wrote “Why Racket? Why Lisp?”

As I allude there, Paul Graham’s writings about Lisp (mostly in Hackers & Painters) helped persuade me to explore Lisp languages. (Those writings have also persuaded many others.)

In particular, Arc's reliance on Racket persuaded me to take a serious look at Racket. So leaving aside quibbles about what “on top of” means — is Clojure not built “on top of” the JVM? Python “on top of” C? — Paul’s choice of Racket was influential in my choice too. (As it has been for many others.)

As for software being “built in [one’s] head,” that seems facially true of any software. The core thesis of “Beating the Averages” is that the tool you choose to get it out of your head and into the world matters. Having now had my own Lisp revelation, I not only buy Paul’s thesis, but I even think it could be strengthened: Lisp permits the implementation of a whole category of ideas that aren’t possible in other languages.

Moreover, Paul wrote that essay nearly 14 years ago. Since then, Lisps have gotten somewhat more popular (Clojure has led the pack). But as I say in the article, as a group, Lisps remain way behind the programming mainstream. So ultimately, my goal is not to evangelize for Racket and exclude other Lisps. I know Racket better because that’s what I use. But more people using all of them would be a great thing.

Re: Why Racket? Why Lisp? (2014)

#112
post #82

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

>But never have I experienced this kind of mental strain/obsession as I do now with lisp. That's why it's so valuable as a right of passage. If you've spent your career writing simple iterative imperative loops, suddenly you're a newb again with map/filter/reduce this, partial that, and recursion and lambdas and closures and finally after your 20th time staring, dazed at 3 measly lines of nested composed recursion -…

Try typed functional languages next. You'll be a newbie again.

Re: Why Racket? Why Lisp? (2014)

#113
post #18

I have so far stuck with Clojure instead of a Scheme primarily because of the nice literal syntax for maps, sets, vectors, and regexes that Clojure supports. I don't want to give that up and just use cons/car/cdr. And also, last time I looked at Racket, it seemed very focused on academics. I just wanted to write some simple Scheme in a .scm file and try it out (a script), but I think I had to choose a language first…

> I don't want to give that up and just use cons/car/cdr.

Any somewhat modern Lisp has hash tables, vectors, etc.

Re: Why Racket? Why Lisp? (2014)

#114

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

My first exposure to Lisp was through a combination of Hacker News, SICP, and Paradigms of Artificial Intelligence. Also, there may have been a blog post by one of the Posterous (or a similar company) guys about getting started with SBCL for web services.

At the time, although I could read the material, it seemed to require too much mentally to actually Get Things Done. I think it was a deep misunderstanding about how to structure a program that is independent of state.

Later, after playing with Scala, amongst other languages, I came to understand that state exists in functional programs. It's not conjured up out of nowhere, spontaneously brought into existence, but rather, it exists as data, and it is the job of the program to direct the flow of data appropriately - like a plumbing system, so to speak.

Re: Why Racket? Why Lisp? (2014)

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

>commonly-needed things as, say, hashes

Hash tables are commonly used in imperative programming, but they aren't needed so often in Scheme where we prefer to use a purely functional style. We usually use alists because they are persistent. When I reach for a mutable hash table, it's usually part of some imperative process where I start from an empty table.

Depending on the Scheme you use, there could also be a persistent hash table implementation. Guile has vhashes, and there's an alist->vhash procedure, so you can still use the alist syntax.

Re: Why Racket? Why Lisp? (2014)

#116

Earlier quoted context omitted.

Reminds me of this article: http://www.lambdassociates.org/blog/bipolar.htm

Yes. I've read that article several times. I fit the description perfectly and I think it's one of the reasons I'm learning lisp now. It might be of use for the huge project that I'm about to start in the near future. I don't like the dark side, I hate to see all the beauty I create when I'm 'high' dribble through the impotent hands of the dark periods. But I've come to accept that this is how I am and always will be…

The GP article seems like self-congratulatory fluff. So, just to be clear, what you're saying is that you're brilliant and this is a problem?

Re: Why Racket? Why Lisp? (2014)

#117
post #47

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

It's not so sudden. HN itself is written in a LISP [1], and Paul Graham's pre-YC claim to fame was Viaweb, a store platform written in LISP that became Yahoo Stores. This community has been above-average LISP friendly for a long time. LISP's also has a long history of popping up all over the place because they are extremely implementation-friendly (if you want to write a simple language; if you want to make things fa…

It's spelled 'Lisp'. There has been zero overlap between people writing "LISP" and people writing lisp code for about half a century.

Re: Why Racket? Why Lisp? (2014)

#118
post #4
post #2

Previous discussion can be found here: https://news.ycombinator.com/item?id=8206038 Have noticed quite a bit more buzz about Racket and Lisp very recently around here. It's always been something I mean to explore.

We seem to be on a Racket buzz lately, and I like it. I feel more inspired to dig further into Racket. I'm already pretty good with Clojure, so can anyone who knows both languages well comment on the ups and downs of learning Racket after learning Clojure?

Actually, Racket and Clojure share very little in terms of syntax and semantics. Lisps are like that: they all have parens and frequently that's the end of similarities. Semantics of Common Lisp, Emacs Lisp, Scheme, newLISP - not to mention Shen - are very different. You should treat them as separate languages, especially when learning. So, in short (I went Racket->Clojure), there are no problems if you remember not to write Racket in Clojure and vice versa :)

Re: Why Racket? Why Lisp? (2014)

#119

Earlier quoted context omitted.

Yes. I've read that article several times. I fit the description perfectly and I think it's one of the reasons I'm learning lisp now. It might be of use for the huge project that I'm about to start in the near future. I don't like the dark side, I hate to see all the beauty I create when I'm 'high' dribble through the impotent hands of the dark periods. But I've come to accept that this is how I am and always will be…

The GP article seems like self-congratulatory fluff. So, just to be clear, what you're saying is that you're brilliant and this is a problem?

Whatever 'brilliant' is supposed to mean, when I try to apply that adjective towards myself I'm immediately reminded about the numerous times I've felt humbled by someone else's infinitely higher brilliance (be it a book, source code, mathematical expression, song, poem, movie, etc) and then I just feel stupid for trying to place myself even close to those I so deeply respect.

Brilliant is impossible to be, what we can hope for is moments of 'brilliance', where one can come up with original solutions to problems. Ideas, revelations..

I do have those from time to time and it feels great.

But as a human being, it does matter what and how you feel in between those moments of brilliance.

And during a 'low' phase (which can last months, day after day), all your moments of brilliance are replaced with mental blocks, melancholy, cynicism and pessimism about everything and everyone. It's a very bad place to be, it's painful, the feeling of being a fraud, the way you disappoint yourself and others by not following through, the way you see your dreams and hopes drown in a sea of confusion and frustration. When everything you've earned/gained is slowly erased and you have to start again from step 1.

Yeah, I think that's a problem. You either kill yourself, drink/drug yourself to death or find a way to cope with it. My solution is to just obsess on books/studying new stuff when the mental winter comes and try to stay away from the easy escapes.

Re: Why Racket? Why Lisp? (2014)

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

Lisp doesn't have pattern matching. With optima[0] it does.

Lisp uses prefix notation. With mexpr[1] it uses infix notation.

And so on.

[0] https://github.com/m2ym/optima

[1] https://github.com/tmccombs/mexpr

Post reply on HN