Live data from Hacker News

Why Racket? Why Lisp? (2014)

practicaltypography.com

21–30 of 168 posts

Re: Why Racket? Why Lisp? (2014)

#21

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.

For Common Lisp there are two very good books: Practical Common Lisp (available for free on the web[1]) and Paradigms of Artificial Intelligence Programming (PAIP). For scheme, there's Structure and Interpretation of Computer Programs[2] although it misses some topics like macros.

[1] http://www.gigamonkeys.com/book/ [2] https://mitpress.mit.edu/sicp/full-text/book/book.html

Re: Why Racket? Why Lisp? (2014)

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

Re: Why Racket? Why Lisp? (2014)

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

Re: Why Racket? Why Lisp? (2014)

#24

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.

I'd suggest going trough learn-common-lisp-in-y-minutes (1) just to get an idea about the syntax, read On Lisp (2) and Practical Common Lisp (3) and just starting using it to build stuff.

On Lisp by pg explains very well what lisp is all about in the first few chapters.

1: http://learnxinyminutes.com/docs/common-lisp/

2: http://www.paulgraham.com/onlisp.html

3: http://www.gigamonkeys.com/book/

Re: Why Racket? Why Lisp? (2014)

#25

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.

Also, recently published, Clojure for the Brave and True: http://www.nostarch.com/clojure or http://www.braveclojure.com/

Re: Why Racket? Why Lisp? (2014)

#26
post #10

I think the hardest thing for people to get for programming in Lisp is the immutability. Once you get over that hump, everything is downhill. From the outside, the parenthesis seem pedantic but it's completely superficial. You will stop noticing them in a few hours, if not days.

Are you perhaps coming from a Clojure perspective? Scheme is no more inherently immutable than, say, JavaScript. Many Scheme programs I've seen use mutation quite liberally. Immutability is a useful pattern in lots of languages and situations, but Lisp per se doesn't particularly enforce it.

Perhaps I am but even Clojure is not "purely functional" in that respect.

Re: Why Racket? Why Lisp? (2014)

#27

is there a tl;dr. After about 45 secs of reading author did not answer why racket or why lisp

It's simpler than using the language you're probably using now. I cannot think of a higher praise for any design problem is that it's solved more simply with Y than X.

Re: Why Racket? Why Lisp? (2014)

#28

is there a tl;dr. After about 45 secs of reading author did not answer why racket or why lisp

1 - Everything is an expression so it's easier to snap code together.

2 - List based = flexibility, get more done faster because lists are simple and everywhere

3 - Strongly nudges in the direction of functional programming

4 - Rocking documentation, advanced libraries

5 - The Dr Racket GUI IDE

6 - X-expressions (don't know what they are)

7 - Hygienic macros

9 - Easy to write powerful DSLs

10 - Many low hanging fruits to contribute

Re: Why Racket? Why Lisp? (2014)

#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 can use tags that you haven't defined, they just get placed in the resulting HTML.

You still have to roll your own CSS and any JavaScript. As far as I can tell it doesn't help you out with things like keeping track of footnotes numbering or citations and such: you roll your own for things like this, Pollen is no LaTeX. This is partly why I say it's a really simple system. It makes a certain set of web authoring things simple, but it doesn't try to be a one-stop shop, which is excellent because this makes it a supremely flexible tool.

It also has some backend fancy sauce where you can save your file and refresh the page [3]. Also I admit I'm not really a big fan of DrRacket: I've just been using it for the tutorials because I have no idea what to expect from Racket, but I'm slowly moving to Emacs, and Racket seems to work fine there.

Definitely worth checking out Pollen if only to get a light introduction to the thoroughness of Racket documentation (they definitely do things differently in Racket-land!), but stay for the tools you need to roll your own ultimate static blog generator.

(Also, completely unrelated: cool video and cool title at another RacketCon 2013 talk: "Racket on the Playstation 3? It's Not What you Think!" [4].)

[1] http://pkg-build.racket-lang.org/doc/pollen/

[2] https://www.youtube.com/watch?v=20GGVNBykaw

[3] I've made a request for no-refresh updates: https://github.com/mbutterick/pollen/issues/35

[4] https://www.youtube.com/watch?v=oSmqbnhHp1c

Re: Why Racket? Why Lisp? (2014)

#30

    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 source of irritation.
Post reply on HN