Add Go as a playable language
@PatrickLoughran 已经在做这个了。
开始于 2026年10月8日。
评估
这个 Issue 还没有评估数据。
描述
Probably the easiest of the three: encoding/json handles input and output.
CodeArena runs player code in Python, JavaScript and TypeScript. Adding a language is self-contained and a great way to get into the codebase.
Where the code lives
backend/arena/runner/harness.js: one small driver per language. The driver reads{"tests":[{"args":[...]}]}as JSON on stdin, calls the player's function once per test, and prints the per-run marker line followed by a JSON array of{ ok, value }/{ ok, error }. Copy the shape ofpythonProgram/javascriptProgram. The marker nonce must stay per-run.LANGUAGESin the same file: add{ label, judge0Id }.starterCode(problem, language): typed starter code built fromproblem.function(name,params[].type,returns).backend/arena/runner/executors.js:localExecutoronly knowsnodeandpython3; add your compiler for local development if you like (it is never used in production).
Types the 45 problems use
integer, integer[], integer[][], number[], string, string[], boolean, and tuples: [integer, integer], [integer, integer][], [integer, integer, integer][], [string, integer][], [string, string, string][], [integer, integer, string].
Statically typed languages need a mapping for each of these. If a mixed tuple such as [string, integer] has no clean equivalent in your language, it is fine to leave that problem out for your language rather than force an awkward type: the loader supports per-problem languages via runnableLanguages.
Definition of done
- Driver plus typed starter code for every problem your language supports.
- Judge0 language id wired up (Judge0 CE: Java 62, C++ 54, Go 60; confirm on your Judge0 instance).
- Proof: correct solutions pass and wrong ones fail on a spread of problems (easy, medium, hard, and every type above) against a real Judge0 (
docker-compose.judge0.ymlin the repo root runs one locally). - Tests in
backend/tests/covering the driver output and starter code;npm teststays green. node scripts/check-boundary.jspasses.
- 主要语言
- JavaScript
- 星标
- 0
- 派生
- 2
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
sennaicodes/codearena 的其他 Issue
-
Add issue and pull request templates可能重新可做 @franciscorodr26 于 18 天前认领,目前没有进行中的 PR。 未关闭documentation good first issue
难度 2/5 1-3 小时 新手友好度 85/100
sennaicodes/codearena#13 · 1 条评论 ·
-
enhancement help wanted
难度 5/5 一周以上 新手友好度 45/100
sennaicodes/codearena#34 ·
-
enhancement help wanted
难度 5/5 一周以上 新手友好度 35/100
sennaicodes/codearena#33 ·
-
enhancement help wanted
难度 5/5 一周以上 新手友好度 45/100
sennaicodes/codearena#32 ·
-
enhancement help wanted
难度 5/5 一周以上 新手友好度 38/100
sennaicodes/codearena#31 ·
查看 sennaicodes/codearena 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
fossasia/scrum_helper#949 ·
维护者通常 2 天内回复
-
Learn Faust tutorial: Blocks step says Faust loads block CSS, but no WordPress styles are applied未关闭[Type] Bug Needs Triage
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
TheOdinProject/curriculum#31493 ·
维护者通常 1 天内回复
-
[Report] Some official plugins are marked as Stable, but their Readme says they are experimental未关闭
难度 2/5 1-3 小时 新手友好度 67/100
TiddlyWiki/TiddlyWiki5#10061 ·
维护者通常 1 天内回复
-
documentation ready
难度 1/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复