並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 47件

新着順 人気順

Zigの検索結果1 - 40 件 / 47件

  • VSCodeがWebAssemblyの実行時デバッグに対応。C/C++やRust、Zigなどのソースコードと関連付け、変数参照、ブレークポイントなど可能に

    VSCodeがWebAssemblyの実行時デバッグに対応。C/C++やRust、Zigなどのソースコードと関連付け、変数参照、ブレークポイントなど可能に マイクロソフトは、オープンソースで開発しているコードエディタ「Visual Studio Code」(以下、VSCode)の最新版となる2023年9月版(バージョン1.83)で、JavaScriptデバッガがWebAssemblyのデバッグにも対応したことを明らかにしました。 The JavaScript debugger can now debug code compiled into WebAssembly if it includes DWARF debug information. For example, C++ code compiled using Emscripten can be debugged: pic.twitt

      VSCodeがWebAssemblyの実行時デバッグに対応。C/C++やRust、Zigなどのソースコードと関連付け、変数参照、ブレークポイントなど可能に
    • 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をやる
      • Zig探訪 - comptime編

        イントロ さあ、やって参りました。 第1回Zig探訪のお時間です。 今回担当するのは、Zigを使い始めて早くも半年・永遠のニートことsmallkirbyです。 Zig探訪では、Zigの機能や特徴の中で面白いんじゃないかと思うものをピックアップして紹介していきます。 紹介しないこともあります。 第1回のテーマは、Zigの中でも特に重要なコンセプトであるcomptimeについてです。 Zigとは - Everything is Explicit Zigについておさらい 第1回ということで、最初に軽くZigについておさらいしておきましょう。 Zigは、2016年に開発が始まったコンパイル型汎用プログラミング言語です。 Rustが2015年に1.0リリースされた翌年に開発がスタートしたんですね。 最新のリリースはv0.12.0であり、大体1年くらいでマイナーアップデートされるようです。 まだ1.0

          Zig探訪 - comptime編
        • C++でもRustでもなく「Zig」が必要なのはなぜか

          関連キーワード プログラマー | プログラミング 機械語に近い「低水準言語」を扱う開発者の心をつかみそうな新しいプログラミング言語がある。その名を「Zig」という。2024年7月時点で完全版はまだ公開されていないが、開発が盛んで、コミュニティーの熱気もある。 なぜ今新しいプログラミング言語が必要なのか。より具体的に言えば、Zigには「C」「C++」「Rust」「D」などのプログラミング言語を上回る点はあるのか。本連載はZigの主要なメリット5つを取り上げる。 「Zig」が必要なのはなぜ? その5つのメリット 併せて読みたいお薦め記事 新たなプログラミング言語を学んでみよう CでもC++でもなくプログラミング言語「Go」を使いたくなる“あの良さ”とは? プログラミング言語「Carbon」は「C++」より何が優れているのか メリット1.シンプルかつ簡潔な構文を備える 複雑ではないことがZigの

            C++でもRustでもなく「Zig」が必要なのはなぜか
          • GitHub - zigcc/zig-cookbook: Simple Zig programs that demonstrate good practices to accomplish common programming tasks.

            You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

              GitHub - zigcc/zig-cookbook: Simple Zig programs that demonstrate good practices to accomplish common programming tasks.
            • Zig, Rust, and other languages | notes.eatonphil.com

              Having worked a bit in Zig, Rust, Go and now C, I think there are a few common topics worth having a fresh conversation on: automatic memory management, the standard library, and explicit allocation. Zig is not a mature language. But it has made enough useful choices for a number of companies to invest in it and run it in production. The useful choices make Zig worth talking about. Go and Rust are

              • Making a Chess Engine in Zig

                I had the honor of speaking at Systems Distributed at the end of June. Since it was hosted by TigerBeetle who is one of the largest zig users, a lot of the zig community was there. After talking to some of them, Zig seemed more interesting for me to try out. Around the same time my youtube algorithm got me hooked on chess content. I'm not a good chess player by any means, but it started giving me

                • 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

                  • Zig探訪 - エコシステム編

                    イントロ さあ、やって参りました。 第2回 Zig探訪 のお時間です。 今回担当するのは、ここ最近冷房が寒くてエアコンを消すと、今度は内部洗浄で湧き出てくる熱気のせいでまた部屋が暑くなることに悩まされている、社会人歴マイナス2年のsmallkirbyです。昨日Ubuntuを24.04にしました。まだ22.04使ってる人は反省してください。もう22.04からアップグレードできます。Ubuntuは最初のポイントリリースまでアップグレードできない印象あったんだけど、どういうこと? Zig探訪では、Zigの機能や特徴の中で面白いんじゃないかと思うものをピックアップして紹介していきます。 紹介しないこともあります。 第2回のテーマは、Zigを取り囲むエコシステムについてです。 実際にコーディングをする上で開発体験に大きく影響を与える部分ですね。 最近の言語だと、ただ言語仕様自体が優れているだけでは不

                      Zig探訪 - エコシステム編
                    • What's Zig got that C, Rust and Go don't have? (with Loris Cro)

                      Zig is a programming language that’s attempting to become “the new C” - the language of choice for low-level systems programming and embedded hardware. Going into that space not only puts it in competition with C and C++, but also other newcomers like Rust and Go. So what makes Zig special? Joining us to discuss it is Loris Cro from the Zig Foundation. We talk through Zig’s reasons to exist, its

                        What's Zig got that C, Rust and Go don't have? (with Loris Cro)
                      • Basic MetaProgramming in Zig

                        While I've written a lot about Zig, I've avoided talking about Zig's meta programming capabilities which, in Zig, generally falls under the "comptime" umbrella. The idea behind "comptime" is to allow Zig code to be run at compile time in order to generate code. It's often said that an advantage of Zig's comptime is that it's just Zig code, as opposed to a separate, often limited, language as seen

                        • Writing a task scheduler in Zig

                          I'm working on an application that needs the ability to schedule tasks. Many applications have a similar need, but requirements can vary greatly. Advanced cases might require persistence and distribution, typically depending on external systems (like a database or queue) to do much of the heavy lifting. My needs are simpler: I don't have a huge variety of tasks or a high number of them. Thread-Per

                          • Zig defer Patterns

                            Zig defer Patterns Mar 21, 2024 A short note about some unexpected usages of Zig’s defer statement. This post assumes that you already know the basics about RAII, defer and errdefer. While discussing the differences between them is not the point, I will allow myself one high level comment. I don’t like defer as a replacement for RAII: after writing Zig for some time, I am relatively confident that

                            • C、C++でもRustでもなく「Zig」に期待できるのはなぜか

                              関連キーワード プログラマー | プログラミング 企業で主流のシステムプログラミング言語としては「C」「C++」、近年では「Rust」などが存在する一方、新たな言語として「Zig」が頭角を現し始めた。ZigはC/C++の代替を目指しつつ、モダンな機能を備えている。本稿はZigの5つのメリットのうち、2つのメリットを取り上げる。 「Zig」に期待できるのはなぜか 併せて読みたいお薦め記事 連載:プログラミング言語「Zig」とは 前編:C++でもRustでもなく「Zig」が必要なのはなぜか 新たなプログラミング言語を学んでみよう CでもC++でもなくプログラミング言語「Go」を使いたくなる“あの良さ”とは? プログラミング言語「Carbon」は「C++」より何が優れているのか メリット3.ビルドが容易 可能な限り最適化された実行可能ファイルをZigで作成するには、以下のシンプルなコマンドを実行

                                C、C++でもRustでもなく「Zig」に期待できるのはなぜか
                              • Factor is faster than Zig! – Re: Factor

                                Factor: the language, the theory, and the practice. Factor is faster than Zig! Recently, I was looking at the Zig programming language. As I often do, I started implementing a few typical things in new languages to learn them. Well, one of them was super slow and Zig is supposed to be super fast, so I was trying to understand where the disconnect was and compare it to Factor! I was able to reduce

                                • Zig is now also a Windows resource compiler - ryanliptak.com

                                  As of a few weeks ago, a cross-platform Windows resource compiler called resinator that I've been working on has been merged into the Zig compiler. This means that the latest master version of Zig can now compile (and cross-compile) Windows resource-definition script (.rc) files for you and link the resulting .res into your program. In addition, the PE/COFF resource table is also used for embedded

                                  • [Zig] Arena Allocatorを使った "ふつうの" Zigプログラミング

                                    タイトルは、『ふつうのHaskellプログラミング』にちなんでみた。一見難しく感じるZigが、Pythonなどのように"ふつうに"使えると感じるきっかけにこの記事がなると嬉しい。 (記事自体の難易度もふつうにしたかったのだけれど、自分の技量不足で専門用語が多くなってしまったので、今後加筆して簡単にいきたい。) 自分がZigを書き始めようと思った理由はいくつかあるのだけれど、一番大きな理由は「Arena Allocator(アリーナ・アロケーター)」を理解したことが大きかった。 Zigなどのメモリを自分で管理しなければならない言語というのは、開発コストが大きい、と自然に感じてしまう。自分もZigに以前から魅力を感じていたけれど、それがネックで長い間敬遠していた。 ちなみにArena Allocatorを自分が知ったきっかけは実はZigではなく、EmberGenという有名なリアルタイムシミュレ

                                      [Zig] Arena Allocatorを使った "ふつうの" Zigプログラミング
                                    • When Zig outshines Rust - Memory efficient enum arrays

                                      Enums (or tagged unions) whose variants vary in size are prone to significant memory fragmentation in Rust. That's because we need to allocate enough data to accommodate the largest variant. Figure 1: Consider the following enum: This presents real pain when collecting a large number of them into a Vec or HashMap. The padding can be dealt with using some form of struct of arrays (SoA) transformati

                                      • Using Zig to Call C Code: Strings

                                        Zig is a new, open-source programming language designed to replace C. I’m still a Zig beginner, so I’m trying to learn the language by using Zig to rewrite parts of existing C applications. One of the first challenges I encountered with Zig is understanding strings. I couldn’t find detailed documentation about how Zig strings work when calling C code, so I’m sharing my findings in case they’re hel

                                        • GitHub - yamafaktory/hyperzig: HyperZig - A Hypergraph Implementation in Zig

                                          You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                            GitHub - yamafaktory/hyperzig: HyperZig - A Hypergraph Implementation in Zig
                                          • Zig's New CLI Progress Bar Explained - Andrew Kelley

                                            Zig's New CLI Progress Bar Explained Sometimes, programming projects are too easy and boring. Sometimes, they're too hard, never ending or producing subpar results. This past week I had the pleasure of completing a project that felt like maximum difficulty - only possible because I am at the top of my game, using a programming language designed for making perfect software. This problem threw every

                                            • ZigでWeb Assemblyのインタプリタを書いてみた | 株式会社ヌーラボ(Nulab inc.)

                                              プログラミング言語Zigを使ってWebAssembly (Wasm) のインタプリタを書いてみました。SIMD命令以外のテストは通っているので、Core Specification version 1.0の範囲はサポートできているはずです。 作ったインタプリタの紹介 作ったインタプリタはGitHubで公開済みなのでクローンして試すことができます。クローン後、Zigを導入済みであれば zig runで実行できます。 試しに2つの整数の足し算関数addを含む次のようなWasmバイナリを実行させてみましょう。まず、wasm-objdumpでバイナリの中身を確認してみます。2つの整数を取り1つの整数を返すaddという関数があり、それが単に足し算をしているだけであるのがわかります。 ❯ wasm-objdump -dx add.wasm add.wasm: file format wasm 0x1

                                                ZigでWeb Assemblyのインタプリタを書いてみた | 株式会社ヌーラボ(Nulab inc.)
                                              • 凍結されたアカウントによるポストです。 https://twitter.com/Voss_Zig/status/1722377576445002015

                                                • 【海外記事紹介】なぜ私がZigではなく(いまだに)Rustを使っているのか

                                                  6月15日、Pekka Enberg氏が「Why I am not yet ready to switch to Zig from Rust」と題した記事を公開した。この記事では、ZigからRustに移行しない理由について詳しく紹介されている。 以下に、その内容を簡潔にまとめて紹介する。 C言語への愛着とその問題点 Enberg氏は、C言語のプログラミングに対する愛着を述べつつ、C言語が安全でないことや低レベルな言語であることに言及している。多くのコードを手作業で書かなければならない点や、デバッグに多くの時間を費やす必要がある点が問題とされている。 Rustのメモリ安全性と複雑性 Rustが登場した際、Enberg氏はそのメモリ安全性に魅力を感じたが、ツールの変化やborrow checker(借用チェッカー)の理解に苦労し、一度は諦めた。しかし、2021年にRustをプロフェッショナルに

                                                    【海外記事紹介】なぜ私がZigではなく(いまだに)Rustを使っているのか
                                                  • GitHub - judofyr/spice: Fine-grained parallelism with sub-nanosecond overhead in Zig

                                                    Spice uses heartbeat scheduling to accomplish extremely efficient parallelism in Zig: Sub-nanosecond overhead: Turning your function into a parallelism-enabled function adds less than a nanosecond of overhead. Contention-free: Threads will never compete (i.e. spin) over the same work. Adding more threads to the system will not make your program any slower, but the extra threads might be completely

                                                      GitHub - judofyr/spice: Fine-grained parallelism with sub-nanosecond overhead in Zig
                                                    • Why I am not yet ready to switch to Zig from Rust

                                                      Jun 19, 2024 Why I am not yet ready to switch to Zig from Rust I am not going to lie: I love programming in C. I know it’s a little bit irrational, but programming in C just feels right. Perhaps that’s because I did spend a lot of time programming with C as I contributed to the Linux kernel. Those were good times because I had the opportunity to learn from some of the best C programmers in the wor

                                                        Why I am not yet ready to switch to Zig from Rust
                                                      • 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

                                                        • 0.13.0 Release Notes ⚡ The Zig Programming Language

                                                          Tier 4 Support § Support for these targets is entirely experimental. If this target is provided by LLVM, LLVM may have the target as an experimental target, which means that you need to use Zig-provided binaries for the target to be available, or build LLVM from source with special configure flags. zig targets will display the target if it is available. This target may be considered deprecated by

                                                          • Tokamak: A web framework for Zig – Kamil Tomšík

                                                            I’ve been recently extracting some parts of Ava into a separate open-source projects, and one of them is Tokamak, a web framework for Zig. So first of all, why Zig? Zig is a very interesting language, it’s a low-level language but with a very powerful metaprogramming support. Hm… ok, I’m too far ahead, so maybe let’s start from the beginning… AllocatorsAt first, I thought Zig is not a good fit for

                                                            • Thoughts on Zig

                                                              Zig is a programming language designed by Andrew Kelley. The official website lists three principles of the language: No hidden control flow. No hidden memory allocations. No preprocessor, no macros. For someone like me coming mostly from Rust, Go and TypeScript, this is different—and different is interesting, so I wanted to know what it feels like to write code in it. Here are my thoughts after 3

                                                                Thoughts on Zig
                                                              • GitHub - cztomsik/tokamak: Server-side framework for Zig, relying heavily on dependency injection.

                                                                You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                                  GitHub - cztomsik/tokamak: Server-side framework for Zig, relying heavily on dependency injection.
                                                                • Effective TypeScript › A TypeScripter's Take on Zig (Advent of Code 2023)

                                                                  What can Zig learn from TypeScript, and what can TypeScript learn from Zig? The Advent of Code is a fun annual programming competition with an Elf theme. It consists of 25 two-part problems of increasing difficulty, released every day in December leading up to Christmas. Every December, I complete it in a new programming language. Every January, I intend to blog about the experience. Usually this

                                                                    Effective TypeScript › A TypeScripter's Take on Zig (Advent of Code 2023)
                                                                  • 【衝撃】ジンバブエ、自国の通貨をジンバブエドルからジンバブエゴールド(ZiG)に変更したという🇿🇼💰

                                                                    オールド ハーバー ビュ ー ⚓️ Old Harbor View @M7XajFWcQOTdj4W ジンバブエ人は新しい現地通貨(ZiG)を受け入れる ストーリー:マーシー・ボフ マスヴィンゴ州の人々は、取引上の課題を解決し、価値を維持する上で最善の前進であるとして、新しい通貨ジンバブエ ゴールド (ZiG) を歓迎しています。 x.com/zbcnewsonline/… pic.twitter.com/uREFTVZ4bI ZBC News Online @ZBCNewsonline Zimbabweans embrace the new local currency (ZiG) Story by Mercy Bofu THE people of Masvingo have embraced the new Zimbabwe Gold (ZiG) currency saying it

                                                                      【衝撃】ジンバブエ、自国の通貨をジンバブエドルからジンバブエゴールド(ZiG)に変更したという🇿🇼💰
                                                                    • POPPYのインタビュー公開!YouTubeで動画クリエイターとしても活躍する革新的SSWがニュー・アルバム『Zig』を本日10/27リリース!日本の音楽誌初インタビュー!| 激ロックニュース

                                                                      革新的なサウンドを発信するアーティストを多く抱えるSumerian Recordsの中でも、特に尖った存在として近年注目を集めているPOPPY。かわいらしい見た目とはギャップのある前衛的なサウンドと、実験的なヴィジュアル・アート、その根底にあるのは、かなりのサブカル・マニアで日本のカルチャーにも造詣が深い彼女の探求心だ。そして、そんな彼女のニュー・アルバム『Zig』は、新たな挑戦が詰め込まれたダンサブルなサウンドながら、心地よい毒も仕込まれた不思議な魅力に満ちている。今回は、そんな新作とそれが生まれた背景にある彼女のアート・スタイルや、これまでの活動についても詳しく語ってもらった。 POPPY | 激ロック インタビュー Poppy - ZIG ▼リリース情報 POPPY ニュー・アルバム 『Zig』 NOW ON SALE!! [Sumerian Records] 1. Church O

                                                                        POPPYのインタビュー公開!YouTubeで動画クリエイターとしても活躍する革新的SSWがニュー・アルバム『Zig』を本日10/27リリース!日本の音楽誌初インタビュー!| 激ロックニュース
                                                                      • ZIG | PRODUCTS | ZANE ARTS

                                                                        上部リング、中央シリンダー、下部ファンネルにより横から真下まで広範囲に光を拡散。最大200lm/7hの高効率リチャージャブルランタン。

                                                                          ZIG | PRODUCTS | ZANE ARTS
                                                                        • ZIG 3D STORM HYDRO。 - カメラ屋元公式中の人 アオキのブログ

                                                                          昔からそうですけど マニアックなハイテクスニーカー好きです♪ よくこのブログを見ていただいている方はご存知ですが、そんなに出かけないのにスニーカーやたら買ってます(笑)しかも8割リーボックです(笑)なんですかね、何か昔からリーボック好きなんですよね♪ naoyafs1.hatenablog.com naoyafs1.hatenablog.com naoyafs1.hatenablog.com naoyafs1.hatenablog.com naoyafs1.hatenablog.com naoyafs1.hatenablog.com naoyafs1.hatenablog.com naoyafs1.hatenablog.com naoyafs1.hatenablog.com まだおろしていないものもあるので山積みになっていますが(笑)スニーカーっていうのは買う事に意味がありますから(笑)あ

                                                                            ZIG 3D STORM HYDRO。 - カメラ屋元公式中の人 アオキのブログ
                                                                          • Zigを使ってWindows向けにmrubyをクロスビルドしたかったが失敗した - ぶていのログでぶログ

                                                                            rfではLinux/Mac/Windows向けのバイナリを提供している。 LinuxとMac向けのバイナリについてはZigを使ってクロスビルドしている。 では、Windows向けはどうしているかというとgccを使ってクロスビルドしている。 何故かというと、rfのWindows対応を開発していた当初もZigを使ったクロスビルドを試していていたのだが、うまくいかなかった。 そのままWindows対応を見送るのはなんとなく嫌だったので、gccを使った方法に舵を切ったという経緯がある。 最近rfのビルド環境を見直していて、ついでにWindows向けのバイナリもZigを使う方法がないか再度調査していた。 結果としてはビルドはできたが意図した通り動かず、そしてそれがどうすればいいかわからなかったので失敗に終わった…。 失敗はしたがまたチャレンジした時の参考にするために備忘として残しておく。 なぜZig

                                                                              Zigを使ってWindows向けにmrubyをクロスビルドしたかったが失敗した - ぶていのログでぶログ
                                                                            • Zig 0.11 日本語

                                                                              Zig 0.11 [日本語] Appendix Appendix Containers Grammar Zen Arrays Arrays Multidimensional Arrays Sentinel-Terminated Arrays Assembly Assembly Clobbers Global Assembly Input Constraints Output Constraints Async Functions Async Functions Atomics Atomics Blocks Blocks Empty Blocks Shadowing Build Mode Build Mode Debug ReleaseFast ReleaseSafe ReleaseSmall Builtin Functions Builtin Functions @addrSpaceCas

                                                                              • zig のビルドシステム

                                                                                const std = @import("std"); pub fn build(b: *std.Build) void { const exe = b.addExecutable(.{ .name = "hello", .root_source_file = b.path("hello.zig"), .target = b.host, // 👈 実行環境と同じ。クロスビルドしない }); b.installArtifact(exe); }

                                                                                  zig のビルドシステム
                                                                                • Zig+Zag/夜海神話 - ガラパゴスからの船出

                                                                                  Zig+Zagと出会ったのは、今から20年程前に放送されていた「熱唱オンエアバトル」でのこと。何やらホラーテイストなビジュアルの二人組が「夜海神話」という曲を引っ提げて登場した。結果は最下位でオフエアだったのだが、そのインパクトに釘付けになってしまった。 そしてそこから数カ月して再び登場したZig+Zag。この番組では前回オフエアだった人たちは、大体他の曲を持ってくるのだが、なぜかサポートメンバーを引き連れて再び同じ曲で挑戦。 KBも順位も伸ばしたものの、再びオフエアとなった。しかし彼らは諦めなかった。パフォーマンスを強化し、三度目の出演でまた同じ曲を披露したのだ。 そして結果はまさかのトップ通過。その衝撃に司会のハリガネロックは二人して笑いを堪えきれなくなってしまった。 そんなひねくれロックバンドZig+Zagの「原点」ともいえる曲、それがこの「夜海神話」である。 ボーカルのK~様曰く「

                                                                                    Zig+Zag/夜海神話 - ガラパゴスからの船出