Lurker News
This request originated via recent discussions on HN, and the forming of HARC! at YC Research. I'll be around for most of the day today (though the early evening).

Comments (893) 238 threads

Earlier comments
16bytes1 reply#
Hi Alan,

I'm preparing a presentation on how to build a mental model of computing by learning different computer languages. It would be great to include some of your feedback.
* What programming language maps most closely to the way that you think?
* What concept would you reify into a popular language such that it would more closely fit that mapping?
* What one existing reified language feature do you find impacts the way you write code the most, especially even in languages where it is not available?

alankay12 replies#
I think I'd ask "What programming language design would help us think a lot better than we do now (we are currently terrible!)

Certainly, in this day and age, the lack of safe meta-definition is pretty much shocking.

dang3 replies#
Could you give an example of what you mean by "safe meta-definition"? I'd like to understand this better.
cconroy1 reply#
Me too. But if he doesn't answer it he may mean how languages don't have a well designed meta protocol. See the one they built for CLOS in that good book.

Continue this thread — 1 reply

16bytes#
I'm guessing safe meta-definition means type-safe meta-programming.

For example in Lisp, code is data and data is code (aka homoiconicity). This makes it very convenient to write macros (i.e. functions that accept and return executable code).
Unsafe meta-programming would be like the C pre-processor whose aptness for abuse make it a leading feature of IOCCC entries.

alankay17 replies#
"Meta is dangerous" so a safe meta-language within a language will have "fences" to protect.

