星期六, 8月 11, 2007

D Language

A, B, C, ... D! The Programming Language

Written by special contributor Owen Anderson on 2004-04-19 05:43:07 UTC

For years the development scene has been dominated by the C family of languages, primarily C itself and its immediate successor C++. Recent years have given rise to other C-descendents, however, such as Sun's Java and Microsoft's C#.

D language, Page 1/2

Nowadays we here lots of hype about .NET and J2EE, lots of propaganda about how both C# and Java are "The Way of the Future." But as we all know, sometimes the real gem is the unsong underdog, the one that don't have full page ads in tech journals. And today I'm going to take a look at one such gem: The D Programming Language.

What is D?

D is a (relatively) new addition to the C family of programming languages, intended as a successor to C++ but also incorporating ideas and improvements from other C-like languages such as Java and C#. It is an object-oriented, garbage-collected, systems programming language that is compiled to executable rather than bytecode. The specification and reference compiler are currently at version 0.82, and are expected to reach 1.0 within the year. The reference compiler runs on both Windows and Linux x86, and the frontend if Open-Sourced. A port of the frontend to GCC is underway and already functional on Linux x86 and Mac OS X.

Maintained by Walter Bright, author of the Digital Mars C/C++ compilers and former compiler programmer for both Zorland and Symantec, is the language's primary author and maintains the reference implementation, though most if not all language decisions are made only after discussion on the D newsgroup. (See links at the end.)

How's That Different Than What We Had Before?

C++

D is designed to address the shortcomings of C++. While a powerful language, years of history and unneeded complexity has bogged down that language. Five years after the language's standardization, most compilers are still struggling to become compliant. While C++ pioneered in generic programming and brought objects to the masses, its complexity makes it very hard to add new features, and so it lags behind in newer techniques such as design-by-contract, unit-testing, and include dependency resolution.

In most respects, however, D functions like C++: most C++ code can be converted directly and will, generally speaking, function as expected. Perhaps the largest change in D is the addition of automatic garbage collection, though explicit delete statements will still function as they do in C++.

Java

While not the direct parent of D, many of Java's techniques have been incorporated into it. Some claim that D's object definition syntax is more similar to Java's, though it really ought to be familiar to any modern object-oriented programmer.

In terms of similarities, D and Java are both garbage-collected, both do not make a distinction between the ".", "->", and "::" operators, both include null as a keyword, and both feature try-catch-finally exception handling. Also D's module system of includes is similar to Java's packages. As to differences, D is compiled to an executable instead of bytecode, and is not as rigidly object-oriented. Unlike Java, D does not force the object-oriented paradigm on the programmer and can be used just like procedural C. Finally, D allows (but does not encourage) pointer manipulation.

C#

C# and D are really both answers to the same basic question: How can we improve C++? Both are derived from C++ with specific elements drawn in from Java. Both share most of their major features. The biggest difference is that unlike C#, D does not run inside a VM, and can thus be used to write systems (low-level) code. This also allows D to offer the programmer the options of performing manual memory management, which C# does not, nor does C# have anything like D's templating capabilities, which are on par with C++'s.

OK, What Does It Do?

Having now established what D is not, it might serve us well to note what D is, and to examine some of its features:

Binary C Compatibility
D programs can import and link against C code and libraries, providing D with free access to a huge amount of pre-written code. Note, however, that D is not link-compatible with C++, so pure C wrappers are required to access C++ code in D.

Systems Programming
Because D is compiled to binary rather than bytecode, and it does not run inside a virtual machine, D can be used for systems and low-level programming. It allows in-line assembly, and the garbage collector can be regulated (or even disabled) if real-time capabilities are necessary.

Lexicial, Syntactic, and Semantic Clarity
One of the major goals of D is to eliminate a lot of the complexity of C++ that has made it so hard for compilers to live up to the standard. A simplified syntax makes the job of both the compiler and the programmer easier, as it allows compilers to be more efficient and reduces the likelihood of compiler bugs. As an example, D drops the much-contested angular bracket syntax for declaring templates, making code easier both to read and parse.

Design-by-Contract and Automatic Testing
D advocates the use of design-by-contract and provides built-in facilities for automatic unit-testing. While both are technically possible in C++, D makes them core tenets of the language to make them easier to use for novices. The hope is that with testing built into the language bugs will be easier to identify and fix, especially if programmers get into the habit of using the testing features.

