Live data from Hacker News

Alan Kay on Lisp

quora.com

161–170 of 207 posts

Re: Alan Kay on Lisp

#161

Earlier quoted context omitted.

AppleScript may be the only read-only programming language in existence.

Depending on your definition of programming language, that crown might actually go to HAGGIS. It's an "educational" programming language which is not executable (or intended to be). It's possibly the worst idea in the history of computing, and that it is taught to anyone is (IMO) a public offense. https://en.wikipedia.org/wiki/HAGGIS

"ah, scary, close tab!"

Re: Alan Kay on Lisp

#162
post #158

Earlier quoted context omitted.

AppleScript may be the only read-only programming language in existence.

I get that vibe from Inform 7: the famous Dijkstra’s algorithm reads like English, but I'd have no idea how to write such a program.

Inform7 is mostly for text adventures. I'm sure it's not bad if you give it a go as many people with little to no coding experience write expansive text games using it.

Re: Alan Kay on Lisp

#163
post #145
post #66

Earlier quoted context omitted.

The way things stand now, the only required piece of application software that a new personal computer needs in order to be viable is a web browser. But once you have that, and the system of your machine is sufficiently compelling, it would work for a great many people. This is why I think someone is going to build something like an actual top to bottom Lisp/Smalltalk/Whatever machine sooner than we think. If Smallta…

Well, wouldn't that just be a JavaScript machine implemented in Smalltalk?

All I meant by bringing up the web browser is that for a personal computer to be usable in reality by a lot of people they'll need a web browser. But just that user application alone gets them really far: email, office productivity, etc. It's a good first application to have in any system.

Therefore we could have all kinds of exotic, bespoke personal computers again, except that unlike the 80s and 90s we now have fairly standardized formats across systems. This gives us the freedom to make whatever kinds of architectures and OSes we want. In this case, that could even include a machine whose board is designed from the ground up to run Lisp or Smalltalk or something we evolve out of those as its operating system.

The web browser that would come with such a default system would be written in one of those languages. Yes, I know making a web browser is an enormous undertaking, but at least some totally new personal computing system wouldn't have to then also implement office productivity etc.

Re: Alan Kay on Lisp

#164

Earlier quoted context omitted.

