Html | Lisp

One way we used macros was to generate Html. There is a very natural fit between macros and Html, because Html is a prefix notation like Lisp, and Html is recursive like Lisp. So we had macro calls within macro calls, generating the most complicated Html, and it was all still very manageable.

— Lisp in Web-Based Applications, Paul Graham

2010.03.20 Saturday ACHK

Object-oriented programming

# Paul Graham has suggested that the purpose of OOP is to act as a “herding mechanism” which keeps mediocre programmers in mediocre organizations from “doing too much damage”. This is at the expense of slowing down productive programmers who know how to use more powerful and more compact techniques.

— Wikipedia on Object-oriented programming

2010.03.19 Friday ACHK

Mouse

One of the quickest ways to increase your productivity on the computer is to go commando: stop using the mouse.

— Jeff Atwood

2010.03.16 Tuesday ACHK

Recursion

Recursive humor

A common joke (for example recursion in the Jargon File) is the following “definition” of recursion.

    Recursion

        See “Recursion”.

(Obviously, this recursion lacks the base case, so it will recur indefinitely.)

This is a parody on references in dictionaries, which in some cases may lead to circular definitions among related words. Jokes often have an element of wisdom, and also an element of misunderstanding. This one is also the shortest possible example of an erroneous recursive definition of an object, the error being the absence of the termination condition (or lack of the initial state, if looked at from an opposite point of view). Newcomers to recursion are often bewildered by its apparent circularity, until they learn to appreciate that a termination condition is key.

An example of this can be found by searching Google for the term “Recursion”. Google cleverly puts the searcher in an endless cycle, of suggesting “Recursion” as the word they were trying to spell, even though that's exactly the input they just used.

A variation is:

    Recursion

        If you still don't get it, see: “Recursion”.

which actually does terminate, as soon as the reader “gets it.”

— Wikipedia on Recursion

2010.03.15 Monday ACHK

Sage (mathematics software)

Design Philosophy of Sage

.

William Stein realized several important facts when designing Sage.

* To create viable alternatives to Magma, Maple, Mathematica, and MATLAB, would take hundreds, or thousands of man-years if one started from the beginning.
* There was a large collection of open-source mathematics software already written, but which was written in different languages (C, C++, Fortran and Python being the most common).

So rather than start from the beginning, Sage which is written in Python and Cython integrates all their specialized mathematics software into a common interface. A user needs to know only Python.

Where no open-source option exists for a particular class of problem, then this would be written in Sage. But Sage does not reinvent the wheel. The same design philosophy is used in commercial mathematics program such as Mathematica, but Sage can use a much wider range of open source software solutions than nonfree software, since some open source licensing imposes restrictions on commercial use of code.

— Wikipedia on Sage (mathematics software)

.

.

2010.03.14 Sunday ACHK

Eric E. Schmidt

Apple

Schmidt was elected to Apple’s board of directors on August 28, 2006. On August 3, 2009 it was announced that Schmidt would resign his board member position at Apple due to conflict of interests and the growing competition between Google and Apple.

— Wikipedia on Eric E. Schmidt

2010.03.13 Saturday ACHK

Curry–Howard correspondence 2

The Curry–Howard correspondence also raised new questions regarding the computational content of proof concepts which were not covered by the original works of Curry and Howard. In particular, classical logic has been shown to correspond to the ability to manipulate the continuation of programs and the symmetry of sequent calculus to express the duality between the two evaluation strategies known as call-by-name and call-by-value.

Speculatively, the Curry–Howard correspondence may be expected to lead to a substantial unification between mathematical logic and foundational computer science:

— Wikipedia on Curry–Howard correspondence

2010.03.08 Monday ACHK

Curry–Howard correspondence

If one now abstracts on the peculiarities of this or that formalism, the immediate generalization is the following claim: a proof is a program, the formula it proves is a type for the program. Most informally, this can be seen as an analogy which states that the return type of a function (i.e., the type of values returned by a function) is analogous to a logical theorem, subject to hypotheses corresponding to the types of the argument values passed to the function; and that the program to compute that function is analogous to a proof of that theorem. This sets a form of logic programming on a rigorous foundation: proofs can be represented as programs, and especially as lambda terms, or proofs can be run.

