mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-14 04:19:22 +03:00
Various fixes and improvements.
This commit is contained in:
parent
8bc2fd90de
commit
00b9592f9f
1064
arvo/dill.hoon
1064
arvo/dill.hoon
File diff suppressed because it is too large
Load Diff
@ -3,6 +3,20 @@
|
||||
::
|
||||
|= pit=vase
|
||||
=> |% :: interface tiles
|
||||
++ axle :: all dill state
|
||||
$: %2 ::
|
||||
ore=(unit ship) :: identity once set
|
||||
hey=(unit duct) :: default duct
|
||||
dug=(map duct axon) :: conversations
|
||||
== ::
|
||||
++ axon :: dill per duct
|
||||
$: ram=term :: console program
|
||||
wid=_80 :: terminal width
|
||||
pos=@ud :: cursor position
|
||||
see=(list ,@c) :: current line
|
||||
== ::
|
||||
-- ::
|
||||
=> |% :: console protocol
|
||||
++ console-action :: console to app
|
||||
$% [%det console-change] :: edit prompt line
|
||||
[%inn ~] :: enter session
|
||||
@ -55,21 +69,6 @@
|
||||
[%sav p=path q=@] :: save to file
|
||||
== ::
|
||||
++ gill ,@tas :: general contact
|
||||
-- ::
|
||||
=> |% :: console protocol
|
||||
++ axle :: all dill state
|
||||
$: %2 ::
|
||||
ore=(unit ship) :: identity once set
|
||||
hey=(unit duct) :: default duct
|
||||
dug=(map duct axon) :: conversations
|
||||
== ::
|
||||
++ axon :: dill per duct
|
||||
$: ram=term :: console program
|
||||
tem=(unit (list dill-belt)) :: pending, reverse
|
||||
wid=_80 :: terminal width
|
||||
pos=@ud :: cursor position
|
||||
see=(list ,@c) :: current line
|
||||
== ::
|
||||
-- => ::
|
||||
|% :: protocol below
|
||||
++ blew ,[p=@ud q=@ud] :: columns rows
|
||||
@ -135,9 +134,6 @@
|
||||
$% [%make p=(unit ,@t) q=@ud r=@ s=?] ::
|
||||
[%sith p=@p q=@uw r=?] ::
|
||||
== ::
|
||||
++ note-clay :: wait for clay, hack
|
||||
$% [%warp p=sock q=riff] ::
|
||||
== ::
|
||||
++ note-dill :: note to self, odd
|
||||
$% [%crud p=@tas q=(list tank)] ::
|
||||
[%text p=tape] ::
|
||||
@ -153,18 +149,15 @@
|
||||
== ::
|
||||
++ note ::
|
||||
$% [%a note-ames] :: out request $->
|
||||
[%c note-clay]
|
||||
[%d note-dill] ::
|
||||
[%g note-gall] ::
|
||||
== ::
|
||||
++ riff ,[p=desk q=(unit rave)] :: see %clay
|
||||
++ sign-ames ::
|
||||
$% [%nice ~] ::
|
||||
[%init p=ship] ::
|
||||
== ::
|
||||
++ sign-clay ::
|
||||
$% [%note p=@tD q=tank] ::
|
||||
[%writ p=riot] ::
|
||||
== ::
|
||||
++ sign-gall ::
|
||||
$% [%crud p=@tas q=(list tank)] ::
|
||||
@ -200,7 +193,6 @@
|
||||
?+ -.kyz ~& [%strange-kiss -.kyz] +>
|
||||
%flow +>
|
||||
%belt (send `dill-belt`p.kyz)
|
||||
%text (dump %blit [%lin (tuba p.kyz)]~)
|
||||
%crud (send `dill-belt`[%cru p.kyz q.kyz])
|
||||
%blew (send %rez p.p.kyz q.p.kyz)
|
||||
%veer (dump kyz)
|
||||
@ -234,31 +226,15 @@
|
||||
(done %blit [bit ~])
|
||||
::
|
||||
++ init :: initialize
|
||||
~& [%dill-init our]
|
||||
=+ myt=(flop (need tem))
|
||||
|- ^+ +>
|
||||
?~ myt +>(tem ~)
|
||||
$(myt t.myt, +> (send i.myt))
|
||||
::
|
||||
++ into :: preinitialize
|
||||
|= gyl=(list gill)
|
||||
~& [%dill-into our]
|
||||
%_ +>
|
||||
tem `(turn gyl |=(a=gill [%yow a]))
|
||||
moz
|
||||
:_ moz
|
||||
:* hen
|
||||
%pass
|
||||
/
|
||||
%c
|
||||
[%warp [our our] %main `[%& %y [%ud 1] /]]
|
||||
==
|
||||
==
|
||||
^+ +>
|
||||
=. moz :_(moz [hen %pass ~ %g %show [our [ram ~]] our ~])
|
||||
|- ^+ +>.^$
|
||||
?~ gyl +>.^$
|
||||
$(gyl t.gyl, +>.^$ (send %yow i.gyl))
|
||||
::
|
||||
++ send :: send action
|
||||
|= bet=dill-belt
|
||||
?^ tem
|
||||
+>(tem `[bet u.tem])
|
||||
%_ +>
|
||||
moz
|
||||
:_ moz
|
||||
@ -272,15 +248,9 @@
|
||||
[%a %nice *]
|
||||
:: ~& [%take-nice-ames sih]
|
||||
+>
|
||||
::
|
||||
[%a %init *]
|
||||
!! :: handled outside
|
||||
::
|
||||
[%c %note *]
|
||||
(from %out (tuba ~(ram re q.+.sih)))
|
||||
::
|
||||
[%c %writ *]
|
||||
init
|
||||
::
|
||||
[%g %crud *]
|
||||
(send %cru p.+.sih q.+.sih)
|
||||
@ -310,14 +280,7 @@
|
||||
?. ?=(%flow -.kyz) ~
|
||||
%- some
|
||||
%. q.kyz
|
||||
%~ into as
|
||||
:- [~ hen u.ore.all]
|
||||
:* p.kyz
|
||||
[~ ~]
|
||||
80
|
||||
0
|
||||
(tuba "<{(trip p.kyz)}>")
|
||||
==
|
||||
~(init as [~ hen u.ore.all] [p.kyz 80 0 (tuba "<{(trip p.kyz)}>")])
|
||||
--
|
||||
|% :: poke/peek pattern
|
||||
++ call :: handle request
|
||||
@ -341,7 +304,6 @@
|
||||
:_(..^$ ?~(hey.all ~ [u.hey.all %slip %d p.q.hic]~))
|
||||
?: ?=(%init -.q.hic)
|
||||
[~ ..^$(ore.all `p.q.hic)]
|
||||
~& [%dill-call q.hic]
|
||||
=. hey.all ?^(hey.all hey.all `hen)
|
||||
=+ nus=(ax hen q.hic)
|
||||
?~ nus
|
||||
@ -356,8 +318,8 @@
|
||||
~
|
||||
::
|
||||
++ load :: totally disabled
|
||||
|= old=axle
|
||||
..^$(all old)
|
||||
|= old=*
|
||||
..^$(ore.all `~zod)
|
||||
::
|
||||
++ scry
|
||||
|= [fur=(unit (set monk)) ren=@tas his=ship syd=desk lot=coin tyl=path]
|
||||
@ -370,8 +332,6 @@
|
||||
|= [tea=wire hen=duct hin=(hypo sign)]
|
||||
^- [p=(list move) q=_..^$]
|
||||
?: =(~ ore.all)
|
||||
?: ?=([%a %init *] q.hin)
|
||||
[~ ..^$(ore.all `p.+.q.hin)]
|
||||
~& [%take-back q.hin]
|
||||
[~ ..^$]
|
||||
?. (~(has by dug.all) hen)
|
||||
|
@ -512,6 +512,7 @@
|
||||
::
|
||||
++ poke-dill-belt
|
||||
|= [ost=bone her=ship bet=dill-belt]
|
||||
:: ~& %seat-poke
|
||||
^- [(list move) _+>]
|
||||
=< se-abet
|
||||
=< se-view
|
||||
|
Loading…
Reference in New Issue
Block a user