sim←{ ⍺←0.5 code←{ (2⊃¨v/⍨x)@(⍸x←∊⊃¨v←⎕VFI¨⍵)⊢⍵ }¨' '(≠⊆⊢)¨⊃⎕NGET ⍵ 1 ind←⊃¨srt←code[⍋⊃¨code] sys←∪{⍵/⍨(2|⎕DR)¨⍵}↑,/2↓¨srt vrf←sys∊⍥∊ind 0=∧/vrf:(∊eunderspec(⍕sys/⍨~vrf))⎕SIGNAL 8 (≢≠⊃∘⌽)ind:enoint ⎕SIGNAL 8 leds←⍸(⊂'LED')≡¨2⊃¨srt unpref←{'x'≠1↑⍵:(epref ⍵)⎕SIGNAL 8 ⋄ 1↓⍵} load←{∊'v[',(⍕⍵),']'} fmt←{{⍵/⍨(∨\∧∘⌽∨\∘⌽)' '≠⍵}∊('⍝'(≠⊆⊢)∊' '⍺' '),¨⍵,⊂⍬} state←⎕NS ⍬ ⋄ state.v←0⍴⍨≢srt ⋄ state.t←0 } AddCentury←{ ⍝ ⍺ ←→ Century Window, Century Anchor Year ⍝ ⍵ ←→Decimal time number 60 ⍝ ← ←→ ⍵ with added century f w t←⍺ 1∊'YYYY'⍷f:⍵ y←⌊⍵÷10*4 b←y<100 ~∨/b:⍵ w>999:⍵+b×w×10*4 s x←0 100⊤w-⍨t c←b×s+y0∊⍴msg ts←fmtTS ⎕TS :If 1=≢⍴msg←⍕msg :OrIf 1=⊃⍴msg r←ts,' - ',msg :Else r←ts,∊(⎕UCS 13),msg :EndIf ⎕←r :EndIf ∇ ∇ r←New arg ⍝ create a new instance of Jarvis :Access public shared :If 0∊⍴arg r←##.⎕NEW ⎕THIS :Else r←##.⎕NEW ⎕THIS arg :EndIf ∇ ∇ make :Access public :Implements constructor MakeCommon ∇ ∇ r←args default defaults args←,⊆args r←(≢defaults)↑args,(≢args)↓defaults ∇ ∇ Close :Implements destructor {0:: ⋄ {}LDRC.Close ServerName}⍬ ∇ ∇ (rc msg)←Pause :Access public →0 If~_started⊣(rc msg)←¯1 'Server is not running' →0 If 2=⊃2⊃LDRC.GetProp ServerName'Pause'⊣(rc msg)←¯2 Error'Server is already paused' →0 If 0≠rc←⊃LDRC.SetProp ServerName'Pause' 2⊣msg←'Error attempting to pause server' Log'Pausing server...' (rc msg)←0 'Server paused' ∇s