Skip to content

NOJ Judge Server v0.3.1 Triangle Patch 1

Choose a tag to compare

@ZsgsDesign ZsgsDesign released this 14 Mar 19:20
· 14 commits to master since this release

This update of NOJ Judge Server provides the fix for Javascript judger. Before NOJ Judge Server uses WebkitGTK maintained by GNU teams, which is a wonderful Webkit porting project, enabling command line usages. But the recent update of WebkitGTK breaks some features inside thus making the package unusable.

After some failed tries we can only abandon that package and pick Node.js instead.

Since this version, NOJ Judge Server would replace the previous Javascript compiler with a brand new Node.js 16 compiler, this also means changes in standard IO.

The sample code for Node.js A+B Problem is here:

var fs = require('fs');
var input = fs.readFileSync('/dev/stdin').toString().split(' ');
var a = parseInt(input[0]);
var b = parseInt(input[1]);
console.log(a+b);

Or if you prefer:

const [a,b] = require('fs').readFileSync('/dev/stdin').toString().split(' ').map(n => parseInt(n, 10));
console.log(a+b);

Full Changelog: v0.3.0...v0.3.1

docker pull ghcr.io/njuptaaa/judge_server:v0.3.1