Skip to content

Instantly share code, notes, and snippets.

View umegaya's full-sized avatar

iyatomi takehiro umegaya

View GitHub Profile
@umegaya
umegaya / gist:1818228
Created February 13, 2012 16:55
@uupaa msgpack.js: modification to unpack buffer which has multiple message pack records
[iyatomi@localhost msgpack]$ diff _msgpack.js msgpack.js
63c63
< // @return Mix/undefined/null:
---
> // @return Mix/undefined:
65d64
< // null means buffer exhausted
69,75c68,69
< if (data != null) {
< _buf = typeof data === "string" ? toByteArray(data) : data;
@umegaya
umegaya / gist:2270062
Created April 1, 2012 00:36
shiritori database (last character of word == first character of next word)
var pg = require('pg');
var async = require('async');
exports.DB_ERROR = 1;
exports.SAME_USER_CONTINUE = 2;
exports.WORD_NOT_CONTINUE = 3;
exports.RECORD_NOT_FOUND = 4;
exports.INVALID_URL_PARAM = 5;
@umegaya
umegaya / tlc.lua
Created July 31, 2012 09:23 — forked from seclorum/tlc.lua
LuaJIT ObjC bridge
-- TLC - The Tiny Lua Cocoa bridge
-- Note: Only tested on x86_64 with OS X >=10.7.3 & iPhone 4 with iOS 5
-- Copyright (c) 2012, Fjölnir Ásgeirsson
-- Permission to use, copy, modify, and/or distribute this software for any
-- purpose with or without fee is hereby granted, provided that the above
-- copyright notice and this permission notice appear in all copies.
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
@umegaya
umegaya / gist:3235433
Created August 2, 2012 08:30
Lua: hot topics

Lua - hot features and topics

Agenda

Luaの仕様

  • metatable
  • environment
  • upvalue (と closure)
@umegaya
umegaya / gist:3246882
Created August 3, 2012 11:43
yue emit sketch
int signal::operator () (int signo) {
event::signal ev = { signo };
emit(ev);
}
struct emittable {
struct wait : public callable {
static int init(VM vm) { return callable::init<wait>(vm); }
static int call(VM vm);
};
@umegaya
umegaya / gist:3258856
Created August 4, 2012 17:25
yueチラシの裏
socketpairを使えば双方向で書き込めるのでpopen://を改善できるかも
オブジェクトが無効になるタイミング:
signal: never
timer: timer:close()呼んだあと
session: session:close()呼んだあと
listener: never
filesystem: filesystem:close()のあと(inotify base)
@umegaya
umegaya / gist:4186516
Created December 2, 2012 01:54
yue: brand-new server frame work for real time stateful network application with complex system

yue: brand-new server frame work for real time statefull network application with complex system

Agenda

  • Motivation
  • Problem
  • Approach
  • Feature
  • Implementation
  • Future

ゲームのインフラの作成

  • まずゲームの仕様以外に最低でも以下の機能の実装が必要
  • payment
  • SNS connect (facebook or line)
  • push notification
  • 2dメインのフレームワークではmoai SDKを使えばある程度実装されている(line connect的なものは除く)
  • push notificationはそのままであればmoai cloudを使う必要がある。売れたら自前で実装し直すことになるかもしれない
  • 3dメインのフレームワークでは実装されているものはない
  • 今回はmoai SDKで行く(3Dもたぶんサポートされていくはず)
  • paymentのサーバー側は必要
1. install そのもの
windows7がわからhddの容量を減らしてそこにubuntuをインストールする場合、
usbでインストールする場合に、既存のOSと共存するを絵欄でインストールすると、usbドライブにブートイメージがインストールされてしまって立ち上がらないことがあるので注意。
2. install後
rhythmboxはmp3やm4aをデコードするアドオンがないので注意。ubuntu software centerからインストールできる
virtualboxはkernel sourceをインストールしてから( sudo apt-get install linux-headers-`uname -r`)
sudo /etc/init.d/vboxdrv setup
しないと、hddがインポートできない
android SDKは64bit OSだと adbなどが「そのようなファイルやディレクトリはありません」というエラーで失敗するので sudo apt-get install ia32-libsで32ビット用のプログラムを動かす環境をインストールする
@umegaya
umegaya / gist:4700105
Last active December 12, 2015 02:38
plumvalley algorithm manifest

plumvalley algorithm manifesto

our mission

「luaという言語で、分散コンピューティングを趣味として楽しめるようなフレームワークを作ることで、人々の創造性を最大限引き出し、増幅させる」

luaという言語で、分散コンピューティングを趣味として楽しめるようなフレームワークを作ることで、人々の創造性を最大限引き出し、増幅させる」