mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-02 07:06:41 +03:00
Various fixes and improvements.
This commit is contained in:
parent
a1e015931f
commit
24932f3b44
@ -144,6 +144,7 @@
|
||||
== ::
|
||||
++ ring ,@ :: private key
|
||||
++ rule |=(tub=nail `edge`[p.tub ~ ~ tub]) :: parsing rule
|
||||
++ ruly |*(pro=$+(* *) $+(nail (like pro))) :: rule like
|
||||
++ span ,@ta :: text-atom (ASCII)
|
||||
++ spot ,[p=path q=pint] :: range in file
|
||||
++ tang (list tank) :: general error
|
||||
|
@ -33,7 +33,6 @@
|
||||
[ust %pass / %c %plug our.hid %try (sein our.hid) %try]
|
||||
[ust %give %nice ~]
|
||||
==
|
||||
|
||||
::
|
||||
++ pour
|
||||
|= [ost=bone pax=path sih=*]
|
||||
|
@ -298,8 +298,6 @@
|
||||
|= act=console-action
|
||||
^+ +>
|
||||
?- -.act
|
||||
%inn +>.$
|
||||
%out +>.$
|
||||
%det (he-stir +.act)
|
||||
%ret (he-done (tufa buf.say))
|
||||
==
|
||||
|
186
main/app/helm/core.hook
Normal file
186
main/app/helm/core.hook
Normal file
@ -0,0 +1,186 @@
|
||||
:: :: ::
|
||||
:::: /hook/core/helm/app :: ::
|
||||
:: :: ::
|
||||
/? 314 :: zuse version
|
||||
/- *console :: structures
|
||||
/+ console :: libraries
|
||||
:: :: ::
|
||||
:::: :: ::
|
||||
!: :: ::
|
||||
=> |% :: principal structures
|
||||
++ helm-house :: all state
|
||||
$: %0 :: state version
|
||||
hoc=(map bone helm-session) :: consoles
|
||||
== ::
|
||||
++ helm-session ::
|
||||
$: say=console-share ::
|
||||
== ::
|
||||
++ helm-wish ::
|
||||
$| $? %solid :: save kernel pill
|
||||
%reset :: reset kernel
|
||||
%verb :: verbose mode
|
||||
== ::
|
||||
$% [%reload p=(list term)] :: reload vanes
|
||||
[%begin p=(qual @p @p @t gens)] :: start new ship
|
||||
== ::
|
||||
:: ::
|
||||
++ gift :: out result <-$
|
||||
$% [%mean p=ares] :: error
|
||||
[%nice ~] :: acknowledge
|
||||
[%rush %console-effect console-effect] :: effect
|
||||
== ::
|
||||
++ hapt ,[p=ship q=path] ::
|
||||
++ move ,[p=bone q=(mold note gift)] ::
|
||||
++ note-gall :: note to %gall
|
||||
$% [%mess p=[p=ship q=path] q=ship r=cage] ::
|
||||
[%show p=[p=ship q=path] q=ship r=path] ::
|
||||
[%took p=[p=ship q=path] q=ship] ::
|
||||
== ::
|
||||
++ note-dill :: system command
|
||||
$% [%veer p=@ta q=path r=@t] ::
|
||||
[%vega p=path] ::
|
||||
[%verb ~] ::
|
||||
== ::
|
||||
++ note :: out request $->
|
||||
$% [%d note-dill] ::
|
||||
[%g note-gall] ::
|
||||
== ::
|
||||
-- ::
|
||||
=> |% :: parser
|
||||
++ parse-helm-wish
|
||||
%+ cook |=(a=helm-wish a)
|
||||
;~ pose
|
||||
(cold %solid (jest %solid))
|
||||
(cold %reset (jest %reset))
|
||||
==
|
||||
--
|
||||
:: ::
|
||||
:::: ::
|
||||
:: ::
|
||||
|_ $: hid=hide :: system state
|
||||
helm-house :: program state
|
||||
== ::
|
||||
++ he :: per session
|
||||
|_ [[ost=bone moz=(list move)] helm-session] ::
|
||||
++ he-abet :: resolve
|
||||
[(flop moz) %_(+> hoc (~(put by hoc) ost +<+))] ::
|
||||
:: ::
|
||||
++ he-give :: emit gift
|
||||
|= git=gift
|
||||
%_(+> moz [[ost %give git] moz])
|
||||
::
|
||||
++ he-peer :: subscribe to
|
||||
(he-rush [%pro %& %$ (tuba ":helm! ")]~)
|
||||
::
|
||||
++ he-rush :: emit changes
|
||||
|= fes=(list console-effect)
|
||||
?~ fes +>
|
||||
(he-give %rush %console-effect ?~(t.fes i.fes [%mor fes]))
|
||||
::
|
||||
++ he-wish-solid
|
||||
^+ .
|
||||
=- %_ +
|
||||
moz :_ moz
|
||||
[ost %give %rush %console-effect %sag /urbit/pill pil]
|
||||
==
|
||||
^= pil
|
||||
=+ top=`path`/(scot %p our.hid)/arvo/(scot %da lat.hid)
|
||||
=+ pax=`path`(weld top `path`[%hoon ~])
|
||||
~& %solid-start
|
||||
=+ gen=(reck pax)
|
||||
~& %solid-parsed
|
||||
=+ ken=q:(~(mint ut %noun) %noun gen)
|
||||
~& %solid-compiled
|
||||
:- ken
|
||||
=+ all=.*(0 ken)
|
||||
=+ ^= vay ^- (list ,[p=@tas q=@tas])
|
||||
:~ [%$ %zuse]
|
||||
[%g %gall]
|
||||
[%f %ford]
|
||||
[%a %ames]
|
||||
[%c %clay]
|
||||
[%d %dill]
|
||||
[%e %eyre]
|
||||
[%t %time]
|
||||
==
|
||||
|- ^+ all
|
||||
?~ vay all
|
||||
=+ pax=(weld top `path`[q.i.vay ~])
|
||||
=+ txt=((hard ,@) .^(%cx (weld pax `path`[%hoon ~])))
|
||||
=+ sam=[lat.hid `ovum`[[%gold ~] [%veer p.i.vay pax txt]]]
|
||||
~& [%solid-veer i.vay]
|
||||
=+ gat=.*(all .*(all [0 42]))
|
||||
=+ nex=+:.*([-.gat [sam +>.gat]] -.gat)
|
||||
$(vay t.vay, all nex)
|
||||
::
|
||||
++ he-wish-reset
|
||||
^+ .
|
||||
=- $_(+ moz (weld zum moz))
|
||||
^= zum
|
||||
=+ top=`path`/(scot %p our.hid)/arvo/(scot %da lat.hid)
|
||||
:- [ost %pass /reset %d %vega (weld top `path`/hoon)]
|
||||
%+ turn
|
||||
^- (list ,[p=@tas q=@tas])
|
||||
:~ [%$ %zuse]
|
||||
[%a %ames]
|
||||
[%c %clay]
|
||||
[%d %dill]
|
||||
[%e %eyre]
|
||||
[%f %ford]
|
||||
[%g %gall]
|
||||
[%t %time]
|
||||
==
|
||||
|= [p=@tas q=@tas]
|
||||
=+ pax=`path`(welp top /[q])
|
||||
=+ txt=((hard ,@) .^(%cx (welp pax /hoon)))
|
||||
[ost %pass /reset %d %veer p pax txt]
|
||||
::
|
||||
++ he-wish-begin
|
||||
|= mes=(qual @p @p @t gens)
|
||||
%_ +>
|
||||
moz
|
||||
:_ moz
|
||||
[ost %pass /begin %g %mess [our.hid /began] our.hid %began-args !>(mes)]
|
||||
==
|
||||
::
|
||||
++ he-wish-verb
|
||||
%_ .
|
||||
moz
|
||||
:_ moz
|
||||
[ost %pass /verb %d %verb ~]
|
||||
==
|
||||
::
|
||||
++ he-wish
|
||||
|= wis
|
||||
%_ +>
|
||||
moz
|
||||
%- weld
|
||||
:_ moz
|
||||
?- wis
|
||||
%verb he-wish-verb
|
||||
%solid he-wish-solid
|
||||
%reset he-wish-reset
|
||||
[%reload *] (he-wish-reload +.wis)
|
||||
[%begin *] (he-wish-begin +.wis)
|
||||
==
|
||||
::
|
||||
++ he-work :: apply input
|
||||
|= act=console-action
|
||||
^+ +>
|
||||
=^ wig say ((~(apex cs say) parse-helm-wish) act)
|
||||
(he-wish:(he-rush p.wig) q.wig)
|
||||
--
|
||||
::
|
||||
++ peer
|
||||
|= [ost=bone her=ship pax=path]
|
||||
^- [(list move) _+>]
|
||||
?< (~(has by hoc) ost)
|
||||
?> =(/console pax)
|
||||
?> =(her our.hid)
|
||||
he-abet:~(he-peer he [ost ~] *helm-session)
|
||||
::
|
||||
++ poke-console-action
|
||||
|= [ost=bone her=ship act=console-action]
|
||||
^- [(list move) _+>]
|
||||
he-abet:(~(he-work he [ost [ost %give %nice ~]~] (~(got by hoc) ost)) act)
|
||||
--
|
@ -33,12 +33,12 @@
|
||||
++ search :: reverse-i-search
|
||||
$: pos=@ud :: search position
|
||||
str=(list ,@c) :: search string
|
||||
==
|
||||
== ::
|
||||
++ target :: application target
|
||||
$: ris=(unit search) :: reverse-i-search
|
||||
hit=history :: all past input
|
||||
pom=console-prompt :: static prompt
|
||||
inp=console-input :: input state
|
||||
inp=console-command :: input state
|
||||
== ::
|
||||
++ gift :: out result <-$
|
||||
$% [%mean p=ares] ::
|
||||
@ -348,7 +348,7 @@
|
||||
?- -.fec
|
||||
%bel ta-bel
|
||||
%blk +>
|
||||
%clr +>(+> (se-blit %clr ~))
|
||||
%clr +>(+> (se-blit fec))
|
||||
%det (ta-got +.fec)
|
||||
%mor |- ^+ +>.^$
|
||||
?~ p.fec +>.^$
|
||||
@ -356,6 +356,8 @@
|
||||
%nex ta-nex
|
||||
%pro (ta-pro +.fec)
|
||||
%tan (ta-tan p.fec)
|
||||
%sag +>(+> (se-blit fec))
|
||||
%sav +>(+> (se-blit fec))
|
||||
%txt $(fec [%tan [%leaf p.fec]~])
|
||||
==
|
||||
::
|
||||
|
@ -22,7 +22,7 @@
|
||||
%g %mess
|
||||
[our.hid /seat] our.hid
|
||||
%dill-belt
|
||||
!>(`dill-belt`[%yow %dojo])
|
||||
!>(`dill-belt`[%yow %helm])
|
||||
==
|
||||
==
|
||||
--
|
||||
|
@ -12,6 +12,52 @@
|
||||
++ cs :: shared-state engine
|
||||
|_ console-share
|
||||
++ abet +<
|
||||
++ apex :: engine by rule
|
||||
|* sef=_rule
|
||||
|= act=console-action
|
||||
^+ [[p=*(list console-effect) q=(rust ~ sef)] *console-share]
|
||||
?- -.act
|
||||
%det
|
||||
=^ dut +>+>.$
|
||||
%+ remit +.act
|
||||
|= buf=(list ,@c)
|
||||
=+ txt=(tufa buf)
|
||||
=((lent txt) q.p:(sef [0 0] txt))
|
||||
[[?~(dut ~ [[%det u.dut] ~]) ~] +>+>+<.$]
|
||||
::
|
||||
%ret
|
||||
=+ dod=(rust (tufa buf) sef)
|
||||
?~ dod
|
||||
[[[%bel ~]~ ~] +>+>+<.$]
|
||||
=^ cal +>+>.$ (transmit [%set ~])
|
||||
:_ +>+>+<.$
|
||||
:_ dod
|
||||
:~ [%det cal]
|
||||
[%nex ~]
|
||||
==
|
||||
==
|
||||
++ apse :: engine by dialog
|
||||
|* dog=_(console-dialog)
|
||||
|= act=console-action
|
||||
^+ :_ *console-share
|
||||
:_ *(list console-effect)
|
||||
?>(?=(%& -.god) *(each ,_p.god ,_+)
|
||||
?- -.act
|
||||
%det
|
||||
=^ dut +>+>.$
|
||||
%+ remit +.act
|
||||
|= buf=(list ,@c)
|
||||
!=(~ (nice:dog (tufa buf)))
|
||||
|
||||
=+ foo=`(list console-effect)`?~(dut ~ [[%det u.dut] ~])
|
||||
:- :- foo
|
||||
[%| dog]
|
||||
`console-share`+>+>+<.$
|
||||
::
|
||||
%ret
|
||||
?. =(`& (nice:dog
|
||||
==
|
||||
::
|
||||
++ apply
|
||||
|= ted=console-edit
|
||||
^+ +>
|
||||
|
@ -3,11 +3,8 @@
|
||||
!:
|
||||
|%
|
||||
++ console-action :: console to app
|
||||
$% [%abo ~] :: reset interaction
|
||||
$% :: [%abo ~] :: reset interaction
|
||||
[%det console-change] :: command line edit
|
||||
[%inn ~] :: enter session
|
||||
[%mut p=(list tape)] :: multiline input
|
||||
[%out ~] :: exit session
|
||||
[%ret ~] :: submit and clear
|
||||
== ::
|
||||
++ console-buffer (list ,@c) :: command state
|
||||
@ -16,6 +13,16 @@
|
||||
haw=@uvH :: source hash
|
||||
ted=console-edit :: state change
|
||||
== ::
|
||||
++ console-dialog :: standard dialog
|
||||
|* out=$+(* *) :: output type
|
||||
$_ ^? |% ::
|
||||
++ init =< $ :: initial response
|
||||
%+ pair tanq ::
|
||||
%+ each (unit out) ::
|
||||
(pair console-prompt _.) ::
|
||||
++ kick |=(console-input init) :: next response
|
||||
++ nice $+(console-input (unit ,?)) :: legal/partial
|
||||
-- ::
|
||||
++ console-clock ,[own=@ud his=@ud] :: vector clock
|
||||
++ console-edit :: shared state change
|
||||
$% [%del p=@ud] :: delete one at
|
||||
@ -32,6 +39,8 @@
|
||||
[%mor p=(list console-effect)] :: multiple effects
|
||||
[%nex ~] :: save, clear command
|
||||
[%pro console-prompt] :: set prompt
|
||||
[%sag p=path q=*] :: save to jamfile
|
||||
[%sav p=path q=@] :: save to file
|
||||
[%tan p=(list tank)] :: classic tank
|
||||
:: [%taq p=tanq] :: modern tank
|
||||
[%txt p=tape] :: text line
|
||||
@ -45,6 +54,7 @@
|
||||
tag=term :: history mode
|
||||
cap=(list ,@c) :: caption
|
||||
== ::
|
||||
++ console-input tape :: prompt input
|
||||
++ console-share :: symmetric state
|
||||
$: ven=console-clock :: our vector clock
|
||||
leg=(list console-edit) :: unmerged edits
|
||||
|
Loading…
Reference in New Issue
Block a user