他の言語をある程度知っている人はこれを読めばD言語の基礎をマスターでき,D言語の氷山の一角くらいは知ることができると思います.対象バージョンはdmd 2.059です.
ASCIIかUTFしか受け付けません.それ以外の文字コードで書くとコンパイルエラーになります.
D言語のmainはCとは違い以下のようなシグネチャです.
| " Language: Colored CSS Color Preview | |
| " Maintainer: Niklas Hofer <niklas+vim@lanpartei.de> | |
| " URL: svn://lanpartei.de/vimrc/after/syntax/css.vim | |
| " Last Change: 2008 Feb 12 | |
| " Licence: No Warranties. Do whatever you want with this. But please tell me! | |
| " Version: 0.6 | |
| function! s:FGforBG(bg) | |
| " takes a 6hex color code and returns a matching color that is visible | |
| let pure = substitute(a:bg,'^#','','') |
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
rsync (Everyone seems to like -z, but it is much slower for me)
| /*! normalize.css v2.1.3 | MIT License | git.io/normalize */ | |
| /* ========================================================================== | |
| HTML5 display definitions | |
| ========================================================================== */ | |
| /** | |
| * Correct `block` display not defined in IE 8/9. | |
| */ |
| # 私が考える安全なプログラムを書くために必要なこと | |
| 今も昔も「入力によって挙動が大幅に変わるAPI」が世の中には多数存在していて、プログラマが本来意図した挙動と異なる動作を引き起こしている。 | |
| - ファイルを開こうとしたらコマンドを実行できてしまったり | |
| - CSSセレクタを書いてるつもりがHTMLタグを生成してしまったり | |
| - SELECT文を発行するつもりがDELETE文を発行できてしまったり | |
| こういったときに | |
| - 入力値検証をしないと危険になる |
| # Search shell history with peco: https://github.com/peco/peco | |
| # Adapted from: https://github.com/mooz/percol#zsh-history-search | |
| if which peco &> /dev/null; then | |
| function peco_select_history() { | |
| local tac | |
| (which gtac &> /dev/null && tac="gtac") || \ | |
| (which tac &> /dev/null && tac="tac") || \ | |
| tac="tail -r" | |
| BUFFER=$(fc -l -n 1 | eval $tac | \ | |
| peco --layout=bottom-up --query "$LBUFFER") |
| This diff is a modified version of a diff written by Arnis Lapsa. | |
| [ The original can be found here: https://gist.github.com/ArnisL/6156593 ] | |
| This diff adds support to tmux for 24-bit color CSI SRG sequences. This | |
| allows terminal based programs that take advantage of it (e.g., vim or | |
| emacs with https://gist.github.com/choppsv1/73d51cedd3e8ec72e1c1 patch) | |
| to display 16 million colors while running in tmux. | |
| The primary change I made was to support ":" as a delimeter as well |
| diff --git a/colour.c b/colour.c | |
| index a56ddce..8098f83 100644 | |
| --- a/colour.c | |
| +++ b/colour.c | |
| @@ -29,305 +29,85 @@ | |
| * of the 256 colour palette. | |
| */ | |
| -struct colour_rgb { | |
| - u_char i; |