compilex is a node.js library which is used to build online code editor/compiler websites and webservices.
-another solution is to run the server.js in virtual machine but the same problem can happen and shutdown the virtual machine so i I thought about using a virtual machine for each client with virtualbox command line for example but that was more complicated
-and one more possible solution is to scan the client code and prevent the client from using system calls and from importing system libraries or any suspected library but that need a lot of work and and its depend on each language
i also thought about new powerful features :
more properties in the callback argument "data" beside data.error and data.output
for example data.memory Consumed and data.timeConsumed or data.cpuConsumed
data.otherStatistics
it can be done using addon like timemem.exe https://raw.githubusercontent.com/jafingerhut/clojure-benchmarks/master/bin/readme-timemem.txt
or using WMIC on windows
Great insights @xnio94 . I started writing this library , when I barely know what node.js is during my college days . So , I have done a lot of mistakes in writing compilex. However , I managed it to do the basic stuff. You had almost mentioned all the shortcomings of the library , that I wanted to discuss. Next version would strive to overcome the challenges that we are facing right now.
You too had done a great job man . Your summarizes are really helpful. I will keep you updated with the library and Thanks once again man :+1:
I'am trying to implement the compilex project on my website...can i do it like this?
<html>
<head>
<script>
// POST
var code=$('#codeWritten').val();
var compiler = require('compilex');
var options = {stats : true}; //prints stats on console
compiler.init(options);
var envData = { OS : "windows"};
//else
var envData = { OS : "linux" }; // (Support for Linux in Next version)
compiler.compileJava( envData , code , function(data){
res.send(data);
});
// Delete temporary files
compiler.flush(function(){
console.log('All temporary files flushed !');
});
// GET
compiler.fullStat(function(data){
res.send(data);
});
</script>
</head>
<body>
<center>
<h1>Dylan Compiler</h1>
<form id="myform" name="myform" method="post" action="">
<h3>Code</h3>
<textarea id = 'codeWritten' rows="13" cols="100" id="code" name="code" ></textarea>
<br/>
<input type="submit" value="submit" name="submit" />
</form>
</center>
</body>
</html>
Hi everyone,
I tried and hosted the demo that is available in this link https://github.com/scriptnull/compilex/tree/master/examples
I am getting following error while running a java program with user input.
C:\zzz\zzz\Desktop\RunIT\node_modules\compilex\javaModule.js:143
fn(out)
^
TypeError: fn is not a function
at C:\zzz\zzz\Desktop\RunIT\node_modules\compilex\javaModule.js:143:12
Has anyone faced this error? or Am I doing something wrong?