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
; llvm-as adaexn.ll && llvm-ld -native adaexn.bc -L`gcc -print-libgcc-file-name | xargs dirname`/adalib -lgnat && ./a.out | |
; LLVM primitives | |
declare i8* @llvm.eh.exception() nounwind readonly | |
declare i32 @llvm.eh.selector(i8*, i8*, ...) nounwind | |
declare i32 @llvm.eh.typeid.for(i8*) nounwind | |
; libgcc | |
declare void @_Unwind_Resume(i8*) |
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
type token = T_w | T_W | T_v | EOF;; | |
let rec scan s i = ( | |
let length = String.length s in | |
if i >= length then length, EOF else | |
match s.[i] with | |
| 'W' -> i + 1, T_W | |
| 'w' -> i + 1, T_w | |
| 'v' -> i + 1, T_v | |
| '\xef' -> (* W : EF BC B7, v : EF BD 96, w : EF BD 97 *) |
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
# This gist contains Ada version of Boost.Context and test. | |
/asm | |
/build | |
/b~* | |
/*.o | |
/import | |
/test_context |
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
type 'a with_name = [`named of 'a];; | |
type function_type = [`function_type of all_type] | |
and all_type = [ | |
| `void | |
| `function_type of all_type] | |
and named_var = [ | |
| `extern of all_type | |
| `function_forward of function_type | |
| `defined_expression of expression] |
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
- - | |
-- ― | |
―- ― ― | |
~ ~ | |
・< ・・ | |
・・< … | |
・- ← | |
さ- ↓ | |
^- ↑ | |
-> → |
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
function alloc return access lifetime.T is | |
begin | |
return new lifetime.T'(lifetime.Create); | |
-- lifetime.Finalize may be called here | |
end alloc; |
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
--- Homebrew/Cellar/git/1.8.2/libexec/git-core/git-stash.orig 2013-03-23 06:07:23.000000000 +0900 | |
+++ bin/git-mystash 2013-05-27 14:40:09.000000000 +0900 | |
@@ -34,9 +34,17 @@ | |
fi | |
no_changes () { | |
- git diff-index --quiet --cached HEAD --ignore-submodules -- && | |
- git diff-files --quiet --ignore-submodules && | |
- (test -z "$untracked" || test -z "$(untracked_files)") | |
+ keep_index="$1" # 引数追加 |
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
function _escape_path { | |
sed 's/ /\\ /g' | sed 's/(/\\(/g' | sed 's/)/\\)/g' | sed 's/\$/\\$/g' | |
} | |
function complete_pushd { | |
local cur | |
cur=${COMP_WORDS[COMP_CWORD]} | |
if [ `expr "x${cur}" : 'x+'` != 0 ]; then | |
IFS=$'\n' COMPREPLY=( $(compgen -W "$(dirs -v | head -n 10 | sed 's/^ */+/' )" -- $cur ) ) | |
elif [ `expr "x${cur}" : 'x-'` != 0 ]; then |
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
-- BBAutoComplete.scptを編集する | |
... | |
on makeAlsoTexts() | |
tell application "TextWrangler" | |
set theResult to {} | |
-- this will include the first document from window 1, but that's OK | |
repeat with w in windows | |
... |
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
with Ada.Text_IO; | |
with Interfaces.C.Strings; | |
with GNAT.CPP_Exceptions; | |
procedure cppexc is | |
pragma Linker_Options ("-lstdc++"); | |
use type Interfaces.C.char_array; | |
char_const_ptr : exception; | |
pragma Import (Cpp, char_const_ptr, "_ZTIPKc"); -- typeid(char const *) | |
begin | |
Ada.Text_IO.Put_Line ("throw..."); |