Removal of Archaic Features
Probably the language's greatest goal is the elimination of archaic and/or needlessly complicated features. For instance, D does away completely with the C preprocessor, relying instead on built-in versioning capabilities. Forward declarations are out the window on the same token. Also, it replaces the often-complicated multiple inheritance of C++ with Java's single inheritance and interfaces. Most of these features are also related with the above of clarity, making the code easier for a human to read as well as easier for a compiler to convert into binary.

These are by no means the only features of D, but for the sake of brevity I shall leave the exploration of the others as an exercise for the reader. For more information, see Walter's SDWest paper.

So What Does It Look Like?

 //Copyright Walter Bright.  Used with permission.
import std.c.stdio;
import std.file;

int main (char[][] args)
{
int w_total;
int l_total;
int c_total;
int[char[]] dictionary;

printf(" lines words bytes file\n");
foreach (char[] arg; args[1 .. args.length])
{
char[] input;
int w_cnt, l_cnt, c_cnt;
int inword;
int wstart;

input = cast(char[])std.file.read(arg);

for (int j = 0; j < c =" input[j];" c ="=">= '0' && c <= '9') { } else if (c >= 'a' &&amp;amp;amp; c <= 'z' || c >= 'A' && c <= 'Z') { if (!inword) { wstart = j; inword = 1; ++w_cnt; } } else if (inword) { char[] word = input[wstart .. j]; dictionary[word]++; inword = 0; } ++c_cnt; } if (inword) { char[] w = input[wstart .. input.length]; dictionary[w]++; } printf("%8lu%8lu%8lu %.*s\n", l_cnt, w_cnt, c_cnt, arg); l_total += l_cnt; w_total += w_cnt; c_total += c_cnt; } if (args.length > 2)
{
printf("------------------------------\n%8lu%8lu%8lu total",
l_total, w_total, c_total);
}
printf("--------------------------------------\n");

foreach (char[] word1; dictionary.keys.sort)
{
printf("%3d %.*s\n", dictionary[word1], word1);
}
return 0;
}

This program should look familiar to most C/C++ programmers: it's the classic "word count" program. While most of it should be easily comprehensible to anyone versed in C-like languages, I will highlight a few features:

 import std.c.stdio;
import std.file;

These lines are D's version of includes. The first imports the plain C stdio functions (notably printf), while the second imports the D standard library (known as Phobos) file I/O systems.

 int main (char[][] args)

You'll notice here and throughout the program that D uses neither char* nor a string class for string values. D arrays are "smart arrays," which know their own length and are capable of most of the functionality of C++'s various STL array types.

 int[char[]] dictionary;

This declaration will look odd to C++ programmers, but it is in fact a familiar concept: it creates an array of integers that is indexed by strings, called an associative array. This is equivalent to Maps in both STL and JFC, but in D it is a core language feature rather than part of the standard library.

 foreach (char[] arg; args[1 .. args.length])

This line illustrates two new features of D: foreach and slicing. foreach replaces the need for iterators, as arg will take on the value of each element in the array as the loop executes. This is guaranteed to be in order if using a standard array, but no order guarantee is made for associative arrays. Slicing is the ability to declare an array as a subarray of another. In this case, args[1 .. args.length] is the subarray of args that includes all elements except the first. You can also note here that args, an array, knows its own length.

 foreach (char[] word1; dictionary.keys.sort)

Any array of entities that defines a comparison operator is sortable, such as the array of keys of an associative array. Again, this is a language feature rather than part of the standard library.

Beyond This Article

This article does not even begin to examine all the features of D. For instance, the above example program does not make use of any of D's object-oriented features, nor its generic programming capabilities, nor its built-in testing facilities. While all are certainly worthy of note, covering all in one article would be over-ambitious. Instead, here is a list of references where more information about D can be found:

The D Specification (Working Version)

The D Compiler (Linux and Windows)

The D Newsgroup (D Language Features Discussion)

The D.gnu Newsgroup (D for GCC Discussion)

The D Frontend for GCC (Work in Progress. Supports Linux and Mac OS X thus far.)

DSource.org (Newly formed host for D projects. Also hosts tutorials.)

D Links (Large list of D sites and libraries)

About the author:
The author, Owen Anderson, is a Computer Science student at Macalester College. He develops for Mac OS X and Linux, and has recently started the Docoa project to bridge D to Objective-C on Mac OS X.

