






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Programming languages and styles, with a focus on the Etoys language and environment made for children. It emphasizes the importance of being able to program 'massively parallel' and easily, and the need to design systems and programming languages that can build new, more powerful structures. The document also includes examples of simple interpreters and metalanguages. The author encourages readers to be critical and gain perspective on what they are learning.
Typology: Lecture notes
1 / 11
This page cannot be seen from the preview
Don't miss anything!







Viewpoints Research Institute, 1209 Grand Central Avenue, Glendale, CA 91201 t: (818) 332-3001 f: (818) 244-
Many thousands of programming languages have been designed and implemented in many styles. Too many for 45 minutes! So let’s look at a few styles starting with the Etoys language and environment made for 11 year olds. See Etoys, Children and Learning and Etoys Authoring and Media for some of the things I showed in the live demo.
We can easily make thousands (millions) of objects and program them all at once. This shows that contagion can be delayed by changing the time constant (by having more or less villagers) but not eliminated. All the villagers eventually get sick and die. Being able to program “massively parallel” and easily is important. Be critical of languages that can’t do this easily.
Alan Kay Class Notes For CS1 Lecture – UCLA – October 15, 2010
Ants are made efficient by food-carrying ants laying down a scent trail that other ants can follow upstream to quickly find the food and then go downstream to quickly find the nest. This is “loose coupling” between objects. The same idea can be used to program a text editor in just 35 lines of code. Point of view is worth 80 IQ points!
The future of programming is not like most programming today. But will be more like making biological systems. The Internet is one of the few systems organized this way. It is the most scalable and robust human artifact on the Earth.
Building blocks can be organized simply – with results that are like the building block – walls and pyramids are like piles and stacks. Many molecules are like atoms. Or, completely new much more powerful structures can be built that are not like the parts – arches and life – this is what we need to try to do when we design systems and programming languages!
The children’s programming environment is made from the very same simple materials as the toy cars they draw. And all is dynamic and “alive”. All interactive development environments for programming could be like this. If you are working with one that isn’t then you are working with a language and environment that have serious flaws!
A good question from a CS1 student!
Val Shorre at UCLA in 1963 noticed that the mathematical expression of a higher level programming language could itself be turned into a programming language. The circled line of metalanguage is equivalent to the procedure on the right.
This allows “grammar programming” by adding the stuff in red and writing an interpreter for it. This can be run as a program (starting in the upper left corner of the code) via mostly doing function calls until some concrete symbol in the grammar can be compared with the input. Here “a” has been matched, and the output statement has just put out the first line of the machine code
A real example is drawn from a project to go from millions of lines of code to hundreds by inventing new languages. Here’s a new math for rendering in 40 lines, and the math in a programmable language called Nile in 80 lines. The language automatically deals with streams of points and pixels with mathematical transformations of coordinates and signal processing.
And we have to make our target machine language “Nothing”. This takes about 100 lines of the OMeta language.
And we have to make OMeta itself. This takes about 100 lines of code. There are a few more lines of code required (not shown), but this shows how a completely “from the metal” system can be made in a few thousands of lines of code rather than millions as with the commercial versions without losing any of the actual functionality. In other words: “Math Wins!”
You must ask questions and “be critical via knowledge” -- that is, learn a lot and try to gain perspective on what people are trying to get you to learn. A lot of it might not be a good idea any more (and some of it might never have been a good idea!)