(Note that "assignment" to a variable is "meta" in a functional language (and you might want to use a "roll back 'worlds' mechanism" (like transactions) for safety when this is needed.)
This is a parallel to various kinds of optimization (many of which violate module boundaries in some way) -- there are ways to make this a lot safer (most languages don't help much)

Continue this thread — 7 replies

nickpsecurity#
I have a few things in my links on the topic of safe metaprogramming outside your own work. Here's a few I could remember on top of head:

Type-safe metaprogramming Sheard
http://citeseerx.ist.psu.edu/viewdoc/download;jsessionid=E63...
Type-safe, reflective metaprogramming Microsoft
http://research.microsoft.com/apps/video/dl.aspx?id=103561
Rascal - Metaprogramming language and platform
http://www.rascal-mpl.org/
So, given work like that, what remaining tough problems are there before you would find a metaprogramming system safe and acceptable? Or do we have the fundemantals available but you just don't like the lack of deployment in mainstream or pragmatic languages and IDE's?
Note: Just dawned on me that you might mean abstract programming in the sense of specifying, analyzing, and coding up abstract requirements closer to human language. Still interested in what gripes or goals you have on that end if so.

CharlesMerriam23 replies#
Many mainstream programming tools feel to be moving backwards. For example, Saber-C of the 1980s allowed hot-editing without restarting processes and graphical data structures. Similarly, the ability to experiment with collections of code before assembling them into a function was advance.

Do you hold much hope for our development environments helping us think?

alankay1#
You could "hot-edit" Lisp (1.85 at BBN) in the 60s (and there were other such systems). Smalltalk at Parc in the 70s used many of these ideas, and went even further.

Development environments should help programmers think (but what if most programmers don't want to think?)

extrapickles2 replies#
Yes. I think they have been slowly getting better.

Visual Studio has let you do hot code editing for over a decade now, they call it "Edit and Continue"[0]. Only works for some languages (C#, Visual Basic/C++). It also lets you modify the program state while stopped on a break-point with code of your devising.
Most browsers also let you adhoc compose and run code without modifying the underlying programs.
Thanks to hardware performance counters, profilers are now able to profile code with much less impact on performance (eg: no more adjusting timeouts due to profiler overhead). Network debuggers are getting better at decoding traffic and displaying it in a more human readable format (eg: automatic gzip decompression, stream reassembly, etc).
[0]: https://msdn.microsoft.com/en-us/library/bcew296c.aspx

drivers991 reply#
BASIC also did this on pretty much every microcomputer in the 1980s.
mmiller#
Kind of, but it was clunkier. You could Break out of an executing program, edit the code you wanted, and then type CONT to continue execution from the break point. The state from that point forward might not be what you want, though. At least inside VS it tries to revert state so that the revision executes as if the state came into it "clean."
mmiller#
I don't know in what context "hot editing" was used to start this thread, but what I read in it is the idea that you can change code while it's running. Edit and continue has a different feel to it, because it works by a different method, by literally patching memory that the suspended thread is going to execute. It has the convenience of stopping the execution of the program before the patch is done. What "hot editing" in, say, Smalltalk has been able to do is you can have a live program running, you can call up a class that the thread uses, change the code in a method, compile it, while the thread is still running, and instantly see the change take effect. The reason it can do this is that method dispatch is late-bound. In .Net it's bound early. Late binding allows much more of a sense of experimentation. You don't have to stop anything. You just change it like you're changing a setting in an app., and you can see the change instantly. This gives you the feel that programming is much more fluid than the typical "stop, edit, compile, debug" cycle.
Joeri2 replies#
Hot-editing updates behavior while keeping state, causing wildly unpredictable behavior given the way objects are constructed from classes in today's languages. The current approach to OO is to bootstrap fresh state from an external source every time the behavior changes so guarantees can be made about the interaction between behavior and state. It seems to me the equivalent of using a wheelchair because you might stumble while walking, the concern is genuine, but the cure is possibly worse than the affliction.

I don't know what the solution is. Perhaps a language with a fundamentally different view of objects, maybe as an ancestry of deltas of state/behavior pairings, somewhat like prototypes but inheriting by versioning and incrementally changing so that state and behavior always match up but still allowing you to revert to a working version. Likely Alan has some better ideas on what sort of language we need.

aidos1 reply#
I use hot-editing in python by default and I find it incredibly useful (now I feel crippled when I'm on a system without it). There are times when I need to reload the state completely but it's pretty rare (changing something that uses metaclasses, like sqlalchemy, is one such place).

Maybe there's something about the style I've adopted that lends itself more to hot-editing but it's definitely a tool I'd hate to be without.

jasonamyers1 reply#
I'm super interested in how you do that! Can you share at all?

Continue this thread — 1 reply

kartD1 reply#
Hi Alan, What do think about the current state of language design (Swift, Rust, Go)? Anything that makes you happy/annoys you?
alankay11 reply#
I think all languages today annoy me -- just put me down as a grump. They seem to be at a very weak level of discourse for the 21st century. (But a few are fun when looked at from the perspectives of the past e.g. Erlang ...)
kartD1 reply#
I see, is there anything you see today that you like? (Coq, Idris maybe?)
Ericson23143 replies#
While the methods are different from what Alan has espoused in the past, I'd like to believe the goals are very well aligned.

Continue this thread — 3 replies

trsohmers1 reply#
Hi Alan,

We met at a retreat last fall, and it was a real treat for me to hear some fantastic stories/anecdotes about the last 50 years of computing (which I have only been directly involved with for about 1/10th of). Another one of my computing heroes is Seymour Cray, which we talked about a bit and your time at Chippewa Falls. While a lot of HN'ers know about you talking about the Burroughs B5000, I (and I bet most others) would have had no idea that you got to work with Seymour on the CDC 6600. DO you have any particular Seymour Cray/6600 stories that you think would be of interest to the crowd?
Thanks again for doing this, and I hope to be able to talk again soon!

alankay1#
Seymour Cray was a man of few words. I was there for three weeks before I realized he was not the janitor.

The "Chippewa OS" is too big a story for here, but it turned out that the official Control Data software team failed to come up with any software for the 6600! Hence a bunch of us from Livermore, Los Alamos, NCAR, etc. -- the places that had bought the machine -- were assembled in Chippewa Falls to "do something".
Perhaps the most interesting piece of unofficial software was a multitasking OS with graphical debugger for the 6600 that had been written by Seymour Cray -- to help debug the machine -- in octal absolute! I had the honor of writing a de-assembler for this system so we ordinary mortals could make changes and add to it (this was an amazing tour de force given the parallel architecture and multiple processes for this machine). And it was also a good object lesson for what Cray was really good at, and what he was not so good at (there were some really great decisions on this machine, and some really poor ones -- both sets quite extreme)

Load more comments