Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Add C++ as a playable language

Đang mở
#2 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
52/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp, javascript, node.js
Lĩnh vực
backend, devtools, testing

Hướng nghiên cứu

Start with backend/arena/runner/harness.js, comparing pythonProgram and javascriptProgram, then inspect LANGUAGES, starterCode, and the relevant tests in backend/tests/. Implement a C++ driver and typed starter code for supported problem types, wire up the Judge0 language id, and validate correct and incorrect solutions across difficulty levels and types using a real Judge0. Done means npm test and node scripts/check-boundary.js pass.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

help wanted

Popular for competitive programming. C++ has no built-in JSON reader, so the driver needs a small parser for the input format above. std::pair / std::tuple cover the tuple types.

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 of pythonProgram / javascriptProgram. The marker nonce must stay per-run.
  • LANGUAGES in the same file: add { label, judge0Id }.
  • starterCode(problem, language): typed starter code built from problem.function (name, params[].type, returns).
  • backend/arena/runner/executors.js: localExecutor only knows node and python3; 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.yml in the repo root runs one locally).
  • Tests in backend/tests/ covering the driver output and starter code; npm test stays green.
  • node scripts/check-boundary.js passes.
Ngôn ngữ chính
JavaScript
Star
0
Fork
2
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của sennaicodes/codearena

Tất cả issue của sennaicodes/codearena

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.