<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja"><title type="text">Uninterned Days</title><subtitle type="html">A blog on athos's life and habits</subtitle><updated>2021-05-16T23:39:43+00:00</updated><id>https://athos.github.io/</id><link rel="alternate" type="text/html" href="https://athos.github.io/"/><link rel="self" type="application/atom+xml" href="https://athos.github.io/atom.xml"/><author><name>athos</name><uri>https://athos.github.io/</uri><email>athos0220@gmail.com</email></author><generator uri="https://gohugo.io/" version="0.82.0">Hugo</generator><entry><title type="text">GWにGoをはじめてみた</title><link rel="alternate" type="text/html" href="https://athos.github.io/post/2021/05/16/learning-go-in-gw/"/><id>https://athos.github.io/post/2021/05/16/learning-go-in-gw/</id><updated>2021-05-16T16:35:00+09:00</updated><published>2021-05-16T16:35:00+09:00</published><author><name>athos</name><uri>https://github.com/athos</uri><email>athos0220@gmail.com</email></author><summary type="html">&lt;p>最近気づくと身の回りのOSSで、Goで書かれているものの割合が結構増えていた。
DockerやKubernetes、Terraform等の有名所はいうに及ばず、このブログを書くのに使ってるHugoもそうだし、アナリティクスサービスで使っている&lt;a href="https://www.goatcounter.com/">GoatCounter&lt;/a>もGo製らしい。まったく触れないままでいるのもいろいろと不便だし、GWに時間もあったのでせっかくなのでGoに入門してみた。&lt;/p>…</summary><category scheme="https://athos.github.io/categories/tech/" term="tech" label="tech"/><category scheme="https://athos.github.io/categories/programming/" term="programming" label="programming"/><category scheme="https://athos.github.io/tags/go/" term="Go" label="Go"/></entry><entry><title type="text">GitHub Pagesへ移行しました✍️</title><link rel="alternate" type="text/html" href="https://athos.github.io/post/2021/05/01/moving-to-github-pages/"/><id>https://athos.github.io/post/2021/05/01/moving-to-github-pages/</id><updated>2021-05-01T16:38:00+09:00</updated><published>2021-05-01T16:38:00+09:00</published><author><name>athos</name><uri>https://github.com/athos</uri><email>athos0220@gmail.com</email></author><summary type="html">&lt;p>&lt;a href="https://github.com/athos/TIL">github.com/athos/TIL&lt;/a> でホスティングしていた雑多な記事を
静的サイトとして仕立て直したのを機に、メインのブログを GitHub Pages に移行しようと思います。&lt;/p>…</summary><category scheme="https://athos.github.io/categories/misc/" term="misc" label="misc"/></entry><entry><title type="text">Javaのネストしたクラスたち</title><link rel="alternate" type="text/html" href="https://athos.github.io/post/2019/06/18/nested_classes_in_java/"/><id>https://athos.github.io/post/2019/06/18/nested_classes_in_java/</id><updated>2019-06-18T22:43:10+09:00</updated><published>2019-06-18T22:43:10+09:00</published><author><name>athos</name><uri>https://github.com/athos</uri><email>athos0220@gmail.com</email></author><summary type="html">&lt;p>最近Javaのネストしたクラス周辺について&lt;a href="https://docs.oracle.com/javase/specs/jls/se12/html/index.html">言語仕様&lt;/a>
を調べる機会があったのでまとめてみた。用語はなんとなく知っていたけど、オフィシャルな定義はよく知らなかったので。&lt;/p>…</summary><category scheme="https://athos.github.io/categories/tech/" term="tech" label="tech"/><category scheme="https://athos.github.io/categories/programming/" term="programming" label="programming"/><category scheme="https://athos.github.io/tags/til/" term="TIL" label="TIL"/><category scheme="https://athos.github.io/tags/java/" term="Java" label="Java"/></entry><entry><title type="text">ByteBufferの使用がバイナリ互換性を破壊するケース</title><link rel="alternate" type="text/html" href="https://athos.github.io/post/2018/12/12/bytebuffer-breaks-binary-compatibility/"/><id>https://athos.github.io/post/2018/12/12/bytebuffer-breaks-binary-compatibility/</id><updated>2018-12-12T20:05:43+09:00</updated><published>2018-12-12T20:05:43+09:00</published><author><name>athos</name><uri>https://github.com/athos</uri><email>athos0220@gmail.com</email></author><summary type="html">&lt;p>ClojureコードをコンパイルするとJVMバイトコードが生成される。一般的には、使用するClojureのパージョンさえ固定すれば、
どのような環境でコンパイルしてもコンパイル結果として得られるバイトコードは基本的に同じはずだ。&lt;/p>
&lt;p>しかし、「どのバージョンのJava上でコンパイルしたバイトコードか」が問題になる特殊なケースがあるらしい(実際に遭遇した)ので、記録のためにメモしておく。&lt;/p>…</summary><category scheme="https://athos.github.io/categories/tech/" term="tech" label="tech"/><category scheme="https://athos.github.io/categories/programming/" term="programming" label="programming"/><category scheme="https://athos.github.io/tags/til/" term="TIL" label="TIL"/><category scheme="https://athos.github.io/tags/clojure/" term="Clojure" label="Clojure"/></entry><entry><title type="text">解決できないエイリアスをリードしたときにエラーにならないようにする</title><link rel="alternate" type="text/html" href="https://athos.github.io/post/2018/08/24/customizing-reader-alias-resolution/"/><id>https://athos.github.io/post/2018/08/24/customizing-reader-alias-resolution/</id><updated>2018-08-24T15:15:04+09:00</updated><published>2018-08-24T15:15:04+09:00</published><author><name>athos</name><uri>https://github.com/athos</uri><email>athos0220@gmail.com</email></author><summary type="html">&lt;p>Clojureの&lt;a href="https://groups.google.com/forum/#!topic/clojure/XrbBLynjpN8">MLからのネタ&lt;/a>。&lt;/p>
&lt;p>Clojureでは名前空間にエイリアスがつけられて、シンボルやキーワードでそのエイリアスを使った場合に自動的に解決してくれる機能がある：&lt;/p>…</summary><category scheme="https://athos.github.io/categories/tech/" term="tech" label="tech"/><category scheme="https://athos.github.io/categories/programming/" term="programming" label="programming"/><category scheme="https://athos.github.io/tags/til/" term="TIL" label="TIL"/><category scheme="https://athos.github.io/tags/clojure/" term="Clojure" label="Clojure"/></entry><entry><title type="text">ClojureScriptでテストが失敗したときにexit(1)する</title><link rel="alternate" type="text/html" href="https://athos.github.io/post/2018/08/12/exit-with-nonzero-when-cljs-test-failed/"/><id>https://athos.github.io/post/2018/08/12/exit-with-nonzero-when-cljs-test-failed/</id><updated>2018-08-12T11:23:53+09:00</updated><published>2018-08-12T11:23:53+09:00</published><author><name>athos</name><uri>https://github.com/athos</uri><email>athos0220@gmail.com</email></author><summary type="html">&lt;p>CIでテストを回す場合、テストに失敗したときにCI自体も失敗してくれると嬉しい。&lt;/p>
&lt;p>Clojureだと、&lt;code>lein test&lt;/code>でテストする場合でも&lt;a href="https://github.com/cognitect-labs/test-runner">&lt;code>test-runner&lt;/code>&lt;/a>でテストする場合でも、
テストが失敗すると&lt;code>exit(1)&lt;/code>してくれるのでテストの失敗をCIも認識してくれる。&lt;/p>
&lt;p>自分で簡単なテストランナーを書く場合でも以下のようにすれば実現できる：&lt;/p>…</summary><category scheme="https://athos.github.io/categories/tech/" term="tech" label="tech"/><category scheme="https://athos.github.io/categories/programming/" term="programming" label="programming"/><category scheme="https://athos.github.io/tags/til/" term="TIL" label="TIL"/><category scheme="https://athos.github.io/tags/clojurescript/" term="ClojureScript" label="ClojureScript"/></entry><entry><title type="text">ClojureScriptマクロからコンパイラオプションを参照する</title><link rel="alternate" type="text/html" href="https://athos.github.io/post/2017/09/08/how-to-reference-compiler-options-from-cljs-macros/"/><id>https://athos.github.io/post/2017/09/08/how-to-reference-compiler-options-from-cljs-macros/</id><updated>2017-09-08T13:44:21+09:00</updated><published>2017-09-08T13:44:21+09:00</published><author><name>athos</name><uri>https://github.com/athos</uri><email>athos0220@gmail.com</email></author><summary type="html">&lt;p>小ネタ。&lt;/p>
&lt;p>ClojureScriptのコンパイラオプションというのは&lt;code>cljsbuild&lt;/code>で&lt;code>project.clj&lt;/code>に書いたり、
自前でビルドスクリプトを作る場合にはbuild APIに渡すアレ：&lt;/p>…</summary><category scheme="https://athos.github.io/categories/tech/" term="tech" label="tech"/><category scheme="https://athos.github.io/categories/programming/" term="programming" label="programming"/><category scheme="https://athos.github.io/tags/til/" term="TIL" label="TIL"/><category scheme="https://athos.github.io/tags/clojurescript/" term="ClojureScript" label="ClojureScript"/></entry><entry><title type="text">これからのClojureScriptの最もお手軽な起動方法？</title><link rel="alternate" type="text/html" href="https://athos.github.io/post/2017/08/19/easiest-way-to-start-up-cljs-in-the-future/"/><id>https://athos.github.io/post/2017/08/19/easiest-way-to-start-up-cljs-in-the-future/</id><updated>2017-08-19T00:22:01+09:00</updated><published>2017-08-19T00:22:01+09:00</published><author><name>athos</name><uri>https://github.com/athos</uri><email>athos0220@gmail.com</email></author><summary type="html">&lt;p>先日の&lt;a href="https://www.youtube.com/playlist?list=PLZdCLR02grLpzt6WENiHe16-vx74VbCw_">EuroClojure&lt;/a>
でのAlex Miller氏の基調講演で、&lt;a href="https://github.com/clojure/tools.deps.alpha">tools.deps.alpha&lt;/a>やそれを使った
インストーラ等の構想が発表された。&lt;/p>…</summary><category scheme="https://athos.github.io/categories/tech/" term="tech" label="tech"/><category scheme="https://athos.github.io/categories/programming/" term="programming" label="programming"/><category scheme="https://athos.github.io/tags/til/" term="TIL" label="TIL"/><category scheme="https://athos.github.io/tags/clojurescript/" term="ClojureScript" label="ClojureScript"/></entry><entry><title type="text">ClojureScriptコンパイラにまつわる「環境」あれこれ</title><link rel="alternate" type="text/html" href="https://athos.github.io/post/2017/08/14/various-enviroments-in-clojurescript-compiler/"/><id>https://athos.github.io/post/2017/08/14/various-enviroments-in-clojurescript-compiler/</id><updated>2017-08-14T21:00:17+09:00</updated><published>2017-08-14T21:00:17+09:00</published><author><name>athos</name><uri>https://github.com/athos</uri><email>athos0220@gmail.com</email></author><summary type="html">&lt;p>ClojureScriptのREPLやeval、マクロ等のコンパイラが関わる部分には「環境」がいろいろ出てくる。
compiler envやanalysis env、compiler stateというのもあるし、マクロの&lt;code>&amp;amp;env&lt;/code>、
ClojureScriptで怪しげなことをやってるところでは &lt;code>env/*compiler*&lt;/code> というのもよく見かける。&lt;/p>
&lt;p>ClojureScriptコンパイラの実装を理解するうえで、これらのうち何が同じもので何が違うものなのか、
違うとしたらどう違うのかを一旦整理しておく必要がありそうだったので調べてまとめてみた。&lt;/p>…</summary><category scheme="https://athos.github.io/categories/tech/" term="tech" label="tech"/><category scheme="https://athos.github.io/categories/programming/" term="programming" label="programming"/><category scheme="https://athos.github.io/tags/til/" term="TIL" label="TIL"/><category scheme="https://athos.github.io/tags/clojurescript/" term="ClojureScript" label="ClojureScript"/></entry><entry><title type="text">「2つのキーのどちらか一方のみを含むマップ」を表現するスペック</title><link rel="alternate" type="text/html" href="https://athos.github.io/post/2017/08/03/specing-maps-with-exclusive-keys/"/><id>https://athos.github.io/post/2017/08/03/specing-maps-with-exclusive-keys/</id><updated>2017-08-03T14:30:57+09:00</updated><published>2017-08-03T14:30:57+09:00</published><author><name>athos</name><uri>https://github.com/athos</uri><email>athos0220@gmail.com</email></author><summary type="html">&lt;p>たとえば、「整数をとる&lt;code>:x&lt;/code>というキー」と「文字列をとる&lt;code>:y&lt;/code>というキー」をもつマップのスペックは以下のように表現できる：&lt;/p>…</summary><category scheme="https://athos.github.io/categories/tech/" term="tech" label="tech"/><category scheme="https://athos.github.io/categories/programming/" term="programming" label="programming"/><category scheme="https://athos.github.io/tags/til/" term="TIL" label="TIL"/><category scheme="https://athos.github.io/tags/clojure/" term="Clojure" label="Clojure"/></entry><entry><title type="text">Criteriumはevalのベンチマークには使えない</title><link rel="alternate" type="text/html" href="https://athos.github.io/post/2017/07/05/criterium-cannot-be-used-for-benchmarking-eval/"/><id>https://athos.github.io/post/2017/07/05/criterium-cannot-be-used-for-benchmarking-eval/</id><updated>2017-07-05T09:59:06+09:00</updated><published>2017-07-05T09:59:06+09:00</published><author><name>athos</name><uri>https://github.com/athos</uri><email>athos0220@gmail.com</email></author><summary type="html">&lt;p>ほとんどの人にとっては誰得情報かと思いますが。。。&lt;/p>
&lt;p>&lt;a href="https://github.com/hugoduncan/criterium">Criterium&lt;/a>といえば、Clojure界隈ではベンチマークツールの決定版的な位置づけのライブラリ。
外れ値の検出等の統計的な処理はもちろん、ベンチマーク結果がGCの影響を受けないようにGCをオフにしたり、JITコンパイルによってコードが
十分に最適化された状態になるまでウォームアップをしてくれたりと、JVM上でベンチマークをとるうえで気をつける必要がある点について
かなりしっかりとケアしてくれる。&lt;/p>
&lt;p>で、今回の問題はそんな手厚いケアがアダになったケースといえそう。&lt;/p>…</summary><category scheme="https://athos.github.io/categories/tech/" term="tech" label="tech"/><category scheme="https://athos.github.io/categories/programming/" term="programming" label="programming"/><category scheme="https://athos.github.io/tags/til/" term="TIL" label="TIL"/><category scheme="https://athos.github.io/tags/clojure/" term="Clojure" label="Clojure"/></entry><entry><title type="text">ClojureScript自身の開発のはじめかた</title><link rel="alternate" type="text/html" href="https://athos.github.io/post/2017/06/24/getting-started-with-clojurescript-development/"/><id>https://athos.github.io/post/2017/06/24/getting-started-with-clojurescript-development/</id><updated>2017-06-24T17:32:29+09:00</updated><published>2017-06-24T17:32:29+09:00</published><author><name>athos</name><uri>https://github.com/athos</uri><email>athos0220@gmail.com</email></author><summary type="html">&lt;p>ClojureScriptの&lt;a href="https://dev.clojure.org/jira/browse/CLJS-2119">不具合らしき挙動&lt;/a>に遭遇したのでパッチを作ろうとするも、
普段cljsbuildやらFigwheelなんかのツールを介してしかClojureScriptに触れていないので、素のClojureScriptをどう動かせばいいのか
すら分からない状態。&lt;/p>
&lt;p>とりあえず必要最低限、素のClojureScriptでの動作確認とテストをするところまではやったので、備忘録として残しておく。&lt;/p>…</summary><category scheme="https://athos.github.io/categories/tech/" term="tech" label="tech"/><category scheme="https://athos.github.io/categories/programming/" term="programming" label="programming"/><category scheme="https://athos.github.io/tags/til/" term="TIL" label="TIL"/><category scheme="https://athos.github.io/tags/clojurescript/" term="ClojureScript" label="ClojureScript"/></entry><entry><title type="text">Clojarsの検索APIでライブラリ登録日によるフィルタリング</title><link rel="alternate" type="text/html" href="https://athos.github.io/post/2017/06/03/clojars-query-for-search-by-created-date/"/><id>https://athos.github.io/post/2017/06/03/clojars-query-for-search-by-created-date/</id><updated>2017-06-03T15:22:43+09:00</updated><published>2017-06-03T15:22:43+09:00</published><author><name>athos</name><uri>https://github.com/athos</uri><email>athos0220@gmail.com</email></author><summary type="html">…</summary><category scheme="https://athos.github.io/categories/tech/" term="tech" label="tech"/><category scheme="https://athos.github.io/categories/programming/" term="programming" label="programming"/><category scheme="https://athos.github.io/tags/til/" term="TIL" label="TIL"/><category scheme="https://athos.github.io/tags/clojure/" term="Clojure" label="Clojure"/></entry><entry><title type="text">Associativeな値の操作関数の等価な書き換え</title><link rel="alternate" type="text/html" href="https://athos.github.io/post/2016/06/21/transformations-between-combinations-of-associative-fns/"/><id>https://athos.github.io/post/2016/06/21/transformations-between-combinations-of-associative-fns/</id><updated>2016-06-21T17:24:46+09:00</updated><published>2016-06-21T17:24:46+09:00</published><author><name>athos</name><uri>https://github.com/athos</uri><email>athos0220@gmail.com</email></author><summary type="html">&lt;p>&lt;code>update&lt;/code>や&lt;code>update-in&lt;/code>が便利すぎてついつい使いすぎてしまう。
気づくと「もっとストレートな書き方があるのに…」というパターン(&lt;code>update&lt;/code>+&lt;code>assoc&lt;/code>とか&lt;code>update-in&lt;/code>+&lt;code>update&lt;/code>とか)を書いていたりするのでちょっと整理してみた。&lt;/p>…</summary><category scheme="https://athos.github.io/categories/tech/" term="tech" label="tech"/><category scheme="https://athos.github.io/categories/programming/" term="programming" label="programming"/><category scheme="https://athos.github.io/tags/til/" term="TIL" label="TIL"/><category scheme="https://athos.github.io/tags/clojure/" term="Clojure" label="Clojure"/></entry><entry><title type="text">ReagentでエスケープされていないHTMLを埋め込む</title><link rel="alternate" type="text/html" href="https://athos.github.io/post/2016/05/18/embed-unescaped-html-into-reagent-dom/"/><id>https://athos.github.io/post/2016/05/18/embed-unescaped-html-into-reagent-dom/</id><updated>2016-05-18T16:24:59+09:00</updated><published>2016-05-18T16:24:59+09:00</published><author><name>athos</name><uri>https://github.com/athos</uri><email>athos0220@gmail.com</email></author><summary type="html">&lt;p>ClojureScriptのOmラッパーのひとつであるReagentでは、DOMをClojureScriptのデータ(ベクタやマップ)として書く。&lt;/p>
&lt;p>このDOMを表すデータに含まれる文字列はデフォルトでHTMLエスケープされる。これを回避するにはReactの&lt;code>dangerouslySetInnerHTML&lt;/code>の機能を使う。&lt;/p>…</summary><category scheme="https://athos.github.io/categories/tech/" term="tech" label="tech"/><category scheme="https://athos.github.io/categories/programming/" term="programming" label="programming"/><category scheme="https://athos.github.io/tags/til/" term="TIL" label="TIL"/><category scheme="https://athos.github.io/tags/clojurescript/" term="ClojureScript" label="ClojureScript"/></entry><entry><title type="text">name関数は文字列を受け取る</title><link rel="alternate" type="text/html" href="https://athos.github.io/post/2016/05/17/name-function-can-accept-strings/"/><id>https://athos.github.io/post/2016/05/17/name-function-can-accept-strings/</id><updated>2016-05-17T15:44:16+09:00</updated><published>2016-05-17T15:44:16+09:00</published><author><name>athos</name><uri>https://github.com/athos</uri><email>athos0220@gmail.com</email></author><summary type="html">&lt;p>タイトルの通り。&lt;/p>
&lt;p>&lt;code>name&lt;/code>は&lt;code>namespace&lt;/code>と対になる関数で、&lt;code>c.l.Named&lt;/code>なオブジェクトの名前空間修飾を除いた名前部分の文字列を返す。&lt;/p>…</summary><category scheme="https://athos.github.io/categories/tech/" term="tech" label="tech"/><category scheme="https://athos.github.io/categories/programming/" term="programming" label="programming"/><category scheme="https://athos.github.io/tags/til/" term="TIL" label="TIL"/><category scheme="https://athos.github.io/tags/clojure/" term="Clojure" label="Clojure"/></entry></feed>