Lisp macros 2.2

I think one of the problems with Lisp is that it is too powerful. It has so much meta ability that it allows people to invent their own little worlds, and it takes a while to figure out each person’s little world (SoftwareGivesUsGodLikePowers).

— Lisp is Too Powerful

2012.02.19 Sunday ACHK

Lisp macros 2

People complain macros are difficult to understand. Macros are easy. If you can understand a program that concatenates lists to make a new list, you can understand a macro. Macros are quite literally ‘just lisp code’.

— ohyes 2 weeks ago

— Lisp is Too Powerful

— Hacker News

2012.01.07 Saturday ACHK

Computer

Steven Paul “Steve” Jobs (February 24, 1955 – October 5, 2011)

= Apple Inc. + Pixar Animation Studios

Dennis MacAlistair Ritchie (b. September 9, 1941; found dead October 12, 2011)

= the C programming language + the UNIX operating system

John McCarthy (September 4, 1927 – October 24, 2011)

= Artificial Intelligence (AI) + the LISP programming language

— Me@2011.10.27

2011.10.27 Thursday (c) All rights reserved by ACHK

Category Theory | Lisp, 4

這段改編自 2010 年 3 月 6 日的對話。

我在前晚發現,我一直在研究的兩個課題,原來在某個角度之下,是同一樣東西。

(安:哪兩樣東西呢?)

一個就是 Paul Graham 強烈推介的 Lisp programming language(Lisp 編程語言)。另一個就是 John Baez 強烈推介的 Category Theory(範疇論)。

利用「範疇論」,我們可以將「相對論」的數學語言和「量子力學」的數學語言,統一成一套數學語言。留意,我不是指統一「相對論」和「量子力學」本身,而是指統一它們的數學語言。「相對論」所用的數學語言是 differential geometry(微分幾何)。「量子力學」所用的數學語言是 representation theory(表示論)。

Lisp 和「範疇論」都是我幾年前就開始關心的課題。最近才發現,它們竟然是「同一樣」東西,令我十分驚奇。幾天前,我還正正考慮著,好不好暫時放棄其中一門,因為我沒有時間同時深入研究 Lisp 和「範疇論」。現在,問題突然消失。

彷彿是同時愛上了兩位女仕,最終要二擇其一。正當面臨痛苦決擇之際,發現她們,竟然是同一個人。

— Me@2011.08.03

2011.08.03 Thursday (c) All rights reserved by ACHK

Clojure

Rich Hickey developed Clojure because he wanted a modern Lisp for functional programming, symbiotic with the established Java platform, and designed for concurrency.

Clojure’s approach to concurrency is characterized by the concept of identities, which represent a series of immutable states over time. Since states are immutable values, any number of workers can operate on them in parallel, and concurrency becomes a question of managing changes from one state to another. For this purpose, Clojure provides several mutable reference types, each having well-defined semantics for the transition between states.

— Wikipedia on Clojure

2011.08.03 Wednesday ACHK

On Lisp

I hope reading this book will be fun. Of all the languages I know, I like Lisp the best, simply because it’s the most beautiful. This book is about Lisp at its lispiest. I had fun writing it, and I hope that comes through in the text.

— Paul Graham

2011.07.01 Friday ACHK

MapReduce

By abstracting away the very concept of looping, you can implement looping any way you want, including implementing it in a way that scales nicely with extra hardware.

Without understanding functional programming, you can’t invent MapReduce, the algorithm that makes Google so massively scalable. The terms Map and Reduce come from Lisp and functional programming. MapReduce is, in retrospect, obvious to anyone who remembers from their 6.001-equivalent programming class that purely functional programs have no side effects and are thus trivially parallelizable.

The very fact that Google invented MapReduce, and Microsoft didn’t, says something about why Microsoft is still playing catch up trying to get basic search features to work, while Google has moved on to the next problem: building Skynet^H^H^H^H^H^H the world’s largest massively parallel supercomputer. I don’t think Microsoft completely understands just how far behind they are on that wave.

— Can Your Programming Language Do This?

— Joel Spolsky

2011.04.22 Friday ACHK

ANSI Common LISP

.

ANSI Common LISP (by Paul Graham) was the book I borrowed for a Machine Intelligence course project in 2000. My memory was that the author was called “Paul something”. I thought that Paul was the one who had invented LISP.

No. It should be John McCarthy.

Later on, during my teaching-in-high-school period, by a Wikipedia biography, I realized that that Paul was not as great as I thought, because he was not the one who had invented LISP.

However, now, I regard him as one of my five most important teachers.

— Me@2010.03.08

— Me@2011.03.14

.

.

.

2011.03.14 Monday (c) All rights reserved by ACHK

Blub programmer

大世界 3.2

    Our hypothetical Blub programmer wouldn’t use either [Cobol or assembly]. Of course he wouldn’t program in machine language. That’s what compilers are for. And as for Cobol, he doesn’t know how anyone can get anything done with it. It doesn’t even have x (Blub feature of your choice).

    As long as our hypothetical Blub programmer is looking down the power continuum, he knows he’s looking down. Languages less powerful than Blub are obviously less powerful, because they’re missing some feature he’s used to. But when our hypothetical Blub programmer looks in the other direction, up the power continuum, he doesn’t realize he’s looking up. What he sees are merely weird languages. He probably considers them about equivalent in power to Blub, but with all this other hairy stuff thrown in as well. Blub is good enough for him, because he thinks in Blub.

    When we switch to the point of view of a programmer using any of the languages higher up the power continuum, however, we find that he in turn looks down upon Blub. How can you get anything done in Blub? It doesn’t even have y.

    By induction, the only programmers in a position to see all the differences in power between the various languages are those who understand the most powerful one. (This is probably what Eric Raymond meant about Lisp making you a better programmer.) You can’t trust the opinions of the others, because of the Blub paradox: they’re satisfied with whatever language they happen to use, because it dictates the way they think about programs.
   
— Paul Graham

2011.03.02 Wednesday ACHK

Metamagical Themas

There are three articles centered on the Lisp programming language, where Hofstadter first details the language itself, and then shows how it relates to Godel’s incompleteness theorem.

The title is an example of wordplay: it is an anagram of Mathematical Games, the title of Martin Gardner’s column that Hofstadter’s column succeeded in Scientific American.

— Wikipedia on Metamagical Themas

2011.02.23 Wednesday ACHK

The Truth About Lisp

Learning lisp will alter your life.

Your brain will grow bigger than you ever thought possible.

Paul Graham himself was completely written in lisp, by an earlier version of himself, also written in lisp, by an earlier version of lisp. It’s lisp, paul graham, lisp, paul graham, all the way down.

— Leon Bambrick

2011.01.27 Thursday ACHK

if-then-else

The ubiquitous if-then-else structure, now taken for granted as an essential element of any programming language, was invented by McCarthy for use in Lisp, where it saw its first appearance in a more general form (the cond structure). It was inherited by Algol, which popularized it.

— Wikipedia on Lisp (programming language)

2011.01.08 Saturday ACHK

No syntax

Lisp looks strange not so much because it has a strange syntax as because it has no syntax; you express programs directly in the parse trees that get built behind the scenes when other languages are parsed, and these trees are made of lists, which are Lisp data structures.

— Paul Graham

2010.12.20 Monday ACHK

Java, Perl, Python

If you look at these languages in order, Java, Perl, Python, you notice an interesting pattern. At least, you notice this pattern if you are a Lisp hacker. Each one is progressively more like Lisp.

— Paul Graham

We were after the C++ programmers. We managed to drag a lot of them about halfway to Lisp.

— Guy Steele, co-author of the Java spec

2010.12.17 Friday ACHK

Lambda calculus 2

Prehistory

A few decades before modern computers were invented, the mathematician Alonzo Church developed a language called the lambda calculus. He intended it as a tool for investigating the foundations of mathematics. The first person to realize the practical connection between programming and the lambda calculus was John McCarthy, who created Lisp in 1958.

— Real World Haskell

— by Bryan O’Sullivan, Don Stewart, and John Goerzen

2010.12.01 Wednesday ACHK

Continuations

Basically, continuations let you put “time travel” into your code. This allows you to do things like run programs backward, sideways, or in other crazy ways.

— Land of Lisp

2010.11.24 Wednesday ACHK

大世界 2

假設你是一個程式員。你學了 Lisp 這種程式語言後,未必真的會在上班時用它來寫程式。但是,Lisp 會為你帶來很多嶄新的思考工具,大大改善你寫程式的風格,即使你維持使用其他程式語言。

(安:即是話,未用過 Lisp 的話,你不會知道你平日用的程式語言,有什麼限制。)

無錯。

(安:你要學習和領悟新的知識或技能,才能真切體會到自己原有的知識體系,有什麼不足之處。)

— Me@2010.11.05

Programming in Lisp is like playing with the primordial forces of the universe. It feels like lightning between your fingertips. No other language even feels close.

— Glenn Ehrlich

2010.11.05 Friday (c) All rights reserved by ACHK

C, Lisp, and Smalltalk

Design and Research 2

.

You can see the same thing in programming languages. C, Lisp, and Smalltalk were created for their own designers to use. Cobol, Ada, and Java, were created for other people to use.

If you think you’re designing something for idiots, the odds are that you’re not designing something good, even for idiots.

— Paul Graham

.

.

.

2010.10.29 Friday ACHK

Lisp and Fortran

Lisp and Fortran were the trunks of two separate evolutionary trees, one rooted in math and one rooted in machine architecture. These two trees have been converging ever since.

— Paul Graham

2010.05.18 Tuesday ACHK