Open velkyel opened 7 years ago
what's socket REPL?
do you know emacs commint file?
No. Do you mean comint? What's the advantage to start a socket REPL?
comint, sorry. "socket REPL" is now known name?
Advantage? Running game with embedded js vm. Toying, scripting, debugging.
How can I do that in NodeJS? Can you show me some prototype?
like this:
var net = require('net');
var server = net.createServer(function(socket) {
socket.setEncoding('utf8');
socket.on('data', function(data) {
var res = eval(data);
socket.end(res.toString());
});
});
server.listen(8000);
and run-js localhost:8000 in emacs.
I don't know nodejs too much -- actually I'd like to use js-comint mode to connect to my running app with embedded duktape (duktape.org) vm. This app listen and eval incoming data like example server.
is it possible to add connect to a socket REPL feature like in inf-clojure, please? There is possible to define inf-clojure-program like cons pair ("localhost" . 5555).