Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Hyperpolyglot: Lisp (hyperpolyglot.org)
127 points by tosh on Aug 8, 2018 | hide | past | favorite | 17 comments


This is not particularly accurate, and doesn't seem maintained. Just looking at the start of the first column, Common Lisp, for a bit:

- "command line program" is empty, but should contain

    sbcl --eval '(+ 1 1)'
- "identifier" says "case insensitive, cannot start with digit", but identifiers can start with digits just fine. 1+ is a built-in function that proves it. It just can't look like a number.

- "identifier" also says some characters are "reserved for user macros", but that's not actually a thing. ?![]{} is a valid identifier, you just shouldn't use it.

There's probably much more. There are also plenty of things that are inaccurate, but would need more explanation than there is room for.



I looked at that, which is why I mentioned it "doesn't seem maintained". Issues there are old and not getting responses and the last commit is from a year ago.


Right:

  CL-USER 26 > (defun ?![]{} (123456789?![]{})
                 (+ 123456789?![]{} #xd))
  ?![]{}

  CL-USER 27 > (?![]{} #x1d)
  42


I don't know if it's part of the spec, but sbcl is actually case-sensitive, just that read upcases everything by default. There's a special syntax if you need to preserve case:

    |this-will-be-read-with-case-preserved|


That's part of Common Lisp. By default the reader is case-insensitive and upcasing -> the internal representation is case-preserving. If we escape characters in a symbol or even the whole symbol, those preserve their case.

But one can for example configure the READER in Common Lisp to use different modes - for example fully case preserving. The built-in CL symbols will stay in uppercase - because that's how they are defined.

  CL-USER 32 > (setf (readtable-case *readtable*) :preserve)
  :PRESERVE

  CL-USER 33 > (DEFUN This-Is-A-Symbol (VarIable)
                 (SIN VarIable))
  This-Is-A-Symbol

  CL-USER 34 > (This-Is-A-Symbol 7.4)
  0.89870817

  CL-USER 35 > (THIS-IS-A-SYMBOL 7.4)

  Error: Undefined operator THIS-IS-A-SYMBOL in form (THIS-IS-A-SYMBOL 7.4).
As you can see, we can then program with case preserved syntax and use the uppercase built-in symbols like DEFUN or SIN.


That syntax is displayed lower down, under "quoted identifier". I think this is an area that "would need more explanation than there is room for". There's also the fact that |white space symbol| and white\ space\ symbol are not actually the same thing.


I noticed some weird and out of date stuff with Racket too.


I don't use racket much, and even I noticed some stuff that are off. Nobody really uses srfi-19 for dates (everybody recommends Gregor iirc) and they hardly seem to use any for loops.


Wow, that web page is a labor of love. Very cool! I feel like making wallpaper from it when I return home next year and I will need to re-furnish my study.


I don't understand why this is useful. What does the comparison provide to the hungry mind?

Towards understanding, I recommend reading SICP and "On Lisp"


I only know a bit of elisp and thought the other ones would seem more different and therefore more demanding for me to learn, but after looking through this comparison I feel I could well give one or two of the other a shot without too much work.


> #!/usr/bin/env java -jar clojure.jar

What's with the shebangs? They all have more than 1 argument. Where would that work? Not Linux. I think FreeBSD used to have support for that, but removed it to follow convention. Seems like stuff wasn't tested before publishing.


OSX/macOS, minix and for a time FreeBSD[0]

[0] https://www.in-ulm.de/~mascheck/various/shebang/ (See table near bottom)


Interesting. Does OSX include quoting or escaping logic or is it impossible to provide an argument that has spaces?


In the markup languages section, it's missing a lot of Org mode snippets. I'll see if there a way to contribute to that page. It's quite outdated.


> SBCL 1.2

This page seems not to have been updated in years. The newest SBCL version is 1.4.10; version 1.2.0 was released in 2014.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: