.. Potential project list 潜在的なプロジェクトたち ======================== .. This is a list of projects that are interesting for potential contributors .. who are seriously interested in the PyPy project. They mostly share common .. patterns - they're mid-to-large in size, they're usually well defined as .. a standalone projects and they're not being actively worked on. For small .. projects that you might want to work on, it's much better to either look .. at the `issue tracker`_, pop up on #pypy on irc.freenode.net or write to the .. `mailing list`_. This is simply for the reason that small possible projects .. tend to change very rapidly. 以下は、 PyPy プロジェクトに真剣に興味を持っている潜在的な貢献者にとっては興味深いであろうプロジェクトのリストです。 それらはの殆どは以下のようなパターンを満たします。 - 中〜大規模 - スタンドアロンのプロジェクトとして定義される - 積極的に活動していない 参加しようと思っている小さなプロジェクトがあるならば、 `issue tracker`_ を見たり、 irc.freenode.net の #pypy チャンネルで発言するか、 `mailing list`_ に書いてください。 .. This list is mostly for having on overview on potential projects. This list is .. by definition not exhaustive and we're pleased if people come up with their .. own improvement ideas. In any case, if you feel like working on some of those .. projects, or anything else in PyPy, pop up on IRC or write to us on the .. `mailing list`_. このリストは、主に潜在的プロジェクトの概要を示します。このリストは定義ではありませんが、自身の改善案を思いつく場合は満足しています。 どのケースにおいても、もしあなたがいくつかのプロジェクトや PyPy に関する他の何かに取り組みたいと思うなら、 IRC で発言するか、 `mailing list`_ に書いてください。 .. Numpy improvements Numpy の実装 ------------ .. This is more of a project-container than a single project. Possible ideas: これは一つのプロジェクトよりもプロジェクトコンテナの詳細です。 案としては以下のようなものがあります。 .. * experiment (with auto-vectorization using SSE) or (implement vectorization .. without automatically detecting) it for array operations. * 配列操作のための SSE を用いた自動ベクトル化、もしくは自動検出を用いないベクトル化の実装の実験 .. * improve numpy, for example implement memory views. * メモリビューを実装するなどの numpy の改良 .. * interface with fortran/C libraries. * fortran/C ライブラリのインタフェイス .. Improving the jitviewer jitviewer の改良 ---------------- .. Analyzing performance of applications is always tricky. We have various .. tools, for example a `jitviewer`_ that help us analyze performance. アプリケーションのパフォーマンス解析はいつもトリッキーです。 パフォーマンス解析のためには様々ツールがありますが、例えば `jitviewer`_ はその助けとなるものの一つです。 .. The jitviewer shows the code generated by the PyPy JIT in a hierarchical way, .. as shown by the screenshot below: jitviewer は以下のスクリーンショットのように、 PyPy の JIT コンパイラによって生成されたコードを階層的な方法で見せるものです。 .. - at the bottom level, it shows the Python source code of the compiled loops - ボトムレベルでは、コンパイルされたループの Python ソースが表示されます .. - for each source code line, it shows the corresponding Python bytecode - ソースコードの一行ごとに、対応する Python のバイトコードが表示されます .. - for each opcode, it shows the corresponding jit operations, which are the .. ones actually sent to the backend for compiling (such as ``i15 = i10 < .. 2000`` in the example) - 命令ごとに対応する JIT 操作が表示され、それは実際にバックエンドに送信され、コンパイルされます (例では ``i15 = i10 < 2000``) .. image:: image/jitviewer.png .. The jitviewer is a web application based on flask and jinja2 (and jQuery on .. the client): if you have great web developing skills and want to help PyPy, .. this is an ideal task to get started, because it does not require any deep .. knowledge of the internals. jitviewer は flask と jija2 を使った Web アプリケーションです。(クライアントサイドでは jQuery を使っています) もしあなたが Web 開発のすごいスキルを持っていて、 PyPy を助けたいのであれば最初に手をつけるのには最適なタスクでしょう。 jitviewer は PyPy の内部構造の深い知識を全く必要としないからです。 .. Translation Toolchain 変換ツールチェイン ------------------ .. * Incremental or distributed translation. * インクリメンタル、もしくは分散変換 .. * Allow separate compilation of extension modules. * 拡張モジュールを個別にコンパイル可能にする .. Work on some of other languages 他の言語でのいくつかの作業 -------------------------- .. There are various languages implemented using the RPython translation toolchain. .. One of the most interesting is the `JavaScript implementation`_, but there .. are others like scheme or prolog. An interesting project would be to improve .. the compatibility of those or to experiment with various optimizations. いくつかの言語が RPython 変換ツールチェインを利用して実装されています。 最も興味深いもののうちの一つが `JavaScript 処理系`_ ですし、他にも schema や prolog などもあります。 その興味のあるプロジェクトで JIT 性能の改善や、様々な最適化の実験をおこないます。 .. Various GCs 様々なガーベジコレクション -------------------------- .. PyPy has pluggable garbage collection policy. This means that various garbage .. collectors can be written for specialized purposes, or even various .. experiments can be done for the general purpose. Examples PyPy は取り替え可能なガーベジコレクションの方針を持っています。 これが意味するところは、特殊な目的のために様々なガーベジコレクタを書くことや、一般的な目的のための様々な実験を行えるということです。 例えば .. * An incremental garbage collector that has specified maximal pause times, .. crucial for games * ゲームに必要な最大停止時間の短さに特化したインクリメンタルなガーベジコレクタ .. * A garbage collector that compact memory better for mobile devices * モバイルデバイス用のメモリ使用量の少ないガーベジコレクタ .. * A concurrent garbage collector (a lot of work) * 並列ガーベジコレクタ(多くの仕事があります) などです。 .. Remove the GIL GIL の除去 ---------- .. This is a major task that requires lots of thinking. However, few subprojects .. can be potentially specified, unless a better plan can be thought out: これは考えることの多い主要なタスクです。ただし、良い計画を考えられる限り、いくつかのサブプロジェクトに分けられます。 .. * A thread-aware garbage collector * マルチスレッド対応のガーベジコレクタ .. * Better RPython primitives for dealing with concurrency * 同時実行に対処可能なよりよい RPython のプリミティブなデータ .. * JIT passes to remove locks on objects * オブジェクトのロックを除去するために JIT をパスする .. * (maybe) implement locking in Python interpreter * (おそらく)インタプリタのロックを実装する .. * alternatively, look at Software Transactional Memory * あるいは、 Software Transactional Memory の研究 .. Introduce new benchmarks 新しいベンチマークの紹介 ------------------------ .. We're usually happy to introduce new benchmarks. Please consult us .. before, but in general something that's real-world python code .. and is not already represented is welcome. We need at least a standalone .. script that can run without parameters. Example ideas (benchmarks need .. to be got from them!): 通常新しいベンチマークの紹介は満足しています。 紹介する前に我々に相談してください。しかし、実際の Python コードや、まだ上がっていないものに関しては大凡歓迎します。 必要なのは、少なくともスタンドアロンかつパラメータなしで動かせるスクリプトです。 例えば (ベンチマークにはそれらを手に入れることが必要です!) * `hg` * `sympy` などです。 .. Experiment (again) with LLVM backend for RPython compilation RPython コンパイルのための LLVM バックエンドの(再)実験 ------------------------------------------------------ .. We already tried working with LLVM and at the time, LLVM was not mature enough .. for our needs. It's possible that this has changed, reviving the LLVM backend .. (or writing new from scratch) for static compilation would be a good project. 我々は既にLLVM の上で PyPy を動かすことを試しました。 LLVM は我々が必要とするほどには枯れていませんでした。 その状況は既に変わっている可能性があり、静的コンパイルのための LLVM バックエンドを復活させる(もしくは新しく書きなおす)ことは良いプロジェクトになります。 .. (On the other hand, just generating C code and using clang might be enough. .. The issue with that is the so-called "asmgcc GC root finder", which has tons .. of issues of this own. In my opinion (arigo), it would be definitely a .. better project to try to optimize the alternative, the "shadowstack" GC root .. finder, which is nicely portable. So far it gives a pypy that is around .. 7% slower.) (一方で、 C コードの生成に clang は clang を使用すれば十分であるかもしれません。 それには、いわゆる "asmgcc GC root finder" という重い問題があります。 私の考えでは (arigo)、とてもポータブルで、別のもの("shadowstack GC ルート探索)の最適化に挑戦するよりも間違いなく良いプロジェクトになるでしょう。これまでのところ、PyPy に 7% 程度の速度低下をもたらします。) .. Embedding PyPy 組み込み PyPy ------------- .. Being able to embed PyPy, say with its own limited C API, would be .. useful. But here is the most interesting variant, straight from .. EuroPython live discussion :-) We can have a generic "libpypy.so" that .. can be used as a placeholder dynamic library, and when it gets loaded, .. it runs a .py module that installs (via ctypes) the interface it wants .. exported. This would give us a one-size-fits-all generic .so file to be .. imported by any application that wants to load .so files :-) 制限された C API を持つ PyPy を組み込むことは役立つでしょう。 しかしここに EuroPython での生討論の延長線上にあるとても面白い変形があります。 動的リンクライブラリのプレースホルダとして使える汎用の "libpypy.so" を持つことができます。 ロードされるとき、それは (ctypes 経由で)エクスポートされたいインタフェイスをインストールする .py モジュールを実行します。 これは、.so ファイルをロードしたい様々なアプリケーションからインポートされる一つのファイルにまとまった汎用的な .so ファイルを私たちに与えるでしょう。 .. _`issue tracker`: http://bugs.pypy.org .. _`mailing list`: http://mail.python.org/mailman/listinfo/pypy-dev .. _`jitviewer`: http://bitbucket.org/pypy/jitviewer .. .. _`JavaScript implementation`: https://bitbucket.org/pypy/lang-js/overview .. _`JavaScript 処理系`: https://bitbucket.org/pypy/lang-js/overview