A year ago, I published Performance Improvements in .NET 6, following on the heels of similar posts for .NET 5, .NET Core 3.0, .NET Core 2.1, and .NET Core 2.0. I enjoy writing these posts and love reading developers’ responses to them. One comment in particular last year resonated with me. The commenter cited the Die Hard movie quote, “‘When Alexander saw the breadth of his domain, he wept for th
If you need to allocate dynamic memory in C, you use malloc() and free(). The API is very old, and while you might want to switch to a different implementation, be it jemalloc, tcmalloc, or mimalloc, they mostly copy the interface. It makes sense that they do that – they want to be a mostly drop-in replacement, but it’s still unfortunate because malloc() and free() are a bad API for memory allocat
At present all major operating system kernels are written in C/C++, languages which provide no or minimal assistance in avoiding common security problems. Modern languages such as Rust provide better security guarantees by default and prevent many of the common classes of memory safety security bugs. In this post we will take a brief look at existing community efforts towards this goal and build a
Docs | Playground An extremely fast Python linter and code formatter, written in Rust. Linting the CPython codebase from scratch. ⚡️ 10-100x faster than existing linters (like Flake8) and formatters (like Black) 🐍 Installable via pip 🛠️ pyproject.toml support 🤝 Python 3.12 compatibility ⚖️ Drop-in parity with Flake8, isort, and Black 📦 Built-in caching, to avoid re-analyzing unchanged files 🔧
最近Rustでちょいちょい書いてたエミュレーターをWebブラウザーで動くようにしました。 現在のところ、ゲームボーイ・ゲームボーイカラー、ゲームボーイアドバンス、ファミコン、スーパーファミコンが動きます。 当初からブラウザーでも動かすことを念頭に置いていたので、コア開発が一段落したら対応させたいと思っていました。実際に動かすに当たっては思い通りに進んだところもあり、そうでないところもありといったところで、ところどころで気づいたところを書いておいたら誰かの参考になるかもしれないので、とりとめのない話ですが書き残しておくことにします。 一応ウェブアプリなのにJavaScriptもTypeScriptも、ReactもAngularも、npmもwebpackも使わない、インド人完全無視カレーみたいなものになりましたが、それでもそこそこに良い感じにできた気はするので、私のようにフロントエンドから取り
この記事はハッシュテーブルについて1から説明する内容ではなくて,一度は学習したことがある人向けです. Rustにおける2つのバージョンの,異なるHashMapで使われる理論と実装を解説しています.Rustに限らずハッシュテーブルへの理解を深める役に立てば幸いです. ハッシュテーブルは平均$O(1)$でのインサート,サーチ,デリートをサポートするデータ構造です. いろんな言語にいろんなハッシュテーブルの実装があります.それぞれ中身の実装に微妙に差があったりして厳密な議論をする際にはその中身が大事になってきたりします.実装は大まかには類似していると思いますが,衝突処理や探索方法,冪乗or素数スロットなどに明確なバリエーションが存在します.このあたりの選択は使用するハッシュ関数の性質とアプリケーションの要件によってある程度決定されることです.よく使われるものもありますが,最もよいという組み合わせ
Avoiding the expensive commit parsing results in a nice constant factor speedup (about 6x in these examples), but we need something more to get even better performance out of certain queries. Reachability indexes One of the most important questions we ask about commits is “can commit A reach commit B?” If we can answer that question quickly, then commands such as git tag --contains and git branch
I recently built cargo-semver-checks, a linter that ensures crates adhere to semantic versioning. This is why and how I built it. Fearless development is a key theme throughout Rust. "If it compiles, it works", fearless concurrency, etc. But there's one aspect of Rust (and nearly all other languages) that isn't entirely fearless yet: cargo update, upgrading the versions of the project's dependenci
最近YouTuberのリュウジの料理を毎日作っているので至高とか無限とか言いがちですが個人の感想です。万人にとって美味しい料理はないように、万人にとって至高のツールは存在しません(何の話?)。ちなみに公開してすぐバグを見つけてしまったので全然至高じゃありませんでした。 要約 概要 特徴 使い方 流れ 事前準備 インタフェースの定義 SDKの生成 プラグインの実装 ホストの実装 実行 発展 Host Functions ファイルアクセス その他 苦労した点 まとめ 要約 Goでプラグイン機構を実現するためのツールを作りました。Protocol Buffersのスキーマからコードを自動生成するので簡単にプラグイン機構を実現可能です。内部的にはWebAssembly(Wasm)を使っています。最近はWasmはブラウザ外での利活用が進んでおり、今回のツールもブラウザは一切関係ないです。Wasmはサ
こんにちは、技術開発室の滝澤です。 先月(2022年7月)、『Software Design 2022年8月号』の特集記事『WebエンジニアのためのDNS速習講座』に『第2章:DNSの構成要素と名前解決のしくみ』という記事を寄稿しました。第1章でも滝澤が趣味で作成した資料『ドメイン名の歴史』が参考文献として掲載されていました。よい機会なので、ドメイン名ができるまでの歴史について文章としてまとめようと思い、この本ブログ記事を書きました。 なお、筆者自身はインターネットの原型であるARPANETや80年代のインターネットをリアルタイムには体験してはいないため、RFC(Request for Comments)やインターネット上にある当時のホストのアーカイブを元に調査した内容をまとめたものになります。 ARPANETの時代 1969年から1980年代初期にかけてのインターネットの原型となったAR
As we’ve been building Mach engine, we’ve been using a neat little pattern in Zig that enables writing flag sets more nicely in Zig than in other languages. What is a flag set?We’ve been rewriting mach/gpu (WebGPU bindings for Zig) from scratch recently, so let’s take a flag set from the WebGPU C API:
エムスリーエンジニアリンググループ AI・機械学習チームでソフトウェアエンジニアをしている中村(po3rin) です。検索とGoが好きです。 最近、Go1.19でsortパッケージのアルゴリズムが一部変更されました。 Pattern-defeating Quicksortが入った時のdiff 1.19リリースノートではPattern-defeating Quicksortが採用されたと紹介があります。実際にsort/zsortfunc.go、sort/zsortinterface.goにそれぞれpdqsort_func、pdqsortという関数があります。 // pdqsort sorts data[a:b]. // The algorithm based on pattern-defeating quicksort(pdqsort), but without the optimizati
Ferret is a free software lisp implementation designed to be used in real time embedded control systems. Ferret lisp compiles down to self contained C++11. Generated code is portable between any Operating System and/or Microcontroller that supports a C++11 compliant compiler. It has been verified to run on architectures ranging from embedded systems with as little as 2KB of RAM to general purpose
EngineeringOpen SourceGit’s database internals I: packed object storeThis blog series will examine Git’s internals to help make your engineering system more efficient. Part I discusses how Git stores its data in packfiles using custom compression techniques. Developers collaborate using Git. It is the medium that allows us to share code, work independently on our own machines, and then finally com
This post walks through how to take a standalone Haskell file and progressively package the file using Nix. In other words, we will tour a spectrum of packaging options ranging from simple to fancy. The running example will be the following standalone single-file Haskell program: GitHub - Gabriella439/spire - Spire.hs I won’t go into detail about what that program does, although you can study the
One of my pet peeves is when people abuse the term “Nix” without qualification when trying to explain the various components of the Nix ecosystem. As a concrete example, a person might say: “I hate Nix’s syntax” … and when you dig into this criticism you realize that they’re actually complaining about the Nixpkgs API, which is not the same thing as the syntax of the Nix expression language. So one
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く