Skip to content

🌐 [translation-sync] Improve clarity and fix typos in need_for_speed lecture#102

Merged
mmcky merged 3 commits intomainfrom
translation-sync-need-for-speed-pr-523
Apr 13, 2026
Merged

🌐 [translation-sync] Improve clarity and fix typos in need_for_speed lecture#102
mmcky merged 3 commits intomainfrom
translation-sync-need-for-speed-pr-523

Conversation

@mmcky
Copy link
Copy Markdown
Contributor

@mmcky mmcky commented Apr 13, 2026

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.yml

Details

  • Source Language: en
  • Target Language: fa
  • Model: claude-sonnet-4-6

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.

…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
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 13, 2026

Deploy Preview for majestic-griffin-10b166 ready!

Name Link
🔨 Latest commit 181ce15
🔍 Latest deploy log https://app.netlify.com/projects/majestic-griffin-10b166/deploys/69dcd7167d2c1d0008bb5285
😎 Deploy Preview https://deploy-preview-102--majestic-griffin-10b166.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

**پایتون کوچک است**

هسته پایتون به طور عمدی کوچک طراحی شده است -- این به بهینه‌سازی، دسترسی‌پذیری و نگهداری کمک می‌کند.
هسته پایتون به طور طراحی کوچک است -- این به بهینه‌سازی، دسترسی‌پذیری و نگهداری کمک می‌کند.
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

عبارت «هسته پایتون به طور طراحی کوچک است» از نظر نگارشی/معنایی مبهم است. پیشنهاد می‌شود به فرم رایج‌تر مثل «به‌گونه‌ای طراحی شده است که کوچک باشد» یا «از نظر طراحی کوچک است» تغییر کند تا جمله طبیعی‌تر و دقیق‌تر شود.

Suggested change
هسته پایتون به طور طراحی کوچک است -- این به بهینه‌سازی، دسترسی‌پذیری و نگهداری کمک می‌کند.
هسته پایتون به‌گونه‌ای طراحی شده است که کوچک باشد -- این به بهینه‌سازی، دسترسی‌پذیری و نگهداری کمک می‌کند.

Copilot uses AI. Check for mistakes.
```

این عملیات پایتون را در نظر بگیرید:
این عملیات Python را در نظر بگیرید
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

قبل از بلوک کد، جمله «این عملیات Python را در نظر بگیرید» بدون نشانه‌گذاری پایانی آمده است. بهتر است برای معرفی مثال با «:» یا «.» تمام شود.

Suggested change
این عملیات Python را در نظر بگیرید
این عملیات Python را در نظر بگیرید:

Copilot uses AI. Check for mistakes.
Comment on lines +176 to 178
اگر `a` و `b` رشته باشند، آنگاه `a + b` به الحاق رشته‌ها نیاز دارد

```{code-cell} python3
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

جمله قبل از مثال رشته‌ای («... به الحاق رشته‌ها نیاز دارد») بدون نشانه‌گذاری پایانی آمده است. بهتر است با «:» یا «.» تمام شود تا اتصال به بلوک کد روشن باشد.

