Now with subscription queue tracking.

This commit is contained in:
C. Guy Yarvin 2015-01-19 06:25:52 -08:00
parent bdfc0b692e
commit cf35697ac4
3 changed files with 25 additions and 10 deletions

View File

@ -1057,10 +1057,15 @@
[%meta (spec (slot 15 caq))]
::
[%give p=[p=@tas q=*]]
~? =(%meta p.p.q.caq) %sump-meta
?: ?=(%mean p.p.q.caq)
:- `[hon %nuke our]
`[hon %give %mean (ares q.p.q.caq)]
:- ?. ?=(?(%rush %rust) p.p.q.caq) ~
:- ?. ?| ?=(?(%rush %rust) p.p.q.caq)
?& ?=(%meta p.p.q.caq)
?=([* ?(%rush %rust) *] q.p.q.caq)
== ==
~
`[hon %told our]
:+ ~ hon
:- %give
@ -1141,18 +1146,27 @@
+>.$(qic.sat ~)
::
%took
=+ qul=(~(got by qel.sat) ost)
~& [%yawn-took-has qul [our hen]]
+>.$(qic.sat ~, qel.sat (~(put by qel.sat) ost (dec qul)))
=+ qol=(~(get by qel.sat) ost)
:: ~& [%yawn-took-has qol [our hen]]
%= +>.$
qic.sat ~
qel.sat
?~ qol
~& [%took-underflow our hen]
qel.sat
?: =(`1 qol)
(~(del by qel.sat) ost)
(~(put by qel.sat) ost (dec u.qol))
==
::
%told
=+ qol=(~(get by qel.sat) ost)
~& [%yawn-told-has qol [our hen]]
:: ~& [%yawn-told-has qol [our hen]]
=+ qul=?~(qol 1 +(u.qol))
:: ?: =(10 qul)
:: ~& [%yawn-told-full our hen]
:: +>.$(qic.sat `[hen %nuke p.kon])
+>.$(qic.sat ~, qel.sat (~(put by qel.sat) ost ?~(qol 1 +(u.qol))))
?: =(10 qul)
~& [%yawn-told-full our hen]
+>.$(qic.sat `[hen %nuke p.kon])
+>.$(qic.sat ~, qel.sat (~(put by qel.sat) ost qul))
::
%load
=+ [hom=(slot 2 q.p.kon) old=(slot 3 q.p.kon)]

View File

@ -10136,7 +10136,7 @@
++ jack :: dispatch card
|= [lac=? gum=muse]
^- [[p=(list ovum) q=(list muse)] _niz]
=. lac |(lac ?=(?(%g %f) p.gum))
:: =. lac |(lac ?=(?(%g %f) p.gum))
%+ fire
p.gum
?- -.r.gum

View File

@ -175,6 +175,7 @@
?+ +<.sih !!
%nice +>.$
?(%rust %rush)
~& [%terminal-pour-rush pax [our.hid [auc imp.hid]]]
=. p.q.sih ?^(q.q.sih p.tel p.q.sih) :: XX prompt hack
%_ +>.$
mow :- [ost %pass [%resp pax] %g %took [our.hid [auc imp.hid]] you]