Merge branch 'test' of https://github.com/urbit/urbit into test

This commit is contained in:
Philip C Monk 2015-05-19 18:43:34 -04:00
commit e1736d0ddb
120 changed files with 1702 additions and 14797 deletions

View File

@ -57,7 +57,7 @@
++ colm (cook |=(a=@ (sub a '1')) (shim '1' '3')) :: row or column
++ come ;~(plug colm ;~(pfix fas colm)) :: coordinate
-- ::
|_ [hid=hide moz=(list move) axle] :: per agent
|_ [hid=hide moz=(list move) axle] :: per server
++ et ::
|_ [from say=sole-share] :: per console client
++ abet +>(q.eye (~(put by q.eye) ost say)) :: continue

View File

@ -2,104 +2,53 @@
:::: /hook/core/hood/ape :: ::
:: :: ::
/? 314 :: zuse version
/+ sole, talk, helm, kiln :: libraries
/+ sole, talk, helm, kiln, drum :: libraries
:: :: ::
:::: :: ::
!: :: ::
=> |% :: module boilerplate
++ hood-0 ::
,[%0 lac=(map ,@tas hood-part)] ::
++ hood-good ::
|* hed=hood-head ::
|= paw=hood-part ::
?- hed ::
%drum ?>(?=(%drum -.paw) `drum-part`paw) ::
%helm ?>(?=(%helm -.paw) `helm-part`paw) ::
%kiln ?>(?=(%kiln -.paw) `kiln-part`paw) ::
== ::
++ hood-head ,_-:*hood-part ::
++ hood-make ::
|* hed=hood-head ::
|* [our=@p hed=hood-head] ::
?- hed ::
%drum (drum-port our) ::
%helm *helm-part ::
%kiln *kiln-part ::
== ::
++ hood-part ::
$? helm-part ::
kiln-part ::
$% [%drum %0 drum-pith] ::
[%helm %0 helm-pith] ::
[%kiln %0 kiln-pith] ::
== ::
-- ::
:: :: ::
:::: :: ::
:: :: ::
|_ $: hid=hide :: system state
[%0 lac=(map ,@tas hood-part)] :: part system
hood-0 :: server state
== ::
++ able :: find/make part
|* hed=hood-head
=+ rep=(~(get by lac) hed)
=+ par=?^(rep u.rep `hood-part`(hood-make hed))
=+ par=?^(rep u.rep `hood-part`(hood-make our.hid hed))
((hood-good hed) par)
::
++ ably :: save part
|* [moz=(list) rep=hood-part]
[(flop moz) +>(lac (~(put by lac) -.rep rep))]
[(flop moz) %_(+> lac (~(put by lac) -.rep rep))]
:: :: ::
:::: :: ::
:: :: ::
++ poke-hood-begin ::
|= [from hood-begin]
(ably (poke-begin:(helm-work [hid +<-] (able %helm)) +<+))
::
++ poke-hood-init ::
|= [from hood-init]
(ably (poke-init:(helm-work [hid +<-] (able %helm)) +<+))
::
++ poke-hood-reload ::
|= [from hood-reload]
(ably (poke-reload:(helm-work [hid +<-] (able %helm)) +<+))
::
++ poke-hood-reset ::
|= [from ~]
(ably (poke-reset:(helm-work [hid +<-] (able %helm)) +<+))
::
++ poke-hood-verb ::
|= [from ~]
(ably (poke-verb:(helm-work [hid +<-] (able %helm)) +<+))
::
++ poke-hood-start ::
|= [from hood-start]
(ably (poke-start:(helm-work [hid +<-] (able %helm)) +<+))
::
++ poke-will ::
|= [from (unit will)]
(ably (poke-will:(helm-work [hid +<-] (able %helm)) +<+))
::
++ poke-hood-merge ::
|= [from hood-merge]
(ably (poke-merge:(kiln-work [hid +<-] (able %kiln)) +<+))
::
++ poke-hood-sync ::
|= [from hood-sync]
(ably (poke-sync:(kiln-work [hid +<-] (able %kiln)) +<+))
::
++ poke-hood-unix ::
|= [from hood-unix]
(ably (poke-unix:(kiln-work [hid +<-] (able %kiln)) +<+))
::
++ onto-helm ::
|= [then saw=(each ,[term @tas @da] tang)]
(ably (take-onto:(helm-work [hid ost src] (able %helm)) +<+))
::
++ mere-kiln ::
|= [then are=(each (set path) (pair term tang))]
(ably (take-mere:(kiln-work [hid ost src] (able %kiln)) way +<+))
::
++ made-kiln ::
|= [then @uvH (each gage tang)]
(ably (take-made:(kiln-work [hid ost src] (able %kiln)) way +<+))
::
++ note-helm ::
|= [then (pair ,@tD tank)]
(ably (take-note:(helm-work [hid ost src] (able %helm)) way +<+))
::
++ coup-kiln-fancy ::
|= [then saw=(unit tang)]
(ably (take-coup-fancy:(kiln-work [hid ost src] (able %kiln)) way +<+))
@ -109,6 +58,94 @@
~? ?=(^ saw) [%kiln-spam-lame u.saw]
[~ +>]
::
++ coup-drum ::
|= [then saw=(unit tang)]
(ably (take-coup:(drum-work [hid ost src] (able %drum)) way +<+))
::
++ diff-sole-effect-drum
|= [then sole-effect]
(ably (diff-sole-effect:(drum-work [hid ost src] (able %drum)) way +<+))
::
++ poke-hood-begin ::
|= [from hood-begin]
(ably (poke-begin:(helm-work [hid +<-] (able %helm)) +<+))
::
++ poke-helm-init ::
|= [from hood-init]
(ably (poke-init:(helm-work [hid +<-] (able %helm)) +<+))
::
++ poke-hood-mass ::
|= [from ~]
(ably poke-mass:(helm-work [hid +<-] (able %helm)))
::
++ poke-hood-merge ::
|= [from hood-merge]
(ably (poke-merge:(kiln-work [hid +<-] (able %kiln)) +<+))
::
++ poke-hood-reload ::
|= [from hood-reload]
(ably (poke-reload:(helm-work [hid +<-] (able %helm)) +<+))
::
++ poke-hood-reset ::
|= [from ~]
(ably (poke-reset:(helm-work [hid +<-] (able %helm)) +<+))
::
++ poke-hood-sync ::
|= [from hood-sync]
(ably (poke-sync:(kiln-work [hid +<-] (able %kiln)) +<+))
::
++ poke-hood-unix ::
|= [from hood-unix]
(ably (poke-unix:(kiln-work [hid +<-] (able %kiln)) +<+))
::
++ poke-hood-verb ::
|= [from ~]
(ably (poke-verb:(helm-work [hid +<-] (able %helm)) +<+))
::
++ poke-hood-start ::
|= [from drum-start]
(ably (poke-start:(drum-work [hid +<-] (able %drum)) +<+))
::
++ poke-dill-belt
|= [from dill-belt]
(ably (poke-dill-belt:(drum-work [hid +<-] (able %drum)) +<+))
::
++ poke-will ::
|= [from (unit will)]
(ably (poke-will:(helm-work [hid +<-] (able %helm)) +<+))
::
++ mere-kiln ::
|= [then are=(each (set path) (pair term tang))]
(ably (take-mere:(kiln-work [hid ost src] (able %kiln)) way +<+))
::
++ made-kiln ::
|= [then @uvH (each gage tang)]
(ably (take-made:(kiln-work [hid ost src] (able %kiln)) way +<+))
::
++ init-helm ::
|= [then *]
[~ +>]
::
++ note-helm ::
|= [then (pair ,@tD tank)]
(ably (take-note:(helm-work [hid ost src] (able %helm)) way +<+))
::
++ reap-drum
|= [then saw=(unit tang)]
(ably (reap:(drum-work [hid ost src] (able %drum)) way +<+))
::
++ onto-drum ::
|= [then saw=(each ,[term @tas @da] tang)]
(ably (take-onto:(drum-work [hid ost src] (able %drum)) way +<+))
::
++ peer-drum
|= [from pax=path]
(ably (peer:(drum-work [hid +<-] (able %drum)) +<+))
::
++ quit-drum
|= then
(ably (quit:(drum-work [hid ost src] (able %drum)) way))
::
++ went-helm ::
|= [then her=ship kay=cape]
(ably (take-went:(helm-work [hid ost src] (able %helm)) way +<+))

View File

@ -1,11 +1,11 @@
:: :::::::::::::::
:::: /hook/core/octo/ape :: :: :: build
:: :::::::::::::::
:: :: ::
:::: /hook/core/acto/ape :: :: dependencies
:: :: ::
/- *sole :: structures
/+ sole :: libraries
:: :::::::::::::::
:::: :: :: :: logic
!: :::::::::::::::
:: :: ::
:::: :: :: structures
!: :: ::
=> |% :: board logic
++ board ,@ :: one-player bitfield
++ point ,[x=@ y=@] :: coordinate
@ -43,9 +43,9 @@
++ tab ~["+ 1 2 3" (row 0) (row 1) (row 2)] :: print table
-- ::
-- ::
:: :::::::::::::::
:::: :: :: :: agent
:: :::::::::::::::
:: :: ::
:::: :: :: server
:: :: ::
=> |% :: arvo structures
++ axle ,[%1 eye=face but=tube gam=game] :: agent state
++ axon $?(axle [%0 eye=face gam=game]) :: historical state
@ -146,17 +146,16 @@
?^ but (park %2 ~) :: [~ %& !who src]
(park:(link src !who) %2 `"link by {<src>}") ::
++ peer-sole :: console subscribe
|= [from *] =< abet ::
|= [from pax=path] =< abet ::
(plow:(fret +<-) %2 ~) ::
++ poke-sole-action :: console input
|= [from act=sole-action] =< abet ::
(work:(flet +<-) act) ::
++ poke-octo-move
|= [from wha=point] =< abet
=^ dud gam ~(m ~(at go gam) wha)
?> dud
=+ mus=~(res go gam) ::
(park(gam ?^(mus *game gam)) %2 mus)
++ poke-octo-move ::
|= [from wha=point] =< abet ::
=^ dud gam ~(m ~(at go gam) wha) ::
?> dud =+ mus=~(res go gam) ::
(park(gam ?^(mus *game gam)) %2 mus) ::
++ prep |= [from old=(unit ,[(list move) axon])] :: initialize
=< abet ?~ old +> ::
=< (park %2 ~) ::

View File

@ -65,7 +65,6 @@
[%peer wire dock path] ::
[%poke wire dock pear] ::
[%pull wire dock ~] ::
[%pass wire note] ::
== ::
++ move (pair bone card) :: user-level move
-- ::
@ -254,10 +253,6 @@
|= gyl=gill
(se-emit ost %pull (se-path gyl) gyl ~)
::
++ se-pass :: pass an action
|= [gyl=gill noh=note]
(se-emit ost %pass (se-path gyl) noh)
::
++ se-tame
|= gyl=gill
^+ ta

View File

@ -1,6 +1,6 @@
::
:::: /hook/core/talk/app
::
:: :: ::
:::: /hook/core/talk/app :: ::
:: :: ::
/? 314
/- *talk, *sole
/+ talk, sole
@ -957,13 +957,10 @@
|= mov=move
%_(+> moves [mov moves])
::
++ ra-ever :: emit success
.
::
++ ra-evil :: emit error
|= msg=cord
~& [%ra-evil msg]
+>
~| [%ra-evil msg]
!!
::
++ ra-house :: emit partners
|= ost=bone
@ -999,13 +996,11 @@
?~ q.cod
?. (~(has by stories) p.cod)
(ra-evil %talk-no-story)
=. +>.$ (ra-config p.cod *config)
ra-ever(stories (~(del by stories) p.cod))
=. +>.$ (ra-config p.cod u.q.cod)
ra-ever
(ra-config(stories (~(del by stories) p.cod)) p.cod *config)
(ra-config p.cod u.q.cod)
::
%review ra-ever:(ra-think | her +.cod)
%publish ra-ever:(ra-think & her +.cod)
%review (ra-think | her +.cod)
%publish (ra-think & her +.cod)
==
::
++ ra-config :: configure story
@ -1036,6 +1031,11 @@
%- (ra-know man) |= par=_pa =< pa-abet
(pa-quit:par %& cuz)
::
++ ra-retry :: subscription resend
|= [man=span cuz=station]
%- (ra-know man) |= par=_pa =< pa-abet
(pa-acquire:par [%& cuz]~)
::
++ ra-coup-repeat ::
|= [[num=@ud her=@p man=span] saw=(unit tang)]
(ra-repeat num [%& her man] saw)
@ -1055,13 +1055,12 @@
(ra-think | our.hid u.oot ~)
::
++ ra-cancel :: drop a bone
^+ .
=+ hep=(~(get by sup.hid) ost)
?~ hep +
?. ?=([@ @ *] q.u.hep)
+(general (~(del in general) ost))
%- (ra-know i.t.q.u.hep) |= par=_pa =< pa-abet
(pa-notify:pa-cancel:par p.u.hep %gone *human)
|= [src=ship pax=path]
^+ +>
?. ?=([@ @ *] pax)
+>(general (~(del in general) ost))
%- (ra-know i.t.pax) |= par=_pa =< pa-abet
(pa-notify:pa-cancel:par src %gone *human)
::
++ ra-human :: look up person
|= her=ship
@ -1238,6 +1237,9 @@
++ pa-diff-talk-report :: subscribed update
|= [cuz=station rad=report]
^+ +>
?. (~(has in sources.shape) [%& cuz])
~& [%pa-diff-unexpected cuz rad]
+>
?+ -.rad ~|([%talk-odd-friend rad] !!)
%cabal (pa-cabal cuz +.rad)
%group (pa-remind [%& cuz] +.rad)
@ -1307,7 +1309,7 @@
pa-monitor
::
++ pa-cancel :: unsubscribe from
:: ~& [%pa-cancel ost]
~& [%pa-cancel ost]
%_ .
guests (~(del by guests) ost)
viewers (~(del in viewers) ost)
@ -1609,7 +1611,6 @@
==
::
++ te-whom :: render sender
~& [%te-whom man lix te-best te-maud]
(~(ta-show ta man (need te-best)) ~ te-maud)
--
::
@ -1710,16 +1711,24 @@
=+ wer=(etch way)
?>(?=(%repeat -.wer) (fun p.wer q.wer r.wer))
::
++ reap-friend ::
|= [then saw=(unit tang)]
^- (quip move +>)
?~ saw [~ +>]
%+ etch-friend [%friend way] |= [man=span cuz=station]
~& [%reap-friend-fail man cuz u.saw]
ra-abet:(~(ra-quit ra ost ~) man cuz)
::
++ quit-friend ::
|= then
%+ etch-friend [%friend way] |= [man=span cuz=station]
ra-abet:(~(ra-quit ra ost ~) man cuz)
ra-abet:(~(ra-retry ra ost ~) man cuz)
::
++ pull ::
|= [from pax=path]
^- [(list move) _+>]
:: ~& [%talk-pull src ost pax]
=^ moz +>.$ ra-abet:ra-ever:~(ra-cancel ra ost ~)
~& [%talk-pull src ost pax]
=^ moz +>.$ ra-abet:(~(ra-cancel ra ost ~) src pax)
[moz +>.$(shells (~(del by shells) ost))]
::
::++ poke-bit

View File

@ -1,11 +1,11 @@
:: :::::::::::::::
:::: /hook/core/acto/ape :: :: :: build
:: :::::::::::::::
/- *sole :: structures
/+ sole :: libraries
:: :::::::::::::::
:::: :: :: :: logic
!: :::::::::::::::
:: :: ::
:::: /hook/core/acto/ape :: :: dependencies
:: :: ::
/- *sole :: structure
/+ sole :: library
:: :: ::
:::: :: :: structures
!: :: ::
=> |% :: board logic
++ board ,@ :: one-player bitfield
++ point ,[x=@ y=@] :: coordinate
@ -19,6 +19,9 @@
++ win %- lien :_ |=(a=@ =(a (dis a bud))) :: test for win
(rip 4 0wl04h0.4A0Aw.4A00s.0e070) ::
-- ::
:: :: ::
:::: :: :: semantics
:: :: ::
++ go :: per game
|_ game ::
++ at |_ point :: per point
@ -43,9 +46,9 @@
++ tab ~["+ 1 2 3" (row 0) (row 1) (row 2)] :: print table
-- ::
-- ::
:: :::::::::::::::
:::: :: :: :: agent
:: :::::::::::::::
:: :: ::
:::: :: :: server
:: :: ::
=> |% :: arvo structures
++ axle ,[%0 eye=face gam=game] :: agent state
++ card ,[%diff lime] :: update
@ -59,7 +62,7 @@
-- ::
|_ [hid=hide moz=(list move) axle] :: per agent
++ et ::
|_ [from say=sole-share] :: per console client
|_ [from say=sole-share] :: per console
++ abet +>(q.eye (~(put by q.eye) ost say)) :: continue
++ amok +>(q.eye (~(del by q.eye) ost)) :: discontinue
++ beep (emit %bel ~) :: bad user
@ -102,9 +105,9 @@
++ park |= [lev=?(%0 %1 %2) mus=(unit tape)] :: general update
=+ pals |- ^+ +>.^$ ?~ +< +>.^$ ::
$(+< t.+<, +>.^$ (~(plow et i.+<) lev mus)) ::
:: :::::::::::::::
:::: :: :: :: hooks
:: :::::::::::::::
:: :: ::
:::: :: :: events
:: :: ::
++ peer-sole :: console subscribe
|= [from *] =< abet ::
(plow:(fret +<-) %2 ~) ::

View File

@ -413,7 +413,7 @@
vix=(bex +((cut 0 [25 2] mag))) :: width of sender
tay=(cut 0 [27 5] mag) :: message type
==
?> =(5 vez)
?> =(7 vez)
?> =(chk (end 0 20 (mug bod)))
:+ [(end 3 wix bod) (cut 3 [wix vix] bod)]
(kins tay)
@ -433,7 +433,7 @@
=+ tay=(ksin q.kec)
%+ mix
%+ can 0
:~ [3 5]
:~ [3 7]
[20 (mug bod)]
[2 yax]
[2 qax]
@ -1018,7 +1018,7 @@
++ gnaw :: gnaw:am
|= [kay=cape ryn=lane pac=rock] :: process packet
^- [p=(list boon) q=fort]
?. =(5 (end 0 3 pac)) [~ fox]
?. =(7 (end 0 3 pac)) [~ fox]
=+ kec=(bite pac)
?: (goop p.p.kec) [~ fox]
?. (~(has by urb.ton.fox) q.p.kec)
@ -1931,8 +1931,8 @@
::
++ wegh
^- mass
:- %ames
:- %|
:~ fox/`fox
:: cor/`.
==
--

View File

@ -1699,8 +1699,6 @@
%that
?: =(r.ali.dat r.bob.dat)
(done:he ~)
?: (~(has in (reachable-takos r.bob.dat)) r.ali.dat)
(done:he ~)
=. new.dat (make-yaki [r.ali.dat r.bob.dat ~] q.ali.dat now)
=. hut.ran (~(put by hut.ran) r.new.dat new.dat)
=. erg.dat
@ -2439,10 +2437,16 @@
::
%init
:_ ..^$(fat.ruf (~(put by fat.ruf) p.q.hic [hen ~ ~]))
=+ bos=(sein p.q.hic)
~& [%bos bos p.q.hic]
?: =(bos p.q.hic) ~
[hen %pass / %c %font p.q.hic %base bos %kids]~
=+ [bos=(sein p.q.hic) can=(clan p.q.hic)]
%- zing ^- (list (list move))
:~ ~& [%bos bos p.q.hic]
?: =(bos p.q.hic) ~
[hen %pass / %c %font p.q.hic %base bos %kids]~
::
~
:: ?. ?=(?(%king %czar) can) ~
:: [hen %pass / %c %font p.q.hic %kids p.q.hic %base]~
==
::
%info
?: =(%$ q.q.hic)
@ -2569,9 +2573,15 @@
%wegh
:_ ..^$ :_ ~
:^ hen %give %mass
:- %clay
:- %|
:~ ruf/`ruf
:: cor/`..^$
:~ domestic/`fat.ruf
foreign/`hoy.ruf
:- %object-store :- %|
:~ commits/`hut.ran.ruf
blobs/`lat.ran.ruf
==
autosync/`sor.ruf
==
==
::
@ -2643,7 +2653,7 @@
=. sor.ruf (~(put by sor.ruf) [our syd her sud] [nex hen])
=+ `move`[hen %pass tea %c %warp [our her] sud ~ %sing %y [%ud nex] /]
?: ?=(%& -.p.+.q.hin)
~& ['merge succeeded' p.p.+.q.hin]
:: ~& ['merge succeeded' p.p.+.q.hin]
[[- ~] ..^$]
~& :^ "merge failed"
"please manually merge the desks with"

View File

@ -6,11 +6,26 @@
++ gill (pair ship term) :: general contact
-- ::
=> |% :: console protocol
++ axle :: all dill state
++ all-axle ?(old-axle axle) ::
++ old-axle :: all dill state
$: %2 ::
ore=(unit ship) :: identity once set
hey=(unit duct) :: default duct
dug=(map duct axon) :: conversations
== ::
++ axle ::
$: %3 ::
ore=(unit ship) :: identity once set
hey=(unit duct) :: default duct
dug=(map duct axon) :: conversations
$= hef :: other weights
$: a=(unit mass) ::
c=(unit mass) ::
e=(unit mass) ::
f=(unit mass) ::
g=(unit mass) ::
t=(unit mass) ::
== ::
== ::
++ axon :: dill per duct
$: ram=term :: console program
@ -22,24 +37,7 @@
-- => ::
|% :: protocol below
++ gift gift-dill :: out result <-$
++ kiss :: in request ->$
$% [%belt p=belt] :: terminal input
[%blew p=blew] :: terminal config
[%boot p=*] :: weird %dill boot
[%crud p=@tas q=(list tank)] :: error with trace
[%flog p=flog] :: wrapped error
[%flow p=@tas q=(list gill)] :: terminal config
[%hail ~] :: terminal refresh
[%hook ~] :: this term hung up
[%harm ~] :: all terms hung up
[%init p=ship] :: after gall ready
[%noop ~] :: no operation
[%talk p=tank] ::
[%text p=tape] ::
[%veer p=@ta q=path r=@t] :: install vane
[%vega p=path] :: reboot by path
[%verb ~] :: verbose mode
== ::
++ kiss kiss-dill :: in request ->$
-- => ::
|% :: protocol outward
++ mess ::
@ -63,6 +61,7 @@
== ::
++ note-dill :: note to self, odd
$% [%crud p=@tas q=(list tank)] ::
[%heft ~] ::
[%init p=ship] ::
[%text p=tape] ::
[%veer p=@ta q=path r=@t] :: install vane
@ -74,11 +73,12 @@
[%deal p=sock q=cush] ::
== ::
++ note :: out request $->
$? [?(%a %c %e %f %g %t) %wegh ~] ::
$% [%a note-ames] ::
[%c note-clay] ::
[%d note-dill] ::
[%g note-gall] ::
== ::
== == ::
++ riff ,[p=desk q=(unit rave)] :: see %clay
++ sign-ames ::
$% [%nice ~] ::
@ -103,12 +103,13 @@
$% [%wake ~] ::
== ::
++ sign :: in result $<-
$? [?(%a %c %e %f %g %t) %mass p=mass] ::
$% [%a sign-ames] ::
[%c sign-clay] ::
[%d sign-dill] ::
[%g sign-gall] ::
[%t sign-time] ::
== ::
== == ::
:::::::: :: dill tiles
--
=| all=axle
@ -134,6 +135,29 @@
%crud :: (send `dill-belt`[%cru p.kyz q.kyz])
(crud p.kyz q.kyz)
%blew (send %rez p.p.kyz q.p.kyz)
%heft heft
%tick =+ ^= ges ^- gens
^- gens
:- %en
=+ can=(clan p.kyz)
?- can
%czar [%czar ~]
%duke [%duke %anon ~]
%earl [%earl (scot %p p.kyz)]
%king :- %king
?: =(~doznec p.kyz) :: so old tickets work
'Urban Republic'
(scot %p p.kyz)
%pawn [%pawn ~]
==
=+ yen=(scot %p (shax :(mix %ticket eny now)))
=+ ^= beg ^- [his=@p tic=@p yen=@t ges=gens]
[p.kyz q.kyz yen ges]
=+ cag=`cage`[%hood-begin !>(beg)]
%= +>.$
moz
:_(moz [hen %pass ~ %g %deal [our our] %hood %poke cag])
==
%veer (dump kyz)
%vega (dump kyz)
%verb (dump kyz)
@ -179,16 +203,32 @@
(dump %logo ~)
(done %blit [bit ~])
::
++ heft
%_ .
moz
:* [hen %pass /heft/ames %a %wegh ~]
[hen %pass /heft/clay %c %wegh ~]
[hen %pass /heft/eyre %e %wegh ~]
[hen %pass /heft/ford %f %wegh ~]
[hen %pass /heft/gall %g %wegh ~]
[hen %pass /heft/time %t %wegh ~]
moz
==
==
::
++ init :: initialize
~& [%dill-init our]
~& [%dill-init our ram]
=+ myt=(flop (need tem))
=+ can=(clan our)
=. tem ~
=. moz :_(moz [hen %pass / %c %font our %home our %base])
=. moz ?. ?=(?(%king %czar) can) moz
:_(moz [hen %pass / %c %font our %kids our %base])
=. moz :_(moz [hen %pass ~ %g %conf [[our ram] %load our %home]])
=. moz :_(moz [hen %pass ~ %g %deal [our our] ram %peer ~])
|- ^+ +>
?~ myt +>
$(myt t.myt, +> (send i.myt))
=. moz :_(moz [hen %pass ~ %g %deal [our our] ram %peer /drum])
|- ^+ +>+
?~ myt +>+
$(myt t.myt, +>+ (send i.myt))
::
++ into :: preinitialize
|= gyl=(list gill)
@ -224,6 +264,9 @@
|= sih=sign
^+ +>
?- sih
[?(%a %c %e %f %g %t) %mass *]
(wegt -.sih p.sih)
::
[%a %nice *]
:: ~& [%take-nice-ames sih]
+>
@ -252,7 +295,8 @@
:: ~& [%take-gall-unto +>.sih]
?- -.+>.sih
%coup ?~(p.p.+>.sih +>.$ (crud %coup u.p.p.+>.sih))
%quit !! :: ??
%quit ~& %dill-console-quit
(dump %logo ~)
%reap ?~(p.p.+>.sih +>.$ (crud %reap u.p.p.+>.sih))
%diff pump:(from ((hard dill-blit) q:`vase`+>+>.sih))
==
@ -270,6 +314,38 @@
:: ~& %dill-wake
+>
==
::
++ wegh
^- mass
:- %dill
:- %|
:~ all/`[ore hey dug]:all
==
::
++ wegt
|= [lal=?(%a %c %e %f %g %t) mas=mass]
^+ +>
=. hef.all
?- lal
%a ~?(?=(^ a.hef.all) %double-mass-a hef.all(a `mas))
%c ~?(?=(^ c.hef.all) %double-mass-c hef.all(c `mas))
%e ~?(?=(^ e.hef.all) %double-mass-e hef.all(e `mas))
%f ~?(?=(^ f.hef.all) %double-mass-f hef.all(f `mas))
%g ~?(?=(^ g.hef.all) %double-mass-g hef.all(g `mas))
%t ~?(?=(^ t.hef.all) %double-mass-t hef.all(t `mas))
==
?. ?& ?=(^ a.hef.all)
?=(^ c.hef.all)
?=(^ e.hef.all)
?=(^ f.hef.all)
?=(^ g.hef.all)
?=(^ t.hef.all)
==
+>.$
%+ done(hef.all [~ ~ ~ ~ ~ ~])
%mass
=> [hef.all d=wegh]
[%vanes %| ~[u.a u.c d u.e u.f u.g u.t]]
--
::
++ ax :: make ++as
@ -287,7 +363,7 @@
[~ ~]
80
0
(tuba "<{(trip p.kyz)}>")
(tuba "<awaiting {(trip p.kyz)}>")
==
--
|% :: poke/peek pattern
@ -313,6 +389,8 @@
?: ?=([%crud %hax-init [%leaf *] ~] p.q.hic)
=+ him=(slav %p (crip p.i.q.p.q.hic))
:_(..^$ ?~(hey.all ~ [u.hey.all %give %init him]~))
?: ?=([%crud %hax-heft ~] p.q.hic)
:_(..^$ ?~(hey.all ~ [u.hey.all %slip %d %heft ~]~))
:_(..^$ ?~(hey.all ~ [u.hey.all %slip %d p.q.hic]~))
=. hey.all ?^(hey.all hey.all `hen)
?: ?=(%init -.q.hic)
@ -322,15 +400,7 @@
=: ore.all `p.q.hic
dug.all ~
==
=+ ^= flo ^- (list (pair ship term))
=+ myr=(clan p.q.hic)
?: =(%pawn myr)
[[p.q.hic %dojo] [p.q.hic %hood] ~]
?: =(%earl myr)
=+ fap=(sein p.q.hic)
[[fap %dojo] [fap %talk] [fap %hood] ~]
[[p.q.hic %dojo] [p.q.hic %talk] [p.q.hic %hood] ~]
=^ moz all abet:(need (ax (need hey.all) [%flow %sole flo]))
=^ moz all abet:(need (ax (need hey.all) [%flow %hood ~]))
?: |((lth p.q.hic 256) (gte p.q.hic (bex 64))) [moz ..^$] :: XX HORRIBLE
[:_(moz [(need hey.all) %give %init p.q.hic]) ..^$]
=+ nus=(ax hen q.hic)
@ -346,7 +416,9 @@
~
::
++ load :: trivial
|= old=axle
|= old=all-axle
?: ?=(%2 -.old)
$(old [%3 ore hey dug ~ ~ ~ ~ ~ ~]:old)
..^$(all old)
:: |= old=* :: diable
:: ..^$(ore.all `~zod)
@ -379,4 +451,3 @@
[moz ..^$]
--
:: good test

View File

@ -119,7 +119,7 @@
[%get him=ship rem=pork]
[%js ~]
[%json ~]
[%try him=ship cod=cord]
[%try him=ship paz=(unit cord)]
[%xen ses=hole rem=pork]
==
::
@ -157,18 +157,19 @@
++ session-from-cookies
|= [nam=@t maf=math]
^- (unit hole)
=+ ^= cok ^- (list ,@t)
=+ cok=(~(get by maf) 'cookie')
?~(cok ~ u.cok)
|- ^- (unit hole)
(from-cookies maf |=([k=@t v=@] &(=(nam k) !=('~' v))))
::
++ ship-from-cookies
|= maf=math ^- (unit ship)
(biff (from-cookies maf |=([k=@ @] =(%ship k))) (slat %p))
::
++ from-cookies
|= [maf=math fil=$+([@t @t] ?)]
=+ `cot=(list ,@t)`(~(get ju maf) 'cookie')
=+ `cok=quay`(zing `(list quay)`(murn cot (curr rush cock:epur)))
|- ^- (unit cord)
?~ cok ~
=+ mar=`(unit (list ,[p=@t q=@t]))`(rush i.cok cock:epur)
?~ mar $(cok t.cok)
|- ^- (unit hole)
?~ u.mar ^$(cok t.cok)
?: &(=(nam p.i.u.mar) !=('~' q.i.u.mar))
[~ q.i.u.mar]
$(u.mar t.u.mar)
?:((fil i.cok) [~ q.i.cok] $(cok t.cok))
::
++ wush
|= [wid=@u tan=tang]
@ -184,9 +185,11 @@
hit(q (weld cuh q.hit))
::
++ add-poll :: inject dependency
|= [dep=@uvH max=[[%html ~] [[%head ~] hed=marl] [[%body ~] manx marl] ~]]
|= [dep=@uvH max=[[%html ~] [[%head ~] hed=marl] [[%body ~] tal=marl] ~]]
^- manx
=. hed.max :_(hed.max ;meta(charset "utf-8", urb_injected "");)
=: hed.max :_(hed.max ;meta(charset "utf-8", urb_injected "");)
tal.max (welp tal.max ;script(urb_injected ""):"{(trip etag:js)}" ~)
==
?~ dep max
max(hed :_(hed.max ;script@"/~/on/{<dep>}.js"(urb_injected "");))
::
@ -274,19 +277,30 @@
})
}
if(window.ship) ship.innerText = urb.ship
urb.foreign = /^\/~\/am/.test(window.location.pathname)
urb.redir = function(ship){
if(ship) document.location.pathname =
document.location.pathname.replace(/^\/~~|\/~\/as\/any/,'/~/as/~'+ship)
else document.location =
document.location.hash.match(/#[^?]+/)[0].slice(1) +
document.location.pathname.replace(
/^\/~\/am\/[^/]+/,
'/~/as/~' + urb.ship) +
document.location.search
}
if(urb.foreign && urb.auth.indexOf(urb.ship) !== -1){
req("/~/auth.json?PUT",
{ship:urb.ship,code:null},
function(){urb.redir()})
}
urb.submit = function(){
if(urb.ship !== $ship.text().toLowerCase())
return urb.redir($ship.text().toLowerCase()) // XX redundant?
req(
"/~/auth.json?PUT",
{ship: ship.innerText, code: pass.value},
{ship:ship.innerText.toLowerCase(), code:pass.value},
function(){
if(urb.foreign) document.location =
document.location.hash.match(/#[^?]+/)[0].slice(1) +
document.location.pathname.replace(
/^\/~\/am\/[^/]+/,
'/~/as/~' + urb.ship) +
document.location.search
if(urb.foreign) urb.redir()
else document.location.reload()
})
}
@ -294,30 +308,78 @@
function(){document.getElementById("c").innerHTML = "<p>Goodbye.</p>" }
)}
'''
++ etag
'''
if(!window.urb) window.urb = {}
urb.fetchTag = function(){
var tag = JSON.parse(this.getResponseHeader("etag"))
if(tag) urb.wasp(tag)
}
urb.headReq = function(url){
var xhr = new XMLHttpRequest()
xhr.open("HEAD", url)
xhr.onload = urb.fetchTag
xhr.send()
}
Array.prototype.map.call(document.querySelectorAll('script'), function(ele){
if((new URL(ele.src)).host == document.location.host)
urb.headReq(ele.src)
})
Array.prototype.map.call(document.querySelectorAll('link'), function(ele){
if((new URL(ele.href)).host == document.location.host)
urb.headReq(ele.href)
})
'''
--
++ xml
|%
++ login-page
%+ titl 'Log in'
;= ;div#c
;p: Please log in.
;p.mono: ~;{span#ship(contenteditable "")}
;input#pass(onchange "urb.submit()");
;pre:code#err;
;script@"/~/at/~/auth.js";
%+ titl 'Log in :urbit'
;= ;h1: Please log in
;p.ship
;div.sig: ~
;span#ship(contenteditable "");
==
;link(rel "stylesheet", href "/home/lib/base.css");
;input#pass(type "password");
;pre:code#err;
;script@"/~/at/~/auth.js";
;script:'''
$(function() {
$ship = $('#ship')
$pass = $('#pass')
$ship.on('keydown', function(e) {
if(e.keyCode === 13 || e.keyCode === 9) {
if(urb.ship !== $ship.text().toLowerCase())
urb.redir($ship.text().toLowerCase())
$pass.show()
$pass.focus()
e.preventDefault()
}
})
$ship.on('focus', function(e) {
$pass.hide()
})
$pass.on('keydown', function(e) {
if(e.keyCode === 13) {
urb.submit()
}
})
if(window.ship) {
$ship.text(urb.ship)
$pass.focus()
} else {
$pass.hide()
}
})
'''
==
::
++ logout-page
%+ titl 'Log out'
;= ;div#c
;p: Goodbye ~;{span#ship}.
;button#act(onclick "urb.away()"): Log out
;pre:code#err;
;script@"/~/at/~/auth.js";
==
;link(rel "stylesheet", href "/home/lib/base.css");
;= ;h1: Goodbye ~;{span#ship}.
;button#act(onclick "urb.away()"): Log out
;pre:code#err;
;script@"/~/at/~/auth.js";
==
::
++ poke-test
@ -333,7 +395,18 @@
}
'''
==
++ titl |=([a=cord b=marl] ;html:(head:title:"{(trip a)}" body:"*{b}"))
++ titl
|= [a=cord b=marl]
;html
;head
;meta(charset "utf-8");
;title:"{(trip a)}"
;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/".
"libs/jquery/2.1.1/jquery.min.js");
;link(rel "stylesheet", href "/home/lib/base.css");
==
;body:div#c:"*{b}"
==
--
--
|% :: functions
@ -385,7 +458,7 @@
=. p.p.pul |(p.p.pul ?=(hoke r.p.pul))
=+ her=(host-to-ship r.p.pul)
?: |(?=(~ her) =(our u.her))
(handle pul [q.+.kyz anon] [p.heq maf s.heq])
(handle pul [q.+.kyz |] [p.heq maf s.heq])
=+ han=(sham hen)
=. pox (~(put by pox) han hen)
(ames-gram u.her [%get ~] han +.kyz)
@ -428,6 +501,9 @@
%hat (foreign-hat:(ses-ya p.u.mez) q.p.kyz q.u.mez)
%get (pass-note ay/(dray p/uv/~ q.p.kyz p.u.mez) [%e %this q.u.mez])
%got
?. (~(has by pox) p.u.mez)
~& lost-gram-thou/p.kyz^p.u.mez
+>.$
=: hen (~(got by pox) p.u.mez)
pox (~(del by pox) p.u.mez)
==
@ -582,7 +658,7 @@
(~(has in aut.u.cyz) our)
::
++ ses-ya |=(ses=hole ~(. ya ses (~(got by wup) ses)))
++ our-host `hart`[& ~ `/com/urbit/(rsh 3 1 (scot %p our))]
++ our-host `hart`[& ~ `/org/urbit/(rsh 3 1 (scot %p our))]
:: [| [~ 8.445] `/localhost] :: XX testing
::
++ ames-gram
@ -590,7 +666,8 @@
::
++ back :: %ford bounce
|= [tea=whir dep=@uvH mar=mark cay=cage]
(pass-note tea (ford-req root-beak [%cast mar %done ~ cay])) :: XX deps
=+ sil=`silk`[%cast mar %flag dep %done ~ cay]
(pass-note tea (ford-req root-beak sil))
::
++ ford-kill (pass-note ~ %f [%exec our *beak ~]) :: XX unused
++ ford-req |=([bek=beak kas=silk] [%f [%exec our bek `kas]])
@ -626,8 +703,8 @@
++ host-to-ship :: host to ship
|= hot=host
^- (unit ship)
=+ gow=(~(get by dop) hot)
?^ gow gow
:: =+ gow=(~(get by dop) hot) :: XX trust
:: ?^ gow gow
?. ?=(& -.hot) ~
=+ dom=(flop p.hot) :: domain name
?~ dom ~
@ -642,7 +719,7 @@
::
++ handle
|= $: [hat=hart pok=pork quy=quay] :: purl, parsed url
[cip=clip him=ship] :: client ip, ship
[cip=clip aut=?] :: client ip, nonymous?
[mef=meth maf=math bod=(unit octs)] :: method/headers/body
==
=< apex
@ -658,7 +735,9 @@
::
++ ford-get-beam
|= [bem=beam ext=term]
=: s.bem [%web ~(rent co (fcgi quy fcgi-cred:for-client)) s.bem]
=+ yac=for-client
=. him.yac ?.(aut anon him.yac)
=: s.bem [%web ~(rent co (fcgi quy fcgi-cred.yac)) s.bem]
r.bem ?+(r.bem r.bem [%ud %0] da/now)
==
(ford-req -.bem [%boil ext bem ~])
@ -778,7 +857,7 @@
[[%'PUT' ~] ~] %put
==
|-
?: ?=([%'~~' *] q.pok) :: auth shortcut
?: ?=([%'~~' *] q.pok) :: auth shortcuts
$(q.pok ['~' %as %own t.q.pok])
?. ?=([%'~' @ *] q.pok) ~
:- ~ ^- perk
@ -796,7 +875,7 @@
:_ pok(q t.but)
?+ i.but (slav %p i.but)
%anon anon
%own our
%own (fall (ship-from-cookies maf) our)
==
::
%on
@ -853,7 +932,7 @@
%get [%json ~]
%put
~| parsing/bod
[%try (need-body (ot ship/(su fed:ag) code/so ~):jo)]
[%try (need-body (ot ship/(su fed:ag) code/(mu so) ~):jo)]
::
%delt
~| parsing/bod
@ -881,7 +960,8 @@
=+ ext=(fall p.pok %urb)
=+ bem=?-(-.hem %beam p.hem, %spur [root-beak p.hem])
=+ wir=?+(mef !! %get ~, %head [%he ~])
[%& %| wir (ford-get-beam bem ext)]
=- ?.(aut [%& %| -] [%| (pass-note -)]) :: XX properly
[wir (ford-get-beam bem ext)]
::
%bugs
?- p.hem
@ -937,7 +1017,7 @@
::
%at
=. ..ya abet.yac
=+ pez=process(pok p.ham)
=+ pez=process(pok p.ham, aut |)
?. ?=(%& -.pez) ~|(no-inject/p.ham !!)
?~ p.pez pez
?+ -.p.pez ~&(bad-inject/p.pez !!)
@ -953,13 +1033,17 @@
::
%del
=. ..ya (logoff:yac p.ham)
=+ cug=[(cat 3 cookie-prefix '=~; Path=/')]~
=+ cug=[(set-cookie cookie-prefix '~')]~
[%| (give-json 200 cug (joba %ok %b &))]
::
%get
|-
~| aute/ham
?: |(=(anon him.ham) (~(has in aut.yac) him.ham))
process(him him.ham, pok rem.ham)
=. ..ya abet.yac(him him.ham)
=+ pez=process(pok rem.ham, aut &)
?: ?=(%| -.pez) pez
[%| (resolve ~ p.pez)]
?. =(our him.ham)
[%| ((teba foreign-auth.yac) him.ham hat rem.ham quy)]
(show-login-page ~)
@ -968,9 +1052,12 @@
:- %|
?. =(our him.ham)
~|(stub-foreign/him.ham !!)
?. =(load-secret cod.ham)
?. ?| (~(has in aut.yac) him.ham)
?~(paz.ham | =(u.paz.ham load-secret))
==
~|(try/`@t`load-secret !!) :: XX security
=^ jon ..ya stat-json:(logon:yac him.ham)
=. cug.yac :_(cug.yac (set-cookie %ship (scot %p him.ham)))
(give-json 200 cug.yac jon)
==
::
@ -983,10 +1070,31 @@
?: (~(has by wup) u.ses)
[%& %htme login-page:xml]
=+ yac=(new-ya u.ses)
=. ..ya abet.yac
[%| (give-html 401 cug.yac login-page:xml)]
=+ =- lon=?~(- | (~(has in aut.u.-) our))
(biff (session-from-cookies cookie-prefix maf) ~(get by wup))
=. yac ?.(lon yac (logon.yac our))
[%| (give-html(..ya abet.yac) 401 cug.yac login-page:xml)]
::
++ cookie-prefix (rsh 3 1 (scot %p our))
++ cookie-domain
^- cord
?- r.hat
[%| @] (cat 3 '; Domain=' (rsh 3 1 (scot %if p.r.hat)))
[%& %org %urbit *] '; Domain=.urbit.org'
[%& @ @ *] =+ dom=p.r.hat
=- (rap 3 i.dom '.' i.t.dom -)
|-(?~(t.t.dom ~ ['.' i.t.t.dom $(dom t.dom)]))
[%& *] '' :: XX security?
==
::
++ set-cookie
|= [key=@t val=@t]
%+ rap 3 :~
key '=' val
:: '; HttpOnly' ?.(sec '' '; Secure') :: XX security
cookie-domain
'; Path=/; HttpOnly'
==
++ need-ixor (oryx-to-ixor (need grab-oryx))
++ for-view ^+(ix (ire-ix need-ixor))
::
@ -1000,18 +1108,18 @@
?~ cyz
~& bad-cookie/u.lig
(new-ya (rsh 3 1 (scot %p (end 6 1 ney))))
~(. ya u.lig u.cyz(him him, cug ~))
~(. ya u.lig u.cyz(cug ~))
::
++ new-ya |=(ses=hole ~(. ya ses (new-cyst ses)))
++ new-cyst
|= ses=hole
=* sec p.hat
=+ pef=cookie-prefix
^- cyst
:* ^- cred
:* hat(p sec)
~
'not-yet-implemented' ::(rsh 3 1 (scot %p (end 6 1 (shaf %oryx ses))))
'not-yet-implemented'
::(rsh 3 1 (scot %p (end 6 1 (shaf %oryx ses))))
::
=+ lag=(~(get by maf) %accept-language)
?~(lag ~ ?~(u.lag ~ [~ i.u.lag]))
@ -1021,11 +1129,7 @@
==
[anon ~]
::
:_ ~
%^ cat 3
(cat 3 (cat 3 pef '=') ses)
:: (cat 3 '; HttpOnly' ?.(sec '' '; Secure'))
'; Path=/; HttpOnly'
[(set-cookie cookie-prefix ses)]~
::
now
~
@ -1058,7 +1162,7 @@
%- give-thou:abet
(add-cookies cug [307 [location/(crip url)]~ ~])
::
++ logon
++ logon
|= her=ship
%_ +>
him her
@ -1133,7 +1237,6 @@
::
++ del-subs :: XX per path?
|= [a=dock %json b=wire c=path] ^+ ..ix
~& [%eyre-del-subs +< hen]
=. ..ix (hurl-note [a b] [%g %deal [him -.a] +.a %pull ~])
(nice-json:pop-duct:(ire-ix ire)) :: XX gall ack
::
@ -1230,9 +1333,9 @@
?: ?=(%wegh -.q.hic)
:_ ..^$ :_ ~
:^ hen %give %mass
:- %eyre
:- %|
:~ bol/`bol
:: cor/`..^$
==
=+ our=`@p`0x100 :: XX sentinel
=+ ska=(slod ski)

View File

@ -230,6 +230,8 @@
|= dep=@uvH
?~ dep
~&(dep-empty/hen +>.$)
?: =(dep 0vtest) :: upstream testing
+>.$(mow :_(mow [hen %give %news ~]))
=+ dap=(~(get by deh.bay) dep)
?~ dap ~&(dep-missed/dep +>.$) :: XX ~| !!
:: ~& awap/[dep u.dap]
@ -1111,9 +1113,17 @@
$(kas [%done p.kas u.q.kas])
::
%file
%+ cool |.(leaf/"ford: file {<p.kas>}")
(lear cof p.kas)
::
%flag
?~ p.kas $(kas q.kas)
=+ dap=(~(get by deh.bay) p.kas)
?~ dap ~&(flag-missed/p.kas $(kas q.kas))
=+ dep=?-(-.u.dap %init p.u.dap, %sent q.u.dap, %done [[bek ~] ~ ~])
=+ rez=$(kas q.kas) :: XX revisit ^ during dependency review
?: ?=(%1 -.q.rez) rez
rez(p.q (~(uni in p.q.rez) `(set beam)`dep))
::
%join
%+ cool
@ -1587,9 +1597,9 @@
?: ?=(%wegh -.q.hic)
:_ ..^$ :_ ~
:^ hen %give %mass
:- %ford
:- %|
:~ lex/`lex
:: cor/`..^$
==
=+ ^= our ^- @p
?- -.q.hic

View File

@ -23,8 +23,7 @@
$% [%meta p=@tas q=vase] ::
[%send p=ship q=cush] ::
== ::
++ cove (pair duct (mold cote cuft)) :: internal move
++ cute (pair bone (mold cote cuft)) :: internal move
++ cove (pair bone (mold cote cuft)) :: internal move
++ move ,[p=duct q=(mold note-arvo gift-arvo)] :: typed move
-- ::
|% :::::::::::::::::::::::::::::::::::::::::::::::::::::: %gall state
@ -134,7 +133,10 @@
|= [dap=dude pup=scup dep=@uvH gux=(each gage tang)]
^+ +>
?- -.gux
%| (mo-give %onto %| p.gux)
%|
=. +> (mo-bold dap dep)
=. +> (mo-give %onto %| p.gux)
+>
%&
?> ?=(@ p.p.gux)
?. (mo-okay q.p.gux)
@ -237,8 +239,7 @@
?- why
%peer (mo-give %unto %reap tug)
%poke (mo-give %unto %coup tug)
%pull ~& [%pull-fail tug]
+>.$
%pull +>.$
==
::
++ mo-bale :: assign outbone
@ -411,6 +412,7 @@
::
++ mo-gawk :: ames forward
|= [him=@p dap=dude num=@ud rok=rook]
=. +> ?.(?=(%u -.rok) +> (mo-give %mack ~))
%+ mo-pass
[%sys %req (scot %p him) dap (scot %ud num) ~]
^- note-arvo
@ -436,7 +438,7 @@
|_ $: $: dap=dude
pry=prey
ost=bone
zip=(list cute)
zip=(list cove)
dub=(list (each suss tang))
==
seat
@ -479,14 +481,21 @@
=+ ded=(~(tap in ful) ~)
|- ^+ +>.^$
?~ ded +>.^$
$(ded t.ded, +>.^$ ap-kill(ost i.ded))
%= $
ded t.ded
+>.^$
%= ap-kill
ost i.ded
q.q.pry p:(~(got by sup.ged) i.ded)
==
==
?. ?=([%give %diff *] q.i.pyz)
$(pyz t.pyz)
=^ vad +> ap-fill(ost p.i.pyz)
$(pyz t.pyz, ful ?:(vad ful (~(put in ful) p.i.pyz)))
::
++ ap-aver :: cute to move
|= cov=cute
++ ap-aver :: cove to move
|= cov=cove
^- move
:- (~(got by r.zam) p.cov)
?- -.q.cov
@ -526,9 +535,10 @@
++ ap-diff :: pour a diff
|= [her=ship pax=path cag=cage]
=. q.cag (spec q.cag)
=+ cug=(ap-find [%diff p.cag pax])
=+ cug=(ap-find [%diff p.cag +.pax])
?~ cug
(ap-pump:(ap-lame %diff (ap-suck "pour: no diff")) | her pax)
%. [| her +.pax]
ap-pump:(ap-lame %diff (ap-suck "diff: no {<`path`[p.cag pax]>}"))
=+ ^= arg ^- vase
%- slop
?: =(0 p.u.cug)
@ -539,10 +549,9 @@
(ap-pump:(ap-lame q.u.cug u.cam) | her pax)
(ap-pump & her pax)
::
++ ap-pump :: break subscription
++ ap-pump :: update subscription
|= [oak=? her=ship pax=path]
=+ way=[(scot %p her) %out pax]
:: ~& [%ap-pump-path oak pax]
?: oak
(ap-pass way %send her -.pax %pump ~)
(ap-pass:(ap-give %quit ~) way %send her -.pax %pull ~)
@ -621,7 +630,7 @@
::
++ ap-move :: process each move
|= vax=vase
^- (each cute tang)
^- (each cove tang)
?@ q.vax [%| (ap-suck "move: invalid move (atom)")]
?^ -.q.vax [%| (ap-suck "move: invalid move (bone)")]
?@ +.q.vax [%| (ap-suck "move: invalid move (card)")]
@ -641,14 +650,14 @@
::
++ ap-move-quit :: give quit move
|= [sto=bone vax=vase]
^- (each cute tang)
^- (each cove tang)
?^ q.vax [%| (ap-suck "move: improper quit")]
[%& `cute`[sto %give `cuft`[%quit ~]]]
[%& `cove`[sto %give `cuft`[%quit ~]]]
::
++ ap-move-diff :: give diff move
|= [sto=bone vax=vase]
=. vax (spec vax)
^- (each cute tang)
^- (each cove tang)
?. &(?=(^ q.vax) ?=(@ -.q.vax) ((sane %tas) -.q.vax))
[%| (ap-suck "move: improper diff")]
[%& sto %give %diff `cage`[-.q.vax (slot 3 (spec vax))]]
@ -667,7 +676,7 @@
::
++ ap-move-pass :: pass general move
|= [sto=bone wut=* vax=vase]
^- (each cute tang)
^- (each cove tang)
?. &(?=(@ wut) ((sane %tas) wut))
[%| (ap-suck "move: malformed card")]
=+ pux=((soft path) -.q.vax)
@ -681,7 +690,7 @@
::
++ ap-move-poke :: pass %poke
|= [sto=bone vax=vase]
^- (each cute tang)
^- (each cove tang)
=+ yep=(ap-move-mess vax)
?: ?=(%| -.yep) yep
=+ gaw=(slot 7 vax)
@ -693,7 +702,7 @@
::
++ ap-move-peer :: pass %peer
|= [sto=bone vax=vase]
^- (each cute tang)
^- (each cove tang)
=+ yep=(ap-move-mess vax)
?: ?=(%| -.yep) yep
=+ pux=((soft path) +>.q.vax)
@ -705,7 +714,7 @@
::
++ ap-move-pull :: pass %pull
|= [sto=bone vax=vase]
^- (each cute tang)
^- (each cove tang)
=+ yep=(ap-move-mess vax)
?: ?=(%| -.yep) yep
?. =(~ +>.q.vax)
@ -716,7 +725,7 @@
::
++ ap-move-send :: pass gall action
|= [sto=bone vax=vase]
^- (each cute tang)
^- (each cove tang)
?. ?& ?=([p=* [q=@ r=@] [s=@ t=*]] q.vax)
(gte 1 (met 7 q.q.vax))
((sane %tas) r.q.vax)
@ -761,12 +770,13 @@
=. +> (ap-peon pax)
=+ cug=(ap-find %peer pax)
?~ cug +>.$
=+ old=zip
=. zip ~
=^ cam +>.$
%+ ap-call q.u.cug
!>([[`@ud`ost `@p`q.q.pry] `path`(slag p.u.cug pax)])
?^ cam
(ap-give:ap-pule %reap cam)
(ap-give %reap ~)
=. zip (weld zip `(list cove)`[[ost %give %reap cam] old])
?^(cam ap-pule +>.$)
::
++ ap-peon :: add subscriber
|= pax=path
@ -845,6 +855,7 @@
?. (ap-fond %prep)
?~ vux
`+>.$
=+ [new=p:(slot 13 hav) old=p:(slot 13 u.vux)]
?. (~(nest ut p:(slot 13 hav)) %| p:(slot 13 u.vux))
:_(+>.$ `(ap-suck "prep mismatch"))
`+>.$(+13.q.hav +13.q.u.vux)
@ -899,7 +910,7 @@
::
++ ap-safe :: process move list
|= vax=vase
^- (each (list cute) tang)
^- (each (list cove) tang)
?~ q.vax [%& ~]
?@ q.vax [%| (ap-suck "move: malformed list")]
=+ sud=(ap-move (slot 2 vax))
@ -1024,6 +1035,14 @@
=+ mes=((hard ,[@ud roon]) r.q.hic)
=< mo-abet
(mo-gawd:(mo-abed:mo our hen) him dap mes)
::
%wegh
:_ ..^$ :_ ~
:^ hen %give %mass
:- %gall
:- %|
:~ all/`all
==
==
::
++ doze :: sleep until

View File

@ -9648,7 +9648,7 @@
$% [%tabl p=(list (pair marc marc))] :: map
== ::
++ mark ,@tas :: content type
++ mass (each noun (list (pair cord ,mass))) :: memory usage
++ mass (pair cord (each noun (list ,mass))) :: memory usage
++ mill (each vase milt) :: vase/metavase
++ milt ,[p=* q=*] :: metavase
++ monk (each ship ,[p=@tas q=@ta]) :: general identity
@ -10108,12 +10108,13 @@
:_ -.avo
%= i.ova
q.q
:- %userspace
:- %|
:~ [%hoon `pit]
[%zuse `bud]
[%hoon-cache `p.niz]
[%vanes q.q.i.ova]
[%dot `.]
:~ hoon/`pit
zuse/`bud
hoon-cache/`p.niz
q.q.i.ova
dot/`.
==
==
=+(avo=$(ova t.ova) [[i.ova -.avo] +.avo])

View File

@ -190,9 +190,9 @@
%wegh
:_ tym :_ ~
:^ hen %give %mass
:- %time
:- %|
:~ tym/`tym
:: cor/`..^$
==
==
[mof ..^$]

View File

@ -2366,6 +2366,7 @@
== ::
++ flog :: sent to %dill
$% [%crud p=@tas q=(list tank)] ::
[%heft ~] ::
[%text p=tape] ::
[%veer p=@ta q=path r=@t] :: install vane
[%vega p=path] :: reboot by path
@ -2378,6 +2379,7 @@
[%blit p=(list blit)] :: terminal output
[%init p=@p] :: set owner
[%logo ~] :: logout
[%mass p=mass] :: memory usage
[%veer p=@ta q=path r=@t] :: install vane
[%vega p=path] :: reboot by path
[%verb ~] :: verbose mode
@ -2390,9 +2392,11 @@
[%flog p=flog] :: wrapped error
[%flow p=@tas q=(list gill)] :: terminal config
[%hail ~] :: terminal refresh
[%heft ~] :: memory report
[%hook ~] :: this term hung up
[%harm ~] :: all terms hung up
[%init p=ship] :: after gall ready
[%tick p=@p q=@p] :: initial ticket
[%noop ~] :: no operation
[%talk p=tank] ::
[%text p=tape] ::
@ -2475,6 +2479,7 @@
[%dude p=tank q=silk] :: error wrap
[%dune p=(set beam) q=(unit gage)] :: unit literal
[%file p=beam] :: from clay
[%flag p=@uvH q=silk] :: re-apply user deps
[%join p=mark q=silk r=silk] :: merge
[%mash p=mark q=milk r=milk] :: annotate
[%mute p=silk q=(list (pair wing silk))] :: mutant
@ -2521,6 +2526,7 @@
++ cush (pair term club) :: internal kiss
++ dude term :: server identity
++ scup (pair ship desk) :: autoupdate
++ well (pair desk term) ::
++ suss (trel dude ,@tas ,@da) :: config report
:::: ::
++ kiss-gall :: incoming request
@ -2529,9 +2535,11 @@
[%deal p=sock q=cush] :: full transmission
[%rote p=sack q=path r=*] :: remote request
[%roth p=sack q=path r=*] :: remote response
[%wegh ~] :: report memory
== ::
++ gift-gall :: outgoing result
$% [%onto p=(each suss tang)] :: about agent
$% [%mass p=mass] :: memory usage
[%onto p=(each suss tang)] :: about agent
[%unto p=cuft] :: within agent
[%mack p=(unit tang)] :: message ack
== ::

View File

@ -0,0 +1,12 @@
::
:::: /hook/gate/reload/helm/cat
::
/? 314
::
::::
!:
|= $: [now=@da eny=@uvI bec=beak]
[~ ~]
==
:- %helm-mass
~

View File

@ -0,0 +1,11 @@
::
:::: /hook/gate/mass/hood/cat
::
/? 314
::
::::
!:
|= $: [now=@da eny=@uvI bec=beak]
[arg=~ ~]
==
[%hood-mass ~]

View File

@ -1,21 +0,0 @@
:: Bang: send cards to arvo
::
:::: /hook/core/bang/app
::
/+ sh-utils
!:
::::
::
|_ [hide ~]
++ lima |*(a=(pole) ?~(a ~ [i t]=a(+ (..$ +.a))))
++ poke--args
|* [ost=bone @ a=[* (pole)]]
=> .(a ^.(lima a))
:_(+> (turn a |*(b=_i.a [ost %pass / b])))
::
++ pour
%- add-exit
|= [@ * sih=*]
~& bang-resp/(,[term term] [&1 &2]:sih)
`+>.$
--

View File

@ -1,58 +0,0 @@
|%
++ sign
$% $: %a
$% [%went p=ship q=cape]
[%init p=@p]
== == ==
++ began-args ,[his=@p tic=@p eny=@t ges=gens ~]
--
::
!:
::::
::
|_ [hid=hide %0 ust=bone his=@p mac=mace]
++ peer ,_`.
++ poke-began-args
|= [ost=bone you=ship began-args]
=+ bur=(shax :(mix (jam ges) eny))
=+ loy=(bruw 2.048 bur)
:_ +>.$(ust ost, his his, mac [0 sec:ex:loy]~)
:~ :* ost %pass /ticketing %a %want [our.hid (sein his)] /q/ta
his tic ges pub:ex:loy
==
==
::
++ poke-will
|= [ost=bone you=ship wil=(unit will)]
:_ +>.$
?~ wil
[ust %give %mean ~ %rejected ~]~
:~ [ust %pass / %a %cash his mac u.wil]
[ust %pass / %c %plug our.hid %main (sein our.hid) %main]
[ust %pass / %c %plug our.hid %arvo (sein our.hid) %arvo]
[ust %pass / %c %plug our.hid %try (sein our.hid) %try]
[ust %give %nice ~]
==
::
++ pour
|= [ost=bone pax=path sih=*]
=+ sih=((soft sign) sih) :: seem to get blits
?~ sih `+>.$
:_ +>.$
?- +<.u.sih
%init [ost %give +.u.sih]~
%went ~
==
::
++ poke-will
|= [ost=bone you=ship wil=(unit will)]
:_ +>.$
?~ wil
[ust %give %mean ~ %rejected ~]~
:~ [ust %pass / %a %cash his mac u.wil]
[ust %pass / %c %plug our.hid %main (sein our.hid) %main]
[ust %pass / %c %plug our.hid %arvo (sein our.hid) %arvo]
[ust %pass / %c %plug our.hid %try (sein our.hid) %try]
[ust %give %nice ~]
==
--

View File

@ -1,442 +0,0 @@
|%
++ sign
$% $: %g
$% [%init p=@p]
[%nice ~]
[%mean p=ares]
[%rush %txt p=cord]
== == ==
++ form ,[his=@p tic=@p eny=@t ges=gens]
++ state
$? %begin %his %tic %eny %lag
%name %form %psect %pname %year
%govt %sect %fname %mname %nname
%lname %done
==
++ tepe ,[(unit ,[cord prom cord]) (list cord)]
--
::
!:
::::
::
|_ [hid=hide sat=state form]
++ peer ,_`.
++ done
|= ost=bone
:_ +>.$
:* :* ost %pass /to-gan %g %mess [our.hid /began] our.hid
%began-args !>([his tic eny ges ~])
==
(spam %rush %prompt '[waiting...]' %text '')
==
::
++ loon
%+ cook
|= all=(list ,@t)
|- ^- @t
?~ all %$
?~ t.all i.all
(cat 3 i.all (cat 3 ' ' $(all t.all)))
(most ace (cook |=(a=(list ,@) (rap 3 a)) (plus prn)))
::
++ next
|= txt=cord
^- [tepe _+>.$]
?- sat
%begin
:_ +>.$(sat %his)
:- `['Your ship: ~' %text '']
%- lore %- crip
"""
Do you have a ship and a ticket? If not, please ask
urbit@urbit.org for one.
"""
%his
=+ a=(rush txt fed:ag)
?~ a [[~ 'invalid input' ~] +>.$]
=> .(-.q.ges (clan u.a))
=+ ^= cow
|- ^- @ud
?- -.q.ges
%czar 256
%king (mul 255 $(-.q.ges %czar))
%duke (mul 65.535 $(-.q.ges %king))
%earl (mul (dec (bex 32)) $(-.q.ges %duke))
%pawn (sub (bex 128) $(-.q.ges %earl))
==
=+ ^= ves ^- tape
?- -.q.ges
%czar "carriers"
%king "cruisers"
%duke "destroyers"
%earl "yachts"
%pawn "submarines"
==
:_ ^+ +>.$ +>.$(his u.a, sat %tic)
:- `['Your ticket: ~' %text '']
%- lore %- crip
"""
Launching {(scow %p u.a)}, one of {<cow>} Urbit {ves}...
If I did not build for myself
for whom should I build?
-- Bunting, _Chomei at Toyama_
Let's configure your identity. Warning - it's nontrivial to
change this data once you've sent it to the server. If you enter
something wrong, hit ^D to cancel, then run the program again.
"""
::
%tic
=+ a=(rush txt fed:ag)
?~ a [[~ 'invalid input' ~] +>.$]
:_ +>.$(tic u.a, sat %eny)
:- `['Entropy: ' %pass '']
%- lore %- crip
"""
Enter a passphrase or other unusual text. You (or your enemies)
can regenerate your ship from this entropy.
"""
::
%eny
=+ a=(rush txt (boss 256 (more gon qit)))
?~ a [[~ 'invalid input' ~] +>.$]
=. u.a (shax u.a)
:_ +>.$(eny u.a, sat %lag)
:- `['Language: ' %text 'en']
%- lore %- crip
"""
Entropy check: {<`@p`(mug u.a)>}
What language would your ship rather speak? Enter it as a
two-letter (ISO 639-1) code, like "en" for English. Whatever
language you pick, it'll all be English now, but in future
we'll be more sensitive to your needs.
"""
::
%lag
=+ ^= par
%+ sear
|= [a=@ b=@]
^- (unit ,@ta)
=+ c=(cat 3 a b)
=+(d=(glon c) ?~(d ~ [~ c]))
;~(plug low low)
=+ a=(rush txt par)
?~ a [[~ 'invalid input' ~] +>.$]
?. ?=(%duke -.q.ges)
:_ +>.$(p.ges u.a, sat %name)
[`['Name: ' %text ''] ~]
:_ +>.$(p.ges u.a, sat %form)
:- `['Form: %' %text 'lady']
%- lore %- crip
"""
Please select one of the pre-chosen forms:
%lady female-identified individual
%lord male-identified individual
%punk opaque handle
%anon totally anonymous
"""
::
%name
?> ?=(?(%earl %king) -.q.ges)
=+ a=(rush txt (boss 256 (more gon qit)))
?~ a [[~ 'invalid input' ~] +>.$]
=+ gos=?-(-.q.ges %earl [%earl u.a], %king [%king u.a])
:_ +>.$(q.ges gos, sat %done)
[`['' %text ''] ~]
::
%form
=+ ^= par
;~ pose
(jest %anon)
(jest %lady)
(jest %lord)
(jest %punk)
==
=+ a=(rush txt par)
?~ a [[~ 'invalid input' ~] +>.$]
?+ u.a !!
%anon [[`['' %text ''] ~] +>.$(q.ges [%duke %anon ~], sat %done)]
%punk
:_ +>.$(q.ges [%duke %punk *sect ''], sat %pname)
[`['Handle: ' %text ''] ~]
?(%lady %lord)
=+ wat=?-(u.a %lady [%lady *whom], %lord [%lord *whom])
:_ +>.$(q.ges `gcos`[%duke wat], sat %year)
:- `['Year you were born: ' %text '19']
%- lore %- crip
"""
You've selected a personal identity. For a %lord or a %lady,
please use your real name only. If you'd prefer a fictitious
handle, you can hit ^D and start over as a %punk. Or you can
use %anon and go by your ship name alone.
As a real person, we're going to ask you for a little bit of
personal information - not enough to compromise your privacy,
just enough to make everyone on Urbit feel like a neighbor.
What we're going to ask you for is information that's (a)
public (would be obvious, or at least easy to guess, for
someone who met you in person); (b) durable (doesn't change
often); and (c) relevant (helps you connect with friends).
For example, we'll ask for the year (not day) you were born,
because your age is easy to guess in person, doesn't change,
and has a big effect on how people perceive you.
"""
==
::
%pname
=+ a=(rush txt loon)
?~ a [[~ 'invalid input' ~] +>.$]
:_ +>.$(q.ges [%duke %punk *sect u.a], sat %psect)
:- `['Banner: %' %text 'white']
%- lore %- crip
"""
One basic human instinct is the urge to form political tribes.
In a network that fights this need, these tribes form anyway and
they form badly. Urbit designs them into the infrastructure.
Inspired by the Qing Dynasty, you'll align yourself with one of
five colored "banners" - %red, %blue, %orange, %black or %white.
Political discourse across tribal boundaries is almost always an
antisocial act - less communication, than symbolic violence. In
Urbit, messages marked political stay within your own banner;
your friends in other banners simply won't see them. Between
banners, politics doesn't erode apolitical relationships; inside
each banner, political discourse is harmonious and productive.
Pick a banner by the adjective you feel best describes you:
%red far left: radical, anarchist
%blue center-left: moderate, liberal
%orange center-right: conservative, libertarian
%black far right: traditionalist, reactionary
Or if digital agitation isn't your cup of tea, choose %white, and
your Urbit experience will remain politics-free.
"""
::
%psect
?> ?=(%duke -.q.ges)
?> ?=(%punk -.p.q.ges)
=+ ^= par
;~ pose
(jest %white)
(jest %blue)
(jest %red)
(jest %black)
(jest %orange)
==
=+ a=(rush txt par)
?~ a [[~ 'invalid input' ~] +>.$]
:- [`['' %text ''] ~]
%= +>.$
q.ges [%duke %punk ((hard sect) u.a) q.p.q.ges]
sat %done
==
::
%year
?> ?=(%duke -.q.ges)
?> ?=(?(%lord %lady) -.p.q.ges)
=+ a=(rush txt dim:ag)
?~ a [[~ 'invalid input' ~] +>.$]
=+ woh=`whom`[u.a *govt *sect *name]
=+ wat=`what`?-(-.p.q.ges %lord [%lord woh], %lady [%lady woh])
:_ +>.$(q.ges [%duke wat], sat %govt)
:- `['Location ' %text 'us/94103']
%- lore %- crip
"""
Where are you? This is totally optional, but we'd like to
know your vague general location. You can enter nothing at
all, just a country code, or country and postal code.
"""
::
%govt
?> ?=(%duke -.q.ges)
?> ?=(?(%lord %lady) -.p.q.ges)
=+ ^= par
;~ pose
;~ plug (cook |=([a=@ b=@] (cat 3 a b)) ;~(plug low low))
;~ pfix fas
%+ cook
|=(a=tape (rap 3 ^-((list ,@) a)))
(star ;~(pose hig hep nud))
==
(easy ~)
==
==
=+ a=(rush txt par)
?~ a [[~ 'invalid input' ~] +>.$]
=+ woh=`whom`[p.p.p.q.ges u.a *sect *name]
=+ wat=`what`?-(-.p.q.ges %lord [%lord woh], %lady [%lady woh])
:_ +>.$(q.ges [%duke wat], sat %sect)
:- `['Banner: %' %text 'white']
%- lore %- crip
"""
One basic human instinct is the urge to form political tribes.
In a network that fights this need, these tribes form anyway and
they form badly. Urbit designs them into the infrastructure.
Inspired by the Qing Dynasty, you'll align yourself with one of
five colored "banners" - %red, %blue, %orange, %black or %white.
Political discourse across tribal boundaries is almost always an
antisocial act - less communication, than symbolic violence. In
Urbit, messages marked political stay within your own banner;
your friends in other banners simply won't see them. Between
banners, politics doesn't erode apolitical relationships; inside
each banner, political discourse is harmonious and productive.
Pick a banner by the adjective you feel best describes you:
%red far left: radical, anarchist
%blue center-left: moderate, liberal
%orange center-right: conservative, libertarian
%black far right: traditionalist, reactionary
Or if digital agitation isn't your cup of tea, choose %white, and
your Urbit experience will remain politics-free.
"""
::
%sect
?> ?=(%duke -.q.ges)
?> ?=(?(%lord %lady) -.p.q.ges)
=+ ^= par
;~ pose
(jest %white)
(jest %blue)
(jest %red)
(jest %black)
(jest %orange)
==
=+ a=(rush txt par)
?~ a [[~ 'invalid input' ~] +>.$]
=+ woh=`whom`[p.p.p.q.ges q.p.p.q.ges (sect u.a) *name]
=+ wat=`what`?-(-.p.q.ges %lord [%lord woh], %lady [%lady woh])
:_ +>.$(q.ges [%duke wat], sat %fname)
[`['First name: ' %text ''] ~]
::
%fname
?> ?=(%duke -.q.ges)
?> ?=(?(%lord %lady) -.p.q.ges)
=+ a=(rush txt loon)
?~ a [[~ 'invalid input' ~] +>.$]
=+ nam=[u.a *(unit ,@t) *(unit ,@t) *@t]
=+ woh=`whom`[p.p.p.q.ges q.p.p.q.ges r.p.p.q.ges nam]
=+ wat=`what`?-(-.p.q.ges %lord [%lord woh], %lady [%lady woh])
:_ +>.$(q.ges [%duke wat], sat %mname)
[`['Middle name (or blank): ' %text ''] ~]
::
%mname
?> ?=(%duke -.q.ges)
?> ?=(?(%lord %lady) -.p.q.ges)
=+ a=(rush txt ;~(pose (stag ~ loon) (easy ~)))
?~ a [[~ 'invalid input' ~] +>.$]
=+ nam=[p.s.p.p.q.ges u.a *(unit ,@t) *@t]
=+ woh=`whom`[p.p.p.q.ges q.p.p.q.ges r.p.p.q.ges nam]
=+ wat=`what`?-(-.p.q.ges %lord [%lord woh], %lady [%lady woh])
:_ +>.$(q.ges [%duke wat], sat %nname)
[`['Nickname/handle (or blank): ' %text ''] ~]
::
%nname
?> ?=(%duke -.q.ges)
?> ?=(?(%lord %lady) -.p.q.ges)
=+ a=(rush txt ;~(pose (stag ~ loon) (easy ~)))
?~ a [[~ 'invalid input' ~] +>.$]
=+ nam=[p.s.p.p.q.ges q.s.p.p.q.ges u.a *@t]
=+ woh=`whom`[p.p.p.q.ges q.p.p.q.ges r.p.p.q.ges nam]
=+ wat=`what`?-(-.p.q.ges %lord [%lord woh], %lady [%lady woh])
:_ +>.$(q.ges [%duke wat], sat %lname)
[`['Last name: ' %text ''] ~]
::
%lname
?> ?=(%duke -.q.ges)
?> ?=(?(%lord %lady) -.p.q.ges)
=+ a=(rush txt loon)
?~ a [[~ 'invalid input' ~] +>.$]
=+ nam=[p.s.p.p.q.ges q.s.p.p.q.ges r.s.p.p.q.ges u.a]
=+ woh=`whom`[p.p.p.q.ges q.p.p.q.ges r.p.p.q.ges nam]
=+ wat=`what`?-(-.p.q.ges %lord [%lord woh], %lady [%lady woh])
:_ +>.$(q.ges [%duke wat], sat %done)
[`['' %text ''] ~]
::
%done !! :: can't actually complete event because vere commits suicide
::[[`['[waiting...]' %text ''] ~] +>.$]
==
::
++ poke-begin-args
|= [ost=bone you=ship arg=$|(~ [his=ship ~])]
=^ res +>.$
^- [[pot=(unit ,[cord prom cord]) tak=(list cord)] _+>.$]
?~ arg
(next(sat %begin) '')
(next(sat %his) (rsh 3 1 (scot %p his.arg)))
:_ +>.$
%+ welp
:~ [ost %pass /in %g %show [our.hid +.imp.hid] you /in/[-.imp.hid]]
[ost %give %nice ~]
==
%+ welp
?~(pot.res ~ (spam %rush %prompt u.pot.res))
%^ spam %rush %tang
(turn tak.res |=(a=cord [%leaf (trip a)]))
::
++ pour
|= [ost=bone pax=path sih=*]
=+ sih=((hard sign) sih)
?: ?=(%init +<.sih)
[[ost %give +.sih]~ +>.$]
?: ?=([%in ~] pax)
?. ?=(%rush +<.sih) `+>.$
=^ res +>.$
^- [[pot=(unit ,[cord prom cord]) tak=(list cord)] _+>.$]
(next p.sih)
?: ?=(%done sat)
(done ost)
:_ +>.$
%+ welp
?~(pot.res ~ (spam %rush %prompt u.pot.res))
%^ spam %rush %tang
(turn tak.res |=(a=cord [%leaf (trip a)]))
:_ +>.$
:- [ost %give +.sih]
?+ +<.sih ~
%nice
%+ turn (~(tap by sup.hid))
|= [ost=bone *]
:^ ost %give %rush
:- %tang :_ ~
[%leaf "begin successful"]
%mean
%+ turn (~(tap by sup.hid))
|= [ost=bone *]
:^ ost %give %rush
:- %tang :_ ~
[%leaf "begin failed"]
==
::
++ spam
|* git=*
%+ turn
(~(tap in (~(get ju pus.hid) /out)))
|=(a=bone [a %give git])
--

View File

@ -1,35 +0,0 @@
:: ConCATenate file listings
::
:::: /hook/core/cat/app
::
/+ sh-utils
// /%%%/ls/subdir
!:
::::
::
|_ [hid=hide ~]
++ peer ,_`.
++ poke--args
%+ args-into-gate .
|= [arg=(list path)]
=- tang/(zing -)
%+ turn arg
|= pax=path
^- tang
=+ ark=;;(arch .^(%cy pax))
?^ q.ark
:- leaf/(spud pax)
%+ turn (lore ;;(@t .^(%cx pax)))
|=(a=cord leaf/(trip a))
?- r.ark :: handle ambiguity
~
[rose/[" " `~]^~[leaf/"~" (smyt pax)]]~
[[@t ~] ~ ~]
$(pax (welp pax /[p.n.r.ark]))
*
=- [palm/[": " ``~]^-]~
:~ rose/[" " `~]^~[leaf/"*" (smyt pax)]
`tank`(subdir pax r.ark)
==
==
--

View File

@ -1,496 +0,0 @@
/- mess,user,users,zing,zong,zung
::
[sed=!>(.) .]
::
!:
=> |%
++ axle
$: %0
air=(map path station)
pom=(unit ship)
sen=(set mess)
$= fal
$: eth=?
qit=?
let=?
sat=path
pad=ship
==
==
++ blitz
$% [%prompt p=cord q=prom r=cord]
[%tang p=(list tank)]
[%txt p=cord]
[%zong p=zong]
[%user p=user]
==
++ chat :: user action
$% [%all p=mess] :: say
[%back p=?(%da %dr %ud) q=@] :: backlog
[%def p=mess] :: use current prompt
[%how ~] :: help
[%priv p=@p q=mess] :: private
[%who ~] :: who
== ::
++ chat-arg
$? %monitor %quiet %noob %leet %time
[%s p=path]
[%tower p=ship]
==
++ idad ,[p=@p q=@t]
++ iron
$% [%prompt p=cord q=prom r=cord]
[%txt p=cord]
[%zongs p=(list zong)]
[%users p=users]
[%hymn p=manx] :: HTML format
[%json p=json] :: JSON format
==
++ gift
$% [%mean ares]
[%nice ~]
[%rush blitz]
[%rust iron]
==
++ hapt ,[p=ship q=path]
++ move ,[p=bone q=(mold note gift)]
++ note
$? $: %g
$% [%mess p=hapt q=ship r=cage]
[%nuke p=hapt q=ship]
[%show p=hapt q=ship r=path]
[%took p=hapt q=ship]
== == ==
++ sign
$? $: %g
$% [%mean p=ares]
[%nice ~]
$: %rush
$= p
$% [%txt p=cord]
[%user p=user]
[%zong p=zong]
== ==
$: %rust
$= p
$% [%txt p=cord]
[%users p=users]
[%zongs p=(list zong)]
== ==
== == ==
++ station
$: msg=(list zong)
sub=(unit bone)
ami=(map ,@p ,@t)
==
--
!:
::::
::
=| lat=@da
|%
++ chat
=<
%+ cook |=(a=^chat a)
;~ pose
(cold [%how ~] wut)
(cold [%who ~] tis)
(stag %back dat)
(stag %priv ;~(plug ;~(pfix sig fed:ag) ;~(pfix ace mess)))
(stag %all ;~(pfix pam mess))
(stag %def mess)
==
|%
++ dat
%+ sear
|= p=coin
?. ?=([%$ ?(%da %dr %ud) @] p) ~
(some +.p)
;~(pfix bas bas (star ace) nuck:so)
::
++ expn
%- sear
:_ text
|= a=@t
^- (unit ,[p=@t q=tank])
=+ hun=(rush a wide:(vang | &1:% &2:% (scot %da lat) |3:%))
?~ hun ~
?~(a ~ [~ a (sell (slap sed u.hun))])
::
++ mess
%+ cook |=(a=^mess a)
;~ pose
(stag %do ;~(pfix pat text))
(stag %exp ;~(pfix hax expn))
(stag %do (full (easy '')))
(stag %say text)
==
::
++ text (boss 256 (star prn))
--
--
!:
::::
::
|_ [hid=hide axle]
++ exec-cmd
|= [ost=bone txt=cord]
^- [(list move) _+>]
?: =(0 txt) [~ +>.$]
=+ rey=(rush txt chat(lat lat.hid))
?~ rey
[(print %leaf "invalid input") +>.$]
|-
?- -.u.rey
%all =+ ^= mof
?~ pom ~
(send /out %rush %prompt '& ' %text '')
=^ mow +>.^$
(poke-zung(pom ~) ost our.hid %mess sat.fal p.u.rey)
[(welp mof mow) +>.^$(sen (~(put in sen) p.u.rey))]
%back
:_ +>.^$
%+ send /out :+ %rush %tang
%- turn :_ |=(a=zong (zong-to-tank | a))
%- flop
?- p.u.rey
%ud (scag q.u.rey msg:(grab sat.fal))
%da (since msg:(grab sat.fal) q.u.rey)
%dr (since msg:(grab sat.fal) (sub lat.hid q.u.rey))
==
%def $(u.rey ?~(pom [%all p.u.rey] [%priv u.pom p.u.rey]))
%priv
:_ +>.^$(pom `p.u.rey)
:- :* ost %pass /priv %g
%mess [p.u.rey %chat ~] our.hid %mess !>(q.u.rey)
==
?: =(pom [~ p.u.rey]) ~
(send /out %rush %prompt (cat 3 (scot %p p.u.rey) ' ') %text '')
%who
:_ +>.^$
%^ print %rose [", " "" ""]
%+ turn (~(tap by ami:(grab sat.fal)))
|= a=idad
:- %leaf
%- trip %^ cat 3 %^ cat 3 (scot %p p.a) ' ' q.a
%how
:_ +>.^$
%+ send /out :+ %rush %tang
%- turn :_ |=(a=@t [%leaf (trip a)])
%- lore
%- (hard ,@t)
.^(/cx/(scot %p our.hid)/main/(scot %da lat.hid)/pub/src/doc/chat/help/txt)
==
::
++ grab
|= sta=path
(fall (~(get by air) sta) *station)
::
++ iden
|= her=ship
^- tape
?: let.fal (scow %p her)
=+ ide=(trip (fall (~(get by ami:(grab sat.fal)) her) ''))
%+ welp (scow %p her)
?~ ide ""
[' ' ide]
::
++ peer
|= [ost=bone you=ship pax=path]
^- [(list move) _+>]
:_ +>.$
?: ?=(~ pax)
[ost %give %rust %hymn page]~
=+ ya=(grab t.pax)
?+ i.pax !!
%out
[ost %give %rust %prompt '& ' %text '']~
%private
~
%amigos
[ost %give %rust %users (~(tap by ami.ya))]~
%mensajes
[ost %give %rust %zongs msg.ya]~
==
++ page
^- manx
;html
;head
;title: Radio
;script(type "text/javascript", src "//use.typekit.net/fkv0sjk.js");
;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/libs".
"/jquery/2.1.1/jquery.min.js");
;script:'try{Typekit.load();}catch(e){}'
;link(rel "stylesheet", type "text/css", href "/main/pub/src/chat/main.css");
==
;body
;div#c;
;script(type "text/javascript", src "/main/lib/urb.js");
;script(type "text/javascript", src "/main/pub/src/chat/main.js");
==
==
::
++ poke-chat-args
|= [ost=bone you=ship arg=(list chat-arg)]
^- [(list move) _+>]
=. fal (process-args arg)
=^ mow +>.$ (poke-zung ost you %init pad.fal sat.fal)
:_ +>.$
%+ welp
:+ [ost %pass /cmd-in %g %show [our.hid +.imp.hid] you /in/[-.imp.hid]]
[ost %pass /private %g %show [our.hid /chat] you /private]
(send /out %rush %prompt '& ' %text '')
mow
::
++ poke-mess
|= [ost=bone you=ship mes=mess]
^- [(list move) _+>]
[[[ost %give %nice ~] (spam & %mess lat.hid you mes)] +>.$]
::
++ poke-zung :: nice should be moved out
|= [ost=bone you=ship zug=zung]
^- [(list move) _+>]
?. =(you our.hid)
[[ost %give %mean ~ %no-sos-mi-amigo ~]~ +>.$]
?- -.zug
%mess
:: ~& [%send-mess zug]
:_ +>.$ :_ ~
:* ost %pass /mesg %g
%mess [pad.fal %radio ~] you %zing !>(zug)
==
::
%init
=+ ya=(grab q.zug)
?: =(sub.ya ~)
=. pad.fal p.zug
=. sub.ya `ost
=. air (~(put by air) q.zug ya)
:_ +>.$
:~
:* ost %pass radi-m/q.zug %g
%show [[p.zug /radio] you mensajes/q.zug]
==
:* ost %pass radi-a/q.zug %g
%show [[p.zug /radio] you amigos/q.zug]
==
==
[[ost %give %nice ~]~ +>.$]
==
::
++ pull
|= ost=bone
^- [(list move) _+>]
?: ?=([* ~ ~] sup.hid)
:_ +>.$(pad.fal *@p, air ~)
%- ^zing %+ turn (~(tap by air))
|= [pax=path sta=station]
?~ sub.sta
~
:~ [u.sub.sta %pass radi-a/pax %g %nuke [[pad.fal /radio] our.hid]]
[u.sub.sta %pass radi-m/pax %g %nuke [[pad.fal /radio] our.hid]]
==
[~ +>.$]
::
++ took
|= [ost=bone pax=path imp=path moz=(list move)]
:_ +>.$
:_(moz [ost %pass pax %g %took [our.hid imp] our.hid])
::
++ pour
|= [ost=bone pax=path sih=*]
^- [(list move) _+>]
:: ~& sih=sih
=+ sih=((hard sign) sih)
?~ pax ~& %chat-pour-strange-path !!
:: ~& [%pour-mess pax]
?+ i.pax ~& %chat-pour-strange-path !!
%cmd-in
?- +<.sih
%nice [~ +>.$]
%mean [(send /out +.sih) +>.$]
?(%rush %rust)
?> ?=(%txt -.p.sih)
=^ moz +>.$ (exec-cmd ost p.p.sih)
(took ost pax +.imp.hid moz)
==
::
?(%mesg %priv)
?> ?=(?(%mean %nice) +<.sih)
[[ost %give +.sih]~ +>.$]
::
%private
?: ?=(?(%nice %mean) +<.sih)
[~ +>.$]
?> ?=(%rush +<.sih)
?> ?=(%zong -.p.sih)
(took ost pax /chat (print (zong-to-tank & p.p.sih)))
::
?(%radi-a %radi-m)
?: ?=(%nice +<.sih)
:_ +>.$
?: ?=(%radi-a i.pax) ~
[ost %give +.sih]~
?: ?=(%mean +<.sih)
:_ +>.$ :_ ~
=- ~& [%trying-again -] -
:* ost %pass pax %g %show
[pad.fal /radio] our.hid
?-(i.pax %radi-a %amigos, %radi-m %mensajes)
sat.fal
==
=+ ya=(grab t.pax)
=. ya
?- i.pax
%radi-a
%_ ya
ami
^- (set idad)
?- +<.sih
%rust ?>(?=(%users -.p.sih) (sa p.p.sih))
%rush
?> ?=(%user -.p.sih)
?- -.p.p.sih
%in (~(put by ami.ya) p.p.p.sih)
%out (~(del by ami.ya) p.p.p.p.sih)
==
==
==
%radi-m
%_ ya
msg
^- (list zong)
?- +<.sih
%rush ?>(?=(%zong -.p.sih) [p.p.sih msg.ya])
%rust ?>(?=(%zongs -.p.sih) p.p.sih)
==
==
==
=+ ^= pout ?:(=(i.pax %radi-a) %amigos %mensajes)
=. air (~(put by air) t.pax ya)
=+ mow=(send [pout t.pax] +.sih)
=< (took ost pax /radio mow)
:: =< [mow +>.$]
:: XX yes, I just used an inline comment
:: XX and multiple XX's. why? because
:: XX tmi is incredibly lame.
^+ .
?: =(%zong -.p.sih)
=+ zog=((hard zong) p.p.sih)
:: ?: &(=(our.hid q.zog) (~(has in sen) r.zog))
:: + :: suppress own messages
:: ?: &(=(our.hid q.zog) =(`r.zog ~(top to sen)))
:: %_(+ sen ^+(sen ~(nap to sen)))
%_ +
mow
(welp mow (print (zong-to-tank | zog)))
==
?: =(%zongs -.p.sih)
=+ zos=(scag 200 ((hard (list zong)) p.p.sih))
|- ^+ +>.$
?: =(~ zos) +>.$ :: XX tm freakin i
=+ zoy=((hard zong) -.zos)
=. +>.$ $(zos +.zos)
?: &(=(our.hid &3.zoy) (~(has in sen) &4.zoy))
+>.$
:: ?: &(=(our.hid &3.zoy) =(`&4.zoy ~(top to sen)))
:: %_(+>.$ sen `(qeu mess)`~(nap to sen))
%_ +>.$
mow
(welp mow (print (zong-to-tank | zoy)))
==
?: =(%user -.p.sih)
=+ use=((hard user) p.p.sih)
%_ +
mow
?: let.fal ~
%+ print %leaf
%+ weld
?: eth.fal "" (timestamp lat.hid)
%+ weld "{(iden p.p.use)} "
?- -.use
%in "comes on the air"
%out "signs off"
==
==
. :: XX users?
==
::
++ process-args
|= arg=(list chat-arg)
^- [? ? ? path ship]
%+ roll arg
=< .(|4.b (sein our.hid))
|= [a=chat-arg b=[? ? ? path ship]]
?- a
%time b(&1 |)
%monitor b(&2 |)
%quiet b(&2 &)
%noob b(&3 |)
%leet b(&3 &)
[%s *] b(&4 p.a)
[%tower *] b(|4 p.a)
==
::
++ print |=(a=tank (send /out %rush %tang [a]~))
++ send
|= [pax=path msg=gift]
^- (list move)
:: ~& [%send pus.hid]
%+ turn (~(tap in (~(get ju pus.hid) pax)))
|=(ost=bone [ost %give msg])
::
++ since
|= [ya=msg=(list zong) tim=@da]
|- ^- (list zong)
?: |(?=(~ msg.ya) (lth p.i.msg.ya tim)) ~
[i.msg.ya $(msg.ya t.msg.ya)]
::
++ spam
|= [pri=? zog=zong]
^- (list move)
%+ welp
(send /private %rush %zong zog)
%+ welp
(print (zong-to-tank pri zog))
%+ murn (~(tap by sup.hid))
|= [ost=bone her=ship pax=path]
?~ pax ~
?. ?=(%mensajes i.pax) ~
(some [ost %give %rush %zong zog])
::
++ timestamp
|= t=@da
=+ da=(yell t)
"{?:((gth 10 h.da) "0" "")}{(scow %ud h.da)}:".
"{?:((gth 10 m.da) "0" "")}{(scow %ud m.da)} "
::
++ zong-to-tank
|= [pri=? zog=zong]
^- tank
=+ pre=?.(pri "" "(private) ")
?- -.r.zog
%do
=+ mes=?:(=(0 p.r.zog) "remains quietly present" (trip p.r.zog))
:- %leaf
%+ weld
?: eth.fal "" (timestamp p.zog)
"{pre}{(iden q.zog)} {mes}"
::
%exp
:~ %rose
[" " "" ""]
:- %leaf
%+ weld
?: eth.fal "" (timestamp p.zog)
"{pre}{(iden q.zog)} {(trip p.r.zog)}"
q.r.zog
==
::
%say
:- %leaf
%+ weld
?: eth.fal "" (timestamp p.zog)
"{pre}{(iden q.zog)}: {(trip p.r.zog)}"
==
--

View File

@ -1,9 +0,0 @@
:: Show passcode
/+ sh-utils
|_ [hide ~]
++ peer ,_`.
++ poke--args
%+ args-into-gate .
=+ pax=/(crip <our>)/code/(crip <lat>)/(crip <our>)
,_tang/~[leaf/"{<(,@p .^(%a pax))>}"]
--

View File

@ -1,18 +0,0 @@
!:
::::
::
|_ [hid=hide ~]
++ peer ,_`.
++ poke-cp-args
|= [ost=bone you=ship input=path output=path ~]
:_ +>.$
:* [ost %pass /cp %c %info our.hid (foal output .^(%cx input))]
[ost %pass / %g %cide %$]
[ost %give %nice ~]
%+ turn (~(tap by sup.hid))
|= [ost=bone *]
:^ ost %give %rush
:- %tang :_ ~
leaf/"copied"
==
--

View File

@ -1,20 +0,0 @@
:: Command-line URL fetch, :curl "http://example.com"
::
::::
::
/+ sh-utils
!:
|_ [hide *]
++ peer ,_`.
++ poke--args
%+ gate-bang
|=([a=tape ~] [%e %them ~ ~|([%bad-url a] (scan a auri:epur)) %get ~ ~])
,_`.
::
++ pour
%+ args-into-gate .
|= [%e %thou @ mess a=(unit octs)]
:- %tang
?~ a ~
(turn (lore q.u.a) |=(b=cord leaf/(trip b)))
--

View File

@ -1,740 +0,0 @@
:: :: ::
:::: /hook/core/dojo/app :: ::::
:: :: ::
/? 314 :: arvo kelvin
/- *sole :: console structures
/+ sole :: console library
:: :: ::
:::: :: ::::
!: :: ::
=> |% :: external structures
++ house :: all state
$: hoc=(map bone session) :: conversations
== ::
++ session :: per conversation
$: say=sole-share :: command-line state
syd=desk :: active desk
luc=(unit case) :: special case
poy=(unit dojo-project) :: working
var=(map term cage) :: variable state
old=(set term) :: used TLVs
== ::
++ dojo-command ::
$% [%flat p=path q=dojo-source] :: noun to unix atom
[%pill p=path q=dojo-source] :: noun to unix pill
:: [%tree p=path q=dojo-source] :: noun to unix tree
[%poke p=goal q=dojo-source] :: make and poke
[%show p=dojo-source] :: print
[%verb p=term q=dojo-source] :: store variable
== ::
++ dojo-source :: construction node
$: p=@ud :: assembly index
q=dojo-build :: general build
== ::
++ dojo-build :: one ford step
$% [%ex p=twig] :: hoon expression
[%di p=dojo-model] :: dialog
[%dv p=path] :: gate from source
[%fi p=dojo-filter q=dojo-source] :: filter
[%ge p=dojo-model] :: generator
[%sc p=dojo-model] :: script
[%tu p=(list dojo-source)] :: tuple
[%va p=term] :: dojo variable
== ::
++ dojo-filter :: pipeline filter
$% [%a p=twig] :: function gate
[%b p=mark] :: simple transmute
[%c p=dojo-model] :: formal filter
== ::
++ dojo-model :: data construction
$: p=dojo-server :: core source
q=dojo-config :: configuration
== ::
++ dojo-server :: numbered device
$: p=@ud :: assembly index
q=path :: gate path
== ::
++ dojo-config :: configuration
$: p=(list dojo-source) :: by order
q=(map term (unit dojo-source)) :: by keyword
== ::
++ dojo-project :: construction state
$: mad=dojo-command :: operation
num=@ud :: number of tasks
cud=(unit dojo-source) :: now solving
pux=(unit path) :: ford working
pro=(unit vase) :: prompting loop
per=(unit sole-edit) :: pending reverse
job=(map ,@ud dojo-build) :: problems
rez=(map ,@ud cage) :: results
== ::
++ bead ,[p=(set beam) q=cage] :: computed result
++ goal ,[p=ship q=term] :: flat application
++ gift :: out result <-$
$% [%mean p=ares] :: error
[%nice ~] :: acknowledge
[%rush %sole-effect sole-effect] ::
== ::
++ hapt ,[p=ship q=path] ::
++ move ,[p=bone q=(mold note gift)] ::
++ hood :: assembly plan
$: zus=@ud :: zuse kelvin
sur=(list hoot) :: structures
lib=(list hoof) :: libraries
fan=(list horn) :: resources
src=(list hoop) :: program
== ::
++ hoof (pair term (unit (pair case ship))) :: resource reference
++ hoot (pair bean hoof) :: structure gate/core
++ hoop :: source in hood
$% [%& p=twig] :: direct twig
[%| p=beam] :: resource location
== ::
++ horn :: resource tree
$% [%ape p=twig] :: /~ twig by hand
[%arg p=twig] :: /$ argument
[%day p=horn] :: /| list by @dr
[%dub p=term q=horn] :: /= apply face
[%fan p=(list horn)] :: /. list
[%for p=path q=horn] :: /, descend
[%hel p=@ud q=horn] :: /% propagate heel
[%hub p=horn] :: /@ list by @ud
[%man p=(map span horn)] :: /* hetero map
[%nap p=horn] :: /_ homo map
[%now p=horn] :: /& list by @da
[%saw p=twig q=horn] :: /; operate on
[%see p=beam q=horn] :: /: relative to
[%sic p=tile q=horn] :: /^ cast
[%toy p=mark] :: /mark/ static
== ::
++ silk :: construction layer
$& [p=silk q=silk] :: cons
$% [%bake p=mark q=beam r=path] :: local synthesis
[%boil p=mark q=beam r=path] :: general synthesis
[%call p=silk q=silk] :: slam
[%cast p=mark q=silk] :: translate
[%done p=(set beam) q=cage] :: literal
[%dude p=tank q=silk] :: error wrap
[%dune p=(set beam) q=(unit cage)] :: unit literal
[%mute p=silk q=(list (pair wing silk))] :: mutant
[%plan p=beam q=spur r=hood] :: structured assembly
[%reef ~] :: kernel reef
[%ride p=twig q=silk] :: silk thru twig
[%vale p=mark q=ship r=*] :: validate [our his]
== ::
++ note-ford :: note to ford
$% [%exec p=@p q=beak r=(unit silk)] :: make / kill
== ::
++ note-gall :: note to %gall
$% [%mess p=[p=ship q=path] q=ship r=cage] ::
== ::
++ sign-gall :: sign from %gall
$% [%mean p=ares] ::
[%nice ~] ::
== ::
++ sign-ford :: sign from ford
$% [%made p=@uvH q=(each gage tang)] :: computed result
== ::
++ note :: out request $->
$% [%f note-ford] ::
[%g note-gall] ::
== ::
++ sign :: in result $<-
$% [%f sign-ford] ::
[%g sign-gall] ::
== ::
-- ::
:: ::
:::: ::
:: ::
|_ $: hid=hide :: system state
house :: program state
== ::
++ he :: per session
|_ [[ost=bone moz=(list move)] session] ::
++ dp :: dojo parser
|%
++ dp-command :: ++dojo-command
%+ knee *dojo-command |. ~+
;~ pose
%+ stag %poke
;~ pfix col
%+ cook
|= [a=goal b=(each dojo-source (trel term path dojo-config))]
^- (pair goal dojo-source)
:- a
?- -.b
%& p.b
%| ?+ p.p.b !!
%di [0 %di [0 [%dog q.a q.p.b]] r.p.b]
%ge [0 %ge [0 [%cat q.a q.p.b]] r.p.b]
%sc [0 %sc [0 [%pig q.a q.p.b]] r.p.b]
==
==
;~ plug
dp-goal
;~ pose
(stag %& ;~(pfix ace dp-source))
%+ stag %|
;~ plug
;~ pose
(cold %di wut)
(cold %ge lus)
(cold %sc pam)
==
(most fas sym)
dp-config
==
==
==
==
::
%+ stag %verb
;~ pfix tis
;~(plug sym ;~(pfix ace dp-source))
==
::
%+ stag %flat
;~ pfix pat
;~(plug (most fas sym) ;~(pfix ace dp-source))
==
::
%+ stag %pill
;~ pfix dot
;~(plug (most fas sym) ;~(pfix ace dp-source))
==
::
(stag %show dp-source)
==
++ dp-source (stag 0 dp-build) :: ++dojo-source
++ dp-build :: ++dojo-build
%+ knee *dojo-build |. ~+
;~ pose
;~(pfix lus (stag %ge dp-model-cat))
;~(pfix wut (stag %di dp-model-dog))
;~(pfix pam (stag %sc dp-model-pig))
;~(pfix buc (stag %va sym))
(stag %ex dp-twig)
(ifix [sel ser] (stag %tu (most ace dp-source)))
==
::
++ dp-goal :: ++goal
%+ cook |=(a=goal a)
;~ pose
;~ plug
;~(pfix sig fed:ag)
;~(pfix fas sym)
==
(cook |=(a=term `goal`[our.hid a]) sym)
==
++ dp-model-cat ;~(plug dp-server-cat dp-config) :: ++dojo-model
++ dp-model-dog ;~(plug dp-server-dog dp-config) :: ++dojo-model
++ dp-model-pig ;~(plug dp-server-pig dp-config) :: ++dojo-model
++ dp-server-cat (stag 0 (stag %cat dp-device)) :: ++dojo-server
++ dp-server-dog (stag 0 (stag %dog dp-device)) :: ++dojo-server
++ dp-server-pig (stag 0 (stag %pig dp-device)) :: ++dojo-server
++ dp-twig wide:(vang | ~) :: ++twig
++ dp-device (most fas sym) :: ++dojo-device
++ dp-value :: ++dojo-source
%+ cook |=(a=dojo-source a)
%+ stag 0
;~ pose
(ifix [kel ker] (stag %tu (most ace dp-source)))
(stag %va ;~(pfix buc sym))
(stag %ex dp-twig)
==
::
++ dp-config :: ++dojo-config
%+ cook |=(a=dojo-config a)
;~ plug
(star ;~(pfix ace dp-value))
%+ cook
~(gas by *(map term (unit dojo-source)))
%+ more
;~(plug com ace)
;~ plug
;~(pfix tis sym)
;~ pose
;~(pfix ace (stag ~ dp-value))
(easy ~)
==
==
==
--
::
++ dy :: project work
|_ dojo-project ::
++ dy-abet +>(poy `+<) :: resolve
++ dy-amok +>(poy ~) :: terminate
++ dy-ford :: send work to ford
|= [pax=path kas=silk]
^+ +>+>
?> ?=(~ pux)
=+ bek=[our.hid %home %da lat.hid]
(he-pass(poy `+>+<.$(pux `pax)) pax %f %exec our.hid bek `kas)
::
++ dy-stop :: stop work
^+ +>
?~ pux +>
=+ bek=[our.hid %home %da lat.hid]
(he-pass(poy ~) u.pux %f %exec our.hid bek ~)
::
++ dy-slam :: call by ford
|= [pax=path gat=vase sam=vase]
^+ +>+>
(dy-ford pax %call [%done ~ %noun gat] [%done ~ %noun sam])
::
++ dy-rush :: send effects, abet
|= fec=sole-effect
^+ +>+>
(he-rush(poy `+>+<) fec)
::
++ dy-rash :: send effects, amok
|= fec=sole-effect
^+ +>+>
(he-rush(poy ~) fec)
::
++ dy-init-command :: ++dojo-command
|= mad=dojo-command
^+ [mad +>]
?- -.mad
%flat =^(src +>.$ (dy-init-source q.mad) [[%flat p.mad src] +>.$])
%pill =^(src +>.$ (dy-init-source q.mad) [[%pill p.mad src] +>.$])
%poke =^(src +>.$ (dy-init-source q.mad) [[%poke p.mad src] +>.$])
%show =^(src +>.$ (dy-init-source p.mad) [[%show src] +>.$])
%verb =^(src +>.$ (dy-init-source q.mad) [[%verb p.mad src] +>.$])
==
::
++ dy-init-source-unit :: (unit dojo-source)
|= urc=(unit dojo-source)
^+ [urc +>]
?~ urc [~ +>]
=^ src +> (dy-init-source u.urc)
[`src +>.$]
::
++ dy-init-source :: ++dojo-source
|= src=dojo-source
^+ [src +>]
=^ bul +> (dy-init-build q.src)
=: p.src num
q.src bul
==
[src +>.$(num +(num), job (~(put by job) num q.src))]
::
++ dy-init-build :: ++dojo-build
|= bul=dojo-build
^+ [bul +>]
?- -.bul
%ex [bul +>.$]
%di =^(mod +>.$ (dy-init-model p.bul) [[%di mod] +>.$])
%dv [bul +>.$]
%fi !!
%ge =^(mod +>.$ (dy-init-model p.bul) [[%ge mod] +>.$])
%sc !!
%tu =^ dof +>.$
|- ^+ [p.bul +>.^$]
?~ p.bul [~ +>.^$]
=^ dis +>.^$ (dy-init-source i.p.bul)
=^ mor +>.^$ $(p.bul t.p.bul)
[[dis mor] +>.^$]
[[%tu dof] +>.$]
%va [bul +>.$]
==
::
++ dy-init-model :: ++dojo-model
|= mol=dojo-model
^+ [mol +>]
=^ one +>.$ (dy-init-server p.mol)
=^ two +>.$ (dy-init-config q.mol)
[[one two] +>.$]
::
++ dy-init-server :: ++dojo-server
|= srv=dojo-server
=. p.srv num
[srv +>.$(num +(num), job (~(put by job) num [%dv q.srv]))]
::
++ dy-init-config :: prepare config
|= cig=dojo-config
^+ [cig +>]
=^ ord +>.$ (dy-init-ordered p.cig)
=^ key +>.$ (dy-init-named q.cig)
[[ord key] +>.$]
::
++ dy-init-ordered :: (list dojo-source)
|= ord=(list dojo-source)
^+ [ord +>]
?~ ord [~ +>.$]
=^ fir +>.$ (dy-init-source i.ord)
=^ mor +>.$ $(ord t.ord)
[[fir mor] +>.$]
::
++ dy-init-named :: (map @tas dojo-src)
|= key=(map term (unit dojo-source))
^+ [key +>.$]
?~ key [~ +>.$]
=^ top +>.$ (dy-init-source-unit q.n.key)
=^ lef +>.$ $(key l.key)
=^ rit +>.$ $(key r.key)
[[[p.n.key top] lef rit] +>.$]
::
++ dy-init :: full initialize
^+ .
=^(dam . (dy-init-command mad) +(mad dam))
::
++ dy-hand :: complete step
|= cag=cage
^+ +>+>
?> ?=(^ cud)
(dy-step(cud ~, rez (~(put by rez) p.u.cud cag)) +(p.u.cud))
::
++ dy-meal :: vase to cage
|= vax=vase
?. &(?=(@ -.q.vax) ((sane %tas) -.q.vax))
~& %dy-meal-cage
(dy-rash %bel ~)
(dy-hand -.q.vax (slot 3 vax))
::
++ dy-made-edit :: sole edit
|= cag=cage
^+ +>+>
?> ?=(^ per)
?: ?| ?=(^ q.q.cag)
=((lent buf.say) q.q.cag)
!&(?=(%del -.u.per) =(+(p.u.per) (lent buf.say)))
==
dy-abet(per ~)
=^ lic say (~(transmit cs say) u.per)
(dy-rush(per ~) %mor [%det lic] [%err q.q.cag] ~)
::
++ dy-done :: dialog submit
|= txt=tape
?> ?=(^ pro)
(dy-slam /dial u.pro !>(txt))
::
++ dy-over :: finish construction
^+ +>
?- -.mad
%poke
%- he-pass(poy ~)
:* /poke
%g
%mess
[p.p.mad [q.p.mad ~]]
our.hid
(~(got by rez) p.q.mad)
==
::
%flat
=+ out=q.q:(~(got by rez) p.q.mad)
?^ out
(dy-rash %tan [%leaf "not an atom"]~)
(dy-rash %sav p.mad out)
::
%pill
(dy-rash %sag p.mad q.q:(~(got by rez) p.q.mad))
::
%verb
dy-amok(var (~(put by var) p.mad (~(got by rez) p.q.mad)))
::
%show
(dy-rash %tan (sell q:(~(got by rez) p.p.mad)) ~)
==
::
++ dy-edit :: handle edit
|= cal=sole-change
^+ +>+>
=^ dat say (~(transceive cs say) cal)
?: |(?=(^ per) ?=(^ pux) ?=(~ pro))
~& %dy-edit-busy
=^ lic say (~(transmit cs say) dat)
(dy-rush %mor [%det lic] [%bel ~] ~)
(dy-slam(per `dat) /edit u.pro !>((tufa buf.say)))
::
++ dy-type :: sole action
|= act=sole-action
?- -.act
%det (dy-edit +.act)
%ret (dy-done (tufa buf.say))
==
::
++ dy-cage |=(num=@ud (~(got by rez) num)) :: known cage
++ dy-vase |=(num=@ud q:(dy-cage num)) :: known vase
++ dy-silk-vase |=(vax=vase [%done ~ %noun vax]) :: vase to silk
++ dy-silk-config :: configure
|= [cag=cage cig=dojo-config]
^- silk
:+ %ride [%cnzy %$]
:+ %mute [%done ~ cag]
^- (list (pair wing silk))
:* :- [[~ 12] ~]
(dy-silk-vase !>([now=lat.hid eny=eny.hid bec=he-beak]))
::
:- [[~ 26] ~]
%- dy-silk-vase
|- ^- vase
?~ p.cig !>(~)
(slop (dy-vase p.i.p.cig) $(p.cig t.p.cig))
::
%+ turn (~(tap by q.cig))
|= [a=term b=(unit dojo-source)]
^- (pair wing silk)
:- [a [~ 27] ~]
%- dy-silk-vase
?~(b !>([~ ~]) (dy-vase p.u.b))
==
::
++ dy-silk-init-modo :: init and config
|= [cag=cage cig=dojo-config]
^- silk
(dy-silk-config cag cig)
::
++ dy-silk-device :: device to silk
|= pax=path
^- silk
[%boil %gate [he-beak (flop pax)] ~]
::
++ dy-twig-head :: dynamic state
^- vase
:(slop !>(`our=@p`our.hid) !>(`tym=@da`lat.hid) !>(`eny=@uvI`eny.hid))
::
++ dy-made-dial :: dialog product
|= cag=cage
^+ +>+>
?. ?=(^ q.q.cag)
(dy-rush %err q.q.cag)
=+ tan=((list tank) +2.q.q.cag)
=. +>+>.$ (he-rush %tan tan)
=+ vax=(spec (slot 3 q.cag))
?+ -.q.vax !!
%&
?~ +.q.vax
~& %dy-made-dial-abort
(dy-rash %bel ~)
(dy-meal (slot 7 vax))
::
%|
=< he-pone
%- dy-rush(pro `(slap (slot 7 vax) [%cnzy %q]))
=+ pom=(sole-prompt +<.q.vax)
[%pro pom(cad [':' ' ' cad.pom])]
==
::
++ dy-made-gent :: generator product
|= cag=cage
(dy-meal q.cag)
::
++ dy-make :: build step
^+ +>
?> ?=(^ cud)
%- dy-ford
^- (pair path silk)
?+ -.q.u.cud !!
%di [/dial (dy-silk-init-modo (dy-cage p.p.p.q.u.cud) q.p.q.u.cud)]
%ge [/gent (dy-silk-init-modo (dy-cage p.p.p.q.u.cud) q.p.q.u.cud)]
%dv [/hand (dy-silk-device p.q.u.cud)]
%ex [/hand [%ride p.q.u.cud [[%done ~ %$ dy-twig-head] [%reef ~]]]]
%tu :- /hand
:+ %done ~
:- %noun
|- ^- vase
?~ p.q.u.cud !!
=+ hed=(dy-vase p.i.p.q.u.cud)
?~ t.p.q.u.cud hed
(slop hed $(p.q.u.cud t.p.q.u.cud))
==
::
++ dy-step :: advance project
|= nex=@ud
^+ +>+>
?> ?=(~ cud)
?: =(nex num)
dy-over
dy-make(cud `[nex (~(got by job) nex)])
--
::
++ he-dope :: sole user of ++dp
|= txt=tape ::
^- (each (unit dojo-command) hair) :: prefix/result
=+ vex=(dp-command:dp [1 1] txt) ::
?. =(+((lent txt)) q.p.vex) :: fully parsed
[%| p.p.vex (dec q.p.vex)] :: syntax error
[%& ?~(q.vex ~ `p.u.q.vex)] :: prefix/complete
::
++ he-duke :: ++he-dope variant
|= txt=tape
^- (each dojo-command ,@ud)
=+ foy=(he-dope txt)
?- -.foy
%| [%| q.p.foy]
%& ?~(p.foy [%| (lent txt)] [%& u.p.foy])
==
::
++ he-abet :: resolve
[(flop moz) %_(+> hoc (~(put by hoc) ost +<+))]
::
++ he-beak :: logical beam
^- beak
[our.hid syd ?^(luc u.luc [%da lat.hid])]
::
++ he-give :: emit gift
|= git=gift
^+ +>
%_(+> moz [[ost %give git] moz])
::
++ he-pass
|= [pax=path noy=note]
%_(+> moz [[ost %pass pax noy] moz])
::
++ he-rush :: emit update
|= fec=sole-effect
^+ +>
(he-give %rush %sole-effect fec)
::
++ he-stop :: abort work
^+ .
?~(poy . ~(dy-stop dy u.poy))
::
++ he-peer :: subscribe to
he-prom
::
++ he-pine :: restore prompt
^+ .
?^ poy .
he-prom:he-pone
::
++ he-pone :: clear prompt
^+ .
=^ cal say (~(transmit cs say) [%set ~])
(he-rush %mor [%det cal] ~)
::
++ he-prom :: send prompt
%- he-rush
:- %pro
[& %$ "> "]
::
++ he-made :: result from ford
|= [pax=path dep=@uvH rey=(each gage tang)]
^+ +>
?> ?=(^ poy)
=< he-pine
?- -.rey
%& ?> ?=(@ p.p.rey)
%. p.rey
=+ dye=~(. dy u.poy(pux ~))
?+ pax !!
[%hand ~] dy-hand:dye
[%dial ~] dy-made-dial:dye
[%gent ~] dy-made-gent:dye
[%edit ~] dy-made-edit:dye
==
%| ~& [%he-made-fail pax]
(he-rush(poy ~) %tan p.rey)
==
::
++ he-like :: accept line
|= buf=(list ,@c)
=(%& -:(he-dope (tufa buf)))
::
++ he-stir :: apply change
|= cal=sole-change
^+ +>
:: ~& [%his-clock ler.cal]
:: ~& [%our-clock ven.say]
=^ dat say (~(transceive cs say) cal)
?. ?& ?=(%del -.dat)
=(+(p.dat) (lent buf.say))
==
+>.$
=+ foy=(he-dope (tufa buf.say))
?: ?=(%& -.foy) +>.$
:: ~& [%bad-change dat ted.cal]
=^ lic say (~(transmit cs say) dat)
:: ~& [%our-leg leg.say]
(he-rush %mor [%det lic] [%err q.p.foy] ~)
::
++ he-plan :: execute command
|= mad=dojo-command
^+ +>
?> ?=(~ poy)
he-pine:(dy-step:~(dy-init dy mad [0 ~ ~ ~ ~ ~ ~]) 0)
::
++ he-done :: parse command
|= txt=tape
^+ +>
?~ txt
%- he-rush
:~ %mor
[%txt "> "]
[%nex ~]
==
=+ doy=(he-duke txt)
?- -.doy
%| (he-rush [%err p.doy])
%&
=+ old=(weld "> " (tufa buf.say))
=^ cal say (~(transmit cs say) [%set ~])
%. p.doy
=< he-plan
%- he-rush
:~ %mor
[%txt old]
[%nex ~]
[%det cal]
==
==
::
++ he-type :: apply input
|= act=sole-action
^+ +>
?^ poy
he-pine:(~(dy-type dy u.poy) act)
?- -.act
%det (he-stir +.act)
%ret (he-done (tufa buf.say))
==
--
::
++ peer
|= [ost=bone her=ship pax=path]
^- [(list move) _+>]
~? !=(her our.hid) [%dojo-peer ost her pax]
?< (~(has by hoc) ost)
?> =(/sole pax)
:: ?> =(her our.hid)
=< he-abet
%~ he-peer he
:- [ost ~]
^- session
:* *sole-share :: say=sole-share
%home :: syd=desk
~ :: luc=(unit case)
~ :: poy=(unit dojo-project)
~ :: var=(map term cage)
~ :: old=(set term)
==
::
++ poke-sole-action
|= [ost=bone her=ship act=sole-action]
^- [(list move) _+>]
:: ~? !=(her our.hid) [%dojo-poke ost her]
he-abet:(~(he-type he [ost [ost %give %nice ~]~] (~(got by hoc) ost)) act)
::
++ pour
|= [ost=bone pax=path sih=sign]
^- [(list move) _+>]
:: ~& [%dojo-pour pax]
?- -.sih
%f
he-abet:(~(he-made he [[ost ~] (~(got by hoc) ost)]) pax +>.sih)
::
%g
[~ +>.$]
==
::
++ pull
|= ost=bone
^- [(list move) _+>]
=^ moz +>
he-abet:~(he-stop he [[ost ~] (~(got by hoc) ost)])
[moz +>.$(hoc (~(del by hoc) ost))]
--

View File

@ -1,21 +0,0 @@
:: gnaB: send gift to arvo
::
:::: /hook/core/gnab/app
::
/+ sh-utils
!:
::::
::
|_ [hide ~]
++ lima |*(a=(pole) ?~(a ~ [i t]=a(+ (..$ +.a))))
++ poke--args
|* [ost=bone @ a=[* (pole)]]
=> .(a ^.(lima a))
:_(+> (turn a |*(b=_i.a [ost %give b])))
::
++ pour
%- add-exit
|= [@ * sih=*]
~& gnab-resp/(,[term term] [&1 &2]:sih)
`+>.$
--

View File

@ -1,66 +0,0 @@
|%
++ sign
$% $: %g
$% [%nice ~]
$: %rush
$% [%txt p=cord]
[%tang p=(list tank)]
== == ==
== ==
--
::
!:
::::
::
|_ [hid=hide arg=cord]
++ poke-grep-args
|= [ost=bone you=ship arg=cord ~]
=. ^arg arg
:_ +>.$
~& [%grep-subscribing-to /in/[-.imp.hid]]
:~ [ost %pass / %g %show [our.hid +.imp.hid] you /in/[-.imp.hid]]
==
++ peer |=(* `+>)
++ pour
|= [ost=bone pax=path sih=*]
=+ sih=;;(sign sih)
::~& grep-por/[pax sih]
?^ pax `+>.$
:_ +>.$
?- &2.sih
%nice
[ost %give %nice ~]~
%rush
%+ weld (spam %rush %prompt 'searching for {<arg>}...' %text ~)
%- spam
?- &3.sih
%txt
?. (match (trip p.sih)) [%rush %tang ~]
+.sih
%tang
=< [%rush %tang .]
%+ murn p.sih
|= a=tank
^- (unit tank)
?- -.a
%leaf
?.((match p.a) ~ `a)
?(%palm %rose)
=. q.a (murn q.a ..$)
?~ q.a ~
(some a)
==
== ==
++ match
|= a=tape
=+ tag=(trip arg)
?: =(tag (scag (lent tag) a))
&
?~ a |
$(a t.a)
++ spam
|* git=*
%+ turn
(~(tap in (~(get ju pus.hid) /out)))
|=(a=bone [a %give git])
--

View File

@ -1,505 +0,0 @@
:: :: ::
:::: /hook/core/helm/app :: ::
:: :: ::
/? 314 :: zuse version
/- *sole, *talk :: structures
/+ sole, talk :: libraries
:: :: ::
:::: :: ::
!: :: ::
=> |% :: principal structures
++ helm-house :: all state
$: %0 :: state version
bur=(unit (pair ship mace)) :: requesting ticket
hoc=(map bone helm-session) :: consoles
rem=(map desk merge-state) :: active merges
== ::
++ helm-session ::
$: say=sole-share ::
mud=(unit (sole-dialog ,@ud)) ::
== ::
++ merge-state :: merge data
$: auto=? :: escalate on failure
gem=germ :: strategy
her=@p :: from ship
sud=@tas :: from desk
cas=case :: at case
== ::
++ funk (pair ,@ ,@) ::
++ begs ,[his=@p tic=@p eny=@t ges=gens] :: begin data
++ helm-wish ::
$| $? %reset :: reset kernel
%verb :: verbose mode
== ::
$% [%reload p=(list term)] :: reload vanes
[%sync p=@tas q=@p r=@tas ~] ::
== ::
++ dill-flog :: sent to %dill
$% [%crud p=%hax-init [%leaf p=tape] ~] :: initialize ship
[%heft ~] :: weigh memory
[%veer p=@ta q=path r=@t] :: install vane
[%vega p=path] :: reboot by path
[%verb ~] :: verbose mode
== ::
:: ::
++ gift :: out result <-$
$% [%mean p=ares] :: error
[%nice ~] :: acknowledge
[%rush %sole-effect sole-effect] :: effect
== ::
++ hapt ,[p=ship q=path] ::
++ milk (trel ship desk silk) ::
++ silk ::
$& [p=silk q=silk] :: cons
$% [%diff p=silk q=silk] :: diff
[%done p=(set beam) q=gage] :: literal
[%file p=beam] :: from clay
[%mash p=mark q=milk r=milk] :: merge
[%tabl p=(list (pair silk silk))] :: list
== ::
++ tage :: %tabl gage
,[[%tabl p=(list (pair marc marc))] q=vase] ::
++ move ,[p=bone q=(mold note gift)] ::
++ note-clay :: filesystem command
$% [%font p=@p q=@tas r=@p s=@tas] ::
[%info p=@p q=@tas r=nori] ::
[%lynx p=@p q=@tas r=(unit ,?)] ::
[%merg p=@p q=@tas r=@p s=@tas t=germ] ::
== ::
++ note-dill :: system command
$% [%flog p=dill-flog] ::
== ::
++ note-ford ::
$% [%exec p=@p q=beak r=(unit silk)] ::
== ::
++ 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 :: out request $->
$% [%c note-clay] ::
[%d note-dill] ::
[%f note-ford] ::
[%g note-gall] ::
== ::
++ sign-clay ::
$% [%mere are=(each (set path) (pair term tang))]::
== ::
++ sign-ford ::
$% [%made p=@uvH q=(each gage tang)] ::
== ::
++ sign-gall ::
$% [%mean p=ares] ::
[%nice ~] ::
== ::
++ sign ::
$% [%c sign-clay] ::
[%f sign-ford] ::
[%g sign-gall] ::
== ::
-- ::
:: ::
:::: ::
:: ::
|_ $: 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-wish-reset
^+ .
=- %_(+ moz (weld (flop zum) moz))
^- zum=(list move)
=+ top=`path`/(scot %p our.hid)/home/(scot %da lat.hid)/arvo
:- [ost %pass /reset %d %flog %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 %flog %veer p pax txt]
::
++ he-wish-reload
|= all=(list term)
=- %_(+ moz (weld (flop zum) moz))
^- zum=(list move)
=+ top=`path`/(scot %p our.hid)/home/(scot %da lat.hid)/arvo
%+ turn all
=+ ark=(arch .^(%cy /(scot %p our.hid)/home/(scot %da lat.hid)/arvo))
=+ van=(~(tap by r.ark))
|= nam=@tas
=. nam
?. =(1 (met 3 nam))
nam
=+ ^- zaz=(list ,[p=span ~])
(skim van |=([a=term ~] =(nam (end 3 1 a))))
?> ?=([[@ ~] ~] zaz)
`term`p.i.zaz
=+ tip=(end 3 1 nam)
=. tip ?:(=('z' tip) %$ tip)
=+ pax=`path`(welp top /[nam])
=+ txt=((hard ,@) .^(%cx (welp pax /hoon)))
[ost %pass /reload %d %flog %veer tip pax txt]
::
++ he-wish-sync
|= [syd=desk her=ship sud=desk ~]
%_ .
moz
:_ moz
[ost %pass /sync %c %font our.hid syd her sud]
==
::
++ he-wish-unix
|= [syd=desk syn=(unit ,?)]
%_ .
moz
:_ moz
[ost %pass /unix %c %lynx our.hid syd syn]
==
::
++ he-wish-verb
%_ .
moz
:_ moz
[ost %pass /verb %d %flog %verb ~]
==
::
++ he-wish-mass
%_ .
moz
:_ moz
[ost %pass /heft %d %flog %heft ~]
==
::
++ he-wish-init
|= him=ship
%_ +>.$
moz
:_ moz
[ost %pass /init %d %flog %crud %hax-init leaf/(scow %p him) ~]
==
::
++ he-wish-merge
|= syd=desk
=+ ^- merge-state
%+ fall (~(get by rem) syd)
=+ *merge-state
%_(- cas [%da lat.hid])
|%
++ merge-abet
..he-wish-merge(rem (~(put by rem) syd auto gem her sud cas))
::
++ blab
|= new=(list move)
^+ +>
+>.$(moz (welp new moz))
::
++ win (blab [ost %give %nice ~] ~)
++ lose (blab [ost %give %mean ~] ~)
::
++ gage-to-tage
|= res=gage
^- tage
?@ p.res
~|(%bad-marc !!)
res
::
++ tage-to-cages
|= tab=tage
^- (list (pair cage cage))
?~ p.tab
~
:_ $(p.tab t.p.tab, q.tab (slot 3 q.tab))
~| %strange-gage
:- [?^(p.i.p.tab !! p.i.p.tab) (slot 4 q.tab)]
[?^(q.i.p.tab !! q.i.p.tab) (slot 5 q.tab)]
::
++ merge
^+ .
(blab [ost %pass /merge/[syd]/merge %c %merg our.hid syd her sud gem] ~)
::
++ fancy-merge :: recurse
|= [syd=desk her=@p sud=desk gem=?(%auto germ)]
^+ +>
%- blab :_ ~
:* ost %pass /merge/[^syd]/fancy %g %mess [our.hid imp.hid]
our.hid %helm-merge !>([syd her sud gem])
==
::
++ spam
|= mes=(list tank)
%- blab :_ ~
:* ost %pass /merge/[syd]/spam %g %mess
[our.hid /talk] our.hid %talk-command -:!>(*command)
%publish
%- flop
=< acc
%+ roll mes
=< .(eny eny.hid)
|= [tan=tank acc=(list thought) eny=@uvI]
^- [acc=(list thought) eny=@uvI]
=+ (sham eny mes)
:_ -
:_ acc
^- thought
:+ -
[[[%& our.hid (main our.hid)] [*envelope %pending]] ~ ~]
[lat.hid *bouquet [%app (crip ~(ram re tan))]]
==
++ start
|= [her=@p sud=@tas gim=?(%auto germ)]
^+ +>
=. cas [%da lat.hid]
?. ?=(%auto gim)
merge(auto |, gem gim, her her, sud sud)
?: =(0 .^(%cw /(scot %p our.hid)/[syd]/(scot %da lat.hid)))
=> $(gim %init)
.(auto &)
=> $(gim %fine)
.(auto &)
::
++ work
|= sih=sign
^+ +>
~| [%working auto=auto gem=gem syd=syd her=her sud=sud]
?: ?=(%meld gem)
?- -.sih
%g
?: ?=(%nice +<.sih)
=> (spam leaf/"%melding %{(trip sud)} into scratch space" ~)
%- blab :_ ~
:* ost %pass /merge/[syd]/scratch %c %merg our.hid
(cat 3 syd '-scratch') her sud gem
==
=+ :- "failed to set up conflict resolution scratch space"
"I'm out of ideas"
lose:(spam leaf/-< leaf/-> ~)
::
%c
?: ?=(%& -.are.sih)
?. auto
=+ "successfully merged with strategy {<gem>}"
win:(spam leaf/- ?~(p.are.sih ~ [>`(set path)`p.are.sih< ~]))
=+ "mashing conflicts"
=> .(+>.$ (spam leaf/- ~))
=+ tic=(cat 3 syd '-scratch')
%- blab :_ ~
:* ost %pass /merge/[syd]/mash
%f %exec our.hid [our.hid tic %da lat.hid] ~ %tabl
^- (list (pair silk silk))
%+ turn (~(tap in p.are.sih))
|= pax=path
^- (pair silk silk)
:- [%done ~ %path -:!>(*path) pax]
=+ base=[%file [our.hid tic %da lat.hid] (flop pax)]
=+ alis=[%file [her sud cas] (flop pax)]
=+ bobs=[%file [our.hid syd %da lat.hid] (flop pax)]
=+ dali=[%diff base alis]
=+ dbob=[%diff base bobs]
=+ ^- for=mark
=+ (slag (dec (lent pax)) pax)
?~(- %$ i.-)
[%mash for [her sud dali] [our.hid syd dbob]]
==
=+ "failed to merge with strategy {<p.p.are.sih>}"
lose:(spam leaf/- q.p.are.sih)
::
%f
?: ?=(%| -.q.sih)
=+ "failed to mash"
lose:(spam leaf/- p.q.sih)
=+ ^- can=(list (pair path (unit miso)))
%+ turn (tage-to-cages (gage-to-tage p.q.sih))
|= [pax=cage dif=cage]
^- (pair path (unit miso))
?. ?=(%path p.pax)
~| "strange path mark: {<p.pax>}"
!!
[((hard path) q.q.pax) ?:(?=(%null p.dif) ~ `[%dif dif])]
=+ notated=(skid can |=([path a=(unit miso)] ?=(^ a)))
=+ annotated=(turn `(list (pair path ,*))`-.notated head)
=+ unnotated=(turn `(list (pair path ,*))`+.notated head)
=+ (trip (cat 3 syd '-scratch'))
=+ ^- tan=(list tank)
%- zing
^- (list (list tank))
:~ :~ leaf/""
leaf/"done setting up scratch space in %{-}"
leaf/"please resolve the following conflicts and run"
leaf/":helm+merge %{(trip syd)} {<our.hid>} %{-}"
==
?~ annotated
~
:~ leaf/""
leaf/"annotated conflicts in:"
>`(list path)`annotated<
==
?~ unnotated
~
:~ leaf/""
leaf/"some conflicts could not be annotated."
leaf/"for these, the scratch space contains"
leaf/"the most recent common ancestor of the"
leaf/"conflicting content."
leaf/""
leaf/"unannotated conflicts in:"
>`(list path)`unnotated<
==
==
=< win
%- blab:(spam tan)
:_ ~
:* ost %pass /merge/[syd]/dash %c %info
our.hid (cat 3 syd '-scratch')
%& *cart
%+ murn can
|= [p=path q=(unit miso)]
`(unit (pair path miso))`?~(q ~ `[p u.q])
==
==
?> ?=(%c -.sih)
?: ?=(%& -.are.sih)
=+ "successfully merged with strategy {<gem>}"
win:(spam leaf/- ?~(p.are.sih ~ [>`(set path)`p.are.sih< ~]))
?. auto
=+ "failed to merge with strategy {<p.p.are.sih>}"
lose:(spam leaf/- q.p.are.sih)
?+ gem
(spam leaf/"strange auto" >gem< ~)
::
%init
=+ :- "auto merge failed on strategy %init"
"I'm out of ideas"
lose:(spam leaf/-< leaf/-> [>p.p.are.sih< q.p.are.sih])
::
%fine
?. ?=(%bad-fine-merge p.p.are.sih)
=+ "auto merge failed on strategy %fine"
lose:(spam leaf/- >p.p.are.sih< q.p.are.sih)
=> (spam leaf/"%fine merge failed, trying %meet" ~)
merge(gem %meet)
::
%meet
?. ?=(%meet-conflict p.p.are.sih)
=+ "auto merge failed on strategy %meet"
lose:(spam leaf/- >p.p.are.sih< q.p.are.sih)
=> (spam leaf/"%meet merge failed, trying %mate" ~)
merge(gem %mate)
::
%mate
?. ?=(%mate-conflict p.p.are.sih)
=+ "auto merge failed on strategy %mate"
lose:(spam leaf/- >p.p.are.sih< q.p.are.sih)
=> .(gem %meld)
=+ tic=(cat 3 syd '-scratch')
=> =+ :- "%mate merge failed with conflicts,"
"setting up scratch space at %{(trip tic)}"
[tic=tic (spam leaf/-< leaf/-> ~)]
(fancy-merge tic our.hid syd %auto)
==
--
--
::
++ hake :: poke core
|= [ost=bone her=ship]
?> =(her our.hid)
~(. he [ost [ost %give %nice ~]~] (fall (~(get by hoc) ost) *helm-session))
::
++ hoke :: poke sans ack
|= [ost=bone her=ship]
?> =(her our.hid)
~(. he [ost ~] (fall (~(get by hoc) ost) *helm-session))
::
++ poke-helm-reset
|= [ost=bone her=ship ~]
~& %poke-helm-reset
he-abet:he-wish-reset:(hake ost her)
::
++ poke-helm-verb
|= [ost=bone her=ship ~]
~& %poke-helm-verb
he-abet:he-wish-verb:(hake ost her)
::
++ poke-helm-mass
|= [ost=bone her=ship ~]
~& %poke-helm-mass
he-abet:he-wish-mass:(hake ost her)
::
++ poke-helm-init
|= [ost=bone her=ship him=ship]
~& %poke-helm-init
he-abet:(he-wish-init:(hake ost her) him)
::
++ poke-helm-reload
|= [ost=bone her=ship all=(list term)]
~& %poke-helm-reload
he-abet:(he-wish-reload:(hake ost her) all)
::
++ poke-helm-merge
|= [ost=bone her=ship syd=@tas ali=@p sud=@tas gem=?(%auto germ)]
~& %poke-helm-merge
he-abet:merge-abet:(start:(he-wish-merge:(hoke ost her) syd) ali sud gem)
::
++ poke-helm-sync
|= [ost=bone her=ship all=[desk ship desk ~]]
~& %poke-helm-sync
he-abet:(he-wish-sync:(hake ost her) all)
::
++ poke-helm-unix
|= [ost=bone her=ship all=[desk (unit ,?)]]
~& %poke-helm-unix
he-abet:(he-wish-unix:(hake ost her) all)
::
++ poke-helm-begin
|= [ost=bone you=ship begs]
~& %poke-helm-begin
?> ?=(~ bur)
=+ buz=(shax :(mix (jam ges) eny))
=+ loy=(bruw 2.048 buz)
:_ +>.$(bur `[his [0 sec:ex:loy]~])
:~ :* ost %pass /ticketing %a %want [our.hid (sein his)] /q/ta
his tic ges pub:ex:loy
==
[ost %give %nice ~]
==
::
++ poke-will
|= [ost=bone you=ship wil=(unit will)]
?> ?=(^ bur)
:_ +>.$(bur ~)
?~ wil
[ost %give %mean ~ %rejected ~]~
:~ [ost %pass / %a %cash p.u.bur q.u.bur u.wil]
[ost %pass / %c %plug our.hid %home (sein our.hid) %kids]
[ost %give %nice ~]
==
::
++ pour
|= [ost=bone pax=path sih=*]
^- [(list move) _+>]
=+ sih=((soft sign) sih)
?~ sih [~ +>.$]
?+ pax [~ +>.$]
[%merge @tas @ ~]
?: ?=(%spam i.t.t.pax)
[~ +>.$]
he-abet:merge-abet:(work:(he-wish-merge:(hoke ost our.hid) i.t.pax) u.sih)
==
--

View File

@ -1,50 +0,0 @@
:: Hi, send optional message to a ship
::
:::: /hook/core/hi/bin
::
/+ sh-utils
::
::::
::
|%
++ sign ::
$% $: %g ::
$% [%nice ~] ::
[%mean p=ares] ::
== == ==
++ flog :: sent to %dill
$% [%crud p=@tas q=(list tank)] ::
[%text p=tape] ::
== ::
--
!:
::::
::
|_ [hid=hide ~]
++ peer
|= [ost=bone ^]
~& per=ost
`+>
++ poke--args
|= [bone you=ship her=ship mes=?(~ [tex=tape ~])]
%. +<
%+ add-resp
=+ mez=[%txt !>(?~(mes '' (crip tex.mes)))]
[%pass /hi/(scot %p her) %g %mess [her /hi] you mez]
(add-nice ,_`+>.$)
::
++ poke-txt
%- add-nice
|= [ost=bone him=ship cor=@t]
~& from=ost
:_ +>.$
[ost %pass /di %d %flog %text "< {<him>}: {(trip cor)}"]~
::
++ pour
|= [ost=bone pax=path sih=sign]
?> ?=([%hi @t ~] pax)
%. +<
=+ ack=?+(+<.sih "unsuccesful" %nice "succesful")
(add-exit (print +>.$ "hi {(trip i.t.pax)} {ack}"))
::
--

View File

@ -1,19 +0,0 @@
:: Over/write to location, usage :into %/foo/txt 'Contents'
!:
::::
::
|_ [hid=hide ~]
++ peer ,_`.
++ poke-into-args
|= [ost=bone you=ship pax=path dat=cage ~]
:_ +>.$
:* [ost %pass /into %c %info our.hid (foal pax dat)]
[ost %pass / %g %cide %$]
[ost %give %nice ~]
%+ turn (~(tap by sup.hid))
|= [ost=bone *]
:^ ost %give %rush
:- %tang :_ ~
leaf/"written"
==
--

View File

@ -1,13 +0,0 @@
!:
::::
::
|_ [hid=hide ~]
++ poke-label-args
|= [ost=bone you=ship syd=@tas lab=@tas ~]
:_ +>.$
:~ [ost %pass /label %c %info our.hid syd %| lab]
[ost %pass / %g %cide %$]
[ost %give %nice ~]
==
++ peer |=(* `+>)
--

View File

@ -1,17 +0,0 @@
:: LiSt directory subnodes
::
::::
::
/+ sh-utils
// /%%/subdir
!:
::::
::
|_ [hid=hide ~]
++ peer ,_`.
++ poke-ls-args
%+ args-into-gate .
|= [arg=path ~]
=+ lon=((hard arch) .^(%cy arg))
tang/[?~(r.lon leaf/"~" (subdir arg r.lon))]~
--

View File

@ -1,20 +0,0 @@
|%
++ subdir
|= [pax=path des=(map ,@t ,~)]
^- tank
:+ %rose [" " `~]
%+ turn (sort (~(tap by des)) aor)
|= [kid=@ta ~]
=+ paf=`path`/[kid]
=- :+ %rose ["/" ~ ?:(dir "/" ~)]
(turn paf |=(a=span leaf/(trip a)))
|- ^- [dir=? paf=path]
=+ arf=;;(arch .^(%cy (weld pax paf)))
?^ q.arf
[| paf]
?~ r.arf
[& paf] :: !!
?. ?=([^ ~ ~] r.arf)
[& paf]
$(paf (welp paf /[p.n.r.arf]))
--

View File

@ -1,165 +0,0 @@
:: Matrix GUI
::
:::: /hook/hymn/matr/app
::
/? 310
|%
++ cdnj |=(a=tape ;script(src "//cdnjs.cloudflare.com/ajax/libs/{a}");)
--
::
::::
::
^- manx
;html
;head
;title: Matrix
;* %- turn :_ cdnj ^- wall
:~ "jquery/2.1.1/jquery.min.js"
"mousetrap/1.4.6/mousetrap.js"
"react/0.11.0/react.js"
==
;script(src "/~/at/home/lib/urb.js");
;script: urb.appl = 'sole'
;style:'''
#term {
width: 100%;
}
#term * {
margin: 0px;
}
'''
==
;body
;div#err;
;div#term:""
;script(type "text/coffeescript") ;- %- trip
'''
[DOM,recl,rend] = [React.DOM, React.createClass, React.renderComponent]
[div, pre] = [DOM.div, DOM.pre]
Matr = recl render: ->
[pro,cur] = [@props.prompt + " ", @props.cursor + 1]
prompt = "#{pro.slice(0,cur)}\u0332#{pro.slice(cur)}"
lines = [prompt, @props.rows...]
div {}, lines.slice().reverse().map (lin)->
pre {}, lin
$ ->
termRev = 0
pressed = []
deltim = null
met = $('<pre>').text('m').css(display: 'none').appendTo(term).width()
subs = ""
# $(window).resize ->
# window.termWif = ($(term).width() / met).toFixed()
# path = "/new/#{termWif}"
# if path is subs
# return
# if subs
# urb.unsubscribe {path:subs}
# subs = path
# urb.subscribe {path}, (err,dat)->
# if err or dat.data.ok
# return;
# syncRev = dat.data.rev
# unless termRev > syncRev
# termRev = syncRev
# matr.setProps rows: dat.data.stak
# document.title = "Matrix" # XX debug
# $(window).resize()
matr = rend (Matr rows:[], prompt:"", cursor:1), term
flash = ($el, background)->
$el.css {background}
if background
setTimeout (()-> flash $el,''), 50
peer = (ruh) ->
switch false
when !ruh.map then ruh.map peer
when !ruh.pro then matr.setProps prompt: ruh.pro
when !ruh.hop then matr.setProps cursor: ruh.hop
when !ruh.out
matr.setProps rows: [ruh.out, matr.props.rows...]
when !ruh.act then switch ruh.act
when 'clr' then matr.setProps rows:[]
when 'bel' then flash ($ 'body'), 'black'
else throw "Unknown "+(JSON.stringify ruh)
else console.log ruh
urb.bind "", (err,d)->
if d.data then peer d.data
#later = (data)->
# if data
# pressed.push data
# clearTimeout deltim
# setTimeout (->
# if urb.reqq.length > 0
# return deltim = later()
# urb.send data: pressed
# pressed = []
# ), 500
Mousetrap.handleKey = (char, mod, e)->
norm = {
capslock: 'caps'
pageup: 'pgup'
pagedown: 'pgdn'
backspace: 'baxp'
enter: 'entr'
}
key =
if char.length is 1
if e.type is 'keypress'
str: char
else if e.type is 'keydown'
if char isnt 'space'
act: norm[char] ? char
else if e.type is 'keyup' and norm[key] is 'caps'
act: 'uncap'
if key
e.preventDefault()
urb.send mark: 'dill-belt', data: {mod,key}
# amod = (arr)->
# for i in arr
# unless mod.indexOf(i) < 0
# return yes
# no
# if key.str or key.act is 'baxp' or key.act is 'entr'
# termRev++
# [bot, rest...] = old = matr.props.rows
# matr.setProps rows:(
# switch key.act
# when 'baxp'
# if amod ['ctrl', 'meta']
# ['', rest...]
# else if amod ['alt']
# [(bot.replace /\ *[^ ]*$/, ''), rest...]
# else if bot and bot.length
# [bot.slice(0, -1), rest...]
# else if rest[0] and rest[0].length
# res = rest.slice()
# res[0] = res[0].slice(0, -1)
# res
# else rest
# when 'entr'
# ['', old...]
# when undefined
# if mod.length > 1 or (mod.length and !amod ['shift'])
# old
# else unless old and bot isnt null
# [key.str]
# #else if bot.length is termWif
# # [key.str, old...]
# else [bot + key.str, rest...]
# )
# document.title = "Matri" # XX debug
# later {mod, key}
'''
==
;+ (cdnj "coffee-script/1.7.1/coffee-script.min.js")
== ==

View File

@ -1,17 +0,0 @@
:: MoVe file from one location to another
::
:::: /hook/core/mv/app
::
/+ sh-utils
!:
::::
::
|_ [hid=hide ~]
++ peer ,_`.
++ poke--args
%+ gate-bang
|= [input=path output=path ~]
:^ %c %info our.hid
(furl (foal output .^(%cx input)) (fray input))
(args-into-gate . ,_[%txt 'moved'])
--

View File

@ -1 +0,0 @@
|_ ^ ++ poke-nop-args ,_`. --

View File

@ -1,34 +0,0 @@
:: Peek imp path || Poke ship imp path. Subscribe to an app.
!:
::::
::
|_ [hide ~]
++ ptah ,[p=path q=path ~]
++ poke-peek-args
|= [ost=bone @ a=?(ptah [her=ship ptah])]
=- :_(+>.$ ~[[ost %give %nice ~] [ost %pass / %g %show -]])
^- [p=[ship path] q=ship r=path]
?^ |2.a [[her p]:a our q.a]
[[our p.a] our q.a]
::
++ posh
|* [@ * git=[@tas *]]
~& peek-posh/git
`+>
++ pour
|= [ost=bone * sih=*]
~& =+ cod=(,[term term] [&1 &2]:sih)
?+ +.cod peek-resp/cod
%nice %peek-nice
%mean
=+ are=((soft ares) |2.sih)
?~ are %peek-mean
?~ u.are %peek-done
~& > p.u.u.are
|-
?~ q.u.u.are %peek-mean
~> %slog.`rose/[~ "! " ~]^[i.q.u.u.are]~
$(q.u.u.are t.q.u.u.are)
==
:_(+> ?+(&2.sih ~ %mean [ost %pass / %g %cide %$]~))
--

View File

@ -1,30 +0,0 @@
:: Poke path [mark *] || Poke ship path [mark *]. Send message to an app.
!:
::::
::
|_ [hide ~]
++ mess ,[p=path q=[@ *] ~]
++ pock-poke-args
|= [ost=bone @ a=type b=?(mess [her=ship mess])]
=- :_(+>.$ [ost %pass / %g %mess -]~)
^- [p=[ship path] q=ship r=cage]
?^ |2.b [[her p]:b our -.q.b (slot 29 [a b])] :: +.&3
[[our p.b] our -.q.b (slot 13 [a b])] :: +.&2
::
++ pour
|= [ost=bone * sih=*]
~& =+ cod=(,[term term] [&1 &2]:sih)
?+ +.cod poke-resp/cod
%nice %poke-nice
%mean
=+ are=((soft ares) |2.sih)
?~ are %poke-mean
?~ u.are %poke-nil-mean
~& > p.u.u.are
|-
?~ q.u.u.are %poke-mean
~> %slog.`rose/[~ "! " ~]^[i.q.u.u.are]~
$(q.u.u.are t.q.u.u.are)
==
:_(+> [ost %pass / %g %cide %$]~)
--

View File

@ -1,47 +0,0 @@
:: Pope, generate key for carrier
::
:::: /hook/core/pope/app
::
/+ sh-utils
!:
::::
::
|%
++ gilt $%([%tang (list tank)] [%prompt @t prom @t])
++ sign
$% [%t %wake ~]
[%g $%([%nice ~] [%rush %txt p=cord])]
==
--
!:
::::
::
=+ cryp=bruw :: XX change to ec2 ++brew eventually
|_ [hide who=@p fra=@t]
++ peer ,_`.
++ poke--args
|= [@ @ who=ship ~]
?> ?=(%czar (clan who))
=. ^who who
=- %.(+<.$ (add-nice (gate-bang ,_noe (return git))))
:- noe=[%g %show our^+.imp our /in/[-.imp]] :: request input
git=prompt/['passphrase: ' %pass '']
::
++ return |=(a=gilt (add-output +> rush/a ,_`+>))
++ pour
|= [@ * sih=*]
=+ sih=;;(sign sih)
?- -.sih
%g ?. ?=(%rush +<.sih) `+>.$
=. fra p.sih
=- %.(+<.$ (gate-bang ,_noe (return tang/~[leaf/msg])))
:- noe=[%t %wait (add ~s1 lat)] :: set print timeout
msg="generating carrier {(scow %p who)} (#{(scow %ud who)})"
::
%t =- %.(+<.$ (add-exit (return tang/-)))
=+ bur=(shax (add who (shax fra)))
=+ arc=(cryp 2.048 bur)
:~ leaf/"generator: {(scow %uw bur)}"
leaf/"fingerprint: {(scow %uw fig:ex:arc)}"
== ==
--

View File

@ -1,37 +0,0 @@
:: Reboot %zuse and all kernel vanes
::
:::: /hook/core/reboot/app
::
/+ sh-utils
!:
::::
::
|_ [hid=hide ~]
++ peer ,_`.
++ poke--args
%^ add-output .
rush/tang/[leaf/"done"]~
%+ args-into-resp .
|= arg=~
%- turn
:_ |= [tip=@tasD nam=@tas]
=+ pax=[(scot %p our.hid) %arvo (scot %da lat.hid) nam %hoon ~]
[%veer tip pax (,@ +:.^(%cx pax))]
^- (list ,[p=@tas q=@tas])
:~ [%$ %zuse]
[%a %ames]
[%c %clay]
[%d %dill]
[%e %eyre]
[%f %ford]
[%g %gall]
[%t %time]
==
++ pour
%+ gate-bang
=+ pax=/(scot %p our.hid)/=/(scot %da lat.hid)/==count/txt
=+ nuf=(file pax)
=+ num=?~(nuf 0 +((fall (slaw %ud (,@t u.nuf)) 0)))
,_[%c %info our.hid (foal pax num)] :: touch clay to reload apps
,_`.
--

View File

@ -1,30 +0,0 @@
:: Reload kernel vanes, specified by name or letter
::
:::: /hook/core/reload/app
::
/+ sh-utils
!:
::::
::
|_ [hid=hide ~]
++ peer ,_`.
++ poke--args
%^ add-output .
rush/tang/[leaf/"done"]~
%+ args-into-resp .
|= all=(list ,@tas)
%+ turn all
=+ ark=(arch .^(%cy /(scot %p our.hid)/main/(scot %da lat.hid)/arvo))
=+ van=(~(tap by r.ark))
|= nam=@tas
=. nam
?. =(1 (met 3 nam))
nam
=+ ^- zaz=(list ,[p=span ~])
(skim van |=([a=term ~] =(nam (end 3 1 a))))
?> ?=([[@ ~] ~] zaz)
`term`p.i.zaz
=+ tip=(end 3 1 nam)
=+ pax=[(scot %p our.hid) %main (scot %da lat.hid) %arvo nam ~]
[%veer ?:(=('z' tip) %$ tip) pax (,@ .^(%cx (welp pax /hoon)))]
--

View File

@ -1,38 +0,0 @@
:: Reset: recompile arvo, from hoon/hoon up
!:
::::
::
|_ [hid=hide ~]
++ peer ,_`.
++ poke-reset-args
|= [ost=bone you=ship arg=$|(~ [_| ~])]
:_ +>.$
=+ top=`path`/(scot %p our.hid)/arvo/(scot %da lat.hid)
:^ [ost %give %nice ~]
[ost %pass ?~(arg /refresh /) %t %wait lat.hid]
[ost %give %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 %give %veer p pax txt]
++ pour
|= [ost=bone pax=path *]
:_ +>.$
?~ pax ~
:_ ~
=+ paf=/(scot %p our.hid)/=/(scot %da lat.hid)/==count/txt
=+ nuf=(file paf)
=+ num=?~(nuf 0 +((fall (slaw %ud (,@t u.nuf)) 0)))
[ost %pass /touch %c %info our.hid (foal paf num)]
--

View File

@ -1,18 +0,0 @@
!:
::::
::
|_ [hid=hide ~]
++ peer ,_`.
++ poke-rm-args
|= [ost=bone you=ship pax=path ~]
:_ +>.$
:* [ost %pass /rm %c %info our.hid (fray pax)]
[ost %pass / %g %cide %$]
[ost %give %nice ~]
%+ turn (~(tap by sup.hid))
|= [ost=bone *]
:^ ost %give %rush
:- %tang :_ ~
leaf/"removed"
==
--

View File

@ -1,569 +0,0 @@
:: Shell
::
:::: /hook/core/shell/app
::
/? 314
/- term-line, kyev
/= pit /~ !>(+) :: kernel vase
::
:::: structures
!:
|% ::
++ axle ::
$: %1 :: version
tiv=? :: typing?
wit=[p=@u q=(map ,@u coma)] :: waiting commands
pid=@u :: next process id
pax=_`path`/=base=/try :: working directory
act=(unit span) :: active child
pip=(jar span span) :: pipe out->in
pop=(jar span span) :: pipe in->out
pot=(map span ,[cord prom cord]) :: prompts
var=(map term vase) :: variables
== ::
++ gift ::
$% [%rush p=gilt] ::
[%init p=@p] ::
[%logo p=@] ::
[%mean p=ares] ::
[%nice ~] ::
[%meta p=vase] ::
[%sage p=path q=*] ::
[%verb ~] ::
[%veer p=@ta q=path r=@t] ::
[%vega p=path] ::
== ::
++ gilt ::
$% [%term-line p=term-line] ::
[%txt p=cord] ::
[%type p=?] ::
== ::
++ glas ?(%out [%in p=cord] [%active p=cord]) ::
++ hapt ,[p=ship q=path] ::
++ move ,[p=bone q=(mold note gift)] ::
++ note ::
$% $: %c ::
$% [%info p=@p q=toro] ::
== == ::
$: %g ::
$% [%cide p=span] ::
[%show p=hapt q=ship r=path] ::
[%sire p=term q=span] ::
[%mess p=hapt q=ship r=cage] ::
[%meta p=vase] ::
[%nuke p=hapt q=ship] ::
[%took p=hapt q=ship] ::
== == == ::
++ mand ,[p=term q=(list twig)] :: name and arguments
++ coma ::
$% [%run p=(list mand) q=mand] :: pipe into
[%end p=(each ,@u cord)] :: kill pid/name
[%path p=path] :: chdir
[%del p=path] :: rm file
[%ins p=path q=(unit twig)] :: add file
[%mut p=path q=(unit twig)] :: change file
[%hoon p=twig] :: eval expression
[%comt ~] :: comment
[%var p=term q=twig] :: set variable
[%rvar p=term] :: unset variable
[%help p=term] :: info about command
== ::
++ sign ::
$% $: %g ::
$% [%gone p=hapt] ::
[%init p=@p] ::
[%dumb ~] ::
[%mean p=ares] ::
[%nice ~] ::
[%rush p=mark q=*] ::
[%rust p=mark q=*] ::
[%sage p=path q=*] ::
[%verb ~] ::
[%veer p=@ta q=path r=@t] ::
[%vega p=path] ::
== == == ::
--
::
:::: parsers
!:
|%
++ maybe |*(fel=_rule (cook |*(a=(unit) (fall a ~)) (opts fel)))
++ opts :: parse unit
|* fel=_rule
;~ pose
(cook some fel)
(easy ~)
==
::
++ from :: parse door
=+ tol=`?(0 1 2)`%2 :: wide, tallish, tall
|_ [pax=path lat=time]
++ rail :: build from wide/tall
|* [wid=_rule wif=_rule tal=_rule]
?~ tol wid
=- ;~(pose wif wid)
^= wif
?: ?=(1 tol) wif
;~(pose tal wif)
::
++ rais |*([wid=_rule tal=_rule] (rail wid wid tal))
::
++ parse :: top level
^- $+(nail (like coma))
=+ paf=pax
=. pax ?.(&(?=([@ @ @ *] pax) =('0' &3.pax)) pax pax(&3 (scot da/lat)))
%+ ifix [(star ace) gaw]
;~ pose
(stag %run ;~(plug (star ;~(sfix (task(tol %0) bar) ace)) (task col)))
(stag %end ;~(pfix col sem ;~(pose (stag %& dem) (stag %| sym))))
(stag %del ;~(pfix hep (plus ace) loca))
(stag %mut ;~(pfix col (plus ace) ;~(plug loca (opts expg))))
(stag %ins ;~(pfix lus (plus ace) ;~(plug loca (opts expg))))
(stag %help ;~(pfix wut ace ;~(pfix col sym)))
(stag %path (full ;~(sfix loca(pax paf) (star ace))))
(stag %var ;~(plug ;~(pfix tis sym) expg))
(stag %rvar ;~(pfix ;~(plug tis tis) sym))
(stag %hoon expr)
(stag %comt ;~(pfix col col (cold ~ (star prn))))
(stag %comt (easy ~))
==
::
++ expg (rais ;~(pfix ace expr(tol %1)) ;~(pfix gap expr))
++ expr (rais [wide tall]:(vang | pax))
++ loca %+ sear ;~(biff plex:(vang | pax) vabe) :: path in %clay
[;~(pose rood ;~(simu cen scat))]:(vang | pax)
++ vabe |=(a=path ?~((tome a) ~ (some a))) :: check valid beam
++ args :: task arguments
%^ rail
(ifix sel^ser (most ace expr))
(plus ;~(pfix ace expr))
;~(sfix (plus ;~(pfix gap expr)) ;~(plug gap duz))
::
++ task |*(fel=_rule ;~(pfix fel ;~(plug sym (maybe args))))
::
--
--
::
:::: per event
!:
|%
++ ve
|= [hid=hide ost=bone axle]
=* vat +<+>
=| mow=(list move)
|%
++ abet
^- [(list move) axle]
[(flop mow) vat]
::
++ blab
|= mof=(list move)
+>.$(mow (welp (flop mof) mow))
::
++ chew-file
|= [paf=path mor=$|(cord toro)]
%- blab
^- (list move)
?@ mor
(print palm/[" " ~ ~ ~]^~[leaf/(trip mor) (dank:ut paf)])
[ost %pass writ/paf %c %info our.hid mor]~
::
++ cubs :: tasks with open /in
%- sort :_ |=([a=span b=span] (lth (slav %ud a) (slav %ud b)))
^- (list span)
%+ murn (~(tap by cub.hid))
|= [a=span @]
?.(=([~ ~] (~(get by pop) a)) ~ (some a))
::
++ eat
|= [you=ship com=coma]
?- -.com
%comt +>.$
%del (eat-del +.com)
%end (eat-end +.com)
%hoon (eat-hoon +.com)
%ins (eat-ins +.com)
%mut (eat-mut +.com)
%help (eat-help +.com)
%path (eat-path +.com)
%run (eat-run you +.com)
%rvar (eat-rvar +.com)
%var (eat-var +.com)
==
::
++ eat-del
|= paf=path
^+ +>
%+ chew-file paf
?~ (file paf) '! none'
(fray paf)
::
++ eat-end :: XX clean up state
|= poc=(each ,@u cord)
^+ +>
?- -.poc
%&
=+ cil=(scot %ud p.poc)
=+ cin=(trip (~(got by cub.hid) cil))
%- blab
%+ welp
(kill cil)
(print leaf/"- :{cin}({(trip cil)})")
::
%|
=+ ^- moz=(list move)
%- zing
%+ turn (~(tap by cub.hid))
|= [a=span b=term]
?. =(b p.poc) ~
(kill a)
%- blab %+ welp moz
(print leaf/"-{<(lent moz)>} :{(trip p.poc)}")
==
::
++ eat-hoon
|= gen=twig
^+ +>
%+ with gen |= rez=vase
(blab (print (sell rez)))
::
++ eat-ins
|= [paf=path gen=(unit twig)]
^+ +>
?^ (file paf) (chew-file paf '! exists')
%+ with (fall gen [%bczp atom/%t])
|= new=vase
=+ for=((hard mark) -:(flop paf))
(chew-file paf (foal paf for new))
::
++ eat-mut
|= [paf=path gen=(unit twig)]
^+ +>
=+ fel=(file paf)
?^ fel
?~ gen
(blab (stray (crip ": {(spud paf)} {<(,@t u.fel)>}")))
%+ with u.gen |= new=vase
=+ for=((hard mark) -:(flop paf))
(chew-file paf (foal paf for new))
=+ ark=;;(arch .^(%cy paf))
?- r.ark
~ (chew-file paf '! none')
[^ ~ ~] $(paf (welp paf /[p.n.r.ark]))
* (chew-file paf '! many')
==
::
++ eat-help
|= app=term
^+ +>
%- blab %- print
^- tank
=+ rup=/(scot %p our.hid)/main/(scot %da lat.hid)
=+ paf=`path`(welp rup /app/[app]/core/hook)
=+ src=(file paf)
?. ?=([~ @t] src)
leaf/"app {<app>} does not exist"
=+ cot=;~(pfix col col (plus ace) (star prn))
=+ led=(cot 1^1 (trip u.src))
?^ q.led
leaf/":: {(wonk led)}"
palm/[" " ``~]^~[leaf/"no leading comment in" >paf<]
::
++ eat-path
|= paf=path
^+ +>
=. pax paf
(blab (print leaf/"=% {(spud paf)}"))
::
++ eat-run
|= [you=ship mud=(list mand) mad=mand]
^+ +>
:: =. +>.$ (blab (print leaf/"+ :{(trip p.mad)}"))
?. =- (~(has by r:(arch -)) %core)
.^(%cy /(scot %p our.hid)/main/(scot %da lat.hid)/app/[p.mad])
(blab (print leaf/"app {<p.mad>} does not exist"))
=+ liz=`(list mand)`(welp mud mad ~)
%+ with [%clsg (turn liz |=(mand [%clsg q]))]
|= arg=vase
=| inp=(unit span)
|-
?~ liz ..eat-run
=+ cil=(scot %ud pid)
%_ $
liz t.liz
arg (slot 3 arg)
pid +(pid)
pip ?~ inp pip (~(add ja pip) cil u.inp)
pop ?~ inp pop (~(add ja pop) u.inp cil)
inp `cil
mow
=< mow :: XX side effects?
%- blab
=+ yon=[our.hid cil imp.hid]
=+ mez=[(cat 3 p.i.liz '-args') (slot 2 arg)]
^- (list move)
:~ [ost %pass /child/[cil]/fork %g %sire p.i.liz cil]
[ost %pass /child/[cil]/out %g %show yon you /out]
[ost %pass /child/[cil]/main %g %meta !>([%mess yon you mez])]
==
==
::
++ eat-rvar
|= vor=term
^+ +>
=+ mod=(~(has by var) vor)
=. var (~(del by var) vor)
(blab (print leaf/"{?:(mod "var gone" "no var")} {<vor>}"))
::
++ eat-var
|= [vor=term gen=twig]
^+ +>
%+ with gen |= new=vase
=+ old=(~(get by var) vor)
=+ mod=?~(old "new var" ?:(=(new u.old) "same var" "changed"))
=. var (~(put by var) vor new)
(blab (print leaf/"{mod} {<vor>}"))
::
++ with
|= [gen=twig coz=$+(vase _..with)]
%- coz
%- slap :_ gen
%+ slop
%+ slop [[%face %our p] q]:!>(our.hid)
%+ slop [[%face %tym p] q]:!>(lat.hid)
[[%face %eny p] q]:!>(eny.hid)
%+ roll (~(tap by var))
=< .(q pit)
|= [[n=term v=vase] q=vase]
(slop [[%face n p.v] q.v] q)
::
++ kill
|= cil=span
^- (list move)
:~ [ost %pass /child/[cil]/fork %g %cide cil]
::[ost %pass /child/[cil]/out %g %nuke [our.hid cil imp.hid] our.hid]
==
::
++ next-act :: rotate active task
=+ ^- nex=(unit span)
=+ opt=[i=`(unit span)`~ t=(turn cubs |=(a=span `(unit span)`[~ a]))]
|-
?~ t.opt ~
?: =(act i.opt)
i.t.opt
$(opt t.opt)
?. tiv +(act nex)
%- blab(act nex)
%+ weld
?~ nex ~
(spam /active/[u.nex] %rush %type %&)
?~ act ~
(spam /active/[u.act] %rush %type %|)
::
++ peer
|= [you=ship gal=glas]
^+ +>
?@ gal
%_ +>.$
mow :_(mow [ost %give %rush %term-line prompt ~ ~])
==
?: ?=(%active -.gal)
(blab [ost %give %rush %type %|] ~)
?. (~(has by cub.hid) p.gal) +>.$
?: (~(has by pop) p.gal) +>.$
=: act `p.gal
pop (~(put by pop) p.gal ~) :: .=(~ standard-in)
==
(blab ping)
::
++ ping (print-vase !>(*tang))
++ poke-kyev
|= [you=ship key=kyev]
^+ +>
?: ?=([~ @] key) (poke-txt you q.key) :: simple keypress ?
?> ?=([[%ctrl ~ ~] @t] key)
?+ q.key
%+ blab
[ost %give %nice ~]
(print leaf/"no command \\{(trip q.key)}")
%d ?~ act
%^ blab
[ost %give %nice ~]
[ost %give %logo ~]
~
(eat-end:next-act %& (slav %ud u.act))
%g =+ =- tak=rose/[" " "[" "]"]^(turn (~(tap by cub.hid)) -)
=+ c=(sa cubs)
|= [a=span b=term]
:- %leaf
=+ (trip (rap 3 b '(' a ')' ~))
?.((~(has in c) a) - ?.(=([~ a] act) ['+' -] ['*' -]))
(blab [ost %give %nice ~] (print tak))
%x =. +>.$ next-act
(blab [ost %give %nice ~] ping)
==
::
++ poke-txt :: handle command
|= [you=ship txt=cord]
^+ +>
?^ act :: pipe to child
%+ blab
[ost %give %nice ~]
(spam /in/[u.act] %rush %txt txt)
=+ pas=((full ~(parse from pax lat.hid)) [1 1] (trip txt))
?~ q.pas
=- (blab (weld (stray txt) (print leaf/-)))
"<syntax error at {<`[@ @]`p.pas>}>"
=+ com=(wonk pas)
=> .(+>.$ (eat you com))
=. +>.$ (blab (stash txt))
+>.$(mow :_(mow [ost %give %nice ~]))
::
++ poke-type
|= [you=ship tiv=?]
^+ +>
=. tiv tiv
?^ act
%+ blab
[ost %give %nice ~]
(spam /active/[u.act] %rush %type tiv)
(blab [ost %give %nice ~] ~)
::
++ print |=(a=tank (print-vase !>(`tang`[a ~])))
++ print-vase
|= tan=vase :: [p=p:!>(*tang) q=*]
^- (list move)
%^ spam /out %meta
:(slop !>(%rush) !>(%term-line) !>(prompt) !>(~) tan)
::
++ prompt
^- [p=cord q=prom r=cord]
?^ act
=+ por=(~(get by pot) u.act)
?^ por u.por
[(rap 3 (~(got by cub.hid) u.act) '(' u.act ') ' ~) %text '']
:_ [%text '']
?. &(?=([@ @ @ *] pax) =('0' &3.pax))
(rsh 3 1 (cat 3 (spat pax) '> '))
(rap 3 &1.pax '/' &2.pax '=' ?~(|3.pax ~['> '] ~[(spat |3.pax) '> ']))
::
++ purr
|= [cil=span fom=?(%fork %out %main) typ=type sih=sign]
^+ +>
?< ?=(?(%init %sage %verb %veer %vega) +<.sih)
?- fom
%fork
?> ?=(%gone +<.sih)
=. mow :_(mow [ost %give %nice ~])
?. =(act [~ cil]) +>.$
=. act ~
(blab ping)
::
%main
?> ?=(?(%nice %mean) +<.sih)
%+ blab
[ost %give +.sih]
?. ?=(%mean +<.sih)
ping
(welp ping (kill cil))
::
%out
?. ?=(?(%rust %rush) +<.sih) +>.$
=> .(+<.sih %rush)
?: ?=(%prompt p.sih)
?^ (~(get ja pip) cil) +>.$
=. pot (~(put by pot) cil (,[cord prom cord] q.sih))
(blab ping)
%- blab
?: (~(has by pip) cil)
=+ inp=(~(get ja pip) cil)
|-
?~ inp ~
%+ weld $(inp t.inp)
(spam /in/[i.inp] %meta (slot 3 typ sih))
%- print-vase
?+ p.sih
!>([(sell (slot 15 [typ sih]))]~)
%tang (slam !>(flop) p:!>(*tang) q.sih)
%txt
?^ q.sih !! :: move to vase space?
!>([leaf/(trip q.sih)]~)
==
==
::
++ spam
|= [pax=path gip=gift]
^- (list move)
%+ turn
(~(tap in (~(get ju pus.hid) pax)))
|=(a=bone [a %give gip])
::
++ stash
|= a=cord
%^ spam /out %meta
!>([%rush %term-line `term-line`[prompt [a]~ ~]])
::
++ stray
|= a=cord
%^ spam /out %meta
=+ pro=prompt
!>([%rush %term-line `term-line`[pro(r a) ~ ~]])
--
--
::
:::: formal interface
!:
|_ [hid=hide vat=axle]
::
++ peer :: handle subscription
|= [ost=bone you=ship pax=path]
^- [(list move) _+>]
?~ pax `+>.$
?. ?=(?(%in %out %active) i.pax) `+>.$
=+ ^= gal
?: ?=(%out i.pax) %out
?: ?=(%in i.pax) [%in ?<(?=(~ t.pax) i.t.pax)]
[%active ?<(?=(~ t.pax) i.t.pax)]
=+ abet:(peer:(ve hid ost vat) you gal)
[-< +>.$(vat ->)]
::
++ poke-kyev :: handle key event
|= [ost=bone you=ship key=kyev]
^- [(list move) _+>]
=+ abet:(poke-kyev:(ve hid ost vat) you key)
[-< +>.$(vat ->)]
::
++ poke-txt :: handle command
|= [ost=bone you=ship txt=cord]
^- [(list move) _+>]
=+ abet:(poke-txt:(ve hid ost vat) you txt)
[-< +>.$(vat ->)]
::
++ poke-type :: handle command
|= [ost=bone you=ship tiv=?]
^- [(list move) _+>]
=+ abet:(poke-type:(ve hid ost vat) you tiv)
[-< +>.$(vat ->)]
::
++ purr
|= [ost=bone pax=path typ=type sih=sign]
^- [(list move) _+>]
?: ?=(%init +<.sih) :: vomit
[[ost %give +.sih]~ +>.$]
?: ?=(%dumb +<.sih) :: sleep
[~ +>.$]
?: ?=(%sage +<.sih) :: vomit
[[ost %give +.sih]~ +>.$]
?: ?=(%verb +<.sih) :: vomit
[[ost %give +.sih]~ +>.$]
?: ?=(%veer +<.sih) :: vomit
[[ost %give +.sih]~ +>.$]
?: ?=(%vega +<.sih) :: vomit
[[ost %give +.sih]~ +>.$]
?~ pax ~& %no-path !!
?> ?=([%child span ?(%fork %out %main) ~] pax)
=^ moz vat abet:(purr:(ve hid ost vat) i.t.pax i.t.t.pax typ sih)
:_ +>.$
?. ?=(%rush +<.sih) moz
[[ost %pass pax %g %took [our.hid i.t.pax imp.hid] our.hid] moz]
--

View File

@ -1,643 +0,0 @@
:: :: ::
:::: /hook/core/sole/app :: ::
:: :: ::
/? 314 :: zuse version
/- *sole :: console structures
/+ sole :: console library
:: :: ::
:::: :: ::
!: :: ::
=> |% :: data structures
++ house :: all state
$: bin=(map bone source) :: input devices
== ::
++ source :: input device
$: edg=_79 :: terminal columns
off=@ud :: window offset
kil=(unit (list ,@c)) :: kill buffer
apt=(list gill) :: application ring
maz=master :: master window
feg=(map gill target) :: live applications
mir=(pair ,@ud (list ,@c)) :: mirrored terminal
== ::
++ master :: master buffer
$: liv=? :: master is live
tar=target :: master target
== ::
++ history :: past input
$: pos=@ud :: input position
num=@ud :: number of entries
lay=(map ,@ud (list ,@c)) :: editing overlay
old=(list (list ,@c)) :: entries proper
== ::
++ 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=sole-prompt :: static prompt
inp=sole-command :: input state
== ::
++ ukase :: master command
$% [%add p=(list gill)] :: add agents
[%del p=(list gill)] :: delete agents
== ::
++ gift :: out result <-$
$% [%mean p=ares] ::
[%nice ~] ::
[%rush %dill-blit dill-blit] ::
== ::
++ sign-gall :: sign from %gall
$% [%mean p=ares] ::
[%nice ~] ::
[%rush %sole-effect sole-effect] ::
== ::
++ sign :: in result $<-
$% [%g sign-gall] ::
== ::
++ move ,[p=bone q=(mold note gift)] ::
++ note-gall :: note to %gall
$% [%mess p=[p=ship q=path] q=ship r=cage] ::
[%nuke p=[p=ship q=path] q=ship] ::
[%show p=[p=ship q=path] q=ship r=path] ::
[%took p=[p=ship q=path] q=ship] ::
== ::
++ note :: out request $->
$% [%g note-gall] ::
== ::
-- ::
|_ $: hid=hide :: system state
house :: program state
== ::
++ sp
|% ++ sp-ukase
%+ knee *ukase |. ~+
;~ pose
(stag %add ;~(pfix lus sp-gills))
(stag %del ;~(pfix hep sp-gills))
==
::
++ sp-gills
;~ pose
(most ;~(plug com ace) sp-gill)
%+ cook
|= a=ship
[[a %dojo] [a %talk] ~]
;~(pfix sig fed:ag)
==
::
++ sp-gill
;~ pose
(stag our.hid sym)
;~ plug
;~(pfix sig fed:ag)
;~(pfix fas sym)
==
==
--
++ se :: per source
|_ $: [moz=(list move) biz=(list dill-blit)]
[her=ship ost=bone]
source
==
++ se-abet :: resolve
:_ %_(+> bin (~(put by bin) ost +<+>))
%+ welp (flop moz)
^- (list move)
?~ biz ~
[ost %give %rush %dill-blit ?~(t.biz i.biz [%mor (flop biz)])]~
::
++ se-belt :: handle input
|= bet=dill-belt
^+ +>
?: ?=(%rez -.bet)
+>(edg (dec p.bet))
?: ?=(%yow -.bet)
(se-link p.bet)
=+ gyl=?^(apt i.apt [~zod %$])
=+ taz=~(. ta [& liv.maz gyl] ?:(liv.maz tar.maz (~(got by feg) gyl)))
=< ta-abet
?- -.bet
%aro (ta-aro:taz p.bet)
%bac ta-bac:taz
%cru (ta-cru:taz p.bet q.bet)
%ctl (ta-ctl:taz p.bet)
%del ta-del:taz
%met (ta-met:taz p.bet)
%ret ta-ret:taz
%txt (ta-txt:taz p.bet)
==
::
++ se-drop :: passive drop
|= gyl=gill
^+ +>
=< se-prom
?> (~(has by feg) gyl)
%_ +>
feg (~(del by feg) gyl)
apt (skip apt |=(a=gill =(gyl a)))
liv.maz ?~(apt & liv.maz)
==
::
++ se-join :: add connection
|= gyl=gill
^+ +>
=< se-prom
?: (~(has by feg) gyl)
(se-blit %bel ~)
+>(liv.maz |, apt [gyl apt], feg (~(put by feg) gyl *target))
::
++ se-nuke :: active drop
|= gyl=gill
^+ +>
(se-drop:(se-send(liv.maz |) gyl %nuke [p.gyl ~[q.gyl]] her) gyl)
::
++ se-like :: act in master
|= kus=ukase
?- -.kus
%add
|- ^+ +>.^$
?~ p.kus +>.^$
$(p.kus t.p.kus, +>.^$ (se-link i.p.kus))
::
%del
|- ^+ +>.^$
?~ p.kus +>.^$
$(p.kus t.p.kus, +>.^$ (se-nuke i.p.kus))
==
::
++ se-prom :: set master prompt
^+ .
%_ .
cad.pom.tar.maz
^- tape
%+ welp
(scow %p our.hid)
=+ ^= mux
|- ^- tape
?~ apt ~
=+ ^= mor ^- tape
?~ t.apt ~
[',' ' ' $(apt t.apt)]
%+ welp
^- tape
=+ txt=(trip q.i.apt)
?: =(our.hid p.i.apt)
txt
:(welp "~" (scow %p p.i.apt) "/" txt)
mor
?~ mux
"# "
:(welp ":" mux "# ")
==
::
++ se-link :: connect to app
|= gyl=gill
^+ +>
%. gyl
=< se-join
(se-send gyl %show [p.gyl ~[q.gyl]] her /sole)
::
++ se-blit :: give output
|= bil=dill-blit
+>(biz [bil biz])
::
++ se-show :: show buffer, raw
|= lin=(pair ,@ud (list ,@c))
^+ +>
?: =(mir lin) +>
=. +> ?:(=(q.mir q.lin) +> (se-blit %pro q.lin))
=. +> ?:(=(p.mir p.lin) +> (se-blit %hop p.lin))
+>(mir lin)
::
++ se-just :: adjusted buffer
|= lin=(pair ,@ud (list ,@c))
^+ +>
=. off ?:((lth p.lin edg) 0 (sub p.lin edg))
(se-show (sub p.lin off) (scag edg (slag off q.lin)))
::
++ se-view :: flush buffer
?: liv.maz
(se-just ~(ta-vew ta [& & ~zod %$] tar.maz))
?~ apt
se-view(liv.maz &)
%- se-just
~(ta-vew ta [& | i.apt] (~(got by feg) i.apt))
::
++ se-kill :: kill a source
=+ tup=apt
|- ^+ +>
?~ tup +>(apt ~)
$(tup +.tup, +> (se-nuke i.tup))
::
++ se-emit :: emit move
|= mov=move
%_(+> moz [mov moz])
::
++ se-send :: send a message
|= [gyl=gill nog=note-gall]
(se-emit ost %pass [(scot %p her) (scot %p p.gyl) q.gyl ~] %g nog)
::
++ se-tame
|= gyl=gill
^+ ta
~(. ta [& %| gyl] (~(got by feg) gyl))
::
++ se-pour :: receive results
|= [gyl=gill sil=sign-gall]
^+ +>
?- -.sil
%mean
+>.$
::
%nice
+>.$
::
%rush
ta-abet:ta-rap:(ta-fec:(se-tame gyl) +>.sil)
==
::
++ ta :: per target
|_ $: $: liv=? :: don't delete
mav=? :: showing master
gyl=gill :: target app
== ::
target :: target state
== ::
++ ta-abet :: resolve
^+ ..ta
=. liv.maz mav
?: mav
?. liv
(se-blit `dill-blit`[%qit ~])
+>(tar.maz +<+)
?. liv
=. ..ta (se-nuke gyl)
..ta(liv.maz =(~ apt))
%_(+> feg (~(put by feg) gyl +<+))
::
++ ta-ant :: toggle master
^+ .
?: mav
?~ apt ta-bel
%_ .
mav |
+<+ (~(got by feg) gyl)
tar.maz +<+
==
%_ .
mav &
+<+ tar.maz
feg (~(put by feg) gyl +<+)
==
::
++ ta-act :: send action
|= act=sole-action
^+ +>
?: mav
+>.$
%_ +>
+>
(se-send gyl %mess [p.gyl ~[q.gyl]] her %sole-action !>(act))
==
::
++ ta-aro :: hear arrow
|= key=?(%d %l %r %u)
^+ +>
?- key
%d =. ris ~
?. =(num.hit pos.hit)
(ta-mov +(pos.hit))
?: =(0 (lent buf.say.inp))
ta-bel
(ta-hom:ta-nex %set ~)
%l ?^ ris ta-bel
?: =(0 pos.inp) ta-bel
+>(pos.inp (dec pos.inp))
%r ?^ ris ta-bel
?: =((lent buf.say.inp) pos.inp)
ta-bel
+>(pos.inp +(pos.inp))
%u =. ris ~
?:(=(0 pos.hit) ta-bel (ta-mov (dec pos.hit)))
==
::
++ ta-bel .(+> (se-blit %bel ~)) :: beep
++ ta-cat :: mass insert
|= [pos=@ud txt=(list ,@c)]
^- sole-edit
:- %mor
|- ^- (list sole-edit)
?~ txt ~
[[%ins pos i.txt] $(pos +(pos), txt t.txt)]
::
++ ta-cut :: mass delete
|= [pos=@ud num=@ud]
^- sole-edit
:- %mor
|-(?:(=(0 num) ~ [[%del pos] $(num (dec num))]))
::
++ ta-det :: send edit
|= ted=sole-edit
^+ +>
(ta-act %det [[his.ven.say.inp own.ven.say.inp] (sham buf.say.inp) ted])
::
++ ta-bac :: hear backspace
^+ .
?^ ris
?: =(~ str.u.ris)
ta-bel
.(str.u.ris (scag (dec (lent str.u.ris)) str.u.ris))
?: =(0 pos.inp)
.(+> (se-blit %bel ~))
=+ pre=(dec pos.inp)
(ta-hom(pos.inp pre) %del pre)
::
++ ta-ctl :: hear control
|= key=@c
^+ +>
?+ key ta-bel
%a +>(pos.inp 0)
%b (ta-aro %l)
%c ta-bel(ris ~)
%d ?: &(=(0 pos.inp) =(0 (lent buf.say.inp)))
+>(liv |)
ta-del
%e +>(pos.inp (lent buf.say.inp))
%f (ta-aro %r)
%g ta-bel(ris ~)
%k =+ len=(lent buf.say.inp)
?: =(pos.inp len)
ta-bel
%- ta-hom(kil `(slag pos.inp buf.say.inp))
(ta-cut pos.inp (sub len pos.inp))
%l +>(+> (se-blit %clr ~))
%n (ta-aro %d)
%p (ta-aro %u)
%r ?~ ris
+>(ris `[pos.hit ~])
?: =(0 pos.u.ris)
ta-bel
(ta-ser ~)
%t =+ len=(lent buf.say.inp)
?: |(=(0 pos.inp) (lth len 2))
ta-bel
=+ sop=?:(=(len pos.inp) (dec pos.inp) pos.inp)
=. pos.inp +(sop)
%- ta-hom
:~ %mor
[%del sop]
[%ins (dec sop) (snag sop buf.say.inp)]
==
%u ?: =(0 pos.inp)
ta-bel
%- ta-hom(pos.inp 0, kil `(scag pos.inp buf.say.inp))
(ta-cut 0 pos.inp)
%v ta-ant
%x ?: =(~ apt) ta-bel
?: mav ta-bel
+>(apt (welp (slag 1 apt) [(snag 0 apt) ~]))
%y ?~ kil ta-bel
%- ta-hom(pos.inp (add pos.inp (lent u.kil)))
(ta-cat pos.inp u.kil)
==
::
++ ta-cru :: hear crud
|= [lab=@tas tac=(list tank)]
=. +>+> (se-blit %out (tuba (trip lab)))
(ta-tan tac)
::
++ ta-del :: hear delete
^+ .
?: =((lent buf.say.inp) pos.inp)
.(+> (se-blit %bel ~))
(ta-hom %del pos.inp)
::
++ ta-erl :: hear local error
|= pos=@ud
ta-bel(pos.inp (min pos (lent buf.say.inp)))
::
++ ta-err :: hear remote error
|= pos=@ud
(ta-erl (~(transpose cs say.inp) pos))
::
++ ta-fec :: apply effect
|= fec=sole-effect
^+ +>
?- -.fec
%bel ta-bel
%blk +>
%clr +>(+> (se-blit fec))
%det (ta-got +.fec)
%err (ta-err +.fec)
%mor |- ^+ +>.^$
?~ p.fec +>.^$
$(p.fec t.p.fec, +>.^$ ^$(fec i.p.fec))
%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]~])
==
::
++ ta-rap :: send %took
.(+> (se-send gyl %took [p.gyl ~[q.gyl]] her))
::
++ ta-dog :: change cursor
|= ted=sole-edit
%_ +>
pos.inp
=+ len=(lent buf.say.inp)
%+ min len
|- ^- @ud
?- -.ted
%del ?:((gth pos.inp p.ted) (dec pos.inp) pos.inp)
%ins ?:((lte pos.inp p.ted) +(pos.inp) pos.inp)
%mor |- ^- @ud
?~ p.ted pos.inp
$(p.ted t.p.ted, pos.inp ^$(ted i.p.ted))
%nop pos.inp
%set len
==
==
::
++ ta-got :: apply change
|= cal=sole-change
=^ ted say.inp (~(receive cs say.inp) cal)
(ta-dog ted)
::
++ ta-hom :: local edit
|= ted=sole-edit
^+ +>
=. +> (ta-det ted)
=. +> (ta-dog(say.inp (~(commit cs say.inp) ted)) ted)
+>
::
++ ta-met :: meta key
|= key=@c
~& [%ta-met key]
+>
::
++ ta-mov :: move in history
|= sop=@ud
^+ +>
?: =(sop pos.hit) +>
%+ %= ta-hom
pos.hit sop
lay.hit %+ ~(put by lay.hit)
pos.hit
buf.say.inp
==
%set
%- (bond |.((snag (sub num.hit +(sop)) old.hit)))
(~(get by lay.hit) sop)
::
++ ta-nex :: advance history
%_ .
num.hit +(num.hit)
pos.hit +(num.hit)
ris ~
lay.hit ~
old.hit [buf.say.inp old.hit]
==
::
++ ta-pro :: set prompt
|= pom=sole-prompt
+>(pom pom(cad :(welp (scow %p p.gyl) ":" (trip q.gyl) cad.pom)))
::
++ ta-ret :: hear return
?. mav
(ta-act %ret ~)
=+ txt=(tufa buf.say.inp)
=+ fey=(rose txt sp-ukase:sp)
?- -.fey
%| (ta-erl (lent (tuba (scag p.fey txt))))
%& ?~ p.fey
(ta-erl (lent buf.say.inp))
=. +>+> (se-like u.p.fey)
=. pom pom.tar.maz
(ta-hom:ta-nex %set ~)
==
::
++ ta-ser :: reverse search
|= ext=(list ,@c)
^+ +>
?: |(?=(~ ris) =(0 pos.u.ris)) ta-bel
=+ tot=(weld str.u.ris ext)
=+ dol=(slag (sub num.hit pos.u.ris) old.hit)
=+ sop=pos.u.ris
=+ ^= ser
=+ ^= beg
|= [a=(list ,@c) b=(list ,@c)] ^- ?
?~(a & ?~(b | &(=(i.a i.b) $(a t.a, b t.b))))
|= [a=(list ,@c) b=(list ,@c)] ^- ?
?~(a & ?~(b | |((beg a b) $(b t.b))))
=+ ^= sup
|- ^- (unit ,@ud)
?~ dol ~
?: (ser tot i.dol)
`sop
$(sop (dec sop), dol t.dol)
?~ sup ta-bel
(ta-mov(str.u.ris tot, pos.u.ris (dec u.sup)) (dec u.sup))
::
++ ta-tan :: print tanks
|= tac=(list tank)
=+ wol=`wall`(zing (turn tac |=(a=tank (~(win re a) [0 edg]))))
|- ^+ +>.^$
?~ wol +>.^$
$(wol t.wol, +>+>.^$ (se-blit %out (tuba i.wol)))
::
++ ta-txt :: hear text
|= txt=(list ,@c)
^+ +>
?^ ris
(ta-ser txt)
:: ~& ven.say.inp
%- ta-hom(pos.inp (add (lent txt) pos.inp))
:- %mor
|- ^- (list sole-edit)
?~ txt ~
[[%ins pos.inp i.txt] $(pos.inp +(pos.inp), txt t.txt)]
::
++ ta-vew :: computed prompt
|- ^- (pair ,@ud (list ,@c))
?^ ris
%= $
ris ~
cad.pom
:(welp "(reverse-i-search)'" (tufa str.u.ris) "': ")
==
=- [(add pos.inp (lent p.vew)) (weld (tuba p.vew) q.vew)]
^= vew ^- (pair tape (list ,@c))
?: vis.pom [cad.pom buf.say.inp]
:- %+ welp cad.pom
?~ buf.say.inp ~
"<{(scow %p (end 4 1 (sham buf.say.inp)))}> "
(turn buf.say.inp ,_`@c`'*')
--
--
++ peer
|= [ost=bone her=ship pax=path]
^- [(list move) _+>]
:: ~& [%sole-peer ost her pax]
?< (~(has by bin) ost)
:- [ost %give %rush %dill-blit %pro [`@c`0x23 `@c`0x20 ~]]~
%= +>
bin
%+ ~(put by bin) ost
^- source
:* 80
0
~
~
:* %&
*(unit search)
*history
`sole-prompt`[%& %sole "{(scow %p our.hid)}# "]
*sole-command
==
~
[0 ~]
==
==
::
++ poke-dill-belt
|= [ost=bone her=ship bet=dill-belt]
^- [(list move) _+>]
:: ~& [%sole-poke ost her bet]
=+ yog=(~(get by bin) ost)
?~ yog
~& [%sole-poke-stale ost]
[~ +>.$]
=< se-abet
=< se-view
(~(se-belt se [[ost %give %nice ~]~ ~] [her ost] u.yog) bet)
::
++ pour
|= [ost=bone pax=path sih=*]
^- [(list move) _+>]
=+ yog=(~(get by bin) ost)
?~ yog
~& [%sole-pour-stale ost pax]
[~ +>.$]
=+ sih=((hard sign) sih)
?> ?=([@ @ @ ~] pax)
=< se-abet
=< se-view
=+ gyl=[(slav %p i.t.pax) i.t.t.pax]
(~(se-pour se [~ ~] [(slav %p i.pax) ost] u.yog) gyl +.sih)
::
++ pull
|= ost=bone
^- [(list move) _+>]
:: ~& [%sole-pull ost]
=^ moz +>
=< se-abet
=< se-view
~(se-kill se [~ ~] [our.hid ost] (~(got by bin) ost))
[moz +>.$(bin (~(del by bin) ost))]
--

View File

@ -1,41 +0,0 @@
!:
::::
::
|_ [hid=hide ~]
++ peer ,_`.
++ poke-solid-args
|= [ost=bone you=ship ~]
:_ +>.$
=+ top=`path`/(scot %p our.hid)/main/(scot %da lat.hid)/arvo
=+ pax=`path`(weld top `path`[%hoon ~])
~& %solid-start
=+ gen=(reck pax)
~& %solid-parsed
=+ ken=q:(~(mint ut %noun) %noun gen)
~& %solid-compiled
=+ ^= all
=+ 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)
:~ [ost %give %sage [%urbit %pill ~] [ken all]]
[ost %pass / %g %cide %$]
[ost %give %nice ~]
==
--

View File

@ -1,16 +0,0 @@
:: Desk sync
::
:::: /hook/core/sync/app
::
/+ sh-utils
!:
::::
::
|_ [hid=hide ~]
++ peer ,_`.
++ poke--args
%+ gate-bang
|= [syd=@tas her=@p sud=@tas ~]
[%c %font our.hid syd her sud]
(print . "synced")
--

File diff suppressed because it is too large Load Diff

View File

@ -1,28 +0,0 @@
:: :: ::
:::: /hook/core/tease/app :: ::
:: :: ::
/? 314 :: zuse version
/- *console :: console structures
/+ console :: console library
!: :: ::
:::: :: ::
:: :: ::
|_ [hid=hide ~]
++ peer ,_`.
++ poke--args
|= [ost=bone you=ship ~]
~& %tease
:_ +>.$
:~ :* 0 %pass ~
%g %show
[our.hid /seat] our.hid
/
==
:* 0 %pass ~
%g %mess
[our.hid /seat] our.hid
%dill-belt
!>(`dill-belt`[%yow %helm])
==
==
--

View File

@ -1,306 +0,0 @@
:: Terminal
::
:::: /hook/core/terminal/app
::
/? 314 :: need urbit 314
/- term-line, term-in, term-ctrl, kyev
::/= stat /:/%%/:/hymn/
::
:::: structures
::
|% ::
++ axle $: %1 ::
hiz=(map path term-line) ::
== ::
++ gilt ::
$% [%term-line p=term-line] ::
[%hymn p=manx] ::
== ::
++ gift ::
$% [%rush gilt] ::
[%init p=@p] ::
[%logo @] ::
[%mean p=ares] ::
[%nice ~] ::
[%sage p=path q=*] ::
[%verb ~] ::
[%veer p=@ta q=path r=@t] ::
[%vega p=path] ::
== ::
++ glas ?(%term %lines) ::
++ hapt ,[p=ship q=path] ::
++ mess ::
$% [%txt p=(hypo cord)] ::
[%kyev p=(hypo kyev)] ::
[%type p=(hypo ,?)] ::
== ::
++ move ,[p=bone q=(mold note gift)] ::
++ note ::
$% $: %g ::
$% [%cide p=span] ::
[%show p=hapt q=ship r=path] ::
[%sire p=term q=span] ::
[%mess p=hapt q=ship r=mess] ::
[%took p=hapt q=ship] ::
== == == ::
++ sign ::
$% $: %g ::
$% [%gone p=hapt] ::
[%init p=@p] ::
[%logo @] ::
[%mean p=ares] ::
[%nice ~] ::
[%rush p=%term-line q=term-line] ::
[%sage p=path q=*] ::
[%verb ~] ::
[%veer p=@ta q=path r=@t] ::
[%vega p=path] ::
== == ==
--
::
:::: from future import wick, pack, pick XX remove on breach or kelvin bump
::
|%
++ wick :: span format
|= a=@
^- (unit ,@ta)
=+ b=(rip 3 a)
=- ?^(b ~ (some (rap 3 (flop c))))
=| c=tape
|- ^- [b=tape c=tape]
?~ b [~ c]
?. =('~' i.b)
$(b t.b, c [i.b c])
?~ t.b [b ~]
?- i.t.b
%'~' $(b t.t.b, c ['~' c])
%'-' $(b t.t.b, c ['_' c])
@ [b ~]
==
::
++ pack :: light path encoding
|= [a=term b=path] ^- span
%+ rap 3 :- (wack a)
(turn b |=(c=span (cat 3 '_' (wack c))))
::
++ pick :: light path decoding
|= a=span ^- (unit ,[p=term q=path])
(rush a (most cab (sear wick urt:ab)))
--
!:
:::: helpers
::
|%
++ aut %shell
++ inject
|= [a=[i=mane t=(list mane)] b=marl]
|= man=manx
?. =(i.a n.g.man)
man
?~ t.a
man(c (weld c.man b))
man(c (turn c.man ^$(a t.a)))
::
++ start-shell
|= [our=ship imp=path ost=bone you=ship pax=path]
%- flop
^- (list move)
=+ auc=(pack aut pax)
:- [ost %pass [%fork pax] %g %sire [aut auc]]
[ost %pass [%resp pax] %g %show [our [auc imp]] you /out]~
--
!:
:::: per shell
::
|%
++ se
|= [hid=hide ost=bone you=ship hiz=(map path term-line) pax=path]
=+ tel=(fall (~(get by hiz) pax) *term-line)
=+ auc=(pack aut pax)
=^ mow tel
?: (~(has by cub.hid) auc)
[~ tel]
:- (start-shell our.hid imp.hid ost you pax)
tel(r :_(r.tel leaf/"+ {(trip aut)}"))
|%
++ abet
^- [(list move) (map path term-line)]
[(flop mow) (~(put by hiz) pax tel)]
::
++ page
;html
;head
;title: Not yet
==
;body;
==
:: %. stat
:: %+ inject
:: ~[%html %head]
:: ;= ;script: urb.appl = "{(trip app.hid)}"
:: ;script: urb.term = \{pax: "{(spud pax)}"}
:: ==
::
++ peer
|= gal=glas
%_ +>.$
mow
:_ mow
?- gal
%term [ost %give %rust %hymn page] :: hymn front end
%lines [ost %give %rust %term-line tel] :: term-line output
==
==
::
++ poke
|= jof=$%([%line p=cord] [%res p=span] [%cmd p=char] [%type p=?])
^+ +>
?- -.jof
%res :: restart shell
=. +>.$
?. (~(has by cub.hid) auc) +>.$
%_ +>.$
mow :_(mow [ost %pass [%fork pax] %g %cide auc])
r.tel :_(r.tel leaf/"- {(trip aut)}")
==
%_ +>.$
r.tel :_(r.tel leaf/"+ {(trip auc)}")
mow
;: welp
(start-shell our.hid imp.hid ost you pax)
[ost %give %nice ~]~
(spam tel)
mow
==
==
::
%line :: command entered
=+ new=stem/[lat.hid leaf/(trip p.p.tel) leaf/(trip p.jof)]
=. r.tel
:_ r.tel
stem/[lat.hid leaf/(trip p.p.tel) leaf/(trip p.jof)]
=. +>.$ (send %txt -:!>(*cord) p.jof)
+>.$(mow (welp (spam p.tel q.tel new ~) mow))
::
%cmd :: key command
?+ p.jof
(send %kyev -:!>(*kyev) [[%ctrl ~ ~] p.jof])
%r $(jof [%res 'shell'])
==
::
%type
(send %type -:!>(*?) p.jof)
==
::
++ poke-ctrl
.(mow :_(mow [ost %give %rush %term-line [p q ~]:tel]))
::
++ pour
|= [dis=?(%fork %resp %txt %kyev %type) sih=sign]
^+ +>
?- dis
%fork ?>(?=(%gone +<.sih) +>.$) :: XX maybe mean?
%resp
?+ +<.sih !!
%nice +>.$
%rush
:: ~? !=(p.tel p.q.sih) prompt/[p.q.sih ?=(~ q.q.sih)]
=. 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]
(welp (spam q.sih) mow)
tel [p.q.sih (weld q.q.sih q.tel) (weld r.q.sih r.tel)]
==
==
::
?(%txt %kyev %type)
?+ +<.sih !!
%nice +>.$(mow :_(mow [ost %give +.sih]))
%mean
=+ ^= new
=- (turn - |=(a=tank rose/[~ "! " ~]^[a]~))
%- flop ^- tang
?~ p.sih ~
[leaf/(trip p.u.p.sih) q.u.p.sih]
%_ +>.$
r.tel (welp new r.tel)
mow
%- welp :_ mow
[[ost %give +.sih] (spam [p.tel q.tel new])]
==
==
==
::
++ send
|= mez=mess
%_ +>.$
mow
%- welp :_ mow
^- (list move)
%+ murn (~(tap by cub.hid))
|= [p=span q=term]
?. =(p auc) ~
%- some ^- move
:^ ost %pass [-.mez pax]
[%g %mess [our.hid p imp.hid] you mez]
==
::
++ spam
|= tol=term-line
^- (list move)
%+ murn
(~(tap by sup.hid))
|= [ost=bone @ paf=path]
?: =([%lines pax] paf)
(some ost %give %rush %term-line tol)
~
--
--
!:
:::: formal interface
::
|_ [hid=hide axle]
++ peer
|= [ost=bone you=ship pax=path]
^- [(list move) _+>]
?~ pax
$(pax /term)
?. ?=(glas i.pax)
[[ost %give %mean ~ %bad-path ~]~ +>.$]
=+ abet:(peer:(se hid ost you hiz t.pax) i.pax)
[-< +>.$(hiz ->)]
::
++ poke-term-in
|= [ost=bone you=ship term-in]
^- [(list move) _+>]
=+ abet:(poke:(se hid ost you hiz pax) jof)
[-< +>.$(hiz ->)]
::
++ poke-term-ctrl
|= [ost=bone you=ship col=term-ctrl]
^- [(list move) _+>]
=+ abet:poke-ctrl:(se hid ost you hiz /)
[-< +>.$(hiz ->)]
::
++ pour
|= [ost=bone pax=path sih=*]
^- [(list move) _+>]
=+ sih=~|([%term-pour (,[term term ~] sih)] ((hard sign) sih))
?: ?=(?(%sage %init %logo %verb %veer %vega) &2.sih) :: vomit
[[ost %give +.sih]~ +>.$]
?~ pax !!
?. ?=(?(%fork %resp %txt %kyev %type) i.pax) !!
=+ abet:(pour:(se hid ost our.hid hiz t.pax) i.pax sih)
[-< +>.$(hiz ->)]
::
++ prep
|= old=(unit (unit axle))
^- [(list move) _+>]
:- ~
%_ +>.$
hiz
?. ?=([~ ~ *] old) hiz
%- ~(run by hiz.u.u.old)
|=(term-line [p q ~])
==
--

View File

@ -1,33 +0,0 @@
:: Terminal page
::
::::
::
/? 314
/= styl /:/%/style:/psal/
/= jass /:/%/script:/psal/
::
:::: ~talsur-todres
::
^- manx
;html
;head
;title: Hi
;script: window.urb = window.urb || \{};
;script@"/~/at/base/lib/urb.js";
;script@"//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js";
;script@"//cdnjs.cloudflare.com/ajax/libs/mousetrap/1.4.6/mousetrap.js";
;script@"//use.typekit.net/fkv0sjk.js";
;script:'try{Typekit.load();}catch(e){}'
:: ;script: urb.appl = "terminal"; urb.term = \{pax: "/"}
;+ styl
==
;body
;pre#cont;
;span#prem:">"
;div#prom-cont
;textarea.mousetrap#prom(wrap "off");
;div#prom-size;
==
;+ jass
==
==

View File

@ -1,104 +0,0 @@
urb.appl = urb.appl ||
window.location.pathname.match(/.*?app\/([a-z0-9-]+)/)[1]
urb.term = urb.term ||
{pax: location.pathname.replace(new RegExp(".*?app/"+urb.appl),'') || '/'}
function jpok(a,b){
var dat = {pax:urb.term.pax, act:{}}
dat.act[a] = b
urb.send({data:dat,mark:"term-in"}, function(e,dat){
if(a === 'line' && dat.data.err){
hist.unshift(prom.val())
prom.val(b)
hind = 0
}
})
}
var prom, prom_size, hist, hind, size, focus, pos, pax
$(function() {
prom = $("#prom")
prom_size = $("#prom-size")
hist = []
hind = 0
var keys = ['l', 'x', 'r']
var mod = /Mac|iPod|iPhone|iPad/.test(navigator.platform) ? 'ctrl' : 'alt'
for (i in keys) (function(k){
Mousetrap.bind(mod + '+' + k, function(){
jpok('cmd', k)
})
})(keys[i])
prom.keydown(function(e){
switch(e.which){
default: return true
break;
case 13: // %retn
if(e.shiftKey) return true
v = prom.val().replace(/\xa0/g, ' ')
$(cont).append($('<b>').html(prem.innerHTML),
$('<div class="prom">').text(v))
jpok('line', v)
hist.unshift(v)
prom.val('')
return false
break;
case 38: // %up
if(hind == hist.length) return true
if(pos().top === false) return true
prom.val([hist[hind], hist[hind] = prom.val()][0]) // swap
size()
hind++
return false
break;
case 40: // %down
if(hind == 0) return true
if(pos().bot === false) return true
size()
hind--
prom.val([hist[hind], hist[hind] = prom.val()][0]) // swap
return false
}
})
focus = function() { $(prom).focus(); }
$('body').on('click', focus)
focus()
size = function() {
prom_size.html(prom.val()+"<br />")
}
size()
prom.on('input propertychange', size)
pos = function() {
v = prom.val()
_top = v.slice(0,prom[0].selectionStart).indexOf("\n") === -1
_bot = v.slice(prom[0].selectionStart).indexOf("\n") === -1
return {top:_top,bot:_bot}
}
pax = '/lines'
if(urb.term.pax != "/") pax += urb.term.pax
urb.subscribe({path: pax}, function(e, dat){
if(dat.data.ok) return;
hist = dat.data.history.concat(hist)
hind = 0
// cont.innerHTML = ''
for(var i in dat.data.lines){
var lom = dat.data.lines[i]
if(typeof lom == 'string')
$(cont).append($('<div>').text(lom))
else {
$(cont).append($('<b>').text(lom.prompt),
$('<div class="prom">').text(lom.task))
}
}
window.scrollTo(0,document.body.scrollHeight)
prem.textContent = dat.data.prompt
})
});

View File

@ -1,54 +0,0 @@
html {
font-size: 14px;
}
body {
margin: 2rem;
line-height: 1.4rem;
}
body,
span,
pre,
textarea,
input {
font-family: 'source-code-pro', monospace;
font-size: 1rem;
background-color: #000;
color: #fff;
}
button {
border: none;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-weight: 600;
font-size: .8rem;
text-transform: uppercase;
letter-spacing: 1px;
color: #000;
background-color: #fff;
padding: 1rem;
}
#prom-cont,
.prom {
display: block;
position:relative;
left: 1rem;
}
textarea,
#prom-size {
min-height: 24px;
box-sizing: border-box;
overflow: hidden;
width: 100%;
}
textarea {
height: 100%;
border: 0;
outline: none;
position: absolute;
resize: none;
}
#prom-size {
visibility: hidden;
white-space: pre-wrap;
word-wrap: break-word;
overflow-wrap: break-word;
}

View File

@ -1,73 +0,0 @@
$(function() {
$tests = $("#tests")
runtest = function(name) {
test = $(name)
test.attr('disabled', true)
test.addClass('disabled')
window.urb.send({
appl:"test",
data:{test:name}
}, function(err,res) {
test.attr('disabled', false)
test.removeClass('disabled')
_test = {
name: name,
result: res.data
}
console.log('set it')
console.log(_test)
$tests.prepend(renderTest(_test))
})
}
renderTest = function(test) {
css = "test"
if(test.pending == true)
css += " pending"
$_test = $("<div class='"+css+"' id="+test.name+" onclick='runtest(\""+test.name+"\")'></div>")
$_test.append("<div class='name'>"+test.name+"</div>")
$_test.append("<div class='result'>"+JSON.stringify(test.result)+"</div>")
return $_test
}
renderTests = function(testlist) {
console.log("renderTests: "+testlist)
$tests.html("")
for(i in testlist) {
$tests.append(renderTest(testlist[i]))
}
}
renderError = function(error) {
$tests.html("<div class='error'>Sorry! There was an error fetching from Test: "+error+"</div>")
}
window.urb.subscribe({
appl:"test",
path:"/tests"
}, function(err,res) {
console.log('subscr')
console.log(arguments)
if (res.data.ok)
return
if(err)
renderTests(err)
else
{
if(res.data) {
if(res.data) {
renderTests(res.data)
}
else
{
renderTests("unknown error")
}
}
}
})
})

View File

@ -1,334 +0,0 @@
:: Test suite
::
:: runnable from unix with command:
:: curl http://localhost:8080/gog/test/all-tests
::
:::: /hook/core/test/app
::
/? 314 :: need urbit 314
:: /= front /:/%%/front:/hymn/ :: load front page
::
:::: structures
::
|% :: structures
++ axle ,[%0 tests=(map term test)] :: application state
++ gilt :: subscription frame
$% [%json p=json] :: json data
[%html p=@t] :: html text
[%hymn p=manx] :: html tree
[%mime p=mite q=octs] :: mime data
== ::
++ gift :: output action
$% [%rust gilt] :: total update
[%mean p=ares] :: message failure
[%nice ~] :: succeed
== ::
++ hapt ,[p=ship q=path] :: see %gall
++ move ,[p=bone q=(mold note gift)] :: output operation
++ result :: test result
$% [%mean p=ares] :: failure
[%nice ~] :: success
== ::
++ note :: system request
$% $: %g :: to %gall
$% [%mess p=hapt q=ship r=cage] ::
[%cide p=span] ::
[%show p=hapt q=ship r=path] ::
[%sire p=term q=span] ::
== == == ::
++ test :: test template
$_ ^? |% ::
++ poke |+([bone ship] [*(list move) +>]) :: start test
++ pour |+([bone path *] [*(list move) +>]) :: system response
-- ::
-- ::
!:
:::: program
::
|_ $: hid=hide :: system state
axle :: custom state
==
++ et :: tests
|%
++ tests-json
%- jobe
%+ turn (~(tap by tests))
|= [nam=@t tes=test]
:- nam
%- jobe
^- (list ,[@t json])
~[[%name %s nam] [%result %s %untested]]
++ succeed
^- test
|%
++ poke
|+ [ost=bone you=ship]
^- [(list move) _+>]
[[ost %give %nice ~]~ +>.$]
++ pour
|+ [ost=bone pax=path sih=*]
^- [(list move) _+>]
!!
--
++ cede
^- test
=> |%
++ sign
$% $: %g
$% [%nice ~]
[%gone p=hapt]
== == ==
--
=| cnt=?
|%
++ poke
|+ [ost=bone you=ship]
^- [(list move) _+>]
~& [%cede-poke cub.hid sup.hid our.hid]
:_ +>.$(cnt !cnt)
?: cnt
:~
[ost %pass /cede/sire %g %sire %test-cede %babe]
:* ost %pass /cede/poke %g
%mess [our.hid babe/imp.hid] you
%json !>(~)
==
==
[ost %give %nice ~]~
++ pour
|+ [ost=bone pax=path sih=*]
^- [(list move) _+>]
~& [%cede-pour pax]
?+ -.pax `+>
%sire
~& %child-dead
:_ +>.$ :_ ~
[ost %give %nice ~]
==
--
++ cide
^- test
=> |%
++ sign
$% $: %g
$% [%nice ~]
[%rust %hymn p=manx]
== == ==
--
|%
++ poke
|+ [ost=bone you=ship]
^- [(list move) _+>]
~& [%cide-poke cub.hid sup.hid our.hid]
:_ +>.$
:~
[ost %pass /cide/hi %g %cide %baby]
[ost %give %nice ~]
==
++ pour
|+ [ost=bone pax=path sih=*]
^- [(list move) _+>]
!!
--
++ sire
^- test
=> |%
++ sign
$% $: %g
$% [%nice ~]
[%rust %hymn p=manx]
[%gone p=hapt]
== == ==
--
|%
++ poke
|+ [ost=bone you=ship]
^- [(list move) _+>]
:_ +>.$
:~
[ost %pass /sire/hi %g %sire %test-cede %baby]
[ost %give %nice ~]
:: [ost %pass /sire/ho %g %mess our.hid^baby/imp.hid you %json !>(*json)]
:: [ost %pass /sire/ho %g %show our.hid^baby/imp.hid you /]
==
++ pour
|+ [ost=bone pax=path sih=*]
^- [(list move) _+>]
=+ sih=((hard sign) sih)
:_ +>.$
[ost %give %nice ~]~
--
++ poke-local
^- test
=> |%
++ sign ,[%g result]
--
|%
++ poke
|+ [ost=bone you=ship]
^- [(list move) _+>]
:_ +>.$ :_ ~
:* ost %pass /poke-local %g
%mess [our.hid %test ~] you %json
!> (joba %test %s %bad-test-name)
==
++ pour
|+ [ost=bone pax=path sih=*]
^- [(list move) _+>]
:_ +>.$
=+ sih=((soft sign) sih)
:_ ~ :+ ost %give
?~ sih [%mean ~ %poke-local-pour-bad-sign ~]
?- +<.u.sih
%nice [%mean ~ %poke-local-pour-unexpected-nice ~]
%mean
?: ?=([~ %bad-test ~] p.u.sih)
[%nice ~]
[%mean ~ %poke-local-pour-unexpected-mean ~]
==
--
++ ze
^- test
|%
++ poke
|+ [ost=bone you=ship]
^- [(list move) _+>]
:_ +>.$ :_ ~
=+ ^= zez
%+ ~(edit ^ze lat.hid *dome *rang)
lat.hid
[%& [0v0 0v0] [/hello %ins 'hello, world']~]
=+ `[l=@da d=dome r=rang]`+<.zez
?: .= lat.r
:_ [~ ~]
[p=1.292.805.149 q=[%direct p=1.292.805.149 q='hello, world' r=%c]]
[ost %give %nice ~]
[ost %give %mean ~ %bad-rang ~[leaf/<d> leaf/<r>]]
++ pour
|+ [ost=bone pax=path sih=*]
^- [(list move) _+>]
!!
--
++ all-tests
^- test
=> |%
++ sign ,[%g result]
++ sult
$? result
[%pending ~]
==
--
=| results=(map ,@t sult)
|%
++ poke
|+ [ost=bone you=ship]
^- [(list move) _+>]
=. results
%- mo
%+ turn (~(tap by tests))
|= [nam=@t tes=test]
[nam %pending ~]
:_ +>.$
%+ turn (~(tap by tests))
|= [nam=@t tes=test]
:* ost %pass /all-tests/[nam] %g
%mess [our.hid %test ~] you %json
!> (joba %test %s nam)
==
++ pour
|+ [ost=bone pax=path sih=*]
^- [(list move) _+>]
=+ sih=((hard sign) sih)
?. ?=([@ ~] pax) ~& [%all-tests-strange-path pax] [~ +>.$]
=. results (~(put by results) -.pax +.sih)
:_ +>.$
?: (~(any by results) |=([res=sult] ?=(%pending -.res)))
~
:_ ~
?: (~(all by results) |=([res=sult] ?=(%nice -.res)))
[ost %give %nice ~]
:^ ost %give %mean
:+ ~ %failed-tests
%- zing
%+ turn
(skim (~(tap by results)) |=([nam=@t res=sult] ?=(%mean -.res)))
|= [nam=@t res=sult]
?> ?=(%mean -.res)
^- (list tank)
:_ ?~ p.res ~ q.u.p.res
:- %leaf
%+ weld "test %{(trip nam)} failed with "
?~ p.res "no error message"
%+ weld "error code %{(trip p.u.p.res)} and "
?~ q.u.p.res "no error info"
"the following error info:"
--
--
++ spec-pour
|= [ost=bone pax=path sih=*]
^- [(list move) _+>]
=+ sih=((hard ,[%g result]) sih)
:_ +>.$ :_ ~
[ost %give %rust %mime /text/plain (taco (cat 3 (crip <sih>) 10))]
++ prep
|= old=(unit (unit axle))
^- [(list move) _+>]
:- ~
%= +>.$
tests
?~ old
~& %prep-sig tests
?^ u.old
~& %prep-no-sig tests.u.u.old
=. tests
%- mo
^- (list ,[@t test])
=> et
:~ [%succeed succeed]
[%sire sire]
[%cide cide]
[%cede cede]
[%ze ze]
[%poke-local poke-local]
==
(~(put by tests) %all-tests all-tests:et)
==
++ peer :: accept subscriber
|= [ost=bone you=ship pax=path]
^- [(list move) _+>]
~& [%test-peer hid]
?~ pax !! ::[[ost %give %rust %hymn front]~ +>.$]
?: ?=(%tests -.pax)
[[ost %give %rust %json tests-json:et]~ +>.$]
:_ +>.$ :_ ~
:* ost %pass /automagic %g
%mess [our.hid %test ~] you %json
!> (joba %test %s -.pax)
==
++ poke-json :: browser message
|= [ost=bone you=ship jon=json]
^- [(list move) _+>]
~& [%test-poke hid you]
=+ tes=((of [%test so] ~):jo jon)
?~ tes [[ost %give %mean ~ %strange-json ~]~ +>.$]
=+ tst=(~(get by tests) +.u.tes)
?~ tst
[[ost %give %mean ~ %bad-test leaf/<+.u.tes> ~]~ +>.$]
~& [%running-test +.u.tes]
=+ res=(poke:u.tst ost you)
:- -.res
+>.$(tests (~(put by tests) +.u.tes +.res))
++ pour :: response
|= [ost=bone pax=path sih=*]
^- [(list move) _+>]
~& [%test-pour ost pax -.sih +<.sih]
?~ pax ~& %test-strange-path [~ +>.$]
?: ?=(%automagic -.pax)
(spec-pour ost pax sih)
=+ tst=(~(get by tests) -.pax)
?~ tst
~& [%test-bad-path pax] [~ +>.$]
=+ res=(pour:u.tst ost +.pax sih)
:- -.res
+>.$(tests (~(put by tests) -.pax +.res))
--

View File

@ -1,31 +0,0 @@
:: Front page of the twitter app.
::
:::: /hook/hymn/front/twit/app
::
/? 314 :: need urbit 314
/= urbit /:/===lib/urb:/hymn/ :: urbit library (js)
/= style /:/%%%/style:/hymn/ :: stylesheet (css)
/= application /:/%%%/app:/hymn/ :: application (js)
!:
:::: content
::
^- manx
=- ~! - -
;html
;head
;title: Tests
;+ style
;script
=type "text/javascript"
=src "//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"
;
==
==
;body
;div#tests
;p: Fetching tests...
==
;+ urbit
;+ application
==
==

View File

@ -1,82 +0,0 @@
body,
textarea,
input {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-weight: 400;
}
body {
margin-top: 4rem;
font-size: 18px;
}
.test,
.name,
.result {
width: 32rem;
}
textarea {
border: 0;
height: 8rem;
line-height: 1.5rem;
margin-bottom: .3rem;
resize: none;
padding: 1rem 1px;
background-color: #f7f7f7;
}
.name {
border: 0;
color: #333;
letter-spacing: 0.01rem;
}
.name {
background-color: transparent;
border: 2px solid #5DE668;
color: #5DE668;
padding: .3rem 1rem;
font-weight: 500;
cursor: pointer;
}
.name {
background-color: #5DE668;
color: #fff;
}
.disabled {
opacity: .6;
}
.text {
word-wrap:break-word;
margin-bottom: .3rem;
line-height: 1.6rem;
}
#twet {
margin-bottom: 3rem;
border-bottom: 2px solid #464646;
padding-bottom: 2rem;
}
#twet,
.tweet {
border-bottom: 1px solid #eee;
}
.tweet {
margin-bottom: 2rem;
padding-bottom: 1rem;
}
.pending {
opacity: .3;
}
.error {
color: #FF5F5F;
letter-spacing: .06rem;
}

View File

@ -1,24 +0,0 @@
/+ sh-utils
!:
::::
::
|_ [hid=hide ~]
++ peer ,_`.
++ poke-ticket-args
%+ args-into-gate .
|= [her=@p num=?(~ [p=@ud ~])]
=+ n=?~(num 1 p.num)
=+ ^= sep ^- @
=+ mir=(clan her)
?+ mir ~|(%ticket-clan !!)
%king (bex 8)
%duke (bex 16)
%earl (bex 32)
==
:- %tang
|- ^- tang
?: ?=(0 n) ~
=+ tic=/(scot %p our.hid)/tick/(scot %da lat.hid)/(scot %p her)
:- leaf/"{<her>}: {<(,@p .^(%a tic))>}"
$(her (add sep her), n (dec n))
--

View File

@ -1,11 +0,0 @@
:: Time an operation, usage :time foo, |time :foo
::
:::: /hook/core/time/app
::
/+ sh-utils
|_ [hide ~]
++ peer ,_`.
++ poke--args (add-resp [%pass /(scot %da lat) %t %wait lat] ,_`.)
++ pour |=([@ a=path *] %.(+< (args-into-gate +> ,_(resu a))))
++ resu |=(a=path tang/[>`@dr`(sub lat (slav %da -.a))<]~)
--

View File

@ -1,26 +0,0 @@
:: Tree view recursive directory contents
::
:::: /hook/core/tree/app
::
/+ sh-utils
!:
::::
::
|_ [hid=hide ~]
++ peer ,_`.
++ poke--args
%+ args-into-gate .
|= [pax=path fla=$|(~ [%full ~])]
=+ len=(lent pax)
=+ rend=?^(fla dank:ut |=(a=path (dank:ut (slag len a))))
:- %tang
|- ^- tang
=+ ark=;;(arch .^(cy/pax))
=- ?~ q.ark -
[(rend pax) -]
%- zing
%+ turn
(sort (~(tap by r.ark)) aor)
|= [a=@t ~]
^$(pax (welp pax /[a]))
--

View File

@ -1,13 +0,0 @@
/+ sh-utils
!:
|_ [hide ~]
++ peer ,_`.
++ poke--args
%+ add-subs [[our /twit] our /post/(scot %uv eny)]
%^ gate-mess .
|=([a=span b=cord ~] [/twit %twit-do !>([a %post eny b])])
,_`.
++ posh-twit-stat
(args-into-gate . |=([@ @ a=@da @] tang/~[leaf/"Tweet recieved {<a>}"]))
++ pour |*([ost=@ * sih=[@ ^]] :_(+>.$ [ost %give +.sih]~))
--

View File

@ -1,217 +0,0 @@
:: Twitter daemon
::
:::: /hook/core/twit/app
::
/- *twitter
/+ twitter
::
:::: ~fyr
::
|%
++ twit-path :: valid peer path
$% :: [%home ~] :: home timeline
[%user p=@t ~] :: user's tweets
[%post p=@ta ~] :: status of status
==
::
++ axle :: app state
$: %0
kes=(map span keys:twit-do) :: auth
out=(map ,@uvI (each ,[span cord] stat)) :: sent tweets
ran=(map path ,[p=@ud q=@da]) :: polls active
fed=(jar path stat) :: feed cache
==
::
++ gift :: app response
$% [%nice ~] :: acknowledgement
[%mean p=ares] :: error/termination
[%rush p=gilt] :: subscription data
==
::
++ gilt
$% [%twit-feed p=(list stat)] :: posts in feed
[%twit-stat p=stat] :: tweet accepted
==
::
++ move ,[bone (mold note gift)]
++ note :: arvo request
$% [%e %them ~ u=hiss] :: HTTP request
[%t %wait p=@da] :: timeout
==
::
++ sign :: arvo response
$% [%e %thou p=httr] :: HTTP result
[%t %wake ~] :: timeout ping
==
::
++ stat twit-stat :: recieved tweet
--
!:
::::
::
|_ [hide axle]
++ any-auth ?~(kes (auth) (auth p.n.kes)) :: use any keys
++ auth :: build API door
|= a=span
~| [%no-auth a]
~(. twit (~(got by kes) a) lat `@`eny)
::
++ cull :: remove seen tweets
|= [pax=path rep=(list stat)] ^+ rep
=+ pev=(sa (turn (~(get ja fed) pax) |=(stat id)))
(skip rep |=(stat (~(has in pev) id)))
::
++ dely :: next polling timeout
|= pax=path
^- [(unit time) _ran]
=+ cur=(~(get by ran) pax)
=+ tym=(add lat (mul ~s8 (bex ?~(cur 0 p.u.cur))))
:: ~& dely/`@dr`(sub tym lat)
?: &(?=(^ cur) (gte tym q.u.cur) (gth q.u.cur lat))
[~ ran]
[`tym (~(put by ran) pax ?~(cur 0 (min 5 +(p.u.cur))) tym)]
::
++ wait :: ensure poll by path
|= [ost=bone pax=path mof=(list move)]
=^ tym ran (dely pax)
:_ +>.$
?~ tym
:: ~& no-wait/ran
mof
:: ~& will-wait/u.tym
:- [ost %pass pax %t %wait u.tym]
mof
::
++ poke-twit-do :: recieve request
|= [ost=bone @ act=twit-do]
^+ [*(list move) +>]
?- -.q.act
%auth
:: ~& twit-auth/p.act
=. kes (~(put by kes) p.act p.q.act)
:_(+>.$ [ost %give %nice ~]~) :: XX verify key
%post
=: out (~(put by out) p.q.act %& p.act q.q.act)
ran (~(del by ran) /peer/home)
==
%^ wait ost /peer/home
:- [ost %give %nice ~]
=+ mez=(stat-upda:(auth p.act) [%status q.q.act]~ ~)
[ost %pass /post/(scot %uv p.q.act) %e %them ~ mez]~
==
::
++ pour :: recieve response
|= [ost=bone pax=path sig=sign]
^+ [*(list move) +>]
?- &2.sig
%wake
~& wake/[pax sig]
:_ +>.$
?. (~(has by ran) pax) :: ignore if retracted
~
?+ pax ~|([%wake-missed pax] !!)
[%peer *]
?~ (~(get ju pus) t.pax)
~
~& peer-again/[t.pax ran]
(pear | ost our t.pax)
==
%thou
?+ p.p.sig ~|([%unknown-code p.p.sig] !!)
429 :: Rate-limit
=. ran (~(put by ran) pax 6 lat)
=+ lim=%.(%x-rate-limit-reset ;~(biff ~(get by (mo q.p.sig)) poja ni:jo))
=+ tym=?~(lim (add ~m7.s30 lat) (add ~1970.1.1 (mul ~s1 u.lim)))
~& retrying-in/`@dr`(sub tym lat)
:_(+>.$ [ost %pass pax %t %wait tym]~)
200 :: OK
=+ jon=(need (poja q:(need r.p.sig)))
:: ~& twit-resp/%.(jon ?+(-.jon !! %o stat:twir, %a (ar:jo stat:twir)))
?+ pax ~|([%http-missed pax] !!)
[%post @ ~] :: post acknowledged
=+ ^= rep
~| [%bad-post jon]
(need %.(jon stat:twir))
=. out (~(put by out) (slav %uv i.t.pax) %| rep)
:_ +>.$
(weld (spam pax %rush %twit-stat rep) (spam pax %mean ~))
[%peer *] :: feed data
=+ ^= rep
~| [%bad-feed jon]
(need %.(jon (ar:jo stat:twir)))
:: ~& got-feed/[(scag 5 (turn rep |=(stat id))) fed]
=+ ren=(cull t.pax rep) :: new messages
?~ ren
(wait ost pax ~) :: pump polling
~& spam-feed/ren
=: ran (~(del by ran) pax) :: clear poll delay
fed (~(put by fed) t.pax rep) :: saw last message
==
(wait ost pax (spam t.pax %rush twit-feed/(flop ren)))
==
?(400 401 403 404) :: Err
=+ ^- git=gift
=+ err=%.(q:(need r.p.sig) ;~(biff poja mean:twir))
:^ %mean ~ %bad-http
[leaf/"HTTP Code {<p.p.sig>}" (turn (need err) mean:twip)]
?+ pax [[ost %give git]~ +>.$]
[%post @ ~]
[(spam pax git) +>.$]
== ==
==
::
++ peer :: accept subscription
|= [ost=bone ship path]
^+ [*(list move) +>]
:_(+> [[ost %give %nice ~] (pear & +<)])
::
++ pear :: poll, possibly returning current data
|= [ver=? ost=bone @ pax=path]
^- (list move)
?. ?=(twit-path pax)
~|([%missed-path pax] !!)
=> .(pax `twit-path`pax)
?: ?=(%post -.pax)
?. ver ~
=+ sta=(~(get by out) (slav %uv p.pax))
?. ?=([~ %| ^] sta) :: post not received
~
:- [ost %give %rush %twit-stat p.u.sta]
[ost %give %mean ~]~ :: subscription end
=+ ole=(~(get ja fed) pax)
:_ ?. ver ~
?~ ole ~
[ost %give %rush %twit-feed (flop ole)]~
=- [ost %pass [%peer pax] %e %them ~ `hiss`-]
=+ opt=?~(ole ~ ['since_id' (lutt:twit id.i.ole)]~)
=+ aut=any-auth
?- -.pax
%user (stat-user:aut [(to-sd p.pax)]~ opt)
:: %home (stat-home:auth ~ opt)
==
::
++ to-sd :: parse user name/numb
|= a=span ^- sd:twit
~| [%not-user a]
%+ rash a
;~(pose (stag %user-id dem) (stag %screen-name user:twir))
::
++ pull :: release subscription
|= ost=bone
?. (~(has by sup) ost) `+>.$ :: XX should not occur
=+ [his pax]=(~(got by sup) ost)
?: (lth 1 ~(wyt in (~(get ju pus) pax)))
`+>.$
=: ran (~(del by ran) [%peer pax])
fed (~(del by fed) pax)
==
`+>.$
::
++ spam :: send by path
|= [a=path b=gift] ^- (list move)
%+ murn (~(tap by sup))
|= [ost=bone @ pax=path]
^- (unit move)
?. =(pax a) ~
[~ [ost %give b]]
--

View File

@ -1,4 +0,0 @@
:- :- 'AP3G1t8ki6rPzeeAqdWCTw03F'
'VV784LPwZSaAxtF16RWWTnST4F85BHN8VqQKNyv7MprCkA0xZD'
:- '2821727326-RZGXSeTn7hCFQfJqR0ViivM3YYpu2O1M71gelBl'
'jW9VygFPOTsEK0WmrJDHYSoEnofOPdCE1oQRzueemVTl8'

View File

@ -1,34 +0,0 @@
:: Input twitter keys
/+ sh-utils
!:
|_ [hide vat=wain]
++ prompts
^- wain
:~ 'User: '
'App token: '
'App secret: '
'User token: '
'User secret: '
''
==
++ peek ,_prompt/[(snag (lent vat) prompts) %text '']
++ posh-txt
|= [@ * p=cord]
=. vat [p vat]
?. =(5 (lent vat)) `+>.$
%.(+< (add-exit ,_`+>.$))
::
++ part
=. vat (flop vat) :: put into order of entry
?. ?=([@ @ @ @ @ ~] vat)
~|([%keys-missing vat] !!)
=+ =< aut=[acc %auth [ctok csec] atok asec]
`[acc=span ctok=cord csec=cord atok=cord asec=cord ~]`vat
|= ost=bone
:_ ~
:^ ost %pass /out
[%g %mess serv our %twit-do !>(aut)]
::
++ poke--args (listen-in . (add-nice ,_`.))
++ serv [our /twit]
--

View File

@ -1,5 +0,0 @@
hoontap
AP3G1t8ki6rPzeeAqdWCTw03F
VV784LPwZSaAxtF16RWWTnST4F85BHN8VqQKNyv7MprCkA0xZD
2821727326-RZGXSeTn7hCFQfJqR0ViivM3YYpu2O1M71gelBl
jW9VygFPOTsEK0WmrJDHYSoEnofOPdCE1oQRzueemVTl8

View File

@ -1,22 +0,0 @@
:: Display twitter feed
::
:::: /hook/core/twitter-feed/app
::
/+ sh-utils
!:
::
:::: ~fyr
::
|_ [hide ~]
++ stat ,[id=@u who=@ta now=@da txt=@t]
++ rens
|=(stat rose/[": " `~]^~[leaf/"{<now>} @{(trip who)}" leaf/(trip txt)])
++ peer ,_`.
++ poke--args
|= [ost=bone his=ship who=span ~]
%.(+< (add-subs [[our /twit] our /user/[who]] ,_`+>.$))
::
++ posh-twit-feed
(args-into-gate . |=(a=(list stat) tang/(turn a rens)))
:: ++ pour |*([ost=@ * sih=[@ ^]] :_(+>.$ [ost %give +.sih]~))
--

View File

@ -1,19 +0,0 @@
:: Type, render tpyes of arguments
::
:::: /hook/core/type/app
::
/+ sh-utils
!:
::::
::
|_ [hide ~]
++ peer ,_`.
++ pock--args
%+ args-into-gate .
|= a=vase
:- %tang
|- ^- tang
=+ nex=(slew 3 a)
?~ nex ~
[(skol p:(slot 2 a)) $(a u.nex)]
--

View File

@ -1,16 +0,0 @@
:: Desk unsync
::
:::: /hook/core/unsync/app
::
/+ sh-utils
!:
::::
::
|_ [hid=hide ~]
++ peer ,_`.
++ poke--args
%+ gate-bang
|= [syd=@tas her=@p sud=@tas ~]
[%c %plug our.hid syd her sud]
(print . "unsynced")
--

View File

@ -1,12 +0,0 @@
:: Verb: toggle verbose mode
::
:::: /hook/core/verb/app
::
/+ sh-utils
!:
::::
::
|_ [hid=hide ~]
++ peer ,_`.
++ poke--args (add-resp [%give %verb ~] (args-done ,_`.))
--

View File

@ -1,13 +0,0 @@
:: Wipe path, retcon app existence
::
::::
::
/+ sh-utils
!:
::::
::
|_ [hide ~]
++ poke--args
%+ gate-bang |=([a=path ~] [%g %wipe our a])
(args-done ,_`.)
--

View File

@ -1,42 +0,0 @@
:: Ye broadcast
::
:::: /hook/gate/ye/bin
::
/+ sh-utils
::
::::
::
|%
++ sign ::
$% $: %a ::
$% [%went p=ship q=cape] ::
== == == ::
++ flog :: sent to %dill
$% [%crud p=@tas q=(list tank)] ::
[%text p=tape] ::
== ::
--
!:
::::
::
|_ [hid=hide ~]
++ peer ,_`.
++ poke--args
%+ gate-bang
|= [tex=tape ~]
=+ mez=(crip "{<our.hid>}: {tex}")
[%a %want [our.hid (sein our.hid)] /q/ye mez]
(add-nice ,_`.)
::
++ poke-txt
%+ gate-bang |=(cor=@t [%d %flog `flog`[%text "> {(trip cor)}"]])
(add-nice ,_`.)
::
++ pour
|= [ost=bone pax=path sih=sign]
?> ?=([%bang ~] pax)
%. +<
=+ ack=?+(q.sih "failed" %good "recieved")
(add-exit (print +>.$ "ye {ack}"))
::
--

View File

@ -104,23 +104,29 @@ code,
}
#c {
width: 24rem;
width: 32rem;
margin-left: -16rem;
position: absolute;
left: 50%;
margin-left: -12rem;
}
h1 {
font-size: 1.6rem;
font-weight: 500;
}
h1:after {
content: "\2014";
margin-left: 1rem;
}
#c pre {
font-size: .6rem;
}
#c.err {
width: 32rem;
margin-left: -16rem;
margin-top: 2rem;
}
#pass {
width: 24rem;
width: 32rem;
}
button {
@ -131,17 +137,32 @@ button {
font-weight: 500;
}
#ship,
input {
font-family: "scp";
.sig {
font-weight: 400;
font-size: 2rem;
display: inline;
border: none;
background-color: #f5f5f5;
padding: .3rem;
outline: none;
vertical-align: middle;
}
#ship:focus,
input:focus {
background-color: #eee;
span#ship {
font-family: 'bau';
font-weight: 400;
font-size: 1.2rem;
text-transform: uppercase;
letter-spacing: .1rem;
display: inline-block;
min-width: 1rem;
}
input {
font-family: 'scp';
display: inline;
}
span#ship,
input {
border: none;
padding: .3rem;
outline: none;
border-bottom: 3px solid #555;
}

815
base/lib/drum/core.hook Normal file
View File

@ -0,0 +1,815 @@
:: :: ::
:::: /hook/core/drum/lib :: ::
:: :: ::
/? 310 :: version
!: :: ::
:::: :: ::
:: :: ::
|% :: ::
++ drum-part ,[%drum %0 drum-pith] ::
++ drum-pith ::
$: eel=(set gill) :: connect to
ray=(set well) ::
fur=(map dude (unit server)) :: servers
bin=(map bone source) :: terminals
== ::
++ drum-start well :: start (local) server
:: :: ::
:::: :: ::
:: :: ::
++ server :: running server
$: syd=desk :: app identity
cas=case :: boot case
== ::
++ source :: input device
$: edg=_80 :: terminal columns
off=@ud :: window offset
kil=(unit (list ,@c)) :: kill buffer
maz=master :: master window
inx=@ud :: ring index
fug=(map gill (unit target)) :: connections
mir=(pair ,@ud (list ,@c)) :: mirrored terminal
== ::
++ master :: master buffer
$: liv=? :: master is live
tar=target :: master target
== ::
++ history :: past input
$: pos=@ud :: input position
num=@ud :: number of entries
lay=(map ,@ud (list ,@c)) :: editing overlay
old=(list (list ,@c)) :: entries proper
== ::
++ 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=sole-prompt :: static prompt
inp=sole-command :: input state
== ::
++ ukase :: master command
$% [%add p=(list gill)] :: attach to
[%del p=(list gill)] :: detach from
[%new p=(list well)] :: create
== ::
:: :: ::
:::: :: ::
:: :: ::
++ deft-apes :: default servers
|= our=ship
%- ~(gas in *(set well))
=+ myr=(clan our)
?: =(%pawn myr)
[[%base %dojo] ~]
?: =(%earl myr) ~
[[%home %dojo] [%home %talk] ~]
::
++ deft-fish :: default connects
|= our=ship
%- ~(gas in *(set gill))
^- (list gill)
=+ myr=(clan our)
?: =(%pawn myr)
[[our %dojo] ~]
?: =(%earl myr)
=+ dad=(sein our)
[[dad %dojo] [dad %talk] ~]
[[our %dojo] [our %talk] ~]
::
++ deft-mast :: default master
|= our=ship
^- master
:* %&
*(unit search)
*history
[%& %sole "{(scow %p our)}# "]
*sole-command
==
::
++ deft-pipe :: default source
|= our=ship ::
^- source ::
:* 80 :: edg
0 :: off
~ :: kil
(deft-mast our) :: maz
0 :: inx
~ :: fug
[0 ~] :: mir
==
::
++ deft-tart *target :: default target
++ drum-port :: initial part
|= our=ship
^- drum-part
:* %drum
%0
(deft-fish our) :: eel
(deft-apes our) :: ray
~ :: fur
~ :: bin
== ::
::
++ drum-path :: encode path
|= gyl=gill
[%drum (scot %p p.gyl) q.gyl ~]
::
++ drum-phat :: decode path
|= way=wire ^- gill
?>(?=([@ @ ~] way) [(slav %p i.way) i.t.way])
::
++ drum-work :: work in drum
|= [[hide from] drum-part]
=+ (fall (~(get by bin) ost) (deft-pipe our))
=> |% :: arvo structures
++ pear :: request
$% [%sole-action p=sole-action] ::
== ::
++ lime :: update
$% [%dill-blit dill-blit] ::
== ::
++ card :: general card
$% [%conf wire dock %load ship term] ::
[%diff lime] ::
[%peer wire dock path] ::
[%poke wire dock pear] ::
[%pull wire dock ~] ::
[%pass wire note] ::
== ::
++ move (pair bone card) :: user-level move
++ sp :: command parser
|% ++ sp-ukase
%+ knee *ukase |. ~+
;~ pose
(stag %add ;~(pfix lus sp-gills))
(stag %del ;~(pfix hep sp-gills))
(stag %new ;~(pfix tar sp-wells))
==
::
++ sp-gills
;~ pose
(most ;~(plug com ace) sp-gill)
%+ cook
|= a=ship
[[a %dojo] [a %talk] ~]
;~(pfix sig fed:ag)
==
::
++ sp-gill
;~ pose
(stag our sym)
;~ plug
;~(pfix sig fed:ag)
;~(pfix fas sym)
==
==
++ sp-well
;~ pose
(stag %home sym)
;~(plug sym ;~(pfix fas sym))
==
++ sp-wells (most ;~(plug com ace) sp-well)
--
--
|_ [moz=(list move) biz=(list dill-blit)]
++ diff-sole-effect ::
|= [way=wire fec=sole-effect] =< se-abet
=+ gyl=(drum-phat way)
?: (se-aint gyl) +>.$
(se-diff gyl fec)
::
++ peer ::
|= pax=path =< se-abet
^+ +>
?. ?| =(our src) :: ourself
&(=(%duke (clan our)) =(our (sein src))) :: or our own yacht
== ::
~| [%drum-unauthorized our/our src/src] :: very simplistic
!!
se-view:(se-text "[{<src>}, driving {<our>}]")
::
++ poke-dill-belt ::
|= bet=dill-belt
=< se-abet =< se-view
(se-belt bet)
::
++ poke-start ::
|= wel=well
=< se-abet =< se-view
(se-born wel)
::
++ reap ::
|= [way=wire saw=(unit tang)]
=< se-abet =< se-view
=+ gyl=(drum-phat way)
?~ saw
(se-join gyl)
(se-dump:(se-drop & gyl) u.saw)
::
++ take-coup ::
|= [way=wire saw=(unit tang)]
=< se-abet =< se-view
?~ saw +>
=+ gyl=(drum-phat way)
?: (se-aint gyl) +>.$
~& [%drum-coup-fail src ost gyl u.saw]
(se-dump:(se-drop & gyl) u.saw)
::
++ take-onto ::
|= [way=wire saw=(each suss tang)]
=< se-abet =< se-view
?> ?=([@ @ ~] way)
?> (~(has by fur) i.t.way)
=+ wel=`well`[i.way i.t.way]
?- -.saw
%| (se-dump p.saw)
%& ?> =(q.wel p.p.saw)
=. +>.$ (se-text "[{<p.saw>}]")
+>.$(fur (~(put by fur) q.wel `[p.wel %da r.p.saw]))
==
::
++ quit
|= way=wire
=< se-abet =< se-view
=+ gyl=(drum-phat way)
~& [%drum-quit src ost gyl]
(se-drop %| gyl)
:: :: ::
:::: :: ::
:: :: ::
++ se-abet :: resolve
^- (quip move *drum-part)
=. . se-adze:se-adit
:_ %_(+>+>+<+ bin (~(put by bin) ost `source`+>+<))
^- (list move)
%+ welp (flop moz)
^- (list move)
?~ biz ~
[ost %diff %dill-blit ?~(t.biz i.biz [%mor (flop biz)])]~
::
++ se-adit :: update servers
=+ yar=(~(tap by ray))
|- ^+ +>
?~ yar +>
=+ hig=(~(get by fur) q.i.yar)
?: &(?=(^ hig) |(?=(~ u.hig) =(p.i.yar syd.u.u.hig))) $(yar t.yar)
%= $
yar t.yar
+>
%- se-emit(fur (~(put by fur) q.i.yar ~))
[ost %conf [%drum p.i.yar q.i.yar ~] [our q.i.yar] %load our p.i.yar]
==
::
++ se-adze :: update connections
=+ lee=(~(tap by eel))
|- ^+ +>
?~ lee +>
?: (~(has by fug) i.lee) $(lee t.lee)
$(lee t.lee, +> (se-peer i.lee))
::
++ se-aint :: ignore result
|= gyl=gill
^- ?
?. (~(has by bin) ost) &
=+ gyr=(~(get by fug) gyl)
|(?=(~ gyr) ?=([~ ~] gyr))
::
++ se-alas :: recalculate index
|= gyl=gill
^+ +>
=+ [xin=0 wag=se-amor]
?: =(~ wag) +>.$(inx 0)
|- ^+ +>.^$
?~ wag +>.^$(inx 0)
?: =(i.wag gyl) +>.^$(inx xin)
$(wag t.wag, xin +(xin))
::
++ se-amor :: live targets
^- (list gill)
(skim (~(tap in eel)) |=(gill ?=([~ ~ *] (~(get by fug) +<))))
::
++ se-anon :: rotate index
=+ wag=se-amor
?~ wag +
:: ~& [%se-anon inx/inx wag/wag nex/(mod +(inx) (lent se-amor))]
+(inx (mod +(inx) (lent se-amor)))
::
++ se-agon :: current gill
^- (unit gill)
=+ wag=se-amor
?~ wag ~
`(snag inx se-amor)
::
++ se-belt :: handle input
|= bet=dill-belt
^+ +>
?: ?=(%rez -.bet)
+>(edg (dec p.bet))
?: ?=(%yow -.bet)
~& [%no-yow -.bet]
+>
=+ gul=se-agon
=+ tur=`(unit (unit target))`?~(gul ~ (~(get by fug) u.gul))
?: &(!liv.maz |(=(~ gul) =(~ tur) =([~ ~] tur))) (se-blit %bel ~)
=+ ^= taz
?: liv.maz
~(. ta [& %& `gill`(fall gul [our %none])] `target`tar.maz)
~(. ta [& %| (need gul)] `target`(need (need tur)))
=< ta-abet
?- -.bet
%aro (ta-aro:taz p.bet)
%bac ta-bac:taz
%cru (ta-cru:taz p.bet q.bet)
%ctl (ta-ctl:taz p.bet)
%del ta-del:taz
%met (ta-met:taz p.bet)
%ret ta-ret:taz
%txt (ta-txt:taz p.bet)
==
::
++ se-born :: new server
|= wel=well
^+ +>
?: (~(has in ray) wel)
(se-text "[already running {<p.wel>}/{<q.wel>}]")
+>(ray (~(put in ray) wel), eel (~(put in eel) [our q.wel]))
::
++ se-dump :: print tanks
|= tac=(list tank)
^+ +>
=+ wol=`wall`(zing (turn tac |=(a=tank (~(win re a) [0 edg]))))
|- ^+ +>.^$
?~ wol +>.^$
$(wol t.wol, +>.^$ (se-blit %out (tuba i.wol)))
::
++ se-drop :: disconnect
|= [pej=? gyl=gill]
^+ +>
=+ lag=se-agon
?. (~(has by fug) gyl) +>.$
=. fug (~(del by fug) gyl)
=. eel ?.(pej eel (~(del in eel) gyl))
=. +>.$ ?. &(?=(^ lag) !=(gyl u.lag))
+>.$(inx 0)
(se-alas u.lag)
=. +>.$ (se-text "[detached from {<gyl>}]")
se-prom(liv.maz ?~(fug & liv.maz))
::
++ se-joke :: prepare connection
|= gyl=gill
^+ +>
=+ lag=se-agon
?~ lag +>.$
?: =(~ fug) +>.$
(se-alas(fug (~(put by fug) gyl ~)) u.lag)
::
++ se-join :: confirm connection
|= gyl=gill
^+ +>
=. +> (se-text "[connected to {<gyl>}]")
?> =(~ (~(got by fug) gyl))
(se-alas:se-prom(liv.maz |, fug (~(put by fug) gyl `*target)) gyl)
::
++ se-nuke :: teardown
|= gyl=gill
^+ +>
(se-drop:(se-pull(liv.maz |) gyl) & gyl)
::
++ se-like :: act in master
|= kus=ukase
?- -.kus
%add
|- ^+ +>.^$
?~ p.kus +>.^$
$(p.kus t.p.kus, +>.^$ (se-link i.p.kus))
::
%del
|- ^+ +>.^$
?~ p.kus +>.^$
$(p.kus t.p.kus, +>.^$ (se-nuke i.p.kus))
::
%new
|- ^+ +>.^$
?~ p.kus +>.^$
$(p.kus t.p.kus, +>.^$ (se-born i.p.kus))
==
::
++ se-plot :: status line
^- tape
=+ lag=se-agon
=+ ^= pry
|= gill ^- tape
=+((trip q.+<) ?:(=(our p.+>-) - :(welp (scow %p p.+>-) "/" -)))
=+ ^= yey
|= gill ^- tape
=+((pry +<) ?:(=(lag `+>-) ['*' -] -))
=+ ^= yal ^- (list tape)
%+ weld
^- (list tape)
%+ turn (~(tap by fug))
|= [a=gill b=(unit target)]
=+ c=(yey a)
?~(b ['?' c] c)
^- (list tape)
%+ turn (skip (~(tap by fur)) |=([term *] (~(has by fug) [our +<-])))
|=([term *] ['-' (pry our +<-)])
|- ^- tape
?~ yal ~
?~ t.yal i.yal
:(welp i.yal ", " $(yal t.yal))
::
++ se-prom :: update drum prompt
^+ .
=+ mux=se-plot
%_ +
cad.pom.tar.maz
(welp (scow %p our) ?~(mux "# " :(welp ":" mux "# ")))
==
::
++ se-link :: connect to app
|= gyl=gill
+>(eel (~(put in eel) gyl))
::
++ se-blit :: give output
|= bil=dill-blit
+>(biz [bil biz])
::
++ se-show :: show buffer, raw
|= lin=(pair ,@ud (list ,@c))
^+ +>
?: =(mir lin) +>
=. +> ?:(=(q.mir q.lin) +> (se-blit %pro q.lin))
=. +> ?:(=(p.mir p.lin) +> (se-blit %hop p.lin))
+>(mir lin)
::
++ se-just :: adjusted buffer
|= lin=(pair ,@ud (list ,@c))
^+ +>
=. off ?:((lth p.lin edg) 0 (sub p.lin edg))
(se-show (sub p.lin off) (scag edg (slag off q.lin)))
::
++ se-view :: flush buffer
?: liv.maz
(se-just ~(ta-vew ta [& & ~zod %$] tar.maz))
=+ gul=se-agon
?~ gul se-view(liv.maz &)
=+ gyr=(~(get by fug) u.gul)
?~ gyr se-view(liv.maz &)
?~ u.gyr se-view(liv.maz &)
%- se-just
~(ta-vew ta [& | u.gul] u.u.gyr)
::
++ se-emit :: emit move
|= mov=move
%_(+> moz [mov moz])
::
++ se-text :: return text
|= txt=tape
(se-blit %out (tuba txt))
::
++ se-poke :: send a poke
|= [gyl=gill par=pear]
(se-emit ost %poke (drum-path gyl) gyl par)
::
++ se-peer :: send a peer
|= gyl=gill
(se-emit(fug (~(put by fug) gyl ~)) ost %peer (drum-path gyl) gyl /sole)
::
++ se-pull :: cancel subscription
|= gyl=gill
(se-emit ost %pull (drum-path gyl) gyl ~)
::
++ se-tame :: switch connection
|= gyl=gill
^+ ta
~(. ta [& %| gyl] (need (~(got by fug) gyl)))
::
++ se-diff :: receive results
|= [gyl=gill fec=sole-effect]
^+ +>
ta-abet:(ta-fec:(se-tame gyl) fec)
::
++ ta :: per target
|_ $: $: liv=? :: don't delete
mav=? :: showing master
gyl=gill :: target app
== ::
target :: target state
== ::
++ ta-abet :: resolve
^+ ..ta
=. liv.maz mav
?: mav
?. liv
(se-blit `dill-blit`[%qit ~])
se-prom:+>(tar.maz +<+)
?. liv
=. ..ta (se-nuke gyl)
..ta(liv.maz =(~ fug))
..ta(fug (~(put by fug) gyl ``target`+<+))
::
++ ta-ant :: toggle master
^+ .
?: mav
?: =(~ fug) ta-bel
%_ .
mav |
+<+ (need (~(got by fug) gyl))
tar.maz +<+
==
%_ .
mav &
+<+ tar.maz
fug (~(put by fug) gyl `+<+)
==
::
++ ta-act :: send action
|= act=sole-action
^+ +>
?: mav
+>.$
+>.$(+> (se-poke gyl %sole-action act))
::
++ ta-aro :: hear arrow
|= key=?(%d %l %r %u)
^+ +>
?- key
%d =. ris ~
?. =(num.hit pos.hit)
(ta-mov +(pos.hit))
?: =(0 (lent buf.say.inp))
ta-bel
(ta-hom:ta-nex %set ~)
%l ?^ ris ta-bel
?: =(0 pos.inp) ta-bel
+>(pos.inp (dec pos.inp))
%r ?^ ris ta-bel
?: =((lent buf.say.inp) pos.inp)
ta-bel
+>(pos.inp +(pos.inp))
%u =. ris ~
?:(=(0 pos.hit) ta-bel (ta-mov (dec pos.hit)))
==
::
++ ta-bel .(+> (se-blit %bel ~)) :: beep
++ ta-cat :: mass insert
|= [pos=@ud txt=(list ,@c)]
^- sole-edit
:- %mor
|- ^- (list sole-edit)
?~ txt ~
[[%ins pos i.txt] $(pos +(pos), txt t.txt)]
::
++ ta-cut :: mass delete
|= [pos=@ud num=@ud]
^- sole-edit
:- %mor
|-(?:(=(0 num) ~ [[%del pos] $(num (dec num))]))
::
++ ta-det :: send edit
|= ted=sole-edit
^+ +>
(ta-act %det [[his.ven.say.inp own.ven.say.inp] (sham buf.say.inp) ted])
::
++ ta-bac :: hear backspace
^+ .
?^ ris
?: =(~ str.u.ris)
ta-bel
.(str.u.ris (scag (dec (lent str.u.ris)) str.u.ris))
?: =(0 pos.inp)
.(+> (se-blit %bel ~))
=+ pre=(dec pos.inp)
(ta-hom(pos.inp pre) %del pre)
::
++ ta-ctl :: hear control
|= key=@ud
^+ +>
?+ key ta-bel
%a +>(pos.inp 0)
%b (ta-aro %l)
%c ta-bel(ris ~)
%d ?: &(=(0 pos.inp) =(0 (lent buf.say.inp)))
+>(liv |)
ta-del
%e +>(pos.inp (lent buf.say.inp))
%f (ta-aro %r)
%g ta-bel(ris ~)
%k =+ len=(lent buf.say.inp)
?: =(pos.inp len)
ta-bel
%- ta-hom(kil `(slag pos.inp buf.say.inp))
(ta-cut pos.inp (sub len pos.inp))
%l +>(+> (se-blit %clr ~))
%n (ta-aro %d)
%p (ta-aro %u)
%r ?~ ris
+>(ris `[pos.hit ~])
?: =(0 pos.u.ris)
ta-bel
(ta-ser ~)
%t =+ len=(lent buf.say.inp)
?: |(=(0 pos.inp) (lth len 2))
ta-bel
=+ sop=?:(=(len pos.inp) (dec pos.inp) pos.inp)
=. pos.inp +(sop)
%- ta-hom
:~ %mor
[%del sop]
[%ins (dec sop) (snag sop buf.say.inp)]
==
%u ?: =(0 pos.inp)
ta-bel
%- ta-hom(pos.inp 0, kil `(scag pos.inp buf.say.inp))
(ta-cut 0 pos.inp)
%v ta-ant
%x +>(+> se-anon)
%y ?~ kil ta-bel
%- ta-hom(pos.inp (add pos.inp (lent u.kil)))
(ta-cat pos.inp u.kil)
==
::
++ ta-cru :: hear crud
|= [lab=@tas tac=(list tank)]
=. +>+> (se-text (trip lab))
(ta-tan tac)
::
++ ta-del :: hear delete
^+ .
?: =((lent buf.say.inp) pos.inp)
.(+> (se-blit %bel ~))
(ta-hom %del pos.inp)
::
++ ta-erl :: hear local error
|= pos=@ud
ta-bel(pos.inp (min pos (lent buf.say.inp)))
::
++ ta-err :: hear remote error
|= pos=@ud
(ta-erl (~(transpose cs say.inp) pos))
::
++ ta-fec :: apply effect
|= fec=sole-effect
^+ +>
?- -.fec
%bel ta-bel
%blk +>
%clr +>(+> (se-blit fec))
%det (ta-got +.fec)
%err (ta-err +.fec)
%mor |- ^+ +>.^$
?~ p.fec +>.^$
$(p.fec t.p.fec, +>.^$ ^$(fec i.p.fec))
%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]~])
==
::
++ ta-dog :: change cursor
|= ted=sole-edit
%_ +>
pos.inp
=+ len=(lent buf.say.inp)
%+ min len
|- ^- @ud
?- -.ted
%del ?:((gth pos.inp p.ted) (dec pos.inp) pos.inp)
%ins ?:((lte pos.inp p.ted) +(pos.inp) pos.inp)
%mor |- ^- @ud
?~ p.ted pos.inp
$(p.ted t.p.ted, pos.inp ^$(ted i.p.ted))
%nop pos.inp
%set len
==
==
::
++ ta-got :: apply change
|= cal=sole-change
=^ ted say.inp (~(receive cs say.inp) cal)
(ta-dog ted)
::
++ ta-hom :: local edit
|= ted=sole-edit
^+ +>
=. +> (ta-det ted)
=. +> (ta-dog(say.inp (~(commit cs say.inp) ted)) ted)
+>
::
++ ta-met :: meta key
|= key=@ud
~& [%ta-met key]
+>
::
++ ta-mov :: move in history
|= sop=@ud
^+ +>
?: =(sop pos.hit) +>
%+ %= ta-hom
pos.hit sop
lay.hit %+ ~(put by lay.hit)
pos.hit
buf.say.inp
==
%set
%- (bond |.((snag (sub num.hit +(sop)) old.hit)))
(~(get by lay.hit) sop)
::
++ ta-nex :: advance history
%_ .
num.hit +(num.hit)
pos.hit +(num.hit)
ris ~
lay.hit ~
old.hit [buf.say.inp old.hit]
==
::
++ ta-pro :: set prompt
|= pom=sole-prompt
+>(pom pom(cad :(welp (scow %p p.gyl) ":" (trip q.gyl) cad.pom)))
::
++ ta-ret :: hear return
?. mav
(ta-act %ret ~)
=+ txt=(tufa buf.say.inp)
=+ fey=(rose txt sp-ukase:sp)
?- -.fey
%| (ta-erl (lent (tuba (scag p.fey txt))))
%& ?~ p.fey
(ta-erl (lent buf.say.inp))
=. +>+> (se-like u.p.fey)
=. pom pom.tar.maz
(ta-hom:ta-nex %set ~)
==
::
++ ta-ser :: reverse search
|= ext=(list ,@c)
^+ +>
?: |(?=(~ ris) =(0 pos.u.ris)) ta-bel
=+ tot=(weld str.u.ris ext)
=+ dol=(slag (sub num.hit pos.u.ris) old.hit)
=+ sop=pos.u.ris
=+ ^= ser
=+ ^= beg
|= [a=(list ,@c) b=(list ,@c)] ^- ?
?~(a & ?~(b | &(=(i.a i.b) $(a t.a, b t.b))))
|= [a=(list ,@c) b=(list ,@c)] ^- ?
?~(a & ?~(b | |((beg a b) $(b t.b))))
=+ ^= sup
|- ^- (unit ,@ud)
?~ dol ~
?: (ser tot i.dol)
`sop
$(sop (dec sop), dol t.dol)
?~ sup ta-bel
(ta-mov(str.u.ris tot, pos.u.ris (dec u.sup)) (dec u.sup))
::
++ ta-tan :: print tanks
|= tac=(list tank)
=+ wol=`wall`(zing (turn tac |=(a=tank (~(win re a) [0 edg]))))
|- ^+ +>.^$
?~ wol +>.^$
$(wol t.wol, +>+>.^$ (se-text i.wol))
::
++ ta-txt :: hear text
|= txt=(list ,@c)
^+ +>
?^ ris
(ta-ser txt)
%- ta-hom(pos.inp (add (lent txt) pos.inp))
:- %mor
|- ^- (list sole-edit)
?~ txt ~
[[%ins pos.inp i.txt] $(pos.inp +(pos.inp), txt t.txt)]
::
++ ta-vew :: computed prompt
|- ^- (pair ,@ud (list ,@c))
?^ ris
%= $
ris ~
cad.pom
:(welp "(reverse-i-search)'" (tufa str.u.ris) "': ")
==
=- [(add pos.inp (lent p.vew)) (weld (tuba p.vew) q.vew)]
^= vew ^- (pair tape (list ,@c))
?: vis.pom [cad.pom buf.say.inp]
:- ;: welp
cad.pom
?~ buf.say.inp ~
;: welp
"<"
(scow %p (end 4 1 (sham buf.say.inp)))
"> "
==
==
=+ len=(lent buf.say.inp)
|- ^- (list ,@c)
?:(=(0 len) ~ [`@c`'*' $(len (dec len))])
--
--
--

View File

@ -6,10 +6,9 @@
:::: :: ::
:: :: ::
|% :: ::
++ helm-part :: helm state
$: %helm :: doubletag
%0 :: state version
bur=(unit (pair ship mace)) :: requesting ticket
++ helm-part ,[%helm %0 helm-pith] :: helm state
++ helm-pith :: helm content
$: bur=(unit (pair ship mace)) :: requesting ticket
hoc=(map bone helm-session) :: consoles
== ::
++ helm-session ::
@ -78,6 +77,10 @@
|= him=ship =< abet
(emit %flog /helm %crud %hax-init leaf/(scow %p him) ~)
::
++ poke-mass
=< abet
(emit %flog /heft %crud %hax-heft ~)
::
++ poke-start :: start a server
|= hood-start =< abet
(emit %conf /helm [our dap] %load our syd)
@ -85,6 +88,7 @@
++ poke-reload :: reload vanes
|= all=(list term) =< abet
%- emil
%- flop
%+ turn all
=+ ark=(arch .^(%cy /(scot %p our)/base/(scot %da lat)/arvo))
=+ van=(~(tap by r.ark))
@ -131,7 +135,6 @@
?> ?=(^ wil)
=< abet
%- emil(bur ~)
~& [%poke-will wil]
:~ [%cash /helm p.u.bur q.u.bur u.wil]
[%plug /helm our %home (sein our) %kids]
==

View File

@ -2,17 +2,14 @@
:::: /hook/core/kiln/lib :: ::
:: :: ::
/? 310 :: version
/- *talk :: structures
/+ talk :: libraries
:: :: ::
:::: :: ::
:: :: ::
|% :: ::
++ kiln-part :: kiln state
$: %kiln :: doubletag
%0 :: state version
rem=(map desk kiln-desk) ::
== ::
++ kiln-part ,[%kiln %0 kiln-pith] :: kiln state
++ kiln-pith ::
$: rem=(map desk kiln-desk) ::
==
++ kiln-desk :: per-desk state
$: auto=? :: escalate on failure
gem=germ :: strategy
@ -60,16 +57,6 @@
$% [%talk-command command:talk] ::
[%hood-merge hood-merge] ::
== ::
++ suss ,[term @tas @da] :: config report
++ milk (trel ship desk silk) ::
++ silk ::
$& [p=silk q=silk] :: cons
$% [%diff p=silk q=silk] :: diff
[%done p=(set beam) q=gage] :: literal
[%file p=beam] :: from clay
[%mash p=mark q=milk r=milk] :: merge
[%tabl p=(list (pair silk silk))] :: list
== ::
++ tage :: %tabl gage
,[[%tabl p=(list (pair marc marc))] q=vase] ::
++ move (pair bone card) :: user-level move
@ -127,7 +114,7 @@
++ win . :: successful poke
++ lose
^+ .
~| %kiln-work-failed
~| %kiln-work-fail
!!
::
++ gage-to-tage ::

View File

@ -101,7 +101,9 @@
++ receive :: naturalize event
|= sole-change
^- [sole-edit sole-share]
?> &(=(his.ler his.ven) (lte own.ler own.ven))
?. &(=(his.ler his.ven) (lte own.ler own.ven))
~& [%receive-sync his/[his.ler his.ven] own/[own.ler own.ven]]
!!
?> &(=(his.ler his.ven) (lte own.ler own.ven))
?> |(!=(own.ler own.ven) =(0 haw) =(haw (sham buf)))
=. leg (scag (sub own.ven own.ler) leg)

View File

@ -52,6 +52,17 @@ window.urb.req = function(method,url,params,json,cb) {
xhr.send(JSON.stringify(_data))
}
// window.urb.getJSON = function(url,cb){ window.urb.reqJSON("GET",url, null, cb)}
// window.urb.reqJSON = function(method, url, data, cb){
// var xhr = new XMLHttpRequest()
// xhr.open(method, url)
// xhr.onload = function(){
// urb.fetchTag.call(xhr)
// if(cb) cb(JSON.parse(xhr.responseText))
// }
// xhr.send(data === null ? null : JSON.stringify(data))
// }
window.urb.reqq = []
window.urb.qreq = function(method,url,params,json,cb) {
walk = function() {

View File

@ -1,11 +0,0 @@
::
:::: /hoon/core/cat-args/mar
::
/? 314
|_ pax=(list path)
::
++ grab :: convert from
|%
++ noun (list path) :: clam from %noun
--
--

View File

@ -1,12 +0,0 @@
::
:::: /hoon/core/cp-args/mar
::
/? 314
/- cp-args
|_ arg=cp-args
::
++ grab :: convert from
|%
++ noun cp-args :: clam from %noun
--
--

View File

@ -1,12 +0,0 @@
::
:::: /hoon/core/zing/mar
::
/? 314
/- demo-args
|_ arg=demo-args
::
++ grab :: convert from
|%
++ noun demo-args :: clam from %noun
--
--

View File

@ -1,11 +0,0 @@
::
:::: /hoon/core/grep-args/mar
::
/? 314
|_ arg=[cord ~]
::
++ grab :: convert from
|%
++ noun ,[cord ~] :: clam from %noun
--
--

View File

@ -1,12 +0,0 @@
::
:::: /hoon/core/zing/pro
::
/? 314
/- hi-args
|_ arg=hi-args
::
++ grab :: convert from
|%
++ noun hi-args :: clam from %noun
--
--

View File

@ -1,12 +0,0 @@
::
:::: /hoon/core/into-args/mar
::
/? 314
/- into-args
|_ arg=into-args
::
++ grab :: convert from
|%
++ noun into-args :: clam from %noun
--
--

View File

@ -1,11 +0,0 @@
::
:::: /hoon/core/ls-args/mar
::
/? 314
|_ pax=[path ~]
::
++ grab :: convert from
|%
++ noun ,[path ~] :: clam from %noun
--
--

View File

@ -1,12 +0,0 @@
::
:::: /hoon/core/zing/pro
::
/? 314
/- mv-args
|_ arg=mv-args
::
++ grab :: convert from
|%
++ noun mv-args :: clam from %noun
--
--

View File

@ -1,12 +0,0 @@
::
:::: /hoon/core/zing/pro
::
/? 314
/- reload-args
|_ arg=reload-args
::
++ grab :: convert from
|%
++ noun reload-args :: clam from %noun
--
--

View File

@ -1,12 +0,0 @@
::
:::: /hoon/core/zing/pro
::
/? 314
/- rm-args
|_ arg=rm-args
::
++ grab :: convert from
|%
++ noun rm-args :: convert from %noun
--
--

View File

@ -1,12 +0,0 @@
::
:::: /hoon/core/solid-args/pro
::
/? 314
/- solid-args
|_ arg=solid-args
::
++ grab :: convert from
|%
++ noun solid-args :: clam from %noun
--
--

View File

@ -1,15 +0,0 @@
::
:::: /hoon/core/zing/pro
::
/? 314
/- sync-args
|_ arg=sync-args
::
++ grab :: convert from
|%
++ noun :: convert from %noun
|= src=*
^+ +>+
+>+(arg (sync-args src))
--
--

View File

@ -1,21 +0,0 @@
::
:::: /hook/door/term-in/mar
::
/? 314
/- term-in
!:
|_ term-in
::
++ grab :: convert from
|%
++ json
|= jon=^json
%- need
%. jon => jo
%^ ot
pax/(su ;~(pose (cold ~ (full fas)) (plus ;~(pfix fas urs:ab))))
act/(of line/so res/so cmd/so ~)
~
++ noun term-in :: clam from %noun
--
--

View File

@ -1,27 +0,0 @@
::
:::: /hook/door/term-line/mar
::
/? 314
/- term-line
|_ tel=term-line
::
++ grab :: convert from
|%
++ noun term-line :: clam from %noun
--
::
++ grow
|%
++ json
%- jobe
:~ [%prompt %s p.p.tel]
[%history %a (turn q.tel |=(a=cord [%s a]))]
:+ %lines %a
%- zing ^- (list (list ^json))
%+ turn (flop r.tel) |= a=?(tank [%stem p=@da q=tank r=tank])
?. ?=(%stem -.a)
(turn (wash 0^80 a) jape)
[(jobe prompt/(jape ~(ram re q.a)) task/(jape ~(ram re r.a)) ~)]~
==
--
--

View File

@ -1,15 +0,0 @@
::
:::: /hoon/core/zing/pro
::
/? 314
/- ticket-args
|_ arg=ticket-args
::
++ grab :: convert from
|%
++ noun :: convert from %noun
|= src=*
^+ +>+
+>+(arg (ticket-args src))
--
--

View File

@ -1,15 +0,0 @@
::
:::: /hoon/core/zing/pro
::
/? 314
/- unsync-args
|_ arg=unsync-args
::
++ grab :: convert from
|%
++ noun :: convert from %noun
|= src=*
^+ +>+
+>+(arg (unsync-args src))
--
--

View File

@ -1,15 +0,0 @@
::
:::: /hoon/core/zing/pro
::
/? 314
/- verb-args
|_ arg=verb-args
::
++ grab :: convert from
|%
++ noun :: convert from %noun
|= src=*
^+ +>+
+>+(arg (verb-args src))
--
--

View File

@ -1,12 +0,0 @@
::
:::: /hoon/core/zing/pro
::
/? 314
/- rm-args
|_ arg=rm-args
::
++ grab :: convert from
|%
++ noun rm-args :: convert from %noun
--
--

View File

@ -1,12 +0,0 @@
::
:::: /hoon/core/zing/mar
::
/? 314
/- zing
|_ zig=zing
::
++ grab
|%
++ noun zing :: clam from %noun
--
--

View File

@ -1,34 +0,0 @@
::
:::: /hoon/core/zong/mar
::
/? 314
/- zong
!:
|_ zog=zong
::
++ grab :: convert from
|%
++ noun zong :: clam from %noun
--
++ grow
|%
++ json
=. p.zog
(lsh 6 1 (rsh 6 1 p.zog)) :: round off subsecond
%- jobe
:~
[%time (jape <p.zog>)]
[%auth (jape <q.zog>)]
:- %mess
%+ joba -.r.zog
?- -.r.zog
%do
[%s p.r.zog]
%say
[%s p.r.zog]
%exp
[%a [%s p.r.zog] (turn (wash 0^80 q.r.zog) jape)]
==
==
--
--

View File

@ -1,72 +0,0 @@
::
:::: /hoon/core/zongs/mar
::
/? 314
/- zong
!:
|_ zos=(list zong)
::
++ grab :: convert from
|%
++ noun (list zong) :: clam from %noun
--
::
++ grow :: convert to
|%
++ hymn :: convert to %hymn
^- manx
;html
;head
;title: Zongs!
==
;body ;table
;* %+ turn (flop zos)
|= zog=zong
=. p.zog (lsh 6 1 (rsh 6 1 p.zog)) :: round off subsecond
;tr ;td: {<p.zog>}
;td: {<q.zog>}
;+ ?- -.r.zog
%do
;td: {(trip p.r.zog)}
%say
;td: & {(trip p.r.zog)}
%exp
;td
;code:"{(trip p.r.zog)}"
; \a0 {~(ram re q.r.zog)}
== ==
== ==
== ==
++ json
%- jobe
:~
:- %mensajes
:- %a
%+ turn
(flop zos)
|=
zog=zong
=. p.zog
(lsh 6 1 (rsh 6 1 p.zog)) :: round off subsecond
%- jobe
:~
[%time (jape <p.zog>)]
[%auth (jape <q.zog>)]
:- %mess
%+ joba -.r.zog
?- -.r.zog
%do
[%s p.r.zog]
%say
[%s p.r.zog]
%exp
[%a [%s p.r.zog] (turn (wash 0^80 q.r.zog) jape)]
==
==
==
++ html
(crip (poxo hymn))
++ mime
[/text/json (tact (pojo json))]
--
--

View File

@ -1,34 +0,0 @@
::
:::: /hoon/core/zung/mar
::
/? 314
/- zung
!:
|_ zig=zung
::
++ grab :: convert from
|%
++ noun zung :: clam from %noun
++ json
|= jon=^json
^- zung
%- need %. jon
=> jo
%- of :~
:- %mess
%- at :~
(su ;~(pfix fas (more fas sym)))
%- of :~
[%do so]
[%say so]
==
==
:- %init
%- at :~
(su fed:ag)
(su ;~(pfix fas (more fas sym)))
==
==
--
--

Some files were not shown because too many files have changed in this diff Show More