タグ

articleとzigに関するefclのブックマーク (8)

  • 2024 Financial Report and Fundraiser ⚡ Zig Programming Language

    2024 Financial Report and FundraiserZig Software Foundation is a 501(c)(3) non-profit organization which I am proud to say makes extremely efficient use of monetary resources. Unlike many of our peers, our primary expense is direct payments to contributors for their enhancements to the Zig project. Don’t take my word for it - let’s look at some numbers. 2023 Expenditures

    efcl
    efcl 2024/01/20
    Zigの財務報告書。 収入は$0.5M。 GitHubのIssue/PR/Starは増加傾向、一方収入はUberのサポートとGitHub Sponsorsで、現状だと従業員へ支払う金額が不足してくるという話。
  • Using Zig to Unit Test a C Application

    Zig is a new, independently developed low-level programming language. It’s a modern reimagining of C that attempts to retain C’s performance while embracing improvements from the last 30 years of tooling and language design. Zig makes calling into C code easier than any other language I’ve used. Zig also treats unit testing as a first-class feature, which the C language certainly does not. These t

    efcl
    efcl 2023/12/20
    C言語コードをZigで読み込んでラッパーを作り、Unit Testを書く話
  • Zig And Rust

    Zig And Rust Mar 26, 2023 This post will be a bit all over the place. Several months ago, I wrote Hard Mode Rust, exploring an allocation-conscious style of programming. In the ensuing discussion, @jamii name-dropped TigerBeetle, a reliable, distributed, fast, and small database written in Zig in a similar style, and, well, I now find myself writing Zig full-time, after more than seven years of Ru

    efcl
    efcl 2023/12/04
    "Zig is a DSL for emitting machine code."
  • ZigでWriting an OS in 1,000 Linesをやる

    ZigでWriting an OS in 1,000 Linesをやる #2023-11-21 自作 OS で学ぶマイクロカーネルの設計と実装(通称エナガ)の補足資料として公開されているWriting an OS in 1,000 Linesを、できるだけZigでやってみることにした。 目次成果物 #repositoryは以下。 さいしょに #エナガは一通り読んでいたのだが、機能に対していくつかのOSの実装を眺める。という構成になっており、個人的には「同じような難易度でRV32を対象に 0->1 でシンプルなOSを作る書籍があるといいなあ」と思いながら読んでいたのだが、まさに欲していたものが公開されたので大喜びで実装を開始した。 自分はそのまま写経してしまうと頭に入らないため、異なる言語で書いてみたり、何らかの制約を課して実施することが多い。今回はZigで書いてみることにした。 概ね問

    ZigでWriting an OS in 1,000 Linesをやる
    efcl
    efcl 2023/11/21
    ZigでOS
  • Zig Build System Internals

    Zig has a built-in build system for building projects. It runs on every platform Zig supports and is capable of building everything from simple executables and libraries to complex, multi-artifact, multi-step projects. This page will dive into how the internals of the Zig build system works. Build systems are an extremely important detail of any software project. When they work, they can feel like

    efcl
    efcl 2023/09/17
    zig buildの仕組み
  • Talk: Introducing Ghostty and Some Useful Zig Patterns

    This is the text format of a talk I did for Zig Showtime. If you'd rather watch the video, you can find it on YouTube: Zig Showtime: Ghostty. The video also includes a Q&A session at the end which I did not include in this post. Hello! I'm excited to talk today about Ghostty. Ghostty is a brand new terminal emulator written from scratch in Zig. Note: at the time of writing this, Ghostty is still n

    efcl
    efcl 2023/09/17
    Zigでターミナルエミュレーターを作っているという話。 comptimeを使ったインターフェース定義、メタプログラミング的な型生成。 ZigをC static libraryとして出力してSwiftからはそれを呼ぶことでクロスプラットフォームの対応
  • Zigの@typeInfoと@Typeを理解する

    最初に結論 @TypeOf(): 値 → 型 (型名) @typeInfo(): 型 (型名) → 型情報 @Type(): 型情報 → 型 anytype: どんな型の値でも受け取れる、という意味の型 type: 型 (型名) を受け取る場合や、関数で型を返す場合に使う、型 (ちなみに@はZigの組み込み関数を表す。) まえがき: メタプログラミングだけど普通のコード Zigはcomptimeという強力なメタプログラミングの仕組みを持っているのだけれど、C++RustNimなどと違って、マクロやメタプログラミング専用の記法は基的に持っていない。 ではどうやってメタプログラミングするのかというと、comptimeは単に実行時にできることをコンパイル時にできるようにするというもので、さらにZigの画期的なアイデアとして、型そのものの情報をシンプルに構造体として読み取ったり操作することが

    Zigの@typeInfoと@Typeを理解する
    efcl
    efcl 2023/09/11
    zigでは型情報をコードとして取得できる。
  • Zig Is Self-Hosted Now, What's Next?

    Why self-host Zig? For great justice, of course… and also a few more reasons actually. With the upcoming 0.10.0 release of Zig on November 1st, we are going to ship the new self-hosted compiler. This is the result of a huge amount of work that brings a lot of benefits, some obvious, some others less so. Even though the self-hosted compiler is now shipped, there's still more work to do on it but, a

    Zig Is Self-Hosted Now, What's Next?
    efcl
    efcl 2022/10/26
    Zig 0.10.0でセルフホストコンパイラが入った
  • 1