Skip to content

Instantly share code, notes, and snippets.

View keizo042's full-sized avatar

Koichi Nakanishi keizo042

  • japanese company
  • Japan
View GitHub Profile
import Data.Char
main :: IO ()
main = print $ foldl1 (+) ( map ord ['\NUL'..'\n'])
@keizo042
keizo042 / ann.md
Last active August 29, 2015 14:23
関数型言語勉強会 in 飯塚 草案

飯塚版関数型言語勉強会Vol.1

今や、よく目にする関数型言語と言う言葉。実際、どういうものなの? 関数型言語つかってみたんだけどわけわかんない! なんどやっても挫折するけど今度こそ! 関数型言語を使う同士達よ集まれ! みたいな勉強会です。

====================================

今回メンバー構成

@keizo042
keizo042 / args_test.c
Last active February 2, 2016 13:17
mrubyでblockを取り回したい、そのいち
#include <stdio.h>
#include <stdlib.h>
#include "mruby.h"
#include "mruby/compile.h"
mrb_value mrb_f(mrb_state *mrb,mrb_value self)
{
mrb_value v;
@keizo042
keizo042 / gist:4fe869a9529e665671fc
Created February 8, 2016 17:37
twitterのお遊び 帰れまてん回答
好きなアニメ当てるまで帰れま10
ガンスリンガーガール
キューティクル探偵因幡
ラストエグザイル
未確認で進行形
ダンタリアンの書架
人類は衰退しました
神さまのいない日曜日
サカサマのパテマ
流星のロックマン
@keizo042
keizo042 / vmod_mruby.rb
Created February 12, 2016 13:48
vmod_mruby try to struct DSL
Varnish::VCL.init(something) do
VCL.return VCL::OK
end
Varnish::VCL.pass(something)do
end
Varnish::VCL.deliver() do
end
Varnish:VCL.ban() do
@keizo042
keizo042 / DSL.rb
Last active February 17, 2016 03:37
class VCL
attr_accessor :resp, :beresp, :req, :bereq, :import, :obj, :client
def initialize
@resp = nil
@beresp = nil
@req = nil
@bereq = VCL::HTTP.new
@import = nil
r = Resolv.new
addr = r.getaddress "google.com"
puts r.getname addr
puts r.getnames addr
@keizo042
keizo042 / vcl.c
Last active March 12, 2016 04:41
/* ---===### include/vdef.h ###===--- */
/*-
* Copyright (c) 2006 Verdens Gang AS
* Copyright (c) 2012 Fastly Inc
* Copyright (c) 2006-2015 Varnish Software AS
* All rights reserved.
*
* Author: Poul-Henning Kamp <[email protected]>
* Author: Rogier 'DocWilco' Mulhuijzen <[email protected]>
Scanning dependencies of target tnzcore
[ 0%] Building CXX object tnzcore/CMakeFiles/tnzcore.dir/__/common/tcore/tdata.cpp.o
clang: warning: -Wl,-install_name,@rpath/libtnzcore.dylib: 'linker' input unused
In file included from /Users/keizo/product/opentoonz/toonz/sources/common/tcore/tdata.cpp:4:
In file included from /Users/keizo/product/opentoonz/toonz/sources/include/tconvert.h:76:
In file included from /Users/keizo/Qt5.5.1/5.5/clang_64/lib/QtCore.framework/Headers/qstring:1:
In file included from /Users/keizo/Qt5.5.1/5.5/clang_64/lib/QtCore.framework/Headers/qstring.h:43:
/Users/keizo/Qt5.5.1/5.5/clang_64/lib/QtCore.framework/Headers/qrefcount.h:48:22: error: expected ';' at end of
declaration list
inline bool ref() Q_DECL_NOTHROW {
@keizo042
keizo042 / pi.go
Last active April 13, 2016 17:39
package main
import (
"fmt"
"strconv"
)
type N (chan interface{})
type Z int