星期五, 8月 10, 2007

清單 - 搜尋

編輯

wotsit 各類規格檔案

.

IDE & Compiler Introduction

大部份資料來源:按這裡
少部份作者自己修正。


◆ IDE

‧Dev-Cpp(Windows Only)http://www.bloodshed.net/
 Compiler 僅支援 GCC, 個人覺得不甚理想而且真的很久沒有更新了


‧Code::Blocks(Various)http://www.codeblocks.org/
 目前看過支援最多 compiler 的 IDE,最新的一版支援的
 Ccompiler 為:

 1. GCC
 2. MSVC 7.1(2003 toolkit)
 3. MSVC 8.0(2005 express)
 4. BCC 5.5(CLI 免費版)
 5. DMC(數位火星)
 6. Open Watcom(原本有家公司叫 Watcom, 現在大概掛了)
 7. Intel C/C++ Compiler(要付錢......)
 8. SDCC Compiler(Intel 8051... MCUs的編譯器)
 9. GNU GDC Compiler(GNU 的 D 語言編譯器…)
 10. DMD(數位火星的官方 D 編譯器)
 11. GNU ARM GCC Compiler

 在語法上,也支援許多奇奇怪怪的語言 =.=b,不過這不是重
 點,重點是他能切換各種 Compiler


‧Visual C++ 2005 Express(Windows XP SP2 Only)
 http://msdn.microsoft.com/vstudio/express/visualc
 內部使用的 compiler 是 MSVC 8.0


‧Turbo C++ Explorer(Windows Only)http://www.turboexplorer.com/
 如果上面那個算是真正的 IDE, 這個就叫暴走的 IDE 要安裝前必須
 先灌一堆雜七雜八的也就算了,自己本身也超大啟動時間相當長,
 元件相當多,功能多到爆炸 Orz全部安裝完可能會超過 1G 吧…內部
 使用的 compiler 似乎是 BCC 5.5, 有點歷史的 compiler...

 另外,其實 Turbo 是騙人的,他連 About 的地方都寫 BCB簡單地說應該就
 是 BCB 免費版………也同樣完整支援 RAD 與 VCL


‧Open Watcom C/C++(Winodws, OS/2, etc..?)
 http://www.openwatcom.org/
 這個東西我打開來看一眼就關掉了,看起來沒上面那兩個好用簡便強大
 內部使用的 compiler 是 Open Watcom 1.5, 測試結果…非常爛



Commercial Compiler

‧msvc 7.1(.NET 2003)網站已被 MS 移除…

 基本上這個是在 windows 上我最推薦的 compiler,全部合起來只有 30 MB, 比 MinGW 還要小(雖然 MinGW 不只是 C++ compiler)而且編譯出來的程式,也是最小最快的,比 msvc 8.0 還要小還要快,可惜已經被微軟移掉。


‧msvc 8.0(.NET 2005)http://msdn.microsoft.com/vstudio/express/visualc/
如果只是要用 compiler, 灌這有一點…累贅,畢竟他還包含了整個 IDE, 記得全部約 3xx MB不過以這種功能而言,這樣的 size 其實並不會很大,很可惜沒有像 msvc 7.1 那樣輕便版的就是了,否則搭 code::blocks 很方便編譯出來的程式略比 msvc 7.1 的慢一點,檔案則肥一些,但還是比 g++ 小應該會是個不錯的 compiler, 這有待我繼續嘗試


‧DMC 8.49 http://www.digitalmars.com/download/freecompiler.html
 這個…我之前的測試結果跟 bcc 類似,都是又慢又肥跟標準相不相容,就很難講了而且這次我要測試他的效能時,會跳出 STLport 的錯誤我也懶得追查要怎麼解決了


‧Opne Watcom 1.5 http://www.openwatcom.org/index.php/Download
 編出來的程式異常地小,比 msvc 7.1 的還小很多我懷疑他是否有用到什麼 dll 檔…?不能確定但是執行效能還真不是普通地爛,比 g++ 還差很多,更不用去跟 msvc 比了,差太遠了…好幾倍之差而且這個下載版本是 compiler + IDE 的,實在…不怎麼方便


‧icc(Intel C/C++ Compiler)http://www3.intel.com/cd/software/products/asmo-na/eng/compilers/279578.htm
 在 Windows 上,據說 icc 生出的程式是執行效能最好的可以有 30 天的試用期,不幸的是我之前下載的過期了,又懶得重抓,所以這次 icc 我沒有測試到安裝程式也滿大的,不知道裡面有哪些東西不過我個人是覺得 msvc 系列的執行效能就很好了,倒也不用刻意去找 intel 的來用



◆ Free Compiler

‧G++(GNU C++ Compiler)http://www.mingw.org/
 Windows 上只有 2.x 和 3.x 版可以用,4.0 一直都沒有前幾年我拿他編出來的程式和 msvc 7.1 比較,兩者是差不多的甚至 g++ 3.4.x 有略勝一點點,不管是程式大小和執行效率不過在這一兩年,msvc 7.1 忽然暴走,編出來的程式變得相當漂亮G++ 就已經完全不是對手了…不過 g++ 應該是目前跨最多平台的 c++ compiler, 用起來還是很方便編譯出來的程式也有一定的水準,雖然敗給 msvc 了


‧DJGPP
 一個 32-bit GNU C/C++ compiler. for DOS. 支援 DPMI (DOS Protected Mode Interface), 可開發 DOS 32-bit 保護模式的程式.


‧GNU C
 在任何安裝 Unix, BSD, Linux 的系統上都可見到.


‧Cygwin
 Windows 下的 GNU 與 Unix 環境, 可在 Windows 下使用 gcc, flex, bison...


‧WATCOM C
 知名的 C/C++ compiler. 現已 Free. 支援多種 OS 與平台.


‧Digital Mars C/C++
 前身是知名的 Zortech C/C++ , Symantec C/C++, 現已 Free. 支援多種 OS 與平台.


‧Turbo C++ 3.0
 a.Borland Turbo C++ 3.0, DOS 下的 C Compiler. 已開放為 Free Download. 可發展 DOS 16-bit real-mode application.


‧Borland C++ Compiler
 Free Borland C++ 5.5 compiler. 可發展 Windows 32-bit application. (Fast , Free and ANSI).

 全部約 50 MB,跟 MinGW 相近不過…老實講這 compiler 真的有點老舊了跟標準不太合就算了,編出來的程式也又肥又慢,完全比不上 g++而且不知道為什麼,我這次在 code::blocks 上的設定,他都會有個錯誤訊息,我不知道怎麼解決


‧SDCC
 C compiler for Intel 8051 and Zilog Z-80.


‧LCC - Win32
 C compiler for Win32 system (Windows 32-bit programming).


‧The 6502 C compiler
 C compiler for 6502 CPU. 6502 CPU 目前仍有許多廠商使用於 embedded system 上. 最早為 Apple II 電腦內使用了一顆 6502 CPU

資源 - 程式設計工具

編輯


◆ 工具目錄、清單

 △ Assembly
 ‧Linux Assembly Resouces

 △ C++
 ‧William Yeh




◆ 綜合、簡介

 ‧IDE 及 Compiler 簡介
 ‧Borland C++ 5.5 Installation (安裝方式說明)



◆ Freeware IDE

 ‧Code::Blocks (Linux, windows, mac)
 ‧Visual C++ 2005 Express (Windows XP sp2 only)
 ‧Turbo C++ Explorer (Windows)



◆ Open Source IDE

 ‧Dev-Cpp (Windows)
 ‧Open Watcom C/C++ (Windows)
 ‧WideStudio IDE (linux,mac,ms,solaris,freebsd)
  (配合Compiler是不錯的工具,比Code::Blocks還有彈性)
 ‧V IDE (work with g++, BCC5.5, Java)
 ‧aptana (ajax,php)
 ‧Bloodshed (c/c++, window)
 ‧Flat Assembler (bases on x86 & x86-64 CPU)
 ‧Anjuta C/C++ IDE (c/c++, Linux for GNOME)
 ‧Eclipse (java,cross platform)



