holy states can save the world! - carnegie mellon school...

20
Holy States Can Save the World! Brother Jonathan Aldrich High Monk of the Plaid Brotherhood SIGBOVIK ’10

Upload: others

Post on 15-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Holy States Can Save the World! - Carnegie Mellon School ...aldrich/plaid/sigbovik10-holystates.pdfImperative Programming is Evil Consider the wanton destruction that is executed on

Holy States Can Save the World!

Brother Jonathan Aldrich

High Monk of the Plaid Brotherhood

SIGBOVIK ’10

Page 2: Holy States Can Save the World! - Carnegie Mellon School ...aldrich/plaid/sigbovik10-holystates.pdfImperative Programming is Evil Consider the wanton destruction that is executed on

Imperative Programming is Evil

Consider the wanton destruction that is executed on every

assignment

x = x + 1The carnage must be stopped!

2

Page 3: Holy States Can Save the World! - Carnegie Mellon School ...aldrich/plaid/sigbovik10-holystates.pdfImperative Programming is Evil Consider the wanton destruction that is executed on

Functional Programming is Evil

• Proliferation of data

structures creates

mountains of garbage

• Attempts at “compacting,

composting garbage

collection” are doomed to

fail [Donham, SIGBOVIK ‘07]

3

Page 4: Holy States Can Save the World! - Carnegie Mellon School ...aldrich/plaid/sigbovik10-holystates.pdfImperative Programming is Evil Consider the wanton destruction that is executed on

The One Plaiddish Way

• Banish assignment

• Banish garbage

• But how then can we compute?

• With apologies to the One True

Coding Style [SIGBOVIK ‘09]

4

Page 5: Holy States Can Save the World! - Carnegie Mellon School ...aldrich/plaid/sigbovik10-holystates.pdfImperative Programming is Evil Consider the wanton destruction that is executed on

The Holy Sacrament of State Change

• When no longer needed objects can be born again in a

new state

5

Page 6: Holy States Can Save the World! - Carnegie Mellon School ...aldrich/plaid/sigbovik10-holystates.pdfImperative Programming is Evil Consider the wanton destruction that is executed on

St. Turing’s Revelation

• St. Turing revealed that all computation can be expressed by

changing states. Here, we show how in the holy

language

6

Page 7: Holy States Can Save the World! - Carnegie Mellon School ...aldrich/plaid/sigbovik10-holystates.pdfImperative Programming is Evil Consider the wanton destruction that is executed on

Representing Cells with Holy States

7

Page 8: Holy States Can Save the World! - Carnegie Mellon School ...aldrich/plaid/sigbovik10-holystates.pdfImperative Programming is Evil Consider the wanton destruction that is executed on

Infinite Tapes with Holy States

8

The Holy Sacrament

of State Change

Page 9: Holy States Can Save the World! - Carnegie Mellon School ...aldrich/plaid/sigbovik10-holystates.pdfImperative Programming is Evil Consider the wanton destruction that is executed on

Infinite Tapes with Holy States

9

The Holy Sacrament

of State Change

Some infidels might

suggest laziness, but Plaid

theology holds sloth to be

one of the 6 deadly sins.

Page 10: Holy States Can Save the World! - Carnegie Mellon School ...aldrich/plaid/sigbovik10-holystates.pdfImperative Programming is Evil Consider the wanton destruction that is executed on

Writing to the Tape without Assignment

The Holy Sacrament

of State Change

10

Page 11: Holy States Can Save the World! - Carnegie Mellon School ...aldrich/plaid/sigbovik10-holystates.pdfImperative Programming is Evil Consider the wanton destruction that is executed on

Controlling Turing’s Machine

11

The Holy

Sacrament of

State Change

The Holy

Sacrament of

State Change

Page 12: Holy States Can Save the World! - Carnegie Mellon School ...aldrich/plaid/sigbovik10-holystates.pdfImperative Programming is Evil Consider the wanton destruction that is executed on

Beware!

• The creators of the Plaid language

have regrettably included both

assignment and functional

programming in Plaid

• The Supreme Revolutionary Plaid • The Supreme Revolutionary Plaid

Council of Pittsburgh has declared

a Fatwa against these features.

• The penalty for violation is the

eternal torment of programming

in Cobol

12

Page 13: Holy States Can Save the World! - Carnegie Mellon School ...aldrich/plaid/sigbovik10-holystates.pdfImperative Programming is Evil Consider the wanton destruction that is executed on

Related Work

Assignment is well-documented as

dangerous

13

Page 14: Holy States Can Save the World! - Carnegie Mellon School ...aldrich/plaid/sigbovik10-holystates.pdfImperative Programming is Evil Consider the wanton destruction that is executed on

Previous attempts to Save the World…

14

Page 15: Holy States Can Save the World! - Carnegie Mellon School ...aldrich/plaid/sigbovik10-holystates.pdfImperative Programming is Evil Consider the wanton destruction that is executed on

Have ended badly…

15

Page 16: Holy States Can Save the World! - Carnegie Mellon School ...aldrich/plaid/sigbovik10-holystates.pdfImperative Programming is Evil Consider the wanton destruction that is executed on

Other attempts were highly misguided

• The Nazis used Standard ML

– [J. Cette, SIGBOVIK ‘07 review]

– Garbage strikes again!

16

Page 17: Holy States Can Save the World! - Carnegie Mellon School ...aldrich/plaid/sigbovik10-holystates.pdfImperative Programming is Evil Consider the wanton destruction that is executed on

Some attempts have been spellbinding

17

Page 18: Holy States Can Save the World! - Carnegie Mellon School ...aldrich/plaid/sigbovik10-holystates.pdfImperative Programming is Evil Consider the wanton destruction that is executed on

Recent work considers saving other worlds

18

Page 19: Holy States Can Save the World! - Carnegie Mellon School ...aldrich/plaid/sigbovik10-holystates.pdfImperative Programming is Evil Consider the wanton destruction that is executed on

Recycling

• #47 way to save the world• #47 way to save the world

• See also MapReuse, MapRecycle

[McGlohon, SIGBOVIK ‘09]

19

Page 20: Holy States Can Save the World! - Carnegie Mellon School ...aldrich/plaid/sigbovik10-holystates.pdfImperative Programming is Evil Consider the wanton destruction that is executed on

Conclusions

• Believe not in the false prophets of imperative

and functional programming…holy states CAN

save the world!

20