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