Author: valerauko

Mapping

The other day I was thinking about Rich Hickey’s keynote at last year’s Conj. He goes into how the literal maps (or hashes or hashmaps or however a language prefers to call them) are really functions too. A function in maths is a mapping between sets and that’s what maps are.

Then that makes functions we normally write are just like that too, except the mappings are more abstract and defined through code. Because the mappings are so complex and indirect, we write tests to check (automated) that the mapping we defined through code is correct.

Obviously defining the exact mappings for every possible combination of the input set(s) is not feasible (that’d be a map, the end). But if “all” is not possible then how much is? What exactly is the absolute minimum amount of test( case)s that’s useful?


Gala

To keep practicing snowboard, the next target was Gala Yuzawa. It’s an apparently pretty famous snow resort, considering how it has its own shinkansen station (yes really) and probably the first destination for snow tourists seeing the huge number of foreigners (including the staff).


In motion

I don’t know how it’s at other schools, but my university had compulsory PE classes. Sure only once a week and only for two semesters, but it was still annoying. Except for one good thing: there was an option to take a few days long ski trip instead of the regular class in the winter semester. Which of course I did. It was my first time skiing and I loved it. That was in 2011.


2018 in retrospect

2018 was a trainwreck if I judge by the news, but a friend of mine wrote a quite positive post about their year, which inspired me to do the same. One of the first things that come to mind is that I should write about stuff when they’re fresh in memory, because I barely remember what I did last week, let alone last year (though currently the two overlap).


Getting that system dashboard working

Earlier I wrote about how I set up Beats – Elasticsearch – Grafana to visualize the various metrics (and logs, hate me) from Kitsune‘s dev server. There were a few tricky spots that didn’t work at first and took a while to figure out (or at least get working).


SNS連合とActivityPubで通信できた

タイトル通りではあるが、その言葉全部通じない人も少なからずいるし、そもそもどうやっては書いてない。まずは言葉の定義から順にする:ActivityPubって何、それを使った通信が一体どんなものか、SNS連合とは何なのか、そして最後どうやってそれと通信できたかを述べる。


分散型SNSの可視化

前回は何を使って可視化しようかなと悩んでいろいろと試して比較したが、そのあと実際に形にしたので、今はこういったダッシュボードがいつでも眺められる。

System metrics dashboard

On Mount Buddha

I was looking for a mountain to climb. I wanted something easy for a change, but still preferably one of the 100 famous mountains of Japan. In the end I went with Mt Daibosatsu, which is relatively close, easy to access (that is when the buses run) and isn’t difficult.


手軽に可視化したい

ここしばらくは空いてる時間でキツネという分散型SNSを開発している。分散型SNSは一台のサーバーで完結せず、ActivityPubやOStatusといったプロトコルでいろんなサービス(Mastodon, Pleromaなど)とのサーバー間の通信も重要。

本番に上がって使ってもらう時はもちろん、現状の開発中でもログは不可欠。バグがもしあった時に、いちいちデバグ文をあちこちに入れて何とか原因を突き詰める作業をできるだけ減らしたい。俺に考えつくのは、例えばリクエストや処理が失敗したとしても、初段の調査に最低限必要な情報は既にログにあるようにしたい。


甲武信ヶ岳・金峰山・瑞牆山

甲武信ヶ岳は名前もおもしろいし、関東の百名山でもあるから興味を持った。問題は、アクセスが悪すぎるところ:塩山か山梨からバスはあるが、後者は山荘で時刻表を発見するまでそもそも知らなかったし、本数と時間は山バスのいつもの感じ(あまりない)。始発で家出ても、バスの都合で日帰りはできないかも。そしてどうせ山で泊まるのなら、いっそ縦走したい。というわけで(初)縦走してきた