plan9 talks
Video streams from the 4th International Workshop on Plan9 can be viewed here.
Video streams from the 4th International Workshop on Plan9 can be viewed here.
A ‘Stop-The-World’ garbage collector makes it almost impossible to get performance estimates right. Given the vast combination of parameters that will influence actual deployments, we can’t predict when the collector will run. A reference counted real-time collector is simpler to implement and provides room for making better runtime estimates. But the VM should still keep track of allocated objects for two reasons. One is for doing a full sweep to break cyclic references. (Memory exhaustion caused by cyclic references are extremely rare. So in actual practice this collector will almost never run and memory management could be considered ‘real-time’). A record of allocated objects is also needed for providing data required by profilers. The Limbo programming language implements this scheme.
A good description of STM.
In this interview, Alan Kay laments about the ‘pop culture’ in computer science. Came across an article that shares a similar idea. Reading these brought to mind a prophecy that I read in an ancient scroll:
The required techniques of effective reasoning are pretty formal, but as long as programming is done by people that don’t master them, the software crisis will remain with us and will be considered an incurable disease. And you know what incurable diseases do: they invite the quacks and charlatans in, who in this case take the form of Software Engineering gurus.
Though superficially different, the three links above are, in fact, beads on a single thread.
JDK 7 features. The most notable one is the new invokedynamic instruction, which will give dynamic languages first class status on the JVM. People are patching up things here. A VM for an Object Oriented language should be built around dynamic typing and true message passing. Dynamic typing is important because good software engineering means exploratory programming and prototyping. Message passing should be preferred over method calls because it melds well with dynamic typing, concurrency and component distribution. Smalltalk and Erlang got these right from the very beginning.
JDK 7 also features automatic resource management. If you have programmed in Common Lisp, you know what that means:
(with-open-file (file "some.data" :direction :output)
(format file "whew!!"))Now you can do the same stuff in Java:
try (file = new FileOutputStream("some.dat")) { file.write(buf, 0, len); } // file is automatically closed here.
The last great idea in language design is probably (at least) 35 years old. Glad to see the world’s leading ‘enterprise language’ catching up – slowly!
PS: Static type checking, if required, can be implemented in the language being implemented itself. EOPL contains the best explanation (I have seen) on this topic.
To print a stack trace in Java, without throwing an exception, call Thread.dumpStack(). The output will go to System.err. This could be redirected to a log file or some other output stream:
PrintStream logFile; // ... System.setErr(logFile); Thread.dumpStack();
Donald Norman’s key principles of design:
In other words, the user should be able to figure out what to do without much instruction. He should also be able to tell what is going on. The reason for the design should be a simple explanation, even if that is required. If the explanation leaves the user confused, the design has failed. The interesting observation that Don Norman makes is this: when we are not able to figure out how to make a call from the latest smartphone or cannot locate a simple formatting command in a word processor, it is not because we are dumb, it is just another case of bad product design.