mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-16 19:22:22 +03:00
Merge branch 'staging'
Merge staging for 20160812-20160815 breach/launch
This commit is contained in:
commit
4ab5a2d411
296
app/gmail.hoon
Normal file
296
app/gmail.hoon
Normal file
@ -0,0 +1,296 @@
|
||||
:: Three ways we interactg with this app
|
||||
:: 1. .^(%gx /=gh=/endpoint)
|
||||
:: 2. [%peer [our %gh] /endpoint]
|
||||
:: 3. :gh &gh-poke %post /gists json-data
|
||||
|
||||
|
||||
:: This is a driver for the Github API v3.
|
||||
::
|
||||
:: You can interact with this in a few different ways:
|
||||
::
|
||||
:: - .^(%gx /=gh=/read{/endpoint}) or subscribe to
|
||||
:: /scry/x/read{/endpoint} for authenticated reads.
|
||||
::
|
||||
:: - subscribe to /scry/x/listen/{owner}/{repo}/{events...}
|
||||
:: for webhook-powered event notifications. For event list,
|
||||
:: see https://developer.github.com/webhooks/.
|
||||
::
|
||||
:: See the%github app for example usage.
|
||||
::
|
||||
/? 314
|
||||
/- rfc, gmail-label, gmail-message
|
||||
/+ http
|
||||
::::
|
||||
/= rfctext /: /%/rfc /txt/
|
||||
::
|
||||
// /%/split
|
||||
::/- gmail
|
||||
:: /ape/gh/split.hoon defines ++split, which splits a request
|
||||
:: at the end of the longest possible endpoint.
|
||||
::
|
||||
|
||||
=> |% :: => only used for indentation
|
||||
++ move (pair bone card)
|
||||
++ subscription-result
|
||||
$% {$arch arch}
|
||||
{$json json}
|
||||
{$null $~}
|
||||
{$inbox (list {message-id/@t thread-id/@t})}
|
||||
{$message from/@t subject/@t}
|
||||
==
|
||||
++ card
|
||||
$% {$diff subscription-result}
|
||||
{$hiss wire {$~ $~} $httr {$hiss hiss}}
|
||||
==
|
||||
++ easy-ot |*({key/@t parser/fist:jo} =+(jo (ot [key parser] ~)))
|
||||
++ sifo-google
|
||||
|= a/cord ^- cord
|
||||
=; fel (crip (scan (sifo a) fel))
|
||||
(star ;~(pose (cold '-' (just '+')) (cold '_' (just '/')) next))
|
||||
++ ofis-google
|
||||
|= a/cord ^- cord
|
||||
=; fel (ofis (crip (rash a fel)))
|
||||
(star ;~(pose (cold '+' (just '-')) (cold '/' (just '_')) next))
|
||||
--
|
||||
::
|
||||
|_ $: hid/bowl count/@
|
||||
web-hooks/(map @t {id/@t listeners/(set bone)})
|
||||
received-ids/(list @t)
|
||||
==
|
||||
|
||||
:: We can't actually give the response to pretty much anything
|
||||
:: without blocking, so we just block unconditionally.
|
||||
::
|
||||
++ prep ~& 'prep' _`. ::
|
||||
::
|
||||
++ peek
|
||||
|= {ren/@tas pax/path}
|
||||
^- (unit (unit (pair mark *)))
|
||||
~
|
||||
::
|
||||
++ peer-scry
|
||||
|= pax/path
|
||||
^- {(list move) _+>.$}
|
||||
?> ?=({care ^} pax) :: assert %u
|
||||
=> (help i.pax i.t.pax t.t.pax)
|
||||
=> scry
|
||||
%= make-move
|
||||
count +(count)
|
||||
==
|
||||
::
|
||||
++ poke-email
|
||||
|= {adr/@ta tyl/tape mez/wall} ^- (quip move +>)
|
||||
?> =(our.hid src.hid)
|
||||
%- poke-gmail-req :*
|
||||
%post
|
||||
/messages/send
|
||||
~['uploadType'^%simple]
|
||||
['urbit' 'urbit.org'] :: [(crip "urbit+{<our.hid>}") 'urbit.org']
|
||||
::
|
||||
=- (rash adr -)
|
||||
[;~((glue pat) . .)]:(cook crip (plus ;~(less pat next))) :: /[^@]+@[^@]+/
|
||||
::
|
||||
(crip tyl)
|
||||
(role (turn mez crip))
|
||||
==
|
||||
::
|
||||
++ poke-gmail-req
|
||||
|= $: method/meth endpoint/path quy/quay
|
||||
mes/message:rfc
|
||||
:: label-req:gmail-label
|
||||
==
|
||||
^- {(list move) _+>.$}
|
||||
?> ?=(valid-get-endpoint endpoint)
|
||||
?> =(our.hid src.hid)
|
||||
:_ +>.$ :_ ~
|
||||
^- move
|
||||
:* ost.hid %hiss /poke/[method] `~ %httr %hiss
|
||||
^- purl
|
||||
:+ [& ~ [%& /com/googleapis/www]]
|
||||
[~ gmail+v1+users+me+`valid-get-endpoint`endpoint]
|
||||
`quay`[[%alt %json] ~]
|
||||
::
|
||||
:+ method `math`(malt ~[content-type+['application/json']~])
|
||||
=+ hoon-json-object=(joba %raw s+(sifo-google (message-to-rfc822:rfc mes)))
|
||||
=+ request-body=(tact (pojo hoon-json-object))
|
||||
(some request-body)
|
||||
::(some (pojo label-req-to-json:gmail-label label-req:gmail-label ~)) XX
|
||||
==
|
||||
::
|
||||
:: HTTP response. We make sure the response is good, then
|
||||
:: produce the result (as JSON) to whoever sent the request.
|
||||
::
|
||||
|
||||
++ sigh-httr
|
||||
|= {wir/wire res/httr}
|
||||
^- {(list move) _+>.$}
|
||||
:: ~& wir+wir
|
||||
?. ?=({care @ @ @ *} wir)
|
||||
:: pokes don't return anything
|
||||
~& sigh-poke+p.res
|
||||
[~ +>.$]
|
||||
=+ arg=(path (cue (slav %uv i.t.t.wir)))
|
||||
:: ~& ittwir+i.t.t.wir
|
||||
:_ +>.$ :_ ~
|
||||
:+ ost.hid %diff
|
||||
?+ i.wir null+~
|
||||
$x
|
||||
?~ r.res
|
||||
json+(jobe err+s+%empty-response code+(jone p.res) ~)
|
||||
=+ jon=(rush q.u.r.res apex:poja)
|
||||
?~ jon
|
||||
json+(jobe err+s+%bad-json code+(jone p.res) body+s+q.u.r.res ~)
|
||||
?. =(2 (div p.res 100))
|
||||
json+(jobe err+s+%request-rejected code+(jone p.res) msg+u.jon ~)
|
||||
::
|
||||
:: Once we know we have good data, we drill into the JSON
|
||||
:: to find the specific piece of data referred to by 'arg'
|
||||
::
|
||||
|- ^- subscription-result
|
||||
?~ arg
|
||||
=+ switch=t.t.t.t.wir
|
||||
?+ switch [%json `json`u.jon]
|
||||
{$messages $~}
|
||||
=+ new-mezes=((ot messages+(ar (ot id+so 'threadId'^so ~)) ~):jo u.jon)
|
||||
::%+ turn new-mezes
|
||||
::|= id
|
||||
::?< ?=($~ new-mezes)
|
||||
::=. received-ids [new-mezes received-ids]
|
||||
::~& received-ids
|
||||
::=. received
|
||||
[%inbox (need new-mezes)]
|
||||
::
|
||||
{$messages @t $~}
|
||||
::
|
||||
:: =+ body-parser==+(jo (ot body+(ot data+(cu ofis-google so) ~) ~)) :: (ok /body/data so):jo
|
||||
:: ~& %.(u.jon (om (om |=(a/json (some -.a))):jo))
|
||||
:: ~& %.(u.jon (ot headers+(cu milt (ar (ot name+so value+so ~))) ~))
|
||||
=+ ^- $: headers/{from/@t subject/@t}
|
||||
::body-text/wain
|
||||
==
|
||||
~| u.jon
|
||||
=- (need (reparse u.jon))
|
||||
^= reparse
|
||||
=+ jo
|
||||
=+ ^= from-and-subject
|
||||
|= a/(map @t @t) ^- {@t @t}
|
||||
[(~(got by a) 'From') (~(got by a) 'Subject')]
|
||||
=+ ^= text-body
|
||||
|= a/(list {@t @t}) ^- wain
|
||||
%- lore
|
||||
%- ofis-google
|
||||
(~(got by (~(gas by *(map @t @t)) a)) 'text/plain')
|
||||
%+ easy-ot %payload
|
||||
%- ot :~
|
||||
headers+(cu from-and-subject (cu ~(gas by *(map @t @t)) (ar (ot name+so value+so ~))))
|
||||
:: parts+(cu text-body (ar (ot 'mimeType'^so body+(ot data+so ~) ~)))
|
||||
==
|
||||
:: =+ parsed-headers==+(jo ((ot payload+(easy-ot 'headers' (ar some)) ~) u.jon)) ::
|
||||
:: =+ parsed-message==+(jo ((ot payload+(easy-ot 'parts' (ar body-parser)) ~) u.jon)) ::
|
||||
::~& [headers body-text]
|
||||
::=+ body==+(jo ((ot body+(easy-ot 'body' (easy-ot 'data' so))) parsed-message))
|
||||
[%message headers]
|
||||
==
|
||||
|
||||
=+ dir=((om:jo some) u.jon)
|
||||
?~ dir json+(jobe err+s+%no-children ~)
|
||||
=+ new-jon=(~(get by u.dir) i.arg)
|
||||
`subscription-result`$(arg t.arg, u.jon ?~(new-jon ~ u.new-jon))
|
||||
:: redo with next argument
|
||||
::
|
||||
$y
|
||||
?~ r.res
|
||||
~& [err+s+%empty-response code+(jone p.res)]
|
||||
arch+*arch
|
||||
=+ jon=(rush q.u.r.res apex:poja)
|
||||
?~ jon
|
||||
~& [err+s+%bad-json code+(jone p.res) body+s+q.u.r.res]
|
||||
arch+*arch
|
||||
?. =(2 (div p.res 100))
|
||||
~& [err+s+%request-rejected code+(jone p.res) msg+u.jon]
|
||||
arch+*arch
|
||||
::
|
||||
:: Once we know we have good data, we drill into the JSON
|
||||
:: to find the specific piece of data referred to by 'arg'
|
||||
::
|
||||
|- ^- subscription-result
|
||||
=+ dir=((om:jo some) u.jon)
|
||||
?~ dir
|
||||
[%arch `(shax (jam u.jon)) ~]
|
||||
?~ arg
|
||||
[%arch `(shax (jam u.jon)) (~(run by u.dir) $~)]
|
||||
=+ new-jon=(~(get by u.dir) i.arg)
|
||||
$(arg t.arg, u.jon ?~(new-jon ~ u.new-jon))
|
||||
==
|
||||
::
|
||||
++ sigh-tang |=({a/wire b/tang} (mean >gmail+a< b))
|
||||
++ sigh
|
||||
|= a/*
|
||||
~& a+a
|
||||
:_ +>.$ ~
|
||||
::
|
||||
++ help
|
||||
|= {ren/care style/@tas pax/path}
|
||||
=^ query pax
|
||||
=+ xap=(flop pax)
|
||||
?~ xap [~ ~]
|
||||
=+ query=(rush i.xap ;~(pfix wut yquy:urlp))
|
||||
?~ query [~ pax]
|
||||
[u.query (flop t.xap)]
|
||||
=^ arg pax ~|(pax [+ -]:(split pax))
|
||||
~| [pax=pax arg=arg query=query]
|
||||
=| mow/(list move)
|
||||
|%
|
||||
:: Resolve core
|
||||
::
|
||||
++ make-move
|
||||
^- {(list move) _+>.$}
|
||||
[(flop mow) +>.$]
|
||||
::
|
||||
++ endpoint-to-purl
|
||||
|= endpoint/path
|
||||
^- purl
|
||||
%+ scan
|
||||
"https://www.googleapis.com/gmail/v1/users/me{<`path`endpoint>}"
|
||||
auri:epur
|
||||
:: Send an HTTP req
|
||||
++ send-http
|
||||
|= hiz/hiss
|
||||
^+ +>
|
||||
=+ wir=`wire`[ren (scot %ud count) (scot %uv (jam arg)) style pax]
|
||||
=+ new-move=[ost.hid %hiss wir `~ %httr [%hiss hiz]]
|
||||
+>.$(mow [new-move mow])
|
||||
::
|
||||
++ scry
|
||||
^+ .
|
||||
?+ style ~|(%invalid-style !!)
|
||||
$read read
|
||||
:: $listen listen
|
||||
==
|
||||
:: Standard GET request
|
||||
++ read (send-http (endpoint-to-purl pax) %get ~ ~)
|
||||
|
||||
:: Subscription request
|
||||
:: ++ listen
|
||||
:: ^+ .
|
||||
:: =+ events=?>(?=([@ @ *] pax) t.t.pax)
|
||||
:: |- ^+ +>.$
|
||||
:: ?~ events
|
||||
:: +>.$
|
||||
:: ?: (~(has by web-hooks) i.events) :: if hook exists
|
||||
:: =. +>.$ (update-hook i.events)
|
||||
:: $(events t.events)
|
||||
:: =. +>.$ (create-hook i.events)
|
||||
:: $(events t.events)
|
||||
::
|
||||
--
|
||||
--
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
6
app/gmail/rfc.txt
Normal file
6
app/gmail/rfc.txt
Normal file
@ -0,0 +1,6 @@
|
||||
From: urbit-test@gmail.com
|
||||
To: jhenry.ault@gmail.com
|
||||
Subject: As basic as it gets
|
||||
|
||||
This is the plain text body of the message. Note the blank line
|
||||
between the header information and the body of the message.
|
71
app/gmail/split.hoon
Normal file
71
app/gmail/split.hoon
Normal file
@ -0,0 +1,71 @@
|
||||
!:
|
||||
|%
|
||||
:: Splits a path into the endpoint prefix and the remainder,
|
||||
:: which is assumed to be a path within the JSON object. We
|
||||
:: choose the longest legal endpoint prefix.
|
||||
::
|
||||
++ split
|
||||
|= pax/path
|
||||
:: =- ~& [%pax pax - (valid-endpoint pax)] -
|
||||
=+ l=(lent pax)
|
||||
|- ^- {path path}
|
||||
?: ?=(valid-get-endpoint (scag l pax))
|
||||
[(scag l pax) (slag l pax)]
|
||||
?~ l
|
||||
~& %bad-endpoint
|
||||
~|(%bad-endpoint !!)
|
||||
$(l (dec l))
|
||||
::
|
||||
:: These are all the github GET endpoints, sorted with
|
||||
:: `env LC_ALL=C sort`
|
||||
::
|
||||
:: end-points include required query parameters
|
||||
++ valid-get-endpoint
|
||||
$? {$drafts id/@t $~}
|
||||
{$drafts $~}
|
||||
{$history $~}
|
||||
{$labels id/@t $~}
|
||||
{$labels $~}
|
||||
{$messages id/@t $attachments id/@t $~}
|
||||
{$messages id/@t $~}
|
||||
{$messages $~}
|
||||
{$profile $~}
|
||||
{$threads id/@t $~}
|
||||
{$threads $~}
|
||||
==
|
||||
|
||||
++ vaild-post-endpoint
|
||||
$? {$drafts $send $~}
|
||||
{$drafts $~}
|
||||
{$messages id/@t $modify $~}
|
||||
{$messages id/@t $trash $~}
|
||||
{$messages id/@t $untrash $~}
|
||||
{$messages $import $~}
|
||||
{$messages $send $~}
|
||||
{$messages $~}
|
||||
{$labels $~}
|
||||
{$threads id/@t $trash $~}
|
||||
{$threads id/@t $untrash $~}
|
||||
{$threads id/@t $modify}
|
||||
{$stop $~}
|
||||
{$watch $~}
|
||||
==
|
||||
|
||||
++ valid-delete-endpoint
|
||||
$? {$drafts id/@t $~}
|
||||
{$labels id/@t $~}
|
||||
{$messages id/@t $~}
|
||||
{$thread id/@t $~}
|
||||
==
|
||||
++ valid-put-endpoint
|
||||
$? {$drafts id/@t $~}
|
||||
{$labels id/@t $~}
|
||||
==
|
||||
++ valid-patch-endpoint
|
||||
$? {$labels id/@t $~}
|
||||
==
|
||||
|
||||
--
|
||||
|
||||
::
|
||||
|
@ -2,14 +2,16 @@
|
||||
:::: /hoon/hood/app :: ::
|
||||
:: :: ::
|
||||
/? 310 :: zuse version
|
||||
/+ sole, talk, helm, kiln, drum, write :: libraries
|
||||
[. helm kiln drum]
|
||||
/+ sole, talk, helm, kiln, drum, write, womb :: libraries
|
||||
[. helm kiln drum]
|
||||
:: :: ::
|
||||
:::: :: ::
|
||||
!: :: ::
|
||||
=> |% :: module boilerplate
|
||||
++ hood-0 ::
|
||||
{$0 lac/(map @tas hood-part)} ::
|
||||
++ hood-old ::
|
||||
{?($0 $1) lac/(map @tas hood-part-old)} ::
|
||||
++ hood-1 ::
|
||||
{$1 lac/(map @tas hood-part)} ::
|
||||
++ hood-good ::
|
||||
|* hed/hood-head ::
|
||||
|= paw/hood-part ::
|
||||
@ -17,6 +19,7 @@
|
||||
$drum ?>(?=($drum -.paw) `drum-part`paw) ::
|
||||
$helm ?>(?=($helm -.paw) `helm-part`paw) ::
|
||||
$kiln ?>(?=($kiln -.paw) `kiln-part`paw) ::
|
||||
$womb ?>(?=($womb -.paw) `part:womb`paw) ::
|
||||
$write ?>(?=($write -.paw) `part:write`paw) ::
|
||||
== ::
|
||||
++ hood-head _-:*hood-part ::
|
||||
@ -26,22 +29,21 @@
|
||||
$drum (drum-make our) ::
|
||||
$helm *helm-part ::
|
||||
$kiln *kiln-part ::
|
||||
$womb *part:womb ::
|
||||
$write *part:write ::
|
||||
== ::
|
||||
++ hood-part-old ::
|
||||
$? hood-part ::
|
||||
{$drum $0 drum-pith-0} ::
|
||||
== ::
|
||||
++ hood-part-old ?(hood-part) :: drum-part-old ::
|
||||
++ hood-port ::
|
||||
|= paw/hood-part-old ^- hood-part ::
|
||||
?+ -.paw paw ::
|
||||
$drum (drum-port paw) ::
|
||||
$drum (drum-port paw) ::
|
||||
== ::
|
||||
:: ::
|
||||
++ hood-part ::
|
||||
$% {$drum $1 drum-pith} ::
|
||||
$% {$drum $1 drum-pith-1} ::
|
||||
{$helm $0 helm-pith} ::
|
||||
{$kiln $0 kiln-pith} ::
|
||||
{$womb $1 pith:womb} ::
|
||||
{$write $0 pith:write} ::
|
||||
== ::
|
||||
-- ::
|
||||
@ -49,7 +51,7 @@
|
||||
:::: :: ::
|
||||
:: :: ::
|
||||
|_ $: hid/bowl :: system state
|
||||
hood-0 :: server state
|
||||
hood-1 :: server state
|
||||
== ::
|
||||
++ able :: find+make part
|
||||
|* hed/hood-head
|
||||
@ -63,8 +65,8 @@
|
||||
:: :: ::
|
||||
:::: :: ::
|
||||
:: :: ::
|
||||
++ prep ::
|
||||
|= old/(unit hood-0) ^- (quip _!! +>)
|
||||
++ prep
|
||||
|= old/(unit hood-old) ^- (quip _!! +>) ::
|
||||
:- ~
|
||||
?~ old +>
|
||||
+>(lac (~(run by lac.u.old) hood-port))
|
||||
@ -85,6 +87,12 @@
|
||||
~? ?=(^ saw) [%kiln-overload-lame u.saw]
|
||||
[~ +>]
|
||||
::
|
||||
++ poke-hood-load
|
||||
|= dat/hood-part
|
||||
?> =(our src)
|
||||
~& loaded+-.dat
|
||||
[~ %_(+> lac (~(put by lac) -.dat dat))]
|
||||
::
|
||||
++ coup-drum-phat (wrap take-coup-phat):from-drum
|
||||
++ coup-helm-hi (wrap coup-hi):from-helm
|
||||
++ diff-sole-effect-drum-phat (wrap diff-sole-effect-phat):from-drum
|
||||
@ -100,6 +108,7 @@
|
||||
++ from-drum (from-lib %drum [..$ _se-abet]:(drum))
|
||||
++ from-helm (from-lib %helm [..$ _abet]:(helm))
|
||||
++ from-kiln (from-lib %kiln [..$ _abet]:(kiln))
|
||||
++ from-womb (from-lib %womb [..$ _abet]:(womb))
|
||||
++ from-write (from-lib %write [..$ _abet]:(write))
|
||||
::
|
||||
++ init-helm |=({way/wire *} [~ +>])
|
||||
@ -111,14 +120,17 @@
|
||||
++ note-helm (wrap take-note):from-helm
|
||||
++ onto-drum (wrap take-onto):from-drum
|
||||
++ peer-drum (wrap peer):from-drum
|
||||
++ peek-x-womb peek-x:(womb hid (able %womb))
|
||||
++ peer-scry-x-womb (wrap peer-scry-x):from-womb
|
||||
++ poke-dill-belt (wrap poke-dill-belt):from-drum
|
||||
++ poke-drum-put (wrap poke-put):from-drum
|
||||
++ poke-drum-link (wrap poke-link):from-drum
|
||||
++ poke-drum-unlink (wrap poke-unlink):from-drum
|
||||
:: ++ poke-drum-exit (wrap poke-exit):from-drum
|
||||
++ poke-drum-exit (wrap poke-exit):from-drum
|
||||
++ poke-drum-start (wrap poke-start):from-drum
|
||||
++ poke-helm-hi (wrap poke-hi):from-helm
|
||||
++ poke-helm-init (wrap poke-init):from-helm :: XX used?
|
||||
++ poke-helm-invite (wrap poke-invite):from-helm
|
||||
::++ poke-helm-invite (wrap poke-invite):from-helm
|
||||
++ poke-helm-mass (wrap poke-mass):from-helm
|
||||
++ poke-helm-reload (wrap poke-reload):from-helm
|
||||
++ poke-helm-reload-desk (wrap poke-reload-desk):from-helm
|
||||
@ -146,6 +158,22 @@
|
||||
++ poke-kiln-overload (wrap poke-overload):from-kiln
|
||||
++ poke-kiln-unmount (wrap poke-unmount):from-kiln
|
||||
++ poke-kiln-unsync (wrap poke-unsync):from-kiln
|
||||
++ poke-womb-invite (wrap poke-invite):from-womb
|
||||
++ poke-womb-save (wrap poke-save):from-womb
|
||||
++ poke-womb-obey (wrap poke-obey):from-womb
|
||||
++ poke-womb-bonus (wrap poke-bonus):from-womb
|
||||
++ poke-womb-claim (wrap poke-claim):from-womb
|
||||
++ poke-womb-do-ticket (wrap poke-do-ticket):from-womb
|
||||
++ poke-womb-do-claim (wrap poke-do-claim):from-womb
|
||||
++ poke-womb-rekey (wrap poke-rekey):from-womb
|
||||
++ poke-womb-report (wrap poke-report):from-womb
|
||||
++ poke-womb-manage (wrap poke-manage):from-womb
|
||||
++ poke-womb-recycle (wrap poke-recycle):from-womb
|
||||
++ poke-womb-manage-old-key (wrap poke-manage-old-key):from-womb
|
||||
++ poke-womb-release (wrap poke-release):from-womb
|
||||
++ poke-womb-release-ships (wrap poke-release-ships):from-womb
|
||||
++ poke-womb-reinvite (wrap poke-reinvite):from-womb
|
||||
++ poke-womb-replay-log (wrap poke-replay-log):from-womb
|
||||
++ poke-write-sec-atom (wrap poke-sec-atom):from-write
|
||||
++ poke-write-paste (wrap poke-paste):from-write
|
||||
++ poke-write-comment (wrap poke-comment):from-write
|
||||
|
100
arvo/ames.hoon
100
arvo/ames.hoon
@ -63,7 +63,7 @@
|
||||
|= {new/deed old/deed}
|
||||
^- $&
|
||||
?> (melt new old)
|
||||
?> =((shaf %meld (sham q.new)) (need (sure:as:(haul r.q.old) *code p.new)))
|
||||
?> =((shaf %meld (sham q.new)) (need (sure:as:(com:nu:crub r.q.old) *code p.new)))
|
||||
%&
|
||||
::
|
||||
++ melt :: proper connect
|
||||
@ -99,7 +99,7 @@
|
||||
|= wed/deed
|
||||
^- $&
|
||||
?> =+ rac=(clan r.p.q.wed)
|
||||
=+ loy=(haul r.q.wed)
|
||||
=+ loy=(com:nu:crub r.q.wed)
|
||||
?: &(r.wed =(rac %czar)) %&
|
||||
?> =(0 p.p.q.wed)
|
||||
?> =(fig:ex:loy ?+(rac !! $czar (zeno r.p.q.wed), $pawn r.p.q.wed))
|
||||
@ -114,7 +114,7 @@
|
||||
?> ?& ?=(^ law)
|
||||
(lth p.p.q.i.law 9) :: 9-lives rule
|
||||
=(p.p.q.i.law p.i.mac)
|
||||
=(r.q.i.law pub:ex:(weur q.i.mac))
|
||||
=(r.q.i.law pub:ex:(nol:nu:crub q.i.mac))
|
||||
==
|
||||
$(mac t.mac, law t.law)
|
||||
==
|
||||
@ -142,12 +142,12 @@
|
||||
^- @uvH ^- @
|
||||
%+ snag zar
|
||||
^- (list @uw)
|
||||
:~ 0wN.Kdp5k.p5ncD.4Wsih.bFQFu :: 0, ~zod, urbit.org
|
||||
:~ 0wN.ymbEn.wyNdE.RFNRb.SnEQH :: 0, ~zod, urbit.org
|
||||
0w0 :: 1, ~nec, Curtis Yarvin
|
||||
0w0 :: 2, ~bud, Tlon Investor 1
|
||||
0w0 :: 3, ~wes, Tlon Investor 2
|
||||
0w0 :: 4, ~sev, Tlon Investor 2
|
||||
0wt.cKYxs.Yb5VZ.boSwm.l0yYc :: 5, ~per, Tlon Investor 3
|
||||
0wt.cKYxs.Yb5VZ.boSwm.l0yYc :: 5, ~per, Tlon Investor 3 (oldkey)
|
||||
0w0 :: 6, ~sut, Tlon Investor 4
|
||||
0w0 :: 7, ~let, Tlon Investor 4
|
||||
0w0 :: 8, ~ful, Tlon Investor 4
|
||||
@ -156,8 +156,8 @@
|
||||
0w0 :: 11, ~dur, Tlon Investor 4
|
||||
0w0 :: 12, ~wep, Sam Putman
|
||||
0w0 :: 13, ~ser, Tlon Investor 5
|
||||
0w3j.H0sty.jHa3F.JlD26.4LPwV :: 14, ~wyl, Zimran Ahmed
|
||||
0w3F.QdvV-.toAsR.hvUNk.fHjW6 :: 15, ~sun, Colin Smith
|
||||
0w3j.H0sty.jHa3F.JlD26.4LPwV :: 14, ~wyl, Zimran Ahmed (oldkey)
|
||||
0w3F.QdvV-.toAsR.hvUNk.fHjW6 :: 15, ~sun, Colin Smith (oldkey)
|
||||
0w0 :: 16, ~ryp, Tlon Investor 6
|
||||
0w0 :: 17, ~syx, Tlon Investor 6
|
||||
0w0 :: 18, ~dyr, Tlon Investor 6
|
||||
@ -173,16 +173,16 @@
|
||||
0w0 :: 28, ~ryt, Tlon Investor 8
|
||||
0w0 :: 29, ~tyv, Tlon Investor 8
|
||||
0w0 :: 30, ~syd, Jennifer Kollmer
|
||||
0wp.BgRGJ.kslnv.PLAqb.TRKbr :: 31, ~nex, Prakhar Goel
|
||||
0wp.BgRGJ.kslnv.PLAqb.TRKbr :: 31, ~nex, Prakhar Goel (oldkey)
|
||||
0w0 :: 32, ~lun, Tlon Investor 9
|
||||
0w0 :: 33, ~mep, Tlon Investor 9
|
||||
0w0 :: 34, ~lut, Tlon Investor 9
|
||||
0w0 :: 35, ~sep, Tlon Investor 9
|
||||
0w0 :: 36, ~pes, Jennifer Kollmer
|
||||
0w2J.WSHlR.t5VHN.X8GKE.DB-yz :: 37, ~del, Kingdon Barrett
|
||||
0w1w.KF-J1.5I63F.khFyv.h0n4J :: 38, ~sul, John Burnham
|
||||
0w3x.XaJbE.xaOn3.zXbaG.5xUiY :: 39, ~ped, Jeremy Wall
|
||||
0w2.Mr2Id.SX8xI.MAs-j.5Y-1W :: 40, ~tem, Tlon Investor 10
|
||||
0w2J.WSHlR.t5VHN.X8GKE.DB-yz :: 37, ~del, Kingdon Barrett (oldkey)
|
||||
0w1w.KF-J1.5I63F.khFyv.h0n4J :: 38, ~sul, John Burnham (oldkey)
|
||||
0w3x.XaJbE.xaOn3.zXbaG.5xUiY :: 39, ~ped, Jeremy Wall (oldkey)
|
||||
0w2.Mr2Id.SX8xI.MAs-j.5Y-1W :: 40, ~tem, Tlon Investor 10 (oldkey)
|
||||
0w0 :: 41, ~led, Nick Caruso
|
||||
0w0 :: 42, ~tul, Susan Yarvin
|
||||
0w0 :: 43, ~met, Susan Yarvin
|
||||
@ -190,12 +190,12 @@
|
||||
0w0 :: 45, ~byn, Susan Yarvin
|
||||
0w0 :: 46, ~hex, James Torre
|
||||
0w0 :: 47, ~feb, urbit.org
|
||||
0wK.GoKEY.rMjfn.ZcvFQ.n4BmX :: 48, ~pyl, Michael Hartl
|
||||
0wK.GoKEY.rMjfn.ZcvFQ.n4BmX :: 48, ~pyl, Michael Hartl (oldkey)
|
||||
0w0 :: 49, ~dul, Jennifer Kollmer
|
||||
0w0 :: 50, ~het, Jennifer Kollmer
|
||||
0w0 :: 51, ~mev, Herbert Yarvin
|
||||
0w0 :: 52, ~rut, Herbert Yarvin
|
||||
0w2L.M6-o5.DDTFL.R4sFL.7Zuay :: 53, ~tyl, Tlon Investor 11
|
||||
0w2L.M6-o5.DDTFL.R4sFL.7Zuay :: 53, ~tyl, Tlon Investor 11 (oldkey)
|
||||
0w0 :: 54, ~wyd, Curtis Yarvin
|
||||
0w0 :: 55, ~tep, Sibyl Kollmer
|
||||
0w0 :: 56, ~bes, Sibyl Kollmer
|
||||
@ -206,9 +206,9 @@
|
||||
0w0 :: 61, ~der, Galen Wolfe-Pauly
|
||||
0w0 :: 62, ~nep, Galen Wolfe-Pauly
|
||||
0w0 :: 63, ~pur, Herbert Yarvin
|
||||
0w30.VtXvV.S~xIV.iMCL~.j9zTC :: 64, ~rys, Charlie Cummings
|
||||
0w30.VtXvV.S~xIV.iMCL~.j9zTC :: 64, ~rys, Charlie Cummings (oldkey)
|
||||
0w0 :: 65, ~reb, Herbert Yarvin
|
||||
0wp.LslIa.IFSM9.mIp-z.KBIBh :: 66, ~den, Michael Hartl
|
||||
0wp.LslIa.IFSM9.mIp-z.KBIBh :: 66, ~den, Michael Hartl (oldkey)
|
||||
0w0 :: 67, ~nut, Henry Yarvin
|
||||
0w0 :: 68, ~sub, Henry Yarvin
|
||||
0w0 :: 69, ~pet, Henry Yarvin
|
||||
@ -221,16 +221,16 @@
|
||||
0w0 :: 76, ~wyn, Anton Dyudin
|
||||
0w0 :: 77, ~rec, Anton Dyudin
|
||||
0w0 :: 78, ~meg, Anton Dyudin
|
||||
0w2L.tavpW.Lk4R-.elm7E.4KEqZ :: 79, ~net, Anthony Martinez
|
||||
0w2L.tavpW.Lk4R-.elm7E.4KEqZ :: 79, ~net, Anthony Martinez (oldkey)
|
||||
0w0 :: 80, ~sec, Curtis Yarvin
|
||||
0w0 :: 81, ~mul, Curtis Yarvin
|
||||
0w1F.Tqroo.wyq2m.cBaTM.9MbG- :: 82, ~nym, Max Greer
|
||||
0w1F.Tqroo.wyq2m.cBaTM.9MbG- :: 82, ~nym, Max Greer (oldkey)
|
||||
0w0 :: 83, ~tev, Sibyl Kollmer
|
||||
0w2x.~ldho.Oo7kE.QqNSx.XteFh :: 84, ~web, Ar Vicco
|
||||
0w2x.~ldho.Oo7kE.QqNSx.XteFh :: 84, ~web, Ar Vicco (oldkey)
|
||||
0w0 :: 85, ~sum, Philip Monk
|
||||
0w0 :: 86, ~mut, Philip Monk
|
||||
0w0 :: 87, ~nyx, Philip Monk
|
||||
0w30.UUr19.iBPlD.wfyJD.2CWPv :: 88, ~rex, Tlon Investor 12
|
||||
0w30.UUr19.iBPlD.wfyJD.2CWPv :: 88, ~rex, Tlon Investor 12 (oldkey)
|
||||
0w0 :: 89, ~teb, Sibyl Kollmer
|
||||
0w0 :: 90, ~fus, Tlon Corporation
|
||||
0w0 :: 91, ~hep, urbit.org
|
||||
@ -241,7 +241,7 @@
|
||||
0w0 :: 96, ~sel, urbit.org
|
||||
0w0 :: 97, ~ruc, urbit.org
|
||||
0w0 :: 98, ~dec, urbit.org
|
||||
0w1L.NQ-5f.ABF9R.kVwVJ.zRfn2 :: 99, ~wex, Pax Dickinson
|
||||
0w1L.NQ-5f.ABF9R.kVwVJ.zRfn2 :: 99, ~wex, Pax Dickinson (oldkey)
|
||||
0w0 :: 100, ~syr, urbit.org
|
||||
0w0 :: 101, ~wet, urbit.org
|
||||
0w0 :: 102, ~dyl, urbit.org
|
||||
@ -251,7 +251,7 @@
|
||||
0w0 :: 106, ~bet, urbit.org
|
||||
0w0 :: 107, ~bel, urbit.org
|
||||
0w0 :: 108, ~tux, Tlon Investor 13
|
||||
0w1D.JV9n0.9z~YK.yAWyi.c9~Lu :: 109, ~tug, Philip Monk
|
||||
0w1D.JV9n0.9z~YK.yAWyi.c9~Lu :: 109, ~tug, Philip Monk (oldkey)
|
||||
0w0 :: 110, ~myr, urbit.org
|
||||
0w0 :: 111, ~pel, urbit.org
|
||||
0w0 :: 112, ~syp, urbit.org
|
||||
@ -270,7 +270,7 @@
|
||||
0w0 :: 125, ~wyt, urbit.org
|
||||
0w0 :: 126, ~nub, urbit.org
|
||||
0w0 :: 127, ~med, urbit.org
|
||||
0w20.GGLXx.aqxaQ.w4Iob.wdmmr :: 128, ~lyt, Arthur Breitman
|
||||
0w20.GGLXx.aqxaQ.w4Iob.wdmmr :: 128, ~lyt, Arthur Breitman (oldkey)
|
||||
0w0 :: 129, ~dus, urbit.org
|
||||
0w0 :: 130, ~neb, urbit.org
|
||||
0w0 :: 131, ~rum, urbit.org
|
||||
@ -280,35 +280,35 @@
|
||||
0w0 :: 135, ~pun, urbit.org
|
||||
0w0 :: 136, ~res, urbit.org
|
||||
0w0 :: 137, ~red, Alex Kravets
|
||||
0w3J.15iJA.0pbNk.mZXyh.A~uKb :: 138, ~fun, Aaron Beckerman
|
||||
0w3J.15iJA.0pbNk.mZXyh.A~uKb :: 138, ~fun, Aaron Beckerman (oldkey)
|
||||
0w0 :: 139, ~rev, urbit.org
|
||||
0w3m.Cqumo.ZC7-e.794A4.Bqhh8 :: 140, ~ref, Matt Brubeck
|
||||
0w3m.Cqumo.ZC7-e.794A4.Bqhh8 :: 140, ~ref, Matt Brubeck (oldkey)
|
||||
0w0 :: 141, ~mec, urbit.org
|
||||
0w0 :: 142, ~ted, urbit.org
|
||||
0w2d.GLlYg.-MwtO.ZCPBE.OqGB9 :: 143, ~rus, Stephen Burnham
|
||||
0w2d.GLlYg.-MwtO.ZCPBE.OqGB9 :: 143, ~rus, Stephen Burnham (oldkey)
|
||||
0w0 :: 144, ~bex, urbit.org
|
||||
0w0 :: 145, ~leb, Justin LeBlanc
|
||||
0w0 :: 146, ~dux, urbit.org
|
||||
0w0 :: 147, ~ryn, urbit.org
|
||||
0w0 :: 148, ~num, Tlon
|
||||
0w0 :: 149, ~pyx, Katherine McFall
|
||||
0w2g.gLmg4.MtrHQ.A5VmH.WPk6G :: 150, ~ryg, Dan Haffey
|
||||
0w2g.gLmg4.MtrHQ.A5VmH.WPk6G :: 150, ~ryg, Dan Haffey (oldkey)
|
||||
0w0 :: 151, ~ryx, Tlon
|
||||
0w0 :: 152, ~fep, Tlon
|
||||
0w2j.T1u2s.BfXjV.ldOGR.aiZrQ :: 153, ~tyr, Steve Dee
|
||||
0w2j.T1u2s.BfXjV.ldOGR.aiZrQ :: 153, ~tyr, Steve Dee (oldkey)
|
||||
0w0 :: 154, ~tus, Tlon
|
||||
0w0 :: 155, ~tyc, Tlon
|
||||
0w0 :: 156, ~leg, Tlon
|
||||
0w0 :: 157, ~nem, Tlon
|
||||
0w0 :: 158, ~fer, Tlon
|
||||
0w0 :: 159, ~mer, Tlon
|
||||
0w0 :: 160, ~ten, Tlon
|
||||
0w1E.bDeR7.cuQmt.Uc5CS.OSyMx :: 160, ~ten, Tlon
|
||||
0w0 :: 161, ~lus, Tlon
|
||||
0w0 :: 162, ~nus, Tlon
|
||||
0w0 :: 163, ~syl, Tlon
|
||||
0w0 :: 164, ~tec, Tlon
|
||||
0w0 :: 165, ~mex, Tlon
|
||||
0w0 :: 166, ~pub, Tlon
|
||||
0w24.TfzCX.qmRm9.ukapQ.It6tG :: 166, ~pub, Tlon
|
||||
0w0 :: 167, ~rym, Tlon
|
||||
0w0 :: 168, ~tuc, Tlon
|
||||
0w0 :: 169, ~fyl, Tlon
|
||||
@ -321,10 +321,10 @@
|
||||
0w0 :: 176, ~byl, Tlon
|
||||
0w0 :: 177, ~sud, Tlon
|
||||
0w0 :: 178, ~pem, Tlon
|
||||
0w0 :: 179, ~dev, Tlon
|
||||
0wQ.uJzGo.M94yL.L7yw6.nGyfW :: 179, ~dev, Tlon
|
||||
0w0 :: 180, ~lur, Tlon
|
||||
0w0 :: 181, ~def, Tlon
|
||||
0w0 :: 182, ~bus, Tlon
|
||||
0w1m.CxbiW.SKF5E.11JQ6.yW~T4 :: 182, ~bus, Tlon
|
||||
0w0 :: 183, ~bep, Tlon
|
||||
0w0 :: 184, ~run, Tlon
|
||||
0w0 :: 185, ~mel, Tlon
|
||||
@ -342,12 +342,12 @@
|
||||
0w0 :: 197, ~luc, Tlon
|
||||
0w0 :: 198, ~len, Tlon
|
||||
0w0 :: 199, ~ner, Tlon
|
||||
0wv.aixe9.7gG2w.7cJiy.i3Mg8 :: 200, ~lex, Michael Hartl
|
||||
0wv.aixe9.7gG2w.7cJiy.i3Mg8 :: 200, ~lex, Michael Hartl (oldkey)
|
||||
0w0 :: 201, ~rup, Owen Rescher
|
||||
0w0 :: 202, ~ned, Tlon
|
||||
0w0 :: 203, ~lec, Tlon
|
||||
0w0 :: 204, ~ryd, Tlon
|
||||
0w1U.n361n.FC3jj.9cX26.V1Wif :: 205, ~lyd, Adam Bliss
|
||||
0w1U.n361n.FC3jj.9cX26.V1Wif :: 205, ~lyd, Adam Bliss (oldkey)
|
||||
0w0 :: 206, ~fen, Tlon
|
||||
0w0 :: 207, ~wel, Tlon
|
||||
0w0 :: 208, ~nyd, Tlon
|
||||
@ -355,20 +355,20 @@
|
||||
0w0 :: 210, ~rel, Tlon
|
||||
0w0 :: 211, ~rud, Tlon
|
||||
0w0 :: 212, ~nes, Tlon
|
||||
0w16.~8NZV.VyMmf.4toMO.pui1R :: 213, ~hes, Tlon Investor 14
|
||||
0w16.~8NZV.VyMmf.4toMO.pui1R :: 213, ~hes, Tlon Investor 14 (oldkey)
|
||||
0w0 :: 214, ~fet, Tlon
|
||||
0w0 :: 215, ~des, Tlon
|
||||
0w0 :: 216, ~ret, Tlon
|
||||
0w0 :: 217, ~dun, Tlon
|
||||
0w0 :: 218, ~ler, Tlon
|
||||
0w10.w0AUz.QVdks.HCNvf.ja~TO :: 219, ~nyr, Ivan Matosevic
|
||||
0w10.w0AUz.QVdks.HCNvf.ja~TO :: 219, ~nyr, Ivan Matosevic (oldkey)
|
||||
0w0 :: 220, ~seb, Tlon
|
||||
0w0 :: 221, ~hul, Tlon
|
||||
0w0 :: 222, ~ryl, Tlon
|
||||
0w0 :: 223, ~lud, Tlon
|
||||
0w0 :: 224, ~rem, Tlon
|
||||
0w0 :: 225, ~lys, Tlon
|
||||
0w3C.YXlEl.pFbYV.9pYWI.d7cla :: 226, ~fyn, Stephen Burnham
|
||||
0w3C.YXlEl.pFbYV.9pYWI.d7cla :: 226, ~fyn, Stephen Burnham (oldkey)
|
||||
0w0 :: 227, ~wer, Tlon
|
||||
0w0 :: 228, ~ryc, Tlon
|
||||
0w0 :: 229, ~sug, Tlon
|
||||
@ -385,19 +385,19 @@
|
||||
0w0 :: 240, ~lyr, Tlon
|
||||
0w0 :: 241, ~tes, Tlon
|
||||
0w0 :: 242, ~mud, Ian Rowan
|
||||
0w4.yybWD.F1BgE.ynzlF.47neH :: 243, ~nyt, Byrne Hobart
|
||||
0w4.yybWD.F1BgE.ynzlF.47neH :: 243, ~nyt, Byrne Hobart (oldkey)
|
||||
0w0 :: 244, ~byr, Tlon
|
||||
0w0 :: 245, ~sen, Tlon
|
||||
0w0 :: 246, ~weg, Tlon
|
||||
0w28.bRVMq.Oi3tM.zOCNV.j00Yq :: 247, ~fyr, Anton Dyudin
|
||||
0w28.bRVMq.Oi3tM.zOCNV.j00Yq :: 247, ~fyr, Anton Dyudin (oldkey)
|
||||
0w0 :: 248, ~mur, Tlon
|
||||
0w0 :: 249, ~tel, Tlon
|
||||
0w3D.onYhb.3wvaz.62Ct8.nt3iJ :: 250, ~rep, Raymond Pasco
|
||||
0w3D.onYhb.3wvaz.62Ct8.nt3iJ :: 250, ~rep, Raymond Pasco (oldkey)
|
||||
0w0 :: 251, ~teg, Tlon
|
||||
0w0 :: 252, ~pec, Tlon
|
||||
0w0 :: 253, ~nel, Tlon
|
||||
0w0 :: 254, ~nev, Tlon
|
||||
0wY.a0HAU.7Lbkf.6V514.OsJBv :: 255, ~fes, John Burnham
|
||||
0wY.a0HAU.7Lbkf.6V514.OsJBv :: 255, ~fes, John Burnham (oldkey)
|
||||
==
|
||||
--
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
@ -413,7 +413,7 @@
|
||||
vix=(bex +((cut 0 [25 2] mag))) :: width of sender
|
||||
tay=(cut 0 [27 5] mag) :: message type
|
||||
==
|
||||
?> =(3 vez)
|
||||
?> =(4 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 3]
|
||||
:~ [3 4]
|
||||
[20 (mug bod)]
|
||||
[2 yax]
|
||||
[2 qax]
|
||||
@ -479,7 +479,7 @@
|
||||
?. =(fak.ton r.i.lew.wod.dur) ~|([%client-wrong-fake her] !!)
|
||||
:+ p.p.q.i.lew.wod.dur
|
||||
q.q.i.lew.wod.dur
|
||||
(haul r.q.i.lew.wod.dur)
|
||||
(com:nu:crub r.q.i.lew.wod.dur)
|
||||
::
|
||||
++ clon
|
||||
^- life
|
||||
@ -574,7 +574,7 @@
|
||||
:- %fast
|
||||
%^ cat 7
|
||||
p.u.yed.caq.dyr
|
||||
(en:crua q.u.yed.caq.dyr mal)
|
||||
(en:crub q.u.yed.caq.dyr mal)
|
||||
==
|
||||
::
|
||||
++ xeno :: xeno:lax:as:go
|
||||
@ -729,7 +729,7 @@
|
||||
|- ^- (list ship)
|
||||
?:((lth our 256) ~ =+(seg=(sein our) [seg $(our seg)]))
|
||||
::
|
||||
(turn mac |=({p/life q/ring} [p q (weur q)]))
|
||||
(turn mac |=({p/life q/ring} [p q (nol:nu:crub q)]))
|
||||
wil
|
||||
~
|
||||
~
|
||||
@ -978,13 +978,13 @@
|
||||
:- p
|
||||
%= q
|
||||
val
|
||||
(turn val.q |=({p/life q/ring r/acru} [p q (weur q)]))
|
||||
(turn val.q |=({p/life q/ring r/acru} [p q (nol:nu:crub q)]))
|
||||
==
|
||||
==
|
||||
++ come :: come:am
|
||||
|= {ges/(unit @t) wid/@ bur/@ fak/?} :: instantiate pawn
|
||||
^- {p/{p/ship q/@uvG} q/fort}
|
||||
=+ loy=(bruw wid bur)
|
||||
=+ loy=(pit:nu:crub wid bur)
|
||||
=+ rig=sec:ex:loy
|
||||
=+ our=`@p`fig:ex:loy
|
||||
=+ syp=[[0 ~ our now] [%en %pawn ges] pub:ex:loy]
|
||||
@ -1002,7 +1002,7 @@
|
||||
++ czar !: :: czar:am
|
||||
|= {our/ship ger/@uw fak/?} :: instantiate emperor
|
||||
^- {p/(list boon) q/fort}
|
||||
=+ loy=?:(fak (bruw 2.048 our) (bruw 2.048 ger)) :: fake uses carrier /
|
||||
=+ loy=?:(fak (pit:nu:crub 512 our) (pit:nu:crub 512 ger)) :: fake uses carrier /
|
||||
=+ fim==(fig:ex:loy (zeno our))
|
||||
?: &(!fak !fim) !! :: not fake & bad fig
|
||||
=+ mac=`mace`[[0 sec:ex:loy] ~]
|
||||
@ -1018,7 +1018,7 @@
|
||||
++ gnaw :: gnaw:am
|
||||
|= {kay/cape ryn/lane pac/rock} :: process packet
|
||||
^- {p/(list boon) q/fort}
|
||||
?. =(3 (end 0 3 pac)) [~ fox]
|
||||
?. =(4 (end 0 3 pac)) [~ fox]
|
||||
=+ kec=(bite pac)
|
||||
?: (goop p.p.kec) [~ fox]
|
||||
?. (~(has by urb.ton.fox) q.p.kec)
|
||||
|
@ -132,10 +132,7 @@
|
||||
$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)
|
||||
$king [%king (scot %p p.kyz)]
|
||||
$pawn [%pawn ~]
|
||||
==
|
||||
=+ yen=(scot %p (shax :(mix %ticket eny now)))
|
||||
|
@ -80,7 +80,7 @@
|
||||
-- ::
|
||||
|% :: models
|
||||
++ bolo :: eyre state
|
||||
$: $5 :: version
|
||||
$: $6 :: version
|
||||
gub/@t :: random identity
|
||||
hov/(unit ship) :: master for remote
|
||||
top/beam :: ford serve prefix
|
||||
@ -99,8 +99,9 @@
|
||||
sec/(map {iden (list @t)} driv) :: security drivers
|
||||
== ::
|
||||
::
|
||||
++ driv %+ pair (unit $@($~ vase)) :: driver state
|
||||
(qeu (trel duct mark vase:hiss)) :: waiting requests
|
||||
++ driv :: driver state
|
||||
%+ pair (unit $@($~ vase)) :: main core
|
||||
{liv/? req/(qeu (trel duct mark vase:hiss))} :: waiting requests
|
||||
::
|
||||
++ live :: in flight
|
||||
$% {$exec p/whir} :: ford build
|
||||
@ -1696,13 +1697,13 @@
|
||||
~% %eyre-v ..is ~
|
||||
|_ $: {usr/iden dom/path}
|
||||
cor/(unit $@($~ vase))
|
||||
req/(qeu {p/duct q/mark r/vase:hiss})
|
||||
{liv/? req/(qeu {p/duct q/mark r/vase:hiss})}
|
||||
==
|
||||
++ self .
|
||||
++ abet +>(sec (~(put by sec) +<- +<+))
|
||||
++ execute |=({a/whir-se b/{beak silk}} (execute:abet se+[a usr dom] b))
|
||||
++ dead-this |=(a/tang (fail:abet 500 0v0 a))
|
||||
++ dead-hiss |=(a/tang (give-sigh:abet(req ~(nap to req)) %| a))
|
||||
++ dead-hiss |=(a/tang pump(req ~(nap to req), ..vi (give-sigh %| a)))
|
||||
++ eyre-them |=({a/whir-se b/vase} (eyre-them:abet se+[a usr dom] b))
|
||||
++ pass-note |=({a/whir-se b/note} (pass-note:abet se+[a usr dom] b))
|
||||
:: XX block reqs until correct core checked in?
|
||||
@ -1752,6 +1753,7 @@
|
||||
^+ abet
|
||||
?~ cor
|
||||
build
|
||||
?. liv abet
|
||||
=+ ole=~(top to req)
|
||||
?~ ole abet
|
||||
:: process hiss
|
||||
@ -1773,6 +1775,7 @@
|
||||
++ get-req |=(a/{mark vase:hiss} pump(req (~(put to req) hen a)))
|
||||
++ get-thou
|
||||
|= {wir/whir-se hit/httr}
|
||||
=. liv &
|
||||
?+ wir !!
|
||||
?($receive-auth-query-string $in) (call %receive-auth-response httr+!>(hit))
|
||||
?($filter-request $out)
|
||||
@ -1782,16 +1785,16 @@
|
||||
::
|
||||
++ get-made
|
||||
|= {wir/whir-se dep/@uvH res/(each cage tang)} ^+ abet
|
||||
?: ?=($core wir) (update dep res)
|
||||
?: ?=($core wir) (made-core dep res)
|
||||
%. res
|
||||
?- wir
|
||||
?($filter-request $out) res-out
|
||||
?($filter-response $res) res-res
|
||||
?($receive-auth-response $bak) res-bak
|
||||
?($receive-auth-query-string $in) res-in
|
||||
?($filter-request $out) made-filter-request
|
||||
?($filter-response $res) made-filter-response
|
||||
?($receive-auth-response $bak) made-receive-auth-response
|
||||
?($receive-auth-query-string $in) made-receive-auth-query-string
|
||||
==
|
||||
::
|
||||
++ update
|
||||
++ made-core
|
||||
|= {dep/@uvH gag/(each cage tang)}
|
||||
:: ~& got-update/dep
|
||||
=. ..vi (pass-note %core [%f [%wasp our dep &]])
|
||||
@ -1801,6 +1804,35 @@
|
||||
pump ::(cor `~) :: userless %hiss defaults to "nop" driver
|
||||
(warn p.gag)
|
||||
::
|
||||
++ made-filter-request
|
||||
%+ on-ford-fail dead-hiss
|
||||
%+ on-error warn |.
|
||||
%- handle-moves :~
|
||||
give+do-give
|
||||
send+(do-send %filter-request)
|
||||
show+do-show
|
||||
==
|
||||
::
|
||||
++ made-filter-response
|
||||
%+ on-error dead-hiss |.
|
||||
%- handle-moves :~
|
||||
give+do-give
|
||||
send+(do-send %filter-request)
|
||||
redo+_pump
|
||||
==
|
||||
::
|
||||
++ made-receive-auth-query-string
|
||||
%+ on-error dead-this |.
|
||||
(handle-moves send+(do-send %receive-auth-query-string) ~)
|
||||
::
|
||||
++ made-receive-auth-response
|
||||
%+ on-error dead-this |.
|
||||
%- handle-moves :~
|
||||
give+do-give
|
||||
send+(do-send %receive-auth-query-string)
|
||||
redo+_pump(..vi (give-html 200 ~ exit:xml))
|
||||
==
|
||||
::
|
||||
:: Result handling
|
||||
::
|
||||
:: XX formal dill-blit %url via hood
|
||||
@ -1815,6 +1847,7 @@
|
||||
++ do-send
|
||||
|= wir/whir-se ^- $-(vase _abet)
|
||||
|= res/vase
|
||||
=. liv | :: block requests until a reponse is given
|
||||
(eyre-them wir (slam !>(|=({$send a/hiss} a)) res))
|
||||
::
|
||||
++ handle-moves
|
||||
@ -1857,36 +1890,6 @@
|
||||
=+ typ=cor-type
|
||||
~| %core-mismatch
|
||||
?>((~(nest ut typ) & p.roc) ~)
|
||||
::
|
||||
::
|
||||
++ res-in
|
||||
%+ on-error dead-this |.
|
||||
(handle-moves send+(do-send %receive-auth-query-string) ~)
|
||||
::
|
||||
++ res-res
|
||||
%+ on-error dead-hiss |.
|
||||
%- handle-moves :~
|
||||
give+do-give
|
||||
send+(do-send %filter-request)
|
||||
redo+_pump
|
||||
==
|
||||
::
|
||||
++ res-bak
|
||||
%+ on-error dead-this |.
|
||||
%- handle-moves :~
|
||||
give+do-give
|
||||
send+(do-send %receive-auth-query-string)
|
||||
redo+_pump(..vi (give-html 200 ~ exit:xml))
|
||||
==
|
||||
::
|
||||
++ res-out
|
||||
%+ on-ford-fail dead-hiss
|
||||
%+ on-error warn |.
|
||||
%- handle-moves :~
|
||||
give+do-give
|
||||
send+(do-send %filter-request)
|
||||
show+do-show
|
||||
==
|
||||
-- --
|
||||
--
|
||||
. ==
|
||||
@ -1935,10 +1938,13 @@
|
||||
~
|
||||
::
|
||||
++ load :: take previous state
|
||||
=+ bolo-4={$4 _%*(+ *bolo lyv *(map duct ^))}
|
||||
|= old/?(bolo bolo-4)
|
||||
=+ driv-5=_=>(*driv [cor=p req=req.q])
|
||||
=+ bolo-5={$5 _=+(*bolo +.-(sec (~(run by sec.-) driv-5)))}
|
||||
=+ bolo-4={$4 _%*(+ *bolo-5 lyv *(map duct ^))}
|
||||
|= old/?(bolo bolo-5 bolo-4)
|
||||
?- -.old
|
||||
$5 ..^$(+>- old)
|
||||
$6 ..^$(+>- old)
|
||||
$5 $(old [%6 +.old(sec (~(run by sec.old) |=(driv-5 [cor & req])))])
|
||||
$4 $(old [%5 +.old(lyv ~)]) :: minor leak
|
||||
==
|
||||
::
|
||||
|
@ -82,7 +82,7 @@
|
||||
== ::
|
||||
++ stic :: statistics
|
||||
$: act/@ud :: change number
|
||||
eny/@uvI :: entropy
|
||||
eny/@uvJ :: entropy
|
||||
lat/@da :: time
|
||||
== ::
|
||||
-- ::
|
||||
@ -91,7 +91,7 @@
|
||||
. ==
|
||||
=| all/axle :: all vane state
|
||||
|= $: now/@da :: urban time
|
||||
eny/@uvI :: entropy
|
||||
eny/@uvJ :: entropy
|
||||
ska/sley :: activate
|
||||
== :: opaque core
|
||||
~% %gall-top ..is ~
|
||||
@ -557,7 +557,7 @@
|
||||
==
|
||||
=+ unt=(~(get by q.zam) hen)
|
||||
=: act.tyc +(act.tyc)
|
||||
eny.tyc (shax (mix (add dap act.tyc) eny))
|
||||
eny.tyc (shaz (mix (add dap act.tyc) eny))
|
||||
lat.tyc now
|
||||
==
|
||||
?^ unt
|
||||
@ -647,7 +647,7 @@
|
||||
((slog leaf+"peek find fail" >tyl< >mar< ~) [~ ~])
|
||||
=^ arm +>.$ (ap-farm q.u.cug)
|
||||
?: ?=($| -.arm) ((slog leaf+"peek farm fail" p.arm) [~ ~])
|
||||
=^ zem +>.$ (ap-slam q.u.cug p.arm !>([ren (slag p.u.cug tyl)]))
|
||||
=^ zem +>.$ (ap-slam q.u.cug p.arm !>((slag p.u.cug `path`[ren tyl])))
|
||||
?: ?=($| -.zem) ((slog leaf+"peek slam fail" p.zem) [~ ~])
|
||||
?+ q.p.zem ((slog leaf+"peek bad result" ~) [~ ~])
|
||||
$~ ~
|
||||
@ -1046,7 +1046,6 @@
|
||||
++ ap-purr :: unwrap take
|
||||
|= {wha/term pax/path cag/cage}
|
||||
^+ +>
|
||||
=. q.cag (spec q.cag)
|
||||
=+ cug=(ap-find [wha p.cag pax])
|
||||
?~ cug
|
||||
(ap-lame wha (ap-suck "{(trip wha)}: no {<`path`[p.cag pax]>}"))
|
||||
|
@ -1192,7 +1192,7 @@
|
||||
/holpaslacrovlivdalsatlibtabhanticpidtorbolfosdot\
|
||||
/losdilforpilramtirwintadbicdifrocwidbisdasmidlop\
|
||||
/rilnardapmolsanlocnovsitnidtipsicropwitnatpanmin\
|
||||
/ritpodmottamtolsavposnapnopsomfinfonbanporworsip\
|
||||
/ritpodmottamtolsavposnapnopsomfinfonbanmorworsip\
|
||||
/ronnorbotwicsocwatdolmagpicdavbidbaltimtasmallig\
|
||||
/sivtagpadsaldivdactansidfabtarmonranniswolmispal\
|
||||
/lasdismaprabtobrollatlonnodnavfignomnibpagsopral\
|
||||
@ -1202,7 +1202,7 @@
|
||||
/tomdigfilfasmithobharmighinradmashalraglagfadtop\
|
||||
/mophabnilnosmilfopfamdatnoldinhatnacrisfotribhoc\
|
||||
/nimlarfitwalrapsarnalmoslandondanladdovrivbacpol\
|
||||
/laptalpitnambonrostonfodponsovnocsorlavmatmipfap'
|
||||
/laptalpitnambonrostonfodponsovnocsorlavmatmipfip'
|
||||
^= dex :: suffix syllables
|
||||
'zodnecbudwessevpersutletfulpensytdurwepserwylsun\
|
||||
/rypsyxdyrnuphebpeglupdepdysputlughecryttyvsydnex\
|
||||
@ -3931,11 +3931,14 @@
|
||||
|%
|
||||
++ bix (bass 16 (stun [2 2] six))
|
||||
++ fem (sear |=(a/@ (cha:fa a)) aln)
|
||||
++ hif (boss 256 ;~(plug tip tiq (easy ~)))
|
||||
++ huf %+ cook
|
||||
|=({a/@ b/@} (wred:un ~(zug mu ~(zag mu [a b]))))
|
||||
;~(plug hif ;~(pfix hep hif))
|
||||
++ hyf (bass 0x1.0000.0000 ;~(plug huf ;~(pfix hep huf) (easy ~)))
|
||||
++ haf (bass 256 ;~(plug tep tiq (easy ~)))
|
||||
++ hef %+ sear |=(a/@ ?:(=(a 0) ~ (some a)))
|
||||
%+ bass 256
|
||||
;~(plug tip tiq (easy ~))
|
||||
++ hif (bass 256 ;~(plug tip tiq (easy ~)))
|
||||
++ hof (bass 0x1.0000 ;~(plug hef (stun [1 3] ;~(pfix hep hif))))
|
||||
++ huf (bass 0x1.0000 ;~(plug hef (stun [0 3] ;~(pfix hep hif))))
|
||||
++ hyf (bass 0x1.0000 ;~(plug hif (stun [3 3] ;~(pfix hep hif))))
|
||||
++ pev (bass 32 ;~(plug sev (stun [0 4] siv)))
|
||||
++ pew (bass 64 ;~(plug sew (stun [0 4] siw)))
|
||||
++ piv (bass 32 (stun [5 5] siv))
|
||||
@ -3963,6 +3966,7 @@
|
||||
==
|
||||
++ sox (cook |=(a/@ (sub a 87)) (shim 'a' 'f'))
|
||||
++ ted (bass 10 ;~(plug sed (stun [0 2] sid)))
|
||||
++ tep (sear |=(a/@ ?:(=(a 'doz') ~ (ins:po a))) til)
|
||||
++ tip (sear |=(a/@ (ins:po a)) til)
|
||||
++ tiq (sear |=(a/@ (ind:po a)) til)
|
||||
++ tid (bass 10 (stun [3 3] sid))
|
||||
@ -3997,14 +4001,16 @@
|
||||
++ dim (ape dip)
|
||||
++ dip (bass 10 ;~(plug sed:ab (star sid:ab)))
|
||||
++ dum (bass 10 (plus sid:ab))
|
||||
++ fed ;~ pose
|
||||
%+ bass 0x1.0000.0000.0000.0000
|
||||
;~((glue doh) ;~(pose hyf:ab huf:ab) (more doh hyf:ab))
|
||||
::
|
||||
hyf:ab
|
||||
huf:ab
|
||||
hif:ab
|
||||
tiq:ab
|
||||
++ fed %+ cook fend:ob
|
||||
;~ pose
|
||||
%+ bass 0x1.0000.0000.0000.0000 :: oversized
|
||||
;~ plug
|
||||
huf:ab
|
||||
(plus ;~(pfix doh hyf:ab))
|
||||
==
|
||||
hof:ab :: planet or moon
|
||||
haf:ab :: star
|
||||
tiq:ab :: galaxy
|
||||
==
|
||||
++ fim (sear den:fa (bass 58 (plus fem:ab)))
|
||||
++ hex (ape (bass 0x1.0000 ;~(plug qex:ab (star ;~(pfix dog qix:ab)))))
|
||||
@ -4086,37 +4092,27 @@
|
||||
==
|
||||
::
|
||||
$p
|
||||
=+ dyx=(met 3 q.p.lot)
|
||||
=+ sxz=(feen:ob q.p.lot)
|
||||
=+ dyx=(met 3 sxz)
|
||||
:- '~'
|
||||
?: (lte dyx 1)
|
||||
(weld (trip (tod:po q.p.lot)) rep)
|
||||
?: =(2 dyx)
|
||||
;: weld
|
||||
(trip (tos:po (end 3 1 q.p.lot)))
|
||||
(trip (tod:po (rsh 3 1 q.p.lot)))
|
||||
rep
|
||||
==
|
||||
=+ [dyz=(met 5 q.p.lot) fin=| dub=&]
|
||||
(weld (trip (tod:po sxz)) rep)
|
||||
=+ dyy=(met 4 sxz)
|
||||
=+ imp=*@
|
||||
|- ^- tape
|
||||
?: =(0 dyz)
|
||||
?: =(imp dyy)
|
||||
rep
|
||||
%= $
|
||||
fin &
|
||||
dub !dub
|
||||
dyz (dec dyz)
|
||||
q.p.lot (rsh 5 1 q.p.lot)
|
||||
rep
|
||||
=+ syb=(wren:un (end 5 1 q.p.lot))
|
||||
=+ cog=~(zig mu [(rsh 4 1 syb) (end 4 1 syb)])
|
||||
;: weld
|
||||
(trip (tos:po (end 3 1 p.cog)))
|
||||
(trip (tod:po (rsh 3 1 p.cog)))
|
||||
`tape`['-' ~]
|
||||
(trip (tos:po (end 3 1 q.cog)))
|
||||
(trip (tod:po (rsh 3 1 q.cog)))
|
||||
`tape`?.(fin ~ ['-' ?.(dub ~ ['-' ~])])
|
||||
rep
|
||||
==
|
||||
%= $
|
||||
sxz (rsh 4 1 sxz)
|
||||
imp +(imp)
|
||||
rep
|
||||
=+ log=(end 4 1 sxz)
|
||||
;: weld
|
||||
(trip (tos:po (rsh 3 1 log)))
|
||||
(trip (tod:po (end 3 1 log)))
|
||||
?:(=((mod imp 4) 0) ?:(=(imp 0) "" "--") "-")
|
||||
rep
|
||||
==
|
||||
==
|
||||
::
|
||||
$r
|
||||
@ -4624,16 +4620,16 @@
|
||||
^- {@ @}
|
||||
:- r
|
||||
?~ (mod n 2)
|
||||
(~(sum fo 65.535) l (muk (snag n raku) 4 r))
|
||||
(~(sum fo 65.536) l (muk (snag n raku) 4 r))
|
||||
(~(sum fo 65.535) l (muk (snag n raku) 2 r))
|
||||
(~(sum fo 65.536) l (muk (snag n raku) 2 r))
|
||||
::
|
||||
++ rund :: reverse round
|
||||
|= {n/@ l/@ r/@}
|
||||
^- {@ @}
|
||||
:- r
|
||||
?~ (mod n 2)
|
||||
(~(dif fo 65.535) l (muk (snag n raku) 4 r))
|
||||
(~(dif fo 65.536) l (muk (snag n raku) 4 r))
|
||||
(~(dif fo 65.535) l (muk (snag n raku) 2 r))
|
||||
(~(dif fo 65.536) l (muk (snag n raku) 2 r))
|
||||
::
|
||||
++ raku
|
||||
^- (list @ux)
|
||||
@ -11166,7 +11162,7 @@
|
||||
::
|
||||
++ poke :: external apply
|
||||
|= {now/@da ovo/ovum}
|
||||
=. eny (mix eny (shax now))
|
||||
=. eny (mix eny (shaz now))
|
||||
:: ~& [%poke -.q.ovo]
|
||||
^- {(list ovum) _+>}
|
||||
=^ zef niz
|
||||
|
90
arvo/jael.hoon
Normal file
90
arvo/jael.hoon
Normal file
@ -0,0 +1,90 @@
|
||||
:: %jael, secret
|
||||
::
|
||||
:::: /hoon/jael
|
||||
::
|
||||
!? 164
|
||||
::::
|
||||
|= pit=vase
|
||||
=> =~
|
||||
:: private structures :: ::
|
||||
:::: :: ::
|
||||
:: :: ::
|
||||
|% ::
|
||||
++ bitx $~ :: any crypto wallet
|
||||
++ prof :: per service profile
|
||||
$: oat/(map user (safe @)) :: auth tokens
|
||||
pax/(unit @t) :: actual password
|
||||
== ::
|
||||
++ safe |*(gate {exp/@da nub/+<}) :: secret w/expiration
|
||||
++ tlsy $~ :: HTTPS secrets
|
||||
++ whom @t :: foreign identity
|
||||
++ wapi :: per api service
|
||||
$: app/(map @tas (safe @)) :: per appname
|
||||
use/(map whom prof) :: user secrets
|
||||
== ::
|
||||
++ land :: urbit secrets
|
||||
$: lyf/@ud :: life number
|
||||
sym/(map @p (map @uvH (safe @uvI))) :: shared keys
|
||||
own/(map @ud (safe ring)) :: private key per life
|
||||
== ::
|
||||
++ user @ta :: user id per service
|
||||
++ visa (map ship will) :: meta-will
|
||||
--
|
||||
:: system structures
|
||||
|%
|
||||
++ axle :: %jael state
|
||||
$: $0 :: %jael version
|
||||
pri/land :: local crypto state
|
||||
pub/(map @p will) :: will system
|
||||
api/(map @tas wapi) :: web services
|
||||
tix/(map @pG @p) :: old style tickets
|
||||
tls/tlsy :: tls keys
|
||||
val/(map @tas bitx) :: bitcoin etc
|
||||
sub/(map path (set duct)) :: subscribers
|
||||
== ::
|
||||
++ gift :: out result <-$
|
||||
$% {$dead p/path} :: key expired
|
||||
{$save p/(each * *)} :: backup
|
||||
== ::
|
||||
++ kiss :: in request ->$
|
||||
$% {$kill p/path} :: cancel path
|
||||
{$know p/visa} :: learn will (new pki)
|
||||
{$knew p/ship q/will} :: learn will (old pki)
|
||||
{$next p/ring} :: update private key
|
||||
{$tell p/path q/@da r/@} :: save atomic secret
|
||||
{$tick p/@pG q/@p} :: save old ticket
|
||||
==
|
||||
--
|
||||
|% ::
|
||||
++ call :: request
|
||||
|= {hen/duct hic/(hypo (hobo kiss))}
|
||||
^- [p=(list move) q=_..^$]
|
||||
!!
|
||||
::
|
||||
++ doze
|
||||
|= [now=@da hen=duct]
|
||||
^- (unit @da)
|
||||
~
|
||||
::
|
||||
++ load :: highly forgiving
|
||||
|= old=*
|
||||
=+ lox=((soft axle) old)
|
||||
^+ ..^$
|
||||
?~ lox
|
||||
~& %jael-reset
|
||||
..^$
|
||||
..^$(+>- u.lox)
|
||||
::
|
||||
++ scry
|
||||
|= {fur/(unit (set monk)) ren/@tas who/ship syd/desk lot/coin tyl/path}
|
||||
^- (unit (unit (pair mark *)))
|
||||
:: actually scry
|
||||
~
|
||||
::
|
||||
++ stay :: save w/o cache
|
||||
`axle`+>-.$
|
||||
::
|
||||
++ take :: response
|
||||
|= {tea/wire hen/duct hin/(hypo noun)}
|
||||
!!
|
||||
--
|
@ -235,12 +235,12 @@
|
||||
--
|
||||
::
|
||||
++ ecba :: AES-128 ECB
|
||||
~% %ecba +>+ ~
|
||||
=+ (ahem 4 4 10)
|
||||
~% %ecba +> ~
|
||||
|_ key/@H
|
||||
++ en
|
||||
~/ %en
|
||||
|= blk/@H ^- @uxH
|
||||
=+ (ahem 4 4 10)
|
||||
=:
|
||||
key (~(net fe 7) key)
|
||||
blk (~(net fe 7) blk)
|
||||
@ -250,6 +250,7 @@
|
||||
++ de
|
||||
~/ %de
|
||||
|= blk/@H ^- @uxH
|
||||
=+ (ahem 4 4 10)
|
||||
=:
|
||||
key (~(net fe 7) key)
|
||||
blk (~(net fe 7) blk)
|
||||
@ -259,12 +260,12 @@
|
||||
--
|
||||
::
|
||||
++ ecbb :: AES-192 ECB
|
||||
~% %ecbb +>+ ~
|
||||
=+ (ahem 6 4 12)
|
||||
~% %ecbb +> ~
|
||||
|_ key/@I
|
||||
++ en
|
||||
~/ %en
|
||||
|= blk/@H ^- @uxH
|
||||
=+ (ahem 6 4 12)
|
||||
=:
|
||||
key (rsh 6 1 (~(net fe 8) key))
|
||||
blk (~(net fe 7) blk)
|
||||
@ -274,6 +275,7 @@
|
||||
++ de
|
||||
~/ %de
|
||||
|= blk/@H ^- @uxH
|
||||
=+ (ahem 6 4 12)
|
||||
=:
|
||||
key (rsh 6 1 (~(net fe 8) key))
|
||||
blk (~(net fe 7) blk)
|
||||
@ -283,12 +285,12 @@
|
||||
--
|
||||
::
|
||||
++ ecbc :: AES-256 ECB
|
||||
~% %ecbc +>+ ~
|
||||
=+ (ahem 8 4 14)
|
||||
~% %ecbc +> ~
|
||||
|_ key/@I
|
||||
++ en
|
||||
~/ %en
|
||||
|= blk/@H ^- @uxH
|
||||
=+ (ahem 8 4 14)
|
||||
=:
|
||||
key (~(net fe 8) key)
|
||||
blk (~(net fe 7) blk)
|
||||
@ -298,6 +300,7 @@
|
||||
++ de
|
||||
~/ %de
|
||||
|= blk/@H ^- @uxH
|
||||
=+ (ahem 8 4 14)
|
||||
=:
|
||||
key (~(net fe 8) key)
|
||||
blk (~(net fe 7) blk)
|
||||
@ -427,7 +430,7 @@
|
||||
::
|
||||
++ ctra :: AES-128 CTR
|
||||
~% %ctra +> ~
|
||||
|_ {key/@H mod/bloq ctr/@H}
|
||||
|_ {key/@H mod/bloq len/@ ctr/@H}
|
||||
++ en
|
||||
~/ %en
|
||||
|= txt/@
|
||||
@ -435,10 +438,9 @@
|
||||
=/ encrypt ~(en ecba key)
|
||||
=/ blocks (met 7 txt)
|
||||
=. blocks ?:(=(0 blocks) 1 blocks)
|
||||
=/ bytes (met 3 txt)
|
||||
=. bytes ?:(=(0 bytes) 1 bytes)
|
||||
?> (gte len (met 3 txt))
|
||||
%+ mix txt
|
||||
%^ rsh 3 (sub (mul 16 blocks) bytes)
|
||||
%^ rsh 3 (sub (mul 16 blocks) len)
|
||||
%+ rep 7
|
||||
%- flop :: stupid backwards AES
|
||||
|- ^- (list @ux)
|
||||
@ -450,7 +452,7 @@
|
||||
::
|
||||
++ ctrb :: AES-192 CTR
|
||||
~% %ctrb +> ~
|
||||
|_ {key/@I mod/bloq ctr/@H}
|
||||
|_ {key/@I mod/bloq len/@ ctr/@H}
|
||||
++ en
|
||||
~/ %en
|
||||
|= txt/@
|
||||
@ -458,10 +460,9 @@
|
||||
=/ encrypt ~(en ecbb key)
|
||||
=/ blocks (met 7 txt)
|
||||
=. blocks ?:(=(0 blocks) 1 blocks)
|
||||
=/ bytes (met 3 txt)
|
||||
=. bytes ?:(=(0 bytes) 1 bytes)
|
||||
?> (gte len (met 3 txt))
|
||||
%+ mix txt
|
||||
%^ rsh 3 (sub (mul 16 blocks) bytes)
|
||||
%^ rsh 3 (sub (mul 16 blocks) len)
|
||||
%+ rep 7
|
||||
%- flop :: stupid backwards AES
|
||||
|- ^- (list @ux)
|
||||
@ -473,7 +474,7 @@
|
||||
::
|
||||
++ ctrc :: AES-256 CTR
|
||||
~% %ctrc +> ~
|
||||
|_ {key/@I mod/bloq ctr/@H}
|
||||
|_ {key/@I mod/bloq len/@ ctr/@H}
|
||||
++ en
|
||||
~/ %en
|
||||
|= txt/@
|
||||
@ -481,10 +482,9 @@
|
||||
=/ encrypt ~(en ecbc key)
|
||||
=/ blocks (met 7 txt)
|
||||
=. blocks ?:(=(0 blocks) 1 blocks)
|
||||
=/ bytes (met 3 txt)
|
||||
=. bytes ?:(=(0 bytes) 1 bytes)
|
||||
?> (gte len (met 3 txt))
|
||||
%+ mix txt
|
||||
%^ rsh 3 (sub (mul 16 blocks) bytes)
|
||||
%^ rsh 3 (sub (mul 16 blocks) len)
|
||||
%+ rep 7
|
||||
%- flop :: stupid backwards AES
|
||||
|- ^- (list @ux)
|
||||
@ -653,19 +653,21 @@
|
||||
++ en
|
||||
~/ %en
|
||||
|= txt/@
|
||||
^- (pair @uxH @ux)
|
||||
^- (trel @uxH @ud @ux)
|
||||
=+ [k1=(rsh 7 1 key) k2=(end 7 1 key)]
|
||||
=+ iv=(s2va k1 (weld vec (limo ~[txt])))
|
||||
:-
|
||||
=+ len=(met 3 txt)
|
||||
:+
|
||||
iv
|
||||
(~(en ctra k2 7 (dis iv 0xffff.ffff.ffff.ffff.7fff.ffff.7fff.ffff)) txt)
|
||||
len
|
||||
(~(en ctra k2 7 len (dis iv 0xffff.ffff.ffff.ffff.7fff.ffff.7fff.ffff)) txt)
|
||||
++ de
|
||||
~/ %de
|
||||
|= {iv/@H txt/@}
|
||||
|= {iv/@H len/@ txt/@}
|
||||
^- (unit @ux)
|
||||
=+ [k1=(rsh 7 1 key) k2=(end 7 1 key)]
|
||||
=+ ^= pln
|
||||
(~(de ctra k2 7 (dis iv 0xffff.ffff.ffff.ffff.7fff.ffff.7fff.ffff)) txt)
|
||||
(~(de ctra k2 7 len (dis iv 0xffff.ffff.ffff.ffff.7fff.ffff.7fff.ffff)) txt)
|
||||
?. =((s2va k1 (weld vec (limo ~[pln]))) iv)
|
||||
~
|
||||
`pln
|
||||
@ -677,19 +679,21 @@
|
||||
++ en
|
||||
~/ %en
|
||||
|= txt/@
|
||||
^- (pair @uxH @ux)
|
||||
^- (trel @uxH @ud @ux)
|
||||
=+ [k1=(rsh 5 3 key) k2=(end 5 3 key)]
|
||||
=+ iv=(s2vb k1 (weld vec (limo ~[txt])))
|
||||
:-
|
||||
=+ len=(met 3 txt)
|
||||
:+
|
||||
iv
|
||||
(~(en ctrb k2 7 (dis iv 0xffff.ffff.ffff.ffff.7fff.ffff.7fff.ffff)) txt)
|
||||
len
|
||||
(~(en ctrb k2 7 len (dis iv 0xffff.ffff.ffff.ffff.7fff.ffff.7fff.ffff)) txt)
|
||||
++ de
|
||||
~/ %de
|
||||
|= {iv/@H txt/@}
|
||||
|= {iv/@H len/@ txt/@}
|
||||
^- (unit @ux)
|
||||
=+ [k1=(rsh 5 3 key) k2=(end 5 3 key)]
|
||||
=+ ^= pln
|
||||
(~(de ctrb k2 7 (dis iv 0xffff.ffff.ffff.ffff.7fff.ffff.7fff.ffff)) txt)
|
||||
(~(de ctrb k2 7 len (dis iv 0xffff.ffff.ffff.ffff.7fff.ffff.7fff.ffff)) txt)
|
||||
?. =((s2vb k1 (weld vec (limo ~[pln]))) iv)
|
||||
~
|
||||
`pln
|
||||
@ -701,19 +705,21 @@
|
||||
++ en
|
||||
~/ %en
|
||||
|= txt/@
|
||||
^- (pair @uxH @ux)
|
||||
^- (trel @uxH @ud @ux)
|
||||
=+ [k1=(rsh 8 1 key) k2=(end 8 1 key)]
|
||||
=+ iv=(s2vc k1 (weld vec (limo ~[txt])))
|
||||
:-
|
||||
=+ len=(met 3 txt)
|
||||
:+
|
||||
iv
|
||||
(~(en ctrc k2 7 (dis iv 0xffff.ffff.ffff.ffff.7fff.ffff.7fff.ffff)) txt)
|
||||
len
|
||||
(~(en ctrc k2 7 len (dis iv 0xffff.ffff.ffff.ffff.7fff.ffff.7fff.ffff)) txt)
|
||||
++ de
|
||||
~/ %de
|
||||
|= {iv/@H txt/@}
|
||||
|= {iv/@H len/@ txt/@}
|
||||
^- (unit @ux)
|
||||
=+ [k1=(rsh 8 1 key) k2=(end 8 1 key)]
|
||||
=+ ^= pln
|
||||
(~(de ctrc k2 7 (dis iv 0xffff.ffff.ffff.ffff.7fff.ffff.7fff.ffff)) txt)
|
||||
(~(de ctrc k2 7 len (dis iv 0xffff.ffff.ffff.ffff.7fff.ffff.7fff.ffff)) txt)
|
||||
?. =((s2vc k1 (weld vec (limo ~[pln]))) iv)
|
||||
~
|
||||
`pln
|
||||
@ -945,24 +951,26 @@
|
||||
?> =('b' (end 3 1 bpk))
|
||||
=+ pk=(rsh 8 1 (rsh 3 1 bpk))
|
||||
=+ shar=(shax (shar:ed pk cry.u.sek))
|
||||
=+ ((hard {iv/@ cph/@}) (cue txt))
|
||||
=+ try=(~(de siva:aes shar ~) iv cph)
|
||||
=+ ((hard {iv/@ len/@ cph/@}) (cue txt))
|
||||
=+ try=(~(de siva:aes shar ~) iv len cph)
|
||||
?~ try ~
|
||||
=+ veri=(sure:as:(com:nu:crub bpk) ~ u.try)
|
||||
?~ veri ~
|
||||
(some ((hard (pair @ux @ux)) (cue u.veri)))
|
||||
--
|
||||
++ de
|
||||
|= {key/@J cph/@}
|
||||
|= {key/@J txt/@}
|
||||
^- (unit @ux)
|
||||
%+ ~(de sivc:aes (shaz key) ~)
|
||||
(end 7 1 cph)
|
||||
(rsh 7 1 cph)
|
||||
=+ ((hard {iv/@ len/@ cph/@}) (cue txt))
|
||||
%^ ~(de sivc:aes (shaz key) ~)
|
||||
iv
|
||||
len
|
||||
cph
|
||||
++ dy |=({key/@I cph/@} (need (de key cph)))
|
||||
++ en
|
||||
|= {key/@J msg/@}
|
||||
^- @ux
|
||||
(cat 7 (~(en sivc:aes (shaz key) ~) msg))
|
||||
(jam (~(en sivc:aes (shaz key) ~) msg))
|
||||
++ ex
|
||||
|%
|
||||
++ fig ^- @uvH (shaf %bfig sgn.^pub)
|
||||
@ -2208,7 +2216,7 @@
|
||||
++ ares (unit {p/term q/(list tank)}) :: possible error
|
||||
++ bale :: driver state
|
||||
|* a/_* :: %jael keys type
|
||||
$: {our/ship now/@da eny/@uvI byk/beak} :: base info
|
||||
$: {our/ship now/@da eny/@uvJ byk/beak} :: base info
|
||||
{usr/iden dom/(list @t)} :: req user, domain
|
||||
key/a :: secrets from %jael
|
||||
== ::
|
||||
@ -2261,7 +2269,7 @@
|
||||
== ::
|
||||
$: ost/bone :: opaque cause
|
||||
act/@ud :: change number
|
||||
eny/@uvI :: entropy
|
||||
eny/@uvJ :: entropy
|
||||
now/@da :: current time
|
||||
byk/beak :: load source
|
||||
== == ::
|
||||
|
@ -2,7 +2,7 @@
|
||||
:::: /hoon/code/gen
|
||||
::
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
$~
|
||||
$~
|
||||
==
|
||||
|
18
gen/gmail/list.hoon
Normal file
18
gen/gmail/list.hoon
Normal file
@ -0,0 +1,18 @@
|
||||
::
|
||||
:::: /hoon/list/gmail/gen
|
||||
::
|
||||
/? 310
|
||||
::
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
arg/$@($~ {number/@u $~})
|
||||
$~
|
||||
==
|
||||
?~ arg $(arg [5 ~])
|
||||
:- %noun
|
||||
%+ turn (scag number.arg .^((list {@t @t}) %gx /=gmail=/read/messages))
|
||||
|= {message-id/@t thread-id/@t}
|
||||
=+ .^({from/@t subject/@t} %gx /=gmail=/read/messages/[message-id])
|
||||
[from=from (trip subject)]
|
14
gen/gmail/send.hoon
Normal file
14
gen/gmail/send.hoon
Normal file
@ -0,0 +1,14 @@
|
||||
::
|
||||
:::: /hoon/send/gmail/gen
|
||||
::
|
||||
/? 310
|
||||
/- rfc
|
||||
:- %say
|
||||
|= {^ {to/tape subject/tape opt/$@($~ {mess/tape $~})} _from="urbit-test@gmail.com"}
|
||||
:- %gmail-req
|
||||
:^ %post /messages/'send' ~['uploadType'^'simple']
|
||||
^- message:rfc
|
||||
=+ parse-adr=;~((glue pat) (cook crip (star ;~(less pat next))) (cook crip (star next)))
|
||||
:+ (scan from parse-adr)
|
||||
(scan to parse-adr)
|
||||
[(crip subject) ?~(opt '' (crip mess.opt))]
|
@ -6,7 +6,7 @@
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{arg/?($~ {? $~}) $~}
|
||||
==
|
||||
:- %kiln-autoload
|
||||
|
@ -12,7 +12,7 @@
|
||||
--
|
||||
[sole .]
|
||||
:- %ask
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{arg/_(scug *@ *{his/@p tic/@p $~})}
|
||||
safety/?($on $off)
|
||||
==
|
||||
@ -49,7 +49,7 @@
|
||||
$czar [%czar ~]
|
||||
$duke [%duke %anon ~]
|
||||
$earl [%earl (scot %p his)]
|
||||
$king [%king ?:(=(~doznec his) 'Urban Republic' (scot %p his))]
|
||||
$king [%king (scot %p his)]
|
||||
$pawn [%pawn ~]
|
||||
==
|
||||
==
|
||||
|
15
gen/hood/bonus.hoon
Normal file
15
gen/hood/bonus.hoon
Normal file
@ -0,0 +1,15 @@
|
||||
::
|
||||
:::: /hoon/reinvite/hood/gen
|
||||
::
|
||||
/? 310
|
||||
::
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{{pas/@uvG opt/$@($~ {planets/@u $@($~ {stars/@u $~})})} $~}
|
||||
==
|
||||
?~ opt $(opt [planets=1]~)
|
||||
?~ +.opt $(+.opt [stars=0]~)
|
||||
:- %womb-bonus
|
||||
[(scot %uv pas) 1 0]
|
@ -6,7 +6,7 @@
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{arg/(list term) $~}
|
||||
==
|
||||
:+ %helm-reload-desk %base
|
||||
|
@ -6,7 +6,7 @@
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{{syd/@tas $~} $~}
|
||||
==
|
||||
:- %kiln-cancel
|
||||
|
13
gen/hood/claim.hoon
Normal file
13
gen/hood/claim.hoon
Normal file
@ -0,0 +1,13 @@
|
||||
::
|
||||
:::: /hoon/claim/hood/gen
|
||||
::
|
||||
/? 310
|
||||
::
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{{pas/@uvH her/@p $~} $~}
|
||||
==
|
||||
:- %womb-claim
|
||||
[pas her]
|
@ -6,7 +6,7 @@
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{arg/$~ $~}
|
||||
==
|
||||
[%helm-deset ~]
|
||||
|
15
gen/hood/exit.hoon
Normal file
15
gen/hood/exit.hoon
Normal file
@ -0,0 +1,15 @@
|
||||
::
|
||||
:::: /hoon/exit/hood/gen
|
||||
::
|
||||
/? 310
|
||||
/- sole
|
||||
::
|
||||
::::
|
||||
!:
|
||||
[sole .]
|
||||
:- %say
|
||||
|= $: {now/@da eny/@ bec/beak}
|
||||
{$~ $~}
|
||||
==
|
||||
~& %drum-exit
|
||||
[%drum-exit ~]
|
@ -8,7 +8,7 @@
|
||||
!:
|
||||
[sole .]
|
||||
:- %ask
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{arg/$@($~ {dom/path $~})}
|
||||
$~
|
||||
==
|
||||
|
@ -8,7 +8,7 @@
|
||||
!:
|
||||
[sole .]
|
||||
:- %ask
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{arg/$@($~ {dom/path $~})}
|
||||
$~
|
||||
==
|
||||
|
@ -8,7 +8,7 @@
|
||||
!:
|
||||
[sole .]
|
||||
:- %ask
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{arg/$@($~ {dom/path $~})}
|
||||
$~
|
||||
==
|
||||
|
@ -8,7 +8,7 @@
|
||||
!:
|
||||
[sole .]
|
||||
:- %ask
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{arg/$@($~ {jon/json $~})}
|
||||
$~
|
||||
==
|
||||
|
16
gen/hood/invite.hoon
Normal file
16
gen/hood/invite.hoon
Normal file
@ -0,0 +1,16 @@
|
||||
::
|
||||
:::: /hoon/invite/hood/gen
|
||||
::
|
||||
/? 310
|
||||
::
|
||||
::::
|
||||
::
|
||||
/+ womb
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{{who/@t $~} ref/(unit (each ship mail:womb)) sta/@}
|
||||
==
|
||||
:- %womb-invite
|
||||
^- {cord reference invite}:womb
|
||||
=+ inv=(scot %uv (end 7 1 eny))
|
||||
[inv ref [who 10 sta "You have been invited to Urbit: {(trip inv)}" "This is an invite of 10 planets"]]
|
@ -6,7 +6,7 @@
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{arg/{syd/desk lab/@tas $~} $~}
|
||||
==
|
||||
:- %kiln-label
|
||||
|
@ -6,7 +6,7 @@
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI byk/beak}
|
||||
|= $: {now/@da eny/@uvJ byk/beak}
|
||||
{arg/$?({dap/term $~} {who/ship dap/term $~}) $~}
|
||||
==
|
||||
:- %drum-link
|
||||
|
18
gen/hood/load.hoon
Normal file
18
gen/hood/load.hoon
Normal file
@ -0,0 +1,18 @@
|
||||
::
|
||||
:::: /hoon/load/hood/gen
|
||||
::
|
||||
/? 310
|
||||
/+ womb
|
||||
::
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvJ byk/beak}
|
||||
{{dap/term pas/@uw $~} $~}
|
||||
==
|
||||
^- {$hood-load ?(part:womb)}
|
||||
?+ dap ~|(unknown-backup+dap !!)
|
||||
$womb
|
||||
=+ dat=.^(@ %cx (tope byk /jam-crub/womb-part/bak/hood/app))
|
||||
[%hood-load ;;(part:womb (cue (dy:crub pas dat)))]
|
||||
==
|
13
gen/hood/manage-old-key.hoon
Normal file
13
gen/hood/manage-old-key.hoon
Normal file
@ -0,0 +1,13 @@
|
||||
::
|
||||
:::: /hoon/manage-old-key/hood/gen
|
||||
::
|
||||
/? 310
|
||||
::
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{{who/@p key/@ $~} $~}
|
||||
==
|
||||
:- %womb-manage-old-key
|
||||
[who key]
|
13
gen/hood/manage.hoon
Normal file
13
gen/hood/manage.hoon
Normal file
@ -0,0 +1,13 @@
|
||||
::
|
||||
:::: /hoon/manage/hood/gen
|
||||
::
|
||||
/? 310
|
||||
::
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{who/(list @p) $~}
|
||||
==
|
||||
:- %womb-manage
|
||||
who
|
@ -6,7 +6,7 @@
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{arg/$~ $~}
|
||||
==
|
||||
[%helm-mass ~]
|
||||
|
@ -11,7 +11,7 @@
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI bek/beak}
|
||||
|= $: {now/@da eny/@uvJ bek/beak}
|
||||
{arg/{?(sorc {syd/$@(desk beaky) sorc})} cas/case gem/?($auto germ)}
|
||||
==
|
||||
=* our p.bek
|
||||
|
@ -6,7 +6,7 @@
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{{pax/path pot/$@($~ {v/@tas $~})} $~}
|
||||
==
|
||||
?~ pot
|
||||
|
13
gen/hood/obey.hoon
Normal file
13
gen/hood/obey.hoon
Normal file
@ -0,0 +1,13 @@
|
||||
::
|
||||
:::: /hoon/obey/hood/gen
|
||||
::
|
||||
/? 310
|
||||
::
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{{bos/$@($~ {i/@p $~})} $~}
|
||||
==
|
||||
:- %womb-obey
|
||||
?~(bos ~ (some i.bos))
|
@ -6,7 +6,7 @@
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{arg/$@($~ {tym/@dr $~}) $~}
|
||||
==
|
||||
?~ arg $(arg [~h4 ~])
|
||||
|
@ -6,7 +6,7 @@
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{arg/$~ $~}
|
||||
==
|
||||
[%helm-reload ~[%c]]
|
||||
|
@ -6,7 +6,7 @@
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{arg/$~ $~}
|
||||
==
|
||||
[%helm-reload ~[%z %a %b %c %d %e %f %g]]
|
||||
|
13
gen/hood/reinvite.hoon
Normal file
13
gen/hood/reinvite.hoon
Normal file
@ -0,0 +1,13 @@
|
||||
::
|
||||
:::: /hoon/reinvite/hood/gen
|
||||
::
|
||||
/? 310
|
||||
::
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{{pas/@uvG who/@t $~} $~}
|
||||
==
|
||||
:- %womb-reinvite
|
||||
[pas who 3 0 "You have been inivted to Urbit" "This is a re-invite of 3 planets"]
|
13
gen/hood/rekey.hoon
Normal file
13
gen/hood/rekey.hoon
Normal file
@ -0,0 +1,13 @@
|
||||
::
|
||||
:::: /hoon/rekey/hood/gen
|
||||
::
|
||||
/? 310
|
||||
::
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{$~ $~}
|
||||
==
|
||||
:- %womb-rekey
|
||||
~
|
14
gen/hood/release-ships.hoon
Normal file
14
gen/hood/release-ships.hoon
Normal file
@ -0,0 +1,14 @@
|
||||
::
|
||||
:::: /hoon/release/hood/gen
|
||||
::
|
||||
/? 310
|
||||
::
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{who/(list ship) $~}
|
||||
==
|
||||
:- %womb-release-ships
|
||||
~? =(~ who) %no-ships-released
|
||||
who
|
13
gen/hood/release.hoon
Normal file
13
gen/hood/release.hoon
Normal file
@ -0,0 +1,13 @@
|
||||
::
|
||||
:::: /hoon/release/hood/gen
|
||||
::
|
||||
/? 310
|
||||
::
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{{sta/@u gal/$@($~ {i/@u $~})} $~}
|
||||
==
|
||||
:- %womb-release
|
||||
[?^(gal i.gal 0) sta]
|
@ -6,7 +6,7 @@
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{arg/{desk (list term)} $~}
|
||||
==
|
||||
:- %helm-reload-desk
|
||||
|
@ -6,7 +6,7 @@
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{arg/(list term) $~}
|
||||
==
|
||||
:- %helm-reload
|
||||
|
13
gen/hood/replay-womb-log.hoon
Normal file
13
gen/hood/replay-womb-log.hoon
Normal file
@ -0,0 +1,13 @@
|
||||
::
|
||||
:::: /hoon/reinvite/hood/gen
|
||||
::
|
||||
/? 310
|
||||
/+ womb
|
||||
::
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{log/(list {@uvJ transaction:womb}) $~}
|
||||
==
|
||||
[%womb-replay-log log]
|
13
gen/hood/report.hoon
Normal file
13
gen/hood/report.hoon
Normal file
@ -0,0 +1,13 @@
|
||||
::
|
||||
:::: /hoon/report/hood/gen
|
||||
::
|
||||
/? 310
|
||||
::
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{{her/@p wil/will $~} $~}
|
||||
==
|
||||
:- %womb-report
|
||||
[her wil]
|
@ -6,7 +6,7 @@
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{arg/$~ $~}
|
||||
==
|
||||
[%helm-reset ~]
|
||||
|
@ -6,7 +6,7 @@
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{arg/$~ $~}
|
||||
==
|
||||
[%helm-reload ~[%f]]
|
||||
|
14
gen/hood/save.hoon
Normal file
14
gen/hood/save.hoon
Normal file
@ -0,0 +1,14 @@
|
||||
::
|
||||
:::: /hoon/save/hood/gen
|
||||
::
|
||||
/? 310
|
||||
::
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvJ byk/beak}
|
||||
{{dap/term $~} $~}
|
||||
==
|
||||
?+ dap ~|(unknown-backup+dap !!)
|
||||
$womb [%womb-save (tope byk /womb-part/bak/hood/app)]
|
||||
==
|
@ -6,7 +6,7 @@
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{{pax/$@(term {i/knot t/path}) $~} $~}
|
||||
==
|
||||
:- %helm-serve
|
||||
|
@ -6,7 +6,7 @@
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{arg/{@ $@($~ {@ $~})} $~}
|
||||
==
|
||||
:- %drum-start
|
||||
|
@ -6,7 +6,7 @@
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{arg/{syd/@tas her/@p sud/@tas $~} $~}
|
||||
==
|
||||
:- %kiln-sync
|
||||
|
@ -6,5 +6,5 @@
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= {{now/@da eny/@uvI bec/beak} $~ $~}
|
||||
|= {{now/@da eny/@uvJ bec/beak} $~ $~}
|
||||
[%kiln-syncs ~]
|
||||
|
@ -6,8 +6,8 @@
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{arg/{syd/@tas her/@p sud/@tas $~} $~}
|
||||
==
|
||||
:- %kiln-track
|
||||
[syd her sud]:arg
|
||||
[syd her sud]:arg
|
||||
|
16
gen/hood/transfer.hoon
Normal file
16
gen/hood/transfer.hoon
Normal file
@ -0,0 +1,16 @@
|
||||
::
|
||||
:::: /hoon/transfer/hood/gen
|
||||
::
|
||||
/? 310
|
||||
/+ womb
|
||||
::
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{{pas/@uvH who/@t $~} $~}
|
||||
==
|
||||
:- %womb-reinvite
|
||||
=+ [him=(scot %p p.bec) cas=(scot %da now) key=(scot %p pas)]
|
||||
=+ [pla=planets sta=stars]:.^(balance:womb %gx /[him]/hood/[cas]/womb/balance/[key])
|
||||
[pas who pla sta "Email updated, new passcode" "Email correction"]
|
@ -6,7 +6,7 @@
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI byk/beak}
|
||||
|= $: {now/@da eny/@uvJ byk/beak}
|
||||
{arg/$?({dap/term $~} {who/ship dap/term $~}) $~}
|
||||
==
|
||||
:- %drum-unlink
|
||||
|
@ -6,7 +6,7 @@
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{{mon/$@(term {knot path}) $~} $~}
|
||||
==
|
||||
:- %kiln-unmount
|
||||
|
@ -6,7 +6,7 @@
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{arg/{syd/@tas her/@p sud/@tas $~} $~}
|
||||
==
|
||||
:- %kiln-unsync
|
||||
|
@ -6,7 +6,7 @@
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
$~
|
||||
$~
|
||||
==
|
||||
|
@ -1,6 +1,6 @@
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{{app/term source/path station/knot $~} $~}
|
||||
==
|
||||
[%pipe-cancel app source station]
|
||||
|
@ -1,6 +1,6 @@
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{{app/term source/path station/knot $~} $~}
|
||||
==
|
||||
[%pipe-connect app source station]
|
||||
|
@ -1,6 +1,6 @@
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{$~ $~}
|
||||
==
|
||||
[%pipe-list ~]
|
||||
|
@ -5,10 +5,10 @@
|
||||
:: Input twitter keys
|
||||
/- sole
|
||||
!:
|
||||
=+ cryp=bruw :: XX change to ec2 ++brew eventually
|
||||
=+ cryp=crub
|
||||
=+ [sole]
|
||||
:- %ask
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{{who/ship $~} $~}
|
||||
==
|
||||
^- (sole-result (cask tang))
|
||||
@ -19,9 +19,9 @@
|
||||
%+ sole-lo [%| %pope-none "[press enter to compute]"] :: XX oy
|
||||
%+ sole-go (easy ~)
|
||||
|= $~
|
||||
=+ bur=(shax (add who (shax fra)))
|
||||
=+ bur=(shaz (add who (shaz fra)))
|
||||
~& %computing-fingerprint
|
||||
=+ arc=(cryp 2.048 bur)
|
||||
=+ arc=(pit:nu:cryp 512 bur)
|
||||
%+ sole-so %tang
|
||||
:~ leaf+"generator: {(scow %uw bur)}"
|
||||
leaf+"fingerprint: {(scow %uw fig:ex:arc)}"
|
||||
|
@ -6,7 +6,7 @@
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{$~ $~}
|
||||
==
|
||||
:- %noun
|
||||
|
9
gen/talk/federate.hoon
Normal file
9
gen/talk/federate.hoon
Normal file
@ -0,0 +1,9 @@
|
||||
::
|
||||
:::: /hoon/federate/talk/gen
|
||||
::
|
||||
/? 310
|
||||
/- talk
|
||||
:- %say
|
||||
|= {^ {dest/knot sources/(list station:talk)} $~}
|
||||
:- %talk-command
|
||||
[%design dest ~ (silt (turn sources |=(station:talk [%& +<]))) '' %black ~]
|
@ -6,7 +6,7 @@
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI byk/beak}
|
||||
|= $: {now/@da eny/@uvJ byk/beak}
|
||||
{{man/knot $~} $~}
|
||||
==
|
||||
[%talk-load man]
|
||||
[%talk-load man]
|
||||
|
@ -6,7 +6,7 @@
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI byk/beak}
|
||||
|= $: {now/@da eny/@uvJ byk/beak}
|
||||
{{man/knot $~} $~}
|
||||
==
|
||||
[%talk-log man]
|
||||
[%talk-log man]
|
||||
|
@ -6,7 +6,7 @@
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI byk/beak}
|
||||
|= $: {now/@da eny/@uvJ byk/beak}
|
||||
{{man/knot $~} $~}
|
||||
==
|
||||
[%talk-save man]
|
||||
[%talk-save man]
|
||||
|
@ -6,7 +6,7 @@
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI byk/beak}
|
||||
|= $: {now/@da eny/@uvJ byk/beak}
|
||||
{{man/knot $~} $~}
|
||||
==
|
||||
[%talk-unlog man]
|
||||
[%talk-unlog man]
|
||||
|
@ -6,8 +6,8 @@
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{{her/@p $~} $~}
|
||||
==
|
||||
:- %noun
|
||||
.^(@p /a/(scot %p p.bec)/tick/(scot %da now)/(scot %p her))
|
||||
.^(@p /a/(scot %p p.bec)/tick/(scot %da now)/(scot %p her))
|
||||
|
@ -4,7 +4,7 @@
|
||||
::
|
||||
[twitter .]
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{{who/knot msg/cord $~} $~}
|
||||
==
|
||||
[%twit-do [who %post eny msg]]
|
||||
|
@ -7,7 +7,7 @@
|
||||
:::: ~fyr
|
||||
::
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI bek/beak}
|
||||
|= $: {now/@da eny/@uvJ bek/beak}
|
||||
{{who/iden $~} typ/?($home $user)}
|
||||
==
|
||||
=+ pax=/(scot %p p.bek)/twit/(scot %da now)/[typ]/[who]
|
||||
|
12
gen/womb/balance.hoon
Normal file
12
gen/womb/balance.hoon
Normal file
@ -0,0 +1,12 @@
|
||||
::
|
||||
:::: /hoon/balance/womb/gen
|
||||
::
|
||||
/? 310
|
||||
/+ womb
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{pas/@uvG $~}
|
||||
who/(unit @p)
|
||||
==
|
||||
=- [%womb-balance .^(balance:womb %gx /[him]/hood/[cas]/womb/balance/[key]/womb-balance)]
|
||||
[him=(scot %p ?^(who u.who p.bec)) cas=(scot %da now) key=(scot %uv pas)]
|
13
gen/womb/balances.hoon
Normal file
13
gen/womb/balances.hoon
Normal file
@ -0,0 +1,13 @@
|
||||
::
|
||||
:::: /hoon/balance/womb/gen
|
||||
::
|
||||
/? 310
|
||||
/+ womb
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
$~
|
||||
who/(unit @p)
|
||||
==
|
||||
:- %womb-balance-all
|
||||
=+ [him=(scot %p ?^(who u.who p.bec)) cas=(scot %da now)]
|
||||
.^((set {passhash mail}:womb) %gx /[him]/hood/[cas]/womb/balance/womb-balance-all)
|
12
gen/womb/shop.hoon
Normal file
12
gen/womb/shop.hoon
Normal file
@ -0,0 +1,12 @@
|
||||
::
|
||||
:::: /hoon/shop/womb/gen
|
||||
::
|
||||
/? 310
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
arg/$@($~ {typ/?($stars $planets $galaxies) $~})
|
||||
who/(unit @p)
|
||||
==
|
||||
?~ arg $(arg ~[typ=%planets])
|
||||
=- [%ships .^((list ship) %gx /[him]/hood/[cas]/womb/shop/[typ.arg]/[nth]/ships)]
|
||||
[him=(scot %p ?^(who u.who p.bec)) cas=(scot %da now) nth=(scot %ud %.(10 ~(rad og eny)))]
|
13
gen/womb/stats.hoon
Normal file
13
gen/womb/stats.hoon
Normal file
@ -0,0 +1,13 @@
|
||||
::
|
||||
:::: /hoon/stats/womb/gen
|
||||
::
|
||||
/? 310
|
||||
/+ womb
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
$~
|
||||
who/(unit @p)
|
||||
==
|
||||
:- %womb-stat-all
|
||||
=+ [him=(scot %p ?^(who u.who p.bec)) cas=(scot %da now)]
|
||||
.^((map ship stat:womb) %gx /[him]/hood/[cas]/womb/stats/womb-stat-all)
|
@ -9,18 +9,13 @@
|
||||
:::: :: ::
|
||||
:: :: ::
|
||||
|% :: ::
|
||||
++ drum-part {$drum $1 drum-pith} ::
|
||||
++ drum-part-any ::
|
||||
$: $drum ::
|
||||
$% {$1 drum-pith} ::
|
||||
{$0 drum-pith-0} ::
|
||||
== == ::
|
||||
++ drum-pith-0 :: old drum-pith
|
||||
%+ cork drum-pith |= drum-pith ::
|
||||
+<(bin *(map bone source-0)) ::
|
||||
++ drum-pith ::
|
||||
$: eel/(set gill) :: connect to
|
||||
ray/(set well) ::
|
||||
++ drum-part {$drum $1 drum-pith-1} ::
|
||||
++ drum-part-old {$drum $0 drum-pith-0} ::
|
||||
++ drum-pith-0 _!! :: forgotten
|
||||
++ drum-pith-1 ::
|
||||
$: sys/(unit bone) :: local console
|
||||
eel/(set gill) :: connect to
|
||||
ray/(set well) ::
|
||||
fur/(map dude (unit server)) :: servers
|
||||
bin/(map bone source) :: terminals
|
||||
== ::
|
||||
@ -32,19 +27,12 @@
|
||||
$: syd/desk :: app identity
|
||||
cas/case :: boot case
|
||||
== ::
|
||||
++ kill-0 (unit (list @c)) :: old kill buffer
|
||||
++ kill :: kill ring
|
||||
$: pos/@ud :: ring position
|
||||
num/@ud :: number of entries
|
||||
max/_60 :: max entries
|
||||
old/(list (list @c)) :: entries proper
|
||||
== ::
|
||||
++ source-0 :: old source without
|
||||
%+ cork source |= source :: kill ring or
|
||||
%= +< :: blt.target
|
||||
kil *kill-0 ::
|
||||
fug *(map gill (unit target-0)) ::
|
||||
== ::
|
||||
++ source :: input device
|
||||
$: edg/_80 :: terminal columns
|
||||
off/@ud :: window offset
|
||||
@ -67,8 +55,6 @@
|
||||
$: pos/@ud :: search position
|
||||
str/(list @c) :: search string
|
||||
== ::
|
||||
++ target-0 :: target without blt
|
||||
(cork target |=(target |1.+<)) ::
|
||||
++ target :: application target
|
||||
$: blt/(pair (unit dill-belt) (unit dill-belt)) :: curr & prev belts
|
||||
ris/(unit search) :: reverse-i-search
|
||||
@ -133,25 +119,17 @@
|
||||
^- drum-part
|
||||
:* %drum
|
||||
%1
|
||||
~ :: sys
|
||||
(deft-fish our) :: eel
|
||||
(deft-apes our) :: ray
|
||||
~ :: fur
|
||||
~ :: bin
|
||||
== ::
|
||||
::
|
||||
++ drum-port
|
||||
|= old/drum-part-any
|
||||
^- drum-part
|
||||
?: ?=($1 &2.old) old
|
||||
~& [%drum-porting &2.old]
|
||||
=; bin [%drum %1 |2.old(bin bin)]
|
||||
%- ~(run by bin.old)
|
||||
|= source-0
|
||||
%= +<
|
||||
kil (kill ?~(kil ~ [1 1 60 [u.kil]~]))
|
||||
fug %- ~(run by fug)
|
||||
|= t/(unit target-0)
|
||||
?~(t ~ [~ [[~ ~] u.t]])
|
||||
|= old/?(drum-part drum-part-old) ^- drum-part
|
||||
?- &2.old
|
||||
$1 old
|
||||
$0 !! :: XX unreachable, see issue #242
|
||||
==
|
||||
::
|
||||
++ drum-path :: encode path
|
||||
@ -223,9 +201,13 @@
|
||||
=< se-abet =< se-view
|
||||
(se-klin gyl)
|
||||
::
|
||||
:: ++ poke-exit ::
|
||||
:: |=(~ se-abet:(se-blit `dill-blit`[%qit ~])) :: XX find bone
|
||||
:: ::
|
||||
++ poke-exit ::
|
||||
|=($~ se-abet:(se-blit-sys `dill-blit`[%qit ~])) ::
|
||||
::
|
||||
++ poke-put ::
|
||||
|= {pax/path txt/@}
|
||||
se-abet:(se-blit-sys [%sav pax txt]) ::
|
||||
::
|
||||
++ reap-phat ::
|
||||
|= {way/wire saw/(unit tang)}
|
||||
=< se-abet =< se-view
|
||||
@ -270,6 +252,7 @@
|
||||
?. se-ably
|
||||
=. . se-adit
|
||||
[(flop moz) +>+>+<+]
|
||||
=. sys ?^(sys sys `ost)
|
||||
=. . se-subze:se-adze:se-adit
|
||||
:_ %_(+>+>+<+ bin (~(put by bin) ost `source`+>+<))
|
||||
^- (list move)
|
||||
@ -486,6 +469,11 @@
|
||||
|= bil/dill-blit
|
||||
+>(biz [bil biz])
|
||||
::
|
||||
++ se-blit-sys :: output to system console
|
||||
|= bil/dill-blit ^+ +>
|
||||
?~ sys ~&(%se-blit-no-sys +>)
|
||||
(se-emit [u.sys %diff %dill-blit bil])
|
||||
::
|
||||
++ se-show :: show buffer, raw
|
||||
|= lin/(pair @ud (list @c))
|
||||
^+ +>
|
||||
@ -513,7 +501,12 @@
|
||||
|= mov/move
|
||||
%_(+> moz [mov moz])
|
||||
::
|
||||
++ se-talk
|
||||
++ se-emil :: emit moves
|
||||
|= mov/(list move)
|
||||
?~ mov +>
|
||||
$(mov t.mov, +> (se-emit i.mov))
|
||||
::
|
||||
++ se-talk
|
||||
|= tac/(list tank)
|
||||
^+ +>
|
||||
:: XX talk should be usable for stack traces, see urbit#584 which this change
|
||||
@ -617,10 +610,8 @@
|
||||
ta-bel
|
||||
.(str.u.ris (scag (dec (lent str.u.ris)) str.u.ris))
|
||||
?: =(0 pos.inp)
|
||||
?: =(0 (lent buf.say.inp))
|
||||
(ta-act %clr ~)
|
||||
:: .(+> (se-blit %bel ~))
|
||||
ta-bel
|
||||
(ta-act %clr ~)
|
||||
:: .(+> (se-blit %bel ~))
|
||||
=+ pre=(dec pos.inp)
|
||||
(ta-hom %del pre)
|
||||
::
|
||||
@ -850,9 +841,9 @@
|
||||
$dot ?. &(?=(^ old.hit) ?=(^ -.old.hit))
|
||||
ta-bel
|
||||
=+ old=`(list @c)`-.old.hit
|
||||
=+ b=(bwrd (lent old) old nace)
|
||||
=+ b=(bwrd (lent old) old nedg)
|
||||
%- ta-hom(ris ~)
|
||||
(ta-cat pos.inp (slag (add b =(0 b)) old))
|
||||
(ta-cat pos.inp (slag b old))
|
||||
::
|
||||
$bac ?: =(0 pos.inp)
|
||||
ta-bel
|
||||
|
@ -78,8 +78,8 @@
|
||||
++ poke-begin :: make/send keypair
|
||||
|= hood-begin =< abet
|
||||
?> ?=($~ bur)
|
||||
=+ buz=(shax :(mix (jam ges) eny))
|
||||
=+ loy=(bruw 2.048 buz)
|
||||
=+ buz=(shaz :(mix (jam ges) eny))
|
||||
=+ loy=(pit:nu:crub 512 buz)
|
||||
%- emit(bur `[his [0 sec:ex:loy]~])
|
||||
[%wont /helm/ticket [our (sein his)] /a/ta his tic ges pub:ex:loy]
|
||||
::
|
||||
@ -98,8 +98,8 @@
|
||||
::
|
||||
++ poke-send-ask
|
||||
|= mel/cord =< abet
|
||||
%^ emit %poke /helm/ask/(scot %p ~doznec)
|
||||
[[~doznec %ask] %ask-mail mel]
|
||||
%^ emit %poke /helm/ask/(scot %p ~marzod)
|
||||
[[~marzod %ask] %ask-mail mel]
|
||||
::
|
||||
++ poke-serve
|
||||
|= top/?(desk beam) =< abet
|
||||
|
@ -71,7 +71,7 @@
|
||||
++ our-host .^(hart %e /(scot %p our)/host/fake)
|
||||
++ redirect-uri
|
||||
%- crip %- earn
|
||||
%^ interpolate 'https://our-host/~/ac/:domain/:user/in'
|
||||
%^ into-url:interpolate 'https://our-host/~/ac/:domain/:user/in'
|
||||
`our-host
|
||||
:~ domain+(join '.' (flop dom))
|
||||
user+?:(state-usr '_state' (scot %ta usr))
|
||||
|
203
lib/old-phon.hoon
Normal file
203
lib/old-phon.hoon
Normal file
@ -0,0 +1,203 @@
|
||||
:: Taken from old hoon.hoon
|
||||
::
|
||||
:::: /hoon/old-phon/lib
|
||||
::
|
||||
=< ;~(pfix sig fed:ag)
|
||||
|%
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
:: section 2cE, phonetic base ::
|
||||
::
|
||||
++ po
|
||||
::~/ %po
|
||||
=+ :- ^= sis :: prefix syllables
|
||||
'dozmarbinwansamlitsighidfidlissogdirwacsabwissib\
|
||||
/rigsoldopmodfoglidhopdardorlorhodfolrintogsilmir\
|
||||
/holpaslacrovlivdalsatlibtabhanticpidtorbolfosdot\
|
||||
/losdilforpilramtirwintadbicdifrocwidbisdasmidlop\
|
||||
/rilnardapmolsanlocnovsitnidtipsicropwitnatpanmin\
|
||||
/ritpodmottamtolsavposnapnopsomfinfonbanporworsip\
|
||||
/ronnorbotwicsocwatdolmagpicdavbidbaltimtasmallig\
|
||||
/sivtagpadsaldivdactansidfabtarmonranniswolmispal\
|
||||
/lasdismaprabtobrollatlonnodnavfignomnibpagsopral\
|
||||
/bilhaddocridmocpacravripfaltodtiltinhapmicfanpat\
|
||||
/taclabmogsimsonpinlomrictapfirhasbosbatpochactid\
|
||||
/havsaplindibhosdabbitbarracparloddosbortochilmac\
|
||||
/tomdigfilfasmithobharmighinradmashalraglagfadtop\
|
||||
/mophabnilnosmilfopfamdatnoldinhatnacrisfotribhoc\
|
||||
/nimlarfitwalrapsarnalmoslandondanladdovrivbacpol\
|
||||
/laptalpitnambonrostonfodponsovnocsorlavmatmipfap'
|
||||
^= dex :: suffix syllables
|
||||
'zodnecbudwessevpersutletfulpensytdurwepserwylsun\
|
||||
/rypsyxdyrnuphebpeglupdepdysputlughecryttyvsydnex\
|
||||
/lunmeplutseppesdelsulpedtemledtulmetwenbynhexfeb\
|
||||
/pyldulhetmevruttylwydtepbesdexsefwycburderneppur\
|
||||
/rysrebdennutsubpetrulsynregtydsupsemwynrecmegnet\
|
||||
/secmulnymtevwebsummutnyxrextebfushepbenmuswyxsym\
|
||||
/selrucdecwexsyrwetdylmynmesdetbetbeltuxtugmyrpel\
|
||||
/syptermebsetdutdegtexsurfeltudnuxruxrenwytnubmed\
|
||||
/lytdusnebrumtynseglyxpunresredfunrevrefmectedrus\
|
||||
/bexlebduxrynnumpyxrygryxfeptyrtustyclegnemfermer\
|
||||
/tenlusnussyltecmexpubrymtucfyllepdebbermughuttun\
|
||||
/bylsudpemdevlurdefbusbeprunmelpexdytbyttyplevmyl\
|
||||
/wedducfurfexnulluclennerlexrupnedlecrydlydfenwel\
|
||||
/nydhusrelrudneshesfetdesretdunlernyrsebhulryllud\
|
||||
/remlysfynwerrycsugnysnyllyndyndemluxfedsedbecmun\
|
||||
/lyrtesmudnytbyrsenwegfyrmurtelreptegpecnelnevfes'
|
||||
|%
|
||||
++ ins ::~/ %ins :: parse prefix
|
||||
|= a/@tas
|
||||
=+ b=0
|
||||
|- ^- (unit @)
|
||||
?:(=(256 b) ~ ?:(=(a (tos b)) [~ b] $(b +(b))))
|
||||
++ ind ::~/ %ind :: parse suffix
|
||||
|= a/@tas
|
||||
=+ b=0
|
||||
|- ^- (unit @)
|
||||
?:(=(256 b) ~ ?:(=(a (tod b)) [~ b] $(b +(b))))
|
||||
++ tos ::~/ %tos :: fetch prefix
|
||||
|=(a/@ ?>((lth a 256) (cut 3 [(mul 3 a) 3] sis)))
|
||||
++ tod ::~/ %tod :: fetch suffix
|
||||
|=(a/@ ?>((lth a 256) (cut 3 [(mul 3 a) 3] dex)))
|
||||
--
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
:: section 2eL, formatting (path) ::
|
||||
::
|
||||
++ ab
|
||||
|%
|
||||
++ hif (boss 256 ;~(plug tip tiq (easy ~)))
|
||||
++ huf %+ cook
|
||||
|=({a/@ b/@} (wred:un ~(zug mu ~(zag mu [a b]))))
|
||||
;~(plug hif ;~(pfix hep hif))
|
||||
++ hyf (bass 0x1.0000.0000 ;~(plug huf ;~(pfix hep huf) (easy ~)))
|
||||
++ tip (sear |=(a/@ (ins:po a)) til)
|
||||
++ tiq (sear |=(a/@ (ind:po a)) til)
|
||||
++ til (boss 256 (stun [3 3] low))
|
||||
--
|
||||
++ ag
|
||||
|%
|
||||
++ fed ;~ pose
|
||||
%+ bass 0x1.0000.0000.0000.0000
|
||||
;~((glue doh) ;~(pose hyf:ab huf:ab) (more doh hyf:ab))
|
||||
::
|
||||
hyf:ab
|
||||
huf:ab
|
||||
hif:ab
|
||||
tiq:ab
|
||||
==
|
||||
--
|
||||
::
|
||||
++ mu
|
||||
|_ {top/@ bot/@}
|
||||
++ zag [p=(end 4 1 (add top bot)) q=bot]
|
||||
++ zig [p=(end 4 1 (add top (sub 0x1.0000 bot))) q=bot]
|
||||
++ zug (mix (lsh 4 1 top) bot)
|
||||
--
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
:: section 2eN, pseudo-cryptography ::
|
||||
::
|
||||
++ un :: =(x (wred (wren x)))
|
||||
|%
|
||||
++ wren :: conceal structure
|
||||
|= pyn/@ ^- @
|
||||
=+ len=(met 3 pyn)
|
||||
?: =(0 len)
|
||||
0
|
||||
=> .(len (dec len))
|
||||
=+ mig=(zaft (xafo len (cut 3 [len 1] pyn)))
|
||||
%+ can 3
|
||||
%- flop ^- (list {@ @})
|
||||
:- [1 mig]
|
||||
|- ^- (list {@ @})
|
||||
?: =(0 len)
|
||||
~
|
||||
=> .(len (dec len))
|
||||
=+ mog=(zyft :(mix mig (end 3 1 len) (cut 3 [len 1] pyn)))
|
||||
[[1 mog] $(mig mog)]
|
||||
::
|
||||
++ wred :: restore structure
|
||||
|= cry/@ ^- @
|
||||
=+ len=(met 3 cry)
|
||||
?: =(0 len)
|
||||
0
|
||||
=> .(len (dec len))
|
||||
=+ mig=(cut 3 [len 1] cry)
|
||||
%+ can 3
|
||||
%- flop ^- (list {@ @})
|
||||
:- [1 (xaro len (zart mig))]
|
||||
|- ^- (list {@ @})
|
||||
?: =(0 len)
|
||||
~
|
||||
=> .(len (dec len))
|
||||
=+ mog=(cut 3 [len 1] cry)
|
||||
[[1 :(mix mig (end 3 1 len) (zyrt mog))] $(mig mog)]
|
||||
::
|
||||
++ xafo |=({a/@ b/@} +((mod (add (dec b) a) 255)))
|
||||
++ xaro |=({a/@ b/@} +((mod (add (dec b) (sub 255 (mod a 255))) 255)))
|
||||
::
|
||||
++ zaft :: forward 255-sbox
|
||||
|= a/@D
|
||||
=+ ^= b
|
||||
0xcc.75bc.86c8.2fb1.9a42.f0b3.79a0.92ca.21f6.1e41.cde5.fcc0.
|
||||
7e85.51ae.1005.c72d.1246.07e8.7c64.a914.8d69.d9f4.59c2.8038.
|
||||
1f4a.dca2.6fdf.66f9.f561.a12e.5a16.f7b0.a39f.364e.cb70.7318.
|
||||
1de1.ad31.63d1.abd4.db68.6a33.134d.a760.edee.5434.493a.e323.
|
||||
930d.8f3d.3562.bb81.0b24.43cf.bea5.a6eb.52b4.0229.06b2.6704.
|
||||
78c9.45ec.d75e.58af.c577.b7b9.c40e.017d.90c3.87f8.96fa.1153.
|
||||
0372.7f30.1c32.ac83.ff17.c6e4.d36d.6b55.e2ce.8c71.8a5b.b6f3.
|
||||
9d4b.eab5.8b3c.e7f2.a8fe.9574.5de0.bf20.3f15.9784.9939.5f9c.
|
||||
e609.564f.d8a4.b825.9819.94aa.2c08.8e4c.9b22.477a.2840.3ed6.
|
||||
3750.6ef1.44dd.89ef.6576.d00a.fbda.9ed2.3b6c.7b0c.bde9.2ade.
|
||||
5c88.c182.481a.1b0f.2bfd.d591.2726.57ba
|
||||
(cut 3 [(dec a) 1] b)
|
||||
::
|
||||
++ zart :: reverse 255-sbox
|
||||
|= a/@D
|
||||
=+ ^= b
|
||||
0x68.4f07.ea1c.73c9.75c2.efc8.d559.5125.f621.a7a8.8591.5613.
|
||||
dd52.40eb.65a2.60b7.4bcb.1123.ceb0.1bd6.3c84.2906.b164.19b3.
|
||||
1e95.5fec.ffbc.f187.fbe2.6680.7c77.d30e.e94a.9414.fd9a.017d.
|
||||
3a7e.5a55.8ff5.8bf9.c181.e5b6.6ab2.35da.50aa.9293.3bc0.cdc6.
|
||||
f3bf.1a58.4130.f844.3846.744e.36a0.f205.789e.32d8.5e54.5c22.
|
||||
0f76.fce7.4569.0d99.d26e.e879.dc16.2df4.887f.1ffe.4dba.6f5d.
|
||||
bbcc.2663.1762.aed7.af8a.ca20.dbb4.9bc7.a942.834c.105b.c4d4.
|
||||
8202.3e61.a671.90e6.273d.bdab.3157.cfa4.0c2e.df86.2496.f7ed.
|
||||
2b48.2a9d.5318.a343.d128.be9c.a5ad.6bb5.6dfa.c5e1.3408.128d.
|
||||
2c04.0339.97a1.2ff0.49d0.eeb8.6c0a.0b37.b967.c347.d9ac.e072.
|
||||
e409.7b9f.1598.1d3f.33de.8ce3.8970.8e7a
|
||||
(cut 3 [(dec a) 1] b)
|
||||
::
|
||||
++ zyft :: forward 256-sbox
|
||||
|= a/@D
|
||||
=+ ^= b
|
||||
0xbb49.b71f.b881.b402.17e4.6b86.69b5.1647.115f.dddb.7ca5.
|
||||
8371.4bd5.19a9.b092.605d.0d9b.e030.a0cc.78ba.5706.4d2d.
|
||||
986a.768c.f8e8.c4c7.2f1c.effe.3cae.01c0.253e.65d3.3872.
|
||||
ce0e.7a74.8ac6.daac.7e5c.6479.44ec.4143.3d20.4af0.ee6c.
|
||||
c828.deca.0377.249f.ffcd.7b4f.eb7d.66f2.8951.042e.595a.
|
||||
8e13.f9c3.a79a.f788.6199.9391.7fab.6200.4ce5.0758.e2f1.
|
||||
7594.c945.d218.4248.afa1.e61a.54fb.1482.bea4.96a2.3473.
|
||||
63c2.e7cb.155b.120a.4ed7.bfd8.b31b.4008.f329.fca3.5380.
|
||||
9556.0cb2.8722.2bea.e96e.3ac5.d1bc.10e3.2c52.a62a.b1d6.
|
||||
35aa.d05e.f6a8.0f3b.31ed.559d.09ad.f585.6d21.fd1d.8d67.
|
||||
370b.26f4.70c1.b923.4684.6fbd.cf8b.5036.0539.9cdc.d93f.
|
||||
9068.1edf.8f33.b632.d427.97fa.9ee1
|
||||
(cut 3 [a 1] b)
|
||||
::
|
||||
++ zyrt :: reverse 256-sbox
|
||||
|= a/@D
|
||||
=+ ^= b
|
||||
0x9fc8.2753.6e02.8fcf.8b35.2b20.5598.7caa.c9a9.30b0.9b48.
|
||||
47ce.6371.80f6.407d.00dd.0aa5.ed10.ecb7.0f5a.5c3a.e605.
|
||||
c077.4337.17bd.9eda.62a4.79a7.ccb8.44cd.8e64.1ec4.5b6b.
|
||||
1842.ffd8.1dfb.fd07.f2f9.594c.3be3.73c6.2cb6.8438.e434.
|
||||
8d3d.ea6a.5268.72db.a001.2e11.de8c.88d3.0369.4f7a.87e2.
|
||||
860d.0991.25d0.16b9.978a.4bf4.2a1a.e96c.fa50.85b5.9aeb.
|
||||
9dbb.b2d9.a2d1.7bba.66be.e81f.1946.29a8.f5d2.f30c.2499.
|
||||
c1b3.6583.89e1.ee36.e0b4.6092.937e.d74e.2f6f.513e.9615.
|
||||
9c5d.d581.e7ab.fe74.f01b.78b1.ae75.af57.0ec2.adc7.3245.
|
||||
12bf.2314.3967.0806.31dc.cb94.d43f.493c.54a6.0421.c3a1.
|
||||
1c4a.28ac.fc0b.26ca.5870.e576.f7f1.616d.905f.ef41.33bc.
|
||||
df4d.225e.2d56.7fd6.1395.a3f8.c582
|
||||
(cut 3 [a 1] b)
|
||||
--
|
||||
--
|
@ -31,7 +31,7 @@
|
||||
[now.bol *bouquet [%app dap.bol (crip (earn url))]] :: XX
|
||||
::
|
||||
++ said :: app message
|
||||
|= {our/@p dap/term now/@da eny/@uvI mes/(list tank)}
|
||||
|= {our/@p dap/term now/@da eny/@uvJ mes/(list tank)}
|
||||
:- %talk-command
|
||||
^- command
|
||||
:- %publish
|
||||
|
851
lib/womb.hoon
Normal file
851
lib/womb.hoon
Normal file
@ -0,0 +1,851 @@
|
||||
:: :: ::
|
||||
:::: /hoon/womb/lib :: ::
|
||||
:: :: ::
|
||||
/? 310 :: version
|
||||
/+ talk, old-phon
|
||||
:: :: ::
|
||||
:::: :: ::
|
||||
:: :: ::
|
||||
|%
|
||||
++ foil :: ship allocation map
|
||||
|* mold :: entry mold
|
||||
$: min/@u :: minimum entry
|
||||
ctr/@u :: next allocated
|
||||
und/(set @u) :: free under counter
|
||||
ove/(set @u) :: alloc over counter
|
||||
max/@u :: maximum entry
|
||||
box/(map @u +<) :: entries
|
||||
== ::
|
||||
-- ::
|
||||
:: ::
|
||||
:::: ::
|
||||
:: ::
|
||||
|% ::
|
||||
++ managed :: managed plot
|
||||
|* mold ::
|
||||
%- unit :: unsplit
|
||||
%+ each +< :: subdivided
|
||||
mail :: delivered
|
||||
:: ::
|
||||
++ divided :: get division state
|
||||
|* (managed) ::
|
||||
?- +< ::
|
||||
$~ ~ :: unsplit
|
||||
{$~ $| *} ~ :: delivered
|
||||
{$~ $& *} (some p.u.+<) :: subdivided
|
||||
== ::
|
||||
:: ::
|
||||
++ moon (managed _!!) :: undivided moon
|
||||
::
|
||||
++ planet :: subdivided planet
|
||||
(managed (lone (foil moon))) ::
|
||||
:: ::
|
||||
++ star :: subdivided star
|
||||
(managed (pair (foil moon) (foil planet))) ::
|
||||
:: ::
|
||||
++ galaxy :: subdivided galaxy
|
||||
(managed (trel (foil moon) (foil planet) (foil star)))::
|
||||
:: ::
|
||||
++ ticket @G :: old 64-bit ticket
|
||||
++ passcode @uvH :: 128-bit passcode
|
||||
++ passhash @uwH :: passocde hash
|
||||
++ mail @t :: email address
|
||||
++ balance :: invitation balance
|
||||
$: planets/@ud :: planet count
|
||||
stars/@ud :: star count
|
||||
owner/mail :: owner's email
|
||||
history/(list mail) :: transfer history
|
||||
== ::
|
||||
++ client :: per email
|
||||
$: sta/@ud :: unused star refs
|
||||
has/(set @p) :: planets owned
|
||||
== ::
|
||||
++ property :: subdivided plots
|
||||
$: galaxies/(map @p galaxy) :: galaxy
|
||||
planets/(map @p planet) :: star
|
||||
stars/(map @p star) :: planet
|
||||
== ::
|
||||
++ invite ::
|
||||
$: who/mail :: who to send to
|
||||
pla/@ud :: planets to send
|
||||
sta/@ud :: stars to send
|
||||
wel/welcome :: welcome message
|
||||
== ::
|
||||
++ welcome :: welcome message
|
||||
$: intro/tape :: in invite email
|
||||
hello/tape :: as talk message
|
||||
== ::
|
||||
++ reference :: affiliate credit
|
||||
(unit (each @p mail)) :: ship or email
|
||||
:: ::
|
||||
++ reference-rate 2 :: star refs per star
|
||||
++ stat (pair live dist) :: external info
|
||||
++ live ?($cold $seen $live) :: online status
|
||||
++ dist :: allocation
|
||||
$% {$free $~} :: unallocated
|
||||
{$owned p/mail} :: granted, status
|
||||
{$split p/(map ship stat)} :: all given ships
|
||||
== ::
|
||||
:: ::
|
||||
++ ames-tell :: .^ a+/=tell= type
|
||||
|^ {p/(list elem) q/(list elem)} ::
|
||||
++ elem $^ {p/elem q/elem} ::
|
||||
{term p/*} :: somewhat underspecified
|
||||
-- ::
|
||||
-- ::
|
||||
:: :: ::
|
||||
:::: :: ::
|
||||
:: :: ::
|
||||
|%
|
||||
++ part {$womb $1 pith} :: womb state
|
||||
++ pith :: womb content
|
||||
$: boss/(unit ship) :: outside master
|
||||
bureau/(map passhash balance) :: active invitations
|
||||
office/property :: properties managed
|
||||
hotel/(map (each ship mail) client) :: everyone we know
|
||||
recycling/(map ship @) :: old ticket keys
|
||||
== ::
|
||||
-- ::
|
||||
:: :: ::
|
||||
:::: :: ::
|
||||
:: :: ::
|
||||
|% :: arvo structures
|
||||
++ card ::
|
||||
$% {$flog wire flog} ::
|
||||
{$info wire @p @tas nori} :: fs write (backup)
|
||||
:: {$wait $~} :: delay acknowledgment
|
||||
{$diff gilt} :: subscription response
|
||||
{$poke wire dock pear} :: app RPC
|
||||
{$next wire p/ring} :: update private key
|
||||
{$tick wire p/@pG q/@p} :: save ticket
|
||||
{$knew wire p/ship q/will} :: learn will (old pki)
|
||||
== ::
|
||||
++ pear ::
|
||||
$% {$email mail tape wall} :: send email
|
||||
{$womb-do-ticket ship} :: request ticket
|
||||
{$womb-do-claim ship @p} :: issue ship
|
||||
{$drum-put path @t} :: log transaction
|
||||
== ::
|
||||
++ gilt :: scry result
|
||||
$% {$ships (list ship)} ::
|
||||
{$womb-balance balance} ::
|
||||
{$womb-balance-all (map passhash mail)} ::
|
||||
{$womb-stat stat} ::
|
||||
{$womb-stat-all (map ship stat)} ::
|
||||
{$womb-ticket-info passcode ?($fail $good $used)} ::
|
||||
==
|
||||
++ move (pair bone card) :: user-level move
|
||||
::
|
||||
++ transaction :: logged poke
|
||||
$% {$report her/@p wyl/will}
|
||||
{$release gal/@ud sta/@ud}
|
||||
{$release-ships (list ship)}
|
||||
{$claim aut/passcode her/@p}
|
||||
{$recycle who/mail him/knot tik/knot}
|
||||
{$bonus tid/cord pla/@ud sta/@ud}
|
||||
{$invite tid/cord ref/reference inv/invite}
|
||||
{$reinvite aut/passcode inv/invite}
|
||||
==
|
||||
--
|
||||
|%
|
||||
++ ames-grab :: XX better ames scry
|
||||
|= {a/term b/ames-tell} ^- *
|
||||
=; all (~(got by all) a)
|
||||
%- ~(gas by *(map term *))
|
||||
%- zing
|
||||
%+ turn (weld p.b q.b)
|
||||
|= b/elem:ames-tell ^- (list {term *})
|
||||
?@ -.b [b]~
|
||||
(weld $(b p.b) $(b q.b))
|
||||
::
|
||||
++ murn-by
|
||||
|* {a/(map) b/$-(* (unit))}
|
||||
^- ?~(a !! (map _p.n.a _(need (b q.n.a))))
|
||||
%- malt
|
||||
%+ murn (~(tap by a))
|
||||
?~ a $~
|
||||
|= _c=n.a ^- (unit _[p.n.a (need (b q.n.a))])
|
||||
=+ d=(b q.c)
|
||||
?~(d ~ (some [p.c u.d]))
|
||||
::
|
||||
++ unsplit
|
||||
|= a/(map ship (managed)) ^- (list {ship *})
|
||||
%+ skim (~(tap by a))
|
||||
|=({@ a/(managed)} ?=($~ a))
|
||||
::
|
||||
++ issuing
|
||||
|* a/(map ship (managed))
|
||||
^- (list {ship _(need (divided *~(got by a)))})
|
||||
(sort (~(tap by (murn-by a divided))) lor)
|
||||
::
|
||||
++ issuing-under
|
||||
|* {a/bloq b/ship c/(map @u (managed))}
|
||||
^- (list {ship _(need (divided *~(got by c)))})
|
||||
%+ turn (sort (~(tap by (murn-by c divided))) lor)
|
||||
|*(d/{@u *} [(rep a b -.d ~) +.d])
|
||||
++ cursor (pair (unit ship) @u)
|
||||
++ neis |=(a/ship ^-(@u (rsh (dec (xeb (dec (xeb a)))) 1 a))) :: postfix
|
||||
::
|
||||
:: Create new foil of size
|
||||
++ fo-init
|
||||
|= a/bloq :: ^- (foil *)
|
||||
[min=1 ctr=1 und=~ ove=~ max=(dec (bex (bex a))) box=~]
|
||||
::
|
||||
++ fo
|
||||
|_ (foil $@($~ *))
|
||||
++ nth :: index
|
||||
|= a/@u ^- (pair (unit @u) @u)
|
||||
?: (lth a ~(wyt in und))
|
||||
=+ out=(snag a (sort (~(tap in und)) lth))
|
||||
[(some out) 0]
|
||||
=. a (sub a ~(wyt in und))
|
||||
|- ^- {(unit @u) @u}
|
||||
?: =(ctr +(max)) [~ a]
|
||||
?: =(0 a) [(some ctr) a]
|
||||
$(a (dec a), +<.nth new)
|
||||
::
|
||||
+- fin +< :: abet
|
||||
++ new :: alloc
|
||||
?: =(ctr +(max)) +<
|
||||
=. ctr +(ctr)
|
||||
?. (~(has in ove) ctr) +<
|
||||
new(ove (~(del in ove) ctr))
|
||||
::
|
||||
+- get :: nullable
|
||||
|= a/@p ^+ ?~(box ~ q.n.box)
|
||||
(fall (~(get by box) (neis a)) ~)
|
||||
::
|
||||
+- put
|
||||
|* {a/@u b/*} ^+ fin :: b/_(~(got by box))
|
||||
~| put+[a fin]
|
||||
?> (fit a)
|
||||
=; adj adj(box (~(put by box) a b))
|
||||
?: (~(has in box) a) fin
|
||||
?: =(ctr a) new
|
||||
?: (lth a ctr)
|
||||
?. (~(has in und) a) fin
|
||||
fin(und (~(del in und) a))
|
||||
?. =(a ctr:new) :: heuristic
|
||||
fin(ove (~(put in ove) a))
|
||||
=+ n=new(+< new)
|
||||
n(und (~(put in und.n) ctr))
|
||||
::
|
||||
++ fit |=(a/@u &((lte min a) (lte a max))) :: in range
|
||||
++ gud :: invariant
|
||||
?& (fit(max +(max)) ctr)
|
||||
(~(all in und) fit(max ctr))
|
||||
(~(all in ove) fit(min ctr))
|
||||
(~(all in box) |=({a/@u *} (fit a)))
|
||||
|- ^- ?
|
||||
?: =(min max) &
|
||||
=- &(- $(min +(min)))
|
||||
%+ gte 1 :: at most one of
|
||||
;: add
|
||||
?:(=(min ctr) 1 0)
|
||||
?:((~(has in und) min) 1 0)
|
||||
?:((~(has in ove) min) 1 0)
|
||||
?:((~(has by box) min) 1 0)
|
||||
==
|
||||
==
|
||||
--
|
||||
--
|
||||
:: :: ::
|
||||
:::: :: ::
|
||||
!: :: ::
|
||||
=+ cfg=[can-claim=| can-recycle=|] :: temporarily disabled
|
||||
=+ [replay=| stat-no-email=|] :: XX globals
|
||||
|= {bowl part} :: main womb work
|
||||
|_ moz/(list move)
|
||||
++ abet :: resolve
|
||||
^- (quip move *part)
|
||||
[(flop moz) +>+<+]
|
||||
::
|
||||
++ teba :: install resolved
|
||||
|= a/(quip move *part) ^+ +>
|
||||
+>(moz (flop -.a), +>+<+ +.a)
|
||||
::
|
||||
++ emit |=(card %_(+> moz [[ost +<] moz])) :: return card
|
||||
++ emil :: return cards
|
||||
|= (list card)
|
||||
^+ +>
|
||||
?~(+< +> $(+< t.+<, +> (emit i.+<)))
|
||||
::
|
||||
::
|
||||
++ take-n :: compute range
|
||||
|= {{index/@u count/@u} get/$-(@u cursor)}
|
||||
^- (list ship)
|
||||
?~ count ~
|
||||
%+ biff p:(get index)
|
||||
|= a/ship ^- (list ship)
|
||||
[a ^$(index +(index), count (dec count))]
|
||||
::
|
||||
++ available :: enumerate free ships
|
||||
|= all/(map ship (managed)) ^- $-(@u cursor)
|
||||
=+ pur=(sort (turn (unsplit all) head) lth)
|
||||
=+ len=(lent pur)
|
||||
|=(a/@u ?:((gte a len) [~ (sub a len)] [(some (snag a pur)) a]))
|
||||
::
|
||||
:: foil cursor to ship cursor, using sized parent
|
||||
++ prefix
|
||||
|= {a/bloq b/@p {c/(unit @u) d/@u}} ^- cursor
|
||||
?~ c [c d]
|
||||
[(some (rep a b u.c ~)) d]
|
||||
::
|
||||
++ in-list :: distribute among options
|
||||
|* {a/(list) b/@u} ^+ [(snag *@ a) b]
|
||||
=+ c=(lent a)
|
||||
[(snag (mod b c) a) (div b c)]
|
||||
::
|
||||
++ ames-last-seen :: last succesful ping
|
||||
|= a/ship ~+ ^- (unit time)
|
||||
?: =(a our) (some now)
|
||||
%- (hard (unit time))
|
||||
~| ames-look+/(scot %p our)/tell/(scot %da now)/(scot %p a)
|
||||
%+ ames-grab %rue
|
||||
.^(ames-tell %a /(scot %p our)/tell/(scot %da now)/(scot %p a))
|
||||
::
|
||||
++ neighboured :: filter for connectivity
|
||||
|* a/(list {ship *}) ^+ a
|
||||
%+ skim a
|
||||
|= {b/ship *}
|
||||
?=(^ (ames-last-seen b))
|
||||
::
|
||||
++ shop-galaxies (available galaxies.office) :: unassigned %czar
|
||||
::
|
||||
:: Stars can be either whole or children of galaxies
|
||||
++ shop-stars :: unassigned %king
|
||||
|= nth/@u ^- cursor
|
||||
=^ out nth %.(nth (available stars.office))
|
||||
?^ out [out nth]
|
||||
%+ shop-star nth
|
||||
(neighboured (issuing galaxies.office))
|
||||
::
|
||||
++ shop-star :: star from galaxies
|
||||
|= {nth/@u lax/(list {who/@p * * r/(foil star)})} ^- cursor
|
||||
?: =(~ lax) [~ nth]
|
||||
=^ sel nth (in-list lax nth)
|
||||
(prefix 3 who.sel (~(nth fo r.sel) nth))
|
||||
::
|
||||
++ shop-planets :: unassigned %duke
|
||||
|= nth/@u ^- cursor
|
||||
=^ out nth %.(nth (available planets.office))
|
||||
?^ out [out nth]
|
||||
=^ out nth
|
||||
%+ shop-planet nth
|
||||
(neighboured (issuing stars.office))
|
||||
?^ out [out nth]
|
||||
(shop-planet-gal nth (issuing galaxies.office))
|
||||
::
|
||||
++ shop-planet :: planet from stars
|
||||
|= {nth/@u sta/(list {who/@p * q/(foil planet)})} ^- cursor
|
||||
?: =(~ sta) [~ nth]
|
||||
=^ sel nth (in-list sta nth)
|
||||
(prefix 4 who.sel (~(nth fo q.sel) nth))
|
||||
::
|
||||
++ shop-planet-gal :: planet from galaxies
|
||||
|= {nth/@u lax/(list {who/@p * * r/(foil star)})} ^- cursor
|
||||
?: =(~ lax) [~ nth]
|
||||
=^ sel nth (in-list lax nth)
|
||||
%+ shop-planet nth
|
||||
(neighboured (issuing-under 3 who.sel box.r.sel))
|
||||
::
|
||||
++ peek-x-shop :: available ships
|
||||
|= tyl/path ^- (unit (unit {$ships (list @p)}))
|
||||
=; a ~& peek-x-shop+[tyl a] a
|
||||
=; res (some (some [%ships res]))
|
||||
=+ [typ nth]=~|(bad-path+tyl (raid tyl typ=%tas nth=%ud ~))
|
||||
:: =. nth (mul 3 nth)
|
||||
?+ typ ~|(bad-type+typ !!)
|
||||
$galaxies (take-n [nth 3] shop-galaxies)
|
||||
$planets (take-n [nth 3] shop-planets)
|
||||
$stars (take-n [nth 3] shop-stars)
|
||||
==
|
||||
::
|
||||
++ get-managed-galaxy ~(got by galaxies.office) :: office read
|
||||
++ mod-managed-galaxy :: office write
|
||||
|= {who/@p mod/$-(galaxy galaxy)} ^+ +>
|
||||
=+ gal=(mod (get-managed-galaxy who))
|
||||
+>.$(galaxies.office (~(put by galaxies.office) who gal))
|
||||
::
|
||||
++ get-managed-star :: office read
|
||||
|= who/@p ^- star
|
||||
=+ (~(get by stars.office) who)
|
||||
?^ - u
|
||||
=+ gal=(get-managed-galaxy (sein who))
|
||||
?. ?=({$~ $& *} gal) ~|(unavailable-star+(sein who) !!)
|
||||
(fall (~(get by box.r.p.u.gal) (neis who)) ~)
|
||||
::
|
||||
++ mod-managed-star :: office write
|
||||
|= {who/@p mod/$-(star star)} ^+ +>
|
||||
=+ sta=(mod (get-managed-star who)) :: XX double traverse
|
||||
?: (~(has by stars.office) who)
|
||||
+>.$(stars.office (~(put by stars.office) who sta))
|
||||
%+ mod-managed-galaxy (sein who)
|
||||
|= gal/galaxy ^- galaxy
|
||||
?> ?=({$~ $& *} gal)
|
||||
gal(r.p.u (~(put fo r.p.u.gal) (neis who) sta))
|
||||
::
|
||||
++ get-managed-planet :: office read
|
||||
|= who/@p ^- planet
|
||||
=+ (~(get by planets.office) who)
|
||||
?^ - u
|
||||
?: (~(has by galaxies.office) (sein who))
|
||||
=+ gal=(get-managed-galaxy (sein who))
|
||||
?. ?=({$~ $& *} gal) ~|(unavailable-galaxy+(sein who) !!)
|
||||
(~(get fo q.p.u.gal) who)
|
||||
=+ sta=(get-managed-star (sein who))
|
||||
?. ?=({$~ $& *} sta) ~|(unavailable-star+(sein who) !!)
|
||||
(~(get fo q.p.u.sta) who)
|
||||
::
|
||||
++ mod-managed-planet :: office write
|
||||
|= {who/@p mod/$-(planet planet)} ^+ +>
|
||||
=+ pla=(mod (get-managed-planet who)) :: XX double traverse
|
||||
?: (~(has by planets.office) who)
|
||||
+>.$(planets.office (~(put by planets.office) who pla))
|
||||
?: (~(has by galaxies.office) (sein who))
|
||||
%+ mod-managed-galaxy (sein who)
|
||||
|= gal/galaxy ^- galaxy
|
||||
?> ?=({$~ $& *} gal)
|
||||
gal(q.p.u (~(put fo q.p.u.gal) (neis who) pla))
|
||||
%+ mod-managed-star (sein who)
|
||||
|= sta/star ^- star
|
||||
?> ?=({$~ $& *} sta)
|
||||
sta(q.p.u (~(put fo q.p.u.sta) (neis who) pla))
|
||||
::
|
||||
++ get-live :: last-heard time ++live
|
||||
|= a/ship ^- live
|
||||
=+ rue=(ames-last-seen a)
|
||||
?~ rue %cold
|
||||
?:((gth (sub now u.rue) ~m5) %seen %live)
|
||||
::
|
||||
++ stat-any :: unsplit status
|
||||
|= {who/@p man/(managed _!!)} ^- stat
|
||||
:- (get-live who)
|
||||
?~ man [%free ~]
|
||||
?: stat-no-email [%owned '']
|
||||
[%owned p.u.man]
|
||||
::
|
||||
++ stat-planet :: stat of planet
|
||||
|= {who/@p man/planet} ^- stat
|
||||
?. ?=({$~ $& ^} man) (stat-any who man)
|
||||
:- (get-live who)
|
||||
=+ pla=u:(divided man)
|
||||
:- %split
|
||||
%- malt
|
||||
%+ turn (~(tap by box.p.pla))
|
||||
|=({a/@u b/moon} =+((rep 5 who a ~) [- (stat-any - b)]))
|
||||
::
|
||||
++ stat-star :: stat of star
|
||||
|= {who/@p man/star} ^- stat
|
||||
?. ?=({$~ $& ^} man) (stat-any who man)
|
||||
:- (get-live who)
|
||||
=+ sta=u:(divided man)
|
||||
:- %split
|
||||
%- malt
|
||||
%+ welp
|
||||
%+ turn (~(tap by box.p.sta))
|
||||
|=({a/@u b/moon} =+((rep 5 who a ~) [- (stat-any - b)]))
|
||||
%+ turn (~(tap by box.q.sta))
|
||||
|=({a/@u b/planet} =+((rep 4 who a ~) [- (stat-planet - b)]))
|
||||
::
|
||||
++ stat-galaxy :: stat of galaxy
|
||||
|= {who/@p man/galaxy} ^- stat
|
||||
?. ?=({$~ $& ^} man) (stat-any who man)
|
||||
=+ gal=u:(divided man)
|
||||
:- (get-live who)
|
||||
:- %split
|
||||
%- malt
|
||||
;: welp
|
||||
%+ turn (~(tap by box.p.gal))
|
||||
|=({a/@u b/moon} =+((rep 5 who a ~) [- (stat-any - b)]))
|
||||
::
|
||||
%+ turn (~(tap by box.q.gal))
|
||||
|=({a/@u b/planet} =+((rep 4 who a ~) [- (stat-planet - b)]))
|
||||
::
|
||||
%+ turn (~(tap by box.r.gal))
|
||||
|=({a/@u b/star} =+((rep 3 who a ~) [- (stat-star - b)]))
|
||||
==
|
||||
::
|
||||
++ stats-ship :: inspect ship
|
||||
|= who/@p ^- stat
|
||||
?- (clan who)
|
||||
$pawn !!
|
||||
$earl !!
|
||||
$duke (stat-planet who (get-managed-planet who))
|
||||
$king (stat-star who (get-managed-star who))
|
||||
$czar (stat-galaxy who (get-managed-galaxy who))
|
||||
==
|
||||
::
|
||||
++ peek-x-stats :: inspect ship/system
|
||||
|= tyl/path
|
||||
?^ tyl
|
||||
?> |(=(our src) =([~ src] boss)) :: privileged info
|
||||
``womb-stat+(stats-ship ~|(bad-path+tyl (raid tyl who=%p ~)))
|
||||
^- (unit (unit {$womb-stat-all (map ship stat)}))
|
||||
=. stat-no-email & :: censor adresses
|
||||
:^ ~ ~ %womb-stat-all
|
||||
%- ~(uni by (~(urn by planets.office) stat-planet))
|
||||
%- ~(uni by (~(urn by stars.office) stat-star))
|
||||
(~(urn by galaxies.office) stat-galaxy)
|
||||
::
|
||||
++ peek-x-balance :: inspect invitation
|
||||
|= tyl/path
|
||||
?~ tyl
|
||||
?> |(=(our src) =([~ src] boss)) :: priveledged
|
||||
``[%womb-balance-all (~(run by bureau) |=(balance owner))]
|
||||
^- (unit (unit {$womb-balance balance}))
|
||||
=+ pas=~|(bad-path+tyl (raid tyl pas=%uv ~))
|
||||
%- some
|
||||
%+ bind (~(get by bureau) (shaf %pass pas))
|
||||
|=(bal/balance [%womb-balance bal])
|
||||
::
|
||||
:: ++ old-phon ;~(pfix sig fed:ag:hoon151) :: library
|
||||
++ parse-ticket
|
||||
|= {a/knot b/knot} ^- {him/@ tik/@}
|
||||
[him=(rash a old-phon) tik=(rash b old-phon)]
|
||||
::
|
||||
++ check-old-ticket
|
||||
|= {a/ship b/@pG} ^- (unit ?)
|
||||
%+ bind (~(get by recycling) (sein a))
|
||||
|= key/@ ^- ?
|
||||
=(b `@p`(end 6 1 (shaf %tick (mix a (shax key)))))
|
||||
::
|
||||
::
|
||||
++ peek-x-ticket
|
||||
|= tyl/path
|
||||
^- (unit (unit {$womb-ticket-info passcode ?($fail $good $used)}))
|
||||
?. ?=({@ @ $~} tyl) ~|(bad-path+tyl !!)
|
||||
=+ [him tik]=(parse-ticket i.tyl i.t.tyl)
|
||||
%+ bind (check-old-ticket him tik)
|
||||
|= gud/?
|
||||
:+ ~ %womb-ticket-info
|
||||
=+ pas=`passcode`(end 7 1 (sham %tick him tik))
|
||||
:- pas
|
||||
?. gud %fail
|
||||
?: (~(has by bureau) (shaf %pass pas)) %used
|
||||
%good
|
||||
::
|
||||
++ peer-scry-x :: subscription like .^
|
||||
|= tyl/path
|
||||
=< abet
|
||||
=+ gil=(peek-x tyl)
|
||||
~| tyl
|
||||
?~ gil ~|(%block-stub !!)
|
||||
?~ u.gil ~|(%bad-path !!)
|
||||
(emit %diff u.u.gil)
|
||||
::
|
||||
++ peek-x :: stateless read
|
||||
|= tyl/path ^- (unit (unit gilt))
|
||||
~| peek+x+tyl
|
||||
?~ tyl ~
|
||||
?+ -.tyl ~
|
||||
:: /shop/planets/@ud (list @p) up to 3 planets
|
||||
:: /shop/stars/@ud (list @p) up to 3 stars
|
||||
:: /shop/galaxies/@ud (list @p) up to 3 galaxies
|
||||
$shop (peek-x-shop +.tyl)
|
||||
:: /stats general stats dump
|
||||
:: /stats/@p what we know about @p
|
||||
$stats (peek-x-stats +.tyl)
|
||||
:: /balance all invitations
|
||||
:: /balance/passcode invitation status
|
||||
$balance (peek-x-balance +.tyl)
|
||||
:: /ticket/ship/ticket check ticket usability
|
||||
$ticket (peek-x-ticket +.tyl)
|
||||
==
|
||||
::
|
||||
++ poke-manage-old-key :: add to recyclable tickets
|
||||
|= {a/ship b/@}
|
||||
=< abet
|
||||
?> |(=(our src) =([~ src] boss)) :: privileged
|
||||
.(recycling (~(put by recycling) a b))
|
||||
::
|
||||
++ poke-manage :: add to property
|
||||
|= a/(list ship)
|
||||
=< abet
|
||||
?> |(=(our src) =([~ src] boss)) :: privileged
|
||||
|-
|
||||
?~ a .
|
||||
?+ (clan i.a) ~|(bad-size+(clan i.a) !!)
|
||||
$duke
|
||||
?. (~(has by planets.office) i.a)
|
||||
$(a t.a, planets.office (~(put by planets.office) i.a ~))
|
||||
~|(already-managing+i.a !!)
|
||||
::
|
||||
$king
|
||||
?. (~(has by stars.office) i.a)
|
||||
$(a t.a, stars.office (~(put by stars.office) i.a ~))
|
||||
~|(already-managing+i.a !!)
|
||||
::
|
||||
$czar
|
||||
?. (~(has by galaxies.office) i.a)
|
||||
$(a t.a, galaxies.office (~(put by galaxies.office) i.a ~))
|
||||
~|(already-managing+i.a !!)
|
||||
==
|
||||
::
|
||||
++ email :: send email
|
||||
|= {wir/wire adr/mail msg/tape} ^+ +>
|
||||
?: replay +> :: dont's send email in replay mode
|
||||
~& do-email+[adr msg]
|
||||
::~&([%email-stub adr msg] +>)
|
||||
(emit %poke womb+[%mail wir] [our %gmail] %email adr "Your Urbit Invitation" [msg]~)
|
||||
::
|
||||
++ log-transaction :: logged poke
|
||||
|= a/transaction ^+ +>
|
||||
?: replay +>
|
||||
(emit %poke /womb/log [our %hood] %drum-put /womb-events/(scot %da now)/hoon (crip <eny a>))
|
||||
::
|
||||
++ poke-replay-log :: rerun transactions
|
||||
|= a/(list {eny/@uvJ pok/transaction})
|
||||
?~ a abet
|
||||
~& womb-replay+-.pok.i.a
|
||||
=. eny eny.i.a
|
||||
=. replay &
|
||||
%_ $
|
||||
a t.a
|
||||
+>
|
||||
?- -.pok.i.a
|
||||
$claim (teba (poke-claim +.pok.i.a))
|
||||
$bonus (teba (poke-bonus +.pok.i.a))
|
||||
$invite (teba (poke-invite +.pok.i.a))
|
||||
$report (teba (poke-report +.pok.i.a))
|
||||
$release (teba (poke-release +.pok.i.a))
|
||||
$recycle (teba (poke-recycle +.pok.i.a))
|
||||
$reinvite (teba (poke-reinvite +.pok.i.a))
|
||||
$release-ships (teba (poke-release-ships +.pok.i.a))
|
||||
==
|
||||
==
|
||||
::
|
||||
++ poke-bonus :: expand invitation
|
||||
|= {tid/cord pla/@ud sta/@ud}
|
||||
=< abet
|
||||
=. log-transaction (log-transaction %bonus +<)
|
||||
?> |(=(our src) =([~ src] boss)) :: priveledged
|
||||
=/ pas ~|(bad-invite+tid `passcode`(slav %uv tid))
|
||||
%_ .
|
||||
bureau
|
||||
%+ ~(put by bureau) (shaf %pass pas)
|
||||
=/ bal ~|(%bad-passcode (~(got by bureau) (shaf %pass pas)))
|
||||
bal(planets (add pla planets.bal), stars (add sta stars.bal))
|
||||
==
|
||||
::
|
||||
++ poke-invite :: create invitation
|
||||
|= {tid/cord ref/reference inv/invite}
|
||||
=< abet
|
||||
=. log-transaction (log-transaction %invite +<)
|
||||
=. hotel
|
||||
?~ ref hotel
|
||||
?~ sta.inv hotel
|
||||
%+ ~(put by hotel) u.ref
|
||||
=+ cli=(fall (~(get by hotel) u.ref) *client)
|
||||
cli(sta +(sta.cli))
|
||||
(invite-from ~ tid inv)
|
||||
::
|
||||
++ invite-from :: traced invitation
|
||||
|= {hiz/(list mail) tid/cord inv/invite} ^+ +>
|
||||
?> |(=(our src) =([~ src] boss)) :: priveledged
|
||||
=+ pas=~|(bad-invite+tid `passcode`(slav %uv tid))
|
||||
?: (~(has by bureau) (shaf %pass pas))
|
||||
~|([%duplicate-passcode pas who.inv replay=replay] !!)
|
||||
=. bureau (~(put by bureau) (shaf %pass pas) [pla.inv sta.inv who.inv hiz])
|
||||
(email /invite who.inv intro.wel.inv)
|
||||
::
|
||||
:: ++ coup-invite :: invite sent
|
||||
::
|
||||
++ poke-reinvite :: split invitation
|
||||
|= {aut/passcode inv/invite} :: further invite
|
||||
=< abet
|
||||
=. log-transaction (log-transaction %reinvite +<)
|
||||
?> =(src src) :: self-authenticated
|
||||
=+ ~|(%bad-passcode bal=(~(got by bureau) (shaf %pass aut)))
|
||||
=. stars.bal (sub stars.bal sta.inv)
|
||||
=. planets.bal (sub planets.bal pla.inv)
|
||||
=. bureau (~(put by bureau) (shaf %pass aut) bal)
|
||||
=+ tid=(scot %uv (end 7 1 (shaf %pass eny)))
|
||||
(invite-from [owner.bal history.bal] tid inv)
|
||||
::
|
||||
++ poke-obey :: set/reset boss
|
||||
|= who/(unit @p)
|
||||
=< abet
|
||||
?> =(our src) :: me only
|
||||
.(boss who)
|
||||
::
|
||||
++ poke-save :: write backup
|
||||
|= pax/path
|
||||
=< abet
|
||||
?> =(our src) :: me only
|
||||
=+ pas=`@uw`(shas %back eny)
|
||||
~& [%backing-up pas=pas]
|
||||
=; dif (emit %info /backup [our dif])
|
||||
%+ foal (welp pax /jam-crub)
|
||||
[%jam-crub !>((en:crub pas (jam `part`+:abet)))]
|
||||
::
|
||||
++ poke-rekey :: extend will
|
||||
|= $~
|
||||
=< abet
|
||||
?> |(=(our src) =([~ src] boss)) :: privileged
|
||||
:: (emit /rekey %next sec:ex:(pit:nu:crub 512 (shaz (mix %next (shaz eny)))))
|
||||
~& %rekey-stub .
|
||||
::
|
||||
++ poke-report :: report will
|
||||
|= {her/@p wyl/will} ::
|
||||
=< abet
|
||||
=. log-transaction (log-transaction %report +<)
|
||||
?> =(src src) :: self-authenticated
|
||||
(emit %knew /report her wyl)
|
||||
::
|
||||
++ use-reference :: bonus stars
|
||||
|= a/(each @p mail) ^- (unit _+>)
|
||||
?. (~(has by hotel) a) ~
|
||||
=+ cli=(~(get by hotel) a)
|
||||
?~ cli ~
|
||||
?. (gte sta.u.cli reference-rate) ~
|
||||
=. sta.u.cli (sub sta.u.cli reference-rate)
|
||||
`+>.$(hotel (~(put by hotel) a u.cli))
|
||||
::
|
||||
++ poke-do-ticket :: issue child ticket
|
||||
|= her/ship
|
||||
=< abet
|
||||
?> =(our (sein her))
|
||||
?> |(=(our src) =([~ src] boss)) :: privileged
|
||||
=+ tik=.^(@p %a /(scot %p our)/tick/(scot %da now)/(scot %p her))
|
||||
:: =. emit (emit /tick %tick tik her)
|
||||
(emit %poke /womb/tick [src %hood] [%womb-do-claim her tik]) :: XX peek result
|
||||
::
|
||||
++ needy
|
||||
|* a/(each * tang)
|
||||
?- -.a
|
||||
$& p.a
|
||||
$| ((slog (flop p.a)) (mean p.a))
|
||||
==
|
||||
::
|
||||
++ poke-do-claim :: deliver ticket
|
||||
|= {her/ship tik/@p}
|
||||
=< abet
|
||||
^+ +>
|
||||
?> =(src (sein her)) :: from the parent which could ticket
|
||||
=+ sta=(stats-ship her)
|
||||
?> ?=($cold p.sta) :: a ship not yet started
|
||||
?- -.q.sta
|
||||
$free !! :: but allocated
|
||||
$owned :: to an email
|
||||
(email /ticket p.q.sta "Ticket for {<her>}: {<`@pG`tik>}")
|
||||
::
|
||||
$split :: or ship distribution
|
||||
%.(+>.$ (slog leaf+"Ticket for {<her>}: {<`@pG`tik>}" ~)) :: XX emit via console formally?
|
||||
==
|
||||
::
|
||||
++ poke-recycle :: save ticket as balance
|
||||
|= {who/mail him-t/knot tik-t/knot}
|
||||
?. can-recycle.cfg ~|(%ticket-recycling-offline !!)
|
||||
=< abet
|
||||
=. log-transaction (log-transaction %recycle +<)
|
||||
?> =(src src)
|
||||
=+ [him tik]=(parse-ticket him-t tik-t)
|
||||
?> (need (check-old-ticket him tik))
|
||||
=+ pas=`passcode`(end 7 1 (sham %tick him tik))
|
||||
?: (~(has by bureau) (shaf %pass pas))
|
||||
~|(already-recycled+[him-t tik-t] !!)
|
||||
=+ bal=`balance`?+((clan him) !! $duke [1 0 who ~], $king [0 1 who ~])
|
||||
.(bureau (~(put by bureau) (shaf %pass pas) bal))
|
||||
::
|
||||
++ poke-claim :: claim plot, req ticket
|
||||
|= {aut/passcode her/@p}
|
||||
?. can-claim.cfg ~|(%ticketing-offline !!)
|
||||
=< abet
|
||||
=. log-transaction (log-transaction %claim +<)
|
||||
?> =(src src)
|
||||
(claim-any aut her)
|
||||
::
|
||||
++ claim-any :: register
|
||||
|= {aut/passcode her/@p}
|
||||
=; claimed
|
||||
:: =. claimed (emit.claimed %wait $~) :: XX delay ack
|
||||
(emit.claimed %poke /womb/tick [(sein her) %hood] [%womb-do-ticket her])
|
||||
=+ ~|(%bad-passcode bal=(~(got by bureau) (shaf %pass aut)))
|
||||
?+ (clan her) ~|(bad-size+(clan her) !!)
|
||||
$king
|
||||
=; all (claim-star.all owner.bal her)
|
||||
=+ (use-reference &+src)
|
||||
?^ - u :: prefer using references
|
||||
=+ (use-reference |+owner.bal)
|
||||
?^ - u
|
||||
=. stars.bal ~|(%no-stars (dec stars.bal))
|
||||
+>.$(bureau (~(put by bureau) (shaf %pass aut) bal))
|
||||
::
|
||||
$duke
|
||||
=. planets.bal ~|(%no-planets (dec planets.bal))
|
||||
=. bureau (~(put by bureau) (shaf %pass aut) bal)
|
||||
(claim-planet owner.bal her)
|
||||
==
|
||||
::
|
||||
++ claim-star :: register
|
||||
|= {who/mail her/@p} ^+ +>
|
||||
%+ mod-managed-star her
|
||||
|= a/star ^- star
|
||||
?^ a ~|(impure-star+[her a] !!)
|
||||
(some %| who)
|
||||
::
|
||||
++ claim-planet :: register
|
||||
|= {who/mail her/@p} ^+ +>
|
||||
=. hotel
|
||||
%+ ~(put by hotel) |+who
|
||||
=+ cli=(fall (~(get by hotel) |+who) *client)
|
||||
cli(has (~(put in has.cli) her))
|
||||
%+ mod-managed-planet her
|
||||
|= a/planet ^- planet
|
||||
?^ a ~|(impure-planet+[her a] !!)
|
||||
(some %| who)
|
||||
::
|
||||
++ poke-release-ships :: release specific
|
||||
|= a/(list ship)
|
||||
=< abet ^+ +>
|
||||
=. log-transaction (log-transaction %release-ships +<)
|
||||
?> =(our src) :: privileged
|
||||
%+ roll a
|
||||
=+ [who=*@p res=+>.$]
|
||||
|. ^+ res
|
||||
?+ (clan who) ~|(bad-size+(clan who) !!)
|
||||
$king (release-star who res)
|
||||
$czar (release-galaxy who res)
|
||||
==
|
||||
::
|
||||
++ poke-release :: release to subdivide
|
||||
|= {gal/@ud sta/@ud} ::
|
||||
=< abet ^+ +>
|
||||
=. log-transaction (log-transaction %release +<)
|
||||
?> =(our src) :: privileged
|
||||
=. +>
|
||||
?~ gal +>
|
||||
=+ all=(take-n [0 gal] shop-galaxies)
|
||||
?. (gth gal (lent all))
|
||||
(roll all release-galaxy)
|
||||
~|(too-few-galaxies+[want=gal has=(lent all)] !!)
|
||||
^+ +>
|
||||
?~ sta +>
|
||||
=+ all=(take-n [0 sta] shop-stars)
|
||||
~& got-stars+all
|
||||
%- (slog leaf+"For issuing to proceed smoothly, immediately upon boot, ".
|
||||
"each should |obey {<our>} to honor ticket requests." ~)
|
||||
?. (gth sta (lent all))
|
||||
(roll all release-star)
|
||||
~|(too-few-stars+[want=sta has=(lent all)] !!)
|
||||
::
|
||||
++ release-galaxy :: subdivide %czar
|
||||
=+ [who=*@p res=.]
|
||||
|. ^+ res
|
||||
%+ mod-managed-galaxy:res who
|
||||
|= gal/galaxy ^- galaxy
|
||||
~& release+who
|
||||
?^ gal ~|(already-used+who !!)
|
||||
(some %& (fo-init 5) (fo-init 4) (fo-init 3))
|
||||
::
|
||||
++ release-star :: subdivide %king
|
||||
=+ [who=*@p res=.]
|
||||
|. ^+ res
|
||||
=. res (emit.res %poke /womb/tick [(sein who) %hood] [%womb-do-ticket who])
|
||||
%+ mod-managed-star:res who
|
||||
|= sta/star ^- star
|
||||
~& release+who
|
||||
?^ sta ~|(already-used+[who u.sta] !!)
|
||||
(some %& (fo-init 5) (fo-init 4))
|
||||
--
|
11
mar/drum-put.hoon
Normal file
11
mar/drum-put.hoon
Normal file
@ -0,0 +1,11 @@
|
||||
::
|
||||
:::: /hoon/do-claim/womb/mar
|
||||
::
|
||||
/? 310
|
||||
|_ {path @}
|
||||
::
|
||||
++ grab :: convert from
|
||||
|%
|
||||
++ noun {path @} :: clam from %noun
|
||||
--
|
||||
--
|
11
mar/email.hoon
Normal file
11
mar/email.hoon
Normal file
@ -0,0 +1,11 @@
|
||||
::
|
||||
:::: /hoon/email/mar
|
||||
::
|
||||
/? 310
|
||||
|_ {adr/@ta tyl/tape mez/wall}
|
||||
::
|
||||
++ grab :: convert from
|
||||
|%
|
||||
++ noun {@ta tape wall} :: clam from %noun
|
||||
--
|
||||
--
|
8
mar/gmail/req.hoon
Normal file
8
mar/gmail/req.hoon
Normal file
@ -0,0 +1,8 @@
|
||||
/- rfc, gmail-label
|
||||
|
||||
|_ {method/meth endpoint/path query/quay mes/?(message:rfc label-req:gmail-label)} :: jon=(unit json)]
|
||||
++ grab
|
||||
|%
|
||||
++ noun {method/meth endpoint/path query/quay mes/?(message:rfc label-req:gmail-label)}:: jon=(unit json)]
|
||||
--
|
||||
--
|
17
mar/jam-crub.hoon
Normal file
17
mar/jam-crub.hoon
Normal file
@ -0,0 +1,17 @@
|
||||
::
|
||||
:::: /hoon/jam-crub/mar
|
||||
::
|
||||
/? 310
|
||||
!:
|
||||
|_ mud/@
|
||||
++ grow
|
||||
|%
|
||||
++ mime [/application/octet-stream (taco mud)]
|
||||
--
|
||||
++ grab
|
||||
|% :: convert from
|
||||
++ noun @ :: clam from %noun
|
||||
++ mime |=({* octs} q)
|
||||
--
|
||||
++ grad %mime
|
||||
--
|
@ -8,9 +8,9 @@
|
||||
|%
|
||||
++ mime [/application/octet-stream (taco mud)]
|
||||
--
|
||||
++ garb /womb-part
|
||||
++ grab
|
||||
|% :: convert from
|
||||
++ mime |=({p/mite q/octs} q.q)
|
||||
++ noun @ :: clam from %noun
|
||||
--
|
||||
++ grad %mime
|
||||
|
@ -4,6 +4,11 @@
|
||||
/? 310
|
||||
!:
|
||||
|_ own/mime
|
||||
++ grow
|
||||
|%
|
||||
++ jam `@`q.q.own
|
||||
--
|
||||
::
|
||||
++ grab :: convert from
|
||||
|%
|
||||
++ noun mime :: clam from %noun
|
||||
|
14
mar/ships.hoon
Normal file
14
mar/ships.hoon
Normal file
@ -0,0 +1,14 @@
|
||||
::
|
||||
:::: /hoon/ships/mar
|
||||
::
|
||||
/? 310
|
||||
|_ all/(list ship)
|
||||
++ grab |%
|
||||
++ noun (list ship)
|
||||
++ json (corl need (ar (su fed:ag)):jo)
|
||||
--
|
||||
++ grow |%
|
||||
++ json `^json`[%a (turn all |=(a/ship (jape +:<a>)))]
|
||||
--
|
||||
++ grad %json
|
||||
--
|
25
mar/womb/balance.hoon
Normal file
25
mar/womb/balance.hoon
Normal file
@ -0,0 +1,25 @@
|
||||
::
|
||||
:::: /hoon/stat-all/womb/mar
|
||||
::
|
||||
/? 310
|
||||
/+ womb
|
||||
::
|
||||
:::: ~fyr
|
||||
::
|
||||
|_ balance:womb
|
||||
::
|
||||
++ grab :: convert from
|
||||
|%
|
||||
++ noun balance:womb :: clam from %noun
|
||||
--
|
||||
++ grow
|
||||
|%
|
||||
++ json
|
||||
%- jobe :~
|
||||
owner+[%s owner]
|
||||
stars+(jone stars)
|
||||
planets+(jone planets)
|
||||
history+[%a (turn history |=(a/knot s+a))]
|
||||
==
|
||||
--
|
||||
--
|
12
mar/womb/bonus.hoon
Normal file
12
mar/womb/bonus.hoon
Normal file
@ -0,0 +1,12 @@
|
||||
::
|
||||
:::: /hoon/bonus/womb/mar
|
||||
::
|
||||
/? 310
|
||||
|_ {aut/@uvH pla/@u sta/@u}
|
||||
::
|
||||
++ grab :: convert from
|
||||
|%
|
||||
++ noun {@uvH @u @u} :: clam from %noun
|
||||
++ json (corl need (ot aut+(su ;~(pfix (jest '0v') viz:ag)) pla+ni sta+ni ~):jo)
|
||||
--
|
||||
--
|
12
mar/womb/claim.hoon
Normal file
12
mar/womb/claim.hoon
Normal file
@ -0,0 +1,12 @@
|
||||
::
|
||||
:::: /hoon/claim/womb/mar
|
||||
::
|
||||
/? 310
|
||||
|_ {aut/@uvH her/@p}
|
||||
::
|
||||
++ grab :: convert from
|
||||
|%
|
||||
++ noun {@uvH @p} :: clam from %noun
|
||||
++ json (corl need (ot aut+(su ;~(pfix (jest '0v') viz:ag)) her+(su fed:ag) ~):jo)
|
||||
--
|
||||
--
|
11
mar/womb/do-claim.hoon
Normal file
11
mar/womb/do-claim.hoon
Normal file
@ -0,0 +1,11 @@
|
||||
::
|
||||
:::: /hoon/do-claim/womb/mar
|
||||
::
|
||||
/? 310
|
||||
|_ {her/ship tik/@p}
|
||||
::
|
||||
++ grab :: convert from
|
||||
|%
|
||||
++ noun {ship @p} :: clam from %noun
|
||||
--
|
||||
--
|
11
mar/womb/do-ticket.hoon
Normal file
11
mar/womb/do-ticket.hoon
Normal file
@ -0,0 +1,11 @@
|
||||
::
|
||||
:::: /hoon/do-ticket/womb/mar
|
||||
::
|
||||
/? 310
|
||||
|_ her/ship
|
||||
::
|
||||
++ grab :: convert from
|
||||
|%
|
||||
++ noun @p :: clam from %noun
|
||||
--
|
||||
--
|
28
mar/womb/invite.hoon
Normal file
28
mar/womb/invite.hoon
Normal file
@ -0,0 +1,28 @@
|
||||
::
|
||||
:::: /hoon/stat-all/womb/mar
|
||||
::
|
||||
/? 310
|
||||
/+ womb
|
||||
::
|
||||
:::: ~fyr
|
||||
::
|
||||
|_ {cord reference invite}:womb
|
||||
::
|
||||
++ grab :: convert from
|
||||
|%
|
||||
++ noun {cord reference invite}:womb :: clam from %noun
|
||||
++ json
|
||||
%+ corl need
|
||||
=> jo
|
||||
=+ ^= mail
|
||||
;~ simu
|
||||
;~(pfix (plus ;~(less pat next)) pat)
|
||||
(cook crip (star ;~(less ace prn)))
|
||||
==
|
||||
%- ot :~
|
||||
tid+so
|
||||
ref+(mu (su (pick ;~(pfix (jest '0v') viz:ag) mail)))
|
||||
inv+(ot who+(su mail) pla+ni sta+ni wel+(ot intro+sa hello+sa ~) ~)
|
||||
==
|
||||
--
|
||||
--
|
12
mar/womb/part.hoon
Normal file
12
mar/womb/part.hoon
Normal file
@ -0,0 +1,12 @@
|
||||
::
|
||||
:::: /hoon/part/womb/mar
|
||||
::
|
||||
/? 310
|
||||
/+ womb
|
||||
|_ all/part:womb
|
||||
++ grad %jam
|
||||
++ grow |% ++ jam (^jam all)
|
||||
--
|
||||
++ grab |% ++ jam |=(a/@ (noun (cue a)))
|
||||
++ noun part:womb
|
||||
-- --
|
12
mar/womb/recycle.hoon
Normal file
12
mar/womb/recycle.hoon
Normal file
@ -0,0 +1,12 @@
|
||||
::
|
||||
:::: /hoon/recycle/womb/mar
|
||||
::
|
||||
/? 310
|
||||
|_ {who/@txmail him/knot tik/knot}
|
||||
::
|
||||
++ grab :: convert from
|
||||
|%
|
||||
++ noun {@t @t @t} :: clam from %noun
|
||||
++ json (corl need (ot who+so him+so tik+so ~):jo)
|
||||
--
|
||||
--
|
10
mar/womb/replay-log.hoon
Normal file
10
mar/womb/replay-log.hoon
Normal file
@ -0,0 +1,10 @@
|
||||
::
|
||||
:::: /hoon/replay-log/womb/mar
|
||||
::
|
||||
/? 310
|
||||
/+ womb
|
||||
|_ log/(list {@uvJ transaction:womb})
|
||||
++ grab |%
|
||||
++ noun (list {@uvJ transaction:womb})
|
||||
--
|
||||
--
|
33
mar/womb/stat-all.hoon
Normal file
33
mar/womb/stat-all.hoon
Normal file
@ -0,0 +1,33 @@
|
||||
::
|
||||
:::: /hoon/stat-all/womb/mar
|
||||
::
|
||||
/? 310
|
||||
/+ womb
|
||||
::
|
||||
:::: ~fyr
|
||||
::
|
||||
|_ all/(map ship stat:womb)
|
||||
::
|
||||
++ grab :: convert from
|
||||
|%
|
||||
++ noun (map ship stat:womb) :: clam from %noun
|
||||
--
|
||||
++ grow
|
||||
|%
|
||||
++ json
|
||||
%- jobe
|
||||
%+ turn (~(tap by all))
|
||||
|= {a/ship b/stat:womb} ^- {cord ^json}
|
||||
:- (crip +:<a>)
|
||||
(jobe live+[%s p.b] dist+(json-dist q.b) ~)
|
||||
::
|
||||
++ json-dist
|
||||
|= a/dist:womb
|
||||
%+ joba -.a
|
||||
?- -.a
|
||||
$free b+&
|
||||
$owned s+p.a
|
||||
$split json(all p.a)
|
||||
==
|
||||
--
|
||||
--
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user