Skip to content

Instantly share code, notes, and snippets.

View aiya000's full-sized avatar
🐶
Inu

aiya000 aiya000

🐶
Inu
View GitHub Profile
@xuwei-k
xuwei-k / Higher-Rank-Polymorphism-in-Scala.md
Created August 9, 2012 02:09
Higher-Rank Polymorphism in Scala

原文: http://apocalisp.wordpress.com/2010/07/02/higher-rank-polymorphism-in-scala/ 訳者は英語得意ではなく、訳が怪しいところがあるとおもうので、間違いやつっこみがあれば、ここのコメント欄に記入なりなんなり指摘お待ちしてます。

Scalaでの高ランクポリモーフィズム (Higher-Rank Polymorphism in Scala)

Tim Carstens のポスト Haskell features he’d like to see in other languages をよんで、そのなかの一つにrank-2 typesというものがありました。 Tim は、これ(rank-2 type)を使ったキラーアプリケーションとして、型システムを利用して、リソースへのアクセスの安全性を確保するといいます。

@tonymorris
tonymorris / Lens.cs
Created August 5, 2012 05:43
Lens library for C# (demonstration)
using System;
using System.Collections;
using System.Collections.Generic;
/*
A basic lens library for the purpose of demonstration.
Implements a lens as the costate comonad coalgebra.
This library is not complete.
A more complete lens library would take from
@ponkore
ponkore / memo.sh
Created August 3, 2012 05:19
github上でgithubにフォークしたリモートリポジトリを本家リモートリポジトリに追随する
# http://d.hatena.ne.jp/haru-s/20110405/1302006637 に答えがそのままあるが、一応メモ
# github fork 追従 で見つけた
$ git remote
origin
# 本家のリモートリポジトリの短縮名を登録する.
$ git remote add github git://github.com/liquidz/misaki.git
# 本家の更新をローカルで反映させる.
@shokai
shokai / gsay
Created June 8, 2012 01:52
Mac/Linuxでsay(喋らせる)系コマンド
#!/bin/sh
TMP=/tmp/gsay.mp3
curl --silent --user-agent "Safari/1.0" "http://translate.google.com/translate_tts?q=$1&tl=ja" > $TMP && afplay $TMP && rm -f $TMP
@theconektd
theconektd / github.css
Created April 30, 2012 02:11
Github Markdown CSS - for Markdown Editor Preview
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
@andrewrcollins
andrewrcollins / trim.awk
Created January 11, 2012 04:22
ltrim(), rtrim(), and trim() in awk
function ltrim(s) { sub(/^[ \t\r\n]+/, "", s); return s }
function rtrim(s) { sub(/[ \t\r\n]+$/, "", s); return s }
function trim(s) { return rtrim(ltrim(s)); }
BEGIN {
# whatever
}
{
# whatever
}
END {