Scheme 程序语言介绍

Scheme 是差不多三十年前诞生在 MIT 人工智能实验室的一门程序语言。它是 Lisp 语言的发展。今天的 Scheme 在程序语言的理论研究和工程应用两方面都发挥着持久和越来越重要的影响。

在网上有这样一句有趣的评论:计算机科学的大部分,就是在重复发现很久以前别人就早已 发现过的东西。当然,这是一句玩笑。不过我们可以给这句玩笑接个下巴:对于程序语言中 的每一个重要概念,你都可以先在 Lisp 当中发明一次,再在 C++ 里面发明一次,再在 Java 里面发明一次,再在 Python 里面发明一次,再在 Perl 里面发明一次,再在 Ruby 里面发明一次,当然,最后还要在 C# 里面再发明一次。我们以此开始我们对 Scheme 的介绍。^_^

Scheme 的前身是 Lisp。和 Scheme 一样,这也是一门诞生在 MIT 人工智能实验室的语言。 据说 Lisp 在程序语言的族谱上,班辈仅次于 Fortran,是第二古老的语言。但和 Fortran 不同,Fortran 经常被大名鼎鼎的计算机科学家批评,作为反面教材,这些计算机科学家当 中有著名的图灵奖获得者 Edsger Dijkstra。而 Lisp 和 Scheme 恰恰相反,它们常被计算 机科学家作为正面例子,一个优秀作品的例子。赞扬 Lisp 的人当中有 Smalltalk 和图形 用户界面的发明人之一 Alan Kay。

Lisp 由图灵奖获得者 John McCarthy 发明。据说一开始 McCarthy 只想把这门他正在设计 的语言的语法的设计,往后拖一拖,等到后面有趣的工作做完了,再回头来给这门基于 Lambda 演算的程序语言加上为数学家们所熟悉的语法。可是 McCarthy 的一个学生很快发 现,直接在还没有正式语法的抽象语法里面写程序,感觉非常好。就用不着一个正式的语法 了。于是 Lisp 诞生了。Lisp 重要的特征就是:第一,基于 Lambda 演算的计算模型;第 二,加上 List processing,这也是 Lisp 名称的由来;第三,直接在抽象语法里面工作, 这是非常特别的。前两个重要特征,是 McCarthy 天才的设计,第三个特征则是有趣的巧合。

又过了十多年,还在 MIT 人工智能实验室,不过这次不是 McCarthy,而是两个更年轻的计算机科学家。Guy Steele, Jr. 和他的老师 Gerald Sussman 合作对古典 Lisp 做了两个重 要改进。一是把 Lisp 从 Dynamic scope 变成了 Lexical scope。现在大家熟悉的几乎所 有的语言都是 Lexical scope,所以大家见怪不怪了。后来 Steele 成为 Common Lisp 设 计的主力,Common Lisp 把 Scheme 的 Lexical scope、还有其它一些由 Scheme 所创造的 特征,都加入到主流 Lisp 语言当中,Dynamic scope 终于成为了历史。Steele 和 Sussman 做的另一个主要改进是把 Continuation 这个概念引入到程序语言里面。这样一门 新的程序语言就此诞生。他们按照人工智能实验室的传统,把它命名为 Scheme。

节选自,IBM DeveloperWorks

参考:

用 scheme 语言进行 UNIX 系统编程

http://groups.csail.mit.edu/mac/projects/scheme/

How to use shared memory between instances

使用共享实例内存示例,忘了出处了:

