8 ms·
> In every other language you write code. Perl is magic and you write spells. Really? Every other language? https://mitpress.mit.edu/sites/default/files/sicp/
by rat87 8y ago
> In every other language you write code. Perl is magic and you write spells.
Really? Every other language?
https://mitpress.mit.edu/sites/default/files/sicp/full-text/book/book-Z-H-9.html#%_chap_1 https://mitpress.mit.edu/sites/default/files/sicp/full-text/...
> The evolution of a process is directed by a pattern of rules called a program. People create programs to direct processes. In effect, we conjure the spirits of the computer with our spells.
> A computational process is indeed much like a sorcerer's idea of a spirit. It cannot be seen or touched. It is not composed of matter at all. However, it is very real. It can perform intellectual work. It can answer questions. It can affect the world by disbursing money at a bank or by controlling a robot arm in a factory. The programs we use to conjure processes are like a sorcerer's spells. They are carefully composed from symbolic expressions in arcane and esoteric programming languages that prescribe the tasks we want our processes to perform.
> A computational process, in a correctly working computer, executes programs precisely and accurately. Thus, like the sorcerer's apprentice, novice programmers must learn to understand and to anticipate the consequences of their conjuring. Even small errors (usually called bugs or glitches) in programs can have complex and unanticipated consequences.
> Fortunately, learning to program is considerably less dangerous than learning sorcery, because the spirits we deal with are conveniently contained in a secure way. Real-world programming, however, requires care, expertise, and wisdom. A small bug in a computer-aided design program, for example, can lead to the catastrophic collapse of an airplane or a dam or the self-destruction of an industrial robot.
...
> The dialect of Lisp used in this book is called Scheme.
- webreac 8y ago"we conjure the spirits of the computer with our spells" is one of my favorite quotes about computers with "Computer programming is an art form, like the creation of poetry or music" (Donald E. Knuth)
- hyperpallium 8y ago> The programmer, like the poet, works only slightly removed from pure thought-stuff. He builds his castles in the air, from air, creating by exertion of the imagination. Few media of creation are so flexible, so easy to polish and rework, so readily capable of realizing grand conceptual structures.... Yet the program construct, unlike the poet's words, is real in the sense that it moves and works, producing visible outputs separate from the construct itself. […] The magic of myth and legend has come true in our time. > One types the correct incantation on a keyboard, and a display screen comes to life, showing things that never were nor could be. (Fred Brooks)
- nemo1618 8y agoI have to disagree. Programming is certainly a craft, but it is not an art form. Programming is fundamentally a means to an end, whereas art can be an end in itself. Programming is much closer to swordsmithing. It is possible to create a sword that is both deadly and beautiful, but the former always takes precedence over the latter. Furthermore, there are clearly-defined constraints: you cannot smith an axe and call it a sword, just as you cannot write a web scraper and call it a raytracing engine. Art does not have this limitation. In any art medium, you can imagine creating a horribly mangled artifact, like a canvas smeared with random colors, or a piece of discordant music, or a violently disorienting video game -- and yet these would still be considered art. But a program full of syntax errors is like a cracked sword without a hilt: useless. Art cannot be useless.
- svrtknst 8y agoA cracked sword without a hilt can't be called a sword, but it can be called art. A program full of syntax errors may not be a valid program, but it can be valid art.
- nemo1618 8y agoSure, but only because "art" is essentially boundaryless and actively resists attempts to define it. If you stretch the definition far enough, everyone is an artist and everything is an artistic medium.
- Rerarom 8y agoIt may be art, but it is not programming anymore. Therefore reinforcing the idea that programming is not art.
- vidarh 8y agoWhat makes a valid program is not easy to define. Is this a valid program? Well, probably not, right now as I'm writing this. But all it takes is someone writing an interpreter that maps words to a suitable instruction set. It probably won't do anything sensible, where do you draw the line? Translating code to other forms and back has a long history that very often has been about doing it for the sake of it rather than for functionality or practicality. I've linked to this elsewhere: https://www.reddit.com/r/programming/comments/b9fqwj/93_of_paint_splatters_are_valid_perl_programs/ https://www.reddit.com/r/programming/comments/b9fqwj/93_of_p... But much more famous were the many incarnations of DeCSS that sought to to blur the lines between code and other expression: http://www.cs.cmu.edu/~dst/DeCSS/Gallery/ http://www.cs.cmu.edu/~dst/DeCSS/Gallery/