Skip to content

Instantly share code, notes, and snippets.

View methane's full-sized avatar

Inada Naoki methane

  • KLab Inc,
  • Japan
  • 06:41 (UTC +09:00)
  • X @methane
View GitHub Profile
# GCEでUbuntu 15.04
sudo su -
apt-get update && apt-get -y install ansible jq
git clone https://github.com/isucon/isucon5-qualify.git
cd isucon5-qualify/
cd gcp/bench/ansible/
sed -i 's/- copy/#- copy/' 00_devel.yml
sed -i 's@key_file=.*@@' 06_deploy_bench_tool.yml
sed -i 's@repo=.*@repo=https://github.com/isucon/isucon5-qualify.git@' 06_deploy_bench_tool.yml

msgpackの変更案について

概要:

  • 現行のRaw型をString型として読み替える。
  • Binary型を新設する。
  • 明らかなバイナリはデフォルトでBinary型(新設型)で保存

型システムの変更

  • Binary: バイト列

msgpackの変更案について-3

概要:

  • 現行のRaw型をString型として読み替える。
    • 現行の FixRaw, raw 16, raw 32 は、FixString, string 16, string 32 になる
  • Binary型を新設する。
  • バイト列はBinary型で保存する。そうでなければString型で保存する。

背景

3からの差分:

  • 実装の後方互換性に関する記述を修正
  • 各実装へのリンクを追加
  • 背景にNoteを追加
  • 「UTF-8としてinvalidなバイトシーケンスを含む文字列が保存されていることがある」理由の修正
  • 概要から「バイト列はBinary型で保存する。そうでなければString型で保存する」を削除(背景と型システムの詳細を読んでもらう)
  • weak-string languages のシリアライザのところで、「String型はUTF-8としてinvalidなバイトシーケンスを許容する」の注釈を削除

msgpackの変更案について-4

@frsyuki
frsyuki / m5.md
Last active December 14, 2015 18:09

msgpackの変更案について-5

提案の目的

  • 互換性の影響を最小限にしつつ、文字列を透過的に扱えるようにする方法を提供する
  • MessagePackから分離された上位レイヤーが、MessagePackの仕様に変更を加えずに、独自の型を定義できるようにする
  • 将来的にMessagePackに新たな機能が追加されても、既存のコードに影響を与えないようにする

概要

package main
import (
"labix.org/v1/pipe"
"log"
)
func main() {
output, err := pipe.CombinedOutput(
pipe.Line(
##
## Syntax
##
# Define a type:
#
# <MessageName>:
# <fieldIndex>: [<fieldName>, <type>, <options...>]
# ...
#
# Typedef (type alias):
@nobonobo
nobonobo / makecert.sh
Last active September 29, 2016 07:30
1行でオレオレ証明書を作る
go run $(go env GOROOT)/src/crypto/tls/generate_cert.go --host localhost
@cjerdonek
cjerdonek / .bashrc
Created November 21, 2013 15:30
A snippet to automatically call virtualenvwrapper's "workon" command when entering a directory in the shell. This can be added to your .profile, .bash_profile, .bashrc, etc.
# Call virtualenvwrapper's "workon" if .venv exists. This is modified from--
# http://justinlilly.com/python/virtualenv_wrapper_helper.html
# which is linked from--
# http://virtualenvwrapper.readthedocs.org/en/latest/tips.html#automatically-run-workon-when-entering-a-directory
check_virtualenv() {
if [ -e .venv ]; then
env=`cat .venv`
echo "Found .venv in directory. Calling: workon ${env}"
workon $env
fi
@untitaker
untitaker / gist:5321447
Last active January 15, 2017 18:13
Werkzeug Python 3 notes