[HN Gopher] A few examples of Lisp code typography (2013)
       ___________________________________________________________________
        
       A few examples of Lisp code typography (2013)
        
       Author : reikonomusha
       Score  : 68 points
       Date   : 2022-11-24 20:42 UTC (1 days ago)
        
 (HTM) web link (kazimirmajorinc.com)
 (TXT) w3m dump (kazimirmajorinc.com)
        
       | convolvatron wrote:
       | I really expected to see at least one Steele MCE with the
       | decorative border
        
       | jll29 wrote:
       | The main insight for me from this exercise is LISP wasn't always
       | as beautiful as it is nowadays, it "grew prettier over time".
       | 
       | As others have already remarked here, since about the 1980s,
       | there appears to be an increased level of nameing, consistency
       | and better indentation, all contributing to an overall increased
       | level of "prettiness".
       | 
       | The core concepts were already there, of course, and that's
       | timeless beauty.
        
         | shakow wrote:
         | Also, don't forget that beauty is relative.
         | 
         | Sure, 1960's LISP doesn't look that nice nowadays, but it's day
         | and night if you compare it to e.g. the contemporary FORTRAN
         | IV.
        
       | [deleted]
        
       | hawski wrote:
       | I'm not a lisper by any measure. I want to dabble at one point in
       | Scheme and I got to do slightly more than take a look with some
       | basic tutorials.
       | 
       | I find the example from Friedman the most readable by far. It is
       | probably also the only one that is typeset with proportional
       | fonts. A few of the superficial things about Lisps I am fond of
       | are the kebab case and space delimitedness (same as shell, which
       | also has some Lisp qualities afterall). They all come nicely with
       | proportional fonts. However I do really prefer proportional fonts
       | for code in general. Also operating with italics, bold is
       | preferrable for me to color.
        
       | whartung wrote:
       | Dunno if I'm in the minority, but I just can't warm to [], either
       | in lieu of or augmenting, () in SEXPRs. Just never felt they were
       | necessary and, if anything, I find them distracting. Likely
       | because I'm not used to them (baby duck syndrome and all), but
       | the regularity of Lisp syntax, to me, is a boon, and the [] just
       | mess that up for me.
        
         | neilv wrote:
         | Agreed.
         | 
         | Using square brackets in place of _some_ parens is something
         | some of the Racket professors started doing. I assumed it was
         | because they thought it would be helpful to teach high school
         | students in http://htdp.org/ . I defer to them on teaching, but
         | I think it looks ugly, is harder to type, and seems like it's
         | more confusing in code examples (people thinking it's
         | significant, when it's not).
         | 
         | One thing I did do is make an Emacs mode,
         | https://www.neilvandyke.org/quack/ , in which typing square
         | brackets instead inserts parentheses when appropriate. This is
         | helpful on US keyboards, on which parens require a multi-key
         | press but square brackets do not.
        
         | JonChesterfield wrote:
         | [] as a quoted list shows up occasionally. [foo bar] vs '(foo
         | bar). I think I prefer that but it's hard to be sure.
        
       | x-shadowban wrote:
       | It's neat to see `foo` in "ancient" texts.
        
       | arboles wrote:
       | Haven't quite reached the ceiling yet. Go parenless.
       | https://www.draketo.de/software/wisp
        
         | JonChesterfield wrote:
         | This makes copy and paste between files or to/from a repl
         | _really_ annoying. Splice a delimited sequence anywhere and
         | auto-format is categorically better.
        
         | donio wrote:
         | Ugh, to me that's strictly worse. Not really any more terse,
         | harder to read, harder to parse, harder to navigate.
        
         | Asooka wrote:
         | I see lines that start with punctuation as incredibly ugly, so
         | that to me is strictly worse.
        
       | throw149102 wrote:
       | Anyone have any recommendations (books, courses, videos, etc.) on
       | learning LISP? I've been intrigued by it and want to integrate it
       | into a game I'm building as a development tool but not sure where
       | to start on learning the language.
        
         | reikonomusha wrote:
         | For Common Lisp, there are several free books available:
         | 
         | - Practical Common Lisp (aimed at people who know how to
         | program in a more mainstream language already) [1]
         | 
         | - Paradigms in Artificial Intelligence Programming (my personal
         | favorite) [2]
         | 
         | - Common Lisp: A Gentle Introduction to Symbolic Computation
         | (aimed at absolute beginners of programming) [3]
         | 
         | I highly recommend the r/lisp Reddit community. Reddit as a
         | platform has its issues, but the Common Lisp community there is
         | very responsive and very helpful.
         | 
         | Lastly, you might be interested in checking out Kandria [4], a
         | game written entirely in Common Lisp, to be released imminently
         | on Steam.
         | 
         | [1] https://gigamonkeys.com/book/
         | 
         | [2] https://github.com/norvig/paip-lisp
         | 
         | [3] https://www.cs.cmu.edu/~dst/LispBook/
         | 
         | [4] https://store.steampowered.com/app/1261430/Kandria/
        
         | whartung wrote:
         | That's a broad question, to be honest.
         | 
         | Especially today, since Lisp rather than being a single thing,
         | is a family of languages. I mean, there's some truth to
         | "JavaScript being a Lisp", so you can see that it's a bit open
         | ended.
         | 
         | If you're looking for an embedded Lisp, then I would
         | concentrate on finding one that simply appeals to you. That is,
         | find one that integrates easily, or has a particular feature
         | that you like, or any of many things that may catch your eye.
         | 
         | Once you pick one, then simply "learn that". Consider GIMP
         | originally started by integrating SIOD (Scheme in One Defun),
         | which is a simple Scheme interpreter. They have since moved on
         | to TinyScheme (of which I'm unfamiliar).
         | 
         | But, SIOD has been around forever. SIOD begot SCM which begot
         | GUILE, which is specifically designed to be embedded. It's also
         | pretty large.
         | 
         | ECL, which stands for Embedded Common Lisp is, well, a Common
         | Lisp. Scheme and Common Lisp are both Lisps, but quite
         | different from each other.
         | 
         | That's why rather than saying "pick this", simply find one you
         | like and learn that. The landscape is wide and rich.
        
       | rogual wrote:
       | Very interesting language, but so difficult to read. Something
       | about the undifferentiated sea of lowercase letters just makes my
       | eyes glaze over. People say it gets easier as you use it, but I
       | never managed to get there.
        
         | outworlder wrote:
         | Funny, because traditionally it was (ALL-UPPER-CASE)
         | 
         | Nowadays, indentation does a bunch of heavy lifting when it
         | comes to readability. Modern Lisp-inspired languages (such as
         | Clojure, but also some dialects of Scheme) also use other
         | symbols in addition to parenthesis (like square brackets).
         | Usually they are interchangeable, but I found that it can
         | sometimes help.
         | 
         | I find it difficult to read LOOP macros. And some versions of
         | LET. But they are bastions of readability if you compare with
         | languages _like_c <with<templates>>(T) and_macros(void_);{}
        
         | gumby wrote:
         | Strange to me. The "modern" style (roughly mid 80s) is super
         | clear to me, with the indentation doing a lot of work and the
         | symbol names so clear (I still find the MixedCase jarring and
         | significantly slower to parse, while using-dashes or even
         | using_underscores much easier).
         | 
         | This style also encourages blocks to be compact so they almost
         | fit right into your fovea. The spread-out "C" style that
         | emphasizes the curly braces on their own line seems so
         | backwards, emphasizing precisely the thing you don't care
         | about.
        
           | AnimalMuppet wrote:
           | > The spread-out "C" style that emphasizes the curly braces
           | on their own line seems so backwards, emphasizing precisely
           | the thing you don't care about.
           | 
           | Really? I like the curly braces on their own line precisely
           | because that's what I _do_ care about. I want to see the
           | block structure - the context, if you will - before I think
           | about the individual lines.
        
         | terminal_d wrote:
         | Rainbow brackets really help.
        
         | sph wrote:
         | > undifferentiated sea of lowercase letters just makes my eyes
         | glaze over
         | 
         | Like prose? Books have not many symbols nor syntax
         | highlighting. You have to read the actual words to know what
         | it's talking about.
        
           | hawski wrote:
           | In prose yes. However there is a structure to dialoge, that
           | is hard to miss, you also have indentations, sections and
           | chapters. Many books have lists for example, but it is
           | usually not prose.
        
             | sph wrote:
             | You have indentation, sections and chapters (files) in
             | programming as well.
             | 
             | Honestly, I would understand criticising the noise of
             | parens. Not of their contents.
        
       | rjsw wrote:
       | I would have included "Wilensky, LISPcraft, 1984".
        
       | gjvc wrote:
       | this is an interesting collection. I am reminded that interactive
       | systems ahead of their time like LISP and smalltalk were cursed
       | with illegible font technology, which was very off-putting at the
       | time, and it's only comparatively recently that they've improved.
        
       | fredrikholm wrote:
       | Seeing that excerpt from 'A Gentle Introduction to Symbolic
       | Computation' really brought back some memories.
       | 
       | Must have been some 20 odd years since I first read it. Wonderful
       | book.
        
       ___________________________________________________________________
       (page generated 2022-11-25 23:00 UTC)