◆ C/C++ Compilers

 ‧Scriptometer(評估各類語言、編譯器良莠)

 ‧Apple GCC (Xcode) (Mac OS X)
 ‧Borland C++ Compiler 5.5 (Win32)
 ‧Borland Turbo C++ 3.0 (MS DOS 16 bit)
 ‧Borland Turbo Pascal 7.0 (MS DOS 16 bit)
 ‧Ch (商業 C/C++ 編譯器)
 ‧DigitalMars C/C++ (Win32)
 ‧DJGPP (GCC 移植之32-bit DOS版,80386 以上CPU)
 ‧GNU GCC (incl. G77) (Linux)
 ‧GNU C Compiler (Cross Platfrom)
 ‧Intel C++ compiler (Win32)
 ‧LCC Compiler
 ‧LLVM Compiler Infrastructure
 ‧OpenWatcom (Win32)
 ‧OTCC - The smallest self compiling pseudo C compiler
 ‧MinGW GCC (incl. G77) (Win32)
 ‧Microsoft Visual C++ Toolkit 2003 (Win32)
 ‧Microsoft Visual C++ 2005 (Win32)
 ‧Small Device C Compiler (8051 and Zilog Z-80)
 ‧SmartEiffel - With TCC you can compile your Eiffel code faster
 ‧Tiny C Compiler



◆ Assembler

  TASM    Borland免費釋放。需有TC++3.0的TLINK.exe 來連結 .obj
NASM x86 assembler with Intel syntax
FASM another x86 assembler with Intel syntax
ALD Assembly Language Debugger
BASTARD Bastard Disassembly Environment
DUDE Despotic Unix Debugging Engine
LinIce SoftIce-like debugger for Linux
BIEW console hex viewer/editor with built-in disassembler
HTE viewer/editor/analyzer for text, binary, and executable files
OTCCELF tiny C compiler, generates a dynamically linked ELF file
UPX Ultimate Packer for eXecutables
Intel2gas converter between AT&T and Intel assembler syntax
A2I converter from AT&T to Intel assembler syntax
TA2AS converter from TASM to AT&T assembler syntax
SPARC ASM SPARC v8 assembler & disassembler
binutils as they are: gas, ld, ar, etc
  RosASM    ReactOS Assembler



◆ Free Interpreter/Tramslator

 ‧Ch, a commercial C/C++ interpreter
 ‧CIL - A C to C translator.



◆ Other Language Compilers
 ‧Digital Mars D Compiler (Win32, Linux)
 ‧GDC D Compiler



◆ Some Languages and Their Critic/Comparision

 ‧Lightweight C++
 ‧The D language
 ‧Cyclone, A Safe Dialect of C
 ‧C-- - An intermediate language for compilers

 ‧Languages comparisons
 ‧Programming in C (收集與C,C++相關標準的文件資料)



◆ Other Tools

 ‧The Scriptometer evaluates various scripting languages (including TCC).

Java Chips: The Hardware Solution

‧Java Chips: The Hardware Solution
1998/05

The Java virtual machine (JVM) isn't virtual anymore -- it's real. New Java chips can execute Java bytecode as their native machine language, making it unnecessary to interpret or compile the bytecode into some other CPU's machine language.

In theory, this could allow Java to run as fast as native code on other CPUs -- if Java chips were as powerful as other CPUs. In practice, most Java chi ps will be sub-$50 processors, because they're designed for network computers (NCs), TV set-top boxes, smartcards, and other embedded devices. Only one company, Sun Microelectronics, is known to be developing a high-end Java processor (ultraJava).

Nine companies are working on Java chips: Sun, NEC, IBM, Fujitsu, LG Semicon, Rockwell, Siemens, Patriot Scientific, and International Meta Systems (IMS). Seven of them (Sun, NEC, IBM, Fujitsu, LG Semicon, Rockwell, and Siemens) are designing their chips around Sun's picoJava core, which is available for licensing. Patriot modified an existing processor to run Java, and IMS is working on an independent design.

Sun plans to ship its first Java chip, the microJava 701, in the second half of this year. Later, Sun plans to introduce additional 700-series microJava chips, plus some lower-end 500-series and 300-series chips. For the high end, Sun is designing the ultraJava for 1999 or later. It's for graphics workstations and will compete against high-end CPUs of other architectures, says Harlan McGhan, technical marketing manager.

So far, nobody has shipped actual products with Java chips. Sun has announced the JavaBlaster, a $99 ISA card that turns old PCs into Java-based computers, but it won't appear until after the microJava 701 ships. Siemens is designing a picoJava-based smartcard. Rockwell might use its JEM1 chip in navigation and communications systems. Patriot has shipped more than two dozen development kits for its PSC1000.

Java chips aren't limited to running software written in Java, any more than other CPUs are. Programmers can use any high-level language that has a bytecode compiler. In fact, Sun is introducing C/C++ compilers that generate bytecode. The picoJava architecture defines about half a dozen extended bytecode instructions to support C/C++ and low-level hardware functions, such as memory writes, on-board cache control, access to control registers, and power-up/power-down diagnostics.

