package yetAnotherNewFunc

import ( "fmt" "reflect" "sync" "testing" ) type Foo struct{} func NewFoo() *Foo { return &Foo{} } func YieldFoo() Foo { return Foo{} } func SpawnFoo(F func(interface{}) error) chan Foo { chFoo := make(chan Foo) go func() { for { x := <-ch…

ブロ名を変えてみた。

Hello, test!

Hello, this blog post from command line on\

hatepo

hatepo

fizzbuzz with 'knock group'

package main import ( "flag" "fmt" "io" "net/http" "strconv" "sync" ) var ( vol = flag.Int("v", 100, "volume") max = flag.Int("m", 10000, "send numbers") ) type msg struct { Q int A int I interface{} } type comm struct { Sch chan msg Rch c…

fizzbuzz timer

package main import ( "context" "fmt" "time" ) const ( FIZZBUZZ = iota FIZZ BUZZ NOTFIZZBUZZ ) type result byte func (r result) String() string { if r&(1<<FIZZBUZZ) > 0 { return "fizzbuzz" } if r&(1<<FIZZ) > 0 { return "fizz" } if r&(1<<BUZZ) > 0 { return "buzz" } if</buzz)></fizz)></fizzbuzz)>…

import ( "context" "flag" "fmt" "time" ) const ( FIZZBUZZ = iota FIZZ BUZZ NOTFIZZBUZZ ) type msg struct { Q int A int } type ring struct { next *ring f ringer } type ringer interface { Do(ctx context.Context, out chan<- msg) error } type …

fizzbuzz(6), with 'knock-service'

package main import ( "flag" "fmt" "net/http" "strconv" "sync" ) var ( vol = flag.Int("v", 100, "volume") max = flag.Int("m", 10000, "send numbers") ) type msg struct { Q int A int } type comm struct { Sch chan msg Rch chan msg } type repl…

fizzbuzz(6)

package main import ( "flag" "fmt" "sync" ) var ( vol = flag.Int("v", 100, "volume") max = flag.Int("m", 10000, "send numbers") ) type msg struct { Q int A int } type comm struct { Sch chan msg Rch chan msg } type reply struct { Ch chan *c…

goto scope of golang

memo

-fno-stack-protector

mecabのbuild

repository がgithubに移行。 ipadic をconfigureする時に、--with-mecab-config="xxx"が必要。 $ git clone https://github.com:taku910/mecab.git $ cd mecab/mecab $ ./configure --with-charset=utf8 --enable-utf8-only $ make $ make check $ sudo mak…

Goのloop

loopのvariable for _, v := range items { v := v go func(){ process(v) }() } for _, v := range items { go func(v type) { process(v) }(v) } loopとwait group var wg sync.WaitGroup for _, v := range items { v := v wg.Add(1) go func(){ process(…

C source files not allowed when not using cgo or SWIG: sqlite3-binding.c

ubuntu14.04 sudo apt-get install g++-multilib and, Explicity 'CGO_ENABLE=1' CGO_ENABLED=1 GOARCH=amd64 GOOS=linux go build -o XXX ubuntuも32bitなくなるかもしれないし、つらい。 ていうか、64bit、、、Raspi3ほっしい。 コアほしい。

memo tls

How It Works - Let's Encrypt - Free SSL/TLS Certificates Go言語と暗号技術(AESからTLS) | SOTA InsecurePlatformWarning on Ubuntu 14.04 · Issue #1883 · letsencrypt/letsencrypt · GitHub https://letsencrypt.readthedocs.org/en/latest/using.htm…

ここ2~3日の(気になるリンク

テスト http://www.slideshare.net/takuyaueda967/go-53217449 ライブラリ http://www.mjhall.org/articles/golang-libraries.html スライス http://mattn.kaoriya.net/software/lang/go/20150928144704.htm 高速化 http://qiita.com/y_matsuwitter/items/77…

runtime: out of memory: cannot allocate 1073741824-byte block (1074790400 in use)

fatal error: out of memory http://blog.davidsingleton.org/parsing-huge-xml-files-with-go/

memoMemo built-in dataStructures

string(2 words), slice(3 words), interface(2 words), map(1 word), chan(1 word), func(1 word)

yapc初参加!

本当に楽しいカンファレンスでした! 運営のみなさま、お疲れさまでした&有難うございました! お気に入りのTalk::Day1 HTTP/2時代のウェブサイト設計 from Kazuho Oku www.slideshare.net rebuildやブログ記事で気になっていた、kazuhoさんのHTTP/2の話を…

microBlogHello!

MemoMemo ‘Jun Kuroda - Snow Cone[FREE DL(MIDI&SONG)]’ on #SoundCloud? #gramsMyNinja #np https://t.co/onSKaTduyu

MemoMemo CORS

https://en.wikipedia.org/wiki/Cross-origin_resource_sharing

Hello, World!

My staple food is golang. Blog post from cmdline. This post is just test.

メモメモ zlib

https://golang.org/pkg/compress/zlib/#example_NewWriter https://en.wikipedia.org/wiki/Zlib https://en.wikipedia.org/wiki/DEFLATE

メモメモ reflection

https://golang.org/pkg/reflect/#example_MakeFunc https://en.wikipedia.org/wiki/Reflection_%28computer_programming%29#Uses http://blog.golang.org/laws-of-reflection

メモメモ xml

https://golang.org/pkg/encoding/xml/#example_Encoder https://ja.wikipedia.org/wiki/Extensible_Markup_Language#.E5.B9.85.E5.BA.83.E3.81.84.E4.BA.BA.E9.96.93.E8.A8.80.E8.AA.9E.E3.81.AE.E3.82.B5.E3.83.9D.E3.83.BC.E3.83.88

メモメモ gob

http://golang.org/pkg/encoding/gob/#example__interface https://en.wikipedia.org/wiki/Bijection

メモメモ Base32

https://golang.org/pkg/encoding/base32/#example_Encoding_DecodeString https://en.wikipedia.org/wiki/Base32#RFC_4648_Base32_alphabet https://tools.ietf.org/html/rfc4648#section-6

メモメモ x509/pem

http://golang.org/pkg/crypto/x509/#example_Certificate_Verify https://ja.wikipedia.org/wiki/X.509#.E8.A8.BC.E6.98.8E.E6.9B.B8.E3.83.95.E3.82.A1.E3.82.A4.E3.83.AB.E3.81.AE.E6.8B.A1.E5.BC.B5.E5.AD.90 https://en.wikipedia.org/wiki/Privacy-enh…

メモメモ CBC

https://golang.org/pkg/crypto/cipher/#NewCBCDecrypter https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_Block_Chaining_.28CBC.29 Advanced Encryption Standard - Wikipedia SPN構造 - Wikipedia https://en.wikipedia.org/wiki/F…

メモメモ interface checks

https://golang.org/doc/effective_go.html#blank_implements