国家某大型 973 科研课题的划水日常
阿里@黯晓 @hijiangtao
2017.7
分类/聚类
Open Source GPU Database and Visualization Platform for Real-Time Analytics.
* https://www.mapd.com/
// input
(function () {
function hello() { return 'hello'; }
function world() { return 'world'; }
global.s = hello() + ' ' + world();
})();
// output
(function () {
s = "hello world";
})();
// input
(function () {
var self = this;
['A', 'B', 42].forEach(function(x) {
var name = '_'
+ x.toString()[0].toLowerCase();
var y = parseInt(x);
self[name] = y ? y : x;
});
})();
// output
(function () {
_a = "A";
_b = "B";
_4 = 42;
})();
// input
(function () {
function fibonacci(x) {
return x <= 1 ?
x : fibonacci(x - 1) + fibonacci(x - 2);
}
global.x = fibonacci(23);
})();
// output
(function () {
x = 28657;
})();
// input
(function () {
let moduleTable = {};
function define(id, f) { moduleTable[id] = f; }
function require(id) {
let x = moduleTable[id];
return x instanceof Function ?
(moduleTable[id] = x()) : x;
}
global.require = require;
define("one", function() { return 1; });
define("two", function() {
return require("one") + require("one");
});
define("three", function() {
return require("two") + require("one");
});
define("four", function() {
return require("three") + require("one");
});
})();
three = require("three");
// output
(function () {
function _2() {
return 3 + 1;
}
var _1 = {
one: 1,
two: 2,
three: 3,
four: _2
};
function _0(id) {
let x = _1[id];
return x instanceof Function ?
_1[id] = x() : x;
}
require = _0;
three = 3;
})();
// input
(function(){
function fib(x) {
return x <= 1 ?
x : fib(x - 1) + fib(x - 2);
}
let x = Date.now();
if (x === 0) x = fib(10);
global.result = x;
})();
// output
(function () {
var _0 = Date.now();
if (typeof _0 !== "number") {
throw new Error(
"Prepack model invariant violation"
);
}
result = _0 === 0 ? 55 : _0;
})();
试一试
依旧离毕业遥遥无期...
阿里@黯晓 @hijiangtao
2017.7