タグ

2017年9月11日のブックマーク (2件)

  • iconvがクソすぎる

    思うに、私が最初のOSに不自由なWindowsを選んだのは正解だったかもしれない。すくなくとも、Win32 APIはPOSIXよりはるかに使いやすい。 問題はiconvだ。一体どこの糞が何をキメながら設計したらこうなったんだ。狂っているにも程がある。 size_t iconv (iconv_t cd, const char ** inbuf, size_t * inbytesleft, char ** outbuf, size_t * outbytesleft) ; ポインターのポインターであるには理由がある。iconvは、すべて書き換えるからだ。ポインターを書き換えるのでポインターへのポインターを要求する。当然だ。当然であって欲しくないが当然だ。 なんでそんなに馬鹿げた副作用を持ち込むんだ。それでは必ずlvalueを渡さなければならないし、大抵の場合、もとの値を保持しておきたいから、オブ

    qnighy
    qnighy 2017/09/11
  • How to stage only part of a new file with git?

    I love git add --interactive. It is now part of my daily workflow. The problem seems that it does not work with untracked files. What I want to do is track a new file, but only add part of it, i.e. some parts of this new file are not yet ready to be staged. For example, with git add -i, I can chose the patch option and even edit individual hunks in order to stage parts of the new code, leaving deb

    How to stage only part of a new file with git?
    qnighy
    qnighy 2017/09/11