> makeRange(from: 0, to:10) [..] Swift’s guidelines on naming methods. The syntax you show is Swift, which is a weird mash-up of C/C++ style function call/method call syntax with keywords jammed into them. To me, actual Smalltalk syntax is just so much cleaner: 0 to: 10. It manages the "reads like english" trick without trying to be english-like or natural-language-like. (See Applescript for the disaster that results…

AppleScript may be the only read-only programming language in existence.

I am still waiting for the combination of Perl and Applescript.

You have to write it in Applescript, but you get to read it only in transliterated Perl.

Re: Alan Kay on Lisp

#165
post #146
post #66

Earlier quoted context omitted.

The way things stand now, the only required piece of application software that a new personal computer needs in order to be viable is a web browser. But once you have that, and the system of your machine is sufficiently compelling, it would work for a great many people. This is why I think someone is going to build something like an actual top to bottom Lisp/Smalltalk/Whatever machine sooner than we think. If Smallta…

Could you elaborate? It's a bit cryptic to me, but it sounds exciting!

It's possible to develop a personal computer whose hardware has been designed to run a programming environment as its operating system. In fact, these existed before. Lisp machines did it, and Smalltalk was developed precisely as this kind of system (on the Alto).

In the 80s and 90s when there was a lot of diversity in consumer personal computers, we were all missing a couple of important things: standards and standard interfaces / formats. The web is one such standard. If a system has a web browser, it can do a hell of a lot with other types of computers everywhere. But also notice how today, unlike 10-15 years ago, we don't worry as much about file formats etc. We don't worry as much about which piece of software runs on which platform, in part because of other standards.

All of that frees us up to try more unique personal computing environments again. At minimum, any such system would need to have a web browser as a user level application, since it already gives them access to email, calendar, and basically the rest of the world. In other words, the web browser no encompasses all of this crap that personal computing environments needed to develop in order to have something usable.

Personally I'd want something Smalltalk-like all the way down in the system. Want to inspect TCP/IP packets as they come and go? No problem, they're just Smalltalk objects like everything else in the system. Stuff like that.

Re: Alan Kay on Lisp

#166

Earlier quoted context omitted.

So the example would be: 1 to: 10. Sends the "to:" message to the number 1 with the parameter 10. Returns a range representing the numbers from 1 to 10. You can then iterate that range with by sending it the "do:" message with a block argument. 1 to: 10 do:[ :i | ]. And so on. Looks a lot like syntax for a for-loop, but is just message sends to collections with keyword syntax. Every type of collection implements do:…

Sorry to "well actually" you, but 1 to: 10 do:[ :i | ]. would be a single message `to:do:`, not a chain of messages.

Yes, I left that detail out for pedagogical purposes.

As the other respondent wrote, it still works the same way but with parentheses, and the to:do: exists as a convenience.

In Objective-Smalltalk[1], I added | so you can do this without parenthesis:

   (1 to:10) do: [ :i | stdout println:i. ].
can become:

   1 to:10 | do: [ :i | stdout println:i ].
This is nice when you are constructing a statement interactively, for example on a command line and don't want to go back. It also makes things less convoluted when the chain gets longer. It also "fixes" the asymmetry that chaining works with unary messages but not with keyword messages.

Of course, the whole thing becomes even more elegant, IMHO, with a Higher Order Message (HOM)[2]:

   stdout do println: (1 to:10) each.
YMMV.

[1] http://objective.st/

[2] https://en.wikipedia.org/wiki/Higher_order_message

Re: Alan Kay on Lisp

#167
post #88

Earlier quoted context omitted.

I think your examples underscore the GP's point. Every single one of your examples is an S-Expression where the first element of the list is an operator/function followed by N arguments, from an abstract context-less view, anyway. In lisp there are atoms, lists, and expressions. They have uniform expression but not uniform meaning.

The notation uses S-expressions, that’s true, but the point that I was trying to make is that you can’t understand anything about the meaning of those S-expressions without parsing them in a context-aware way. It’s not as if there is just one form `( ... )` where the expression means invoking `op` with some arguments. A human or machine interpreting the code needs to be aware of these forms and the meaning/semantics…

Strictly, this isn't true. In f(a, b), if f is while, it is not a procedure call. Or if it is a declaration.

Then, of course, there is the specifics of the call. Is it single dispatch? Where is it dispatched? Etc.

Which isn't really to argue against the point. Yes, you need context. Pretty much always. Having gotten used to lisp, I find it much easier to understand. I realize familiarity helps, though.

Re: Alan Kay on Lisp

#168
post #163
post #145

Earlier quoted context omitted.

Well, wouldn't that just be a JavaScript machine implemented in Smalltalk?

All I meant by bringing up the web browser is that for a personal computer to be usable in reality by a lot of people they'll need a web browser. But just that user application alone gets them really far: email, office productivity, etc. It's a good first application to have in any system. Therefore we could have all kinds of exotic, bespoke personal computers again, except that unlike the 80s and 90s we now have fai…

Agreed. I think the best way would be to use Linux as the kernel, maybe with Wayland for display, and Chromium/Firefox in a sandbox, and then the custom OS system running alongside this. Emacs with the Elisp window manager is an example.

Re: Alan Kay on Lisp

#169
post #168
post #163

Earlier quoted context omitted.

All I meant by bringing up the web browser is that for a personal computer to be usable in reality by a lot of people they'll need a web browser. But just that user application alone gets them really far: email, office productivity, etc. It's a good first application to have in any system. Therefore we could have all kinds of exotic, bespoke personal computers again, except that unlike the 80s and 90s we now have fai…

Agreed. I think the best way would be to use Linux as the kernel, maybe with Wayland for display, and Chromium/Firefox in a sandbox, and then the custom OS system running alongside this. Emacs with the Elisp window manager is an example.

I don't think we're on the same page here. You don't need Linux for the kernel. Insofar as there's a kernel, it's the programming environment itself (like Smalltalk) or a set of primitive programs written in that environment (like Lisp).

For graphics you don't need X or Wayland or any of that stuff. BitBlt was able to handle graphics in Smalltalk, because the hardware of the Alto (via microcode) was setup to allow Smalltalk to handle all graphics. If you truly wanted something optimized, something like Nile/Gezira and DSLs written in the environment could work too.

The whole point is that such a system would need to be redesigned and rebuilt from the hardware level on up. A difficult task, to be sure, but the reward is invaluable: the ability to reason about the entire system through the system itself.

Re: Alan Kay on Lisp

#170
post #169
post #168

Earlier quoted context omitted.

Agreed. I think the best way would be to use Linux as the kernel, maybe with Wayland for display, and Chromium/Firefox in a sandbox, and then the custom OS system running alongside this. Emacs with the Elisp window manager is an example.

I don't think we're on the same page here. You don't need Linux for the kernel. Insofar as there's a kernel, it's the programming environment itself (like Smalltalk) or a set of primitive programs written in that environment (like Lisp). For graphics you don't need X or Wayland or any of that stuff. BitBlt was able to handle graphics in Smalltalk, because the hardware of the Alto (via microcode) was setup to allow Sm…

Oh. For me it's just pointless drudgery to remake everything like that. I want a new fully coherent and portable system using an existing kernel and graphics layer for bootstrapping. I mean, Emacs or Squeak are already almost there as far as I'm concerned.
Post reply on HN