Shared here, for the sake of discussion only, here is my BASH script prototype to install the New Loebner Prize Protocol on Linux. Please do not try to run this script on a computer. I removed the shebang #!/bin/bash from the top of the script, so it can not run. This early work in progress is throwing errors as of this post.
Disclaimer: Any and all use of the this BASH script in any form is strictly prohibited. It is strictly for discussion purposes only.
(Removed the shebang so the BASH shell can not interpret this script.)
sudo -s
# Install npm:
apt install npm
# Install express
apt install node-express-generator
# Install socket.io
npm install -g socket.io
# Install socket.io-client
npm install -g socket.io-client
After the script finished a test run... Running the server on node.js
produced this error: Cannot find module 'socket.io'
DEPRECATED use https://github.com/pillarjs/path-to-regexp
module.js:328
throw err;
^
Error: Cannot find module 'socket.io'
at Function.Module._resolveFilename (module.js:326:15)
at Function.Module._load (module.js:277:25)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/home/human/Downloads/LoebnerPrizeProtocol-master/server/server.js:5:8)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
It seems the script may have successfully installed socket.io which can be found here: /usr/local/lib/node_modules/socket.io and also express which can be found here: /usr/local/lib/node_modules/express. But this is all going to have to be looked at more closely.
Please refrain from disparaging the new LPP here. The purpose of this thread is to discuss how to setup the new Loebner Prize Protocol.
Reference: https://github.com/jhudsy/LoebnerPrizeProtocol
UPDATE: server.js is "listening"
Edited file: server.js
//var io=require('socket.io')(http);
var io = require('/usr/local/lib/node_modules/socket.io')(http);
//var client=require('socket.io-client');
client=require('/usr/local/lib/node_modules/socket.io-client');
LinuxShell#: node server.js
DEPRECATED use https://github.com/pillarjs/path-to-regexp
listening
This is a proof of concept that the new LPP server is running on Linux. Once again, it is for discussion purposes only. Obviously, it has had minimal testing. Exporting the shared libraries on Linux can be done later... Next on the agenda, let's try to test run some chatbot contestants and judges.
DEPRECATED use https://github.com/pillarjs/path-to-regexp
listening
connection detected
connection detected
#:/server/server.js:227
clients[o.to].emit("message",JSON.stringify(o));
^
TypeError: Cannot read property 'emit' of undefined
at handleCommunicationMessage (/var/www/html/LPC/server/server.js:227:18)
at Socket.<anonymous> (/var/www/html/LPC/server/server.js:321:38)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at /usr/local/lib/node_modules/socket.io/lib/socket.js:509:12
at nextTickCallbackWith0Args (node.js:419:9)
at process._tickCallback (node.js:348:13)
The server starts.
Connections are detected.
Crashes on first client input, "hello"
NOTE: This is a test run on a "localhost:8080" instead of '127.0.0.1:8080'
//var io=require('socket.io')(http);
var io = require('/usr/local/lib/node_modules/socket.io')(http);
//var client=require('socket.io-client');
var client=require('/usr/local/lib/node_modules/socket.io-client');
Oops! I made a syntax error in my patch, and fixed it by adding "var" to the client variable. Please note, this patch should be considered a temporary workaround. However, the new Loebner Prize Protocol seems to be running in Linux, though testing is minimal at this point.
node server.js
listening
connection detected
connection detected
connection detected
{"robot":"conf3","id":"judge0","secret":"alice"}
{"robot":"ai1","id":"judge0","secret":"alice"}
This is still a work in progress for discussion purposes only.