The correspondence has been the starting point of a large spectrum of new research after its discovery, leading in particular to a new class of formal systems designed to act both as a proof system and as a typed functional programming language.

— Wikipedia on Curry–Howard correspondence

2010.03.07 Sunday ACHK

Hacker ethic

* Access to computers — and anything which might teach you something about the way the world works — should be unlimited and total. Always yield to the Hands-On Imperative!
Levy is recounting hackers’ abilities to learn and build upon pre-existing ideas and systems. He believes that access gives hackers the opportunity to take things apart, fix, or improve upon them and to learn and understand how they work. This gives them the knowledge to create new and even more interesting things (Levy, 1984:226). Access aids the expansion of technology.

* All information should be free.
Linking directly with access, information needs to be free for hackers to fix, improve, and reinvent systems. A free exchange of information allows for greater overall creativity. In the hacker viewpoint, any system could benefit from an easy flow of information.

* Mistrust authority — promote decentralization.
The best way to promote the free exchange of information is to have an open system that presents no boundaries between a hacker and his quest for knowledge. Hackers believe that bureaucracies, whether corporate, government, or university, are flawed systems.

* Hackers should be judged by their hacking, not criteria such as degrees, age, race, sex, or position.
Inherent in the hacker ethic is a meritocratic system where superficiality is disregarded in esteem of skill. Levy articulates that criteria such as age, sex, race, position, and qualification are deemed irrelevant within the hacker community. Hacker skill is the ultimate determinant of acceptance. Such a code within the hacker community fosters the advance of hacking and software development.

Testament to the hacker ethic of equal opportunity, L. Peter Deutsch, a twelve-year-old hacker, was accepted in the TX-0 community, though was not recognised by non-hacker graduate students.

* You can create art and beauty on a computer.
Hackers deeply appreciate innovative techniques which allow programs to perform complicated tasks with few instructions. A program’s code was considered to hold a beauty of its own, having been carefully composed and artfully arranged. Learning to create programs which used the least amount of space almost became a game between the early hackers.

* Computers can change your life for the better.

Hackers felt that computers had enriched their lives, given their lives focus, and made their lives adventurous. Hackers regarded computers as Aladdin’s lamps that they could control. They believed that everyone in society could benefit from experiencing such power and that if everyone could interact with computers in the way that hackers did, then the Hacker Ethic might spread through society and computers would improve the world. The hacker succeeded in turning dreams of endless possibilities into realities. The hackers primary object was to teach society that “the world opened up by the computer was a limitless one” (Levy 230:1984)

… free and open source software allows hackers to access the code used to create the software to improve or reuse it. In effect the free and open source software movements embody all of the hacker ethics.

— Wikipedia on Hacker ethic

.

“Hacker” here means a highly skilled programmer, not a computer criminal. — Me

The basic difference is this: hackers build things, crackers break them. — Eric S. Raymond

“In academia, a “hacker” is a person who follows a spirit of playful cleverness and enjoys programming.” -– Wikipedia on Hacker (academia)

.

.

2010.03.06 Saturday ACHK

Category Theory | Lisp

My current self-study programme includes

1. read almost everything written by Paul Graham

public domain image
Wikipedia

2. learn Lisp programming language (Common Lisp/Scheme) by reading Paul Graham’s textbooks

3. learn Category Theory so that I can read almost everything written by John Baez

public domain image
Wikipedia

Yester-night and tonight, I discovered that they are related:

“Lists, and recursive operations on them, are an excellent case in point. But the path connecting them to their mathematical underpinnings is a long and winding one, which lays in the realm of Category Theory.” — jao

I had never expected that. They are one thing.

Paul Graham –> Lisp –> Category Theory –> John Baez

I have been learning Lisp since 2000 (Machine Intelligence course), since 2006 (Structure and Interpretation of Classical Mechanics, Structure and Interpretation of Computer Programs), since 2010. I have been learning Category Theory since 2006-2008 (John Baez), since 2008 (Sets for Mathematics), since 2010. I had never expected that they are just two different languages of the same thing.

— Me@2010.03.04

2010.03.05 Friday (c) All rights reserved by ACHK

Y Combinator

A fixed point combinator (or fixed-point operator) is a higher-order function that computes a fixed point of other functions.

— Wikipedia on Y Combinator

2010.03.04 Thursday ACHK

Hacker 3

.

The Jargon File has had a special role in acculturating hackers since its origins in the early 1970s. Many textbooks and some literary works shaped the academic hacker subculture; among the most influential are:

* Hackers: Heroes of the Computer Revolution, by Steven Levy
* Godel, Escher, Bach, by Douglas Hofstadter
* The Art of Computer Programming (TAOCP), by Donald Knuth
* The Mythical Man-Month, by Brooks
* Compilers: Principles, Techniques, and Tools (“the Dragon Book”), by Aho, Sethi, and Ullman
* Structure and Interpretation of Computer Programs (SICP), by Abelson and Sussman
* The C Programming Language (K&R), by Kernighan and Ritchie
* The Hitchhiker’s Guide to the Galaxy, by Douglas Adams
* The Tao of Programming, by Geoffrey James
* The Illuminatus! Trilogy, by Robert Shea and Robert Anton Wilson
* Principia Discordia, by Greg Hill and Kerry Thornley
* The Soul of a New Machine, by Tracy Kidder
* The Cuckoo’s Egg, by Cliff Stoll
* The Unix System, by Stephen R. Bourne
* Hackers & Painters, by Paul Graham
* The Cathedral and the Bazaar, by Eric S. Raymond
* The essays of Richard M. Stallman (many published in Free Software, Free Society: Select Essays of Richard M. Stallman)

— Wikipedia on Hacker (programmer subculture)

.

.

[10] “Hacker” here means a highly skilled programmer, not a computer criminal. — Me

The basic difference is this: hackers build things, crackers break them. — Eric S. Raymond

In academia, a “hacker” is a person who follows a spirit of playful cleverness and enjoys programming.

— Wikipedia on Hacker (academia)

.

.

.

2010.03.04 Thursday ACHK

diff

In computing, diff is a file comparison utility that outputs the differences between two files. It is typically used to show the changes between a file and a former version of the same file.

— Wikipedia on diff

2010.03.03 Wednesday ACHK

Free Software

自由軟體

GNU GPLv3 Logo

“Free software” does not mean “noncommercial.” A free program must be available for commercial use, commercial development, and commercial distribution. Commercial development of free software is no longer unusual; such free commercial software is very important. You may have paid money to get copies of free software, or you may have obtained copies at no charge. But regardless of how you got your copies, you always have the freedom to copy and change the software, even to sell copies.

自由軟體因此並不是「非商業軟體」。自由軟體必須適用於商業用途。自由軟體的商業開發模式已很常見;這樣的自由商業軟體相當重要。

— The Free Software Definition, Free Software Foundation, Inc.

2010.03.02 Tuesday ACHK

個人大組織 3

Copyleft

Copyleft是一由自由軟件運動所發展的概念,是一種利用現有著作權體制來挑戰該體制的授權方式,在自由軟件授權方式中增加copyleft條款之後,該自由軟件除了允許使用者自由使用、散佈、改作之外,copyleft條款更要求使用者改作後的衍生作品必須要以同等的授權方式釋出以回饋社群。

有人將其譯為「著佐權」,以彰顯 Copyleft是補足著作權(Copyright,版權)不足的意義。

Copyleft授權方式雖然與常見的著作權授權模式不同,選擇 copyleft授權方式並不代表作者放棄著作權,反而是貫徹始終,強制被授權者使用同樣授權發佈衍生作品。Copyleft授權條款不反對著作權的基本體制,卻是透過利用著作權法來進一步地促進創作自由。

Copyleft type licenses are a novel use of existing copyright law to ensure a work remains freely available.

— 維基百科

2010.02.27 Saturday ACHK

Self-hosting

The term self-hosting was coined to refer to the use of a computer program as part of the toolchain or operating system that produces new versions of that same program — for example, a compiler that can compile its own source code.

— Wikipedia on Self-hosting

2010.02.26 Friday ACHK