aboutsummaryrefslogtreecommitdiffhomepage
path: root/client.tes
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2016-01-04 21:11:38 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2016-01-04 21:11:38 +0100
commit7d222a52c70cc78e80ad0bab2f7f77dd03ad12b8 (patch)
treeccef3e4de7d28ceb88a707e6f118a84ba51318fb /client.tes
parentef1e279e624f6139c83fa56604586dcf2b5571c8 (diff)
downloadapplause2-7d222a52c70cc78e80ad0bab2f7f77dd03ad12b8.tar.gz
added a simple server functionality and some SciTECO macros to interface it
* the server is basically a second way to modify the Lua state of Applause * concurrently to interactive input, messages can be sent over a TCP socket which are evaluated just like command lines. All stdout/stderr output is returned and the socket is closed. * Server currently hardcoded at 127.0.0.1:10000 * Interruptions are currently not possible. This would require another thread. * The threading could be simplified by making the applause binary a server-only application. The Read-Eval-Print loop could then be a standalone LuaJIT script.
Diffstat (limited to 'client.tes')
-rw-r--r--client.tes19
1 files changed, 19 insertions, 0 deletions
diff --git a/client.tes b/client.tes
new file mode 100644
index 0000000..77db8ab
--- /dev/null
+++ b/client.tes
@@ -0,0 +1,19 @@
+
+! Applause client: Evaluate command !
+@#ae{
+ X[applause.output]
+ EQ[applause.output]
+ Z\ 5-.<I > 10I
+ HECnc 127.0.0.1 10000 J
+ Z"= Q*U* '
+}
+
+! Print command !
+@#ap{
+ X[applause.output]
+ EQ[applause.output]
+ I= R
+ Z\ 5-.<I > 10I
+ HECnc 127.0.0.1 10000 J
+ Z"= Q*U* '
+}