Гуру Песен Популярное
А Б В Г Д Е Ж З И К Л М Н О П Р С Т У Ф Х Ц Ч Ш Э Ю Я
# A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

GJ Sassman feat. Lil Hay Abelson - Metacircular Evaluator | Текст песни

PROFESSOR: Well, let's see. What we did so far was a lot of fun, was it
useful for anything? I suppose the answer is going to be yes. If these metacircular
interpreters are a valuable thing to play with. Well, there have been times I spend 50% of
my time, over a year, trying various design alternatives by experimenting with them with
metacircular interpreters-- metacircular interpreters like the sort you just saw. Metacircular
is because they are defined in terms of themselves in such a way that the language they
interpret contains itself.
Such interpreters are a convenient medium for exploring language issues. If you want to try
adding a new feature, it's sort of a snap, it's easy, you just do it and see what happens. You
play with that language for a while you say, gee, I'm didn't like that, you throw it away. Or
you might want to see what the difference is if you'd make a slight difference in the binding
strategy, or some more complicated things that might occur.
In fact, these metacircular interpreters are an excellent medium for people exchanging
ideas about language design, because they're pretty easy to understand, and they're short,
and compact, and simple. If I have some idea that I want somebody to criticize like say,
Dan Friedman at Indiana, I'd write a little metacircular interpreter and send him some
network mail with this interpreter in it. He could whip it up on his machine and play with it
and say, that's no good. And then send it back to me and say, well, why don't you try this
one, it's a little better.
So I want to show you some of that technology. See, because, really, it's the essential,
simple technology for getting started in designing your own languages for particular
purposes. Let's start by adding a very simple feature to a Lisp. Now, one thing I want to tell
you about is features, before I start.
There are many languages that have made a mess of themselves by adding huge numbers
of features. Computer scientists have a joke about bugs that transform it to features all the
time. But I like to think of it is that many systems suffer from what's called creeping
featurism.Which is that George has a pet feature he'd like in the system, so he adds it. And then
Harry says, gee, this system is no longer what exactly I like, so I'm going to add my
favorite feature. And then Jim adds his favorite feature. And, after a while, the thing has a
manual 500 pages long that no one can understand.
And sometimes it's the same person who writes all of these features and produces this
terribly complicated thing. In some cases, like editors, it's sort of reasonable to have lots of
features, because there are a lot of things you want to be able to do and many of them
arbitrary. But in computer languages, I think it's a disaster to have too much stuff in them.
The other alternative you get into is something called feeping creaturism, which is where
you have a box which has a display, a fancy display, and a mouse, and there is all sorts of
complexity associated with all this fancy IO. And your computer language becomes a
dismal, little, tiny thing that barely works because of all the swapping, and disk twitching,
and so on, caused by your Windows system.
And every time you go near the computer, the mouse process wakes up and says, gee do
you have something for me to do, and then it goes back to sleep. And if you accidentally
push mouse with you elbow, a big puff of smoke comes out of your computer and things like
that. So two ways to disastrously destroy a system by adding features.
But try right now to add a little, simple feature. This actually is a good one, and in fact, real
Lisps have it. As you've seen, there are procedures like plus and times that take any
number of arguments. So we can write things like the sum of the product of a and x and x,
and the product of b and x and c.
As you can see

Статистика страницы на pesni.guru ▼
Просмотров сегодня: 2
Популярное сейчас
Видео
Нет видео
-