[Note: This article has been updated since original publication.] We saw some time ago that the three major implementations of std::string are all quite different. To summarize: // gcc struct string { char* ptr; size_t size; union { size_t capacity; char buf[16]; }; bool is_large() { return ptr != buf; } auto data() { return ptr; } auto size() { return size; } auto capacity() { return is_large() ?
TSKaigi 2024 のトークと、登壇者がスライドを公開していればその URL を記載しています。 トラックごとのトーク、および登壇者情報は公式サイトに詳しく掲載されているので、そちらをご確認ください。
はじめに 以前つくった Minsta というデジタルスタンプラリーの Web アプリの中で、ブラウザ上で Canvas を使用してスタンプ風の画像を生成する機能があるのですが、前々からもう少し画像のファイルサイズを落とせそうだなと思っていたので、今回 Rust と WebAssembly を使用して PNG ファイルを極限まで圧縮するのに挑戦してみました。 Minsta については以下の記事をご覧ください。 動機 Minsta では単色で背景透過の以下のようなスタンプの PNG 画像をブラウザ側で Canvas の toBlob メソッドを使用して生成しているのですが、このメソッドで PNG エンコードすると 32 bit の RGB+alpha 形式のファイルしか生成できず、 Minsta で扱うような単色の画像にとっては余計にデータサイズが膨らんでしまっていました。 PNG は使用する
This blog shares our experience organizing variant types of Error in a complex system like GreptimeDB, from how an error is defined to how to log the error or present it to end-users. Such a system is composed of multiple components with their own Error definitions. Status Quo of Rust's Error Handling A few standard libraries in Rust provide Error structs that implement std::error::Error, like st
はじめに: 今回のこの記事を執筆するにあたり、suleiman.jp様、Sar7様のお二方には貴重なアドバイスをいただきました。この場を借りてお礼申し上げます。 正直自分もHyperflipとDariacoreはどう違うのかあまりよくわかっていませんし、特に違いがあるような気もしないです。ただこれからDariacoreやHyperflipを聴き始めたい、作りたいと思っている人は違いが分からな過ぎて困っていると思うので、自分が知っている範囲で解説したいと思います。 すごい大まかにいえば、海外→Dariacore, 日本→Hyperflipです。大まかすぎていろんな人から怒られると思いますが、とりあえず許して。最後まで目を通せば、何が言いたかったのか分かるようになっているので。 Dariacore/Hyperflipのざっくりとした解説Dariacore/Hyperflipをすごい大雑把に解説
This week I found myself digging through the code of c4, an implementation of C “in four functions”, by Robert Swierczek. I remember coming across c4 when it was released ten years ago. It got me excited: hey, C in four functions, that means it’s easy to understand right? That excitement turned into “oh, I see” as soon as I scrolled through the code. c4 is dense, barely commented, and, frankly, st
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く