←back to thread

Hofstadter on Lisp (1983)

(gist.github.com)
372 points Eric_WVGG | 6 comments | | HN request time: 0.611s | source | bottom
Show context
taeric ◴[] No.41860340[source]
I do think LISP remains the major language that can encompass the strange loop idea he explored in his work. I know LISP is not the only homoiconic language, but it is the biggest that people know how to use where the "eval" function doesn't take in a string that has to be parsed.

I hate that people are convinced LISP == functional programming, writ large. Not that I dislike functional programming, but the symbolic nature of it is far more interesting to me. And it amuses me to no end that I can easily make a section of code that is driven by (go tag) sections, such that I can get GOTO programming in it very easily.

replies(6): >>41860620 #>>41860888 #>>41861136 #>>41861546 #>>41862219 #>>41893256 #
nine_k ◴[] No.41860620[source]
Another (properly functional) homoiconic language that enjoyed mainstream adoption briefly in '00s is XSLT. Its metaprogramming features were rather widely used, that is, producing an XSLT from XSLT and maybe some more XML, instead of hand-coding something repetitive, was rather normal.

The syntax was a bigger problem than Lisp's syntax, though.

It's not easy to produce a language with a syntax that's good as daily use syntax, but is also not unwieldy as an AST. Lisp is one of the few relatively successful examples.

replies(4): >>41860924 #>>41861081 #>>41863504 #>>41868000 #
1. AnimalMuppet ◴[] No.41860924[source]
> The syntax was a bigger problem than Lisp's syntax, though.

Yeah. XML and S expressions are pretty close to functionally equivalent. But once you've seen S expressions, XML is disgustingly clumsy.

replies(3): >>41861884 #>>41862032 #>>41862128 #
2. nine_k ◴[] No.41861884[source]
SGML was intended for sparse markup in mostly plaintext files. From it grew HTML that is markup-heavy, and XML which is often 100% markup. What made sense for rare markup nodes became... suboptimal when applied in a very different role.
replies(1): >>41862620 #
3. pfdietz ◴[] No.41862032[source]
"Any data can be turned into Big Data by encoding it in XML."
replies(1): >>41867011 #
4. chubot ◴[] No.41862128[source]
They have a different model -- one is better for documents, and one is better for programs/data

XML and HTML are attributed text, while S-expressions are more like a homogeneous tree

If you have more text than metadata, then they are more natural than S-expressions

e.g. The closing </p> may seem redundant, until you have big paragraphs of free form text, which you generally don't in programs

5. jll29 ◴[] No.41862620[source]
1. GML => SGML => XML

2. rm *

3. JSON

4. rm -rf /

6. fuzztester ◴[] No.41867011[source]
Wow.

Also:

XML: eXtremely Murky Language

or Mindblowing