Skip to main content
Python開発者向けツールRuff/uvの開発チーム(Astral inc.)がPython向けの型チェッカーを新規開発しているので紹介いたします。この型チェッカーはコードネーム"Red-knot"と呼ばれており、まだリリース前ですが将来的にはRuffに組み込まれる予定であるようです。以下ではこのプロジェクトの概略を説明したいと思います。 特徴 既存の型チェッカー(e.g. mypy, pyright)の不満点である遅さを改善すべく、徹底的にパフォーマンスに気を配った設計となっています。pyrightもそこまで遅くはないのですが、さらに高速であることを目指すようです。 Red-knotはRuffと同様Rustを用いて実装されています。Ruffが使っている諸々のデータ構造を共有しているため、フォーマット、lint、静的解析が一気通貫で行えるようになります。JavaScriptツールチェイン
こんにちは。ウォンテッドリーでデータサイエンティストとして働いている市村(@chimuichimu1)です。この記事は Wantedly Advent Calendar 2024 の22日目の記事です。 私は普段業務で推薦システムの開発に携わっており、プロダクトを継続的かつ効率的に改善していくため、コードの内部品質が重要だと感じています。内部品質が保たれていないコードベースでは、機能追加や改善のスピードが落ちるだけでなく、バグの温床にもなります。 こうした内部品質を担保する1つの手段として、静的解析ツールの利用が考えられます。この記事では近年注目されている Python の静的解析ツールの Ruff について紹介したうえで、特にその高速性に焦点を当て、それがどう実現されているかについて深堀りしたいと思います。 目次Ruff とは Ruff が高速に動作する理由 並列性 冗長性の排除 整数値
Let’s build and optimize a Rust extension for Python by Itamar Turner-Trauring Last updated 16 Sep 2024, originally created 16 Sep 2024 If your Python code isn’t fast enough, you have many options for compiled languages to write a faster extension. In this article we’ll focus on Rust, which benefits from: Modern tooling, including a package repository called crates.io, and built-in build tool (car
TL;DR: uv is an extremely fast Python package installer and resolver, written in Rust, and designed as a drop-in replacement for pip and pip-tools workflows. uv represents a milestone in our pursuit of a "Cargo for Python": a comprehensive Python project and package manager that's fast, reliable, and easy to use. As part of this release, we're also taking stewardship of Rye, an experimental Python
I'm about to share a lengthy tale that begins with Apache OpenDAL™ op.read() and concludes with an unexpected twist. This journey was quite enlightening for me, and I hope it will be for you too. I'll do my best to recreate the experience, complete with the lessons I've learned along the way. Let's dive in! All the code snippets and scripts are available in Xuanwo/when-i-find-rust-is-slow TL;DRJum
Cargo.tomlにはデフォルトのメタデータとPyO3の依存関係(バージョン)などが記載されています。また、pyproject.tomlにはビルドツールとしてmaturinが使用されることなどがあらかじめ定義されています。 注目すべきはRustスクリプトを記述するsrc/lib.rsファイルです。以下のようなscaffold(足場)が最初から記載されています。 src/lib.rsにデフォルトで記載されているscaffold 1 use pyo3::prelude::*; 2 3 /// Formats the sum of two numbers as string. 4 #[pyfunction] 5 fn sum_as_string(a: usize, b: usize) -> PyResult<String> { 6 Ok((a + b).to_string()) 7 } 8 9
I started programming in Rust several years ago, and it has gradually changed the way I design programs in other programming languages, most notably in Python. Before I started using Rust, I was usually writing Python code in a very dynamic and type-loose way, without type hints, passing and returning dictionaries everywhere, and occasionally falling back to “stringly-typed” interfaces. However, a
Update: I gave a talk on this topic at P99 CONF 2023 and at PyCon IL 2024 (Hebrew). A while ago at $work, we had a performance issue with one of our core Python libraries. This particular library forms the backbone of our 3D processing pipeline. It’s a rather big and complex library which uses NumPy and other scientific Python packages to do a wide range of mathematical and geometrical operations.
Hi, I'm Alex. I'm a software resilience engineer. I care about building systems that work. I've worked for the government, in the private sector, and on open source. I'm based in Washington, DC. Sun, Oct 23, 2022 One of my least favorite kinds of bug is when two different systems are interacting and the result has bad behavior but it’s difficult to say which (if either!) system is at fault. This i
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.13 compatibility ⚖️ Drop-in parity with Flake8, isort, and Black 📦 Built-in caching, to avoid re-analyzing unchanged files 🔧
はじめに 最近ポッドキャスト聴く時間が少し減ってしまったんだけど、久しぶりに Talk Python to Me を聴いたらPydanticの話題でした(エピソードのリンクはこちら)。作者のSamuel Colvinさんが秋に予定しているメジャーバージョンアップの話をし始めたのですが、冒頭で「コアをRustで実装して17倍速くなる」と言っていて、リンク張られていたドキュメントを読みました。この記事はそこで語られていた内容を中心にPydantic v2についてご紹介します。 Pydanticとは v2の話の前に、そもそもPydanticとは何かについて簡単に触れておきます。PydanticはPythonの型ヒント情報を使ってデータバリデーション(データの妥当性検証)を行うライブラリです。予めデータの構造を定義しておいて、入力されたデータがその構造に合っているかを調べてくれます。 例えば、id
承前 Ergは私が数年前から開発を始め、つい一昨日公開したばかりのプログラミング言語です。 のはずですが、 早速、qnighyさんに捕捉していただきました。ありがとうございます。 この記事ではそのErgがどのような言語なのかざっくりと解説していきたいと思います。なお、紹介した機能の一部は未実装です。実装途中の機能を含むコードには*を、完全に未実装の機能を含むコードには**をつけておきます。 はじめに Pythonは概ね素晴らしい言語です。 オフサイドルールを世に知らしめた(?)、その可読性の高い文法。Numpy, SciPyを始めとする機械学習、科学技術計算用の膨大なライブラリ。 しかしPythonにもいくつかの弱点が存在します。 まず、動的型付け であること。それ自体は弱点というより良し悪しなのですが、明らかに動的型付けでは手に余るPythonプロジェクトが世に溢れています。 次に、一貫
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く