- stack machine
- 1 word = 8 bit
- instruction length = 1 word
- variable CPI(clocks per instruction)
- stack operation -> 1 clock
- immediate operation -> 2 clocks
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
set nocompatible | |
"--------------------------------------------------------------------------- | |
" 検索の挙動に関する設定: | |
" | |
" 検索時に大文字小文字を無視 (noignorecase:無視しない) | |
set ignorecase | |
" 大文字小文字の両方が含まれている場合は大文字小文字を区別 | |
set smartcase |
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
import std.typecons; | |
import std.traits; | |
import std.stdio; | |
auto tupleAccumlate(Func,First,Types...)(Func func,First first,Types args){ | |
static if(args.length > 0){ | |
return tupleAccumlate(func,func(first,args[0]),args[1..$]); | |
} | |
else{ |
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
// ==UserScript== | |
// @name Into Wandbox | |
// @namespace https://twitter.com/__pandaman64__ | |
// @include * | |
// ==/UserScript== | |
(function(){ | |
function into_wandbox(str){ | |
//Remove NBSPs | |
var new_str = str.replace(/\u00A0/gi, ' '); | |
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
#include <type_traits> | |
#include <tuple> | |
#include <cstddef> | |
#include <string> | |
#include <iostream> | |
template<std::size_t ...Indices> | |
struct index_tuple{ | |
constexpr index_tuple(){} | |
constexpr static index_tuple make(){ |
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
#include <type_traits> | |
#include <tuple> | |
#include <cstddef> | |
#include <string> | |
#include <iostream> | |
template<std::size_t ...Indices> | |
struct index_tuple{ | |
constexpr index_tuple(){} | |
constexpr static index_tuple make(){ |
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
// '\'はPEGの分岐,'?'はオプショナル, '*'は0回以上の繰り返し | |
Expr := LetRec \ Let \ If \ Literal \ Apply \ Identifier | |
LetRec := "let rec" Identifier Identifier? "=" Expr "in" Expr | |
Let := "let" Identifier Identifier? "=" Expr "in" Expr | |
If := "if" Expr "then" Expr "else" Expr | |
Literal := ライブラリの整数パースする奴使ってる | |
Apply := Value Value* | |
Value := "(" Expr ")" \ Primitive | |
Primitive := LetRec \ Let \ If \ Literal \ Ident // <- Apply := Expr Expr* ってするとApplyが左再帰するのでこんなんやってる | |
Identifier := [a-zA-Z] [a-zA-Z0-9!?]* (但し予約語ではない) |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDwkeLXbdy+pMEtzZ2DiL3jRHWcpsmauAreUBiBYkh0nIbKimFXK45x0t+P7iGi0IUHzKsaseiPCUYBTlljtz/AJRS57E3FiA91foqUWagotIS9+PYbHd9fpoykdc3hZK7g9wLtNQihLERKRi/xfMIbgD5rfnNyK9Xs7owwW5b2DqNUWpbxGgiY5mywRsbQ7c+qFX8W2aAv4Yib5TTNRHaCANGXt9vRJTF7/WwMVydF/1lEIW6RgsJDMOSmJLpFVpIE28x+N1OJZcIWEdB/i4HtXAhPo9M0pWjsxji2FQkb6X1qJSVZTD+cXvoznlQozSDyMvQKuGNToWPZ/zeJCQZNKfqn3kxnsXuoJbbrgE/uE8enTD+nlpuRW+rg1FpeQBIDN5LIklAhlGJJAQVoXhIX/G4tS/cywBPQcxUFowJkKhevKKDVupvBJIxs4PEkPXO7AzRY3261Rbnekg5mym8DM15G50N92wFeBAA09JzuweHxkfZ+a2MdaQB2MKzAbUVaYn04Dw5M4W3O/OnfvG6FwDy6ucTSl/asYqoH6YooURh2gZ8QnD3XkWk4rcGccfEZlFZE0cxyK52MbmDMUrwL8PN161glExQdp2DUVhaRcRQAQpX65v0PDctIKmoAdzYT/QSxv4TE43reNyCFeJIaGxKsWieUSDpUsd0jx8Afmw== panlap@pan-laptop |
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
L4: | |
MV r2,r6 | |
MV r1,r6 | |
ADDI r1,128 | |
ST r1,r2 | |
ADDI r6,128 | |
MV r1,r4 | |
MV r0,r0 | |
ST r1,r0 | |
MV r0,r4 |
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
"dein Scripts----------------------------- | |
if &compatible | |
set nocompatible " Be iMproved | |
endif | |
" Required: | |
set runtimepath+=/home/pan/.vim/bundles/repos/github.com/Shougo/dein.vim | |
" Required: | |
if dein#load_state('/home/pan/.vim/bundles') |
OlderNewer