Kengo's blog

Technical articles about original projects, JVM, Static Analysis and TypeScript.

Entries from 2013-01-01 to 1 year

My acts on the WWW in 2013

I will summarize my online actions in this year. Old articles are below: My acts on the WWW in 2011 (Japanese) My acts on the WWW in 2012 personal products I have released several personal products, and 4 of them are important to explain m…

ウェブアプリケーションサーバでよくあるクラスローダのトラブル

これはJ2EE Advent Calendarの25日目の記事です。昨日の記事はnobuokaさんによるJava Persistence API (JPA) 実践入門でした! 本記事の趣旨は、developerWorksのクラスローダーとJ2EEパッケージング戦略を理解するに書いてあることをコードで確かめようとい…

Useful libraries and Maven plugins to implement executable jar

When you implement executable jar, there is some good libraries and Maven plugins to implement. I will list them and explain how to use. args4j args4j is a good library to parse command line argument. It is more modern than commons-cli, an…

「それ、Guavaでできるよ」系の話

「Javaってこれがめんどうだよねー」「あ、それGuavaでマシになりますよ」というやりとりが多い気がするので代表例をいくつか書いてみる。気になった方は公式ドキュメントをぜひ。 便利系Map 2キー使って1要素を特定するMap 複数の値を持ちうるMap 完全に同…

How to build FindBugs 3.0-SNAPSHOT by Maven

Now FindBugs 3.0-SNAPSHOT depends on SNAPSHOTs which is not hosted on Maven repository. To build, we have to execute install:install-file manually. $ git clone https://code.google.com/p/skypencil-findbugs/ $ cd findbugs/findbugs $ git chec…

log: Oct/7-Nov/29

Interest guavapt docker packer Output A patch to fix Maven build I have submitted a patch to FindBugs 3.0 to fix broken Maven build. https://sourceforge.net/p/findbugs/bugs/1229/ Unofficial Maven repository for jaxen Now jaxen:jaxen:1.1.6 …

had a session at talk.js

If you are English user, visit meetup.com to find my slide. 昨晩マイクロソフト@シンガポールでtalk.jsに参加してきました。レベルが高そうなJSプログラマが集う場所にJavaプログラマが潜り込むという構図を活かして笑いを取るなどしました。 前回*1は…

スキル差の存在を前提としたJava開発の私の理想

スキルの低い人が生産性における問題ならその人を何とかするのが根本解決だよねと話したら、人に強要することなんてできないじゃないですかーという反応をいただいた。 これはすごく的を射たもので、チームを引っ張ってモノづくりをするうえで・チームを引っ…

How to use UserValue to implement FindBugs plugin

UserValue is a good way to mark local variable. By this marking, you can chase item or classify type of item. To use operand stack, your detector should extend OprandStackDetector or its subclass. OprandStackDetector OpcodeStackDetector#ge…

log:Aug/18-Oct/6

log

Interests circuits.io Interesting, and good site to learn electric circuit. http://123d.circuits.io/users/21927 http://blog.circuits.io/ Technical meetup at Singapore http://www.meetup.com/Singapore-JS/ http://www.meetup.com/HTML5Rocks-SG/…

log: Jul/27-Aug/17

Interests Launch4j It looks good to distribute executable files which is implemented by Java or other JVM languages. http://launch4j.sourceforge.net/ Output Maven introduction for beginners in Japanese Now Maven can be common way to build …

2013年の抱負を振り返る

1年も半分とちょっと経過して住環境も変わったので、今年の抱負を振り返ってみます。 今年の言語(LLVM) JVMを離れてLLVMと親しむはずが、ガッツリJVMに潜ってFindbugsプラグインなんぞを実装しております。まぁ、こういうのはめぐり合わせというか運と縁な…

log: Jul/8-26

log

During these days, I moved from Shanghai to Singapore so I could not cost so much time to catch up information. Output refactoring: findbugs-slf4j To add next detector, I refactored implementation around ArrayDataHandler. I added a simple …

I moved to Singapore

At 2011, I moved to Shanghai from Tokyo. And now I moved to Singapore. From Singapore, I can use SNS and video streaming service. So I will try to join some online event like ClubDB2. Of course it can be a problem: I might waste time by SN…

Findbugs支持者が期待するDatalogによる解析の可能性

この前Datalogベースの解析なるものを教えてもらって、Findbugsでは解決できていない以下の問題に解を与える存在になるのではと期待しています。インクリメンタルな実行ができない問題。クラスに変更があった場合、そのクラス自身に加えて依存するすべてのク…

