Merge branch 'release-candidate' into ames-eth-keys

* release-candidate: (33 commits)
  update pin-vere-commit.txt
  Bug fix for metal-wrapping runes
  Remove old-zuse (#867)
  Type Analysis (#865)
  remove clam from error sigpam
  Fix compiler error.
  Remove temporary type analysis work.
  Remove ++cook from ++auri parsing
  Remove forced ssl upgrade for localhost http reqs
  moved to new branch with updated arvo
  11. demacrotizes %6, %7, %8, and %9
  10. updates %5 to require two subformulas (4K)
  9. emits %10 (4K)
  8. adds and implements edit (%10) (4K)
  7. removes %13 and %14 (4K)
  6. emits %11 and %12 (4K)
  5. implements hint at %11 and wish at %12 (4K)
  4. removes %10 and %11 (4K)
  3. emits %13 and %14 (4K)
  2. implements %13 and %14 (4K)
  ...
This commit is contained in:
Joe Bryan 2018-11-01 00:18:54 -04:00
commit c8f1b4d5a1
82 changed files with 4631 additions and 1426 deletions

View File

@ -1 +1 @@
https://ci-piers.urbit.org/zod-daed58f3e2eb807553cd8073a9c0fdc32ea895a7.tgz
https://ci-piers.urbit.org/zod-db0f014d8735bc4a2ac1eec840c80903c18d4c3f.tgz

View File

@ -1 +1 @@
d6b9d6088c290a31a8e44c605c7dfcfafd368fcb
35bfb490868a086d28851d3fd176ff3105544ba6

View File

@ -2,14 +2,12 @@
:::: /hoon/curl/app
::
/? 310
/+ old-zuse
=, old-zuse
::
|_ {{^ ^ ost/@ ^} ~}
++ poke |*(a/{mark *} :_(+> [ost %hiss / `~ %wain a]~))
::++ poke-purl |=(a/purl :_(+> [ost %hiss / %wain %purl a]~))
++ poke-tape |=(a/tape (poke %purl (scan a auri:urlp)))
++ poke-hiss |=(a/hiss (poke %hiss a))
++ poke-tape |=(a/tape (poke %purl (scan a auri:de-purl:html)))
++ poke-hiss |=(a/hiss:eyre (poke %hiss a))
++ poke-noun poke-hiss
++ sigh-wain |=({* a/wain} ~&(a `+>))
++ sigh-tang |=({* a/tang} (mean a))

View File

@ -1624,6 +1624,92 @@
(he-diff %txt ">=")
(he-diff %tan u.p.cit)
::
++ he-lens
|= com/command:^^^^lens
^+ +>
=+ ^- source/dojo-source
=| num/@
=- ?. ?=($send-api -.sink.com) :: XX num is incorrect
sor
:- 0
:+ %as `mark`(cat 3 api.sink.com '-poke')
:- 1
:+ %do
^- hoon
:+ %brtr [%base %noun]
:^ %clls [%rock %tas %post]
[%rock %$ endpoint.sink.com]
[%cnts [%& 6]~ ~]
sor
^= sor
|- ^- dojo-source
:- num
?- -.source.com
$data [%ex %sand %t data.source.com]
$dojo
%+ rash command.source.com
(ifix [(punt gap) (punt gap)] dp-build:dp)
::
$clay
:- %ex
^- hoon
:+ %dtkt
[%base %noun]
:+ %clhp
[%rock %tas %cx]
%+ rash pax.source.com
rood:(vang | /(scot %p our.hid)/home/(scot %da now.hid))
::
$url [%ur `~. url.source.com]
$api !!
$get-api
:- %ex
^- hoon
:+ %dtkt
[%like ~[%json] ~]
:* %clsg
[%rock %tas %gx]
[%sand %ta (scot %p our.hid)]
[%sand %tas api.source.com]
[%sand %ta (scot %da now.hid)]
(turn endpoint.source.com |=(a/@t [%sand %ta a]))
==
::
$listen-api !!
$as
:* %as mar.source.com
$(num +(num), source.com next.source.com)
==
::
$hoon
:* %do
%+ rash code.source.com
tall:(vang | /(scot %p our.hid)/home/(scot %da now.hid))
$(num +(num), source.com next.source.com)
==
::
$tuple
:- %tu
|- ^- (list dojo-source)
?~ next.source.com
~
=. num +(num)
:- ^$(source.com i.next.source.com)
$(next.source.com t.next.source.com)
==
=+ |- ^- sink/dojo-sink
?- -.sink.com
$stdout [%show %0]
$output-file $(sink.com [%command (cat 3 '@' pax.sink.com)])
$output-clay [%file (need (de-beam pax.sink.com))]
$url [%http %post `~. url.sink.com]
$to-api !!
$send-api [%poke our.hid api.sink.com]
$command (rash command.sink.com dp-sink:dp)
$app [%poke our.hid app.sink.com]
==
(he-plan sink source)
::
++ he-like :: accept line
|= buf/(list @c)
=(%& -:(he-dope (tufa buf)))
@ -1728,6 +1814,10 @@
|= act/sole-action ~| poke+act %. act
(wrap he-type):arm
::
++ poke-lens-command
|= com/command:^^^^lens ~| poke-lens+com %. com
(wrap he-lens):arm
::
++ poke-json
|= jon/json
^- {(list move) _+>.$}

View File

@ -145,6 +145,7 @@
++ peer-drum (wrap peer):from-drum
++ poke-atom (wrap poke-atom):from-helm
++ poke-dill-belt (wrap poke-dill-belt):from-drum
++ poke-dill-blit (wrap poke-dill-blit):from-drum
++ poke-drum-put (wrap poke-put):from-drum
++ poke-drum-link (wrap poke-link):from-drum
++ poke-drum-unlink (wrap poke-unlink):from-drum

View File

@ -1,282 +0,0 @@
::
:::: /hoon/static/app
::
::
:: XX REVIEW: should this be a generator?
:: - it makes sense, since it doesnt need to store state between calls, its just producing a result
:: - but we can't pass arbitrary run-time arguments to ford runes.... yet
:: and we need that to specify the input file
:: - but we could have a special fixed directory to place our input files, so that we don't
:: have to pass the location as an argument at runtime
:: - but then could you have multiple separate static builds?
:: - let it take all files in a directory, build them as html
:: spider the links, then keep a map from all top-level files a set of their connected files
:: - then let the generator args specify which top-level file to write out and where to write it
:: - how do we know what a top-level file is? or can we treat all files as top levels files
:: mapped to their corresponding subset of linked files?
::
::
/? 309
/- static
|%
::::
:::: structures
::::
+= move [bone card]
+= card
$% [%poke wire dock poke]
[%exec wire ship (unit bilk:ford)]
[%info wire ship toro:clay]
==
+= poke
$% [%static-action action:static]
==
::::
:::: utilities
::::
::
:: +find-links: takes a manx and returns a list of all href and src links in it
::
++ find-links
|= max=manx
^- (list tape)
%+ weld
::
%+ roll a.g.max
|= [[n=mane v=tape] out=(list tape)]
?: ?=(?(%href %src) n)
[v out]
out
::
%+ roll c.max
|= [m=manx out=(list tape)]
(weld out (find-links m))
::
+= relative
$% [%root wir=wire ext=mark]
[%here wir=wire ext=mark]
[%up n=@ wir=wire ext=mark]
==
::
++ parse-relative
|= pax=tape
^- (unit relative)
%+ rust pax
%+ cook
|= a=^
?: ?=([%up @] -.a)
((hard relative) [%up ->.a +.a])
((hard relative) a)
;~ plug
::
;~ pose
(cold %root fas)
::
(cold [%up 1] ;~(plug dot fas))
::
%+ cook
|= a=(list %up)
[%up +((lent a))]
(plus (cold %up ;~(plug dot dot fas)))
::
(cold [%up 1] (easy ~))
==
::
%+ cook
|= a=(list coin)
%+ turn a
|= b=coin
~(rent co b)
(more fas nuck:so)
::
;~ pose
(cold %html (jest '.html'))
(cold %md (jest '.md'))
(cold %umd (jest '.umd'))
(cold %hoon (jest '.hoon'))
(cold %js (jest '.js'))
(cold %css (jest '.css'))
(easy %$)
==
==
::
++ process-relative
|= [loc=beam rel=relative]
^- [loc=beam ext=mark]
|-
?- -.rel
%root
[loc(s (flop wir.rel)) ext.rel]
::
%here
[loc(s (flop (weld (flop s.loc) wir.rel))) ext.rel]
::
%up
%= $
s.loc (slag n.rel s.loc)
rel [%here wir.rel ext.rel]
==
==
::
+= state
$: waiting=(map wire [in=beam out=beam])
finished=(set beam)
==
--
::::
:::: app proper
::::
|_ [bol=bowl:gall sta=state]
::
++ this .
::
:: +prep: we don't need no state
::
++ prep
|= old=(unit)
:- ~
this(sta *state)
::
:: +poke-static-action: send build request to ford and wait for result
::
++ poke-static-action
|= act=action:static
^- (quip move _this)
?- -.act
%build
?> !?=(~ s.in.act)
=. s.out.act [-.s.in.act s.out.act]
=/ sil (find-file in.act ext.act)
=/ wir=wire /build/(scot %p (sham [in.act out.act]))
=/ car [%exec wir our.bol `[-.in.act sil]]
:- [ost.bol car]~
%= this
waiting.sta (~(put by waiting.sta) wir [in.act out.act])
==
==
::
:: +find-file: checks for file at %umd, %md, %html, %js, %css, and %hoon extensions
:: returns a silk to send to ford
::
++ find-file
|= [loc=beam ext=mark]
^- silk:ford
?> !?=(~ s.loc)
::
=/ try-exts=(list @tas)
:~ %hoon
%md
%umd
%html
==
:: if ext is unspecified then try the extensions defined in try-exts
::
=/ normed-ext=@tas
?: =(%$ ext)
|-
?~ try-exts
~_ leaf+"Error: Non-existent file: {<(en-beam:format loc)>}" !!
=/ pax (weld (en-beam:format loc) [i.try-exts ~])
=/ ark .^(arch %cy pax)
?~ fil.ark
$(try-exts t.try-exts)
i.try-exts
:: otherwise just try the extension given
::
=/ pax (weld (en-beam:format loc) [ext ~])
=/ ark .^(arch %cy pax)
?~ fil.ark
~_ leaf+"Error: Non-existent file: {<pax>}" !!
ext
:: form silk for the given mark
::
?: ?=(%hoon normed-ext)
:: [%cast %hymn [%bake %noun *coin loc]]
[%cast %hymn [%ride [%cnts p=~[[%.y p=1]] q=~] [%core loc]]]
?: ?=(%md normed-ext)
[%cast %elem [%cast %down [%file loc(s [normed-ext s.loc])]]]
?: ?=(%umd normed-ext)
[%cast %elem [%file loc(s [normed-ext s.loc])]]
?: ?=(%html normed-ext)
[%cast %hymn [%file loc(s [normed-ext s.loc])]]
?: ?=(?(%js %css) normed-ext)
[%file loc(s [normed-ext s.loc])]
~_ leaf+"Error: Unsupported filetype: {<normed-ext>}" !!
::
:: +coup: handle errors
::
++ coup
|= [wir=wire err=(unit tang)]
^- (quip move _this)
?~ err
[~ this]
(mean u.err)
::
:: +made: process ford result
::
++ made
|= [wir=path hash=@uvJ gag=gage:ford]
^- (quip move _this)
:: if ford build failed, print out error and crash
:: otherwise, assert we got single result, not a table
::
?: ?=(%| -.gag)
~_ p.gag !!
?> ?=(%& -.gag)
:: retrieve the build in/out beams
::
=/ bem=[in=beam out=beam] (need (~(get by waiting.sta) wir))
?> &(!?=(~ s.in.bem) !?=(~ s.out.bem))
::
=/ file-contents q.q.p.gag
=/ file-type=mark p.p.gag
:: finish by removing build from waiting list
:: and adding it to our finished list, to prevent infinite build loops
::
:_ %= this
waiting.sta (~(del by waiting.sta) wir)
finished.sta (~(put in finished.sta) in.bem)
==
::
^- (list move)
:: if js or css, pass it through without processing it
::
?. ?=(?(%hymn %elem) file-type)
?> ?=(?(%js %css) file-type)
=. s.out.bem [file-type s.out.bem]
=/ pax (en-beam:format out.bem)
?> ?=(@t file-contents)
=/ fol (foal:space:userlib pax [file-type !>(file-contents)])
:_ ~
[ost.bol %info /write our.bol fol]
:: get all links from manx
::
=/ file-contents=manx ((hard manx) q.q.p.gag)
=/ links=(list tape) (find-links file-contents)
:: process list of links into list of static-action
::
=/ new-actions=(list move)
%+ roll links
|= [link=tape output=(list move)]
=/ parsed (parse-relative link)
?~ parsed
output
=/ new-in (process-relative in.bem u.parsed)
=/ new-out (process-relative out.bem u.parsed)
=. s.loc.new-out (slag 1 s.loc.new-out)
?: (~(has in finished.sta) loc.new-in)
output
:_ output
[ost.bol %poke /act [our.bol dap.bol] %static-action [%build loc.new-in loc.new-out ext.new-in]]
:: write html output file to clay
::
=. s.out.bem [%html s.out.bem]
~& (flop s.out.bem)
=/ pax (en-beam:format out.bem)
=/ fol (foal:space:userlib pax [%html !>((crip (en-xml:html file-contents)))])
:_ new-actions
[ost.bol %info /write our.bol fol]
--

View File

@ -1,8 +1,8 @@
::
|%
++ test
$% [%arvo ~] ::UNIMPLEMENTED
[%marks ~] ::UNIMPLEMENTED
$% [%arvo ~] ::UNIMPLEMENTED
[%marks ~] ::UNIMPLEMENTED
[%cores p=path]
[%hoons p=path]
[%names p=path]
@ -115,11 +115,11 @@
?- -.a
%arvo ~|(%stub !!) ::basically double solid?
%hoons ~&((list-hoons p.a ~) ~)
%cores [ost (build-core [- +]:(list-hoons p.a skip=(sy /sys /ren ~)))]~
%cores [ost (build-core [- +]:(list-hoons p.a skip=(sy /sys /ren /tests ~)))]~
%names ~&((list-names p.a) ~)
%marks ~|(%stub !!) ::TODO restore historical handler
%renders [ost (build-rend [- +]:(list-names (weld /ren p.a)))]~
==
==
::
++ list-names
|= a/path ^- (list term)
@ -161,34 +161,12 @@
:- /ren/test-gen "temporarily disabled"
:- /ren/tree/index "temporarily disabled"
:- /ren/tree/elem "temporarily disabled"
:- /ren/urb "temporarily disabled"
:- /ren/x-urb "temporarily disabled"
:- /ren/x-htm "temporarily disabled"
:- /ren/x-collections-snip "temporarily disabled"
:- /ren/x-collections-json "temporarily disabled"
:- /ren/urb "temporarily disabled"
::
:- /app/gh "hangs for some reason"
:- /mar/gh "hangs for some reason"
:- /app/twit "slow and/or crash"
:- /gen/twit "slow and/or crash"
:- /mar/twit "slow and/or crash"
:- /gen/al "compiler types out-of-date"
:- /gen/ivory "compiler types out-of-date"
:- /gen/musk "compiler types out-of-date"
:- /gen/cosmetic "incomplete"
:- /gen/lust "incomplete"
:- /gen/scantastic "incomplete"
:- /gen/curl "remove?"
:- /gen/curl-hiss "remove?"
:- /gen/deco "obsolete syntax"
:- /lib/down-jet "obsolete syntax"
:- /lib/down-jet/parse "obsolete syntax"
:- /mar/lens/command "obsolete syntax"
:- /mar/down "obsolete syntax"
:- /sur/twitter "obsolete syntax"
:- /web/pack/css/codemirror-fonts-bootstrap-tree "obsolete syntax"
:- /web/pack/js/tree-urb "obsolete syntax"
:- /web/unmark/all "obsolete syntax"
:- /web/landscape "/$ doensn't work in tests"
==
::
@ -196,14 +174,35 @@
^~ ^- (map path tape)
%- my :~ ::TODO don't hardcode
::
:- /app/pipe "wants 'flavor:hall' to exist"
:- /app/mark-dashboard "wants old ford"
:- /app/static "wants old ford"
:- /gen/capitalize "wants unicode-data/txt"
:- /app/pipe "wants 'flavor:hall' to exist"
:- /app/mark-dashboard "wants old ford"
:- /app/static "wants old ford"
:- /gen/capitalize "wants unicode-data/txt"
::
:- /lib/twitter "ford can't handle surs from libs"
:- /sys/arvo "BROKEN"
:- /sys/vane/jael "expects our"
:- /sys/vane/xmas "expects our"
:- /app/twit "depends on sur/twitter"
:- /gen/twit/as "depends on sur/twitter"
:- /gen/twit/feed "depends on sur/twitter"
:- /mar/twit/cred "depends on sur/twitter"
:- /mar/twit/feed "depends on sur/twitter"
:- /mar/twit/post "depends on sur/twitter"
:- /mar/twit/req "depends on sur/twitter"
:- /mar/twit/usel "depends on sur/twitter"
:- /lib/twitter "depends on sur/twitter"
:- /sur/twitter "crashes with new type system"
::
:- /gen/al "compiler types out-of-date"
:- /gen/musk "compiler types out-of-date"
::
:- /gen/cosmetic "incomplete"
:- /gen/lust "incomplete"
:- /gen/scantastic "incomplete"
::
:- /app/gh "crashes with new type system"
:- /mar/gh/issue-comment "wants old 'speech:hall'"
:- /mar/gh/issues "wants old 'speech:hall'"
::
:- /lib/down-jet "depends on lib/down-jet/parse"
:- /mar/down "depends on lib/down-jet/parse"
:- /lib/down-jet/parse "obsolete syntax"
==
--

View File

@ -2,12 +2,10 @@
:::: /hoon/time/app
::
/? 310
/+ old-zuse
=, old-zuse
|%
++ card {$wait wire @da}
--
|_ {bowl ~}
|_ {bowl:gall ~}
++ poke-noun
|= *
:_ +>.$ :_ ~

View File

@ -4,14 +4,14 @@
::
/? 310
/- sole
/+ old-zuse
=, old-zuse
=, sole
:- %get |= {^ {a/hiss ~} usr/iden}
^- (sole-request (cask httr))
/+ generators
=, generators
=, eyre
:- %get |= {^ {a/hiss ~} usr/user}
^- (sole-request:sole (cask httr))
?. ?=($get p.q.a)
~| %only-get-requests-supported-in-generators :: XX enforced?
!!
:- *tang
:^ %| `usr `hiss`a
|=(hit/httr (sole-so %httr hit))
|=(hit/httr (produce %httr hit))

View File

@ -4,11 +4,10 @@
::
/? 310
/- sole
/+ old-zuse
=, old-zuse
=, sole
/+ generators
=, [generators eyre]
:- %get |= {^ {a/tape ~} ~}
^- (sole-request (cask httr))
%+ sole-at (scan a auri:urlp)
^- (sole-request:sole (cask httr))
%+ curl (scan a auri:de-purl:html)
|= hit/httr
(sole-so %httr hit)
(produce %httr hit)

View File

@ -3,11 +3,9 @@
:::: /hoon/url/curl/gen
::
/? 310
/+ old-zuse
=, old-zuse
::
:::::
::
:- %say
|= {^ {arg/tape ~} ~}
purl+(scan arg auri:urlp)
purl+(scan arg auri:de-purl:html)

View File

@ -99,7 +99,7 @@
::
:: arms producing molds are introduced with {+$}. the
:: compiler will copy the arm decoration onto its product
+|
:: +|
+$ spot [p=@ q=@] :: a coordinate
+$ tops :: also a coordinate
[p=@ q=@]
@ -121,7 +121,7 @@
::
:: other languages might call these "type constructors"
:: or "higher-kinded types".
+|
:: +|
++ binary-tree :: tree pattern
|* a=$-(* *)
$@(~ [n=a l=(binary-tree a) r=(binary-tree a)])
@ -129,7 +129,7 @@
:: # %constant
:: #
:: if you have constants, put them in their own chapter.
+|
:: +|
++ answer :: answer to everything
42
--
@ -170,7 +170,7 @@
=/ foo (add 2 2)
=/ bar (add (mul num foo) 2)
=/ moo (mul num bar) :: for all the cows
"goodbye and {(scot %ud moo)}, {(rip 3 txt)}"
"goodbye and {(scow %ud moo)}, {(rip 3 txt)}"
::
++ say-minimum :: minimal decoration
|= txt=term

View File

@ -3,28 +3,30 @@
:::: /hoon/authority/dns/gen
::
/- dns, sole
=, [dns sole]
/+ generators
=, dns
=, generators
:- %ask
|= $: [now=@da eny=@uvJ bec=beak]
[arg=$@(~ [dom=path ~])]
~
==
^- (sole-result [%dns-authority authority])
^- (sole-result:sole [%dns-authority authority])
=- ?~ arg -
(fun.q.q [%& dom.arg])
%+ sole-lo
%+ prompt
[%& %dns-domain "dns domain: "]
%+ sole-go thos:de-purl:html
%+ parse thos:de-purl:html
|= hot=host:eyre
?: ?=(%| -.hot)
~|(%ips-unsupported !!)
%+ sole-lo
%+ prompt
[%& %project "gcloud project: "]
%+ sole-go urs:ab
%+ parse urs:ab
|= project=@ta
%+ sole-lo
%+ prompt
[%& %zone "dns zone: "]
%+ sole-go urs:ab
%+ parse urs:ab
|= zone=@ta
%+ sole-so %dns-authority
%+ produce %dns-authority
[p.hot %gcloud project zone]

View File

@ -3,11 +3,9 @@
:::: /hoon/ask/hood/gen
::
/? 310
/+ old-zuse
=, old-zuse
:- %say
|= {^ {mel/cord ~} ~}
=+ adr=(star ;~(less (mask "\"\\()[],:;<>@") prn))
=+ dom=[;~(plug dlab dot (most dot dlab))]:urlp
=+ dom=[;~(plug dlab dot (most dot dlab))]:de-purl:html
=+ ~|(bad-email+mel (rash mel ;~((glue vat) adr dom)))
helm-send-ask+mel

View File

@ -4,31 +4,32 @@
::
/? 314
/- sole
/+ generators
::
::::
::
=, sole
=, generators
:- %ask
|= $: {now/@da eny/@uvJ bec/beak}
{arg/$@(~ {dom/path ~})}
~
==
^- (sole-result {$write-sec-atom p/host:eyre q/@})
^- (sole-result:sole {$write-sec-atom p/host:eyre q/@})
=- ?~ arg -
(fun.q.q [%& dom.arg])
%+ sole-lo
%+ prompt
[%& %oauth-hostname "api hostname: https://"]
%+ sole-go thos:de-purl:html
%+ parse thos:de-purl:html
|= hot/host:eyre
?: ?=(%| -.hot)
~|(%ips-unsupported !!)
%+ sole-lo
%+ prompt
[%& %auth-user "username: "]
%+ sole-go (boss 256 (star ;~(less col prn)))
%+ parse (boss 256 (star ;~(less col prn)))
|= usr/@t
%+ sole-lo
%+ prompt
[%| %auth-passwd "password: "]
%+ sole-go (boss 256 (star prn))
%+ parse (boss 256 (star prn))
|= pas/@t
%+ sole-so %write-sec-atom :: XX typed pair
%+ produce %write-sec-atom :: XX typed pair
[hot (crip (en-base64:mimes:html (rap 3 usr ':' pas ~)))]

View File

@ -4,33 +4,33 @@
::
/? 314
/- sole
/+ old-zuse
=, old-zuse
/+ generators
::
::::
::
=, sole
=, generators
=, eyre
:- %ask
|= $: {now/@da eny/@uvJ bec/beak}
{arg/$@(~ {dom/path ~})}
~
==
^- (sole-result {$write-sec-atom p/host q/@})
^- (sole-result:sole {$write-sec-atom p/host q/@})
=- ?~ arg -
(fun.q.q [%& dom.arg])
%+ sole-lo
%+ prompt
[%& %oauth-hostname "api hostname: https://"]
%+ sole-go thos:urlp
%+ parse thos:de-purl:html
|= hot/host
?: ?=(%| -.hot)
~|(%ips-unsupported !!)
%+ sole-lo
%+ prompt
[%& %oauth-client "consumer key: "]
%+ sole-go (boss 256 (star prn))
%+ parse (boss 256 (star prn))
|= key/@t
%+ sole-lo
%+ prompt
[%& %oauth-secret "consumer secret: "]
%+ sole-go (boss 256 (star prn))
%+ parse (boss 256 (star prn))
|= sec/@t
%+ sole-so %write-sec-atom :: XX typed pair
%+ produce %write-sec-atom :: XX typed pair
[hot (of-wain:format key sec ~)]

View File

@ -4,33 +4,32 @@
::
/? 314
/- sole
/+ old-zuse
=, old-zuse
/+ generators
::
::::
::
=, sole
=, generators
:- %ask
|= $: {now/@da eny/@uvJ bec/beak}
{arg/$@(~ {dom/path ~})}
~
==
^- (sole-result {$write-sec-atom p/host:eyre q/@})
^- (sole-result:sole {$write-sec-atom p/host:eyre q/@})
=- ?~ arg -
(fun.q.q [%& dom.arg])
%+ sole-lo
%+ prompt
[%& %oauth-hostname "api hostname: https://"]
%+ sole-go thos:de-purl:html
%+ parse thos:de-purl:html
|= hot/host:eyre
?: ?=(%| -.hot)
~|(%ips-unsupported !!)
%+ sole-lo
%+ prompt
[%& %oauth-client "client id: "]
%+ sole-go (boss 256 (star prn))
%+ parse (boss 256 (star prn))
|= cid/@t
%+ sole-lo
%+ prompt
[%& %oauth-secret "client secret: "]
%+ sole-go (boss 256 (star prn))
%+ parse (boss 256 (star prn))
|= cis/@t
%+ sole-so %write-sec-atom :: XX typed pair
%+ produce %write-sec-atom :: XX typed pair
[hot (of-wain:format cid cis ~)]

View File

@ -4,12 +4,11 @@
::
/? 314
/- sole
/+ old-zuse
=, old-zuse
/+ generators
::
::::
::
=, sole
=, generators
=, html
=, format
:- %ask
@ -17,17 +16,17 @@
{arg/$@(~ {jon/json ~})}
~
==
^- (sole-result {$write-sec-atom p/host:eyre q/@})
%+ sole-yo leaf+"Accepting credentials for https://*.googleapis.com"
^- (sole-result:sole {$write-sec-atom p/host:eyre q/@})
%+ print leaf+"Accepting credentials for https://*.googleapis.com"
=+ hot=[%& /com/googleapis]
=- ?~ arg -
(fun.q.q jon.arg)
%+ sole-lo
%+ prompt
[%& %oauth-json "json credentials: "]
%+ sole-go apex:de-json
%+ parse apex:de-json
|= jon/json
=+ ~| bad-json+jon
=- `{cid/@t cis/@t}`(need (rep jon))
rep=(ot web+(ot 'client_id'^so 'client_secret'^so ~) ~):dejs-soft:format
%+ sole-so %write-sec-atom :: XX typed pair
%+ produce %write-sec-atom :: XX typed pair
[hot (of-wain:format cid cis ~)]

View File

@ -3,8 +3,7 @@
:::: /hoon/merge/hood/gen
::
/? 310
/+ old-zuse
=, old-zuse
=, clay
::
|%
++ beaky {knot knot knot ~}
@ -22,11 +21,11 @@
^- {syd/desk her/ship sud/desk cas/case gem/?(germ $auto)}
?- arg
{@ @ ~}
=+(arg [sud ?.(=(our her) her (sein p.bek now her)) sud (opt-case da+now) gem])
=+(arg [sud ?.(=(our her) her (sein:title p.bek now her)) sud (opt-case da+now) gem])
::
{^ ~}
=+ (pars bek.arg)
[dez ?.(=(our who) who (sein p.bek now who)) dez (opt-case caz) gem]
[dez ?.(=(our who) who (sein:title p.bek now who)) dez (opt-case caz) gem]
::
{* @ @ ~}
:- (pars-src syd.arg)
@ -37,7 +36,7 @@
=+((pars bek.arg) [who dez (opt-case caz) gem])
==
++ opt-case |=(a/case ?:(=(*case cas) a cas)) :: override
++ pars |=(a/beaky `{{who/ship dez/desk caz/case} *}`(need (tome a)))
++ pars |=(a/beaky `{{who/ship dez/desk caz/case} *}`(need (de-beam:format a)))
++ pars-src
|= syd/$@(desk beaky)
?@ syd syd

View File

@ -3,8 +3,7 @@
:::: /hoon/mv/hood/gen
::
/? 310
/+ old-zuse
=, old-zuse
=, space:userlib
:- %say
|= {^ {input/path output/path ~} ~}
:- %kiln-info

View File

@ -3,8 +3,6 @@
:::: /hoon/serve/hood/gen
::
/? 310
/+ old-zuse
=, old-zuse
::
::::
::
@ -14,7 +12,7 @@
==
:- %helm-serve
?@ pax pax
=+ bem=(need (tome pax))
=+ bem=(need (de-beam:format pax))
?. =([%da now] r.bem) :: XX actual sentinel
bem
bem(r [%ud 0])

78
gen/hood/static.hoon Normal file
View File

@ -0,0 +1,78 @@
/? 309
::
/= pre-process
/^ (map path [@tas @t])
/: /===/web/static-site /*
/| /; |=(@t [%html +<]) /&html&/!hymn/
/; |=(@t [%html +<]) /&html&/&elem&/udon/
:: XX /lib/down-jet/parse is broken
:: /; |=(@t [%html +<]) /&html&/&hymn&/&down&/md/
/; |=(@t [%raw +<]) /atom/
==
::
~& %finished-preprocessing
:- %say
|= $: [now=@da eny=@uv bec=beak]
~
~
==
=>
|%
++ convert-link
|= [pre=tape link=tape]
=/ parsed=(unit (list coin))
%+ rust link
;~ pose
;~(pfix net (more net nuck:so))
(more net nuck:so)
==
?~ parsed
link
^- tape
%+ welp
=< +
%^ spin u.parsed pre
|= [c=coin s=path]
^- [* out=tape]
?> ?=([%$ dime] c)
[0 (weld "{s}/" (scow +.c))]
::
".html"
::
++ convert-file
|= [pre=tape fil=tape]
^- tape
=/ idc=(list @ud) (fand "<a href=" fil)
=< +>
%^ spin idc [0 fil]
|= [i=@ud f=@ud h=tape]
^- [p=* f=@ud out=tape]
=/ a (scag :(add 9 i f) h)
=/ b (slag :(add 9 i f) h)
=/ c (need (find "\">" b))
=/ old-link=tape (scag c b)
=/ new-link=tape (convert-link pre old-link)
=/ new-file=tape :(welp a new-link (slag c b))
=/ new-f (sub (lent new-link) (lent old-link))
[0 (add f new-f) new-file]
--
::
:- %dill-blit
=/ trio /(scot %p p.bec)/[q.bec]/(scot r.bec)
=/ dirs .^((list path) %ct (weld trio /web/static-site))
::
:- %mor
%+ roll dirs
|= [pax=path out=(list [%sav path @t])]
=/ path-prefix=path (scag (dec (lent pax)) pax)
=/ pre=[@tas @t] (~(got by pre-process) path-prefix)
:_ out
:- %sav
?: =(%raw -.pre)
[pax +.pre]
:: find and update links
=/ root=tape
?~ path-prefix ""
(slag 1 (spud (scag 1 (flop path-prefix))))
=/ fil=tape (convert-file root (trip +.pre))
[(weld path-prefix /[-.pre]) (crip fil)]

View File

@ -1,139 +0,0 @@
:: Hoon printer
::
:::: /hoon/hoon-printer/gen
::
/? 310
!:
::
::::
::
:- %say
|= {^ {{demo=hoon ~} ~}}
:- %txt
^- wain
=< =/ plum=plum (hoon-to-plum demo)
~(tall plume plum)
|%
++ limb-to-plum
|= =limb
?@ limb limb
?- -.limb
%& (scot %ui p.limb)
%| (crip (runt [0 p.limb] ?~(q.limb "," (trip u.q.limb))))
==
::
++ wing-to-plum
|= =wing
^- plum
:+ %&
[`['.' ~] ~]
(turn wing limb-to-plum)
::
++ battery-to-plum
|= =(map term spec)
%+ turn ~(tap by map)
|= [=term =spec]
:+ %&
[`[' ' ~] `['' ~]]
[term (spec-to-plum spec) ~]
::
++ core-to-plum
|= [=knot =spec =(map term spec)]
^- plum
:+ %&
[~ `[knot ~]]
:~ (spec-to-plum spec)
:+ %&
[~ `['' `['++' '--']]]
(battery-to-plum map)
==
::
++ varying
|= [intro=knot final=knot]
[`[' ' `[(cat 3 intro '(') ')']] `[intro `['' final]]]
::
++ fixed
|= @ta
[`[' ' `[(cat 3 +< '(') ')']] `[+< ~]]
::
++ standard
|= =stud
^- plum
?@ stud stud
:+ %&
[`['/' ~] ~]
`(list plum)`[auth.stud type.stud]
::
++ hoon-to-plum
|= =hoon
^- plum
:: XX fill this in please
::
?: ?=([%limb *] hoon)
p.hoon
%hooon
::
++ skin-to-plum
|= =skin
^- plum
%skinny
::
++ spec-to-plum
|= =spec
^- plum
?- -.spec
%base ?- p.spec
%noun '*'
%cell '^'
%flag '?'
%null '~'
%void '!!'
[%atom *] (cat 3 '@' p.p.spec)
==
%dbug $(spec q.spec)
%leaf =+((scot p.spec q.spec) ?:(=('~' -) - (cat 3 '%' -)))
%like &/[[`[':' ~] ~] (turn `(list wing)`+.spec wing-to-plum)]
%loop (cat 3 '$' p.spec)
%name $(spec q.spec)
%made $(spec q.spec)
%over $(spec q.spec)
%make =+ (lent q.spec)
:+ %&
:- `[' ' `['(' ')']]
:- ~
?: |((gth - 3) =(- 0))
['%:' `['' '==']]
:_ ~
?: =(- 3) '%^'
?: =(- 2) '%+' '%-'
[(hoon-to-plum p.spec) (turn q.spec ..$)]
%bsbs (core-to-plum '$$' p.spec q.spec)
%bsbr &/[(fixed '$|') $(spec p.spec) (hoon-to-plum q.spec) ~]
%bscb (hoon-to-plum p.spec)
%bscl :+ %&
[`[' ' `['[' ']']] `['$:' `['' '==']]]
(turn `(list ^spec)`+.spec ..$)
%bscn &/[(varying '$%' '==') (turn `(list ^spec)`+.spec ..$)]
%bsdt (core-to-plum '$.' p.spec q.spec)
%bsld &/[(fixed '$<') $(spec p.spec) $(spec q.spec) ~]
%bsbn &/[(fixed '$>') $(spec p.spec) $(spec q.spec) ~]
%bshp &/[(fixed '$-') $(spec p.spec) $(spec q.spec) ~]
%bskt &/[(fixed '$-') $(spec p.spec) $(spec q.spec) ~]
%bsls &/[(fixed '$+') (standard p.spec) $(spec q.spec) ~]
%bsnt (core-to-plum '$/' p.spec q.spec)
%bsmc &/[(fixed '$;') (hoon-to-plum p.spec) ~]
%bspd &/[(fixed '$&') $(spec p.spec) (hoon-to-plum q.spec) ~]
%bssg &/[(fixed '$~') (hoon-to-plum p.spec) $(spec q.spec) ~]
%bstc (core-to-plum '$`' p.spec q.spec)
%bsts :+ %&
[`['=' ~] `['$=' ~]]
:~ (skin-to-plum p.spec)
$(spec q.spec)
==
%bsvt &/[(fixed '$@') $(spec p.spec) $(spec q.spec) ~]
%bswt :+ %&
[`[' ' `['?(' ')']] `['$?' `['' '==']]]
(turn `(list ^spec)`+.spec ..$)
%bszp (core-to-plum '$.' p.spec q.spec)
==
--

View File

@ -31,7 +31,7 @@
::
:: whole-hoon: arvo within compiler
::
=+ whole-hoon=`hoon`[%tsgr compiler-hoon [%tsgr [%$ 7] (ream arvo-source)]]
=+ whole-hoon=`hoon`[%tsbn compiler-hoon [%tsbn [%$ 7] (ream arvo-source)]]
::
:: compile the whole schmeer
::

View File

@ -1,6 +1,7 @@
:: Create a private key-file
::
/- *sole
/+ *generators
::
:- %ask
|= $: [now=@da eny=@uvJ bec=beak]
@ -8,9 +9,9 @@
life=_1
==
^- (sole-result (cask cord))
%+ sole-yo leaf+"generating keys for {(scow %p who)}, life #{(scow %ud life)}"
%+ sole-lo [%| %pope-pass "passphrase: "]
%+ sole-go (boss 256 (star prn))
%+ print leaf+"generating keys for {(scow %p who)}, life #{(scow %ud life)}"
%+ prompt [%| %pope-pass "passphrase: "]
%+ parse (boss 256 (star prn))
|= fra/@t
=/ bur (shaz (add who (shaz fra)))
=/ cub (pit:nu:crub:crypto 512 bur)
@ -21,10 +22,10 @@
=/ bod=@ (rsh 3 1 pub)
=/ cry=@ (rsh 8 1 bod)
=/ sgn=@ (end 8 1 bod)
%+ sole-yo leaf+" authentication: 0x{(render-hex-bytes:ethereum 32 sgn)}"
%+ sole-yo leaf+" networking: 0x{(render-hex-bytes:ethereum 32 cry)}"
%+ sole-yo leaf+"ethereum public keys:"
%+ print leaf+" authentication: 0x{(render-hex-bytes:ethereum 32 sgn)}"
%+ print leaf+" networking: 0x{(render-hex-bytes:ethereum 32 cry)}"
%+ print leaf+"ethereum public keys:"
::
=/ sed=seed:able:jael
[who life sec:ex:cub ~]
%- sole-so [%atom (scot %uw (jam sed))]
%- produce [%atom (scot %uw (jam sed))]

View File

@ -2,8 +2,6 @@
:::: /hoon/metal/gen
::
/? 310
/+ old-zuse
=, old-zuse
::
::::
!:
@ -124,7 +122,7 @@
::
:: switch to the second-generation compiler. we want to be
:: able to generate matching reflection nouns even if the
:: language changes -- the first-generation formula will
:: language changes -- the first-generation formula will
:: generate last-generation spans for `!>`, etc.
::
~> %slog.[0 leaf+"1-d"]
@ -237,15 +235,15 @@
::
(user /app /gen /lib /mar /ren /sec /sur /sys /web ~)
==
:: ::
:: ::
++ user :: userspace loading
|= :: sal: all spurs to load from
::
sal/(list spur)
^- ovum
::
:: hav: all user files
::
:: hav: all user files
::
=; hav ~& user-files+(lent hav)
[[%$ %sync ~] [%into %$ & hav]]
=| hav/mode:clay
@ -253,7 +251,7 @@
?~ sal ~
=. hav $(sal t.sal)
::
:: tyl: spur
:: tyl: spur
::
=/ tyl i.sal
|- ^+ hav
@ -263,7 +261,7 @@
::
=/ pax (en-beam:format bec tyl)
=/ lon .^(arch %cy pax)
=? hav ?=(^ fil.lon)
=? hav ?=(^ fil.lon)
?. ?=({$hoon *} tyl)
::
:: install only hoon files for now
@ -274,7 +272,7 @@
::
=; cot [[(flop `path`tyl) `[/text/plain cot]] hav]
^- octs
?- tyl
?- tyl
{$hoon *}
=/ dat .^(@t %cx pax)
[(met 3 dat) dat]

View File

@ -4,6 +4,7 @@
::
/? 310
/- *sole
/+ *generators
::
::::
::
@ -15,7 +16,7 @@
=* our p.bec
=/ ran (clan:title our)
?: ?=({?($earl $pawn)} ran)
%- sole-so
%- produce
:- %tang :_ ~
leaf+"can't create a moon from a {?:(?=($earl ran) "moon" "comet")}"
=/ mon=ship
@ -24,7 +25,7 @@
(add our (lsh 5 1 (end 5 1 (shaz eny))))
=/ seg=ship (sein:title our now mon)
?. =(our seg)
%- sole-so
%- produce
:- %tang :_ ~
leaf+"can't create keys for {(scow %p mon)}, which belongs to {(scow %p seg)}"
=/ cub=acru:ames (pit:nu:crub:crypto 512 eny)
@ -33,5 +34,5 @@
.^(@ j+/(scot %p our)/earl/(scot %da now)/(scot %p mon)/(scot %ud lyf)/(scot %ux pub:ex:cub))
=/ sed=seed:able:jael
[mon lyf sec:ex:cub `sig]
%+ sole-yo leaf+"moon: {(scow %p mon)}"
%- sole-so [%atom (scot %uw (jam sed))]
%+ print leaf+"moon: {(scow %p mon)}"
%- produce [%atom (scot %uw (jam sed))]

194
gen/p2.hoon Normal file
View File

@ -0,0 +1,194 @@
/? 310
::
/+ pprint
::
!:
::
:- %say
::
=< |= {^ {{=arg ~} ~}}
^- [%txt wain]
::
=/ v=vase
?- target.arg
^ target.arg
%all !>(all-examples)
%demo !>(demo-example)
%test !>(test-example)
%type !>(type-example)
%xml !>(xml-example)
%kernel !>(xray-the-kernel-example)
%parser !>(xray-the-parser-example)
==
::
:- %txt
?- print.arg
%type (render-type:pprint p.v)
%val (render-vase:pprint v)
%both (render-vase-with-type:pprint v)
==
::
|%
::
+$ arg
$: print=?(%type %val %both)
target=$@(?(%all %demo %test %type %xml %kernel %parser) vase)
==
::
+$ option $?(%a %b %c)
::
+$ junct $@(@ {@ cord})
::
+$ union $%([%list (list ~)] [%unit (unit ~)])
::
+$ conjunct $^ [[@ @] cord]
[@ cord]
::
+$ misjunct $^([~ @] [cord @])
::
++ forks-example
:* :- %junct ^- (list junct) ~[3 [4 '5']]
:- %conjunct ^- (list conjunct) ~[[3 '4'] [[5 6] '7']]
:- %union ^- (list union) ~[[%list [~ ~]] [%unit [~ ~]]]
:- %option ^- (list option) ~[%a %a %b %c]
:- %misjunct ^- (list misjunct) ~[[~ 3] [~ 4]]
%nice
==
::
++ all-examples
:*
:- %type type-example
:- %cores core-example
:- %add ..add
:- zuse-example
:- %demo demo-example
:- %forks forks-example
%eof
==
::
++ type-example
^- type
-:!>(`(map ? (unit (list cord)))`~)
::
++ xray-the-parser-example
=> ..musk
|% ++ x ~ --
::
++ xray-the-kernel-example
|% ++ x ~ --
::
++ zuse-example
[%zuse ..zuse]
::
++ cores-example
|^ :*
[%trivial trivial-core-example]
[%gate gate-example]
[%core core-example]
==
::
--
::
++ trivial-core-example
=> ~
|% ++ x 3 --
::
++ core-example
=> [=gate-example]
|%
++ dup gate-example
++ const
|= x=* ^- $-(* *)
|= * ^- *
x
--
::
++ gate-example
=> ~
|= x=@ud
^- [@ud @ud]
[x x]
::
++ test-example
:*
`(list ?)`~[%.y %.n]
`(list ~)`~[~ ~]
`(unit ~)``~
/a/path
==
::
++ hoon-example
^- hoon
:+ %brcn ~
%- ~(gas by *(map term tome))
^- (list (pair term tome))
:_ ~
^- (pair term tome)
:- 'chapter'
^- tome
:- `what`~
%- ~(gas by *(map term hoon))
^- (list (pair term hoon))
:_ ~
:- 'arm'
:+ %brts `spec`[%bsts 'x' [%base [%atom ~.ud]]]
:- %clsg
~[[%wing ~['x']] [%$ 0]]
::
++ demo-example
:* [~ %.y %.n 1 0x2 ~ ~.knot 'cord' %const]
:* [%tape "a tape"]
[%path /path/literal `path`/typed/path]
[%unit `(unit @)`[~ 9]]
[%list [`?`%.y `(list ?)`~[%.y %.n %.y]]]
%nice
==
[%hoon hoon-example]
[%type -:!>(`(unit (list tape))`~)]
[%json-and-xml json-example xml-example]
%cool
==
::
++ xml-example
|^ ^- manx
:- ['json' ~]
:~ (json-to-xml json-example)
==
++ json-to-xml
|= j=json
^- manx
?- j
~ [['nil' ~] ~]
[%a *] [['array' ~] (turn p.j json-to-xml)]
[%b *] [['bool' ~[['' ?:(p.j "true" "false")]]] ~]
[%o *] [['obj' ~] (turn ~(tap by p.j) pair)]
[%n *] [['num' ~[[['n' 'val'] (trip p.j)]]] ~]
[%s *] [['str' ~[['' (trip p.j)]]] ~]
==
++ pair
|= [t=@t j=json]
^- manx
[['slot' ~[['key' (trip t)]]] ~[(json-to-xml j)]]
--
::
++ json-example
^- json
|^ ob2
++ nil ~
++ yes [%b %.y]
++ nah [%b %.n]
++ str [%s 'Very long test string. Test test test test test test test.']
++ foo 'foo'
++ bar 'bar'
++ baz 'baz'
++ one [%n '1']
++ ten [%n '10']
++ mil [%n '100000']
++ arr [%a ~[one ten mil]]
++ ar2 [%a ~[arr yes nah nil str]]
++ obj [%o (~(gas by *(map @t json)) ~[[foo mil] [baz arr]])]
++ ob2 [%o (~(gas by *(map @t json)) ~[[foo ar2] [bar obj] [baz yes]])]
++ ar3 [%a ~[arr obj ob2 one ten mil yes nah nil]]
--
::
--

View File

@ -1,271 +0,0 @@
:- %say
|= *
:- %noun
=- "hello, world"
|%
+$ scan [=loop=(map =@ud =xray) =xray]
+$ xray
$~ %noun
$@ $? %noun
%void
==
$% :: %bark: atom selection
::
[%bark =(map atom aura)]
:: %bush: head-of-cell superposition
::
[%bush wide=xray tall=xray]
:: %cell: ordered pair
::
[%cell head=xray tail=xray]
:: %core: functional attribute battery
::
[%core =vair =xray =(map term (map term xray))]
:: %face: namespace
::
[%face =term =xray]
:: %fork: disordered superposition
::
[%fork =(set xray)]
:: %hint: context-preserving type hint
::
[%hint [=type =note] =xray]
:: %knot: recursion root
::
[%knot =(set @ud) =xray]
:: %loop: recursion point
::
[%loop index=@ud]
:: %rock: constant
::
[%rock =atom =aura]
:: %root: atom/cell superposition
::
[%root flat=xray deep=xray]
:: %sand: variable atom
::
[%sand =aura]
:: %wood: tagged superposition
::
[%wood =(map atom (pair aura xray))]
==
::
:: =realign: analyze superpositions
::
++ realign
|= scan
^- ^xray
|^ ?@ xray xray
?- -.xray
%bark xray
%bush [%bush $(xray wide.xray) $(xray tall.xray)]
%core :^ %core
vair.xray
xray.xray
(~(run by map.xray) |=(xray ^$(xray +<)))
%face [%face term.xray
==
::
++ aura-merge
|= [=aura =aura]
?: =(aura ^aura) aura
=/ byte 0
|- ^- ^^aura
?: (lte (met 3 aura) byte) aura
?: (lte (met 3 ^aura) byte) ^aura
?: !=((cut 3 [byte 1] aura) (cut 3 [byte 1] ^aura))
(end 3 byte aura)
$(byte +(byte))
::
++ bark-merge
|= [=one=(map atom aura) =two=(map atom aura)]
^- (map atom aura)
?: &(?=([* ~ ~] two-map) !?=([* ~ ~] one-map))
$(one-map two-map, two-map one-map)
=/ list ~(tap by one-map)
|- ^- (map atom aura)
?~ list two-map
%= $
list t.list
two-map
%+ ~(put by two-map)
p.i.list
=+ (~(get by two-map) p.i.list)
?~ - q.i.list
(aura-merge u.- q.i.list)
==
::
++ wood-merge
|= [=one=(map atom [=aura =^xray]) =two=(map atom [=aura =^xray])]
^- (map atom [=aura =^xray])
?: &(?=([* ~ ~] two-map) !?=([* ~ ~] one-map))
$(one-map two-map, two-map one-map)
=/ list ~(tap by one-map)
|- ^- (map atom [=aura =^xray])
?~ list two-map
%= $
list t.list
two-map
%+ ~(put by two-map)
p.i.list
=+ (~(get by two-map) p.i.list)
?~ - q.i.list
:- (aura-merge aura.u.- aura.q.i.list)
(merge(xray xray.u.-) xray.q.i.list)
==
::
++ merge
|= =new=^xray
:: (the superposition of .xray and .new-xray)
::
^- ^xray
:: identify trivial cases
::
?: ?=(%void xray) new-xray
?: ?=(%void new-xray) xray
?: |(?=(%noun xray) ?=(%noun new-xray)) %noun
?- -.xray
::
:: %bark: atom selection
::
%bark ?+ -.new-xray
$(xray new-xray, new-xray xray)
%bark [%bark (bark-merge map.new-xray map.xray)]
%bush [%root xray new-xray]
%cell [%root xray new-xray]
%core [%root xray new-xray]
%root [%root $(new-xray flat.new-xray) deep.new-xray]
%sand $(xray [%fork xray ~ ~])
%wood [%root xray new-xray]
==
::
:: %bush: head-of-cell superposition
::
%bush ?+ -.new-xray
$(xray new-xray, new-xray xray)
%bush :+ %bush
$(xray wide.xray, new-xray wide.new-xray)
$(xray tall.xray, new-xray tall.new-xray)
%cell $(xray [%fork xray ~ ~])
%core $(xray [%fork xray ~ ~])
%root [%root flat.new-xray $(new-xray deep.new-xray)]
%sand $(xray [%fork xray ~ ~])
%wood [%bush wide.xray $(xray tall.xray)]
==
::
:: %cell: unstructured cell
::
%cell :: terminate cell collision
::
?: ?=(%cell -.new-xray)
:+ %cell
$(xray head.xray, new-xray head.new-xray)
$(xray tail.xray, new-xray tail.new-xray)
:: terminate core-cell collision
::
?: ?=(%core -.new-xray)
$(xray [%fork xray ~ ~])
:: normally, reverse
::
$(xray new-xray, new-xray xray)
::
:: %core: functional attribute battery
::
%core :: terminate core collision
::
?: ?=(%core -.new-xray)
$(xray [%fork xray ~ ~])
:: normally, reverse
::
$(xray new-xray, new-xray xray)
::
:: %face: namespace
::
%face :: if face matches, unify
::
?: ?&(?=(%face -.new-xray) =(term.xray term.new-xray))
[%face term.xray $(xray xray.xray, new-xray xray.xray)]
:: otherwise erase
::
$(xray xray.xray)
::
:: %fork: unstructured superposition
::
%fork :: forks are indigestible but merge with other forks
::
?: ?=(%fork -.new-xray)
[%fork (~(uni in set.xray) set.new-xray)]
[%fork (~(put in set.xray) new-xray)]
::
:: %hint: type extension
::
%hint :: merging a hint destroys it
::
$(xray xray.xray)
::
:: %knot: recursion root
::
%knot :: try to combine knots for cleanliness
::
?: ?=(%knot -.new-xray)
:+ %knot
(~(uni in set.xray) set.new-xray)
$(xray xray.xray, new-xray xray.new-xray)
[%knot set.xray $(xray xray.xray)]
:: %loop: recursion point
::
%loop :: expand through loop
::
$(xray (~(got by loop-map) index.xray))
::
:: %rock: atomic constant
::
%rock :: reduce to trivial set
::
$(xray [%bark [[atom.xray aura.xray] ~ ~]])
::
:: %root: atom-cell superposition
::
%root ?+ -.new-xray
$(xray new-xray, new-xray xray)
%bark [%root $(xray flat.xray) deep.xray]
%bush [%root flat.xray $(xray deep.xray)]
%cell [%root flat.xray $(xray deep.xray)]
%core [%root flat.xray $(xray deep.xray)]
%root :+ %root
$(xray flat.xray, new-xray flat.new-xray)
$(xray deep.xray, new-xray deep.new-xray)
%sand [%root $(xray flat.xray) deep.xray]
%wood [%root flat.xray $(xray deep.xray)]
==
::
:: %sand: atomic variable
::
%sand ?+ -.new-xray
$(xray new-xray, new-xray xray)
%bark $(xray [%fork xray ~ ~])
%bush $(xray [%fork xray ~ ~])
%cell [%root xray new-xray]
%core [%root xray new-xray]
%root [%root $(new-xray flat.new-xray) deep.new-xray]
%sand $(xray [%fork xray ~ ~])
%wood [%root xray new-xray]
==
::
:: %wood: tagged values
::
%wood ?+ -.new-xray
$(xray new-xray, new-xray xray)
%bark [%root new-xray xray]
%bush [%bush wide.new-xray $(new-xray tall.new-xray)]
%cell $(xray [%fork xray ~ ~])
%core $(xray [%fork xray ~ ~])
%root [%root flat.new-xray $(new-xray deep.new-xray)]
%sand [%root new-xray xray]
%wood [%wood (wood-merge map.xray map.new-xray)]
== ==
--
--

View File

@ -1,16 +0,0 @@
::
:::: /hoon/build/static/gen
::
/? 309
:- %say
|= $: [now=@da eny=@uvJ bec=beak]
[input=path output=path ~]
~
==
~_ leaf+"Error: Invalid beam. Try prefixing your path with % or /===/"
:* %static-action
%build
(need (de-beam:format input))
(need (de-beam:format output))
%$
==

View File

@ -4,8 +4,6 @@
::
/? 310
/- twitter
/+ old-zuse
=, old-zuse
::
:::: ~fyr
::

View File

@ -1,5 +1,4 @@
/+ old-zuse
=, old-zuse
=, eyre
|%
:: sort knots by date
:: TODO when we change the write path to have trailing sig, remove here before sort
@ -11,8 +10,8 @@
|= gas/epic
^- ?
%+ lien
~(tap in (~(get ju aut.ced.gas) %$))
|= b/knot
~(tap in (~(get ju aut.ced.gas) %$))
|= b/knot
=((scot %p p.bem.gas) b)
++ no-title
|= wat/wain
@ -51,7 +50,7 @@
++ latest
|* a/(map knot *)
^- (pair knot *)
=/ sa
=/ sa
%+ sort
~(tap by a)
|= [b=(pair knot *) c=(pair knot *)]
@ -69,7 +68,7 @@
:: tried to pull this func into a lib, but couldn't get the gill working correctly. grr.
/= metawcom /; |= a/(map knot topicful:collections)
^- (pair knot topicful:collections)
=/ sa
=/ sa
%+ sort
~(tap by a)
|= [b=(pair knot *) c=(pair knot *)]
@ -81,7 +80,7 @@
/^ (map knot topicful:collections) /_ /collections-topic-full/
/= content /; |= a/(map knot manx)
^- (pair knot manx)
=/ sa
=/ sa
%+ sort
~(tap by a)
|= [b=(pair knot *) c=(pair knot *)]
@ -95,7 +94,6 @@
=/ config (~(get by configs) +<:s.bem.gas)
~& metawcom
::
=, old-zuse
^- manx
;div.container
;div.row

View File

@ -2,7 +2,7 @@
::
:: The basic flow is as follows:
:: -- define a list of `++place`s, which specify the exported
:: interface.
:: interface.
:: -- in `++peer-scry` in the connector app, call `++read` in
:: this library to match to the appropriate place and
:: produce a move (usually either an immediate response or
@ -10,9 +10,6 @@
:: -- in `++sigh-httr` in the connector app, call `++sigh` in
:: this library to handle the response according to the
:: place.
/+ old-zuse
=, old-zuse
::
|* {move/mold sub-result/mold}
=> |%
:: A place consists of:
@ -54,7 +51,7 @@
|%
:: Produce null. Used as `++read-x` in places which are pure
:: directories. `++sigh-x` should be `++sigh-strange`.
::
::
++ read-null |=(pax/path [ost %diff %null ~])
::
:: Produce an arch with the given list of children. Used as
@ -90,7 +87,7 @@
::
++ endpoint-to-purl
|= endpoint/path
(scan (weld api-url <`path`endpoint>) auri:urlp)
(scan (weld api-url <`path`endpoint>) auri:de-purl:html)
::
:: Return error. Used when no http response is expected.
::
@ -101,7 +98,7 @@
:: either `read-x` or `read-y`, in `places`.
::
++ read
|= {ost/bone places/(list place) ren/care pax/path}
|= {ost/bone places/(list place) ren/care:clay pax/path}
^- move
?~ places
~& [%strange-path pax]
@ -117,7 +114,7 @@
++ sigh
=, html
=, eyre
|= {places/(list place) ren/care pax/path res/httr}
|= {places/(list place) ren/care:clay pax/path res/httr:eyre}
^- sub-result
=< ?+(ren ~|([%invalid-care ren] !!) $x sigh-x, $y sigh-y)
|%
@ -140,20 +137,20 @@
$(places t.places)
=+ (sigh-x.i.places u.jon)
?~ -
~& [err+s+%response-not-valid pax+pax code+(jone p.res) msg+u.jon]
~& [err+s+%response-not-valid pax+pax code+(numb:enjs:format p.res) msg+u.jon]
(sub-result null+~)
u.-
::
++ sigh-y
?~ r.res
~& [err+s+%empty-response code+(jone p.res)]
~& [err+s+%empty-response code+(numb:enjs:format p.res)]
arch+*arch
=+ jon=(rush q.u.r.res apex:de-json)
?~ jon
~& [err+s+%bad-json code+(jone p.res) body+s+q.u.r.res]
~& [err+s+%bad-json code+(numb:enjs:format 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]
~& [err+s+%request-rejected code+(numb:enjs:format p.res) msg+u.jon]
arch+*arch
%- sub-result
|- ^- {$arch arch}
@ -164,7 +161,7 @@
$(places t.places)
=+ (sigh-y.i.places u.jon)
?~ -
~& [err+s+%response-not-valid pax+pax code+(jone p.res) msg+u.jon]
~& [err+s+%response-not-valid pax+pax code+(numb:enjs:format p.res) msg+u.jon]
arch+*arch
arch+u.-
--

33
lib/generators.hoon Normal file
View File

@ -0,0 +1,33 @@
/- sole
=, sole
|%
++ produce :: construct result
|* pro/* ::
[p=*(list tank) q=[%& p=[~ u=pro]]] ::
:: ::
++ print :: add output tank
|* {tan/tank res/(sole-result)} ::
?@ res res ::
[p=[i=tan t=p.res] q=q.res] ::
:: ::
++ prompt :: construct prompt
|* {pom/sole-prompt mor/(sole-dialog)} ::
[p=*(list tank) q=[%| p=pom q=mor]] ::
:: ::
++ curl :: fetch url
=| usr/knot ::
|* {pul/_purl:eyre fun/$-(httr:eyre *)} ::
:- p=*(list tank) ::
q=[%| p=`usr q=[pul %get ~ ~] r=fun] ::
:: ::
++ no-product :: empty result
[p=*(list tank) q=[%& ~]] ::
:: ::
++ parse :: parse by rule
|* {sef/rule fun/$-(* *)} ::
|= txt/sole-input ::
=+ vex=(sef [0 0] txt) ::
?: |(!=((lent txt) q.p.vex) ?=($~ q.vex)) ::
q.p.vex ::
(fun p.u.q.vex) ::
--

View File

@ -4,12 +4,11 @@
:: marks should include this library.
::
/- gh
/+ old-zuse
=, old-zuse
=, format
|%
++ repository
^- $-(json (unit repository:gh))
=+ jo
=+ dejs-soft
%- ot :~
'id'^id
'name'^so
@ -81,7 +80,7 @@
==
++ commit
^- $-(json (unit commit:gh))
=+ jo
=+ dejs-soft
%- ot :~
'sha'^so
'url'^so
@ -94,7 +93,7 @@
==
++ user
^- $-(json (unit user:gh))
=+ jo
=+ dejs-soft
%- ot :~
'login'^so
'id'^id
@ -119,7 +118,7 @@
|= jon/json
=- (bind - |*(issue/* `issue:gh`[jon issue]))
%. jon
=+ jo
=+ dejs-soft
%- ot :~
'url'^so
'labels_url'^so
@ -143,7 +142,7 @@
==
++ author
^- $-(json (unit author:gh))
=+ jo
=+ dejs-soft
%- ot :~
'date'^so
'name'^so
@ -151,14 +150,14 @@
==
++ point
^- $-(json (unit point:gh))
=+ jo
=+ dejs-soft
%- ot :~
'url'^so
'sha'^so
==
++ verification
^- $-(json (unit verification:gh))
=+ jo
=+ dejs-soft
%- ot :~
'verified'^bo
'reason'^so
@ -167,7 +166,7 @@
==
++ label
^- $-(json (unit label:gh))
=+ jo
=+ dejs-soft
%- ot :~
'url'^so
'name'^so
@ -175,7 +174,7 @@
==
++ comment
^- $-(json (unit comment:gh))
=+ jo
=+ dejs-soft
%- ot :~
'url'^so
'html_url'^so
@ -186,7 +185,7 @@
'updated_at'^so
'body'^so
==
++ id no:jo
++ id no:dejs-soft
++ print-issue
|= issue:gh
=, format

View File

@ -2,7 +2,6 @@
:::: /lib/hall-json/hoon
::
/- hall
/+ old-zuse
=, hall
::
|_ bol/bowl:gall
@ -578,7 +577,7 @@
:+ ~ u.exp
=+ res=((ot res+(ar dank) ~) a)
?^ res u.res
p:(mule |.([(sell (slap !>(..zuse:old-zuse) (ream u.exp)))]~)) ::TODO oldz
p:(mule |.([(sell (slap !>(..zuse) (ream u.exp)))]~)) ::TODO oldz
::
++ atta ::: attache
^- $-(json (unit attache))

View File

@ -1,8 +1,7 @@
::
/? 310
/- hall
/+ old-zuse
=, old-zuse
=, eyre
=>
|%
++ audience (map partner (pair envelope delivery)) :: destination+state
@ -55,7 +54,7 @@
--
|%
++ from-json
=, jo
=, dejs-soft:format
|: $:{a/^json} ^- (list telegram:hall)
=- %- zing
%+ turn
@ -65,7 +64,7 @@
++ of
|* a/(pole {@tas fist})
|= b/^json
%. ((of:jo a) b)
%. ((of:dejs-soft:format a) b)
%- slog
?+ b ~
{$o *}
@ -131,7 +130,7 @@
%+ ke *speech |. ~+
%- of :~
lin+(ot say+bo txt+so ~)
url+(ot txt+(su aurf:urlp) ~)
url+(ot txt+(su aurf:de-purl:html) ~)
exp+(ot txt+so ~)
app+(ot txt+so src+so ~)
fat+(ot tor+tors taf+spec ~)
@ -148,7 +147,7 @@
tank+(ot dat+(cu (hard (list tank)) blob) ~)
==
::
++ blob (cu cue (su fel:ofis))
++ blob (cu cue (su fel:de-base64:mimes:html))
::
::
++ convert-telegram

View File

@ -160,6 +160,10 @@
=< se-abet =< se-view
(se-belt bet)
::
++ poke-dill-blit :: terminal output
|= bit/dill-blit:dill
se-abet:(se-blit-sys bit)
::
++ poke-start :: start app
|= wel/well:gall
=< se-abet =< se-view

View File

@ -1,4 +1,2 @@
/+ old-zuse
=, old-zuse
=, html
|=(hit/httr ~|(hit ?>(?=($2 (div p.hit 100)) (need (de-json q:(need r.hit))))))
|=(hit/httr:eyre ~|(hit ?>(?=($2 (div p.hit 100)) (need (de-json q:(need r.hit))))))

View File

@ -2,8 +2,7 @@
::
:::: /hoon/oauth2/lib
::
/+ hep-to-cab, interpolate, old-zuse
=, old-zuse
/+ hep-to-cab, interpolate
=, eyre
=, mimes:html
=, html

View File

@ -1,247 +0,0 @@
:: Shims from cc-release
::
:::: /hoon/oldzuse/lib
::
|%
++ dope !! :: XX deprecated
++ fu fu:number :: modulo (mul p q)
++ aes aes:crypto :: aes, all sizes
++ crua crua:crypto :: cryptosuite A (RSA)
++ crub crub:crypto :: cryptosuite B (Ed)
++ trub trub:test:crypto :: test crub
++ hmac hmac:crypto :: HMAC-SHA1
++ dawn dawn:chrono:userlib :: Jan 1 weekday
++ daws daws:chrono:userlib :: date weekday
++ deal deal:chrono:userlib :: to leap sec time
++ lead lead:chrono:userlib :: from leap sec time
++ dust dust:chrono:userlib :: print UTC format
++ stud stud:chrono:userlib :: parse UTC format
++ unt unt:chrono:userlib :: UGT to UTC time
++ yu yu:chrono:userlib :: UTC format constants
++ moon en-mite:mimes:html :: mime type to text
++ perk perk.is :: parse cube fork
++ poja de-json:html :: parse JSON
++ pojo en-json:html :: print json
++ poxo en-xml:html :: node to tape
++ poxa de-xml:html :: xml parser
++ jo dejs-soft:format :: json reparser
++ joba frond:enjs:format :: object from k-v pair
++ jobe pairs:enjs:format :: object from k-v list
++ jape tape:enjs:format :: string from tape
++ jone numb:enjs:format :: number from unsigned
++ jode time:enjs:format :: ms timestamp
++ jesc jesc:en-json:html :: escape for json
++ taco as-octs:mimes:html :: atom to octstream
++ tact as-octt:mimes:html :: tape to octstream
++ tell of-wall:format :: wall to octstream
++ feel feel:space:userlib :: simple file write
++ file file:space:userlib :: simple file load
++ foal foal:space:userlib :: high-level write
++ fray fray:space:userlib :: high-level delete
++ furl furl:space:userlib :: unify changes
++ tame !! :: XX deprecated
++ tome de-beam:format :: parse path to beam
++ tope en-beam:format :: beam to path
++ deft deft:de-purl:html :: parse url extension
++ fuel fuel:html :: parse fcgi
++ sifo en-base64:mimes:html :: 64-bit encode
++ ofis de-base64:mimes:html :: 64-bit decode
++ dray dray:wired :: load tuple into path
++ raid raid:wired :: demand path odors
++ urle en-urlt:html :: URL encode
++ urld de-urlt:html :: URL decode
++ earn en-purl:html :: purl to tape
++ earf apix:en-purl:html :: purf to tape
++ earl !! :: XX deprecated
++ urlp de-purl:html :: url+header parser
++ epur de-purl:html :: url+header parser
++ clan clan:title :: ship to rank
++ cite cite:title :: ship short name
++ pale pale:pubsub:userlib :: filter peers
++ prix prix:pubsub:userlib :: filter gate
++ prey prey:pubsub:userlib :: prefix
++ hunt !! :: YY in hoon with dif abi
++ mole !! :: XX deprecated
++ myle !! :: XX deprecated
++ pack !! :: YY in eyre privately
++ puck !! :: YY in eyre privately
++ saxo saxo:title :: autocanon
++ sein sein:title :: autoboss
++ team team:title :: our / our moon
++ acru acru:ames :: asym cryptosuite
++ aeon aeon:clay :: revision
++ agon !! :: XX deprecated
++ ankh ankh:clay :: fs node (new)
++ apex !! :: XX deprecated
++ bale bale:eyre :: driver state
++ iden user:eyre :: username
++ sec-move sec-move:eyre :: driver effect
++ ball !! :: XX deprecated
++ bait bait:ames :: fmt nrecvd spec
++ bath !! :: XX deprecated
++ beam beam:clay :: global name
++ beak beak:clay :: garnish with beak
++ bird !! :: XX deprecated
++ bitt bitt:gall :: incoming subs
++ blob blob:clay :: fs blob
++ boat boat:gall :: outgoing subs
++ boon boon:ames :: fort output
++ bowl bowl:gall :: standard app state
++ brow !! :: XX deprecated
++ cake cake:ames :: top level packet
++ cape cape:ames :: end-to-end result
++ care care:clay :: clay submode
++ case case:clay :: ship desk case spur
++ chum !! :: XX depreacted
++ clot clot:ames :: symmetric record
++ claw !! :: XX depreacted
++ clip clip:eyre :: client IP
++ coal !! :: XX depreacted
++ code code:xmas :: symmetric key
++ cone !! :: XX depreacted
++ corn !! :: XX depreacted
++ cred cred:eyre :: credential
++ deco deco :: text decoration
++ dome dome:clay :: project state
++ dore dore:ames :: foreign contact
++ dove dove:ames :: count hash 13-blocks
++ epic epic:eyre :: FCGI parameters
++ flap flap:ames :: network packet id
++ flow flow:ames :: packet connection
++ fort !! :: XX deprecated
++ gank !! :: XX deprecated
++ gilt !! :: YY declare locally
++ germ germ:clay :: merge style
++ hand hand:ames :: hash of code
++ hart hart:eyre :: http sec+port+host
++ hate hate:eyre :: semi-cooked request
++ heir heir:eyre :: status+headers+data
++ hiss hiss:eyre :: outbound request
++ hist !! :: XX deprecated
++ hole hole:eyre :: session identity
++ hort hort:eyre :: http port+host
++ host host:eyre :: http host
++ hoke hoke:eyre :: local host
++ httq httq:eyre :: raw http request
++ httr httr:eyre :: raw http response
++ httx httx:eyre :: encapsulated http
++ kite !! :: XX deprecated
++ lamb !! :: XX deprecated
++ lane lane:xmas :: packet route
++ lark !! :: parsed command
++ lass !! :: power increment
++ lath !! :: pipeline stage
++ lawn !! :: pipeline (??)
++ lint !! :: fragment array
++ lobe lobe:clay :: blob ref
++ love love:eyre :: http response
++ maki maki:clay :: XX dead?
++ math math:eyre :: semiparsed headers
++ meal meal:ames :: payload
++ mess mess:eyre :: raw http headers
++ meta !! :: path metadata
++ meth meth:eyre :: http methods
++ mite mite:eyre :: mime type
++ miso miso:clay :: ankh delta
++ misu misu:clay :: computed delta
++ mizu mizu:clay :: new state
++ moar moar:clay :: normal change range
++ moat moat:clay :: change range
++ mood mood:clay :: request in desk
++ moth moth:eyre :: http operation
++ newt !! :: XX deprecated
++ nori nori:clay :: repository action
++ nuri nuri:clay :: repository action
++ octs octs:eyre :: octet-stream
++ oryx oryx:eyre :: CSRF secret
++ page page:clay :: untyped cage
++ pail !! :: XX deprecated?
++ plan !! :: XX deprecated?
++ plea !! :: XX deprecated?
++ plop plop:clay :: unvalidated blob
++ pork pork:eyre :: fully parsed url
++ pred !! :: XX deprecated?
++ prod !! :: XX deprecated?
++ prom !! :: XX deprecated?
++ purf purf:eyre :: url with fragment
++ purl purl:eyre :: parsed url
++ putt putt:ames :: outgoing message
++ pyre !! :: YY moved to clay
++ quay quay:eyre :: parsed url query
++ quri quri:eyre :: request-uri
++ race race:ames :: inbound stream
++ rank rank:title :: ship width class
++ rang rang:clay :: object store
++ rand !! :: YY moved to clay
++ rant rant:clay :: namespace binding
++ rave rave:clay :: general request
++ rill rill:ames :: outbound stream
++ riot riot:clay :: response+complete
++ road road:ames :: secured oneway route
++ rock rock:ames :: packet
++ rout rout:eyre :: http route (new)
++ rump rump:clay :: relative path
++ saba saba:clay :: patch+merge
++ sufi sufi:ames :: domestic host
++ salt !! :: XX deprecated
++ seal !! :: XX deprecated
++ shed shed:ames :: packet flow
++ skit !! :: XX deprecated
++ skin skin:ames :: encoding stem
++ snow snow:ames :: window exceptions
++ soap soap:ames :: statement id
++ soup soup:ames :: new statement id
++ soul soul:ames :: packet in travel
++ soba soba:clay :: delta
++ spur spur.is :: ship desk case spur
++ suba suba:clay :: delta
++ tako tako:clay :: yaki ref
++ tint tint :: text color
++ toro toro:clay :: general change
++ town town:ames :: all security state
++ tube !! :: canonical path
++ tutu !! :: XX deprecated
++ yaki yaki:clay :: XX deprecated
++ waks !! :: XX deprecated
++ woof !! :: XX deprecated
++ wund wund:ames :: mace in action
++ zuse ^zuse :: hoon+zuse kelvin
++ kiss-ames task:able:ames :: in request ->$
++ gift-ames gift:able:ames :: out result <-$
++ kiss-behn task:able:behn :: in request ->$
++ gift-behn gift:able:behn :: out result <-$
++ khan khan:clay :: XX dead
++ mode mode:clay :: update info?
++ riff riff:clay :: request+desist
++ kiss-clay task:able:clay :: in request ->$
++ gift-clay gift:able:clay :: out result <-$
++ blew blew:dill :: columns rows
++ belt belt:dill :: old belt
++ blit blit:dill :: old blit
++ dill-belt dill-belt:dill :: new belt
++ dill-blit dill-blit:dill :: new blit
++ flog flog:dill :: sent to %dill
++ gill gill:gall :: general contact
++ kiss-dill task:able:dill :: in request ->$
++ gift-dill gift:able:dill :: out result <-$
++ gram gram:eyre :: inter-ship message
++ kiss-eyre task:able:eyre :: in request ->$
++ gift-eyre gift:able:eyre :: out result <-$
++ club club:gall :: agent action
++ cuft cuft:gall :: internal gift
++ culm culm:gall :: config action
++ cush cush:gall :: internal kiss
++ dude dude:gall :: server identity
++ scup scup:gall :: autoupdate
++ well well:gall :: autostartable app
++ suss suss:gall :: config report
++ kiss-gall task:able:gall :: incoming request
++ gift-gall gift:able:gall :: outgoing result
++ gift-arvo gift-arvo :: out result <-$
++ kiss-arvo task-arvo :: in request ->$
++ note-arvo note-arvo :: out request $->
++ sign-arvo sign-arvo :: in result $<-
++ nule nule:unix:userlib :: lines to unix cord
++ lore to-wain:format :: atom to line list
++ role of-wain:format :: line list to atom
--

439
lib/plum.hoon Normal file
View File

@ -0,0 +1,439 @@
/? 310
::
/- plum
=, plum
::
:: This library includes `plume`, the actual pretty printing logic,
:: and a handful of utilities for constructing plums.
::
:: Generally, you'll just use `plume` like this:
::
:: ~(plume tall plum) :: Pretty print `plum` in tall mode.
:: ~(plume falt plum) :: Pretty print `plum` in wide mode.
::
:: There is probably no reason to look at the utility routines unless
:: you are writing something to generate `plum`s.
::
|^ :* plume=plume
fixed=fixed
tall-fixed=tall-fixed
tall-running=tall-running
rune=rune
simple-wide=simple-wide
subtree=subtree
sexp=sexp
==
::
:: This is the pretty-printer. Use the `flat` arm to render a plum
:: into a single line and use the `tall` arm to get a nice multi-line
:: rendering that switches to wide mode if there's enough space.
::
:: For details about how this works and what exactly it does in various
:: cases, take a look at the docs for `plum`, `plumfmt`, and at the
:: docs on the arms of this door.
::
++ plume
|_ =plum
::
:: An line, indented by `indent` spaces.
::
+$ line [indent=@ud text=tape]
::
:: An sequence of indented lines.
::
+$ block (list line)
::
:: +flat: print as a single line
::
++ flat
^- wain
text:linear
::
:: +tall: print as multiple lines
::
++ tall
^- wain
%+ turn window
|= line
(crip (runt [indent ' '] text))
::
:: +adjust: adjust lines to right
::
++ adjust
|= [tab=@ud =block] ^- ^block
(turn block |=([@ud tape] [(add tab +<-) +<+]))
::
:: Prepend `n` spaces to a tape.
::
++ prepend-spaces
|= [n=@ t=tape] ^- tape
(runt [n ' '] t)
::
:: Append an element to the end of a list.
::
++ snoc
|* {a/(list) b/*}
(weld a ^+(a [b]~))
::
:: +window: print as list of tabbed lines
::
++ window
^- block
~+ :: for random access
?@ plum [0 (trip plum)]~ :: trivial text
?- -.plum
::
:: %para: Line-wrappable paragraph. This is a stub; it should
:: wrap text to 40 characters.
::
%para
[0 +:linear]~
::
:: %sbrk: nested subexpression
::
:: This is an opportunity to switch to wide mode. First, try
:: rendered in wide mode. If that's possible and the result
:: isn't too big, use that. Otherwise recurse into the subplum
:: without switching to wide mode.
::
%sbrk
=/ sub kid.plum
?+ sub
window(plum sub)
[%tree *]
=/ wideresult
?~(wide.fmt.sub ~ [~ u=linear])
?: ?&(?=(^ wideresult) (lte length.u.wideresult 40))
[0 text.u.wideresult]~
window(plum sub)
==
::
:: %tree: Try to render a text tree in tall mode.
::
:: We want to render this in tall mode. First, verify that there
:: the plum has a tall render (if not, fall back to `linear`
:: formatting), then render all the subplums, and then render
:: them in one of three ways:
::
:: - If the `plumfmt` contains an `indef` and that indef has
:: no prefix, then this is variable-arity rune with a terminator:
:: Use vertical formatting.
::
:: - If the `plumfmt` contains an `indef` and that indef DOES have
:: a prefix, then this is something that looks like a core: Use
:: `core-like` formatting.
::
:: - Otherwise, this is a rune with a fixed number of arguments
:: Render the subplums using backstop indentation.
::
:: There's also a special case where something has exactly one sub-plum.
:: where something has exactly one sub-block. For example, we
:: want this output:
::
:: |-
:: foo
::
%tree
?~ tall.fmt.plum [0 text:linear]~
=/ prelude (trip intro.u.tall.fmt.plum)
|^ =/ blocks (turn kids.plum |=(=^plum window(plum plum)))
=/ prelude (trip intro.u.tall.fmt.plum)
?~ indef.u.tall.fmt.plum
?: =(1 (lent blocks))
[[0 prelude] (zing blocks)]
(backstep prelude blocks)
=/ prefix (trip sigil.u.indef.u.tall.fmt.plum)
=/ finale (trip final.u.indef.u.tall.fmt.plum)
?~ blocks %+ weld
?~(prelude ~ [0 prelude]~)
?~(finale ~ [0 finale]~)
?~ prefix (running prelude blocks finale)
(core-like prelude prefix blocks finale)
--
==
::
:: Render a plum in tall-mode using backstop indentation. Here,
:: we are rendering things that look something like this:
::
:: :+ foo
:: bar
:: baz
::
++ backstep
|= [prelude=tape blocks=(list block)]
^- block
%- zing
=/ nkids (lent blocks)
=/ idx 1
|- ^- (list block)
?~ blocks ~
:_ $(blocks t.blocks, idx +(idx))
^- block
=/ indent (mul 2 (sub nkids idx))
?. =(1 idx) (adjust indent i.blocks)
(rune-inline-with-block prelude indent i.blocks)
::
:: To make things look a bit nicer, we want to put the first
:: sub-block on the same line as the rune. We want this:
::
:: :- foo
:: baz
::
:: Instead of this:
::
:: :-
:: foo
:: baz
::
:: This handles the "foo" case.
::
++ rune-inline-with-block
|= [rune=tape indent=@ blk=block]
^- block
=. indent (max indent (add 2 (lent rune)))
=. blk (adjust indent blk)
?~ rune blk
?~ blk [0 rune]~
:_ t.blk
:- 0
%+ weld rune
=/ spaces-btwn (sub indent.i.blk (lent rune))
(prepend-spaces spaces-btwn text.i.blk)
::
:: Render a tall hoon with running indentation. Here, we are
:: rendering things that look sopmething like:
::
:: :~ foo
:: bar
:: baz
:: ==
::
:: So, there's basically three cases here: Either the prelude
:: is a rune, the prelude is empty, or prelude is some other
:: random-ass thing.
::
:: - If there is no prelude, then just combine all of the
:: sub-blocks together unaltered.
:: - If it's a rune (two-chatacters wide), then combine the
:: rune and the first line into one line (separated by two
:: spaces) and indent the rest of the lines by four spaces.
:: - If the rune is some other random-ass thing (has a length
:: that isn't 0 or 2), then render the prelude alone on the
:: first line and then combine the sub-blocks together,
:: all indented by another two spaces.
::
:: Regardless, if there's a finale, stick it on the end without
:: any indentation.
::
++ running
|= [prelude=tape blocks=(list block) finale=tape]
^- block
=/ result=block (zing blocks)
=. result
?+ (lent prelude)
[[0 prelude] (adjust 2 result)] :: unusual prelude
%0 :: empty prelude
result
%2 :: rune prelude
(rune-inline-with-block prelude 4 result)
==
?~ finale result
(snoc result [0 finale])
::
:: This renders sub-blocks where each sub-block needs to be
:: prefixed by some tape. For example:
::
:: |%
:: ++ foo
:: bar
:: ++ baz
:: qux
:: --
::
++ core-like
|= [prelude=tape prefix=tape blocks=(list block) finale=tape]
^- block
=/ clear (add 2 (lent prefix))
=/ result
^- block
%- zing
^- (list block)
%+ turn blocks
|= blk=block
^- block
^+ +<
=* tab ?~(blk 0 (sub clear (min clear indent.i.blk)))
=. blk (adjust tab blk)
?~ blk ~
:_ t.blk
:- 0
%+ weld prefix
(runt [(sub indent.i.blk (lent prefix)) ' '] text.i.blk)
=. result
?~ finale result
(snoc result [0 finale])
?~ prelude result
[[0 prelude] result]
::
:: +linear: Render a plum onto a single line, even if it only has a
:: wide form.
::
++ linear
^- [length=@ud text=tape]
~+ :: ~+ for random access
?@ plum [(met 3 plum) (trip plum)] :: Just a cord.
?- -.plum
::
:: This is already in wide mode, so %sbrk nodes don't matter here.
::
%sbrk
linear(plum kid.plum)
::
:: %para: To write a wrappable text paragraph to a single line,
:: we just combine all the lines into one, interspersing single
:: spaces chars.
::
%para
|- ^- [length=@ud text=tape]
?~ lines.plum [0 ~]
=/ next $(lines.plum t.lines.plum)
=/ this [length=(met 3 i.lines.plum) text=(trip i.lines.plum)]
:- (add +(length.this) length.next)
(weld text.this `tape`[' ' text.next])
::
:: Render a text tree to a single line.
::
%tree
|^ ^- [length=@ud text=tape]
?~ wide.fmt.plum (force-wide window)
=/ body (render-body delimit.u.wide.fmt.plum kids.plum)
?~ enclose.u.wide.fmt.plum body
(wrap-with-enclose u.enclose.u.wide.fmt.plum body)
::
:: Given a list of subplums and a delimiter, render all the
:: subplums onto a single line, and combine them into a single
:: string by interspersing the delimiter.
::
++ render-body
|= [delimit=cord kids=(list ^plum)]
=/ stop (trip delimit)
|- ^- [length=@ud text=tape]
?~ kids [0 ~]
=/ next $(kids t.kids)
=/ this linear(plum i.kids)
?~ text.next this
:- :(add length.this (lent stop) length.next)
:(weld text.this stop text.next)
::
:: Wrap a wide-form-rendered result with the `enclose` cords
:: from it's `plumefmt`.
::
++ wrap-with-enclose
|= [clamps=(pair cord cord) body=[length=@ text=tape]]
^- [length=@ud text=tape]
::
=/ close [(trip -.clamps) (trip +.clamps)]
:- :(add length.body (lent -.close) (lent +.close))
:(weld -.close text.body +.close)
::
:: Given the result of rendering a plum in tall form, combine
:: all the lines into one by separating each by two spaces.
::
++ force-wide
|= render=(list [@ud text=tape])
^- [length=@ud text=tape]
::
?~ render [0 ~]
=/ next (force-wide t.render)
:- :(add (lent text.i.render) 2 length.next)
?~(text.next text.i.render :(weld text.i.render " " text.next))
--
==
--
::
:: Convenience function to build a `plumfmt` for a rune with a fixed
:: number of parameters.
::
++ fixed
|= rune=@ta
^- plumfmt
[wide=`[' ' `[(cat 3 +< '(') ')']] tall=`[+< ~]]
::
:: Same as `fixed` but only only outputs in `tall` mode.
::
++ tall-fixed
|= rune=cord
^- (unit [cord (unit [cord cord])])
`[rune ~]
::
:: Convenience function to build a the `tall` part of a `plumfmt` for
:: a running-style rune (one that takes a variable number of parameters
:: and has a terminator).
::
++ tall-running
|= [rune=cord sigil=cord term=cord]
^- (unit [cord (unit [cord cord])])
`[rune `[sigil term]]
::
:: Convenience function for rendering a rune into a plum. This takes
:: a rune, an optional tall-form terminator, optionally a short-form (if
:: you don't supply a short-form, it'll just construct the standard
:: wide-form (e.g. "?~(x x ~)") for you, and a list of sub-plums.
::
++ rune
|= $: rune=cord
term=(unit cord)
short=(unit [cord cord cord])
kids=(list plum)
==
^. plum
|^ :- %sbrk
:+ %tree
:- (rune-wide-form rune short)
?~ term (tall-fixed rune)
(tall-running rune '' u.term)
kids
::
:: If you just give this a rune, it'll build the standard wide-form.
:: Otherwise, it'll just ose the one that you gave it.
::
++ rune-wide-form
|= [rune=cord short=(unit [fst=cord mid=cord lst=cord])]
^- (unit (pair cord (unit [cord cord])))
=* fst (cat 3 rune '(')
=* std `[' ' `[fst ')']]
?~ short std
`[mid.u.short `[fst.u.short lst.u.short]]
--
::
:: Just a helper function for constructing a wide-form %tree plum.
::
++ simple-wide
|= [init=cord sep=cord end=cord kids=(list plum)]
^- plum
=/ fmt=plumfmt [wide=[~ sep [~ init end]] tall=~]
[%tree fmt kids]
::
:: Convenience function that builds a plum for a subexpression. The
:: `%sbrk` tells the pretty-printer that this is a valid place to
:: switch from tall mode to wide mode.
::
++ subtree
|= [p=plumfmt q=(list plum)]
^- plum
[%sbrk [%tree p q]]
::
:: Convenience for generating plums that look like s-expressions. Useful
:: for quickly getting decent-looking debug output.
::
++ sexp
|= [sym=cord kids=(list plum)]
^- plum
=/ head=cord (cat 3 '(' sym)
=/ headspc=cord (cat 3 head ' ')
=/ symcol=cord (cat 3 sym ':')
=/ fmt=plumfmt [[~ ' ' [~ headspc ')']] [~ symcol [~ '' '']]]
?~ kids (cat 3 '(' (cat 3 sym ')'))
[%sbrk [%tree fmt kids]]
::
--

1162
lib/pprint.hoon Normal file

File diff suppressed because it is too large Load Diff

1912
lib/xray.hoon Normal file

File diff suppressed because it is too large Load Diff

View File

@ -3,13 +3,11 @@
::
/? 310
/- kyev, sole
/+ old-zuse
::
::::
::
=, sole
=, old-zuse
|_ dill-belt
|_ dill-belt:dill
::
++ grab :: convert from
|%
@ -28,7 +26,7 @@
:: %up %down %left %right
:: == ==
++ kyev
|= kev/^kyev ^- dill-belt
|= kev/^kyev ^- dill-belt:dill
~| dill-belt-incomplete+kev
?: ?=({$act ?($ctrl $shift $alt $meta)} q.kev)
[%txt ~] :: ignore
@ -57,6 +55,6 @@
$right [%aro %r]
== :: %yow, %rez?
::
++ noun dill-belt :: clam from %noun
++ noun dill-belt:dill :: clam from %noun
--
--

View File

@ -3,24 +3,23 @@
::
/? 310
/- sole
/+ old-zuse
=, sole
=, old-zuse
|_ dib/dill-blit
=, enjs:format
|_ dib/dill-blit:dill
::
++ grab :: convert from
++ grab :: convert from
|%
++ noun dill-blit :: clam from %noun
++ noun dill-blit:dill :: clam from %noun
--
++ grow
|%
++ json
^- ^json
?+ -.dib ~|(unsupported-blit+-.dib !!)
$mor [%a (turn p.dib |=(a/dill-blit json(dib a)))]
$hop (joba %hop (jone p.dib))
?($pro $out) (joba -.dib (jape (tufa p.dib)))
?($bel $clr) (joba %act %s -.dib)
$mor [%a (turn p.dib |=(a/dill-blit:dill json(dib a)))]
$hop (frond %hop (numb p.dib))
?($pro $out) (frond -.dib (tape (tufa p.dib)))
?($bel $clr) (frond %act %s -.dib)
==
--
--

View File

@ -2,14 +2,11 @@
:::: /mar/fora/comment/hoon
::
/? 310
/+ old-zuse
::
=, old-zuse
|_ {pax/path sup/spur txt/@t}
++ grab
|%
++ noun {path spur @t}
++ json
(corl need =>(jo (ot pax+(su fel:stab) sup+(su fel:stab) txt+so ~)))
(corl need =>(dejs-soft:format (ot pax+(su fel:stab) sup+(su fel:stab) txt+so ~)))
--
--

View File

@ -2,14 +2,11 @@
:::: /mar/fora/post/hoon
::
/? 310
/+ old-zuse
::
=, old-zuse
|_ {pax/path sup/spur hed/@t txt/@t}
++ grab
|%
++ noun {path spur @t @t}
++ json
(corl need =>(jo (ot pax+(su fel:stab) sup+(su fel:stab) hed+so txt+so ~)))
(corl need =>(dejs-soft:format (ot pax+(su fel:stab) sup+(su fel:stab) hed+so txt+so ~)))
--
--

View File

@ -1,6 +1,5 @@
/- gh
/+ gh-parse, httr-to-json, old-zuse
=, old-zuse
/+ gh-parse, httr-to-json
|_ commit/commit:gh
++ grab
|%

View File

@ -1,7 +1,6 @@
:: Converts the result of an 'issues' event into a issues:gh.
/- gh
/+ gh-parse, hall, old-zuse
=, old-zuse
/+ gh-parse, hall
|_ issue-comment/issue-comment:gh
++ grow
|%
@ -23,7 +22,7 @@
(rash html-url.comment.issue-comment aurf:urlp)
%- jobe :~
repository+s+name.repository.issue-comment
number+(jone number.issue.issue-comment)
number+(numb:enjs:format number.issue.issue-comment)
title+s+title.issue.issue-comment
==
==
@ -32,10 +31,10 @@
|%
++ json
=; jop |=(jon/^json `issue-comment:gh`(need (jop jon)))
%- ot:jo
%- ot:dejs-soft:format
:~ repository+repository:gh-parse
sender+user:gh-parse
action+so:jo
action+so:dejs-soft:format
issue+issue:gh-parse
comment+comment:gh-parse
==

View File

@ -1,7 +1,6 @@
/- gh
/+ gh-parse, httr-to-json, old-zuse
/+ gh-parse, httr-to-json
=, mimes:html
=, old-zuse
|_ issue/issue:gh
++ grab
|%

View File

@ -1,7 +1,6 @@
:: Converts the result of an 'issues' event into a issues:gh.
/- gh
/+ gh-parse, hall, old-zuse
=, old-zuse
/+ gh-parse, hall
|_ issues/issues:gh
++ grow
|%
@ -121,10 +120,10 @@
++ json
|= jon/^json
^- issues:gh
=+ top=(need ((om:jo some) jon))
=+ top=(need ((om:dejs-soft:format some) jon))
:* (need (repository:gh-parse (~(got by top) %repository)))
(need (user:gh-parse (~(got by top) %sender)))
=+ action=(need (so:jo (~(got by top) %action)))
=+ action=(need (so:dejs-soft:format (~(got by top) %action)))
?+ action ~|([%bad-action action] !!)
$assigned [action (need (user:gh-parse (~(got by top) %assignee)))]
$unassigned [action (need (user:gh-parse (~(got by top) %assignee)))]

View File

@ -1,7 +1,6 @@
/- gh
/+ gh-parse, old-zuse
/+ gh-parse
=, mimes:html
=, old-zuse
|_ issues/(list issue:gh)
++ grab
|%

View File

@ -1,8 +1,6 @@
/+ old-zuse
=, old-zuse
|_ {method/meth endpoint/(list @t) jon/json}
|_ {method/meth:eyre endpoint/(list @t) jon/json}
++ grab
|%
++ noun {method/meth endpoint/(list @t) jon/json}
++ noun {method/meth:eyre endpoint/(list @t) jon/json}
--
--

View File

@ -1,6 +1,5 @@
/- gh
/+ gh-parse, httr-to-json, old-zuse
=, old-zuse
/+ gh-parse, httr-to-json
|_ repo/repository:gh
++ grab
|%

View File

@ -1,7 +1,5 @@
/- rfc, gmail-label
/+ old-zuse
=, old-zuse
=, eyre
|_ {method/meth endpoint/path query/quay mes/?(message:rfc label-req:gmail-label)} :: jon=(unit json)]
++ grab
|%

View File

@ -8,8 +8,8 @@
::
++ grow :: convert to
|%
++ html (crip (en-xml own)) :: convert to %html
++ mime [/text/html (as-octs html)] :: convert to %mime
++ html (crip (en-xml own)) :: convert to %html
++ mime [/text/html (as-octs html)] :: convert to %mime
--
++ grab |% :: convert from
++ noun manx :: clam from %noun

View File

@ -1,7 +1,4 @@
/- lens
/+ old-zuse
::
=, old-zuse
|_ com/command:lens
++ grab
|%
@ -12,24 +9,24 @@
~| jon=jon
%- need
%. jon
=> [. jo]
=< %- ot :~
source+source
sink+sink
==
=, dejs-soft:format
|%
++ source
^- $-(^json (unit source:lens))
|= jon/^json
^- $-(^^json (unit source:^^lens))
|= jon/^^json
=+ tuple=%.(jon (ar source))
?^ tuple
`[%tuple u.tuple]
%. jon
%- of :~
data+so:jo
dojo+so:jo
clay+so:jo
url+(su auri:urlp)
data+so
dojo+so
clay+so
url+(su auri:de-purl:html)
api+(su ;~(plug sym ;~(pfix col prn)))
:- %get-api
%- su
@ -39,15 +36,16 @@
==
listen-api+(su ;~(plug sym ;~(pfix col sym)))
as+(ot mark+(su sym) next+source ~)
hoon+(ot code+so:jo next+source ~)
hoon+(ot code+so next+source ~)
==
++ none |=(^^json (some ~))
++ sink
^- $-(^json (unit sink:lens))
^- $-(^^json (unit sink:^^lens))
%- of :~
stdout+|=(^json (some ~))
output-file+so:jo
stdout+none
output-file+so
output-clay+(su (easy /sentinel/path))
url+(su auri:urlp)
url+(su auri:de-purl:html)
to-api+(su ;~(plug sym ;~(pfix col prn)))
:- %send-api
%- su
@ -55,7 +53,7 @@
sym
;~(pfix col (more net (cook crip (star ;~(less net prn)))))
==
command+so:jo
command+so
app+(su sym)
==
--

View File

@ -3,12 +3,10 @@
::
/? 310
/- sole
/+ old-zuse
::
::::
::
=, sole
=, old-zuse
|_ sole-action
::
++ grab :: convert from
@ -16,7 +14,7 @@
++ json
|= jon/^json ^- sole-action
%- need %. jon
=> [jo ..sole-action]
=> [dejs-soft:format ..sole-action]
|^ (fo %ret (of det+change ~))
++ fo
|* {a/term b/fist}

View File

@ -3,16 +3,13 @@
::
/? 310
/- sole
/+ old-zuse
::
::::
::
=, sole
=, format
=, old-zuse
|%
++ mar-sole-change :: XX dependency
=, old-zuse
|_ cha/sole-change
++ grow
|% ++ json
@ -28,7 +25,7 @@
$set (frond %set (tape (tufa p.det)))
$ins (frond %ins (pairs at+(numb p.det) cha+s+(tuft q.det) ~))
==
--
--
--
++ wush
|= {wid/@u tan/tang}
@ -57,7 +54,7 @@
$tan (wall (turn (flop p.sef) |=(a/tank ~(ram re a))))
$txt s+(crip p.sef)
$sav
(pairs file+s+(crip <`path`p.sef>) data+s+(crip (sifo q.sef)) ~)
(pairs file+s+(crip <`path`p.sef>) data+s+(crip (en-base64:mimes:html q.sef)) ~)
::
$mor
=+ all=(turn p.sef |=(a/sole-effect lens-json(sef a)))
@ -69,7 +66,7 @@
::
++ json
^- ^json
?+ -.sef
?+ -.sef
~|(unsupported-effect+-.sef !!)
$mor [%a (turn p.sef |=(a/sole-effect json(sef a)))]
$err (frond %hop (numb p.sef))

View File

@ -1,11 +0,0 @@
::
:::: /hoon/action/static/mar
::
/? 309
/- static
|_ act=action:static
++ grab
|%
++ noun action:static
--
--

View File

@ -2,14 +2,12 @@
:::: /hoon/hymn/tree/mar
::
/? 310
/+ old-zuse
=, mimes:html
=, old-zuse
|_ own/manx
::
++ grow :: convert to
|%
++ html (crip (poxo own)) :: convert to %html
++ html (crip (en-xml:^html own)) :: convert to %html
++ mime [/text/html (as-octs html)] :: convert to %mime
--
++ grab |% :: convert from

View File

@ -3,8 +3,7 @@
:::: /hoon/cred/twit/mar
::
/- plan-acct
/+ httr-to-json, twitter, old-zuse
=, old-zuse
/+ httr-to-json, twitter
|_ {acc/plan-acct raw/json}
++ grab
|%
@ -12,7 +11,7 @@
++ httr (cork httr-to-json json) :: XX mark translation
++ json
|= jon/^json ^- {plan-acct ^json}
=+ usr=(need ((ot 'screen_name'^so ~):jo jon))
=+ usr=(need ((ot 'screen_name'^so ~):dejs-soft:format jon))
=+ url=(user-url:render:twitter usr)
[[usr (some url)] jon]
--

View File

@ -3,8 +3,7 @@
:::: /hoon/feed/twit/mar
::
/- hall
/+ twitter, httr-to-json, old-zuse
=, old-zuse
/+ twitter, httr-to-json
=, format
|_ fed/(list post:twitter)
++ grab

View File

@ -2,8 +2,7 @@
::
:::: /hoon/post/twit/mar
::
/+ twitter, httr-to-json, old-zuse
=, old-zuse
/+ twitter, httr-to-json
|_ post:twitter
++ grab
|%

View File

@ -2,8 +2,7 @@
::
:::: /hoon/req/twit/mar
::
/+ twitter, old-zuse
=, old-zuse
/+ twitter
|_ {req/endpoint:reqs:twitter quy/quay}
++ grab
|%

View File

@ -2,8 +2,7 @@
::
:::: /hoon/usel/twit/mar
::
/+ twitter, httr-to-json, old-zuse
=, old-zuse
/+ twitter, httr-to-json
|_ (list who/@ta)
++ grab
|%

32
mar/udon.hoon Normal file
View File

@ -0,0 +1,32 @@
::
:::: /hoon/umd/mar
::
/+ cram
::
|_ mud/@t
++ grow
|%
++ mime [/text/x-unmark (as-octs:mimes:html mud)]
++ txt
(to-wain:format mud)
++ elem
^- manx
=, cram
elm:(static (ream mud))
++ front :: XX performance, types
^- (map term knot)
%- ~(run by inf:(static:cram (ream mud)))
|= a=dime ^- cord
?+ (end 3 1 p.a) (scot a)
%t q.a
==
--
++ grab
|%
++ mime |=({p/mite:eyre q/octs:eyre} q.q)
++ noun @t
++ txt of-wain:format
--
++ grad %txt
++ garb /down
--

View File

@ -2,14 +2,11 @@
:::: /hoon/paste/write/mar
::
/? 310
/+ old-zuse
::
=, old-zuse
|_ {typ/?($hoon $md $txt) txt/@t}
|_ [typ=?($hoon $md $txt) txt=@t]
++ grab
|%
++ noun {?($hoon $md $txt) @t}
++ json
(corl need =>(jo (ot typ+(ci (soft ?($hoon $md $txt)) so) txt+so ~)))
++ noun [?($hoon $md $txt) @t]
++ json
(corl need =>(dejs-soft:format (ot typ+(ci (soft ?($hoon $md $txt)) so) txt+so ~)))
--
--

View File

@ -2,14 +2,11 @@
:::: /hoon/paste/write/mar
::
/? 310
/+ old-zuse
::
=, old-zuse
|_ {who/@txname loc/@txloc}
|_ [who=@txname loc=@txloc]
++ grab
|%
++ noun {@txname @txloc}
++ json
(corl need =>(jo (ot who+so loc+so ~)))
++ noun [@txname @txloc]
++ json
(corl need =>(dejs-soft:format (ot who+so loc+so ~)))
--
--

View File

@ -5,11 +5,11 @@
::
=, mimes:html
=, format
|_ {sup/spur mim/mime}
|_ [sup=spur mim=mime]
++ grab
|%
++ noun {spur mime}
++ noun [spur mime]
++ json
=,(dejs (ot sup+(su fel:stab) mime+(cu |=(a/@t [/ (as-octs a)]) so) ~))
=,(dejs (ot sup+(su fel:stab) mime+(cu |=(a=@t [/ (as-octs a)]) so) ~))
--
--

View File

@ -2,13 +2,10 @@
:::: /hoon/wipe/write/mar
::
/? 310
/+ old-zuse
::
=, old-zuse
|_ spur
++ grab
|%
++ noun spur
++ json (corl need (su:jo fel:stab))
++ json (corl need (su:dejs-soft:format fel:stab))
--
--

51
sur/plum.hoon Normal file
View File

@ -0,0 +1,51 @@
|%
::
:: A `plum` is the intermediate representation for the pretty-printer. It
:: encodes hoon-shaped data with the least amount of structured needed
:: for formating.
::
:: A `plum` is either a
::
:: - `cord`: A simple cord
:: - `[%para *]`: A wrappable paragraph.
:: - `[%tree *]`: A formated plum tree
:: - `[%sbrk *]`: An indication of a nested subexpression.
::
:: The formatter will use the tall mode unless:
::
:: - A plum has only a `wide` style.
:: - The plum is in `%sbrk` form and it's subplum (`kid`), when
:: formatted in wide mode, can fit on a single line.
::
+$ plum
$@ cord
$% [%para prefix=tile lines=(list @t)]
[%tree fmt=plumfmt kids=(list plum)]
[%sbrk kid=plum]
==
::
:: A `plumfmt` is a description of how to render a `plum`. A `plumfmt`
:: must include a `wide`, a `tall`, or both.
::
:: A `wide` is a description of how to render a plum in a single
:: line. The nested (`kids`) sub-plums will be interleaved with `delimit`
:: strings, and, if `enclose` is set, then the output will be enclosed
:: with `p.u.enclose` abnd `q.u.enclose`.
::
:: For examle, to build a plumfmt for string literals, we could write:
::
:: [wide=[~ '' [~ '"' '"']] tall=~]
::
:: A `tall` is a description of how to render a plum accross multiple
:: lines. The output will be prefixed by `intro`, suffixed by
:: `final.u.indef`, and each subplum prefixed by `sigil.u.indef`.
::
:: For example, to build a plumfmt for cores, we could write:
::
:: [wide=~ tall=`['' `['++' '--']]]
::
+$ plumfmt
$: wide=(unit [delimit=tile enclose=(unit (pair tile tile))])
tall=(unit [intro=tile indef=(unit [sigil=tile final=tile])])
==
--

View File

@ -70,14 +70,14 @@
%+ each (unit out) :: ~ is abort
(pair sole-prompt (sole-dialog out)) :: ask and continue
:: ::
++ sole-request :: scraper result
++ sole-request :: scraper result
|* out/$-(* *) :: output structure
%+ pair (list tank) ::
%+ each (unit out) :: ~ is abort
%^ trel :: fetch and continue
(unit knot)
hiss:eyre
$-(httr:eyre $;(..$))
$-(httr:eyre (sole-request out))
--
|%
:: ::
@ -91,33 +91,4 @@
{{now/@da eny/@uvJ bek/beak} {,+<- ,+<+}} ::
:: ::
:: ::
++ sole-so :: construct result
|* pro/* ::
[p=*(list tank) q=[%& p=[~ u=pro]]] ::
:: ::
++ sole-yo :: add output tank
|* {tan/tank res/(sole-result)} ::
?@ res res ::
[p=[i=tan t=p.res] q=q.res] ::
:: ::
++ sole-lo :: construct prompt
|* {pom/sole-prompt mor/(sole-dialog)} ::
[p=*(list tank) q=[%| p=pom q=mor]] ::
:: ::
++ sole-at :: fetch url
=| usr/knot ::
|* {pul/_purl:eyre fun/$-(httr:eyre *)} ::
:- p=*(list tank) ::
q=[%| p=`usr q=[pul %get ~ ~] r=fun] ::
:: ::
++ sole-no :: empty result
[p=*(list tank) q=[%& ~]] ::
:: ::
++ sole-go :: parse by rule
|* {sef/rule fun/$-(* *)} ::
|= txt/sole-input ::
=+ vex=(sef [0 0] txt) ::
?: |(!=((lent txt) q.p.vex) ?=(~ q.vex)) ::
q.p.vex ::
(fun p.u.q.vex) ::
--

View File

@ -1,12 +0,0 @@
::
:::: /hoon/static/sur
::
/? 309
|%
::
:: +action: kickoff generation of site tree
::
+= action
$% [%build in=beam out=beam ext=mark]
==
--

178
sur/xray.hoon Normal file
View File

@ -0,0 +1,178 @@
::
:: These are the public types for the `xray` library. Analysing a type
:: yields an `ximage`, and everything else here is just some structure
:: within that.
::
:: `ximage`s can be printed as specs (hoon syntax for types), and can
:: be used to pretty-print typed data.
::
/? 310
::
|%
::
:: An `xtable` is a graph of types referenced by the top-level type,
:: and the `root` `key` points to the node which corresponds to the
:: type under analysis.
::
+$ ximage [root=key =xtable]
::
:: A `key` is just an identifier for a node in the xray graph.
::
+$ key @
::
:: An `xtable` is the xray graph itself. It contains one node for for
:: the type that was analyzed and one node for every type referenced
:: within that type.
::
:: The `next` field is the the next available key (used when inserting
:: new xrays), `xrays` maps keys to graph nodes and `type-map` gives
:: the key corresponding to a type.
::
:: The `type-map` is basically just the reverse of the `xrays` map. It
:: doesn't contain any new information, but is needed for performance
:: reasons.
::
+$ xtable [next=key xrays=(map key xray) =type=(map type key)]
::
:: An `xray` is a node in the `ximage` graph. It contains everything
:: we know about a certain `type`. `key` is it's identifier in the graph,
:: `type` is the type that it's an xray of, and `data` is the basic
:: information we derived about the type. The basic references to other
:: nodes are inside the `data` structure, though some of the other
:: fields may contain references as well.
::
:: - `shape` is some more information about the shape of data within
:: a cell.
:: - `role` expands on `shape`, adding further information about the
:: role that a node has within a fork.
:: - `pats` is used for printing data: we want to know if this type
:: can be printed as a list, as json, as a tape literal, etc.
:: - `recipes` contains information about how a type was
:: constructed. It's used to get much nicer output when printing types.
:: - `studs` contains "standards names". I actually don't know what this is.
:: - `helps` contains all the documentation about a type.
:: - `loop` indicates whether or not a node references itself. The list
:: type is cyclical, for example. This is used when printing an
:: `ximage`.
::
+$ xray
$: =key
=type
data=(unit data)
role=(unit role)
pats=(unit pattern)
studs=(set stud)
recipes=(set recipe)
helps=(set help)
shape=(unit shape)
loop=(unit ?)
==
::
:: - `%void` -- impossible to create.
:: - `%noun` -- could be any noun.
:: - `%atom` -- An atom of some aura, possibly constant
:: - `%cell` -- A cell with a head and a tail.
:: - `%core` -- A core, it's garb, it's context type, and the types of
:: each of it's arms.
:: - `%face` -- A face on another type.
:: - `%fork` -- Could be one or more other types.
:: - `%pntr` -- This is an internal hack, it should never survive
:: analysis; ignore.
::
+$ data
$@ ?(%noun %void)
$% [%atom =aura constant=(unit @)]
[%cell head=key tail=key]
[%core =garb xray=key batt=xbattery]
[%face face=$@(term tune) xray=key]
[%fork =(set key)]
[%pntr xray=key]
==
::
:: The basic shape of a type:
::
:: - `%void` -- impossible to create.
:: - `%noun` -- could be any noun.
:: - `%atom` -- always some type of atom; never a cell
:: - `%cell` -- always some type of cell; never an atom.
:: - `%junc` -- is a fork of a cell type and an atom type.
::
+$ shape ?(%void %noun %atom %cell %junc)
::
:: A `role` is the of a type, including a more refined understanding
:: of what role it plays within a fork.
::
:: Nodes referenced within a `role` often do not actually exist in the
:: original type, since we need to reorganize forks in order to make
:: them more coherent.
::
:: - `%void` -- impossible to create.
:: - `%noun` -- could be any noun.
:: - `%atom` -- always some type of atom; never a cell
:: - `%constant` -- a cell type who's head is a constant atom.
:: - `%tall` -- a cell type who's head is an atom.
:: - `%wide` -- a cell type who's head is also a cell
:: - `%instance` -- a cell type who's head is a constant atom.
:: - `%option` -- a union of types which are all constant atoms.
:: - `%union` -- a union of types which are all instances (cells who's
:: head is a constant atom).
:: - `%junction` -- a union of an atom type and a cell type.
:: - `%conjunction` -- a union of two cell types, one of them %wide
:: and the other %tall.
:: - `%misjunction` -- any other union type. There's no efficient way
:: to tell which branch to take when analyzing a fork which is a
:: %misjunction, and the type is probably improperly constructed.
::
+$ role
$@ $? %void %noun %atom %tall %wide ==
$% [%constant =atom]
[%instance =atom]
[%option =(map atom key)]
[%union =(map atom key)]
[%junction flat=key deep=key]
[%conjunction wide=key tall=key]
[%misjunction one=key two=key]
==
::
:: This is just a utility type, it encodes the "battery" structure
:: within a core.
::
:: It's a map from chapter names to the documentation and arms within
:: that chapter.
::
+$ xbattery (map term (pair what (map term key)))
::
:: A recipe tells us how a type was constructed.Direct
::
:: - `%direct` is a simple type like `term`, or `xray`.
:: - `%synthetic` is a constructed type, like `(list @)`.
::
+$ recipe
$% [%direct =term]
[%synthetic =term =(list key)]
==
::
:: A `pattern` is high-level information about the shape of a type. This
:: is used for printing data.
::
:: This is fairly heuristic. [%a %b %c ~] is recognized as a `path`,
:: `[3 ~[4 5 6]]` is recognized as a list, etc.
::
:: Most of the patterns have names that make their purpose obvious:
:: for example, the %tape pattern means that data of type type can be
:: printed as if it had the `tape` type. However, `%gear` and `%gate`
:: might not be entirely obvious.
::
:: - The %gear pattern is any core with a cell subject.
:: - The %gate pattern is a core that looks like a gate.
::
+$ pattern
$@ ?(%hoon %manx %json %nock %path %plum %skin %spec %tape %tour %type %vase)
$% [%gate sample=key product=key]
[%gear sample=key context=key batt=xbattery]
[%list item=key]
[%tree item=key]
[%unit item=key]
==
::
--

View File

@ -440,8 +440,8 @@
::
[%| prefix=tile =(list @t)]
$: %&
$: :: wide: one-line syntax
:: tall: multiline syntax
$: :: wide: one-line style
:: tall: multiline style
::
$= wide
:: %~: no wide form
@ -5994,27 +5994,63 @@
?. ?=(@ p.ben) [%2 tax]
[%0 .+(p.ben)]
::
{$5 b/*}
=+ ben=$(fol b.fol)
?. ?=($0 -.ben) ben
?. ?=(^ p.ben) [%2 tax]
[%0 =(-.p.ben +.p.ben)]
{$5 b/* c/*}
=+ hed=$(fol b.fol)
?. ?=($0 -.hed) hed
=+ tal=$(fol c.fol)
?. ?=($0 -.tal) tal
[%0 =(p.hed p.tal)]
::
{$6 b/* c/* d/*}
$(fol =>(fol [2 [0 1] 2 [1 c d] [1 0] 2 [1 2 3] [1 0] 4 4 b]))
=+ ben=$(fol b.fol)
?. ?=($0 -.ben) ben
?: =(& p.ben) $(fol c.fol)
?: =(| p.ben) $(fol d.fol)
[%2 tax]
::
{$7 b/* c/*} $(fol =>(fol [2 b 1 c]))
{$8 b/* c/*} $(fol =>(fol [7 [[7 [0 1] b] 0 1] c]))
{$9 b/* c/*} $(fol =>(fol [7 c 2 [0 1] 0 b]))
{$10 @ c/*} $(fol c.fol)
{$10 {b/* c/*} d/*}
{$7 b/* c/*}
=+ ben=$(fol b.fol)
?. ?=($0 -.ben) ben
$(sub p.ben, fol c.fol)
::
{$8 b/* c/*}
=+ ben=$(fol b.fol)
?. ?=($0 -.ben) ben
$(sub [p.ben sub], fol c.fol)
::
{$9 b/* c/*}
=+ ben=$(fol c.fol)
?. ?=($0 -.ben) ben
=. sub p.ben
=+ lof=$(fol [0 b.fol])
?. ?=($0 -.lof) lof
$(fol p.lof)
::
{$10 {b/@ c/*} d/*}
=+ bog=$(fol d.fol)
?. ?=({$0 *} bog) bog
=+ lot=$(fol c.fol)
?. ?=({$0 *} lot) lot
=+ [axe=b.fol big=p.bog lit=p.lot]
^- tone
:- %0
|- ^- p/*
?: =(2 axe) [lit +.big]
?: =(3 axe) [-.big lit]
=+ mor=(mas axe)
?: =(2 (cap axe))
[$(big -.big, axe mor) +.big]
[-.big $(big +.big, axe mor)]
::
{$11 @ c/*} $(fol c.fol)
{$11 {b/* c/*} d/*}
=+ ben=$(fol c.fol)
?. ?=($0 -.ben) ben
?: ?=(?($hunk $hand $lose $mean $spot) b.fol)
$(fol d.fol, tax [[b.fol p.ben] tax])
$(fol d.fol)
::
{$11 b/* c/*}
{$12 b/* c/*}
=+ ref=$(fol b.fol)
=+ ben=$(fol c.fol)
?. ?=($0 -.ref) ref
@ -6127,10 +6163,11 @@
{ven/term pro/term kel/@} :: vendor and product
{ven/term pro/term ver/@ kel/@} :: all of the above
== ::
+$ coil $: p/{p/(unit term) q/poly r/vair} :: name, wet/dry, vary
+$ coil $: p/garb :: name, wet/dry, vary
q/type :: context
r/{p/seminoun q/(map term tome)} :: arms
r/(pair seminoun (map term tome)) :: chapters
== ::
+$ garb (trel (unit term) poly vair) :: core
+$ poly ?(%wet %dry) :: polarity
+$ foot $% {$dry p/hoon} :: dry arm, geometric
{$wet p/hoon} :: wet arm, generic
@ -6163,30 +6200,6 @@
%nock ::
%tank ::
== ::
+$ plot :: externalization
$~ [%base %noun] ::
$% [%base =base] :: base value
[%core =plot count=@ud code=@udF] :: any core
[%deep =plat] :: stand
[%gate =plot =plot] :: gate sample/context
[%leaf =@tas] :: constant
[%loop =@ud] :: repetition point
[%list =plot] :: i-t list
[%many =(list plot)] :: tuple
[%mark =stud =plot] :: standard
[%name =term =plot] :: name attached
[%pair =plot =plot] :: pq cell
[%path ~] :: with @ta segments
[%pick =(list plot)] :: overlap
[%pool =plot =(map @ud plot)] :: repetition pool
[%qual =plot =plot =plot =plot] :: formal quadruple
[%quil =plot =plot =plot =plot =plot] :: formal quintuple
[%tape ~] :: utf8 bytes
[%tour ~] :: utf32 graphemes
[%tree p=plot] :: n-l-r tree
[%trip p=plot q=plot r=plot] :: formal triple
[%unit p=plot] :: maybe
== ::
+$ pock (pair axis nock) :: changes
+$ port (each palo (pair type nock)) :: successful match
+$ spec :: structure definition
@ -6407,8 +6420,9 @@
{$7 p/nock q/nock} :: serial compose
{$8 p/nock q/nock} :: push onto subject
{$9 p/@ q/nock} :: select arm and fire
{$10 p/$@(@ {p/@ q/nock}) q/nock} :: hint
{$11 p/nock q/nock} :: grab data from sky
{$10 p/{p/@ q/nock} q/nock} :: edit
{$11 p/$@(@ {p/@ q/nock}) q/nock} :: hint
{$12 p/nock q/nock} :: grab data from sky
{$0 p/@} :: axis select
== ::
+$ note :: type annotation
@ -6687,15 +6701,18 @@
::
:: 5; compare
::
{$5 b/*}
{$5 b/* c/*}
%+ require
$(fol b.fol)
|= :: fig: operator input
|= :: hed: left input
::
fig/noun
:: stop for atoms, compare cells
::
?@(fig ~ [full/~ =(-.fig +.fig)])
hed/noun
%+ require
^$(fol c.fol)
|= :: tal: right input
::
tal/noun
[full/~ =(hed tal)]
::
:: 6; if-then-else
::
@ -6775,16 +6792,33 @@
::
|=(noun ^$(bus one, fol +<))
::
:: 10; static hint
:: 10; edit
::
{$10 @ c/*}
{$10 {b/@ c/*} d/*}
:: tar: target of edit
::
=+ tar=$(fol d.fol)
:: propagate stop
::
?~ tar ~
:: inn: inner value
::
=+ inn=$(fol c.fol)
:: propagate stop
::
?~ inn ~
(mutate b.fol inn tar)
::
:: 11; static hint
::
{$11 @ c/*}
:: ignore hint
::
$(fol c.fol)
::
:: 10; dynamic hint
:: 11; dynamic hint
::
{$10 {b/* c/*} d/*}
{$11 {b/* c/*} d/*}
:: noy: dynamic hint
::
=+ noy=$(fol c.fol)
@ -6915,9 +6949,75 @@
[left.mask.bus -.data.bus]
[rite.mask.bus +.data.bus]
== ==
:: require complete intermediate step
::
++ mutate
:: change a single axis in a seminoun
::
|= $: :: axe: axis within big to change
:: lit: (little) seminoun to insert within big at axe
:: big: seminoun to mutate
::
axe/@
lit/seminoun
big/seminoun
==
^- result
:: stop on zero axis
::
?~ axe ~
:: edit root of big means discard it
::
?: =(1 axe) lit
:: decompose axis into path of head-tail
::
|- ^- result
?: =(2 axe)
:: mutate head of cell
::
=+ tal=(fragment 3 big)
:: propagate stop
::
?~ tal ~
(combine lit tal)
?: =(3 axe)
:: mutate tail of cell
::
=+ hed=(fragment 2 big)
:: propagate stop
::
?~ hed ~
(combine hed lit)
:: deeper axis: keep one side of big and
:: recurse into the other with smaller axe
::
=+ mor=(mas axe)
=+ hed=(fragment 2 big)
:: propagate stop
::
?~ hed ~
=+ tal=(fragment 3 big)
:: propagate stop
::
?~ tal ~
?: =(2 (cap axe))
:: recurse into the head
::
=+ mut=$(big hed, axe mor)
:: propagate stop
::
?~ mut ~
(combine mut tal)
:: recurse into the tail
::
=+ mut=$(big tal, axe mor)
:: propagate stop
::
?~ mut ~
(combine hed mut)
::
++ require
:: require complete intermediate step
::
|= $: noy/result
yen/$-(* result)
==
@ -7002,7 +7102,7 @@
|= nug/nock
?- nug
{$0 *} p.nug
{$10 *} $(nug q.nug)
{$11 *} $(nug q.nug)
* ~_(leaf+"cove" !!)
==
++ comb :: combine two formulas
@ -7114,24 +7214,66 @@
::
++ hike
~/ %hike
|= {axe/axis pac/(list {p/axis q/nock})}
^- nock
?~ pac
[%0 axe]
=+ zet=(skim pac.$ |=({p/axis q/nock} [=(1 p)]))
?~ zet
=+ tum=(skim pac.$ |=({p/axis q/nock} ?&(!=(1 p) =(2 (cap p)))))
=+ gam=(skim pac.$ |=({p/axis q/nock} ?&(!=(1 p) =(3 (cap p)))))
%+ cons
%= $
axe (peg axe 2)
pac (turn tum |=({p/axis q/nock} [(mas p) q]))
==
|= [a=axis pac=(list (pair axis nock))]
|^ =/ rel=(map axis nock) (roll pac insert)
=/ ord=(list axis) (sort ~(tap in ~(key by rel)) gth)
|- ^- nock
?~ ord
[%0 a]
=/ b=axis i.ord
=/ c=nock (~(got by rel) b)
=/ d=nock $(ord t.ord)
[%10 [b c] d]
::
++ contains
|= [container=axis contained=axis]
^- ?
=/ big=@ (met 0 container)
=/ small=@ (met 0 contained)
?: (lte small big) |
=/ dif=@ (sub small big)
=(container (rsh 0 dif contained))
::
++ parent
|= a=axis
`axis`(rsh 0 1 a)
::
++ sibling
|= a=axis
^- axis
?~ (mod a 2)
+(a)
(dec a)
::
++ insert
|= [e=[axe=axis fol=nock] n=(map axis nock)]
^- (map axis nock)
?: =/ a=axis axe.e
|- ^- ?
?: =(1 a) |
?: (~(has by n) a)
&
$(a (parent a))
:: parent already in
n
=. n
:: remove children
%+ roll ~(tap by n)
|= [[axe=axis fol=nock] m=_n]
?. (contains axe.e axe) m
(~(del by m) axe)
=/ sib (sibling axe.e)
=/ un (~(get by n) sib)
?~ un (~(put by n) axe.e fol.e)
:: replace sibling with parent
%= $
axe (peg axe 3)
pac (turn gam |=({p/axis q/nock} [(mas p) q]))
n (~(del by n) sib)
e :- (parent sib)
?: (gth sib axe.e)
(cons fol.e u.un)
(cons u.un fol.e)
==
?>(?=({* ~} zet) q.i.zet)
--
::
++ jock
|= rad/?
@ -7524,19 +7666,6 @@
?< ?=(~ specs)
:_(load [%bswt specs])
--
::
:: +explore:cosmetic: convert :sut to an inspection pattern (+plot).
::
++ explore
^- [plot _.]
=< [- +>]
|^ ^- [plot _.]
?+ sut !!
%void :_(. [%base %void])
%noun :_(. [%base %noun])
==
++ foo !!
--
--
++ limb-to-plum
|= =limb
@ -10108,7 +10237,7 @@
::
{$dtkt *}
=+ nef=$(gen [%kttr p.gen])
[p.nef [%11 [%1 %151 p.nef] q:$(gen q.gen, gol %noun)]]
[p.nef [%12 [%1 %151 p.nef] q:$(gen q.gen, gol %noun)]]
::
{$dtls *} [(nice [%atom %$ ~]) [%4 q:$(gen p.gen, gol [%atom %$ ~])]]
{$sand *} [(nice (play gen)) [%1 q.gen]]
@ -10123,15 +10252,15 @@
::
{$dtwt *} [(nice bool) [%3 q:$(gen p.gen, gol %noun)]]
{$hand *} [p.gen q.gen]
{$ktbr *} =+(vat=$(gen p.gen) [(wrap(sut p.vat) %iron) q.vat])
{$ktbr *} =+(vat=$(gen p.gen) [(nice (wrap(sut p.vat) %iron)) q.vat])
::
{$ktls *}
=+(hif=(nice (play p.gen)) [hif q:$(gen q.gen, gol hif)])
::
{$ktpd *} =+(vat=$(gen p.gen) [(wrap(sut p.vat) %zinc) q.vat])
{$ktpd *} =+(vat=$(gen p.gen) [(nice (wrap(sut p.vat) %zinc)) q.vat])
{$ktsg *} (blow gol p.gen)
{$tune *} [(face p.gen sut) [%0 %1]]
{$ktwt *} =+(vat=$(gen p.gen) [(wrap(sut p.vat) %lead) q.vat])
{$ktwt *} =+(vat=$(gen p.gen) [(nice (wrap(sut p.vat) %lead)) q.vat])
::
{$note *}
=+ hum=$(gen q.gen)
@ -10143,7 +10272,7 @@
:: ?: &(huz !?=(%|(@ [?(%sgcn %sgls) ^]) p.gen))
:: hum
:- p.hum
:+ %10
:+ %11
?- p.gen
@ p.gen
^ [p.p.gen q:$(gen q.p.gen, gol %noun)]
@ -10194,7 +10323,7 @@
{$dbug *}
~_ (show %o p.gen)
=+ hum=$(gen q.gen)
[p.hum [%10 [%spot %1 p.gen] q.hum]]
[p.hum [%11 [%spot %1 p.gen] q.hum]]
::
{$zpcm *} [(nice (play p.gen)) [%1 q.gen]] :: XX validate!
{$lost *}
@ -10243,7 +10372,7 @@
{$cell *} |($(sut p.sut) $(sut q.sut))
{$core *} $(sut p.sut)
{$face *} $(sut q.sut)
{$fork *} (lien ~(tap in p.sut) |=(type ^$(sut +<)))
{$fork *} (levy ~(tap in p.sut) |=(type ^$(sut +<)))
{$hint *} $(sut q.sut)
{$hold *} |((~(has in gil) sut) $(gil (~(put in gil) sut), sut repo))
$noun |

View File

@ -922,7 +922,7 @@
^+ +>
=. our ?~(hov our u.hov) :: XX
?: &(?=({?($of $ow) ^} tee) !(~(has by wix) p.tee))
~&(dead-ire+[`whir`tee ({term term ~} +.sih)] +>)
~&(dead-ire+[`whir`tee] +>)
?- &2.sih
$crud +>.$(mow [[hen %slip %d %flog +.sih] mow])
:: $dumb

View File

@ -70,7 +70,7 @@
::
++ coop (unit ares) :: possible error
++ json :: normal json value
$@ ~ :: null
$@ ~ :: null
$% {$a p/(list json)} :: array
{$b p/?} :: boolean
{$o p/(map @t json)} :: object
@ -6343,9 +6343,6 @@
;~(plug auri (punt ;~(pfix hax (cook crip (star pque)))))
:: :: ++auri:de-purl:html
++ auri :: 2396 URL
%+ cook
|= a/purl
?.(?=(hoke r.p.a) a a(p.p &))
;~ plug
;~(plug htts thor)
;~(plug ;~(pose apat (easy *pork)) yque)

View File

@ -1,11 +0,0 @@
:: All tree css
::
:::: /hoon/codemirror-fonts-bootstrap-tree/pack/web
::
/^ (list @t)
/. /:/===/web/lib/css/codemirror:/css/
/:/===/web/lib/css/fonts:/css/
/:/===/web/lib/css/bootstrap:/css/
/:/===/web/tree/main:/css/
==
(rap 3 -.-)

View File

@ -1,9 +0,0 @@
:: All tree js
::
:::: /hoon/tree-urb/pack/web
::
/^ (list @t)
/. /:/===/web/tree/main:/js/
/:/===/web/lib/js/urb:/js/
==
(rap 3 -.-)

View File

@ -48,7 +48,7 @@
{@ {$id *} *} g.a(a t.a.g.a)
{$$ {$$ *} ~}
=< g.a(v.i.a (tufa (turn (tuba v.i.a.g.a) .)))
|=(b/@c `@`?+(b b ~-~201c. '"', ~-~201d. '"'))
|=(b/@c `@`?+(b b %~-~201c. '"', %~-~201d. '"'))
==
--
::