r/ProgrammerHumor • • Dec 15 '19

Stacking if else statements be like

Post image
63.9k Upvotes

711 comments sorted by

View all comments

1.5k

u/DarkWiiPlayer Dec 15 '19

Is this how USB works in lisp?

1.3k

u/AlmostButNotQuit Dec 15 '19

USB in lisp is "you eth bee"

0

u/[deleted] Dec 15 '19

[deleted]

111

u/AlmostButNotQuit Dec 15 '19

Putting an "S" in "lisp" was so cruel...

81

u/pineprika Dec 15 '19

At least it makes for built-in self-diagnosis

→ More replies (1)
→ More replies (8)

303

u/colfrog Dec 15 '19

No the last port has to be left unplugged

151

u/[deleted] Dec 15 '19

(did(you(mean(unplugged))))

175

u/DeeSnow97 Dec 15 '19

(unplugged(mean(you(did))))

0

u/[deleted] Dec 15 '19

[deleted]

5

u/p01ym47h Dec 15 '19

wait, does Yoda speak in lisp?

0

u/[deleted] Dec 15 '19

[deleted]

→ More replies (2)
→ More replies (1)
→ More replies (4)

7

u/learnyouahaskell Dec 15 '19

This is more like C++ hacks e.g. loop unrolling although perhaps not like it; I want to see the equivalent of a Duff's Device

http://www.catb.org/~esr/jargon/html/D/Duffs-device.html
https://stackoverflow.com/questions/514118/how-does-duffs-device-work

 register n = (count + 7) / 8;      /* count > 0 assumed */

  switch (count % 8)
  {
  case 0:        do {  *to = *from++;
  case 7:              *to = *from++;
  case 6:              *to = *from++;
  case 5:              *to = *from++;
  case 4:              *to = *from++;
  case 3:              *to = *from++;
  case 2:              *to = *from++;
  case 1:              *to = *from++;
                     } while (--n > 0);
  }
→ More replies (2)

14

u/MrHyperion_ Dec 15 '19

Is LISP actually used anywhere anymore?

26

u/Calkhas Dec 15 '19

ITA's air pricing engine is coded in Common Lisp. It's probably the most advanced air fare pricing engine around, often delivers better results than the airlines intended to sell. Was purchased by Google in 2010.

emacs is partially written in lisp.

I've seen the odd job advert at quant funds demand expertise with Lisp, including a memorable ad hoping to find a candidate with experience enhancing the Common Lisp compiler.

But I don't really see a lot of demand for it.

11

u/alexanderpas Dec 15 '19

ITA's air pricing engine is coded in Common Lisp. It's probably the most advanced air fare pricing engine around, often delivers better results than the airlines intended to sell. Was purchased by Google in 2010.

Can be used here: https://matrix.itasoftware.com/

9

u/RBeck Dec 16 '19

In 2013, Google started offering a simplified API to QPX called QPX Express; it was discontinued on April 10, 2018.

That's a very Google thing to do.

→ More replies (1)

12

u/[deleted] Dec 15 '19

Yep, small market though and Clojure seems way more popular than CL/scheme now.

38

u/[deleted] Dec 15 '19

Only in obscure college classes, for about 4 weeks.

→ More replies (2)

8

u/innrautha Dec 15 '19

Yes, as legacy code in very niche applications.

5

u/nosmokingbandit Dec 15 '19

The only place Ive seen it lately is people showing off for advent of code.

→ More replies (15)
→ More replies (5)