[ prog / sol / mona ]

prog


Literally Hitler

1 2020-04-26 18:31

What kind of example is that?

in https://en.wikibooks.org/wiki/Scheme_Programming/Macros

(match some-value (literally-hitler)
 ((literally-hitler . rest) ; First element is literally Hitler.
  (error "Found the Nazi"))
 (((a b) second . rest) ; First element is a two-element list.
  (display a))
 ((first second . rest) ; It's a list with at least two elements.
    (display (list first second)))
 (else #f))
2 2020-04-26 20:31

A hilarious one

3 2020-04-26 21:32

How does the match macro differenciate between symbols and variables? Elisp's pcase uses backquotes, but from the second example, it seems that symbols are bound to variables by default.

4 2020-04-27 12:08

Symbols are listed in the second parameter.

5 2020-05-01 22:39

It's the sort of thing I would've found funny back when I was 16, so I assume that it was written by a teen. Good on them for learning Scheme at such a young age.

6 2020-05-02 11:07 *

https://archive.4plebs.org/pol/search/text/sicp/

Searching for posts that contain ‘sicp’. 255 results found.

7 2020-05-10 07:07

U tel me

8 2020-05-10 14:36 *

>>7
It's a wiki so anybody can edit the pages. The nazi-finding macro was added the same day the page was created (04/03/2015) by the page creator who's also the sole editor. The IP address is from USA.

https://en.wikibooks.org/w/index.php?title=Scheme_Programming/Macros&action=history

The text is unexpected in a programming book and thus mildly amusing. I don't feel offended enough to take it to Twitter with a screenshot of the page and a selfie of my irrepressible tears and beg for mob justice and termination of Wikibooks.

I think that's about it.

9 2020-05-13 21:59 *

wew lad

10


VIP:

do not edit these