あるクラスまたはモジュールで定義された定数を外部から参照する ためには
::'演算子を用います。またObjectクラスで 定義されている定数(トップレベルの定数と言う)を確実に参照する ためには左辺無しの
::'演算子が使えます。 例:module M I = 35 class C end end p M::I #=> 35 p M::C #=> M::C
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define __environment _CbC_environment | |
#define __return _CbC_return | |
#include <stdio.h> | |
typedef __code(*main_ret_code_t)(int, void *env); | |
__code fizzbuzz(int n, int max, main_ret_code_t ret, void *env); | |
__code fizz(int n, int max, main_ret_code_t ret, void *env); | |
__code buzz(int n, int max, const char *fizz, main_ret_code_t ret, void *env); |
LLVMのなかみ (LLVM internals)
基本的にLLVMContextがthread context情報を持っていてModuleが各モジュールを表す。 IR生成時は例えばグローバル変数の生成のような各モジュールに関連付ける必要のある操作ではModuleを渡して操作。またIR生成は最初にllvm::BasicBlockを作ってbuilder.SetInsertPointでBasicBlockを設定する事で、指定されたBasicBlockから命令挿入が始まる。 このようなBasicBlockはコンテキストLLVMContextを指定して生成、関連付け。
#0 ディレクトリ構成 lib/
- CodeGen: IR->マシン非依存データ郡(MachineInstr...)への変換
- Target/X86: ネイティブへの変換(アーキテクチャ依存部)
- Raftという分散合意アルゴリズムの紹介
- 論文: In Search of an Understandable Consensus ALgorithm (Extended Version)
- Raft三日目くらいの人が自分の理解をもとに(適当に)書いています
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Perl ワンライナーサンプル集 | |
■概要 | |
障害解析のためのログの調査、非互換対応でのソースコードの調査といった | |
テキスト処理で使った Perl ワンライナーのサンプル集です。 | |
Perl ワンライナーは以下の点が良いと思います。 | |
・Perl は Oracle Database (10g以降) に同梱されている。 | |
従って、Windows プラットフォームでも使える。 |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)