Skip to content

Instantly share code, notes, and snippets.

View mzp's full-sized avatar

Hiro Mizuno mzp

View GitHub Profile
_require "basis.smi"
Inductive Term : Set :=
| T
| F
| TIf (_ : Term) (_ : Term) (_ : Term).
Inductive Step : Term -> Term -> Prop :=
| EIfTrue : forall (t1 t2 : Term), Step (TIf T t1 t2) t1
| EIfFalse : forall (t1 t2 : Term), Step (TIf F t1 t2) t2
| EIf : forall (t1 t1' t2 t3 : Term), Step t1 t1' -> Step (TIf t1 t2 t3) (TIf t1' t2 t3).
@mzp
mzp / Sf.v
Last active August 29, 2015 14:04
(* compile with Coq 8.4pl2 *)
Fixpoint evenb (n:nat) : bool :=
match n with
| O => true
| S O => false
| S (S n') => evenb n'
end.
Definition negb (b:bool) : bool :=
match b with
@mzp
mzp / gist:ebbd01613736beda61bd
Last active August 29, 2015 14:13
SML# contrib.md

目標

see: https://github.com/bleis-tift/SmlSharpContrib

SML#のライブラリが足りないのでなんとかしたい。

方針(検討中)

  • こったライブラリにはしない
  • 適当なCライブラリの薄いラッパにする
  • メソッドはすべて移植する(よっぽど不要なやつは省く?)
@mzp
mzp / abst.md
Created January 11, 2015 14:12
浜松Ruby会議01-アブストラクト
  • 名前: mzp
  • 所属/肩書き: スタンドファーム株式会社
  • URL: http://mzp.hatenablog.com/
  • twitter: @mzp
  • タイトル: Rubylistのための型入門(仮)
  • 内容: かつて、RubyはJava/C++といった静的型付き言語を仮想敵として、LL陣営は大きな盛り上りをみせました。それから10ウン年、Scala/F#/Swiftといった静的型付き言語が台頭してきています。これらの言語はかつての静的型付き言語とはどう違うのか、またどのように使いわけるのがよいのかについて主観的に語ります。
@mzp
mzp / abc.xml
Created October 28, 2008 12:55
<Action3 minorVersion="16" majorVersion="46">
<constants>
<Constants>
<ints/>
<uints/>
<doubles/>
<strings>
<String2 value=""/>
<String2 value="Hello"/>
<String2 value="Hello,world!!"/>
@mzp
mzp / gist:27341
Created November 21, 2008 03:51
CrossFire for GM
// ==UserScript==
// @name opera focus imitation
// @namespace
// @description this script imitate focus on opera by shift + cursor key
// @include *
// ==/UserScript==
// 問題:位置取得の効率が悪すぎる
// 要素が重なっていると隣の要素として判定ができない
// iframe 内には入れない、または出れない
window.addEventListener('load',function(){
@mzp
mzp / dm-noconfirm.user.js
Created February 11, 2009 00:14
Disable confirm dialog at DokusyoMeter(http://book.akahoshitakuya.com/)
// ==UserScript==
// @name Dokusyo meter no confirm
// @namespace http://d.hatena.ne.jp/mzp/
// @description Disable dokusyo meter confirm
// @include http://book.akahoshitakuya.com/b/*
// ==/UserScript==
function del(){
return true;
}
function add(){
@mzp
mzp / toggle-scala.el
Created March 1, 2009 06:35
Toggle between test and implementation files for scala project by Maven2
;;; toggle-scala.el --- Toggle between test and implementation files.
;; Author: MIZUNO Hiroki<mzp.ppp_at_gmail.com>
;; Keywords: tools
;;; Usage:
;; Insert into your .emacs file the following line, (and eval it for
;; immediate usage:
;;
;; (require 'toggle-scala)
type 'a t = {
front: 'a list;
back : 'a list
}
exception Empty
let empty = {front = []; back = []}
let is_empty x = x = empty