Skip to content

Instantly share code, notes, and snippets.

@voluntas
voluntas / erlang.rst
Last active February 2, 2023 12:00
Erlang/OTP (仮)

Erlang/OTP (仮)

日時

2016-09-21

@voluntas

バージョン

1.0.1

url

https://voluntas.github.io/

2016 年 6 月 24 日に行われる BPStudy の発表資料です

anonymous
anonymous / distribute_setup.py
Created September 17, 2014 14:15
#!python
"""Bootstrap distribute installation
If you want to use setuptools in your package's setup.py, just include this
file in the same directory with it, and add this to the top of your setup.py::
from distribute_setup import use_setuptools
use_setuptools()
If you want to require a specific version of setuptools, set a download

型変数の部分適用のC#版

というほど大げさな話ではなく

public class Key<TKey>
{
    public Dictionary<TKey, TValue> CreateDictionary<TValue>()
    {
 return new Dictionary();
@gakuzzzz
gakuzzzz / 1_.md
Last active August 2, 2023 01:59
Scala の省略ルール早覚え

Scala の省略ルール早覚え

このルールさえ押さえておけば、読んでいるコードが省略記法を使っていてもほぼ読めるようになります。

メソッド定義

def concatAsString(a: Int, b: Int): String = {
  val a_ = a.toString();
  val b_ = b.toString();
@katzchang
katzchang / README.md
Last active September 28, 2022 13:42
Steve Freeman氏とのペアプロ雑感 #tddbc

Steve Freeman氏とのペアプロ雑感

http://tddbc.doorkeeper.jp TDD Boot Camp 2013-07 -- TDDBC で、偶然にもロンドンから来日していたSteve Freeman氏を招くことができた。ちなみに本当に偶然の来日で、その日の夕方にご家族と隅田川の花火を見る予定だったらしい。貴重な時間である。

20分ほど講演していただき、さらに参加者と一緒にペアプロ課題に挑戦してもらった。しかもペアプロでっていう貴重な体験をさせてもらったので、そのことについてまとめたい。

Steve Freeman氏は書籍 "Growing Object-Oriented Software, Guided by Tests" (邦訳「実戦テスト駆動開発」)の共著者の一人で、Javaのモックフレームワーク "JMock"の開発者の一人。当然、自動販売機の課題にもJMockを駆使してモデリングしていただくことになった。

Start from the outside

@koturn
koturn / lambda.c
Last active April 15, 2022 02:34
C言語におけるラムダを関数マクロで実現したものです。 GNU拡張文法(複文の式化、関数内の関数定義)を用いているので、gccでしか用いることができません。 また、トップレベルで用いることも不可能です。 C++でもコンパイルエラーにならないように、C++0xのラムダに変換するようにしています。 利便性を考え、ある程度の省略表記を許すようにしています。
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*!
* @brief GNU拡張機能を用いたラムダ関数を実現するマクロ
*
* gccもしくはC++0x対応コンパイラでのみコンパイル可能<br>
* トップレベルで用いることはできない
@kos59125
kos59125 / HttpStatus.fs
Last active December 14, 2015 00:59 — forked from Gab-km/HttpStatus.fs
type HttpStatus =
{ Code: string; Message: string }
override self.ToString () = sprintf "%s %s" self.Code self.Message
let httpStatus code message = { Code = code; Message = message }
let httpStatusList =[
httpStatus "100" "Continue";
httpStatus "101" "Switching Protocols";
httpStatus "102" "Processing";
@seratch
seratch / build.sbt
Created December 1, 2011 06:07
Scala School - Testing with specs2 examples
organization := "net.seratch"
name := "sandbox"
version := "0.1"
scalaVersion := "2.9.1"
libraryDependencies ++= Seq(
"junit" % "junit" % "4.9" withSources(),
@bleis-tift
bleis-tift / Program.fs
Created May 3, 2011 03:19
F#で文字列をeval
open Microsoft.FSharp.Compiler.CodeDom
open System.Reflection
open System.CodeDom.Compiler
type EvalResult<'a> =
| CompileError of string seq
| RuntimeError of exn
| Success of 'a
let eval args expr =