program MapDemo;
uses
Windows;
type
TShared = record
strSaveFileName: array[0..1023] of char;
end;
var
hMappingFile: THandle;
PShared: ^TShared;
Msg: TMsg;
function StrCopy(Dest: PChar; const Source: PChar): PChar;
asm
PUSH EDI
PUSH ESI
MOV ESI,EAX
MOV EDI,EDX
MOV ECX,0FFFFFFFFH
XOR AL,AL
REPNE SCASB
NOT ECX
MOV EDI,ESI
MOV ESI,EDX
MOV EDX,ECX
MOV EAX,EDI
SHR ECX,2
REP MOVSD
MOV ECX,EDX
AND ECX,3
REP MOVSB
POP ESI
POP EDI
end;
begin
hMappingFile := OpenFileMapping(FILE_MAP_READ, False, ‘test’);
if hMappingFile = 0 then
hMappingFile := CreateFileMapping($FFFFFFFF, nil, PAGE_READWRITE, 0, SizeOf(TShared), ‘test’);
PShared := MapViewOfFile(hMappingFile, FILE_MAP_WRITE or FILE_MAP_READ, 0, 0, 0);
StrCopy(PShared^.strSaveFileName, ‘fuck bms’);
MessageBox(0, PShared^.strSaveFileName, pchar(‘It Works’), 0);
while GetMessage(Msg, 0, 0, 0) do;
UnmapViewOfFile(PShared);
CloseHandle(hMappingFile);
end.

Change your Windows

RocketDock is a smoothly animated, alpha blended application launcher. It provides a nice clean interface to drop shortcuts on for easy access and organization. With each item completely customizable there is no end to what you can add and launch from the dock.

Now with added Taskbar support your minimized windows can appear as icons on the dock. This allows for better productivity and accessibility.

Features:

  • Minimize windows to the dock
  • Real-time window previews in Vista
  • Running application indicators
  • Simple drag-n-drop interface
  • Multi-monitor support
  • Supports alpha-blended PNG and ICO icons
  • Icons zoom and transition smoothly
  • Auto-hide and Popup on mouse over
  • Positioning and layering options
  • Fully customizable
  • Completely Portable
  • ObjectDock Docklet support
  • Compatible with MobyDock, ObjectDock, RK Launcher, and Y’z Dock skins
  • Runs great on slower computers
  • Unicode compliant
  • Supports many languages and can easily be translated
  • A friendly user base
  • And best of all… its FREE!!!

Download RocketDock from FileHippo.com

ObjectDock is a program that adds a skinnable dock to your Windows desktop. It is one of the most popular desktop enhancement programs available.

ObjectDock™ is a program that enables users to organize their shortcuts, programs and running tasks into an attractive and fun animated Dock. By allowing users to have more control over how they organize their desktop, users can take control of their desktop icons and shortcuts to have them be available when where and how they need them. This, all with the unique style and top-rate performance that ObjectDock is known to deliver!

In constant development, ObjectDock and ObjectDock Plus are enhanced often to provide the most unique features of any stylized shortcut organizer / launcher available.

Download ObjectDock from FileHippo.com

WindowBlinds is a software utility that allows you to completely change the look and feel of Microsoft Windows.

It works by applying new visual styles, called skins, across the entire user interface (title bars, push buttons, start menu, taskbar, etc.) of the operating system. As a result, you gain complete control over the way Windows looks.

As good as someone might think Windows looks, it is a one-size fits all solution. WindowBlinds gives users thousands of new looks to choose from.

With skins, WindowBlinds can change the look of:

  • Title bars
  • Borders
  • The Start bar
  • Progress animations
  • Explorer Views
  • and virtually every other part of Windows!

Download WindowBlinds from FileHippo.com

Chrome临时文件夹修改

参数:–user-data-dir=“[PATH]” 解释:将浏览器的数据存放地点设置到指定路径 功能描述:可以将浏览器数据存放地点设置到非系统盘避免重新安装系统后浏览器数据(cookies\书签、历史记录、密码等)丢失。 使用方法:后面的[PATH]为变量,可以更改为你想要指定的路径,如D:\mychrome\,更改并运行之后程序会自动在D盘创建一个mychrome目录,存放浏览器数据。

来源:http://bbs.webmou.com/viewthread.php?tid=4124&highlight=%25B2%25CE%25CA%25FD

about:cache 查Chrome里cache的内容。

已经测试完全OK