Copilot uses AI. Check for mistakes.
```

اگر `a` و `b` لیست باشند، آنگاه `a + b` نیاز به الحاق لیست دارد:
اگر `a` و `b` لیست باشند، آنگاه `a + b` به الحاق لیست‌ها نیاز دارد
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

جمله قبل از مثال لیست («... به الحاق لیست‌ها نیاز دارد») بدون نشانه‌گذاری پایانی آمده است. بهتر است با «:» یا «.» تمام شود تا معرفی بلوک کد درست انجام شود.

Suggested change
اگر `a` و `b` لیست باشند، آنگاه `a + b` به الحاق لیست‌ها نیاز دارد
اگر `a` و `b` لیست باشند، آنگاه `a + b` به الحاق لیست‌ها نیاز دارد:

Copilot uses AI. Check for mistakes.
زبان‌های کامپایل‌شده با استفاده از انواع صریح و ایستا از این سربارها اجتناب می‌کنند.

به عنوان مثال، کد C زیر را در نظر بگیرید که اعداد صحیح از 1 تا 10 را جمع می‌کند:
برای مثال، کد C زیر را در نظر بگیرید که اعداد صحیح ۱ تا ۱۰ را جمع می‌کند
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

قبل از بلوک کد C، جمله «... را در نظر بگیرید که اعداد صحیح ۱ تا ۱۰ را جمع می‌کند» بدون نشانه‌گذاری پایانی آمده است. بهتر است با «:» یا «.» تمام شود.

Suggested change
برای مثال، کد C زیر را در نظر بگیرید که اعداد صحیح ۱ تا ۱۰ را جمع می‌کند
برای مثال، کد C زیر را در نظر بگیرید که اعداد صحیح ۱ تا ۱۰ را جمع می‌کند:

Copilot uses AI. Check for mistakes.
#### جمع‌زدن با کد کامپایل‌شده

در C یا Fortran، یک آرایه از اعداد صحیح در یک بلوک پیوسته واحد از حافظه ذخیره می‌شود:
در C یا Fortran، آرایه‌ای از اعداد صحیح در یک بلوک پیوسته از حافظه ذخیره می‌شود
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

بعد از جمله «... در یک بلوک پیوسته از حافظه ذخیره می‌شود» بلافاصله فهرست گلوله‌ای آمده است. بهتر است جمله با «:» تمام شود تا معرفی فهرست واضح باشد.

Suggested change
در C یا Fortran، آرایه‌ای از اعداد صحیح در یک بلوک پیوسته از حافظه ذخیره می‌شود
در C یا Fortran، آرایه‌ای از اعداد صحیح در یک بلوک پیوسته از حافظه ذخیره می‌شود:

Copilot uses AI. Check for mistakes.
پاسخ این است: قطعاً نه!

برای هر برنامه داده شده، خطوط نسبتاً کمی همیشه بحرانی از نظر زمان خواهند بود.
برای هر برنامه‌ای، تعداد نسبتاً کمی از خطوط هرگز از نظر زمانی بحرانی خواهند بود.
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

در جمله «برای هر برنامه‌ای، تعداد نسبتاً کمی از خطوط هرگز از نظر زمانی بحرانی خواهند بود.» واژه «هرگز» معنی جمله را برعکس می‌کند (می‌گوید هیچ‌وقت بحرانی نیست). به نظر می‌رسد منظور «همیشه/معمولاً بحرانی خواهند بود» یا «(فقط) تعداد کمی ... بحرانی هستند» بوده است؛ لطفاً عبارت را اصلاح کنید تا با پیام پاراگراف سازگار شود.

Suggested change
برای هر برنامه‌ای، تعداد نسبتاً کمی از خطوط هرگز از نظر زمانی بحرانی خواهند بود.
برای هر برنامه‌ای، تنها تعداد نسبتاً کمی از خطوط از نظر زمانی بحرانی هستند.

Copilot uses AI. Check for mistakes.

اما این یک محدودیت برای کتابخانه‌های علمی مانند NumPy و Numba نیست.

توابع وارد شده از این کتابخانه‌ها و کد JIT-compiled در محیط‌های اجرای سطح پایین اجرا می‌شوند که محدودیت‌های قدیمی پایتون اعمال نمی‌شود.
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

در جمله «... محدودیت‌های قدیمی پایتون اعمال نمی‌شود» نهاد جمع («محدودیت‌ها») با فعل مفرد آمده است. بهتر است به «اعمال نمی‌شوند» اصلاح شود.

Suggested change
توابع وارد شده از این کتابخانه‌ها و کد JIT-compiled در محیط‌های اجرای سطح پایین اجرا می‌شوند که محدودیت‌های قدیمی پایتون اعمال نمی‌شود.
توابع وارد شده از این کتابخانه‌ها و کد JIT-compiled در محیط‌های اجرای سطح پایین اجرا می‌شوند که محدودیت‌های قدیمی پایتون اعمال نمی‌شوند.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 13, 2026

✅ Translation Quality Review

Verdict: PASS | Model: claude-sonnet-4-6 | Date: 2026-04-13


📝 Translation Quality

Criterion Score
Accuracy 9/10
Fluency 8/10
Terminology 9/10
Formatting 9/10
Overall 8.8/10

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:

  • Vectorization vs pure Python loops - '1. n uniform را بکشید' is an awkward literal translation of 'draw n uniforms'. Suggest: '۱. n عدد تصادفی یکنواخت تولید کنید'

  • Why do we need them? - 'توزیع وظایف در چندین رشته / CPU / GPU / TPU' translates 'Shifting tasks' as 'توزیع' (distribution). More precise: 'انتقال وظایف به چندین رشته / CPU / GPU / TPU'

  • Summing with Compiled Code - 'می‌توان به هر نقطه داده متوالی با جابه‌جایی به جلو در فضای حافظه به اندازه‌ای معین و ثابت دسترسی یافت' is verbose. The original 'each successive data point can be accessed by shifting forward in memory space by a known and fixed amount' could be rendered more naturally as 'می‌توان با پیشروی مقدار ثابت و مشخصی در فضای حافظه به هر نقطه داده بعدی دسترسی یافت'

  • Which Should We Use? - 'چندرشته‌ای کافی خواهد بود' translates 'will suffice' correctly, but 'برای اکثریت قریب به اتفاق کاری که ما در این درس‌ها انجام می‌دهیم' is slightly awkward for 'the great majority of what we do in these lectures'. Suggest: 'برای بخش بزرگی از کاری که در این درس‌ها انجام می‌دهیم'


🔍 Diff Quality

Check Status
Scope Correct
Position Correct
Structure Preserved
Heading-map Correct
Overall 10/10

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.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 13, 2026

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).
@mmcky mmcky merged commit cac3f2a into main Apr 13, 2026
6 checks passed
@mmcky mmcky deleted the translation-sync-need-for-speed-pr-523 branch April 13, 2026 11:44
@github-actions github-actions bot temporarily deployed to pull request April 13, 2026 11:49 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants