clang-tidy is a clang-based C++ “linter” tool. Its purpose is to provide an extensible framework for diagnosing and fixing typical programming errors, like style violations, interface misuse, or bugs that can be deduced via static analysis. clang-tidy is modular and provides a convenient interface for writing new checks. Using Clang-Tidy¶ clang-tidy is a LibTooling-based tool, and it’s easier to w
Feb 05, 2025 When defining a type in Inko, it's allocated on the heap by default. For example (using the syntax for the upcoming 0.18.0 release): type User { let @id: Int let @username: String let @email: String } User(id: 42, username: 'Alice', email: 'alice@example.com') Here User is a heap allocated type, and the expression User(...) allocates an instance of this type using the system allocator
I wrote previously about different slices of life in the various implementations of the Scrapscript programming language. Until two weeks ago, the most interesting implementation was a so-called “baseline compiler” directly from the AST to C. Now we have an intermediate representation—an IR. Why add an IR? The AST is fine. It’s a very abstract representation of the progam text and it is easy to ge
かねてよりJITコンパイラに興味があったので、実装してみました。 今回はフィボナッチ数を計算する関数に絞って、これを高速化することを考えます。 リポジトリ 対象のコード 独自言語ですが、まあ説明は不要でしょう。 再帰関数になっているfib関数を高速化します。 fun fib(n) do if (n == 0) do return 1; end if (n == 1) do return 1; end return fib(n - 1) + fib(n - 2); end インタープリターを作る まずは普通にインタープリターを作ります。今回はZig言語を使ってみることにしました。 (Zig歴がまだ3日くらいの頃に書いているので、コードは拙いです) 中身はただの、LexerとParserとEvaluatorを組み合わせただけのものです。 そして書いたインタープリターのパフォーマンスを計測してみ
Pointers Are Complicated II, or: We need better language specs Some time ago, I wrote a blog post about how there’s more to a pointer than meets the eye. One key point I was trying to make is that just because two pointers point to the same address, does not mean they are equal in the sense that they can be used interchangeably. This “extra information” that distinguishes different pointers to the
The diagram above is the compiler for the language Bolt we’ll be building. What do all the stages mean? I have to learn OCaml and C++? Wait I haven’t even heard of OCaml… Don’t worry. When I started this project 6 months ago, I had never built a compiler, nor had I used OCaml or C++ in any serious project. I’ll explain everything in due course. In this series of posts we’ll be building a proper pr
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く