2019-09-25 04:57:05 +03:00
|
|
|
:: Would love to see a proper stateful terminal handler. Ideally,
|
|
|
|
:: you'd be able to ^X into the virtual ship, like the old ^W.
|
|
|
|
::
|
|
|
|
:: However, that's probably not the primary way of interacting with
|
|
|
|
:: it. In practice, most of the time you'll be running from a file
|
|
|
|
:: (eg for automated testing) or fanning the same command to multiple
|
|
|
|
:: ships or otherwise making use of the fact that we can
|
|
|
|
:: programmatically send events.
|
|
|
|
::
|
2019-11-10 10:27:07 +03:00
|
|
|
/- aquarium, spider
|
2019-11-16 14:25:30 +03:00
|
|
|
/+ aqua-vane-thread
|
2019-09-25 04:57:05 +03:00
|
|
|
|%
|
|
|
|
++ handle-blit
|
|
|
|
|= [who=@p way=wire %blit blits=(list blit:dill)]
|
2019-11-19 07:36:21 +03:00
|
|
|
^- (list card:agent:gall)
|
2019-09-25 04:57:05 +03:00
|
|
|
=/ last-line
|
|
|
|
%+ roll blits
|
|
|
|
|= [b=blit:dill line=tape]
|
|
|
|
?- -.b
|
2021-09-24 23:33:15 +03:00
|
|
|
%lin (tape p.b)
|
2020-11-26 18:44:54 +03:00
|
|
|
%klr (tape (zing (turn p.b tail)))
|
2021-09-24 23:33:15 +03:00
|
|
|
%mor ~& "{<who>}: {line}" ""
|
2019-09-25 04:57:05 +03:00
|
|
|
%hop line
|
|
|
|
%bel line
|
|
|
|
%clr ""
|
|
|
|
%sag ~& [%save-jamfile-to p.b] line
|
|
|
|
%sav ~& [%save-file-to p.b] line
|
|
|
|
%url ~& [%activate-url p.b] line
|
|
|
|
==
|
|
|
|
~? !=(~ last-line) last-line
|
|
|
|
~
|
|
|
|
--
|
|
|
|
::
|
2019-12-04 10:53:42 +03:00
|
|
|
%+ aqua-vane-thread ~[%blit]
|
2019-11-10 10:27:07 +03:00
|
|
|
|_ =bowl:spider
|
2019-09-25 04:57:05 +03:00
|
|
|
+* this .
|
|
|
|
++ handle-unix-effect
|
|
|
|
|= [who=@p ue=unix-effect:aquarium]
|
2019-11-19 07:36:21 +03:00
|
|
|
^- (quip card:agent:gall _this)
|
2019-09-25 04:57:05 +03:00
|
|
|
=/ cards
|
|
|
|
?+ -.q.ue ~
|
|
|
|
%blit (handle-blit who ue)
|
|
|
|
==
|
|
|
|
[cards this]
|
|
|
|
::
|
|
|
|
++ handle-arvo-response _!!
|
|
|
|
--
|