基礎知識
読み物系
基礎知識
読み物系
| #!/usr/bin/env perl | |
| =head1 Examples | |
| $ tail -f access_log | perl colorize.pl | |
| $ plackup app.psgi 2>&1 | perl colorize.pl | |
| =cut | |
| use strict; |
| scriptencoding utf-8 | |
| let url = 'http://www.tepco.co.jp' | |
| let indexj = '/cc/press/index-j.html' | |
| let res = webapi#http#get(url.indexj) | |
| if res.header[0] != 'HTTP/1.1 200 OK' | |
| echo 'Oops! Something wrong.' | |
| endif | |
| let data = iconv(res.content, 'utf-8', &encoding) | |
| let dom = webapi#html#parse(data) |
| {-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-} | |
| ----------------------------------------------------------------------------- | |
| -- | | |
| -- Module : XMonad.Layout.YojouHan | |
| -- Copyright : anekos 2012 | |
| -- License : BSD3 | |
| -- | |
| -- Maintainer : anekos |
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs
| from types import FunctionType | |
| def percol_specialkey_replace(fn): | |
| def decofn(self, key): | |
| if len(key) > 2 and key[0] == "<" and key[-1] == ">": | |
| key = key[1:-1] | |
| return fn(self, key) | |
| return decofn | |
| class ChainMap(object): |
| 原文: | http://www.sdtimes.com/link/36534 |
|---|---|
| 著者: | Larry O'Brien |
僕は関数型プログラミングが好きだ。次の10年にかけてコードの革命を起こしていくだろうと考えている:言語はより関数型の機能を採用していくだろうし、開発者はより関数型の技術を導入していくだろうし、いくつかの点では、関数型プログラミングの原則はコードを組み立てていく上で「自然で」もっとも明確なやり方だとみんな考えるようになっていくだろう。
だけど、僕はもうこのシナリオを本気にしちゃいない。関数型プログラミングは、ワクワクするものを学ぶことに興味があると言っている主流のプログラマにとって明白な、大きな問題を抱えている:関数型プログラマーは自惚れ野郎どもだってことだ。
| > perl -E 'say "生" & "死"' | |
| 愛 | |
| 生 Life U+751F \xe7\x94\x9f 11100111 10010100 10011111 | |
| 死 Death U+6B7B \xe6\xad\xbb 11100110 10101101 10111011 | |
| 愛 Love u+611B \xe6\x84\x9b 11100110 10000100 10011011 |
| 127.0.0.1 send.microad.jp | |
| 127.0.0.1 adf.send.microad.jp | |
| 127.0.0.1 dsp.send.microad.jp | |
| 127.0.0.1 track.send.microad.jp | |
| 127.0.0.1 vsc.send.microad.jp | |
| 127.0.0.1 cache.send.microad.jp | |
| 127.0.0.1 d-cache.send.microad.jp |
| " コマンド | |
| :echo commands.get('コマンド名').action | |
| " マッピング | |
| :echo mappings.get(modes.NORMAL, '<C-n>').action |