Live data from Hacker News

Why Racket? Why Lisp? (2014)

practicaltypography.com

81–90 of 168 posts

Re: Why Racket? Why Lisp? (2014)

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

So, a sort of Sapir-Whorf hypothesis for the programming domain. It certainly feels true; living and breathing a language like Erlang would probably make one think very differently about what's possible than someone immersed in Fortran.

Re: Why Racket? Why Lisp? (2014)

#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 - it all starts to flow, and boom, you have a new way of approaching every problem.

And even if you don't live in the lispy functional realm after that you'll always be better off for having crossed that threshold.

Re: Why Racket? Why Lisp? (2014)

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

Try to write Python style metaprogramming is something like Java some day. It's perfectly possible, but nobody would think about that style. Now try to write it in C++, just for the lulz.

Or, if you are not satisfied, try to create a non-synchronous TCP server in C, Java, or Python. Then write one in Haskell.

Try creating RAII containers in Java... Ops, that can not be done!

Re: Why Racket? Why Lisp? (2014)

#84

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

I went through a Lisp phase exactly like that. Currently I'm going through an extremely similar Haskell phase. I've learnt half a dozen languages before these two, but I've never experienced the satisfaction and obsession I've experienced with these two. My Lisp phase went on for the better part of a year, and I've been learning all the Haskell I can for 11 months now, but my obsession is still in full force. Haskell also turned me towards maths, and now I'm reading a book about category theory and a book about type theory.

Re: Why Racket? Why Lisp? (2014)

#85

Earlier quoted context omitted.

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?

People are usually eager to recommend things that they feel really improved their life. If you, for example, read HN, you see "sales pitches" (in the broad sense) all the time.

Re: Why Racket? Why Lisp? (2014)

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

That discussion doesn't seem very good to me, though there are some nice examples of Arc's notation at the bottom.

Our own kogir actually worked for a while on implementing Arc as a Racket language. It would have some advantages, especially around tooling. However, like all such platforms, Racket has a sweet spot (what's easy to build on top of it), and the further your semantics are from there, the harder it quickly gets. Redefining how null, true/false, lists, and macros work—as Arc does, relative to Racket—is not how a language platform is meant to be used! You end up fighting with it in a way that loses most of the advantages, and the difficulty seems to grow asymptotically as you approach 100%.

What you want instead is to stay in the sweet spot and let the underlying platform nudge the new language in all the directions that are easy to implement. The same is true of building transpilers—it's an order of magnitude easier when you can piggyback on the semantics of the underlying language. But this is not an option if your source language has already been defined elsewhere.

Re: Why Racket? Why Lisp? (2014)

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

The principal data structure of Lisp is a list which is written like this: (a b c d). Like the article mentions, when you see Lisp code you're in fact reading the same list syntax, only that, when the list itself is not quoted, the "a" is evaluated as a function, which is why (+ 1 2) behaves the way it does. If you quote the list by saying "'(a b c d)" then it is a list of symbols, so "'(+ 1 2)" does nothing.

Hence, Lisp code is made of nested lists. When you think further about it, it means that Lisp metaprogramming facilities may do things just with plain list manipulation functions! So it's not about metaprogramming itself, it's that it's incredibly easy. This is what people refer as "code as data" and "homoiconicity" and so on.

Re: Why Racket? Why Lisp? (2014)

#88

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

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.

My only way out of the hole is to try and steer clear of addictions and learn new stuff.

Since I can't do anything of practical use during this period - nothing is exciting, the world is going to hell, I'm a failure and cannot do it, etc, I use the time to learn new stuff, read books on every possible subject and just try not to be too big of a drag on those around me.

I've been here multiple times and I know that each 'down' period is followed by a rush of energy and creativity and I have to be prepared with knowledge and health so that I can apply it during my 'mental spring'. This is how I've created great stuff before and I will in the future. At least this is my hope.

At the moment, learning lisp is a kind of psychotherapy that I apply to myself and it seems to be working, even though I have no idea what to do with that knowledge, it will soon all make sense.

Re: Why Racket? Why Lisp? (2014)

#89

For more on the per­- ils of tax­ing reader pa­tience, see WHY DOES TY- POGRAPHY MAT- TER This quote, hyphenated as is, provides all sorts of opportunities for snark. Instead I'll just note that it seems Pollen needs work. It's far too eager to hyphenate; doesn't protrude hyphens, commas, etc.; and doesn't use TeX-style paragraph-level optimization. Not being able to identify the bounds of hyperlinks is also a strong…

Where do you see this? On my machine it's not hyphenated

Chrome, OS X. Hyphenated exactly as shown regardless of magnification.
Post reply on HN