11 ms·
A few examples of Lisp code typography (2013)
- deleted 4y ago[deleted]
- rogual 4y agoVery 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.
- sph 4y ago> 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 4y agoIn 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 4y agoYou have indentation, sections and chapters (files) in programming as well. Honestly, I would understand criticising the noise of parens. Not of their contents.
- db48x 4y agoIn some types of Lisp programming (such as Emacs lisp), it is common to use Form–Feed characters as chapter breaks within a file. Alas, some newer languages like Rust really don’t like that.
- gumby 4y agoStrange 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 4y ago> 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.
- gumby 4y agoThat’s what indentation is for. Parsed at a different level by your brain.
- AnimalMuppet 4y agoI've seen too much over the years. I've seen indentations be a lie. I've seen indentations get mangled because someone's editor is set to use tabs instead of spaces, or vice versa. I can only halfway trust the indentation, but the curlies don't lie.
- galaxyLogic 4y agoThat would be like Python where the indentation defines the syntax of your program., right? But the jury is still out whether using indentations instead of syntactic markers is a good choice for a programming language.
- gumby 4y ago
- terminal_d 4y agoRainbow brackets really help.
- undefinednull 4y agoit is one of the best!
- outworlder 4y agoFunny, 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);{}
- x-shadowban 4y agoIt's neat to see `foo` in "ancient" texts.
- abudabi123 4y ago"foo" might have an association to the whistle from the steam engine era. I have a memory of the whistle in very early Disney animation. Also, I believe in Mandarin Chinese "foo" indicates the end of the sentence.
- bitwize 4y ago"Foo" has a long and deep history. There was a comic strip called Smokey Stover that started in 1935 whose title character was a "foo fighter" (firefighter) and drove a "foomobile" (a tiny fire truck with only two wheels). The author of the strip claims to have discovered the word "foo" when he saw it written on the bottom of a Chinese figurine, but I don't think that's the real etymology. I think "foo" was just short for "phooey", and was used to designate things deemed nonserious or trivial (somewhat similar to how "lol-" or "lulz-" is used in modern times). Whatever the case, "foo" became associated with "bar" via WWII slang "FUBAR"; WWII also gave us "foo fighters" in the UFO sense. War is like the internet in that it brings together people of different backgrounds who otherwise might never interact, so it's not surprising that with things like foo, FUBAR, and Kilroy, WWII had something resembling a predecessor of modern meme culture. It entered hacker culture via the MIT TMRC culture in the 1950s. Their railroad layout had a "foo counter" which was a digital clock which would display the word instead of the time when certain scram switches were pressed. When MIT people began cultivating an interest in programming computers for its own sake, they brought "foo" with them and it spread into the greater hacker meme diaspora. There's nothing quite as hacker-y as the word "foo", and the strong association with hacker culture goes back as long as hacker culture was a thing, and even before. It still reminds us to not take things so seriously, mess around, and have a little fun.
- rjsw 4y agoI would have included "Wilensky, LISPcraft, 1984".
- convolvatron 4y agoI really expected to see at least one Steele MCE with the decorative border
- jll29 4y agoThe 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 4y agoAlso, 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.
- lioeters 4y ago> beauty is relative I'd agree that "beauty of syntax" is relative and subjective. It's a fascinating observation that Lisp grew prettier over the years. But the philosophical or mathematical beauty of the core concepts of Lisp, I feel like they're closer to eternal and objective beauty, if there is such a thing. It's like they're low-level universal primitives, not only of human thought but thought itself. If we're to ever communicate with an extraterrestrial intelligence, they would probably grok Lisp.
- 082349872349872 4y agoRemember also that 1960's programming was not done on screens, let alone high-resolution screens.
- gjvc 4y agothis 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.
- arboles 4y agoHaven't quite reached the ceiling yet. Go parenless. https://www.draketo.de/software/wisp https://www.draketo.de/software/wisp
- donio 4y agoUgh, to me that's strictly worse. Not really any more terse, harder to read, harder to parse, harder to navigate.
- Asooka 4y agoI see lines that start with punctuation as incredibly ugly, so that to me is strictly worse.
- JonChesterfield 4y agoThis makes copy and paste between files or to/from a repl _really_ annoying. Splice a delimited sequence anywhere and auto-format is categorically better.
- erik_seaberg 4y agoI'm still convinced Ruby almost displaced Python because of those years where web forums would just shred any Python you wanted to talk about.
- KerrAvon 4y agoYou couldn’t round trip Python through Apple Mail either. To be clear, though Ruby’s massive popularity was entirely due to the advent of Rails. Ruby is a fantastic language — Smalltalk object model with GC and a usable syntax! — but the English documentation was nonexistent or incomplete — even after the “Pragmatic Programmers” book massively increased the Ruby audience — and the core team was all Japanese, so there wasn’t ever much of a constituency for the core language outside of Japan. The unfortunate thing is that Rails soured a lot of people on Ruby. (People don’t understand that a lot of what they encounter with Rails is dialect, not the thing itself. Ruby makes it easy to build dialects.)
- 4y ago
- hawski 4y agoI'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.
- throw149102 4y agoAnyone 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 4y agoFor 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/ https://gigamonkeys.com/book/ [2] https://github.com/norvig/paip-lisp https://github.com/norvig/paip-lisp [3] https://www.cs.cmu.edu/~dst/LispBook/ https://www.cs.cmu.edu/~dst/LispBook/ [4] https://store.steampowered.com/app/1261430/Kandria/ https://store.steampowered.com/app/1261430/Kandria/
- User23 4y ago> you might be interested in checking out Kandria Along those lines there is a classic side scroller with mouse aiming called Abuse[1] that was written in Lisp. The source code is in the public domain now[2]. [1] https://en.wikipedia.org/wiki/Abuse_(video_game) https://en.wikipedia.org/wiki/Abuse_(video_game) [2] https://github.com/darealshinji/abuse-game https://github.com/darealshinji/abuse-game
- avindroth 4y agoIs there a reason why some well-known Lisp hackers are Japanese? I noticed the devs of Kandria (radiance, etc.) as well as Fukamachi (woo, clack, mito, etc.), and am wondering what led to that kind of geographical distribution.
- 4y ago
- whartung 4y agoDunno 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 4y agoAgreed. 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/ 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/ 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.
- lispm 4y agosquare brackets was already used in Scheme and even in Interlisp...
- tmtvl 4y agoYeah, in R6RS square brackets are considered to be perfectly interchangeable with regular parentheses. That decision was reversed for R7RS-small, though.
- lispm 4y agoIt's much older. Here is a (legendary) paper on Lisp using Scheme with square brackets from 1983. https://dl.acm.org/doi/pdf/10.1145/800017.800513 https://dl.acm.org/doi/pdf/10.1145/800017.800513 Interlisp used it in the 70 already.
- 4y ago
- fredrikholm 4y agoSeeing 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.
- bwidlar 4y agoI posted this link yesterday, Why was not redirected to my post when reikonomush publish it? I ask just to understand the Hacker News platform. https://news.ycombinator.com/item?id=33733954 https://news.ycombinator.com/item?id=33733954
- bitwize 4y agoThe first three from the McCarthy papers remind me of FRED, a Lisp-like language that was built into the office suite Framework -- but used @func(a,b,c) Lotus-style notation for function calls.