Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Look at my program: Its a server

Name: Anonymous 2015-02-10 0:47

In the spirit of wanting to see more programs on this board, I am posting this programlet. Its the beginnings of a server so I can talk to my universe LispM program as though its a BBS through a terminal program like putty.

Please post your programs as also well too mutually also together. I would like to see them. If they are graphical or audioful or gameful or simulationful programs are preferred, but of course, post any program.

Don't forget to comment, rate and subscribe.

WISHFUL THINKING

function svrRunLuaPromptServer(sck)
local s = svrReceive(sck)
if s ~= "" then
luaCall(s)
local err = getErrorText()
if err ~= "" then
svrSend(err, sck)
clearError()
end
-- svrSend("Ready.\n")
--svrSend("\n> ")
svrSend("> ", sck)
end
end

function svrRunEchoServer(sck)
-- echo server
local s = svrReceive(sck)
if s~="" then
clearTrace()
for i=1,#s,1 do
print(string.byte(s,i))
end
end
svrSend(s, sck)
end

function initServer()
svrStart()
print("Server started")
coroutine.yield()

print("Waiting for terminal client...")
repeat
sck1 = svrAccept()
coroutine.yield()
until svrIsValidSocket(sck1)

print("Terminal client connected.")

svrSend("You are the lua prompt terminal\n> ", sck1)
coroutine.yield()

print("Waiting for echo client...")

repeat
sck2 = svrAccept()
coroutine.yield()
until svrIsValidSocket(sck2)

print("Echo client connected.")

svrSend("You are the echo terminal", sck2)
end

function restartServer()
initServerRoutine = coroutine.create(initServer)
coroutine.resume(initServerRoutine)
end

if initServerRoutine == nil then
restartServer()
end

function update()
if coroutine.status(initServerRoutine) ~= "dead" then
coroutine.resume(initServerRoutine)
else
svrRunLuaPromptServer(sck1)
svrRunEchoServer(sck2)
end
end

Name: Anonymous 2015-02-11 20:02

>>20
You're going off track. The human mind is wonderfully flexible. Did you know, I could leave out the capital letters and question mark from this sentence and it would cause no measurable hinderance to your digesting it as a condescending rhetorical question?
Typesetting is irrelevant to the different syntaxen used in different languages, and you know it. I use one font in my terminal, and I chose it. I didn't choose Lua's keywords and I can deal with that. There are studies on eye strain in the context of serif and sans-serif fonts on screen and paper, and there is a correlation. There is nothing in response to "FIOC looks worse to me than open and closed braces" except "shut the fuck up you whiny bitch and get back to work".

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List