Is this heresy ? No, says Sun. Java chips must support those functions so developers can write OSes, device drivers, and other low-level programs. Regular Java can't do it because Java source compilers don't generate the extended bytecodes. Even if they did, the bytecode verifiers built into JVMs would reject the extended bytecodes as illegal. This preserves the safety of Java applications while permitting developers to write low-level system software for Java chips.

Patriot was the first company to demonstrate a working Java chip (November 1997). Instead of licensing Sun's picoJava core, Patriot took an existing Forth chip and reprogrammed the microcode to recognize bytecodes. The PSC1000 already had a stack architecture, because Forth, like Java, is a stack-oriented language. Patriot's PSC1000 costs less than $10 in volume.

Marc Tremblay, a chip architect at Sun, predicts that low-end Java chips based on the picoJava core will run Java about 20 times faster than interpreters running on a Pentium at the same clock frequency. Tremblay thinks the chips will deliver about five times as much performance as a just-in-time (JIT) compiler running on a Pentium.

Is that fast enough? By the time the chips come out, the best JIT compilers might deliver more performance on fast CPUs than low-end Java chips. However, that won't threaten the two most important markets for the chips: inexpensive devices that can't afford a Pentium-class CPU but still need to run Java at acceptable speeds and low-memory devices that lack the resources for a full-size JVM and a JIT compiler.

星期六, 8月 04, 2007

清單 - OS, Filesystem, Fonts

編輯


