-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: accept javascript programming language #546
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution! Really appreciated it.
However, we currently are punting the initiatives of adding language support for "non-CP" languages (JS, TS, PHP). This is because for it to be effective, we need to support "function-style" submission. By this I mean contestants can just fill a skeleton and submit it:
function add(a, b) {
return 0; // complete here
}
without actually reading the inputs from stdin, which is not really convenient and intuitive.
The current infrastructure still does not support this.
We may revisit this in the future, but I'll keep this PR open. 😄
...ines/src/main/java/judgels/gabriel/languages/javascript/JavascriptNode18GradingLanguage.java
Outdated
Show resolved
Hide resolved
...ines/src/main/java/judgels/gabriel/languages/javascript/JavascriptNode18GradingLanguage.java
Outdated
Show resolved
Hide resolved
Hi @fushar , when you say 'keep this PR open,' do you mean to keep it open until the infrastructure supports functional-style submission or until I have resolved the previous comments? Btw, platforms like Codeforces also support Node.js (https://codeforces.com/contest/1881/submission/229061225). Maybe keeps both functional-style and input-output submissions? This PR is for handling the input-output submission. Wdyt? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @fushar , when you say 'keep this PR open,' do you mean to keep it open until the infrastructure supports functional-style submission or until I have resolved the previous comments?
Until the infra supports.
Btw, platforms like Codeforces also support Node.js (https://codeforces.com/contest/1881/submission/229061225). Maybe keeps both functional-style and input-output submissions? This PR is for handling the input-output submission. Wdyt?
I'm sorry, but I'd delay it until the infra supports / there is use case. Reasons:
- JavaScript is not still popular for CP,
- we are increasing the Docker image size of the grader without justified reason.
🙏
.../judgels-grader-engines/src/main/java/judgels/gabriel/languages/GradingLanguageRegistry.java
Outdated
Show resolved
Hide resolved
Okay, I will reopen this PR, but on a different branch. I accidentally used my master branch as the base branch, so I cannot contribute next time until this PR is merged. |
Resolve #439
For now, I choose to use Node.js version v18 as the Grader Runtime.
Local Testing:
Example submission file for the A+A problem: