Skip to content

Instantly share code, notes, and snippets.

Yoshiki Shibukawa shibukawa

Block or report user

Report or block shibukawa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View bench_brbundle.go
package main
import (
func main() {
View crlite.go
package crlite
import (
shibukawa / main_test.go
Last active May 7, 2019
pure go compression benchmark
View main_test.go
package main
import (
shibukawa / headhunting.txt
Created Apr 12, 2019
View headhunting.txt
>>> a = [ 9, 5, 4, 2, 1]
>>> b = [ 2, 4, 7, 8, 10]
>>> def sortset(s, a):
... return sorted(s, key=lambda e: a.index(e))
>>> sortset(set(a) - set(b), a + b)
[9, 5, 1]
>>> sortset(set(b) - set(a), a + b)
[7, 8, 10]
View gist:1a141980539864e1186ffae3c1a77a37
View gist:709d6af5caaecb920a98250b0c74bfd0
commit 839b0d941e962c9b902804312f301700ba203d98
Author: Yoshiki Shibukawa <>
Date: Fri Jun 30 11:02:26 2017 +0900
commit f95422007bf5689ccfeefa1812916209b4af6485
Merge: 252df5f 268f8bc
Author: Akihiro Takizawa <>
Date: Fri Jun 16 10:30:13 2017 +0900
View cg.d.ts
interface ICommonColumn<T> {
width?: number | string;
minWidth?: number | string;
maxWidth?: number | string;
caption?: string;
style?: IStyle | styleFunction<T>;
padding?: string | number[];
textOverflow?: "clip" | "ellipsis";
action?: string;
shibukawa /
Last active Sep 29, 2018
Feedback for generics/contract proposals


I don't think this generics/contract proposals have enough advantages. I am against them.

Why Generics is needed

For a long period, many people have wanted generics for the following purposes:

  • Avoid type casting from interface{} (as this proposal mentioned).
  • Improve performance (like C++'s specization feature like this).
shibukawa / error
Last active Sep 28, 2018
Every handle should have return statement
View error

Basically, error handling code and regular code have different purpose/aspect. So splitting error handling code from regular code is just introducing some type of "goto" structure essentially.

I like handle/check work locally inside function and are resticted not to escape between functions unlike exception are good point. But I think this design proposal may create a very complicated structure。

If there is only one handle per scope ({ }), it is resonable, but there are many handles and/or have defers in same scope, make code difficult. If we have to control error handling finely, error handling code and regular code are mixed like bunch of if err != nil sentences.

My suggestion

You can’t perform that action at this time.