◆ 桌上型電腦、主機、平板電腦、小筆電

 ▲ OS Common News

  ‧2012/03/22 Mozilla 開發B2G(boot to Gecko架構的Web OS (連結)
  ‧2012/03/15 甲骨文Linux核心升級 搭配全新Btrfs檔案系統 (連結)
  ‧2010/12/22 未來的Windows將支援ARM (連結)
  ‧2010/11/04 Ubuntu 11.04之變動
  ‧2010/05/11 Linux基金會來台 推動硬體廠商採用MeeGo
  ‧2010/06/00 Google Chrome OS核爆震憾 英特爾將比微軟受更大衝擊
  ‧2007/07/24 Pyro Desktop: 建構在 Firefox 上的桌面環境
  ‧2007/07/24 10大 web OS
  ‧2007/07/24 在隨身碟上執行程式
  ‧2007/07/19 Intel Mac 多重開機 - OS X + WinXP + Linux
  ‧2007/07/13 網際網路是新的作業系統
  ‧2007/07/13 微軟「Cloud OS」初具雛形
  ‧2007/01/29 軟體是否能趕上多核心運算?
  ‧2005/08/23 微軟開發新作業系統 Singularity

  * Andy Tanenbaum 釋出 Minix 3 作業系統
  * Xcerion 開發出基於 XML 的 Internet 作業系統
  * Damn Small Linux 一點都不小!
  *Windwos Vista 七種版本大公開
  *JPC:以 Java 打造 x86 電腦



 ▲ OS Kernel Skills - PC & Server

  ‧2012/03/20 Linux 3.3核心整合Android程式碼 (增Open vSwitch, BTRFS)
  ‧2010/06/05 Linux核心邁向3.0 (主要改進驅動程式支援)
  ‧2007/07/21 Linux 核心 2.6.23 改進及Driver API
  ‧2007/06/06 解析Linux 核心歷史沿革
  ‧2007/02/01 Vista 監看處理序 CPU 使用量
  ‧2006/10/12 Linux 核心開始支援 real-time
  ‧2006/10/11 Linux 2.6 的 System Call:12 大類
  ‧2006/03/08 OS X 如何執行應用程式
  ‧2005/11/24 NICTA 開發 L4/Iguana 微核心內嵌式OS 技術

  * 微核心回來了?
  * NICTA 開發 L4/Iguana 微核心內嵌式OS 技術
  * 深入探索 Windows Vista 核心



 ▲ Filesystem - PC & Server

  ‧2007/06/06 ZFS將成為OS X預設檔案系統

  * IBM 推出超快速檔案系統
  * macfuse -- 搭起 Mac 與 NTFS 的橋樑
  * Linux 中完全開放原碼的 NTFS 支援 



 ▲ Fonts - PC & Server

  ‧2007/06/12 為何 Apple 上的字糊糊的?
  ‧2007/04/18 文字的可讀性:視覺容量定律 




◆ 手機、PDA、EDA

 ▲ OS Common News

  ‧2010/07/01 MeeGo正式釋出給開發社群
  ‧2010/06/28 英特爾 x86平台也支援Android OS 2.2
  ‧2010/06/18 微軟行動作業系統種類



.

清單 - BIOS 及 I/O

說明:與周邊有關的,放在「電腦周邊設備



◆ BIOS
 ‧2007/03/07 不到 2MB 擁有 X11 server 的 LinuxBIOS



◆ Chipset
 ‧Clock/Timer :2006/12/22 時脈及計時器驅動的原理和實現

輕點幾下滑鼠就能駭入 Gmail

‧輕點幾下滑鼠就能駭入 Gmail
Point and click Gmail hacking at Black Hat

http://www.tgdaily.com/content/view/33207/108/

By Humphrey Cheung / Thursday, August 02, 2007

Las Vegas (NV) -- 筆者收到一封 e-mail,上面說:"我喜歡羊," 不過那並非由筆者朋友寄來的信 -- 那是由一位裝成筆者朋友的駭客所送來的。在Black Hat 安全大會上,Robert Graham,Errata Security 的 CEO,在鏡頭上綁架了 Gmail session,並閱讀犧牲者的 e-mail 而震驚在場的人。他甚至更進一步親自示範攻擊我們這群人,奪下另一位新聞工作者的 Gmail 帳戶,然後送給我們喜歡羊的 e-mail。

這種攻擊相當簡單。首先,Graham 需能嗅探資料封包,我們的例子是在會場上一個開放的,滿足大家需求的 Wi-Fi 網路。他接著執行 Ferret,將所由在空氣中傳遞的 cookies 複製一份。最後,Graham 把這些 cookies 複製一份,利用自家生產的工具,稱為 Hamster,以輕點滑鼠的簡單方式放進他的瀏覽器中。

這種攻擊手法可綁架任何基於 cookie 之網站應用的 sessions,而且Graham 已經成功對付知名的 webmail,例如 Google 的 Gmail,微軟的Hotmail 與 Yahoo Mail。他強調,因為程式只用 cookies,他只需要 IP位址,而無須使用者名稱與密碼。

"我在我螢幕上看見 10 個人的 cookies,我只需要點一下這傢伙的 IP 位址,我就可以進入。一旦你取得某人的 Google 帳戶,你會對你所找到的東西感到驚訝," Graham 說。

Graham 在新聞室給我們第一手的攻擊示範。George Ou,ZDNet 的技術主管,及 Real World IT 的作者,英勇地自願成為犧牲者。他建立一個新的Gmail 帳號叫做getmehacked@gmail.com。Ou 登入 Black Hat 的無線網路,然後寄給筆者一封預言性的訊息,"嗨~ Humphrey,我要被綁架了。"

當 Ou 在打字時,Graham 執行 Ferret,然後嗅探所有從 Ou 筆電與Google 送出的 cookies。Graham 接著點選 Ou 的 IP 位址與 Gmail 網頁,連同 Ou 剛剛才送出的訊息就出現在螢幕上。

我們在那時候拍攝 Graham 與 Ou 的筆電,然後將它們擺到相簿中。你可以看見內容完全一樣。

讀取 e-mail 是一回事;傳送 e-mail 則更加刺激。Graham 打出一則短訊,"我喜歡羊" 然後送往我的帳戶。過一會兒後,我的 Outlook 跳出了那個訊息。真有趣,這則訊息亦出現在 Ou 的螢幕上。

如果這還不夠可怕,Graham 告訴我們,他可以在隔天,或甚至好幾天以後,登入 Gmail 帳戶。"我可把資料拷貝成檔案,然後稍後再玩一次。我已經能在一日之後登入 Gmail 的帳戶," Graham 說。

由於該攻擊依賴嗅探封包,使用 SSL 或某些類型的加密(如 VPN tunnel),將阻止 Graham 的追蹤。然而,許多人在公開的無線熱點瀏覽時,都不會使用這類保護。

"如果你使用 T-Mobile 熱點,你就是個笨蛋," Graham 說。

你可能認為 Graham 在測試他的工具時可能會有許多樂趣。畢竟,能夠毫髮無傷地讀取與傳送他人的 e-mai,就有足夠的權力以最高限度(roof)傳送給大部分的人(尤其在 Black Hat 的那些),不過 Graham 說那並不是這樣。

"我沒有太多樂趣,因為我通常無法送出如「我喜歡羊」這樣的 e-mail,"Graham 說。由於不想觸法,所以他的犧牲者通常是他的朋友或同事,不過對於即將到來的 Defcon Wi-Fi 網路,情況將會改觀。

"人們通常預期在 Defcon 上會被駭,所以我會在那裡開「轟」," Graham說。他還提到 Hamster 幾天後就會釋出。

※ 相關報導:

T-Mobile:免費讓你用Wi-Fi講電話
駭客攻破 iPhone 從 Wi-Fi 直接入侵
美軍研究可以自行設定的安全無線網路
Multi-gigabit 無線網路即將問世
Google 向供應商展示手機原型
IronKey 號稱最安全的隨身碟

外頻說明

‧外頻說明

外頻是CPU乃至整個計算機系統的基準頻率,單位是MHz(兆赫茲)。在早期的電腦中,內存與主板之間的同步運行的速度等於外頻,在這種方式下,可以理解為CPU外頻直接與內存相連通,實現兩者間的同步運行狀態。對於目前的計算機系統來說,兩者完全可以不相同,但是外頻的意義仍然存在,計算機系統中大多數的頻率都是在外頻的基礎上,乘以一定的倍數來實現,這個倍數可以是大於1的,也可以是小於1的。

說到處理器外頻,就要提到與之密切相關的兩個概念:倍頻與主頻,主頻就是CPU的時鐘頻率;倍頻即主頻與外頻之比的倍數。主頻、外頻、倍頻,其關係式:主頻=外頻×倍頻。

在486之前,CPU的主頻還處於一個較低的階段,CPU的主頻一般都等於外頻。而在486出現以後,由於CPU工作頻率不斷提高,而PC機的一些其他設備(如插卡、硬盤等)卻受到工藝的限制,不能承受更高的頻率,因此限制了CPU頻率的進一步提高。因此出現了倍頻技術,該技術能夠使CPU內部工作頻率變為外部頻率的倍數,從而通過提升倍頻而達到提升主頻的目的。倍頻技術就是使外部設備可以工作在一個較低外頻上,而CPU主頻是外頻的倍數。

在Pentium時代,CPU的外頻一般是60/66MHz,從Pentium Ⅱ 350開始,CPU外頻提高到100MHz,目前CPU外頻已經達到了200MHz。由於正常情況下外頻和內存總線頻率相同,所以當CPU外頻提高後,與內存之間的交換速度也相應得到了提高,對提高電腦整體運行速度影響較大。

外頻與前端總線(FSB)頻率很容易被混為一談。前端總線的速度指的是CPU和北橋芯片間總線的速度,更實質性的表示了CPU和外界數據傳輸的速度。而外頻的概念是建立在數字脈衝信號震盪速度基礎之上的,也就是說,100MHz外頻特指數字脈衝信號在每秒鐘震盪一萬萬次,它更多的影響了PCI及其他總線的頻率。之所以前端總線與外頻這兩個概念容易混淆,主要的原因是在以前的很長一段時間裡(主要是在Pentium 4出現之前和剛出現Pentium 4時),前端總線頻率與外頻是相同的,因此往往直接稱前端總線為外頻,最終造成這樣的誤會。隨著計算機技術的發展,人們發現前端總線頻率需要高於外頻,因此採用了QDR(Quad Date Rate)技術,或者其他類似的技術實現這個目的。這些技術的原理類似於AGP的2X或者4X,它們使得前端總線的頻率成為外頻的2倍、4倍甚至更高,從此之後前端總線和外頻的區別才開始被人們重視起來。

一個CPU默認的外頻只有一個,主板必須能支持這個外頻。因此在選購主板和CPU時必須注意這點,如果兩者不匹配,系統就無法工作。此外,現在CPU的倍頻很多已經被鎖定,所以超頻時經常需要超外頻。外頻改變後系統很多其他頻率也會改變,除了CPU主頻外,前端總線頻率、PCI等各種接口頻率,包括硬盤接口的頻率都會改變,都可能造成系統無法正常運行。當然有些主板可以提供鎖定各種接口頻率的功能,對成功超頻有很大幫助。超頻有風險,甚至會損壞計算機硬件。