タグ

2024年1月2日のブックマーク (8件)

  • 大規模コードベース向けASTツールのast-grepについて

    大規模なコードベース向けの高速なASTツールとしてast-grepというものがある。これについての調査メモ。 主に以下の公式ドキュメントを読み進めて、利用方法、パターンやルールの詳細などについて理解を深める。 ast-grepとは 公式ドキュメントでは、コードの検索からLint、codemodに至るまでASTツールとして網羅的にカバーできるツールであることが以下のように表現されている。 Think ast-grep as an hybrid of grep, eslint and codemod. 結果に精度が求められる場面では、高速であるものの精密さに欠けるテキストベースではなく、ASTベースでの正確な解析の方が望ましいだろうけど、ASTでの記述は非常に面倒になりがちという側面がある。 その点においてast-grepは、テキストベースでのgrepではなく、ASTベースでのgrepというよ

    大規模コードベース向けASTツールのast-grepについて
    xef
    xef 2024/01/02
  • A CAP tradeoff in the wild

    There’s a classic tradeoff between safety and liveness in the context of replicated data systems, originally proposed by Eric Brewer and later made precise by Seth Gilbert and Nancy Lynch. The idea is that, in a networked system of servers that is vulnerable to partitions (that is, where messages betweeen servers can be arbitrarily delayed, perhaps forever), it’s impossible to ensure both that whe

  • Rolling aggregates with SQL window functions

    xef
    xef 2024/01/02
  • 書評 「ダーウィンの呪い」 - shorebird 進化心理学中心の書評など

    ダーウィンの呪い (講談社現代新書) 作者:千葉聡講談社Amazon 書は千葉聡による「ダーウィンの自然淘汰理論」(特にそれが社会にどのような含意を持つかについての誤解や誤用)が人間社会に与えた負の側面(書では「呪い」と呼ばれている)を描く一冊.当然ながら優生学が中心の話題になるが,それにとどまらず様々な問題を扱い,歴史的な掘り下げがある重厚な一冊になっている. 冒頭ではマスメディアがしばしばまき散らす「企業や大学はダーウィンが言うように競争原理の中でもまれるべきであり,変化に対応できないものは淘汰されるべきだ」という言説を,まさに「呪い」であると憂いている.そしてそれが「呪い」であるのは,「進歩せよ,闘いに勝て,そしてそれは自然から導かれた当然の規範である」というメッセージがあるからだと喝破している(それぞれ,「進化の呪い」「闘争の呪い」「ダーウィンの呪い」と名付けられている). 第

    書評 「ダーウィンの呪い」 - shorebird 進化心理学中心の書評など
  • TypeScript Clearly & Quickly

    2024-01-01 quick-lint-js is a JavaScript bug finder. Today, version 3.0 makes it also a TypeScript bug finder! quick-lint-js complements TypeScript with beginner-friendly messages and fast linting. install quick-lint-js 🌐 try in browser code on GitHub Example code used in this article has been adapted from various open source projects, including some Copyright Tiny Technologies, Inc. and Copyrigh

  • ebpf-goによるLinuxカーネルトレース入門

    ebpf-goによるLinuxカーネルトレース入門 ebpf-goを使用したLinuxカーネルトレース(fentry)について紹介します。 ebpf-goは、eBPFのGo向けライブラリです。このライブラリは、libbpfに依存せず(cgoを使用せず)にeBPFプログラムとデータのやり取りが可能であるため、ポータビリティが高くGo言語に適したeBPFライブラリとなります。 fentryは、カーネル関数のエントリポイントにプログラムをアタッチするためのBPFプログラムタイプです。簡潔に言うと、カーネル関数にフック処理を行うことができます。 GitHub: ebpf-go(cilium/ebpf) 公式ドキュメント: The eBPF Library for Go 記事ではebpf-goのexamples内のtcprttを基に、ebpf-goの開発方法についても説明します。 前提条件として、

    ebpf-goによるLinuxカーネルトレース入門
  • Writing a TrueType font renderer

    This post was discussed further on Hacker News. 09 Jan, 2024: There was an issue with newsletter signups. If you tried to sign up, please try again! You should see a success message. Text is the medium of digital interaction, and text rendering has an outsized impact on the overall fit and finish of any system. It therefore pains me that axle has for years relied on a low-resolution 8x8 bitmap fon

    xef
    xef 2024/01/02
  • Some notes on NixOS

    Hello! Over the holidays I decided it might be fun to run NixOS on one of my servers, as part of my continuing experiments with Nix. My motivation for this was that previously I was using Ansible to provision the server, but then I’d ad hoc installed a bunch of stuff on the server in a chaotic way separately from Ansible, so in the end I had no real idea of what was on that server and it felt like

    xef
    xef 2024/01/02