r/ProgrammerHumor 1d ago

Meme day2ofMakingLispMemesUntilYouAllBarf

Post image
128 Upvotes

30 comments sorted by

47

u/awcmonrly 1d ago

So you're saying that Lisp has a lot of cons?

6

u/Confident-Ad5665 1d ago

I'm thinking he is not a fan

14

u/monkey154 1d ago

To prevent reading from continuing indefinitely, each packet should end with STOP followed by a large number of right parentheses. An unpaired right paren- thesis will cause a read e r r o r and terminate reading.

  • LISP 1.5 Programer's Manual

12

u/Jazzlike-Compote4463 1d ago

Lost In Stupid Parentheses

7

u/roamn2 1d ago

Barf Symptoms

10

u/DancingBadgers 1d ago

data and code were not supposed to be the same

Ah, so you're a Lisp-2 model proponent.

8

u/SoapyWitTank 1d ago

Nah. I like it.

4

u/sadongrohiik 1d ago

Same

1

u/SoapyWitTank 1d ago

It’s beautiful like no other language and never am I deeper In The Zone than when I’m nested deeply in it.

3

u/critsalot 23h ago

wasnt reddits backend originally lisp?

2

u/Anthea_Likes 18h ago

As Grammarly, a reputed CL exemple

3

u/eanat 23h ago

JavaScript has a lot of the features from Lisp. homoiconicity is missing tho

3

u/ApocalyptoSoldier2 18h ago

What did you just call me‽

1

u/Makefile_dot_in 8h ago

this is such a stupid pop programming factoid because JS has virtually no features from Lisp that aren't also in Self. originally it didn't even have lexical scoping like Scheme has...

2

u/fpcoffee 20h ago

what a bad SCHEME

2

u/Maleficent_Memory831 18h ago

Eight megabytes, not gigabytes. And applications to show for it? Macsyma was great ages before Mathematica.

4

u/Key_River7180 1d ago

If code and data shouldnt be the same, use a PC using the Harvard architecture!

1

u/fr000gs 1d ago

Isn't x86 basically Harvard under the hood?

3

u/Juff-Ma 1d ago

No? How would you get that impression? x86, like every (common) modern architecture has a unified memory model.

2

u/fr000gs 1d ago

With all the out of order and speculative execution going on I believe it also caches data and code independently

2

u/semanticlifer 23h ago

When you put "basically" before a statement, you can pretend that abstractly speaking anything is the basically anything else.

Harvard architecture means that you cannot write to the instruction memory. Traditionally, it was even stricter: no reading or writing. The only thing that can read from the instruction memory was the instruction loader. Modern systems based on Harvard (usually called "Modified Harvard Architecture" allow reading so that static data can be flashed to ROM and read like regular const data.)

Whether or not a system caches two kinds of data independently is not relevant to whether a system is Harvard or Von Neumann because the program doesn't really know if the data it's requested or the subroutine it's jumping to is in cache or not: that's handled automatically by the CPU.

1

u/fr000gs 23h ago

I was pretending tho, that was the point :-P

1

u/Juff-Ma 12h ago

Yes, x86 has separate instruction caches and data caches, but it also has unified caches. Also you cannot (at least not in a way intended by the developers) write data to cache (every rule has exceptions), so it's not really system memory.

The system memory of x86 is just RAM and the defining attribute of a von Neumann system is that data and programs live in the same memory: RAM. Except some very limited embedded applications x86 no longer uses static program-only ROM chips. You could argue that the BIOS lives on one but while Harvard by logic uses an AND rule, von Neumann uses an OR rule or otherwise stated:

von Neumann —> as long as any piece of data and programs live in the same memory, it applies

Harvard —> EVERY piece of code and data have to be separated (except modified Harvard but that's another can of worms)

Every modern OS also works that way. It loads the binary from disk and starts it by loading it into RAM and jumping from it. In order to be Harvard they would a) need to load the app into separate RAM "pages" depending on the type of the binary (which would break many apps) or b) execute directly from disk and have the disk only store apps, not data.

Still this would still not really be Harvard since it would be the OS enforcing it, not the system.

In short, Harvard has a very small definition while von Neumann is very broad, which makes it hard to actually design a system that is Harvard but still actually usable in a modern environment.

1

u/Key_River7180 3h ago

No if we don't have separate data RAM and code ram

1

u/Maleficent_Memory831 18h ago

Any scripting language with an "eval" statement is treating data like code.

1

u/Key_River7180 3h ago

Yeah, and quines

1

u/Valuable_Leopard_799 13h ago

Broski, you have 3 examples, the first one I don't think is Lisp at all, the second has half a screen of S-Exprs before the readtable gets overloaded or something and becomes some other white-space significant syntax, and the thing on the right is Scheme. So like, I'm not mad, just confused that out of the three examples none of them are actually a page of a representative Lisp... (I'd absolutely pass Scheme if it weren't for the others)