Skip to content

Add Wasm Evaluators to Python Language#19

Draft
jonasongg wants to merge 1 commit into
mainfrom
add-python-wasm
Draft

Add Wasm Evaluators to Python Language#19
jonasongg wants to merge 1 commit into
mainfrom
add-python-wasm

Conversation

@jonasongg

@jonasongg jonasongg commented Apr 21, 2026

Copy link
Copy Markdown

waiting for source-academy/py-slang#149 to be merged

@jonasongg jonasongg changed the title Add Wasm evaluators to Python Language Add Wasm Evaluators to Python Language Apr 21, 2026
@jonasongg jonasongg marked this pull request as draft April 21, 2026 07:48

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces WebAssembly evaluators for Python versions 1 through 4 by adding new evaluator definitions and including them in the respective language configurations. Feedback was provided regarding the hardcoded base URL used across multiple files, suggesting the use of a shared constant to improve maintainability.

const python1Wasm: IEvaluatorDefinition = {
id: "python1Wasm",
name: "WebAssembly",
path: "https://source-academy.github.io/py-slang/PyWasmEvaluator1.js",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The base URL https://source-academy.github.io/py-slang/ is hardcoded here and across multiple other files (python2.ts, python3.ts, python4.ts). This duplication creates a maintenance risk if the hosting location changes. Consider defining a shared constant for the base URL in a central location (e.g., a constants file or the python/index.ts file) to ensure a single source of truth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant