Skip to content

Instantly share code, notes, and snippets.

View takahisa's full-sized avatar

Takahisa Watanabe takahisa

  • Cybozu, Inc
  • Tokyo, Japan
View GitHub Profile
#include <Matrix.h>
#include <Sprite.h>
const int censorPin = 1;
Matrix mtx = Matrix(10, 12, 11);
void setup() {
pinMode(censorPin, INPUT);
.intel_syntax noprefix
.text
.align 4
.global main
main:
mov eax, 1
mov ebx, 2
@takahisa
takahisa / gist:4010551
Created November 4, 2012 06:20
Coqで加算の可換性の証明
Lemma plus_a_0 : forall n : nat, n + 0 = n.
Proof.
intros.
induction n.
simpl.
reflexivity.
simpl.
rewrite IHn.
reflexivity.
Qed.
Couldn't match expected type `ClockTime'
with actual type `time-1.4:Data.Time.Clock.UTC.UTCTime'
In the first argument of `isObsolete', namely `timeStamp'
In a stmt of a 'do' block: isObsolete timeStamp depends
In the expression:
do { timeStamp <- getModificationTime file;
isObsolete timeStamp depends }
@takahisa
takahisa / gist:3859029
Created October 9, 2012 14:06
imagine the future. ノムリッシュ翻訳版
件の峰に 異界の渦パンデモニウムも
二度とない現世(現時代《いま》)を かたちにして
神に見放された断罪者は――神は如何様にして 彷徨いながらも我らの
聖域(ここ)に来た意味も
君は見たか 果ては振り向き
君は視たか そっと我らに告げる
Imagine the future
We shall go together
fact(N) :- N > 0 | N * fact(N-1) ;
fact(0) :- true | 0 ;
----
ldobj
ldobj
== fact/1 ======
stloc
ldc.i4
public partial class Tokenizer
{
static Tokenizer()
{
var space = Chars.OneOf('\u0020', '\u0009', '\u000a', '\u000d');
var newline = Combinator.Choice(
Chars.Sequence("\r\n"),
Chars.Sequence("\r"),
Chars.Sequence("\n"));
static Continuation<Unit,Unit> Write(String s){
return k => {
Console.WriteLine(s);
return k(Unit.Instance);
};
}
static void Main(String[] args){
public static Parser<TToken, IEnumerable<TResult>> Sequence<TToken, TResult>(
IEnumerable<Parser<TToken, TResult>> parsers)
{
if (parsers == null)
throw new ArgumentNullException("parsers");
return stream =>
{
try
{

Ioでブログシステム的なものが作りたかった

##今回使おうとしたIo向けのフレームワーク

  • Iota