🌐 [translation-sync] Improve clarity and fix typos in need_for_speed lecture#102
🌐 [translation-sync] Improve clarity and fix typos in need_for_speed lecture#102
Conversation
…lecture Syncs translation of lectures/need_for_speed.md with upstream source PR #523. Changes include: - Restructure 'Pure Python is slow' → 'Why is Pure Python Slow?' with new subsections - Rewrite 'Why do we need them?' section (two reasons: Python is small, Python is slow) - Add three acceleration strategies (vectorization, JIT, parallelization) - Restructure parallelization section (multithreading before multiprocessing) - Rewrite multiprocessing/multithreading definitions correctly - Consolidate GPU/TPU sections into simpler structure - Remove redundant subsections and blank lines - Various wording improvements throughout Source: QuantEcon/lecture-python-programming#523
✅ Deploy Preview for majestic-griffin-10b166 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR syncs the Persian translation of the “Need for Speed” lecture to match the upstream target state from QuantEcon/lecture-python-programming#523, resolving prior conflicts and updating both the lecture content and translation metadata.
Changes:
- Restructures the “Pure Python is slow” portion into “Why is Pure Python Slow?” with updated subsections and revised wording.
- Updates/rewrites parallelization content (multithreading before multiprocessing) and consolidates GPU/TPU discussion.
- Updates translation sync state metadata (
source-sha,synced-at).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
lectures/need_for_speed.md |
Updates translated headings/frontmatter and revises multiple lecture sections for clarity and correctness. |
.translate/state/need_for_speed.md.yml |
Advances sync metadata to the new upstream source revision/date. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| **پایتون کوچک است** | ||
|
|
||
| هسته پایتون به طور عمدی کوچک طراحی شده است -- این به بهینهسازی، دسترسیپذیری و نگهداری کمک میکند. | ||
| هسته پایتون به طور طراحی کوچک است -- این به بهینهسازی، دسترسیپذیری و نگهداری کمک میکند. |
There was a problem hiding this comment.
عبارت «هسته پایتون به طور طراحی کوچک است» از نظر نگارشی/معنایی مبهم است. پیشنهاد میشود به فرم رایجتر مثل «بهگونهای طراحی شده است که کوچک باشد» یا «از نظر طراحی کوچک است» تغییر کند تا جمله طبیعیتر و دقیقتر شود.
| هسته پایتون به طور طراحی کوچک است -- این به بهینهسازی، دسترسیپذیری و نگهداری کمک میکند. | |
| هسته پایتون بهگونهای طراحی شده است که کوچک باشد -- این به بهینهسازی، دسترسیپذیری و نگهداری کمک میکند. |
| ``` | ||
|
|
||
| این عملیات پایتون را در نظر بگیرید: | ||
| این عملیات Python را در نظر بگیرید |
There was a problem hiding this comment.
قبل از بلوک کد، جمله «این عملیات Python را در نظر بگیرید» بدون نشانهگذاری پایانی آمده است. بهتر است برای معرفی مثال با «:» یا «.» تمام شود.
| این عملیات Python را در نظر بگیرید | |
| این عملیات Python را در نظر بگیرید: |
| اگر `a` و `b` رشته باشند، آنگاه `a + b` به الحاق رشتهها نیاز دارد | ||
|
|
||
| ```{code-cell} python3 |
There was a problem hiding this comment.
جمله قبل از مثال رشتهای («... به الحاق رشتهها نیاز دارد») بدون نشانهگذاری پایانی آمده است. بهتر است با «:» یا «.» تمام شود تا اتصال به بلوک کد روشن باشد.
| ``` | ||
|
|
||
| اگر `a` و `b` لیست باشند، آنگاه `a + b` نیاز به الحاق لیست دارد: | ||
| اگر `a` و `b` لیست باشند، آنگاه `a + b` به الحاق لیستها نیاز دارد |
There was a problem hiding this comment.
جمله قبل از مثال لیست («... به الحاق لیستها نیاز دارد») بدون نشانهگذاری پایانی آمده است. بهتر است با «:» یا «.» تمام شود تا معرفی بلوک کد درست انجام شود.
| اگر `a` و `b` لیست باشند، آنگاه `a + b` به الحاق لیستها نیاز دارد | |
| اگر `a` و `b` لیست باشند، آنگاه `a + b` به الحاق لیستها نیاز دارد: |
| زبانهای کامپایلشده با استفاده از انواع صریح و ایستا از این سربارها اجتناب میکنند. | ||
|
|
||
| به عنوان مثال، کد C زیر را در نظر بگیرید که اعداد صحیح از 1 تا 10 را جمع میکند: | ||
| برای مثال، کد C زیر را در نظر بگیرید که اعداد صحیح ۱ تا ۱۰ را جمع میکند |
There was a problem hiding this comment.
قبل از بلوک کد C، جمله «... را در نظر بگیرید که اعداد صحیح ۱ تا ۱۰ را جمع میکند» بدون نشانهگذاری پایانی آمده است. بهتر است با «:» یا «.» تمام شود.
| برای مثال، کد C زیر را در نظر بگیرید که اعداد صحیح ۱ تا ۱۰ را جمع میکند | |
| برای مثال، کد C زیر را در نظر بگیرید که اعداد صحیح ۱ تا ۱۰ را جمع میکند: |
| #### جمعزدن با کد کامپایلشده | ||
|
|
||
| در C یا Fortran، یک آرایه از اعداد صحیح در یک بلوک پیوسته واحد از حافظه ذخیره میشود: | ||
| در C یا Fortran، آرایهای از اعداد صحیح در یک بلوک پیوسته از حافظه ذخیره میشود |
There was a problem hiding this comment.
بعد از جمله «... در یک بلوک پیوسته از حافظه ذخیره میشود» بلافاصله فهرست گلولهای آمده است. بهتر است جمله با «:» تمام شود تا معرفی فهرست واضح باشد.
| در C یا Fortran، آرایهای از اعداد صحیح در یک بلوک پیوسته از حافظه ذخیره میشود | |
| در C یا Fortran، آرایهای از اعداد صحیح در یک بلوک پیوسته از حافظه ذخیره میشود: |
lectures/need_for_speed.md
Outdated
| پاسخ این است: قطعاً نه! | ||
|
|
||
| برای هر برنامه داده شده، خطوط نسبتاً کمی همیشه بحرانی از نظر زمان خواهند بود. | ||
| برای هر برنامهای، تعداد نسبتاً کمی از خطوط هرگز از نظر زمانی بحرانی خواهند بود. |
There was a problem hiding this comment.
در جمله «برای هر برنامهای، تعداد نسبتاً کمی از خطوط هرگز از نظر زمانی بحرانی خواهند بود.» واژه «هرگز» معنی جمله را برعکس میکند (میگوید هیچوقت بحرانی نیست). به نظر میرسد منظور «همیشه/معمولاً بحرانی خواهند بود» یا «(فقط) تعداد کمی ... بحرانی هستند» بوده است؛ لطفاً عبارت را اصلاح کنید تا با پیام پاراگراف سازگار شود.
| برای هر برنامهای، تعداد نسبتاً کمی از خطوط هرگز از نظر زمانی بحرانی خواهند بود. | |
| برای هر برنامهای، تنها تعداد نسبتاً کمی از خطوط از نظر زمانی بحرانی هستند. |
|
|
||
| اما این یک محدودیت برای کتابخانههای علمی مانند NumPy و Numba نیست. | ||
|
|
||
| توابع وارد شده از این کتابخانهها و کد JIT-compiled در محیطهای اجرای سطح پایین اجرا میشوند که محدودیتهای قدیمی پایتون اعمال نمیشود. |
There was a problem hiding this comment.
در جمله «... محدودیتهای قدیمی پایتون اعمال نمیشود» نهاد جمع («محدودیتها») با فعل مفرد آمده است. بهتر است به «اعمال نمیشوند» اصلاح شود.
| توابع وارد شده از این کتابخانهها و کد JIT-compiled در محیطهای اجرای سطح پایین اجرا میشوند که محدودیتهای قدیمی پایتون اعمال نمیشود. | |
| توابع وارد شده از این کتابخانهها و کد JIT-compiled در محیطهای اجرای سطح پایین اجرا میشوند که محدودیتهای قدیمی پایتون اعمال نمیشوند. |
✅ Translation Quality ReviewVerdict: PASS | Model: claude-sonnet-4-6 | Date: 2026-04-13 📝 Translation Quality
Summary: The translation of the modified sections is of high quality overall. Technical terminology is accurate and consistent with the reference glossary. The new sections on 'Why is Pure Python Slow?' and 'Type Checking' are well translated with preserved meaning. Minor fluency issues exist in a few phrases, particularly in the vectorization comparison section where idiomatic Python/statistics terms like 'draw uniforms' are translated too literally. Formatting and syntax are properly maintained throughout all changed sections. Technical terminology is consistently and correctly translated throughout all modified sections, following the reference glossary (e.g., 'برداریسازی' for Vectorization, 'موازیسازی' for Parallelization, 'شتابدهندههای سختافزاری' for Hardware Accelerators) The new sections 'Why is Pure Python Slow?' and 'Type Checking' are accurately translated with well-preserved technical content about dynamic vs static typing The YAML frontmatter translation metadata is properly structured with correct hierarchical heading mappings using double-colon notation MyST formatting, code blocks, figures, notes, and LaTeX math are all correctly preserved across all modified sections The 'Accessing GPU Resources' section is clearly and accurately translated, including the nuanced explanation of GPU cores vs CPU cores in the note block Suggestions:
🔍 Diff Quality
Summary: The translation correctly reflects all structural changes from the source, with updated heading map entries matching the reorganized sections including the renamed 'Why is Pure Python Slow?' section, new 'Type Checking' subsection, reordered parallelization subsections, and consolidated GPU resources section. This review was generated automatically by action-translation review mode. |
The word 'هرگز' (never) inverted the meaning of 'relatively few lines are ever going to be time-critical'. Fixed to 'تنها تعداد نسبتاً کمی از خطوط از نظر زمانی بحرانی هستند' (only relatively few lines are time-critical).
Automated Translation Sync
This PR contains automated translations from QuantEcon/lecture-python-programming.
Source PR
#523 - Improve clarity and fix typos in need_for_speed lecture
Files Updated
lectures/need_for_speed.md.translate/state/need_for_speed.md.ymlDetails
This PR was created manually to replace PR #97, which had merge conflicts with the previously merged PR #93. Both PRs modified
lectures/need_for_speed.md. See action-translation#63 for the underlying design issue.Copilot review notes from PR #97
5 comments — all about missing punctuation before code blocks (translation-only, minor). One subject-verb agreement note.