$ echo "2015/07/27: 明日は晴れだ" | mecab -Oyomi | nkf -w --hiragana
2015/07/27: あしたははれだ
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
machine: | |
environment: | |
CRYSTAL_VERSION: "0.20.1" # Replace version to which you're using | |
PATH: "${PATH}:${HOME}/.crystal/bin" | |
CRYSTAL_URL: "https://github.com/crystal-lang/crystal/releases/download/${CRYSTAL_VERSION}/crystal-${CRYSTAL_VERSION}-1-linux-x86_64.tar.gz" | |
dependencies: | |
cache_directories: | |
- ~/.crystal | |
- lib | |
- .shards |
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 java.io.File | |
import language.experimental.macros | |
import scala.reflect.macros.Context | |
object Macros { | |
def LINE: Int = macro lineImpl | |
def lineImpl(c: Context): c.Expr[Int] = { | |
import c.universe._ |
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 scala.concurrent.duration.FiniteDuration | |
/** | |
* The email message sent to Actors in charge of delivering email | |
* | |
* @param subject the email subject | |
* @param recipient the recipient | |
* @param from the sender | |
* @param text alternative simple text | |
* @param html html body |
#MessagePackの文字列型追加において、Extended型を導入する提案
本提案は https://gist.github.com/frsyuki/5022569 https://gist.github.com/frsyuki/5022460 において提案された「バイナリ型」の構造に変更を施すものである。
##解決しようとする問題
- MessagePackへの拡張は今後行われないとしても、独自に拡張する提案が今後頻発しそう
- 拡張フォーマットは、既存のMessagePackに対して後方互換にならない(なりようがない)ため、相互運用性を損なう可能性が高い。これが問題
##提案する手法
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
// covariant functor | |
trait Functor[F[_]] { | |
def fmap[A, B](f: A => B): F[A] => F[B] | |
} | |
// contravariant functor | |
trait Contravariant[F[_]] { | |
def contramap[A, B](f: B => A): F[A] => F[B] | |
} |
NewerOlder