May/27-July/7

log

Interesting test-driven-detectors4findbugs This is useful library to test FindBugs plugin. I have sent 3 pull requests and 2 of them were merged. https://github.com/youdevise/test-driven-detectors4findbugs/pull/9 https://github.com/youdevi…

処理の流れに関連したFindBugsプラグインを作る2

前回残したTODOの消化。 今の理解が正しいなら、各BasicBlockごとにFactを計算しておいてあとでmeetさせるという話になるので、この辺りのロジックを読めば決着は付くだろう。 結論から言うと、当時の理解は正しかった。 ただすべてのBasicBlockのFactを計算…

処理の流れに関連したFindBugsプラグインを作る

端午节3連休中に調べたことのメモ。たぶんこれで@WillCloseと@WilCloseWhenClosedをサポートするdetectorが実装できるはず。 資源が確実に開放されるかを調べるDetectorを実装するときなど、ありうる処理の流れを列挙してその全てに対して正しい処理が行われ…

log: Apr/15-May/26

log

Interesting Test Driven Detector for FindBugs https://github.com/youdevise/test-driven-detectors4findbugs Travis CI supports "restart build" feature Now we can restart build from menu on build page. Sometimes our build fails (maybe this is…

altWebSiteなるものを妄想してみる

HTML/CSS/JavaScriptを複雑に組み合わせてアプリケーションを作ろうという大きい流れがありますが、そもそも「アプリケーションを書くことを想定していないモノ」で無理矢理作ること自体に無理があるよねという考えがあってもいいと思います。 altJSがいくつ…

FindBugsコードリーディング

FindBugsをMavenizeしたツワモノがいるのでありがたくeclipse:eclipseしてコードを読んだ。srcとsrc/javaの両方がsource folderとして認識されているのでそこだけ手直ししてやる必要があったが、概ね良好。 eller86/findbugs-2.0.2 · GitHub "findbugs.execp…

技術者2年目の貴方におくる応援の言葉

やあ(´・ω・`) 呆れずにメールのリンクを開いてくれてありがとう。そうなんだ、このページは前回の続きというわけなんだ。おっと、control+wでタブを閉じるのは待ってほしい。ショートカットキーに親しんだ貴方を見られて感慨深く思うが、せっかくなので居…

log: 2013/Apr/1 - 14

log

Interests LLVM IR coding I started to code LLVM IR by hands to implement Brainf*ck frontend. LLVM IR is quite easy to code. In my opinion, it is easier than Jasmin because it can use register instead of stack. The 'phi' is easy to understa…

Basic of Golang

Today I have finished a tour of golang, and I did an exercise at this page. The Same function is little long, but it might be acceptable. package main import "code.google.com/p/go-tour/tree" import "fmt" // Walk walks the tree t sending al…

GWに日本に行きます

ときどき時間を作れるかもしれませんので適当に交流しに行こうと思います。よろしくお願いします。

ウェブサービス系OSSの浸透を期待して開発環境を配布するまで

あるいはVagrantでplayframework 2.0系ウェブサービスの環境を立ち上げるまで。 PARTAKEの開発者がいまいち増えずチケットばかりが積み重なるのは、サービスという粒度が大きすぎて環境を作るのが面倒なことも一因だと思っています。ここを手助けできないか…

How to implement Brainf*ck on LLVM IR

I am still thinking... Brainf*ckLLVM IR > (incr pointer)load, add nsw, storephi < (decr pointer)load, sub nsw, storephi + (incr value)getelementptr, load, add nsw, store - (decr value)getelementptr, load, sub nsw, store . (output)call i32 …

Hello, LLVM

LLVM3.2 on OSX. quickstart $ cat hello.cpp #include <stdio.h> int main() { printf("Hello World!\n"); } $ clang++ hello.cpp -emit-llvm -S -o hello.ll $ cat hello.ll ; ModuleID = 'hello.cpp' target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i</stdio.h>…

log: 2013/Mar/18 ~ 31

Interests llvm-j A thin wrapper of LLVM library for Java. DOCKER I have not understood this, but it might be helpful to manage distributed system like Cassandra. Globalize I knew jquery-glob, but I did not know it switched independent libr…

RequireJSを活用したキャッシュ防止、A/Bテスト、画像事前読込など

[for English user] This article is a simple introduction about my project for Japanese developer. You do not have to read this, reading this project directly would be enough. RequireJSの応用方法について調べた内容をGitHubでまとめています。…