man は長すぎるので「tldr」

たとえば,

curl で JSON を POST したいとき,

オプション記述を覚えてないので man.

man_curl_—_80×24

長すぎて探すのが面倒で結局ぐぐってしまう.

ssh でポートフォワードしたいとき,

man_ssh_—_80×24

結局これもぐぐってしまう.

TLDR
【略】
=Too long. Didn't read.
長過ぎ。読みませんでした。/長文うざい(と言う人のための要約)。

そんな名前のすばやく調べるコマンドがありますよ.

bash_—_80×26

bash_—_81×28

分かりやすくうざくない長さで説明してくれます.

screenshot

tldr-pages/tldr

ちなみに「tldr」で「tldr」は以下.

tldr




Android 次期バージョン N は Oracle Java を使わないのか?

Diff_-_51b1b6997fd3f980076b8081f7f1165ccc2a4008^__-_platform_libcore_git_-_Git_at_Google

技術ネタ満載の YCombinator の運営する「Hacker News」で昨日から話題になっています.

Google confirms next Android version won’t use Oracle’s proprietary Java APIs | Hacker News

このへん素人目にも想像できるのは「著作権料を払いたくない」という理由.

So in order for Google to avoid paying that royalty going forward they need to move to OpenJDK quickly with their next release, with the belief that using Oracle's GPL JDK implementation also gives them a license to the API (which is somehow separately copyrightable? The Federal Circuit is a mess).

ここらの適用範囲などの法律の話は金額のわりに明快でなく庶民には分かりづらい.

実際, 開発中のソースコードではどのようになってきているのか.

Mysterious Android codebase commit | Hacker News

This diff is more explicit about what's going on:
https://android.googlesource.com/platform/libcore.git/+/aab9...
Change dependency from libart -> libopenjdkjvm.
There are also diffs adding lambda support, tweaking various classes for compatibility with applications that use reflection to access internal capabilities, and fixing lots OpenJDK compatibility bugs.

確かに, OpenJDK に移行してるようにも見えるが.

In the context of the recent juniper attack where some unauthorized code was committed without anybody noticing for years, it seems like it would be easy to hide a backdoor in such a big commit.
How do you go about checking the integrity of the code when you have so many files?
8902 files were changed, most added, and the commit says it's just importing openJDK files. Is there anybody checking that the source file imported haven't been modified to include some kind of backdoor?

はっきり「OpenJDKに移行を進めている」とは言い切れないのか.

WEBでは見づらいのでアプリで.

Hacker News Reader (翻訳) - Google Play の Android アプリ


Retrofit 2.0-beta で ログを吐かせる

Retrofit

Okhttp 2.6.0+ では HTTPリクエスト/レスポンスのログ出力が可能なのだが,

New Logging Interceptor. The logging-interceptor subproject offers simple request and response logging. It may be configured to log headers and bodies for debugging. It requires this Maven dependency:

HttpLoggingInterceptor logging = new HttpLoggingInterceptor();
logging.setLevel(Level.BASIC);
client.networkInterceptors().add(logging);

okhttp/CHANGELOG.md at master · square/okhttp

残念なことに retrofit 2.0.0-beta2 での同梱は 2.5.0 .

<!-- Dependencies -->
<android.version>4.1.1.4</android.version>
<android.platform>16</android.platform>
<okhttp.version>2.5.0</okhttp.version>
<animal.sniffer.version>1.14</animal.sniffer.version>

retrofit/pom.xml at master · square/retrofit

なので logging-interceptor 2.6.0 で.

    <dependency>
      <groupId>com.squareup.okhttp</groupId>
      <artifactId>okhttp</artifactId>
      <version>${project.version}</version>
    </dependency>

okhttp/okhttp-logging-interceptor at master · square/okhttp

compile 'com.squareup.okhttp:logging-interceptor:2.6.0' 
HttpLoggingInterceptor logging = new HttpLoggingInterceptor();  
logging.setLevel(Level.BASIC);
OkHttpClient client = new OkHttpClient();  
httpClient.interceptors().add(logging);
Retrofit retrofit = new Retrofit.Builder()  
   .baseUrl(API_BASE_URL)
   .addConverterFactory(GsonConverterFactory.create())
   .client(httpClient)
   .build();

出力.

...
11:33:04.547 17090-17108 D/OkHttp: <-- HTTP/1.1 200 OK (469ms, 259-byte body)
11:33:04.550 17090-17296 D/OkHttp: --> GET /v5/item/1072964 HTTP/1.1
11:33:04.563 17090-17263 D/OkHttp: <-- HTTP/1.1 200 OK (250ms, 244-byte body)
11:33:04.566 17090-17108 D/OkHttp: --> GET /v5/item/1073510 HTTP/1.1
11:33:04.606 17090-17265 D/OkHttp: <-- HTTP/1.1 200 OK (252ms, 228-byte body)
11:33:04.609 17090-17263 D/OkHttp: --> GET /v5/item/1072585 HTTP/1.1
11:33:04.794 17090-17296 D/OkHttp: <-- HTTP/1.1 200 OK (244ms, 183-byte body)
11:33:04.796 17090-17265 D/OkHttp: --> GET /v5/item/1073275 HTTP/1.1

stable で対応するのかな.