mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-06 06:25:55 +03:00
Merge branches 'breaching-inception' and 'womb' into staging
This commit is contained in:
commit
786bce0a79
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 :: ::
|
:::: /hoon/hood/app :: ::
|
||||||
:: :: ::
|
:: :: ::
|
||||||
/? 310 :: zuse version
|
/? 310 :: zuse version
|
||||||
/+ sole, talk, helm, kiln, drum, write :: libraries
|
/+ sole, talk, helm, kiln, drum, write, womb :: libraries
|
||||||
[. helm kiln drum]
|
[. helm kiln drum]
|
||||||
:: :: ::
|
:: :: ::
|
||||||
:::: :: ::
|
:::: :: ::
|
||||||
!: :: ::
|
!: :: ::
|
||||||
=> |% :: module boilerplate
|
=> |% :: module boilerplate
|
||||||
++ hood-0 ::
|
++ hood-old ::
|
||||||
{$0 lac/(map @tas hood-part)} ::
|
{?($0 $1) lac/(map @tas hood-part-old)} ::
|
||||||
|
++ hood-1 ::
|
||||||
|
{$1 lac/(map @tas hood-part)} ::
|
||||||
++ hood-good ::
|
++ hood-good ::
|
||||||
|* hed/hood-head ::
|
|* hed/hood-head ::
|
||||||
|= paw/hood-part ::
|
|= paw/hood-part ::
|
||||||
@ -17,6 +19,7 @@
|
|||||||
$drum ?>(?=($drum -.paw) `drum-part`paw) ::
|
$drum ?>(?=($drum -.paw) `drum-part`paw) ::
|
||||||
$helm ?>(?=($helm -.paw) `helm-part`paw) ::
|
$helm ?>(?=($helm -.paw) `helm-part`paw) ::
|
||||||
$kiln ?>(?=($kiln -.paw) `kiln-part`paw) ::
|
$kiln ?>(?=($kiln -.paw) `kiln-part`paw) ::
|
||||||
|
$womb ?>(?=($womb -.paw) `part:womb`paw) ::
|
||||||
$write ?>(?=($write -.paw) `part:write`paw) ::
|
$write ?>(?=($write -.paw) `part:write`paw) ::
|
||||||
== ::
|
== ::
|
||||||
++ hood-head _-:*hood-part ::
|
++ hood-head _-:*hood-part ::
|
||||||
@ -26,12 +29,10 @@
|
|||||||
$drum (drum-make our) ::
|
$drum (drum-make our) ::
|
||||||
$helm *helm-part ::
|
$helm *helm-part ::
|
||||||
$kiln *kiln-part ::
|
$kiln *kiln-part ::
|
||||||
|
$womb *part:womb ::
|
||||||
$write *part:write ::
|
$write *part:write ::
|
||||||
== ::
|
== ::
|
||||||
++ hood-part-old ::
|
++ hood-part-old ?(hood-part) :: drum-part-old ::
|
||||||
$? hood-part ::
|
|
||||||
{$drum $0 drum-pith-0} ::
|
|
||||||
== ::
|
|
||||||
++ hood-port ::
|
++ hood-port ::
|
||||||
|= paw/hood-part-old ^- hood-part ::
|
|= paw/hood-part-old ^- hood-part ::
|
||||||
?+ -.paw paw ::
|
?+ -.paw paw ::
|
||||||
@ -39,9 +40,10 @@
|
|||||||
== ::
|
== ::
|
||||||
:: ::
|
:: ::
|
||||||
++ hood-part ::
|
++ hood-part ::
|
||||||
$% {$drum $1 drum-pith} ::
|
$% {$drum $1 drum-pith-1} ::
|
||||||
{$helm $0 helm-pith} ::
|
{$helm $0 helm-pith} ::
|
||||||
{$kiln $0 kiln-pith} ::
|
{$kiln $0 kiln-pith} ::
|
||||||
|
{$womb $1 pith:womb} ::
|
||||||
{$write $0 pith:write} ::
|
{$write $0 pith:write} ::
|
||||||
== ::
|
== ::
|
||||||
-- ::
|
-- ::
|
||||||
@ -49,7 +51,7 @@
|
|||||||
:::: :: ::
|
:::: :: ::
|
||||||
:: :: ::
|
:: :: ::
|
||||||
|_ $: hid/bowl :: system state
|
|_ $: hid/bowl :: system state
|
||||||
hood-0 :: server state
|
hood-1 :: server state
|
||||||
== ::
|
== ::
|
||||||
++ able :: find+make part
|
++ able :: find+make part
|
||||||
|* hed/hood-head
|
|* hed/hood-head
|
||||||
@ -63,8 +65,8 @@
|
|||||||
:: :: ::
|
:: :: ::
|
||||||
:::: :: ::
|
:::: :: ::
|
||||||
:: :: ::
|
:: :: ::
|
||||||
++ prep ::
|
++ prep
|
||||||
|= old/(unit hood-0) ^- (quip _!! +>)
|
|= old/(unit hood-old) ^- (quip _!! +>) ::
|
||||||
:- ~
|
:- ~
|
||||||
?~ old +>
|
?~ old +>
|
||||||
+>(lac (~(run by lac.u.old) hood-port))
|
+>(lac (~(run by lac.u.old) hood-port))
|
||||||
@ -85,6 +87,12 @@
|
|||||||
~? ?=(^ saw) [%kiln-overload-lame u.saw]
|
~? ?=(^ 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-drum-phat (wrap take-coup-phat):from-drum
|
||||||
++ coup-helm-hi (wrap coup-hi):from-helm
|
++ coup-helm-hi (wrap coup-hi):from-helm
|
||||||
++ diff-sole-effect-drum-phat (wrap diff-sole-effect-phat):from-drum
|
++ 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-drum (from-lib %drum [..$ _se-abet]:(drum))
|
||||||
++ from-helm (from-lib %helm [..$ _abet]:(helm))
|
++ from-helm (from-lib %helm [..$ _abet]:(helm))
|
||||||
++ from-kiln (from-lib %kiln [..$ _abet]:(kiln))
|
++ from-kiln (from-lib %kiln [..$ _abet]:(kiln))
|
||||||
|
++ from-womb (from-lib %womb [..$ _abet]:(womb))
|
||||||
++ from-write (from-lib %write [..$ _abet]:(write))
|
++ from-write (from-lib %write [..$ _abet]:(write))
|
||||||
::
|
::
|
||||||
++ init-helm |=({way/wire *} [~ +>])
|
++ init-helm |=({way/wire *} [~ +>])
|
||||||
@ -111,14 +120,17 @@
|
|||||||
++ note-helm (wrap take-note):from-helm
|
++ note-helm (wrap take-note):from-helm
|
||||||
++ onto-drum (wrap take-onto):from-drum
|
++ onto-drum (wrap take-onto):from-drum
|
||||||
++ peer-drum (wrap peer):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-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-link (wrap poke-link):from-drum
|
||||||
++ poke-drum-unlink (wrap poke-unlink):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-drum-start (wrap poke-start):from-drum
|
||||||
++ poke-helm-hi (wrap poke-hi):from-helm
|
++ poke-helm-hi (wrap poke-hi):from-helm
|
||||||
++ poke-helm-init (wrap poke-init):from-helm :: XX used?
|
++ 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-mass (wrap poke-mass):from-helm
|
||||||
++ poke-helm-reload (wrap poke-reload):from-helm
|
++ poke-helm-reload (wrap poke-reload):from-helm
|
||||||
++ poke-helm-reload-desk (wrap poke-reload-desk):from-helm
|
++ poke-helm-reload-desk (wrap poke-reload-desk):from-helm
|
||||||
@ -146,6 +158,21 @@
|
|||||||
++ poke-kiln-overload (wrap poke-overload):from-kiln
|
++ poke-kiln-overload (wrap poke-overload):from-kiln
|
||||||
++ poke-kiln-unmount (wrap poke-unmount):from-kiln
|
++ poke-kiln-unmount (wrap poke-unmount):from-kiln
|
||||||
++ poke-kiln-unsync (wrap poke-unsync):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-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-sec-atom (wrap poke-sec-atom):from-write
|
||||||
++ poke-write-paste (wrap poke-paste):from-write
|
++ poke-write-paste (wrap poke-paste):from-write
|
||||||
++ poke-write-comment (wrap poke-comment):from-write
|
++ poke-write-comment (wrap poke-comment):from-write
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
|= {new/deed old/deed}
|
|= {new/deed old/deed}
|
||||||
^- $&
|
^- $&
|
||||||
?> (melt new old)
|
?> (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
|
++ melt :: proper connect
|
||||||
@ -99,7 +99,7 @@
|
|||||||
|= wed/deed
|
|= wed/deed
|
||||||
^- $&
|
^- $&
|
||||||
?> =+ rac=(clan r.p.q.wed)
|
?> =+ rac=(clan r.p.q.wed)
|
||||||
=+ loy=(haul r.q.wed)
|
=+ loy=(com:nu:crub r.q.wed)
|
||||||
?: &(r.wed =(rac %czar)) %&
|
?: &(r.wed =(rac %czar)) %&
|
||||||
?> =(0 p.p.q.wed)
|
?> =(0 p.p.q.wed)
|
||||||
?> =(fig:ex:loy ?+(rac !! $czar (zeno r.p.q.wed), $pawn r.p.q.wed))
|
?> =(fig:ex:loy ?+(rac !! $czar (zeno r.p.q.wed), $pawn r.p.q.wed))
|
||||||
@ -114,7 +114,7 @@
|
|||||||
?> ?& ?=(^ law)
|
?> ?& ?=(^ law)
|
||||||
(lth p.p.q.i.law 9) :: 9-lives rule
|
(lth p.p.q.i.law 9) :: 9-lives rule
|
||||||
=(p.p.q.i.law p.i.mac)
|
=(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)
|
$(mac t.mac, law t.law)
|
||||||
==
|
==
|
||||||
@ -479,7 +479,7 @@
|
|||||||
?. =(fak.ton r.i.lew.wod.dur) ~|([%client-wrong-fake her] !!)
|
?. =(fak.ton r.i.lew.wod.dur) ~|([%client-wrong-fake her] !!)
|
||||||
:+ p.p.q.i.lew.wod.dur
|
:+ p.p.q.i.lew.wod.dur
|
||||||
q.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
|
++ clon
|
||||||
^- life
|
^- life
|
||||||
@ -574,7 +574,7 @@
|
|||||||
:- %fast
|
:- %fast
|
||||||
%^ cat 7
|
%^ cat 7
|
||||||
p.u.yed.caq.dyr
|
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
|
++ xeno :: xeno:lax:as:go
|
||||||
@ -729,7 +729,7 @@
|
|||||||
|- ^- (list ship)
|
|- ^- (list ship)
|
||||||
?:((lth our 256) ~ =+(seg=(sein our) [seg $(our seg)]))
|
?:((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
|
wil
|
||||||
~
|
~
|
||||||
~
|
~
|
||||||
@ -978,13 +978,13 @@
|
|||||||
:- p
|
:- p
|
||||||
%= q
|
%= q
|
||||||
val
|
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
|
++ come :: come:am
|
||||||
|= {ges/(unit @t) wid/@ bur/@ fak/?} :: instantiate pawn
|
|= {ges/(unit @t) wid/@ bur/@ fak/?} :: instantiate pawn
|
||||||
^- {p/{p/ship q/@uvG} q/fort}
|
^- {p/{p/ship q/@uvG} q/fort}
|
||||||
=+ loy=(bruw wid bur)
|
=+ loy=(pit:nu:crub wid bur)
|
||||||
=+ rig=sec:ex:loy
|
=+ rig=sec:ex:loy
|
||||||
=+ our=`@p`fig:ex:loy
|
=+ our=`@p`fig:ex:loy
|
||||||
=+ syp=[[0 ~ our now] [%en %pawn ges] pub:ex:loy]
|
=+ syp=[[0 ~ our now] [%en %pawn ges] pub:ex:loy]
|
||||||
@ -1002,7 +1002,7 @@
|
|||||||
++ czar !: :: czar:am
|
++ czar !: :: czar:am
|
||||||
|= {our/ship ger/@uw fak/?} :: instantiate emperor
|
|= {our/ship ger/@uw fak/?} :: instantiate emperor
|
||||||
^- {p/(list boon) q/fort}
|
^- {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))
|
=+ fim==(fig:ex:loy (zeno our))
|
||||||
?: &(!fak !fim) !! :: not fake & bad fig
|
?: &(!fak !fim) !! :: not fake & bad fig
|
||||||
=+ mac=`mace`[[0 sec:ex:loy] ~]
|
=+ mac=`mace`[[0 sec:ex:loy] ~]
|
||||||
|
@ -132,10 +132,7 @@
|
|||||||
$czar [%czar ~]
|
$czar [%czar ~]
|
||||||
$duke [%duke %anon ~]
|
$duke [%duke %anon ~]
|
||||||
$earl [%earl (scot %p p.kyz)]
|
$earl [%earl (scot %p p.kyz)]
|
||||||
$king :- %king
|
$king [%king (scot %p p.kyz)]
|
||||||
?: =(~doznec p.kyz) :: so old tickets work
|
|
||||||
'Urban Republic'
|
|
||||||
(scot %p p.kyz)
|
|
||||||
$pawn [%pawn ~]
|
$pawn [%pawn ~]
|
||||||
==
|
==
|
||||||
=+ yen=(scot %p (shax :(mix %ticket eny now)))
|
=+ yen=(scot %p (shax :(mix %ticket eny now)))
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
-- ::
|
-- ::
|
||||||
|% :: models
|
|% :: models
|
||||||
++ bolo :: eyre state
|
++ bolo :: eyre state
|
||||||
$: $5 :: version
|
$: $6 :: version
|
||||||
gub/@t :: random identity
|
gub/@t :: random identity
|
||||||
hov/(unit ship) :: master for remote
|
hov/(unit ship) :: master for remote
|
||||||
top/beam :: ford serve prefix
|
top/beam :: ford serve prefix
|
||||||
@ -99,8 +99,9 @@
|
|||||||
sec/(map {iden (list @t)} driv) :: security drivers
|
sec/(map {iden (list @t)} driv) :: security drivers
|
||||||
== ::
|
== ::
|
||||||
::
|
::
|
||||||
++ driv %+ pair (unit $@($~ vase)) :: driver state
|
++ driv :: driver state
|
||||||
(qeu (trel duct mark vase:hiss)) :: waiting requests
|
%+ pair (unit $@($~ vase)) :: main core
|
||||||
|
{liv/? req/(qeu (trel duct mark vase:hiss))} :: waiting requests
|
||||||
::
|
::
|
||||||
++ live :: in flight
|
++ live :: in flight
|
||||||
$% {$exec p/whir} :: ford build
|
$% {$exec p/whir} :: ford build
|
||||||
@ -1696,13 +1697,13 @@
|
|||||||
~% %eyre-v ..is ~
|
~% %eyre-v ..is ~
|
||||||
|_ $: {usr/iden dom/path}
|
|_ $: {usr/iden dom/path}
|
||||||
cor/(unit $@($~ vase))
|
cor/(unit $@($~ vase))
|
||||||
req/(qeu {p/duct q/mark r/vase:hiss})
|
{liv/? req/(qeu {p/duct q/mark r/vase:hiss})}
|
||||||
==
|
==
|
||||||
++ self .
|
++ self .
|
||||||
++ abet +>(sec (~(put by sec) +<- +<+))
|
++ abet +>(sec (~(put by sec) +<- +<+))
|
||||||
++ execute |=({a/whir-se b/{beak silk}} (execute:abet se+[a usr dom] b))
|
++ execute |=({a/whir-se b/{beak silk}} (execute:abet se+[a usr dom] b))
|
||||||
++ dead-this |=(a/tang (fail:abet 500 0v0 a))
|
++ 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))
|
++ 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))
|
++ pass-note |=({a/whir-se b/note} (pass-note:abet se+[a usr dom] b))
|
||||||
:: XX block reqs until correct core checked in?
|
:: XX block reqs until correct core checked in?
|
||||||
@ -1752,6 +1753,7 @@
|
|||||||
^+ abet
|
^+ abet
|
||||||
?~ cor
|
?~ cor
|
||||||
build
|
build
|
||||||
|
?. liv abet
|
||||||
=+ ole=~(top to req)
|
=+ ole=~(top to req)
|
||||||
?~ ole abet
|
?~ ole abet
|
||||||
:: process hiss
|
:: process hiss
|
||||||
@ -1776,22 +1778,23 @@
|
|||||||
?+ wir !!
|
?+ wir !!
|
||||||
?($receive-auth-query-string $in) (call %receive-auth-response httr+!>(hit))
|
?($receive-auth-query-string $in) (call %receive-auth-response httr+!>(hit))
|
||||||
?($filter-request $out)
|
?($filter-request $out)
|
||||||
|
=. liv &
|
||||||
?. (has-arm %filter-response) (fin-httr !>(hit))
|
?. (has-arm %filter-response) (fin-httr !>(hit))
|
||||||
(call %filter-response httr+!>(hit))
|
(call %filter-response httr+!>(hit))
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ get-made
|
++ get-made
|
||||||
|= {wir/whir-se dep/@uvH res/(each cage tang)} ^+ abet
|
|= {wir/whir-se dep/@uvH res/(each cage tang)} ^+ abet
|
||||||
?: ?=($core wir) (update dep res)
|
?: ?=($core wir) (made-core dep res)
|
||||||
%. res
|
%. res
|
||||||
?- wir
|
?- wir
|
||||||
?($filter-request $out) res-out
|
?($filter-request $out) made-filter-request
|
||||||
?($filter-response $res) res-res
|
?($filter-response $res) made-filter-response
|
||||||
?($receive-auth-response $bak) res-bak
|
?($receive-auth-response $bak) made-receive-auth-response
|
||||||
?($receive-auth-query-string $in) res-in
|
?($receive-auth-query-string $in) made-receive-auth-query-string
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ update
|
++ made-core
|
||||||
|= {dep/@uvH gag/(each cage tang)}
|
|= {dep/@uvH gag/(each cage tang)}
|
||||||
:: ~& got-update/dep
|
:: ~& got-update/dep
|
||||||
=. ..vi (pass-note %core [%f [%wasp our dep &]])
|
=. ..vi (pass-note %core [%f [%wasp our dep &]])
|
||||||
@ -1801,6 +1804,35 @@
|
|||||||
pump ::(cor `~) :: userless %hiss defaults to "nop" driver
|
pump ::(cor `~) :: userless %hiss defaults to "nop" driver
|
||||||
(warn p.gag)
|
(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
|
:: Result handling
|
||||||
::
|
::
|
||||||
:: XX formal dill-blit %url via hood
|
:: XX formal dill-blit %url via hood
|
||||||
@ -1815,6 +1847,7 @@
|
|||||||
++ do-send
|
++ do-send
|
||||||
|= wir/whir-se ^- $-(vase _abet)
|
|= wir/whir-se ^- $-(vase _abet)
|
||||||
|= res/vase
|
|= res/vase
|
||||||
|
=. liv | :: block requests until a reponse is given
|
||||||
(eyre-them wir (slam !>(|=({$send a/hiss} a)) res))
|
(eyre-them wir (slam !>(|=({$send a/hiss} a)) res))
|
||||||
::
|
::
|
||||||
++ handle-moves
|
++ handle-moves
|
||||||
@ -1857,36 +1890,6 @@
|
|||||||
=+ typ=cor-type
|
=+ typ=cor-type
|
||||||
~| %core-mismatch
|
~| %core-mismatch
|
||||||
?>((~(nest ut typ) & p.roc) ~)
|
?>((~(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
|
++ load :: take previous state
|
||||||
=+ bolo-4={$4 _%*(+ *bolo lyv *(map duct ^))}
|
=+ driv-5=_=>(*driv [cor=p req=req.q])
|
||||||
|= old/?(bolo bolo-4)
|
=+ 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
|
?- -.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
|
$4 $(old [%5 +.old(lyv ~)]) :: minor leak
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
== ::
|
== ::
|
||||||
++ stic :: statistics
|
++ stic :: statistics
|
||||||
$: act/@ud :: change number
|
$: act/@ud :: change number
|
||||||
eny/@uvI :: entropy
|
eny/@uvJ :: entropy
|
||||||
lat/@da :: time
|
lat/@da :: time
|
||||||
== ::
|
== ::
|
||||||
-- ::
|
-- ::
|
||||||
@ -91,7 +91,7 @@
|
|||||||
. ==
|
. ==
|
||||||
=| all/axle :: all vane state
|
=| all/axle :: all vane state
|
||||||
|= $: now/@da :: urban time
|
|= $: now/@da :: urban time
|
||||||
eny/@uvI :: entropy
|
eny/@uvJ :: entropy
|
||||||
ska/sley :: activate
|
ska/sley :: activate
|
||||||
== :: opaque core
|
== :: opaque core
|
||||||
~% %gall-top ..is ~
|
~% %gall-top ..is ~
|
||||||
@ -557,7 +557,7 @@
|
|||||||
==
|
==
|
||||||
=+ unt=(~(get by q.zam) hen)
|
=+ unt=(~(get by q.zam) hen)
|
||||||
=: act.tyc +(act.tyc)
|
=: 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
|
lat.tyc now
|
||||||
==
|
==
|
||||||
?^ unt
|
?^ unt
|
||||||
@ -647,7 +647,7 @@
|
|||||||
((slog leaf+"peek find fail" >tyl< >mar< ~) [~ ~])
|
((slog leaf+"peek find fail" >tyl< >mar< ~) [~ ~])
|
||||||
=^ arm +>.$ (ap-farm q.u.cug)
|
=^ arm +>.$ (ap-farm q.u.cug)
|
||||||
?: ?=($| -.arm) ((slog leaf+"peek farm fail" p.arm) [~ ~])
|
?: ?=($| -.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) [~ ~])
|
?: ?=($| -.zem) ((slog leaf+"peek slam fail" p.zem) [~ ~])
|
||||||
?+ q.p.zem ((slog leaf+"peek bad result" ~) [~ ~])
|
?+ q.p.zem ((slog leaf+"peek bad result" ~) [~ ~])
|
||||||
$~ ~
|
$~ ~
|
||||||
@ -1046,7 +1046,6 @@
|
|||||||
++ ap-purr :: unwrap take
|
++ ap-purr :: unwrap take
|
||||||
|= {wha/term pax/path cag/cage}
|
|= {wha/term pax/path cag/cage}
|
||||||
^+ +>
|
^+ +>
|
||||||
=. q.cag (spec q.cag)
|
|
||||||
=+ cug=(ap-find [wha p.cag pax])
|
=+ cug=(ap-find [wha p.cag pax])
|
||||||
?~ cug
|
?~ cug
|
||||||
(ap-lame wha (ap-suck "{(trip wha)}: no {<`path`[p.cag pax]>}"))
|
(ap-lame wha (ap-suck "{(trip wha)}: no {<`path`[p.cag pax]>}"))
|
||||||
|
@ -1192,7 +1192,7 @@
|
|||||||
/holpaslacrovlivdalsatlibtabhanticpidtorbolfosdot\
|
/holpaslacrovlivdalsatlibtabhanticpidtorbolfosdot\
|
||||||
/losdilforpilramtirwintadbicdifrocwidbisdasmidlop\
|
/losdilforpilramtirwintadbicdifrocwidbisdasmidlop\
|
||||||
/rilnardapmolsanlocnovsitnidtipsicropwitnatpanmin\
|
/rilnardapmolsanlocnovsitnidtipsicropwitnatpanmin\
|
||||||
/ritpodmottamtolsavposnapnopsomfinfonbanporworsip\
|
/ritpodmottamtolsavposnapnopsomfinfonbanmorworsip\
|
||||||
/ronnorbotwicsocwatdolmagpicdavbidbaltimtasmallig\
|
/ronnorbotwicsocwatdolmagpicdavbidbaltimtasmallig\
|
||||||
/sivtagpadsaldivdactansidfabtarmonranniswolmispal\
|
/sivtagpadsaldivdactansidfabtarmonranniswolmispal\
|
||||||
/lasdismaprabtobrollatlonnodnavfignomnibpagsopral\
|
/lasdismaprabtobrollatlonnodnavfignomnibpagsopral\
|
||||||
@ -1202,7 +1202,7 @@
|
|||||||
/tomdigfilfasmithobharmighinradmashalraglagfadtop\
|
/tomdigfilfasmithobharmighinradmashalraglagfadtop\
|
||||||
/mophabnilnosmilfopfamdatnoldinhatnacrisfotribhoc\
|
/mophabnilnosmilfopfamdatnoldinhatnacrisfotribhoc\
|
||||||
/nimlarfitwalrapsarnalmoslandondanladdovrivbacpol\
|
/nimlarfitwalrapsarnalmoslandondanladdovrivbacpol\
|
||||||
/laptalpitnambonrostonfodponsovnocsorlavmatmipfap'
|
/laptalpitnambonrostonfodponsovnocsorlavmatmipfip'
|
||||||
^= dex :: suffix syllables
|
^= dex :: suffix syllables
|
||||||
'zodnecbudwessevpersutletfulpensytdurwepserwylsun\
|
'zodnecbudwessevpersutletfulpensytdurwepserwylsun\
|
||||||
/rypsyxdyrnuphebpeglupdepdysputlughecryttyvsydnex\
|
/rypsyxdyrnuphebpeglupdepdysputlughecryttyvsydnex\
|
||||||
@ -3931,11 +3931,14 @@
|
|||||||
|%
|
|%
|
||||||
++ bix (bass 16 (stun [2 2] six))
|
++ bix (bass 16 (stun [2 2] six))
|
||||||
++ fem (sear |=(a/@ (cha:fa a)) aln)
|
++ fem (sear |=(a/@ (cha:fa a)) aln)
|
||||||
++ hif (boss 256 ;~(plug tip tiq (easy ~)))
|
++ haf (bass 256 ;~(plug tep tiq (easy ~)))
|
||||||
++ huf %+ cook
|
++ hef %+ sear |=(a/@ ?:(=(a 0) ~ (some a)))
|
||||||
|=({a/@ b/@} (wred:un ~(zug mu ~(zag mu [a b]))))
|
%+ bass 256
|
||||||
;~(plug hif ;~(pfix hep hif))
|
;~(plug tip tiq (easy ~))
|
||||||
++ hyf (bass 0x1.0000.0000 ;~(plug huf ;~(pfix hep huf) (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)))
|
++ pev (bass 32 ;~(plug sev (stun [0 4] siv)))
|
||||||
++ pew (bass 64 ;~(plug sew (stun [0 4] siw)))
|
++ pew (bass 64 ;~(plug sew (stun [0 4] siw)))
|
||||||
++ piv (bass 32 (stun [5 5] siv))
|
++ piv (bass 32 (stun [5 5] siv))
|
||||||
@ -3963,6 +3966,7 @@
|
|||||||
==
|
==
|
||||||
++ sox (cook |=(a/@ (sub a 87)) (shim 'a' 'f'))
|
++ sox (cook |=(a/@ (sub a 87)) (shim 'a' 'f'))
|
||||||
++ ted (bass 10 ;~(plug sed (stun [0 2] sid)))
|
++ 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)
|
++ tip (sear |=(a/@ (ins:po a)) til)
|
||||||
++ tiq (sear |=(a/@ (ind:po a)) til)
|
++ tiq (sear |=(a/@ (ind:po a)) til)
|
||||||
++ tid (bass 10 (stun [3 3] sid))
|
++ tid (bass 10 (stun [3 3] sid))
|
||||||
@ -3997,14 +4001,16 @@
|
|||||||
++ dim (ape dip)
|
++ dim (ape dip)
|
||||||
++ dip (bass 10 ;~(plug sed:ab (star sid:ab)))
|
++ dip (bass 10 ;~(plug sed:ab (star sid:ab)))
|
||||||
++ dum (bass 10 (plus sid:ab))
|
++ dum (bass 10 (plus sid:ab))
|
||||||
++ fed ;~ pose
|
++ fed %+ cook fend:ob
|
||||||
%+ bass 0x1.0000.0000.0000.0000
|
;~ pose
|
||||||
;~((glue doh) ;~(pose hyf:ab huf:ab) (more doh hyf:ab))
|
%+ bass 0x1.0000.0000.0000.0000 :: oversized
|
||||||
::
|
;~ plug
|
||||||
hyf:ab
|
huf:ab
|
||||||
huf:ab
|
(plus ;~(pfix doh hyf:ab))
|
||||||
hif:ab
|
==
|
||||||
tiq:ab
|
hof:ab :: planet or moon
|
||||||
|
haf:ab :: star
|
||||||
|
tiq:ab :: galaxy
|
||||||
==
|
==
|
||||||
++ fim (sear den:fa (bass 58 (plus fem:ab)))
|
++ fim (sear den:fa (bass 58 (plus fem:ab)))
|
||||||
++ hex (ape (bass 0x1.0000 ;~(plug qex:ab (star ;~(pfix dog qix:ab)))))
|
++ hex (ape (bass 0x1.0000 ;~(plug qex:ab (star ;~(pfix dog qix:ab)))))
|
||||||
@ -4086,37 +4092,27 @@
|
|||||||
==
|
==
|
||||||
::
|
::
|
||||||
$p
|
$p
|
||||||
=+ dyx=(met 3 q.p.lot)
|
=+ sxz=(feen:ob q.p.lot)
|
||||||
|
=+ dyx=(met 3 sxz)
|
||||||
:- '~'
|
:- '~'
|
||||||
?: (lte dyx 1)
|
?: (lte dyx 1)
|
||||||
(weld (trip (tod:po q.p.lot)) rep)
|
(weld (trip (tod:po sxz)) rep)
|
||||||
?: =(2 dyx)
|
=+ dyy=(met 4 sxz)
|
||||||
;: weld
|
=+ imp=*@
|
||||||
(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=&]
|
|
||||||
|- ^- tape
|
|- ^- tape
|
||||||
?: =(0 dyz)
|
?: =(imp dyy)
|
||||||
rep
|
rep
|
||||||
%= $
|
%= $
|
||||||
fin &
|
sxz (rsh 4 1 sxz)
|
||||||
dub !dub
|
imp +(imp)
|
||||||
dyz (dec dyz)
|
rep
|
||||||
q.p.lot (rsh 5 1 q.p.lot)
|
=+ log=(end 4 1 sxz)
|
||||||
rep
|
;: weld
|
||||||
=+ syb=(wren:un (end 5 1 q.p.lot))
|
(trip (tos:po (rsh 3 1 log)))
|
||||||
=+ cog=~(zig mu [(rsh 4 1 syb) (end 4 1 syb)])
|
(trip (tod:po (end 3 1 log)))
|
||||||
;: weld
|
?:(=((mod imp 4) 0) ?:(=(imp 0) "" "--") "-")
|
||||||
(trip (tos:po (end 3 1 p.cog)))
|
rep
|
||||||
(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
|
|
||||||
==
|
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
$r
|
$r
|
||||||
@ -4624,16 +4620,16 @@
|
|||||||
^- {@ @}
|
^- {@ @}
|
||||||
:- r
|
:- r
|
||||||
?~ (mod n 2)
|
?~ (mod n 2)
|
||||||
(~(sum fo 65.535) 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) 4 r))
|
(~(sum fo 65.536) l (muk (snag n raku) 2 r))
|
||||||
::
|
::
|
||||||
++ rund :: reverse round
|
++ rund :: reverse round
|
||||||
|= {n/@ l/@ r/@}
|
|= {n/@ l/@ r/@}
|
||||||
^- {@ @}
|
^- {@ @}
|
||||||
:- r
|
:- r
|
||||||
?~ (mod n 2)
|
?~ (mod n 2)
|
||||||
(~(dif fo 65.535) 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) 4 r))
|
(~(dif fo 65.536) l (muk (snag n raku) 2 r))
|
||||||
::
|
::
|
||||||
++ raku
|
++ raku
|
||||||
^- (list @ux)
|
^- (list @ux)
|
||||||
@ -11166,7 +11162,7 @@
|
|||||||
::
|
::
|
||||||
++ poke :: external apply
|
++ poke :: external apply
|
||||||
|= {now/@da ovo/ovum}
|
|= {now/@da ovo/ovum}
|
||||||
=. eny (mix eny (shax now))
|
=. eny (mix eny (shaz now))
|
||||||
:: ~& [%poke -.q.ovo]
|
:: ~& [%poke -.q.ovo]
|
||||||
^- {(list ovum) _+>}
|
^- {(list ovum) _+>}
|
||||||
=^ zef niz
|
=^ 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)}
|
||||||
|
!!
|
||||||
|
--
|
@ -2208,7 +2208,7 @@
|
|||||||
++ ares (unit {p/term q/(list tank)}) :: possible error
|
++ ares (unit {p/term q/(list tank)}) :: possible error
|
||||||
++ bale :: driver state
|
++ bale :: driver state
|
||||||
|* a/_* :: %jael keys type
|
|* 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
|
{usr/iden dom/(list @t)} :: req user, domain
|
||||||
key/a :: secrets from %jael
|
key/a :: secrets from %jael
|
||||||
== ::
|
== ::
|
||||||
@ -2261,7 +2261,7 @@
|
|||||||
== ::
|
== ::
|
||||||
$: ost/bone :: opaque cause
|
$: ost/bone :: opaque cause
|
||||||
act/@ud :: change number
|
act/@ud :: change number
|
||||||
eny/@uvI :: entropy
|
eny/@uvJ :: entropy
|
||||||
now/@da :: current time
|
now/@da :: current time
|
||||||
byk/beak :: load source
|
byk/beak :: load source
|
||||||
== == ::
|
== == ::
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
:::: /hoon/code/gen
|
:::: /hoon/code/gen
|
||||||
::
|
::
|
||||||
:- %say
|
:- %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/@uvI 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
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI bec/beak}
|
|= $: {now/@da eny/@uvJ bec/beak}
|
||||||
{arg/?($~ {? $~}) $~}
|
{arg/?($~ {? $~}) $~}
|
||||||
==
|
==
|
||||||
:- %kiln-autoload
|
:- %kiln-autoload
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
--
|
--
|
||||||
[sole .]
|
[sole .]
|
||||||
:- %ask
|
:- %ask
|
||||||
|= $: {now/@da eny/@uvI bec/beak}
|
|= $: {now/@da eny/@uvJ bec/beak}
|
||||||
{arg/_(scug *@ *{his/@p tic/@p $~})}
|
{arg/_(scug *@ *{his/@p tic/@p $~})}
|
||||||
safety/?($on $off)
|
safety/?($on $off)
|
||||||
==
|
==
|
||||||
|
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/@uvI 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
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI bec/beak}
|
|= $: {now/@da eny/@uvJ bec/beak}
|
||||||
{arg/(list term) $~}
|
{arg/(list term) $~}
|
||||||
==
|
==
|
||||||
:+ %helm-reload-desk %base
|
:+ %helm-reload-desk %base
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
::::
|
::::
|
||||||
!:
|
!:
|
||||||
:- %say
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI bec/beak}
|
|= $: {now/@da eny/@uvJ bec/beak}
|
||||||
{{syd/@tas $~} $~}
|
{{syd/@tas $~} $~}
|
||||||
==
|
==
|
||||||
:- %kiln-cancel
|
:- %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/@uvI bec/beak}
|
||||||
|
{{pas/@uvH her/@p $~} $~}
|
||||||
|
==
|
||||||
|
:- %womb-claim
|
||||||
|
[pas her]
|
@ -6,7 +6,7 @@
|
|||||||
::::
|
::::
|
||||||
!:
|
!:
|
||||||
:- %say
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI bec/beak}
|
|= $: {now/@da eny/@uvJ bec/beak}
|
||||||
{arg/$~ $~}
|
{arg/$~ $~}
|
||||||
==
|
==
|
||||||
[%helm-deset ~]
|
[%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 .]
|
[sole .]
|
||||||
:- %ask
|
:- %ask
|
||||||
|= $: {now/@da eny/@uvI bec/beak}
|
|= $: {now/@da eny/@uvJ bec/beak}
|
||||||
{arg/$@($~ {dom/path $~})}
|
{arg/$@($~ {dom/path $~})}
|
||||||
$~
|
$~
|
||||||
==
|
==
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
!:
|
!:
|
||||||
[sole .]
|
[sole .]
|
||||||
:- %ask
|
:- %ask
|
||||||
|= $: {now/@da eny/@uvI bec/beak}
|
|= $: {now/@da eny/@uvJ bec/beak}
|
||||||
{arg/$@($~ {dom/path $~})}
|
{arg/$@($~ {dom/path $~})}
|
||||||
$~
|
$~
|
||||||
==
|
==
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
!:
|
!:
|
||||||
[sole .]
|
[sole .]
|
||||||
:- %ask
|
:- %ask
|
||||||
|= $: {now/@da eny/@uvI bec/beak}
|
|= $: {now/@da eny/@uvJ bec/beak}
|
||||||
{arg/$@($~ {dom/path $~})}
|
{arg/$@($~ {dom/path $~})}
|
||||||
$~
|
$~
|
||||||
==
|
==
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
!:
|
!:
|
||||||
[sole .]
|
[sole .]
|
||||||
:- %ask
|
:- %ask
|
||||||
|= $: {now/@da eny/@uvI bec/beak}
|
|= $: {now/@da eny/@uvJ bec/beak}
|
||||||
{arg/$@($~ {jon/json $~})}
|
{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/@uvI 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
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI bec/beak}
|
|= $: {now/@da eny/@uvJ bec/beak}
|
||||||
{arg/{syd/desk lab/@tas $~} $~}
|
{arg/{syd/desk lab/@tas $~} $~}
|
||||||
==
|
==
|
||||||
:- %kiln-label
|
:- %kiln-label
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
::::
|
::::
|
||||||
!:
|
!:
|
||||||
:- %say
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI byk/beak}
|
|= $: {now/@da eny/@uvJ byk/beak}
|
||||||
{arg/$?({dap/term $~} {who/ship dap/term $~}) $~}
|
{arg/$?({dap/term $~} {who/ship dap/term $~}) $~}
|
||||||
==
|
==
|
||||||
:- %drum-link
|
:- %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/@uvI 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/@uvI 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/@uvI bec/beak}
|
||||||
|
{who/(list @p) $~}
|
||||||
|
==
|
||||||
|
:- %womb-manage
|
||||||
|
who
|
@ -6,7 +6,7 @@
|
|||||||
::::
|
::::
|
||||||
!:
|
!:
|
||||||
:- %say
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI bec/beak}
|
|= $: {now/@da eny/@uvJ bec/beak}
|
||||||
{arg/$~ $~}
|
{arg/$~ $~}
|
||||||
==
|
==
|
||||||
[%helm-mass ~]
|
[%helm-mass ~]
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
::::
|
::::
|
||||||
!:
|
!:
|
||||||
:- %say
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI bek/beak}
|
|= $: {now/@da eny/@uvJ bek/beak}
|
||||||
{arg/{?(sorc {syd/$@(desk beaky) sorc})} cas/case gem/?($auto germ)}
|
{arg/{?(sorc {syd/$@(desk beaky) sorc})} cas/case gem/?($auto germ)}
|
||||||
==
|
==
|
||||||
=* our p.bek
|
=* our p.bek
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
::::
|
::::
|
||||||
!:
|
!:
|
||||||
:- %say
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI bec/beak}
|
|= $: {now/@da eny/@uvJ bec/beak}
|
||||||
{{pax/path pot/$@($~ {v/@tas $~})} $~}
|
{{pax/path pot/$@($~ {v/@tas $~})} $~}
|
||||||
==
|
==
|
||||||
?~ pot
|
?~ 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/@uvI bec/beak}
|
||||||
|
{{bos/$@($~ {i/@p $~})} $~}
|
||||||
|
==
|
||||||
|
:- %womb-obey
|
||||||
|
?~(bos ~ (some i.bos))
|
@ -6,7 +6,7 @@
|
|||||||
::::
|
::::
|
||||||
!:
|
!:
|
||||||
:- %say
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI bec/beak}
|
|= $: {now/@da eny/@uvJ bec/beak}
|
||||||
{arg/$@($~ {tym/@dr $~}) $~}
|
{arg/$@($~ {tym/@dr $~}) $~}
|
||||||
==
|
==
|
||||||
?~ arg $(arg [~h4 ~])
|
?~ arg $(arg [~h4 ~])
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
::::
|
::::
|
||||||
!:
|
!:
|
||||||
:- %say
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI bec/beak}
|
|= $: {now/@da eny/@uvJ bec/beak}
|
||||||
{arg/$~ $~}
|
{arg/$~ $~}
|
||||||
==
|
==
|
||||||
[%helm-reload ~[%c]]
|
[%helm-reload ~[%c]]
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
::::
|
::::
|
||||||
!:
|
!:
|
||||||
:- %say
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI bec/beak}
|
|= $: {now/@da eny/@uvJ bec/beak}
|
||||||
{arg/$~ $~}
|
{arg/$~ $~}
|
||||||
==
|
==
|
||||||
[%helm-reload ~[%z %a %b %c %d %e %f %g]]
|
[%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/@uvI 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/@uvI 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/@uvI 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/@uvI bec/beak}
|
||||||
|
{{sta/@u gal/$@($~ {i/@u $~})} $~}
|
||||||
|
==
|
||||||
|
:- %womb-release
|
||||||
|
[?^(gal i.gal 0) sta]
|
@ -6,7 +6,7 @@
|
|||||||
::::
|
::::
|
||||||
!:
|
!:
|
||||||
:- %say
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI bec/beak}
|
|= $: {now/@da eny/@uvJ bec/beak}
|
||||||
{arg/{desk (list term)} $~}
|
{arg/{desk (list term)} $~}
|
||||||
==
|
==
|
||||||
:- %helm-reload-desk
|
:- %helm-reload-desk
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
::::
|
::::
|
||||||
!:
|
!:
|
||||||
:- %say
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI bec/beak}
|
|= $: {now/@da eny/@uvJ bec/beak}
|
||||||
{arg/(list term) $~}
|
{arg/(list term) $~}
|
||||||
==
|
==
|
||||||
:- %helm-reload
|
:- %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/@uvI bec/beak}
|
||||||
|
{log/(list {@uvI 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/@uvI bec/beak}
|
||||||
|
{{her/@p wil/will $~} $~}
|
||||||
|
==
|
||||||
|
:- %womb-report
|
||||||
|
[her wil]
|
@ -6,7 +6,7 @@
|
|||||||
::::
|
::::
|
||||||
!:
|
!:
|
||||||
:- %say
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI bec/beak}
|
|= $: {now/@da eny/@uvJ bec/beak}
|
||||||
{arg/$~ $~}
|
{arg/$~ $~}
|
||||||
==
|
==
|
||||||
[%helm-reset ~]
|
[%helm-reset ~]
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
::::
|
::::
|
||||||
!:
|
!:
|
||||||
:- %say
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI bec/beak}
|
|= $: {now/@da eny/@uvJ bec/beak}
|
||||||
{arg/$~ $~}
|
{arg/$~ $~}
|
||||||
==
|
==
|
||||||
[%helm-reload ~[%f]]
|
[%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/@uvI byk/beak}
|
||||||
|
{{dap/term $~} $~}
|
||||||
|
==
|
||||||
|
?+ dap ~|(unknown-backup+dap !!)
|
||||||
|
$womb [%womb-save (tope byk /womb-part/bak/hood/app)]
|
||||||
|
==
|
@ -6,7 +6,7 @@
|
|||||||
::::
|
::::
|
||||||
!:
|
!:
|
||||||
:- %say
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI bec/beak}
|
|= $: {now/@da eny/@uvJ bec/beak}
|
||||||
{{pax/$@(term {i/knot t/path}) $~} $~}
|
{{pax/$@(term {i/knot t/path}) $~} $~}
|
||||||
==
|
==
|
||||||
:- %helm-serve
|
:- %helm-serve
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
::::
|
::::
|
||||||
!:
|
!:
|
||||||
:- %say
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI bec/beak}
|
|= $: {now/@da eny/@uvJ bec/beak}
|
||||||
{arg/{@ $@($~ {@ $~})} $~}
|
{arg/{@ $@($~ {@ $~})} $~}
|
||||||
==
|
==
|
||||||
:- %drum-start
|
:- %drum-start
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
::::
|
::::
|
||||||
!:
|
!:
|
||||||
:- %say
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI bec/beak}
|
|= $: {now/@da eny/@uvJ bec/beak}
|
||||||
{arg/{syd/@tas her/@p sud/@tas $~} $~}
|
{arg/{syd/@tas her/@p sud/@tas $~} $~}
|
||||||
==
|
==
|
||||||
:- %kiln-sync
|
:- %kiln-sync
|
||||||
|
@ -6,5 +6,5 @@
|
|||||||
::::
|
::::
|
||||||
!:
|
!:
|
||||||
:- %say
|
:- %say
|
||||||
|= {{now/@da eny/@uvI bec/beak} $~ $~}
|
|= {{now/@da eny/@uvJ bec/beak} $~ $~}
|
||||||
[%kiln-syncs ~]
|
[%kiln-syncs ~]
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
::::
|
::::
|
||||||
!:
|
!:
|
||||||
:- %say
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI bec/beak}
|
|= $: {now/@da eny/@uvJ bec/beak}
|
||||||
{arg/{syd/@tas her/@p sud/@tas $~} $~}
|
{arg/{syd/@tas her/@p sud/@tas $~} $~}
|
||||||
==
|
==
|
||||||
:- %kiln-track
|
:- %kiln-track
|
||||||
|
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/@uvI 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
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI byk/beak}
|
|= $: {now/@da eny/@uvJ byk/beak}
|
||||||
{arg/$?({dap/term $~} {who/ship dap/term $~}) $~}
|
{arg/$?({dap/term $~} {who/ship dap/term $~}) $~}
|
||||||
==
|
==
|
||||||
:- %drum-unlink
|
:- %drum-unlink
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
::::
|
::::
|
||||||
!:
|
!:
|
||||||
:- %say
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI bec/beak}
|
|= $: {now/@da eny/@uvJ bec/beak}
|
||||||
{{mon/$@(term {knot path}) $~} $~}
|
{{mon/$@(term {knot path}) $~} $~}
|
||||||
==
|
==
|
||||||
:- %kiln-unmount
|
:- %kiln-unmount
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
::::
|
::::
|
||||||
!:
|
!:
|
||||||
:- %say
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI bec/beak}
|
|= $: {now/@da eny/@uvJ bec/beak}
|
||||||
{arg/{syd/@tas her/@p sud/@tas $~} $~}
|
{arg/{syd/@tas her/@p sud/@tas $~} $~}
|
||||||
==
|
==
|
||||||
:- %kiln-unsync
|
:- %kiln-unsync
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
::::
|
::::
|
||||||
!:
|
!:
|
||||||
:- %say
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI bec/beak}
|
|= $: {now/@da eny/@uvJ bec/beak}
|
||||||
$~
|
$~
|
||||||
$~
|
$~
|
||||||
==
|
==
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
!:
|
!:
|
||||||
:- %say
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI bec/beak}
|
|= $: {now/@da eny/@uvJ bec/beak}
|
||||||
{{app/term source/path station/knot $~} $~}
|
{{app/term source/path station/knot $~} $~}
|
||||||
==
|
==
|
||||||
[%pipe-cancel app source station]
|
[%pipe-cancel app source station]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
!:
|
!:
|
||||||
:- %say
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI bec/beak}
|
|= $: {now/@da eny/@uvJ bec/beak}
|
||||||
{{app/term source/path station/knot $~} $~}
|
{{app/term source/path station/knot $~} $~}
|
||||||
==
|
==
|
||||||
[%pipe-connect app source station]
|
[%pipe-connect app source station]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
!:
|
!:
|
||||||
:- %say
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI bec/beak}
|
|= $: {now/@da eny/@uvJ bec/beak}
|
||||||
{$~ $~}
|
{$~ $~}
|
||||||
==
|
==
|
||||||
[%pipe-list ~]
|
[%pipe-list ~]
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
:: Input twitter keys
|
:: Input twitter keys
|
||||||
/- sole
|
/- sole
|
||||||
!:
|
!:
|
||||||
=+ cryp=bruw :: XX change to ec2 ++brew eventually
|
=+ cryp=crub
|
||||||
=+ [sole]
|
=+ [sole]
|
||||||
:- %ask
|
:- %ask
|
||||||
|= $: {now/@da eny/@uvI bec/beak}
|
|= $: {now/@da eny/@uvJ bec/beak}
|
||||||
{{who/ship $~} $~}
|
{{who/ship $~} $~}
|
||||||
==
|
==
|
||||||
^- (sole-result (cask tang))
|
^- (sole-result (cask tang))
|
||||||
@ -19,9 +19,9 @@
|
|||||||
%+ sole-lo [%| %pope-none "[press enter to compute]"] :: XX oy
|
%+ sole-lo [%| %pope-none "[press enter to compute]"] :: XX oy
|
||||||
%+ sole-go (easy ~)
|
%+ sole-go (easy ~)
|
||||||
|= $~
|
|= $~
|
||||||
=+ bur=(shax (add who (shax fra)))
|
=+ bur=(shaz (add who (shaz fra)))
|
||||||
~& %computing-fingerprint
|
~& %computing-fingerprint
|
||||||
=+ arc=(cryp 2.048 bur)
|
=+ arc=(pit:nu:cryp 512 bur)
|
||||||
%+ sole-so %tang
|
%+ sole-so %tang
|
||||||
:~ leaf+"generator: {(scow %uw bur)}"
|
:~ leaf+"generator: {(scow %uw bur)}"
|
||||||
leaf+"fingerprint: {(scow %uw fig:ex:arc)}"
|
leaf+"fingerprint: {(scow %uw fig:ex:arc)}"
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
::::
|
::::
|
||||||
!:
|
!:
|
||||||
:- %say
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI bec/beak}
|
|= $: {now/@da eny/@uvJ bec/beak}
|
||||||
{$~ $~}
|
{$~ $~}
|
||||||
==
|
==
|
||||||
:- %noun
|
:- %noun
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
::::
|
::::
|
||||||
!:
|
!:
|
||||||
:- %say
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI byk/beak}
|
|= $: {now/@da eny/@uvJ byk/beak}
|
||||||
{{man/knot $~} $~}
|
{{man/knot $~} $~}
|
||||||
==
|
==
|
||||||
[%talk-load man]
|
[%talk-load man]
|
@ -6,7 +6,7 @@
|
|||||||
::::
|
::::
|
||||||
!:
|
!:
|
||||||
:- %say
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI byk/beak}
|
|= $: {now/@da eny/@uvJ byk/beak}
|
||||||
{{man/knot $~} $~}
|
{{man/knot $~} $~}
|
||||||
==
|
==
|
||||||
[%talk-log man]
|
[%talk-log man]
|
@ -6,7 +6,7 @@
|
|||||||
::::
|
::::
|
||||||
!:
|
!:
|
||||||
:- %say
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI byk/beak}
|
|= $: {now/@da eny/@uvJ byk/beak}
|
||||||
{{man/knot $~} $~}
|
{{man/knot $~} $~}
|
||||||
==
|
==
|
||||||
[%talk-save man]
|
[%talk-save man]
|
@ -6,7 +6,7 @@
|
|||||||
::::
|
::::
|
||||||
!:
|
!:
|
||||||
:- %say
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI byk/beak}
|
|= $: {now/@da eny/@uvJ byk/beak}
|
||||||
{{man/knot $~} $~}
|
{{man/knot $~} $~}
|
||||||
==
|
==
|
||||||
[%talk-unlog man]
|
[%talk-unlog man]
|
@ -6,7 +6,7 @@
|
|||||||
::::
|
::::
|
||||||
!:
|
!:
|
||||||
:- %say
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI bec/beak}
|
|= $: {now/@da eny/@uvJ bec/beak}
|
||||||
{{her/@p $~} $~}
|
{{her/@p $~} $~}
|
||||||
==
|
==
|
||||||
:- %noun
|
:- %noun
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
::
|
::
|
||||||
[twitter .]
|
[twitter .]
|
||||||
:- %say
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI bec/beak}
|
|= $: {now/@da eny/@uvJ bec/beak}
|
||||||
{{who/knot msg/cord $~} $~}
|
{{who/knot msg/cord $~} $~}
|
||||||
==
|
==
|
||||||
[%twit-do [who %post eny msg]]
|
[%twit-do [who %post eny msg]]
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
:::: ~fyr
|
:::: ~fyr
|
||||||
::
|
::
|
||||||
:- %say
|
:- %say
|
||||||
|= $: {now/@da eny/@uvI bek/beak}
|
|= $: {now/@da eny/@uvJ bek/beak}
|
||||||
{{who/iden $~} typ/?($home $user)}
|
{{who/iden $~} typ/?($home $user)}
|
||||||
==
|
==
|
||||||
=+ pax=/(scot %p p.bek)/twit/(scot %da now)/[typ]/[who]
|
=+ 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/@uvI 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/@uvI 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/@uvI 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/@uvI 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,17 +9,12 @@
|
|||||||
:::: :: ::
|
:::: :: ::
|
||||||
:: :: ::
|
:: :: ::
|
||||||
|% :: ::
|
|% :: ::
|
||||||
++ drum-part {$drum $1 drum-pith} ::
|
++ drum-part {$drum $1 drum-pith-1} ::
|
||||||
++ drum-part-any ::
|
++ drum-part-old {$drum $0 drum-pith-0} ::
|
||||||
$: $drum ::
|
++ drum-pith-0 _!! :: forgotten
|
||||||
$% {$1 drum-pith} ::
|
++ drum-pith-1 ::
|
||||||
{$0 drum-pith-0} ::
|
$: sys/(unit bone) :: local console
|
||||||
== == ::
|
eel/(set gill) :: connect to
|
||||||
++ 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) ::
|
ray/(set well) ::
|
||||||
fur/(map dude (unit server)) :: servers
|
fur/(map dude (unit server)) :: servers
|
||||||
bin/(map bone source) :: terminals
|
bin/(map bone source) :: terminals
|
||||||
@ -32,19 +27,12 @@
|
|||||||
$: syd/desk :: app identity
|
$: syd/desk :: app identity
|
||||||
cas/case :: boot case
|
cas/case :: boot case
|
||||||
== ::
|
== ::
|
||||||
++ kill-0 (unit (list @c)) :: old kill buffer
|
|
||||||
++ kill :: kill ring
|
++ kill :: kill ring
|
||||||
$: pos/@ud :: ring position
|
$: pos/@ud :: ring position
|
||||||
num/@ud :: number of entries
|
num/@ud :: number of entries
|
||||||
max/_60 :: max entries
|
max/_60 :: max entries
|
||||||
old/(list (list @c)) :: entries proper
|
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
|
++ source :: input device
|
||||||
$: edg/_80 :: terminal columns
|
$: edg/_80 :: terminal columns
|
||||||
off/@ud :: window offset
|
off/@ud :: window offset
|
||||||
@ -67,8 +55,6 @@
|
|||||||
$: pos/@ud :: search position
|
$: pos/@ud :: search position
|
||||||
str/(list @c) :: search string
|
str/(list @c) :: search string
|
||||||
== ::
|
== ::
|
||||||
++ target-0 :: target without blt
|
|
||||||
(cork target |=(target |1.+<)) ::
|
|
||||||
++ target :: application target
|
++ target :: application target
|
||||||
$: blt/(pair (unit dill-belt) (unit dill-belt)) :: curr & prev belts
|
$: blt/(pair (unit dill-belt) (unit dill-belt)) :: curr & prev belts
|
||||||
ris/(unit search) :: reverse-i-search
|
ris/(unit search) :: reverse-i-search
|
||||||
@ -133,25 +119,17 @@
|
|||||||
^- drum-part
|
^- drum-part
|
||||||
:* %drum
|
:* %drum
|
||||||
%1
|
%1
|
||||||
|
~ :: sys
|
||||||
(deft-fish our) :: eel
|
(deft-fish our) :: eel
|
||||||
(deft-apes our) :: ray
|
(deft-apes our) :: ray
|
||||||
~ :: fur
|
~ :: fur
|
||||||
~ :: bin
|
~ :: bin
|
||||||
== ::
|
== ::
|
||||||
::
|
|
||||||
++ drum-port
|
++ drum-port
|
||||||
|= old/drum-part-any
|
|= old/?(drum-part drum-part-old) ^- drum-part
|
||||||
^- drum-part
|
?- &2.old
|
||||||
?: ?=($1 &2.old) old
|
$1 old
|
||||||
~& [%drum-porting &2.old]
|
$0 !! :: XX unreachable, see issue #242
|
||||||
=; 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]])
|
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ drum-path :: encode path
|
++ drum-path :: encode path
|
||||||
@ -223,9 +201,13 @@
|
|||||||
=< se-abet =< se-view
|
=< se-abet =< se-view
|
||||||
(se-klin gyl)
|
(se-klin gyl)
|
||||||
::
|
::
|
||||||
:: ++ poke-exit ::
|
++ poke-exit ::
|
||||||
:: |=(~ se-abet:(se-blit `dill-blit`[%qit ~])) :: XX find bone
|
|=($~ se-abet:(se-blit-sys `dill-blit`[%qit ~])) ::
|
||||||
:: ::
|
::
|
||||||
|
++ poke-put ::
|
||||||
|
|= {pax/path txt/@}
|
||||||
|
se-abet:(se-blit-sys [%sav pax txt]) ::
|
||||||
|
::
|
||||||
++ reap-phat ::
|
++ reap-phat ::
|
||||||
|= {way/wire saw/(unit tang)}
|
|= {way/wire saw/(unit tang)}
|
||||||
=< se-abet =< se-view
|
=< se-abet =< se-view
|
||||||
@ -270,6 +252,7 @@
|
|||||||
?. se-ably
|
?. se-ably
|
||||||
=. . se-adit
|
=. . se-adit
|
||||||
[(flop moz) +>+>+<+]
|
[(flop moz) +>+>+<+]
|
||||||
|
=. sys ?^(sys sys `ost)
|
||||||
=. . se-subze:se-adze:se-adit
|
=. . se-subze:se-adze:se-adit
|
||||||
:_ %_(+>+>+<+ bin (~(put by bin) ost `source`+>+<))
|
:_ %_(+>+>+<+ bin (~(put by bin) ost `source`+>+<))
|
||||||
^- (list move)
|
^- (list move)
|
||||||
@ -486,6 +469,11 @@
|
|||||||
|= bil/dill-blit
|
|= bil/dill-blit
|
||||||
+>(biz [bil biz])
|
+>(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
|
++ se-show :: show buffer, raw
|
||||||
|= lin/(pair @ud (list @c))
|
|= lin/(pair @ud (list @c))
|
||||||
^+ +>
|
^+ +>
|
||||||
@ -513,6 +501,11 @@
|
|||||||
|= mov/move
|
|= mov/move
|
||||||
%_(+> moz [mov moz])
|
%_(+> moz [mov moz])
|
||||||
::
|
::
|
||||||
|
++ se-emil :: emit moves
|
||||||
|
|= mov/(list move)
|
||||||
|
?~ mov +>
|
||||||
|
$(mov t.mov, +> (se-emit i.mov))
|
||||||
|
::
|
||||||
++ se-talk
|
++ se-talk
|
||||||
|= tac/(list tank)
|
|= tac/(list tank)
|
||||||
^+ +>
|
^+ +>
|
||||||
@ -617,10 +610,8 @@
|
|||||||
ta-bel
|
ta-bel
|
||||||
.(str.u.ris (scag (dec (lent str.u.ris)) str.u.ris))
|
.(str.u.ris (scag (dec (lent str.u.ris)) str.u.ris))
|
||||||
?: =(0 pos.inp)
|
?: =(0 pos.inp)
|
||||||
?: =(0 (lent buf.say.inp))
|
(ta-act %clr ~)
|
||||||
(ta-act %clr ~)
|
:: .(+> (se-blit %bel ~))
|
||||||
:: .(+> (se-blit %bel ~))
|
|
||||||
ta-bel
|
|
||||||
=+ pre=(dec pos.inp)
|
=+ pre=(dec pos.inp)
|
||||||
(ta-hom %del pre)
|
(ta-hom %del pre)
|
||||||
::
|
::
|
||||||
@ -850,9 +841,9 @@
|
|||||||
$dot ?. &(?=(^ old.hit) ?=(^ -.old.hit))
|
$dot ?. &(?=(^ old.hit) ?=(^ -.old.hit))
|
||||||
ta-bel
|
ta-bel
|
||||||
=+ old=`(list @c)`-.old.hit
|
=+ old=`(list @c)`-.old.hit
|
||||||
=+ b=(bwrd (lent old) old nace)
|
=+ b=(bwrd (lent old) old nedg)
|
||||||
%- ta-hom(ris ~)
|
%- ta-hom(ris ~)
|
||||||
(ta-cat pos.inp (slag (add b =(0 b)) old))
|
(ta-cat pos.inp (slag b old))
|
||||||
::
|
::
|
||||||
$bac ?: =(0 pos.inp)
|
$bac ?: =(0 pos.inp)
|
||||||
ta-bel
|
ta-bel
|
||||||
|
@ -78,8 +78,8 @@
|
|||||||
++ poke-begin :: make/send keypair
|
++ poke-begin :: make/send keypair
|
||||||
|= hood-begin =< abet
|
|= hood-begin =< abet
|
||||||
?> ?=($~ bur)
|
?> ?=($~ bur)
|
||||||
=+ buz=(shax :(mix (jam ges) eny))
|
=+ buz=(shaz :(mix (jam ges) eny))
|
||||||
=+ loy=(bruw 2.048 buz)
|
=+ loy=(pit:nu:crub 512 buz)
|
||||||
%- emit(bur `[his [0 sec:ex:loy]~])
|
%- emit(bur `[his [0 sec:ex:loy]~])
|
||||||
[%wont /helm/ticket [our (sein his)] /a/ta his tic ges pub:ex:loy]
|
[%wont /helm/ticket [our (sein his)] /a/ta his tic ges pub:ex:loy]
|
||||||
::
|
::
|
||||||
@ -98,8 +98,8 @@
|
|||||||
::
|
::
|
||||||
++ poke-send-ask
|
++ poke-send-ask
|
||||||
|= mel/cord =< abet
|
|= mel/cord =< abet
|
||||||
%^ emit %poke /helm/ask/(scot %p ~doznec)
|
%^ emit %poke /helm/ask/(scot %p ~marzod)
|
||||||
[[~doznec %ask] %ask-mail mel]
|
[[~marzod %ask] %ask-mail mel]
|
||||||
::
|
::
|
||||||
++ poke-serve
|
++ poke-serve
|
||||||
|= top/?(desk beam) =< abet
|
|= top/?(desk beam) =< abet
|
||||||
|
@ -71,7 +71,7 @@
|
|||||||
++ our-host .^(hart %e /(scot %p our)/host/fake)
|
++ our-host .^(hart %e /(scot %p our)/host/fake)
|
||||||
++ redirect-uri
|
++ redirect-uri
|
||||||
%- crip %- earn
|
%- crip %- earn
|
||||||
%^ interpolate 'https://our-host/~/ac/:domain/:user/in'
|
%^ into-url:interpolate 'https://our-host/~/ac/:domain/:user/in'
|
||||||
`our-host
|
`our-host
|
||||||
:~ domain+(join '.' (flop dom))
|
:~ domain+(join '.' (flop dom))
|
||||||
user+?:(state-usr '_state' (scot %ta usr))
|
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
|
[now.bol *bouquet [%app dap.bol (crip (earn url))]] :: XX
|
||||||
::
|
::
|
||||||
++ said :: app message
|
++ 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
|
:- %talk-command
|
||||||
^- command
|
^- command
|
||||||
:- %publish
|
:- %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 [%mail wir] [our %gmail] %email adr "Your Urbit Invitation" [msg]~)
|
||||||
|
::
|
||||||
|
++ log-transaction :: logged poke
|
||||||
|
|= a/transaction ^+ +>
|
||||||
|
?: replay +>
|
||||||
|
(emit %poke /log [our %hood] %drum-put /womb-events/(scot %da now)/hoon (crip <eny a>))
|
||||||
|
::
|
||||||
|
++ poke-replay-log :: rerun transactions
|
||||||
|
|= a/(list {eny/@uvI 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 /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 /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 /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 4) (fo-init 3))
|
||||||
|
--
|
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)]
|
++ mime [/application/octet-stream (taco mud)]
|
||||||
--
|
--
|
||||||
|
++ garb /womb-part
|
||||||
++ grab
|
++ grab
|
||||||
|% :: convert from
|
|% :: convert from
|
||||||
++ mime |=({p/mite q/octs} q.q)
|
|
||||||
++ noun @ :: clam from %noun
|
++ noun @ :: clam from %noun
|
||||||
--
|
--
|
||||||
++ grad %mime
|
++ grad %mime
|
||||||
|
@ -4,6 +4,11 @@
|
|||||||
/? 310
|
/? 310
|
||||||
!:
|
!:
|
||||||
|_ own/mime
|
|_ own/mime
|
||||||
|
++ grow
|
||||||
|
|%
|
||||||
|
++ jam `@`q.q.own
|
||||||
|
--
|
||||||
|
::
|
||||||
++ grab :: convert from
|
++ grab :: convert from
|
||||||
|%
|
|%
|
||||||
++ noun mime :: clam from %noun
|
++ 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/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 {@uvI transaction:womb})
|
||||||
|
++ grab |%
|
||||||
|
++ noun (list {@uvI 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)
|
||||||
|
==
|
||||||
|
--
|
||||||
|
--
|
22
mar/womb/ticket-info.hoon
Normal file
22
mar/womb/ticket-info.hoon
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
::
|
||||||
|
:::: /hoon/stat-all/womb/mar
|
||||||
|
::
|
||||||
|
/? 310
|
||||||
|
::
|
||||||
|
:::: ~fyr
|
||||||
|
::
|
||||||
|
|_ {pas/@uvH status/?($fail $good $used)}
|
||||||
|
::
|
||||||
|
++ grab
|
||||||
|
|%
|
||||||
|
++ noun {@uvH ?($fail $good $used)}
|
||||||
|
--
|
||||||
|
++ grow
|
||||||
|
|%
|
||||||
|
++ json
|
||||||
|
%- jobe :~
|
||||||
|
passcode+(jape <pas>)
|
||||||
|
status+[%s status]
|
||||||
|
==
|
||||||
|
--
|
||||||
|
--
|
34
sur/gmail-label.hoon
Normal file
34
sur/gmail-label.hoon
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
:: This structure is the hoon equivalent of the labels resource used by the
|
||||||
|
:: gmail api
|
||||||
|
|
||||||
|
|
||||||
|
|%
|
||||||
|
++ label-list-visibility
|
||||||
|
$? $'labelHide' :: Do not show the label in the label list
|
||||||
|
$'labelShow' :: Show the label in the label list. (Default)
|
||||||
|
$'labelShowIfUnread' :: Show the label if any unread msgs w/that label.
|
||||||
|
==
|
||||||
|
++ message-list-visibility
|
||||||
|
$? $hide :: Do not show the label in the message list.
|
||||||
|
$show :: Show the label in the message list. (Default)
|
||||||
|
==
|
||||||
|
--
|
||||||
|
|
||||||
|
|%
|
||||||
|
:: label request is the body of the post request you send to gmail to create
|
||||||
|
:: a labels resource
|
||||||
|
++ label-req {llv/label-list-visibility mlv/message-list-visibility name/@t}
|
||||||
|
|
||||||
|
:: the label resource returned by gmail in response to your successful request
|
||||||
|
++ label *
|
||||||
|
|
||||||
|
++ label-req-to-json
|
||||||
|
|= label-req
|
||||||
|
%- jobe :^
|
||||||
|
['name' `json`s+name]
|
||||||
|
['labelListVisibility' `json`s+(crip (sifo `cord`llv))]
|
||||||
|
['messageListVisibility' `json`s+(crip (sifo `cord`mlv))]
|
||||||
|
~
|
||||||
|
--
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user