fix: replace mo:base references in optimization and randomness guides
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- rust
- 領域
- backend, documentation
調査の方向性
docs/guides/backends/randomness.md、docs/guides/canister-management/optimization.md、およびリージョン別の例に関する dfinity/examples リポジトリの構成から始めます。random_lottery の例とそのマーカーおよび mops.toml を作成し、.sources/examples サブモジュールを更新し、randomness.md を CodeExample とともに randomness.mdx に移行して、古い最適化に関する注記を削除します。完了条件は、ガイドで legacy の mo:base 参照を推奨しなくなり、新しい例が指定された3つのリージョンをカバーしていることです。
索引モデルが issue の本文から書いたものです。
説明
Two docs pages reference `mo:base` in notes about upstream examples. Rather than patching the notes, the right fix is a purpose-built example and a full guide rewrite.
Current state
- `docs/guides/backends/randomness.md` — notes that `motoko/random_maze` in `dfinity/examples` uses `mo:base/Random.Finite`
- `docs/guides/canister-management/optimization.md` — notes that `motoko/low_wasm_memory` uses legacy `mo:base`
Plan
randomness.md (primary scope)
Per issue #44, create a new `random_lottery` example (Motoko + Rust, Ninja-enabled) with three focused regions:
| Region | What it shows |
|---|---|
| `raw_rand_call` | Calling the management canister's `raw_rand` |
| `random_in_range` | Deriving a bounded `Nat` from the 32-byte result |
| `fair_selection` | Picking a winner from a list |
Then:
- Add region markers + `mops.toml` in a PR to `dfinity/examples`
- Bump `.sources/examples` submodule
- Rewrite `randomness.md` → `randomness.mdx` using `` — the `mo:base` note disappears naturally
- Keep `random_maze` as a "see also" link (no note about `mo:base`)
The example is backend-only; ICP Ninja provides the UI for calling canister methods.
optimization.md (separate, smaller fix)
Remove the note about `motoko/low_wasm_memory` using legacy `mo:base` — the inline snippet in the page is already the correct `mo:core` reference. This is a one-line text change, independent of the `random_lottery` work.
Out of scope
Updating `random_maze` itself — the maze algorithm is too complex to serve as a teaching example for randomness patterns.
- 主要言語
- JavaScript
- スター
- 4
- フォーク
- 5
- 平均マージ
- 1日 6時間
- マージ済み PR(30日)
- 30
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
dfinity/developer-docs のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
dfinity/developer-docs#281 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
dfinity/developer-docs#279 ·
-
docs: cycle cost docs follow-up — ICP formula, worked example, instruction profiling, cost traps オープン
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
dfinity/developer-docs#274 ·
-
documentation enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
dfinity/developer-docs#232 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 65/100
dfinity/developer-docs#228 ·
dfinity/developer-docs の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Automattic/studio#4908 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
sugarlabs/musicblocks#8847 ·