everything ready to be cleaned.

This commit is contained in:
Galen Wolfe-Pauly 2016-01-29 18:29:57 -08:00
commit 5e91f7edaf
96 changed files with 814 additions and 1343 deletions

View File

@ -43,7 +43,7 @@ $: cred=(unit ,[app-secret=@t client-id=@t])
|_ [hid=bowl vat=axle]
:: ++ prep ~&(%bit-prep-wipe ,_`.)
++ return [*(list move) .]
++ redirect-uri [hostname `/~~/home/pub/bit/fab ~]
++ redirect-uri [hostname `/~~/bit/fab ~]
++ hostname ^- hart
?+ (clan our.hid) !!
%czar [| ?+(our.hid `8.443 %~fyr `8.444) `/localhost]

View File

@ -66,7 +66,7 @@
'code'^code
:- 'client_id'
'd8f46b95af38c1ab3d78ad34c2157a6959c23eb0eb5d8e393f650f08e6a75c6f'
'redirect_uri'^'http://localhost:8443/home/pub/cloud/fab'
'redirect_uri'^'http://localhost:8443/cloud/fab'
==
::
++ parse-iso8601

View File

@ -729,7 +729,7 @@
=- ?~(too - [%cast u.too -])
:+ %ride gen
:- [%$ dy-twig-head]
[%plan he-beam / zuse arc lib ~ ~]
[%plan he-beam blob/** zuse arc lib ~ ~]
::
++ dy-step :: advance project
|= nex=@ud

View File

@ -107,6 +107,7 @@
++ poke-helm-reload (wrap poke-reload):from-helm
++ poke-helm-reload-desk (wrap poke-reload-desk):from-helm
++ poke-helm-reset (wrap poke-reset):from-helm
++ poke-helm-serve (wrap poke-serve):from-helm
++ poke-helm-send-hi (wrap poke-send-hi):from-helm
++ poke-helm-send-ask (wrap poke-send-ask):from-helm
++ poke-helm-verb (wrap poke-verb):from-helm
@ -127,6 +128,8 @@
++ poke-kiln-unmount (wrap poke-unmount):from-kiln
++ poke-kiln-unsync (wrap poke-unsync):from-kiln
++ poke-write-paste (wrap poke-paste):from-write
++ poke-write-tree (wrap poke-tree):from-write
++ poke-write-wipe (wrap poke-wipe):from-write
++ poke-will (wrap poke-will):from-helm
++ quit-drum-phat (wrap quit-phat):from-drum
++ reap-drum-phat (wrap reap-phat):from-drum

View File

@ -566,7 +566,7 @@
%+ skid `(list (pair path miso))`ins
|= [pax=path mis=miso]
?> ?=(%ins -.mis)
?& ?=([?(%hoon %hook) *] (flop pax))
?& ?=([%hoon *] (flop pax))
?=(%mime p.p.mis)
==
=. +>.$
@ -1367,8 +1367,6 @@
?: (~(has by hat) pax) !! ::
%+ ~(put by bar) pax
%- make-direct
?: &(?=(%mime -.p.mys) =([%hook ~] (slag (dec (lent pax)) pax)))
`page`[%hook +.+.q.q.p.mys]
?: &(?=(%mime -.p.mys) =([%hoon ~] (slag (dec (lent pax)) pax)))
`page`[%hoon +.+.q.q.p.mys]
[p q.q]:p.mys
@ -1611,7 +1609,7 @@
?~ lob
[~ ~]
=+ mar=(lobe-to-mark u.lob)
?. ?=(?(%hoon %hook) mar)
?. ?=(%hoon mar)
[~ ~ %| u.lob]
:^ ~ ~ %&
:+ mar [%atom %t]
@ -2611,10 +2609,8 @@
|= [a=path b=miso]
?& ?=(%ins -.b)
?=(%mime p.p.b)
=+ (slag (dec (lent a)) a)
?| =([%hook ~] -)
=([%hoon ~] -)
== ==
?=([%hoon ~] (slag (dec (lent a)) a))
==
:~ [hen %pass /one %c %info p.bem q.bem %& one]
[hen %pass /two %c %info p.bem q.bem %& two]
==

View File

@ -66,9 +66,10 @@
-- ::
|% :: models
++ bolo :: eyre state
$: %3 :: version
$: %4 :: version
gub=@t :: random identity
hov=(unit ship) :: master for remote
top=beam :: ford serve prefix
ged=duct :: client interface
ded=(set duct) :: killed requests
lyv=(map duct live) :: living requests
@ -141,7 +142,7 @@
$| ~
$% [%$ p=httr] :: direct response
[%red ~] :: parent redirect
[%boil p=whir q=term r=beam] :: ford request
[%bake p=whir q=mark r=coin s=beam] :: ford request
::
[%js p=@t] :: script
[%json p=json] :: data
@ -159,13 +160,11 @@
::
++ fcgi :: credential caboose
|= [quy=quay ced=cred] ^- coin
:* %many
[%$ %ta ~]
[%blob ced]
|- ^- (list coin)
?~ quy ~
[[%$ %t p.i.quy] [%$ %t q.i.quy] $(quy t.quy)]
==
:+ %many
[%blob ced]
|- ^- (list coin)
?~ quy [%$ %n ~]~
[[%$ %t p.i.quy] [%$ %t q.i.quy] $(quy t.quy)]
::
++ gsig |=([a=dock b=path] [(scot %p p.a) q.a b])
++ session-from-cookies
@ -232,7 +231,7 @@
|= tan=tang
;html
;head
;link(rel "stylesheet", href "/home/lib/base.css"); :: XX desk
;link(rel "stylesheet", href "/lib/base.css");
;title: server error
==
;body:div#c.err:pre:code:"{(wush 80 tan)}"
@ -541,8 +540,8 @@
;title:"{(trip a)}"
;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/".
"libs/jquery/2.1.1/jquery.min.js");
;link(rel "stylesheet", href "/home/lib/css/fonts.css");
;link(rel "stylesheet", href "/home/lib/css/bootstrap.css");
;link(rel "stylesheet", href "/lib/css/fonts.css");
;link(rel "stylesheet", href "/lib/css/bootstrap.css");
==
;body:div#c:"*{b}"
==
@ -573,13 +572,19 @@
|= kyz=kiss
^+ +>
=. our ?~(hov our u.hov) :: XX
=. p.top our :: XX necessary?
?- -.kyz
%born +>.$(ged hen) :: register external
%serv
=< ~&([%serving (tope top)] .)
?^(p.kyz +>.$(top p.kyz) +>.$(q.top p.kyz))
::
%crud
+>.$(mow [[hen %slip %d %flog kyz] mow])
::
%init :: register ownership
+>.$(hov ?~(hov [~ p.kyz] [~ (min u.hov p.kyz)]))
=. our ?~(hov p.kyz (min u.hov p.kyz))
+>.$(hov [~ our], top [[our %home ud/0] /web])
::
%this :: inbound request
%- emule |. ^+ ..apex
@ -769,12 +774,14 @@
$|(~ [?(%on %ay %ow) *]) ~|(e/ford/lost/tee !!)
[%of @ ~] ~|(e/ford/lost/tee !!)
[%si ~] (give-sigh q.sih)
::
[%hi ^]
?: ?=(%| -.q.sih)
(give-sigh q.sih) :: XX crash?
=* cay p.q.sih
?> ?=(%hiss p.cay)
(pass-note tee [%e %meta :(slop !>(%them) !>(~) q.cay)])
::
[%he *] :: XX hack
=. ..axon $(tee p.tee)
%_ ..axon
@ -808,6 +815,9 @@
?. ?=(%& -.q.sih)
(fail 404 p.sih p.q.sih)
=* cay p.q.sih
?: ?=(%red-quri p.cay)
=+ url=((hard quri) q.q.cay)
(give-thou 307 [location/(crip (apex:earn url))]~ ~)
?. ?=(%mime p.cay)
=+ bek=-:(need (tome p.tee))
=+ bik=?+(r.bek bek [%ud %0] bek(r da/now))
@ -828,7 +838,6 @@
==
==
::
++ root-beak `beak`[our %home da/now] :: XX
++ emule
|= a=_|?(..emule) ^+ ..emule
=+ mul=(mule a)
@ -854,7 +863,7 @@
::
++ back :: %ford bounce
|= [tea=whir mar=mark cay=cage]
(pass-note tea (ford-req root-beak [%cast mar `cay]))
(pass-note tea (ford-req -.top [%cast mar `cay]))
::
++ del-deps
|= [a=@uvH b=(each duct ixor)] ^+ +>.$
@ -952,14 +961,10 @@
++ nice-json (teba ^nice-json)
++ pass-note (teba ^pass-note)
::
++ ford-boil
|= [wir=whir ext=term bem=beam]
=+ yac=for-client
=. him.yac ?.(aut anon him.yac)
=: r.bem ?+(r.bem r.bem [%ud %0] da/now)
s.bem [%web ~(rent co (fcgi quy fcgi-cred.yac)) s.bem]
==
(execute wir -.bem [%boil ext bem ~])
++ fcgi-cred
^- cred
?: aut fcgi-cred:for-client
%*(fcgi-cred for-client him anon)
::
::
++ apex
@ -980,7 +985,11 @@
%json (give-json 200 cug p.pez)
%html (give-html 200 cug p.pez)
%htme (give-html 401 cug p.pez)
%boil (ford-boil +.pez)
%bake
=+ req=[%bake mar=q.pez [r s]:pez]
=+ red=req(mar %red-quri)
(execute p.pez -.s.pez `silk`[%alts ~[red req]])
::
%red
=+ url=(earn hat pok(p [~ %html]) quy)
?+ p.pok ~|(bad-redirect/[p.pok url] !!)
@ -1019,6 +1028,8 @@
^- (each perk httr)
|^ =+ hit=as-magic-filename
?^ hit [%| u.hit]
?: is-spur
[%& %spur (flop q.pok)]
=+ bem=as-beam
?^ bem [%& %beam u.bem]
?. check-oryx
@ -1044,14 +1055,16 @@
==
==
::
++ as-beam
++ is-spur |(?~(q.pok & ((sane %tas) i.q.pok)))
++ as-beam
^- (unit beam)
|-
?~ q.pok
$(q.pok /index)
?. ((sane %tas) i.q.pok)
(tome q.pok)
`[[our i.q.pok ud/0] (flop t.q.pok)]
?~ q.pok ~
=+ ^- (unit ,[@ dez=desk rel=?]) :: /=desk/, /=desk=/
(rush i.q.pok ;~(plug tis sym ;~(pose (cold | tis) (easy &))))
?~ - (tome q.pok) :: /~ship/desk/case/...
:+ ~ [our dez.u r.top]
?. rel.u (flop t.q.pok)
(weld (flop t.q.pok) s.top) :: /=desk/... as hoon /=desk%/...
::
++ as-aux-request :: /~/... req parser
^- (unit perk)
@ -1165,13 +1178,15 @@
%away [%& %html logout-page:xml]
?(%beam %spur)
=+ ext=(fall p.pok %urb)
=+ bem=?-(-.hem %beam p.hem, %spur [root-beak p.hem])
=+ wir=`whir`[%ha (tope -.bem ~)]
=. wir ?+(mef !! %get wir, %head [%he wir])
=+ bem=?-(-.hem %beam p.hem, %spur [-.top (weld p.hem s.top)])
~| bad-beam/q.bem
?< =([~ 0] (sky %cw (tope bem(+ ~, r [%da now]))))
=+ [wir ext bem]
?.(aut [%& %boil -] [%| (ford-boil -)]) :: XX properly
=+ wir=`whir`[%ha (tope -.bem ~)]
=. wir ?+(mef !! %get wir, %head [%he wir])
=. r.bem ?+(r.bem r.bem [%ud %0] da/now)
=+ arg=(fcgi quy fcgi-cred)
=+ [%& %bake wir ext arg bem]
?.(aut - [%| (resolve -)]) :: XX properly
::
%bugs
?- p.hem
@ -1196,7 +1211,7 @@
::
%poll
?: ?=([~ %js] p.pok) :: XX treat non-json cases?
=+ polling-url=['/' (apex:earn %| pok(u.p %json) quy)]
=+ polling-url=(apex:earn %| pok(u.p %json) quy)
[%& %js (add-json (joba %wurl (jape polling-url)) poll:js)]
=. lyv (~(put by lyv) hen %wasp p.hem)
|-
@ -1231,7 +1246,7 @@
?~ p.pez pez
?+ -.p.pez ~&(bad-inject/p.pez !!)
%red pez
%boil
%bake
=. ya abet.yac
[%| (resolve ~ p.pez(p [%at ses.yac p.p.pez]))]
::
@ -1607,19 +1622,21 @@
~
::
++ load :: take previous state
=+ bolo-3=,_[%3 +(|2 |3.+)]:*bolo :: no top
=+ even-2=?(even [%mean p=[dock path] *]) :: old %quit
=+ ^= stem-2 :: no die, sus
,_=+(*stem -(|3 |5.-, q.eve *(map ,@u even-2)))
=+ bolo-2=,_[%2 %*(+ *bolo wix *(map ixor stem-2))]
=+ bolo-2=,_[%2 %*(+ *bolo-3 wix *(map ixor stem-2))]
=+ bolo-1=,_[%1 +(|4 |5.+)]:*bolo-2 :: no lyv
|= old=?(bolo bolo-1 bolo-2)
|= old=?(bolo bolo-1 bolo-2 bolo-3)
^+ ..^$
?- -.old
%3 ..^$(+>- old)
%4 ..^$(+>- old)
%3 $(-.old %4, |2.+.old [[[(need hov.old) %home ud/0] /web] |2.+.old])
%2 =+ evn=|=(a=even-2 ?+(-.a a %mean [%quit p.a]))
=+ stm=|=(a=stem-2 a(|3 [now ~ |3.a(q.eve (~(run by q.eve.a) evn))]))
$(old [%3 +.old(wix (~(run by wix.old) stm))])
%1 $(old [%2 +(|4 [~ |4.+])]:old)
$(-.old %3, wix.old (~(run by wix.old) stm))
%1 $(-.old %2, |4.+.old [~ |4.+.old])
==
::
++ scry
@ -1646,3 +1663,4 @@
q.hin
[mos ..^$]
--

View File

@ -22,7 +22,7 @@
-- ::
|% :: structures
++ axle :: all %ford state
$: %1 :: version for update
$: %2 :: version for update
pol=(map ship baby) ::
== ::
++ baby :: state by ship
@ -56,8 +56,7 @@
== ::
++ calx :: concrete cache line
$% [%hood p=calm q=(pair beam cage) r=hood] :: compile
[%bake p=calm q=(trel mark beam heel) r=(unit vase)]:: load
[%lilt p=calm q=beak r=(jug mark mark)] :: translation graph
[%bake p=calm q=(trel mark coin beam) r=(unit vase)] :: load
[%slit p=calm q=[p=type q=type] r=type] :: slam type
[%slim p=calm q=[p=type q=twig] r=(pair type nock)]:: mint
[%slap p=calm q=[p=vase q=twig] r=vase] :: compute
@ -83,7 +82,6 @@
?+ sem !!
%hood ?>(?=(%hood -.cax) r.cax)
%bake ?>(?=(%bake -.cax) r.cax)
%lilt ?>(?=(%lilt -.cax) r.cax)
%slap ?>(?=(%slap -.cax) r.cax)
%slam ?>(?=(%slam -.cax) r.cax)
%slim ?>(?=(%slim -.cax) r.cax)
@ -106,7 +104,7 @@
++ chub :: cache merge
|= [a=cafe b=cafe] ::
^- cafe ::
[(grom p.a p.b) (grum q.a q.b)] ::
[(~(uni in p.a) p.b) (~(uni by q.a) q.b)] ::
:: ::
++ faun (flux |=(a=vase [%& %noun a])) :: vase to gage
++ feel (flux |=(a=cage q.a)) :: cage to vase
@ -136,15 +134,6 @@
++ flue |=(a=cafe (fine a ~)) :: cafe to empty
++ flux |* a=_,* :: bolt lift (fmap)
|*([b=cafe c=_+<.a] (fine b (a c))) ::
++ grom :: merge sets
|* [one=(set) two=(set)]
^+ one
(~(gas in one) (~(tap in two) ~)) :: XX ugh
::
++ grum :: merge maps
|* [one=(map) two=(map)]
^+ one
(~(gas by one) (~(tap by two) ~)) :: XX ugh
::
++ lark :: filter arch names
|= [wox=$+(span (unit ,@)) arc=arch]
@ -288,21 +277,7 @@
== ==
::
++ zo
~% %ford-z
..is
==
%fade fade
%fair fair
%fang fang
%lime lime
%lima lima
%link link
%lion lion
%lily lily
%lope lope
%make make
%meow meow
==
~% %ford-z ..is ~
|_ [num=@ud task]
++ abet %_(..zo q.tad.bay (~(put by q.tad.bay) num +<+))
++ amok
@ -373,7 +348,7 @@
:- p=p.nuf
^= q
?- -.q.nuf
%0 [%0 p=(grom p.q.hoc p.q.nuf) q=[q.q.hoc q.q.nuf]]
%0 [%0 p=(~(uni in p.q.hoc) p.q.nuf) q=[q.q.hoc q.q.nuf]]
%1 q.nuf
%2 q.nuf
==
@ -382,7 +357,7 @@
^= q
?- -.q.nuf
%0 q.hoc
%1 [%1 p=(grom p.q.nuf p.q.hoc)]
%1 [%1 p=(~(uni in p.q.nuf) p.q.hoc)]
%2 q.nuf
==
%2 hoc
@ -403,23 +378,23 @@
^= q
?- -.q.nuf
%1 q.nuf
%2 [%2 p=(grom `_p.q.nuf`p.q.hoc p.q.nuf) q=q.q.nuf]
%0 [%0 p=(grom `_p.q.nuf`p.q.hoc p.q.nuf) q=q.q.nuf]
%2 [%2 p=(~(uni in `_p.q.nuf`p.q.hoc) p.q.nuf) q=q.q.nuf]
%0 [%0 p=(~(uni in `_p.q.nuf`p.q.hoc) p.q.nuf) q=q.q.nuf]
== ==
::
++ coop :: bolt alter
|* [hoc=(bolt) fun=(burg)]
|* [hoc=(bolt) fun=$+(cafe (bolt))]
?- -.q.hoc
%1 hoc
%0 hoc
%2 =+ nuf=(fun(+<- p.hoc))
%2 =+ nuf=(fun p.hoc)
:- p=p.nuf
^= q
?- -.q.nuf
%1 q.nuf
%0 [%0 p=(grom `_p.q.nuf`p.q.hoc p.q.nuf) q=q.q.nuf]
%0 [%0 p=(~(uni in `_p.q.nuf`p.q.hoc) p.q.nuf) q=q.q.nuf]
%2 =. q.q.nuf (welp q.q.nuf q.q.hoc)
[%2 p=(grom `_p.q.nuf`p.q.hoc p.q.nuf) q=q.q.nuf]
[%2 p=(~(uni in `_p.q.nuf`p.q.hoc) p.q.nuf) q=q.q.nuf]
== ==
::
++ coup :: toon to bolt
@ -510,19 +485,6 @@
++ dash :: process cache
|= cof=cafe
^+ +>
~? |
:+ %dash (lent (skim (~(tap in p.cof)) |=(a=calx ?=(%bake -.a))))
=. q.cof (~(dif by q.cof) jav.bay)
=+ num=10
%. |= a=(list calx)
=+ len=(lent a)
=- [len (scag num (turn a f)) ?:((gth len num) %etc ~)]
=+ dewe=|=(beam +<(s ?+(s s [@ %web *] t.t.s)))
f=|=(b=calx [-.b ?+(-.b ~ %bake [p.q.b (tope (dewe q.q.b))])])
%~ run by
=< `(jar term calx)`(~(rep by q.cof) .)
|= [[* a=calx] b=(jar term calx)]
(~(add ja b) -.a a)
%_(+> jav.bay q.cof)
::
++ diff :: diff
@ -609,7 +571,7 @@
|= [cof=cafe for=mark bem=beam]
^- (bolt hood)
%+ cool |.(leaf/"ford: fade {<[(tope bem)]>}")
%+ cope (cope (make cof [%bake for bem ~]) furl)
%+ cope (liar cof %*(. bem s [for s.bem]))
|= [cof=cafe cay=cage]
%+ (clef %hood) (fine cof bem(r [%ud 0]) cay)
^- (burg (pair beam cage) hood)
@ -633,7 +595,7 @@
?~ opt (flue cof)
|- ^- (bolt (unit beam))
=. i.s.bem (tack opt)
%+ cope (lima cof %hoon bem ~)
%+ cope (lima cof %hoon many/~ bem)
|= [cof=cafe vax=(unit vase)] ^- (bolt (unit beam))
?^ vax (fine cof `bem)
?~ t.opt (flue cof)
@ -708,14 +670,13 @@
%+ knee *^horn |. ~+
;~ pfix fas
;~ pose
(stag %toy ;~(sfix sym fas))
(stag %ape ;~(pfix sig ape:read))
(stag %arg ;~(pfix buc ape:read))
(stag %day ;~(pfix bar day:read))
(stag %alt ;~(pfix bar alt:read))
(stag %dub ;~(pfix tis dub:read))
(stag %fan ;~(pfix dot fan:read))
(stag %for ;~(pfix com for:read))
(stag %hel ;~(pfix cen hel:read))
(stag %hel ;~(pfix cen day:read))
(stag %hub ;~(pfix pat day:read))
(stag %man ;~(pfix tar man:read))
(stag %nap ;~(pfix cab day:read))
@ -723,6 +684,7 @@
(stag %saw ;~(pfix sem saw:read))
(stag %see ;~(pfix col see:read))
(stag %sic ;~(pfix ket sic:read))
(stag %toy ;~(sfix toy:read fas))
==
==
::
@ -736,6 +698,10 @@
%+ rail
(ifix [sel ser] (stag %cltr (most ace wide:vez)))
;~(pfix gap tall:vez)
::
++ alt
%+ rail (ifix [pel per] (most ace day))
;~(sfix (star day) gap duz)
::
++ day
%+ rail
@ -744,48 +710,41 @@
::
++ dub
%+ rail
;~(plug sym ;~(pfix tis apex(tol |)))
;~(pfix gap ;~(plug sym ;~(pfix gap apex)))
;~(plug sym ;~(pfix tis day))
;~(pfix gap ;~(plug sym day))
::
++ fan
%+ rail fail
;~(sfix (star ;~(pfix gap apex)) ;~(plug gap duz))
;~(sfix (star day) gap duz)
::
++ for
%+ rail
;~(plug (ifix [sel ser] hath) apex(tol |))
;~(pfix gap ;~(plug hath ;~(pfix gap apex)))
::
++ hel
%+ rail
;~(plug ;~(pose ;~(sfix dem:ag cen) (easy 0)) apex(tol |))
;~(pfix gap ;~(plug ;~(pose ;~(sfix dem:ag gap) (easy 0)) apex))
%+ rail fail
=- ;~(sfix (star -) gap duz)
;~(pfix gap fas ;~(plug hath day))
::
++ man
%+ rail fail
%- sear
:_ ;~(sfix (star ;~(pfix gap apex)) ;~(plug gap duz))
|= fan=(list ^horn)
=| naf=(list (pair term ^horn))
|- ^- (unit (map term ^horn))
?~ fan (some (~(gas by *(map term ^horn)) naf))
?. ?=(%dub -.i.fan) ~
$(fan t.fan, naf [[p.i.fan q.i.fan] naf])
%+ cook ~(gas by *(map term ^horn))
=< ;~(sfix (star (sear . day)) gap duz)
|= a=^horn ^- (unit ,[term ^horn])
?+(-.a ~ %dub `[p.a q.a])
::
++ saw
%+ rail
;~(plug ;~(sfix wide:vez sem) apex(tol |))
;~(pfix gap ;~(plug tall:vez ;~(pfix gap apex)))
;~(plug ;~(sfix wide:vez sem) day)
;~(pfix gap ;~(plug tall:vez day))
::
++ see
%+ rail
;~(plug ;~(sfix have col) apex(tol |))
;~(pfix gap ;~(plug have ;~(pfix gap apex)))
;~(plug ;~(sfix have col) day)
;~(pfix gap ;~(plug have day))
::
++ sic
%+ rail
;~(plug ;~(sfix toil:vez ket) apex(tol |))
;~(pfix gap ;~(plug howl:vez ;~(pfix gap apex)))
;~(plug ;~(sfix toil:vez ket) day)
;~(pfix gap ;~(plug howl:vez day))
::
++ toy ;~(plug ;~(pose (cold | zap) (easy &)) sym)
--
::
--
@ -917,103 +876,44 @@
$(yom t.yom, axe (peg axe 3))
::
++ lads :: possible children
|= [cof=cafe bem=beam arg=heel]
|= [cof=cafe bem=beam]
^- (bolt (map span ,~))
=| [res=(map span ,~) new=(qeu beam)]
=+ all=`(set beam)`[bem `~]
|^ %+ with (cope ?^(arg (flue cof) kids) return)
|=(_. (with (cope marks look) next))
::
++ done .
++ with
|* [a=(bolt ,_done) b=$+(_done (bolt))] ^+ *b
(cope a |=([cof=cafe c=_done] (b c(cof cof))))
::
++ return
%- flux
|=(a=(map span ,~) done(res (~(uni by res) a)))
::
++ next
|= _. => +<
^- (bolt (map span ,~))
?^ s.bem
$(s.bem t.s.bem, arg [i.s.bem arg])
?: =(~ new) (fine cof res)
=^ bem new ~(get to new)
~| next-beam/(tope bem)
?< (gth (lent +.bem) 10)
$(bem bem, arg ~)
::
++ kids
%^ lash cof bem
|= [cof=cafe dir=span]
%+ cope (lend cof bem(s [dir s.bem]))
(flux |=(a=arch ?~(dir.a ~ (some ~))))
::
++ marks
=< (cope (laze cof bem) (flux .))
|= a=(map mark ,?) ^- (list mark)
(turn :_(head (skip :_(tail (~(tap by a)))))) :: | = %hook
::
++ look
|= [cof=cafe hok=(list mark)] ^- (bolt ,_done)
?~ hok (fine cof done)
%+ with $(hok t.hok)
|= _done ^- (bolt ,_done)
=+ bim=bem(s [i.hok s.bem])
=+ hid=(fade cof %hook bim)
?: ?=(%2 -.q.hid)
(fine cof done)
=< (cope hid (flux .))
|= hyd=hood
=^ neu all
(chop:(meow bim (flop arg)) all %fan fan.hyd)
done(new (~(gas to new) (~(tap in `(set beam)`neu))))
--
%^ lash cof bem
|= [cof=cafe dir=span]
%+ cope (lend cof bem(s [dir s.bem]))
(flux |=(a=arch ?~(dir.a ~ (some ~))))
::
++ laze :: find real or virtual
|= [cof=cafe bem=beam]
%^ lash cof bem
|= [cof=cafe for=mark]
^- (bolt (unit ,?))
^- (bolt (unit ,~))
?. ((sane %tas) for) (flue cof)
=. s.bem [for s.bem]
%+ cope (lend cof bem)
|= [cof=cafe arc=arch]
?^ fil.arc (fine cof (some &))
?. (~(has by dir.arc) %hook)
(flue cof)
%+ cope (lend cof bem(s [%hook s.bem]))
|= [cof=cafe arc=arch]
?~ fil.arc
(flue cof)
(fine cof (some |))
(fine cof (bind fil.arc ,~))
::
++ lace :: load real or virtual
|= [cof=cafe for=mark bem=beam arg=heel lit=?]
|= [cof=cafe for=mark arg=coin bem=beam]
^- (bolt vase)
%+ cool |.(leaf/"ford: load {<for>} {<(tope bem)>}")
=. s.bem [for s.bem]
?: lit
%+ cool |.(leaf/"ford: load {<for>} {<(tope bem)>}")
%+ cope (liar cof bem)
|= [cof=cafe cay=cage]
?. =(for p.cay)
(flaw cof leaf/"unexpected mark {<p.cay>}" ~)
((lake for) cof q.cay)
%+ cool |.(leaf/"ford: hook {<for>} {<(tope bem)>}")
%+ cope (fade cof %hook bem)
|= [cof=cafe hyd=hood]
(cope (abut:(meow bem arg) cof hyd) (lake for))
%+ cope (liar cof bem)
|= [cof=cafe cay=cage]
?. =(for p.cay)
(flaw cof leaf/"unexpected mark {<p.cay>}" ~)
((lake for) cof q.cay)
::
++ lake :: check/coerce
|= for=mark
|= [cof=cafe sam=vase]
^- (bolt vase)
%+ cool |.(leaf/"ford: check {<[for bek `@p`(mug q.sam)]>}")
?: ?=(?(%hoon %hook) for)
?: ?=(%hoon for)
=+ mas=((soft ,@t) q.sam)
?~ mas
(flaw cof [leaf/"ford: bad hoon or hook: {<[for bek]>}"]~)
(flaw cof [leaf/"ford: bad hoon: {<[for bek]>}"]~)
(fine cof [%atom %t] u.mas)
%+ cope (fang cof for)
|= [cof=cafe tux=vase]
@ -1065,7 +965,7 @@
|= [cof=cafe bem=beam] ^- (bolt vase)
%+ cope (fame cof bem)
|= [cof=cafe bem=beam]
(cope (fade cof %hoon bem) abut:(meow bem ~))
(cope (fade cof %hoon bem) abut:(meow bem many/~))
::
++ lend :: load arch
|= [cof=cafe bem=beam]
@ -1088,107 +988,53 @@
(flaw cof leaf/"file not found" (smyt (tope bem)) ~)
(fine cof u.u.von)
::
++ lily :: translation targets
++ lily
|= [cof=cafe for=mark] ^- (bolt (set ,@tas))
%+ cope (lilt cof)
|= [cof=cafe lil=(jug mark mark)]
(fine cof (~(get ju lil) for))
::
++ lilt
|= cof=cafe ^- (bolt (jug mark mark))
%+ (clef %lilt) (fine cof bek)
^- (burg beak (jug mark mark))
|= [cof=cafe bek=beak]
%+ cope (lyle(bek bek) cof)
%+ cope (coop (fang cof for) |=(cof=cafe (fine cof %void ~)))
%- flux
|= mav=(map mark vase)
=+ all=(~(tap by mav))
|- ^- (jug mark mark)
?~ all ~
%- ~(gas ju $(all t.all))
=+ `[for=mark vax=vase]`i.all
~| weg=(jam 3 p.vax)
%+ weld
^- (list ,[mark mark])
?. (slob %grab p.vax) ~
=+ gab=(slap vax [%cnzy %grab])
:: =+ opt=(skip (sloe p.gap) |=(fro=mark =(fro %noun)))
(turn (sloe p.gab) |=(fro=mark [fro for]))
?. (slob %grow p.vax) ~
=+ gow=(slap vax [%cnzy %grow])
(turn (sloe p.gow) |=(too=mark [for too]))
::
++ lyle :: all mark doors
|= cof=cafe ^- (bolt (map mark vase))
=| [sup=path res=(map mark vase)]
|^ `(bolt (map mark vase))`wide
++ here [bek (welp sup /mar)]
++ wide
%+ cope (lend cof here)
|= [cof=cafe arc=arch]
=+ all=(skim (turn (~(tap by dir.arc)) head) (sane %tas))
=. all (sort all gth) :: short-deepest
|- ^- (bolt (map mark vase))
?~ all (fine cof res)
%+ cope $(all t.all)
|= [cof=cafe res=(map mark vase)]
=. ^res res
=- (cope - (tall i.all))
?. (~(has by dir.arc) %hoon) (flue cof)
node(cof cof)
::
++ tall
|= for=term
|= [cof=cafe new=(unit ,[mark vase])]
wide(cof cof, sup [for sup], res (~(gas by res) (drop new)))
::
++ node
^- (bolt (unit ,[mark vase]))
=+ pax=(flop sup)
?~ pax (flue cof)
=+ for=(tack pax)
?: (~(has by res) for) (flue cof)
=+ raf=(lear cof here)
?. ?=(%2 -.q.raf)
(cope raf (flux |=(vax=vase (some [for vax]))))
=- ((slog (flop `tang`-)) (flue cof))
=+ (lent t.pax)
?: ?~ - | :: error if level above built
(~(has by res) (tack i.pax (scag (dec -) t.pax)))
~
:_(q.q.raf leaf/"! {<`mark`for>} build failed, ignoring.")
--
|= vax=vase ^- (set mark)
%- =- ~(gas in `(set mark)`-)
?. (slob %grow p.vax) ~
(sa (sloe p:(slap vax [%cnzy %grow])))
?. (slob %garb p.vax) ~
=+ (slap vax [%cnzy %garb])
(fall ((soft (list mark)) q) ~)
::
++ lima :: load at depth
|= [cof=cafe for=mark bem=beam arg=heel]
%+ (clef %bake) [p=cof q=[%0 p=[bem `~] q=[for bem arg]]]
|= [cof=cafe for=mark bem=beam arg=heel]
|= [cof=cafe for=mark arg=coin bem=beam]
%+ (clef %bake) [p=cof q=[%0 p=[bem `~] q=[for arg bem]]]
|= [cof=cafe for=mark arg=coin bem=beam]
^- (bolt (unit vase))
%+ cope (laze cof bem)
|= [cof=cafe mal=(map mark ,?)]
=+ lit=(~(get by mal) for)
?^ lit
(cope (lace cof for bem arg u.lit) (flux some))
|= [cof=cafe mal=(map mark ,~)]
?: (~(has by mal) for)
(cope (lace cof for arg bem) (flux some))
=+ opt=(sa (turn (~(tap by mal)) head)) :: XX asymptotics
%+ cope (lion cof for opt)
|= [cof=cafe wuy=(list ,@tas)]
?~ wuy (flue cof)
%+ cope
(lace cof i.wuy bem arg (~(got by mal) i.wuy))
(lace cof i.wuy arg bem)
|= [cof=cafe hoc=vase]
(cope (lope cof i.wuy t.wuy hoc) (flux some))
::
++ lime :: load beam
|= [cof=cafe for=mark bem=beam arg=heel]
=+ [mob=bem mer=(flop arg)]
|- ^- (bolt vase)
%+ cope (lima cof for mob (flop mer))
|= [cof=cafe for=mark arg=coin bem=beam]
^- (bolt vase)
%+ cope (lima cof for arg bem)
|= [cof=cafe vux=(unit vase)]
?^ vux (fine cof u.vux)
?~ s.mob
%+ flaw cof
~[leaf/"build {<for>}" leaf/"no usable ancestors" (smyt (tope bem))]
^$(s.mob t.s.mob, mer [i.s.mob mer])
(limp cof for arg bem)
::
++ limp :: render
|= [cof=cafe for=mark arg=coin bem=beam]
%+ cope (fame cof -.bem /[for]/ren)
|= [cof=cafe bom=beam]
(cope (fade cof %hoon bom) abut:(meow bem arg))
:: |= [cof=cafe vax=vase]
:: %+ flaw cof
:: ~[leaf/"build {<for>}" leaf/"no usable ancestors" (smyt (tope bem))]
::
++ link :: translate
|= [cof=cafe too=mark for=mark vax=vase]
@ -1219,12 +1065,22 @@
|= [cof=cafe too=mark fro=(set mark)]
:: ~& lion/[too=too fro=(sa fro)]
^- (bolt (list mark))
=- %+ coop (gro cof too `~) :: XX better grab layer
|= cof=cafe
%+ cope (fang cof too)
|= [cof=cafe vax=vase] ^- (bolt (list mark))
?. (slob %grab p.vax) (flue cof)
%+ cope
(gro cof (sa (sloe p:(slap vax [%cnzy %grab]))))
(flux |=(a=path (welp a /[too])))
^= gro
|= [cof=cafe tag=(set mark)]
=| $: war=(map mark (list mark))
pax=(list mark) won=[p=mark q=(qeu mark)]
==
%. [cof fro]
|= [cof=cafe fro=(set mark)] ^- (bolt (list mark))
?: =(too p.won)
?: (~(has in tag) p.won)
(fine cof (flop pax))
=+ for=(skip (~(tap by fro)) ~(has by war))
=. for (sort for aor) :: XX useful?
@ -1269,7 +1125,7 @@
:: =+ ^= pre
:: ?+ -.kas -.kas
:: ^ %cell
:: %boil [-.kas p.kas (tope q.kas)]
:: :: %boil [-.kas p.kas (tope q.kas)]
:: %bake [-.kas p.kas (tope q.kas)]
:: %core [-.kas (tope p.kas)]
:: ==
@ -1291,27 +1147,33 @@
==
::
%$ (fine cof %& p.kas)
%bake
:: ~& > [p.kas (tope q.kas)]
:: %+ cool |.(leaf/"ford: bake {<p.kas>} {<(tope q.kas)>}")
%+ cope (lima cof p.kas q.kas r.kas)
|= [cof=cafe vux=(unit vase)]
?~ vux
(flaw cof leaf/"file not found" (smyt (tope q.kas)) ~)
(fine cof [%& p.kas u.vux])
:: %bake
:: :: ~& > [p.kas (tope q.kas)]
:: :: %+ cool |.(leaf/"ford: bake {<p.kas>} {<(tope q.kas)>}")
:: %+ cope (lima cof p.kas q.kas r.kas s.kas)
:: |= [cof=cafe vux=(unit vase)]
:: ?~ vux
:: (flaw cof leaf/"file not found" (smyt (tope r.kas)) ~)
:: (fine cof [%& p.kas u.vux])
:: ::
%alts
%. cof
|= cof=cafe ^- (bolt gage)
?~ p.kas (flaw cof leaf/"ford: out of options" ~)
(coop ^$(cof cof, kas i.p.kas) ..$(p.kas t.p.kas))
::
%boil
%bake
^- (bolt gage)
%+ cool |.(leaf/"ford: boil {<p.kas>} {<(tope q.kas)>} {<r.kas>}")
%+ cope (lamp cof q.kas)
%+ cool |.(leaf/"ford: bake {<p.kas>} {<(tope r.kas)>} {~(rend co q.kas)}")
%+ cope (lamp cof r.kas)
|= [cof=cafe bem=beam]
%+ cope (lime cof p.kas bem r.kas)
%+ cope (lime cof p.kas q.kas bem)
|= [cof=cafe vax=vase]
(fine cof `gage`[%& p.kas vax])
::
%bunt
%+ cool |.(leaf/"ford: bunt {<p.kas>}")
?: ?=(?(%hoon %hook) p.kas)
?: ?=(%hoon p.kas)
(fine cof %& p.kas [%atom %t] '')
%+ cope (fang cof p.kas)
|= [cof=cafe tux=vase]
@ -1458,25 +1320,13 @@
|=(val=* `vase`[typ val])
::
++ meow :: assemble
|= [how=beam arg=heel]
|= [how=beam arg=coin]
=| $: rop=(map term (pair hoof twig)) :: structures
bil=(map term (pair hoof twig)) :: libraries
boy=(list twig) :: body stack
lit=? :: drop arguments
==
~% %meow ..meow
==
%able able
%abut abut
%apex apex
%body body
%chad chad
%chai chai
%chap chap
%head head
%hone hone
%neck neck
%wilt wilt
==
~% %meow ..meow ~
|%
++ able :: assemble preamble
^- twig
@ -1544,7 +1394,7 @@
|= [cof=cafe bax=vase hon=horn]
^- (bolt vase)
%+ cope
%+ cope (lads cof how ~)
%+ cope (lads cof how)
%- some-in-map
|= [cof=cafe dir=span]
=+ nod=(chap(s.how [dir s.how]) cof bax hon)
@ -1566,9 +1416,16 @@
%arg
%+ cope (maim cof bax p.hon)
|= [cof=cafe gat=vase]
(maul cof gat !>([how arg]))
%+ cope (maim cof !>(~) ((jock |) arg))
|= [cof=cafe val=vase]
(maul cof gat (slop !>(how) val))
::
%alt
%. cof
|= cof=cafe ^- (bolt vase)
?~ p.hon (flaw cof leaf/"ford: out of options" ~)
(coop ^$(cof cof, hon i.p.hon) ..$(p.hon t.p.hon))
::
%day (chad cof bax %dr p.hon)
%dub
%+ cope $(hon q.hon)
(flux |=(vax=vase [[%face p.hon p.vax] q.vax]))
@ -1587,13 +1444,15 @@
?~ tev [[%cube 0 [%atom %n]] 0]
(slop i.tev $(tev t.tev))
::
%for $(hon q.hon, s.how (weld (flop p.hon) s.how))
%hel
%= $
hon q.hon
arg (scag p.hon arg)
s.how (weld (slag p.hon arg) s.how)
==
%for
=+ opt=|.(>(turn p.hon |=([a=path ^] a))<)
|- ^- (bolt vase)
?~ p.hon (flaw cof leaf/"ford: no match" >(tope how)< *opt ~)
?: =(p.i.p.hon (scag (lent p.i.p.hon) (flop s.how)))
^$(hon q.i.p.hon)
$(p.hon t.p.hon)
::
%hel $(hon p.hon, lit |)
%hub (chad cof bax %ud p.hon)
%man
|- ^- (bolt vase)
@ -1631,37 +1490,14 @@
(flaw cof [%leaf "type error: {<p.hon>} {<q.hon>}"]~)
(fine cof [p.tug q.vax])
::
%toy (cope (cope (make cof %boil p.hon how ~) furl) feel)
==
::
++ chop :: possible subpaths
|= [old=(set beam) hon=horn]
=+ acc=[new=*(set beam) old=old]
|- ^+ acc
?- -.hon
?(%ape %arg %toy) acc
?(%dub %sic %saw) $(hon q.hon)
?(%day %hub %nap %now) acc :: drop to avoid cycles
%for $(hon q.hon, s.how (weld (flop p.hon) s.how))
%see
=. r.p.hon ?:(?=([%ud 0] r.p.hon) r.how r.p.hon)
$(hon q.hon, how p.hon)
::
%hel
=. s.how (weld (slag p.hon arg) s.how)
?: (~(has in old.acc) how) acc
[(~(put in new.acc) how) (~(put in old.acc) how)]
::
%fan
|- ^+ acc
?~ p.hon acc
^$(hon i.p.hon, acc $(p.hon t.p.hon))
::
%man
|- ^+ acc
?~ p.hon acc
=. acc $(p.hon l.p.hon, acc $(p.hon r.p.hon))
^$(hon q.n.p.hon)
%toy
?: p.hon
=. arg ?.(lit arg many/~)
(cope (cope (make cof %bake q.hon arg how) furl) feel)
%+ cool |.(leaf/"ford: hook {<q.hon>} {<(tope how)>}")
%+ cope (fade cof %hoon how)
|= [cof=cafe hyd=hood]
(cope (abut:(meow how arg) cof hyd) (lake q.hon))
==
::
++ head :: consume structures
@ -1768,7 +1604,7 @@
|=([cof=cafe p=silk q=silk] (cope (make cof q) furl))
==
|= [cof=cafe cay=cage coy=cage] ^- (bolt gage)
?: ?=(?(%hoon %hook) p.cay)
?: ?=(%hoon p.cay)
?. ?=(%txt-diff p.coy)
(flaw cof leaf/"{<p.cay>} mark with bad diff type: {<p.coy>}" ~)
=+ txt=((soft ,@t) q.q.cay)
@ -1860,7 +1696,7 @@
[%| $(a (turn (turn a2 head) |=(b=mass ?~(-.q.b !! p.q.b))))]
%+ turn (~(tap by pol))
|= [@ baby]
:~ =< cache/[%| (turn `(list term)`/hood/bake/lilt/slit/slim/slap/slam .)]
:~ =< cache/[%| (turn `(list term)`/hood/bake/slit/slim/slap/slam .)]
=- |=(a=term [a `(~(get ja dep) a)])
=< `dep=(jar term ,*)`(~(rep by jav) .)
|=([[* a=[term *]] b=(jar term ,*)] (~(add ja b) a))
@ -1894,8 +1730,7 @@
~
::
++ load :: highly forgiving
|= old=axle
..^$(+>- old)
|=(old=axle ..^$(+>- old))
::=. old
:: ?. ?=([%0 *] old) old :: remove at 1
:: :- %1

View File

@ -1166,6 +1166,7 @@
%merg `%c
%mont `%c
%ogre `%c
%serv `%e
%them `%e
%wait `%b
%want `%a

View File

@ -4631,7 +4631,7 @@
^- toon
?. ?=([2 *] ton) ton
:- %2
=. p.ton (moop p.ton)
:: =. p.ton (moop p.ton)
=+ yel=(lent p.ton)
=. p.ton
?. (gth yel 256) p.ton
@ -8797,7 +8797,8 @@
$(mew t.mew, rag q:(tock p.i.mew ^$(gen q.i.mew) rag))
[%dtkt *] %noun
[%dtls *] [%atom %$]
[%dtzy *] ?:(=(%f p.gen) ?>((lte q.gen 1) bool) [%atom p.gen])
[%dtzy *] ?: =(%n p.gen) ?>(=(0 q.gen) [%cube 0 [%atom %n]])
?:(=(%f p.gen) ?>((lte q.gen 1) bool) [%atom p.gen])
[%dtzz *] [%cube q.gen ?:(.?(q.gen) %noun [%atom p.gen])]
[%dttr *] %noun
[%dtts *] bool

View File

@ -1117,32 +1117,11 @@
?:(=(~ fyl) ~ [(crip (flop fyl)) ~])
::
++ fuel :: parse fcgi
|= [bem=beam but=path]
=+ packed-quay=|-($|(~ [p=@t q=@t t=$]))
|= [bem=beam ced=noun:cred quy=packed-quay]
^- epic
?> ?=([%web @ *] but)
=+ dyb=(slay i.t.but)
?> ?& ?=([~ %many *] dyb)
?=([* * *] p.u.dyb)
?=([%$ %ta *] i.p.u.dyb)
?=([%blob *] i.t.p.u.dyb)
==
=+ ced=((hard cred) p.i.t.p.u.dyb)
:: =+ nep=q.p.i.p.u.dyb
=+ ^= gut ^- (list ,@t)
%+ turn t.t.p.u.dyb
|= a=coin ^- @t
?> ?=([%$ %t @] a)
?>(((sane %t) q.p.a) q.p.a)
=+ ^= quy
|- ^- (list ,[p=@t q=@t])
?~ gut ~
?> ?=(^ t.gut)
[[i.gut i.t.gut] $(gut t.t.gut)]
:* (~(gas by *(map cord cord)) quy)
ced
bem
t.t.but
==
=+ qix=|-(`quay`?~(quy quy [[p q]:quy $(quy t.quy)]))
[(mo qix) ((hard cred) ced) bem /]
::
++ sifo :: 64-bit encode
|= tig=@
@ -1255,10 +1234,10 @@
=< |=(pul=purl `tape`(apex ~ pul))
|%
++ apex
|= qur=quri
|= qur=quri ^- tape
?- -.qur
%& (weld (head p.p.qur) `tape`['/' $(qur [%| +.p.qur])])
%| (weld (body p.qur) (tail q.qur))
%& (weld (head p.p.qur) $(qur [%| +.p.qur]))
%| ['/' (weld (body p.qur) (tail q.qur))]
==
::
++ body
@ -1283,7 +1262,7 @@
?~(rit ~ (weld (trip i.rit) ?~(t.rit "" `tape`['.' $(rit t.rit)])))
==
::
?~(q.har ~ `tape`[':' (trip (rsh 3 2 (scot %ui u.q.har)))])
?~(q.har ~ `tape`[':' ((d-co:co 1) u.q.har)])
==
::
++ tail
@ -2478,6 +2457,7 @@
[%crud p=@tas q=(list tank)] :: XX rethink
[%hiss p=mark q=cage] :: outbound user req
[%init p=@p] :: report install
[%serv p=$|(desk beam)] :: set serving root
[%them p=(unit hiss)] :: outbound request
[%they p=@ud q=httr] :: inbound response
[%this p=? q=clip r=httq] :: inbound request
@ -2512,11 +2492,12 @@
++ horn :: resource tree
$% [%ape p=twig] :: /~ twig by hand
[%arg p=twig] :: /$ argument
[%day p=horn] :: /| list by @dr
[%alt p=(list horn)] :: /| options
:: [%day p=horn] :: list by @dr
[%dub p=term q=horn] :: /= apply face
[%fan p=(list horn)] :: /. list
[%for p=path q=horn] :: /, descend
[%hel p=@ud q=horn] :: /% propagate heel
[%for p=(list (pair path:spur horn))] :: /, switch by path
[%hel p=horn] :: /% propagate args
[%hub p=horn] :: /@ list by @ud
[%man p=(map span horn)] :: /* hetero map
[%nap p=horn] :: /_ homo map
@ -2524,14 +2505,14 @@
[%saw p=twig q=horn] :: /; operate on
[%see p=beam q=horn] :: /: relative to
[%sic p=tile q=horn] :: /^ cast
[%toy p=mark] :: /mark/ static
[%toy p=? q=mark] :: /mark/ static/hook
== ::
++ milk (trel ship desk silk) :: sourced silk
++ silk :: construction layer
$& [p=silk q=silk] :: cons
$% [%$ p=cage] :: literal
[%bake p=mark q=beam r=path] :: local synthesis
[%boil p=mark q=beam r=path] :: general synthesis
[%alts p=(list silk)] :: options
[%bake p=mark q=coin r=beam] :: local synthesis
[%bunt p=mark] :: example of mark
[%call p=silk q=silk] :: slam
[%cast p=mark q=silk] :: translate
@ -2544,7 +2525,7 @@
[%mash p=mark q=milk r=milk] :: annotate
[%mute p=silk q=(list (pair wing silk))] :: mutant
[%pact p=silk q=silk] :: patch
[%plan p=beam q=spur r=hood] :: structured assembly
[%plan p=beam q=coin r=hood] :: structured assembly
[%reef ~] :: kernel reef
[%ride p=twig q=silk] :: silk thru twig
[%tabl p=(list (pair silk silk))] :: list

View File

@ -1,2 +0,0 @@
/: /%%%/tree/pub/docs /% /hymn/
-<

View File

@ -1,2 +0,0 @@
/: /%%%/tree/pub/docs /% /json/
-<

View File

@ -1 +0,0 @@
;list(data-source "default", is404 "true");

View File

@ -1,2 +0,0 @@
/: /%%%/tree/pub/front /% /hymn/
-<

View File

@ -1,2 +0,0 @@
/: /%%%/tree/pub/front /% /json/
-<

17
gen/hood/serve.hoon Normal file
View File

@ -0,0 +1,17 @@
::
:::: /hoon/serve/hood/gen
::
/? 314
::
::::
!:
:- %say
|= $: [now=@da eny=@uvI bec=beak]
[[pax=$|(term [i=span t=path]) ~] ~]
==
:- %helm-serve
?@ pax pax
=+ bem=(need (tome pax))
?. =([%da now] r.bem) :: XX actual sentinel
bem
bem(r [%ud 0])

View File

@ -1,7 +0,0 @@
/+ tree
/: /%%/ /% /elem/
::
::::
::
^- (map path marl)
[[/ ((getall:tree /h1/h2/h3/h4/h5/h6) -.-)] ~ ~]

View File

@ -47,6 +47,7 @@
$% [%cash wire p=@p q=buck] ::
[%conf wire dock %load ship term] ::
[%flog wire flog] ::
[%serv wire ?(desk beam)] ::
[%poke wire dock pear] ::
[%wont wire sock path *] :: send message
== ::
@ -94,6 +95,10 @@
%^ emit %poke /helm/ask/(scot %p ~doznec)
[[~doznec %ask] %ask-mail mel]
::
++ poke-serve
|= top=?(desk beam) =< abet
(emit %serv /helm/serv top)
::
++ poke-hi |=(mes=@t abet:(emit %flog /di %text "< {<src>}: {(trip mes)}"))
++ coup-hi
|= [pax=path cop=(unit tang)] =< abet

View File

@ -45,7 +45,9 @@
=+ atr=(mo a.g.src)
?: (~(has by atr) [%urb %codemirror])
?> ?=([[%pre *] _:/(**) ~] src)
$(src ;codemirror(value "{v.i.a.g.i.c.src}");)
=. a.g.src
[value/v.i.a.g.i.c.src (skip a.g.src |=([a=mane *] ?=(^ a)))]
$(src [[%codemirror a.g.src] ~])
?: (~(has by atr) [%urb %exec]) :: runnable code attribute tag
?> ?=([[%pre *] _:/(**) ~] src) :: verify its only a text node
=* code v.i.a.g.i.c.src

View File

@ -32,6 +32,17 @@
:: pax/(cu deft (su fel:stab))
:: dat/(of json/some mime/(pe / (cu taco so)) ~) :: XX mite
:: ==
++ poke-wipe
|= sup=spur ^+ abet :: XX determine extension, beak
=+ ext=%md
?~ (file (tope beak-now [ext sup]))
~|(not-found/[ext `path`(flop sup)] !!)
=- abet:(emit %info write/~ our -)
(fray (tope beak-now [ext sup]))
::
++ poke-tree
|= [sup=spur mim=mime] ^+ abet :: XX determine extension, beak
(poke--data [`%md (flop sup)] %mime mim)
::
++ poke-paste
|= [typ=?(%hoon %md %txt) txt=@t] ^+ abet

View File

@ -20,6 +20,7 @@
::
++ grow :: convert into
|%
++ front ?~(don ~ ?:(?=(%meta -.i.don) p.i.don front(don t.don)))
++ hymn :: convert to %hymn
;html
;head:title:"Untitled"

View File

@ -9,7 +9,9 @@
++ hymn ;html:(head:title:"Untitled" body:"+{own}") :: convert to %hymn
++ html (crip (poxo hymn)) :: convert to %html
++ mime [/text/html (taco html)] :: convert to %mime
++ front ~ :: no frontmatter
--
++ garb /snip :: grabbed by
++ grab |% :: convert from
++ noun manx :: clam from %noun
-- --

View File

@ -7,9 +7,9 @@
::
++ grow :: convert to
|%
++ mime [/text/hoon (taco own)] :: convert to %mime
++ mime [/text/x-hoon (taco own)] :: convert to %mime
++ elem :: convert to %html
;div:pre(urb_codemirror ""):"{(trip own)}"
;div:pre(urb_codemirror "", mode "hoon"):"{(trip own)}"
:: =+ gen-id="src-{<`@ui`(mug own)>}"
:: ;div
:: ;textarea(id "{gen-id}"):"{(trip own)}"
@ -26,10 +26,10 @@
;head
;title:"Source"
;script@"//cdnjs.cloudflare.com/ajax/libs/codemirror/4.3.0/codemirror.js";
;script@"/{(trip &2:%)}/lib/syntax/hoon.js";
;script@"/lib/syntax/hoon.js";
;link(rel "stylesheet", href "//cdnjs.cloudflare.com/ajax/libs/".
"codemirror/4.3.0/codemirror.min.css");
;link/"/{(trip &2:%)}/lib/syntax/codemirror.css"(rel "stylesheet");
;link/"/lib/syntax/codemirror.css"(rel "stylesheet");
==
;body
;textarea#src:"{(trip own)}"

View File

@ -7,9 +7,9 @@
::
++ grow :: convert to
|%
++ mime `^mime`[/text/hoon (taco own)] :: convert to %mime
++ mime `^mime`[/text/x-hoon (taco own)] :: convert to %mime
++ elem :: convert to %html
;div:pre(urb_codemirror ""):"{(trip own)}"
;div:pre(urb_codemirror "", mode "hoon"):"{(trip own)}"
:: =+ gen-id="src-{<`@ui`(mug own)>}"
:: ;div
:: ;textarea(id "{gen-id}"):"{(trip own)}"
@ -26,10 +26,10 @@
;head
;title:"Source"
;script@"//cdnjs.cloudflare.com/ajax/libs/codemirror/4.3.0/codemirror.js";
;script@"/{(trip &2:%)}/lib/syntax/hoon.js";
;script@"/lib/syntax/hoon.js";
;link(rel "stylesheet", href "//cdnjs.cloudflare.com/ajax/libs/".
"codemirror/4.3.0/codemirror.min.css");
;link/"/{(trip &2:%)}/lib/syntax/codemirror.css"(rel "stylesheet");
;link/"/lib/syntax/codemirror.css"(rel "stylesheet");
==
;body
;textarea#src:"{(trip own)}"

View File

@ -20,4 +20,5 @@
(end 3 (dec (met 3 -)) -)
--
++ grad %txt
++ garb /down
--

View File

@ -1,22 +0,0 @@
::
:::: /hoon/core/mdy/pro
::
/? 314
/+ frontmatter
!:
|_ [atr=(map cord cord) mud=@t]
++ grow
|%
++ front atr
++ mime [/text/x-markdown (taco md)]
++ md (role txt)
++ txt (print:frontmatter atr (lore mud))
--
++ grab
|%
++ noun ,[(map cord cord) @t]
++ md (cork lore txt)
++ txt parse:frontmatter
--
++ grad %txt
--

14
mar/paste-new.hoon Normal file
View File

@ -0,0 +1,14 @@
::
:::: /hoon/core/json/mar
::
/? 314
::
:::: compute
::
|_ jon=json
::
++ grow |% ++ mime :: convert to %mime
[/text/'paste-new+json' (tact (pojo jon))]
--
++ grab |% ++ noun json :: clam from %noun
-- --

14
mar/quri.hoon Normal file
View File

@ -0,0 +1,14 @@
::
:::: /hoon/quri/mar
::
/? 314
|_ url=quri
::
++ grow |% ++ mime [text//x-uri (tact (apex:earn url))]
--
++ grab :: convert from
|%
++ noun quri :: clam from %noun
++ mime |=(mim=^mime (rash q.q.mim zest:urlp))
--
--

View File

@ -1,31 +0,0 @@
::
:::: /hoon/core/react-snip/mar
::
/? 314
/+ react
!:
::::
::
[. react]
|_ [hed=marl tal=marl]
::
++ grow :: convert to
|%
++ mime [/application/json (tact tape)]
++ tape (pojo react-snips-json)
++ elem ;div:(h1:"*{hed}" div:"*{tal}")
++ react-snip-js (crip (react-to-tape elem))
++ react-snips-json
::?> ?=([[%div ~] [[%h1 ~] *] [[%div ~] *] ~]] own) :: xx mystery fish-loop
%^ jobe
head/react-head-json
body/react-snip-json
~
::
++ react-head-json (react-to-json ;h1:"*{hed}")
++ react-snip-json (react-to-json ;div:"*{tal}")
--
++ grab |% :: convert from
++ noun manx :: clam from %noun
++ snip |=(a=[marl marl] a)
-- --

View File

@ -1,23 +0,0 @@
::
:::: /hoon/core/react/mar
::
/? 314
/+ react
!:
::::
::
[. react]
|_ own=manx
::
++ grow :: convert to
|%
++ tape (pojo react-json)
++ react-js (crip (react-to-tape own))
:: ++ js react-js :: convert to %js
++ react-json (react-to-json own)
++ mime [/application/json (tact tape)] :: convert to %mime
--
++ grab |% :: convert from
++ noun manx :: clam from %noun
++ elem |= a=manx a
-- --

14
mar/talklog/hymn.hoon Normal file
View File

@ -0,0 +1,14 @@
::
:::: /hoon/core/hymn/mar
::
/? 314
|_ own=manx
::
++ grow :: convert to
|%
++ html (crip (poxo own)) :: convert to %html
++ mime [/text/html (taco html)] :: convert to %mime
--
++ grab |% :: convert from
++ noun manx :: clam from %noun
-- --

14
mar/tree/hymn.hoon Normal file
View File

@ -0,0 +1,14 @@
::
:::: /hoon/core/hymn/mar
::
/? 314
|_ own=manx
::
++ grow :: convert to
|%
++ html (crip (poxo own)) :: convert to %html
++ mime [/text/html (taco html)] :: convert to %mime
--
++ grab |% :: convert from
++ noun manx :: clam from %noun
-- --

4
mar/tree/include.hoon Normal file
View File

@ -0,0 +1,4 @@
/- tree-include
|_ tree-include
++ grab |% ++ noun tree-include
-- --

19
mar/tree/json.hoon Normal file
View File

@ -0,0 +1,19 @@
::
:::: /hoon/json/mar
::
/? 314
::
:::: compute
::
|_ jon=json
::
++ grow :: convert to
|%
++ mime [/text/json (tact (pojo jon))] :: convert to %mime
--
++ grab
|% :: convert from
:: ++ mime |=([p=mite q=octs] (fall (rush (,@t q.q) apex:poja) *json))
++ noun json :: clam from %noun
--
--

View File

@ -14,8 +14,10 @@
++ grab
|% :: convert from
++ noun manx :: clam from %noun
++ hymn :: inject into %hymn
|= old=manx old :: moved to %eyre
:: ++ tree-hymn :: inject into %hymn
:: |= old=manx old :: moved to %eyre
:: XX in ren/
:: ~| hymn//mal-formed
:: :: ~| old
:: ?> ?=([[%html ~] [[%head ~] *] [[%body ~] ^] ~] old) :: XX static

12
mar/write/paste.hoon Normal file
View File

@ -0,0 +1,12 @@
::
:::: /hoon/core/save/mar
::
!:
|_ [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 ~)))
--
--

13
mar/write/tree.hoon Normal file
View File

@ -0,0 +1,13 @@
::
:::: /hoon/core/save/mar
::
!:
|_ [sup=spur mim=mime]
++ grab
|%
++ noun ,[spur mime]
++ json
%+ corl need :: XX {pax, mite, octs}
=>(jo (ot sup/(su fel:stab) mime/(cu |=(a=@t [/ (taco a)]) so) ~))
--
--

11
mar/write/wipe.hoon Normal file
View File

@ -0,0 +1,11 @@
::
:::: /hoon/core/save/mar
::
!:
|_ spur
++ grab
|%
++ noun spur
++ json (corl need (su:jo fel:stab))
--
--

View File

@ -1,51 +0,0 @@
::
::::
::
/= gas /$ fuel
::
/= talk-body /: /%%/talk/body /elem/
/= talk-nav /: /%%/talk/nav /elem/
/= tree-body /: /%%/tree/body /elem/
/= tree-nav /: /%%/tree/nav /elem/
::
=+ ^= type (fall (~(get by qix.gas) %type) 'tree')
=+ ^= body ?: =(type 'tree') tree-body talk-body
=+ ^= nav ?: =(type 'tree') tree-nav talk-nav
::
^- manx
::
;html
;head
;title: Bootstrap Test - ~2016.1
;meta(name "viewport", content "width=device-width, initial-scale=1");
;link(rel "stylesheet", href "/home/lib/css/fonts.css");
;link(rel "stylesheet", href "/home/lib/css/bootstrap.css");
;script(src "//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.js");
==
;body
;div.container.nav
;+ nav
==
;div.container
;div.row
;div.col-md-10.col-md-offset-2.body
;+ body
==
==
==
;script(type "text/javascript"):'''
$(function() {
$('.navbar-toggler').click(function() {
$('.navbar-toggler').toggleClass('open')
$('.ctrl').toggleClass('open')
if($('.navbar-toggler').hasClass('show'))
$('.menu.depth-1').toggleClass('open')
})
$('.room').click(
function() {
$('.menu.depth-2').toggleClass('open')
})
})
'''
==
==

View File

@ -1,98 +0,0 @@
;div
;ul.grams
;li.gram
;div.meta
;label.public;
;h2.author.planet: ~talsur-todres
;div.path;
==
;div.gram: Including the black townships?
==
;li.gram
;div.meta
;label.public;
;h2.author.planet: ~talsur-todres
;div.path;
==
;div.gram: It is a scientific exploration of what our knowledge of mortality does to our psyche.
==
;li.gram
;div.meta
;label.public;
;h2.author.planet: ~talsur-todres
;div.path;
==
;div.gram: Basically, it says that everything we do in life, on every level, is at the core influenced by the idea that we are going to die someday.
==
;li.gram
;div.meta
;label.public;
;h2.author.planet: ~talsur-todres
;div.path;
==
;div.gram: It is something that I have researched a lot, but I had never found a scientific exploration of it.
==
;li.gram
;div.meta
;label.public;
;h2.author.planet: ~talsur-todres
;div.path;
==
;div.gram: It is always an emotive or philosophical way of writing, so a scientific exploration was really refreshing—straight facts and research.
==
;li.gram
;div.meta
;label.public;
;h2.author.planet: ~talsur-todres
;div.path;
==
;div.gram: I first came across it midsummer last year.
==
;li.gram
;div.meta
;label.public;
;h2.author.planet: ~talsur-todres
;div.path;
==
;div.gram: My friend Greg Puciato, from Dillinger Escape Plan, we have a lot in common, so we were exchanging books and he told me to check it out.
==
;li.gram
;div.meta
;label.public;
;h2.author.planet: ~talsur-todres
;div.path;
==
;div.gram: The explanation of the show also says that it deals with your unknown past, a daunting but exciting future, and a stale present.
==
;li.gram
;div.meta
;label.public;
;h2.author.planet: ~talsur-todres
;div.path;
==
;div.gram: Can you expand upon that?
==
;li.gram
;div.meta
;label.public;
;h2.author.planet: ~talsur-todres
;div.path;
==
;div.gram: I had some traumatic experiences in my past and it caused me to create a lot of blocks in my memory, where I don't remember my childhood clearly at all.
==
;li.gram
;div.meta
;label.public;
;h2.author.planet: ~talsur-todres
;div.path;
==
;div.gram: There's no real record and my family doesn't talk about it, so I don't fully understand or know what happened.
==
==
;div.audience
;div.input: /meta
==
;div.message
;div.input;
==
==

View File

@ -1,108 +0,0 @@
;div.row
;div.col-md-2.ctrl
;div.icon
;div.home;
;div.app: Talk
;div.dpad;
;button.navbar-toggler.show(type "button"): ☰
==
;div.context
;div.name: /home
==
==
;div.col-md-4.menu.depth-1
;div.contents
;div.close: ✕
;h2
; Direct
;label.sum: 3
==
;div
;div.name: Galen
;div.planet: ~talsur-todres
==
;div
;div.name: Curtis
;div.planet: ~tasfyn-partyv
==
;div
;div.name: Anton
;div.planet: ~pittyp-pittyp
==
;div.action.create
;label;
; Message
==
;h2
; Stations
;label.sum: 4
==
;div
;div.room: /meta
;div.room: /help
;div.room: ~talsur-todres/music
;div.action.add
;label;
; Listen
==
==
==
==
;div.col-md-4.menu.depth-2
;div.contents
;div.close: ✕
;h2
; Members
;label.sum: 12
==
;div
;div.name: Galen
;div.planet: ~talsur-todres
==
;div
;div.name: Curtis
;div.planet: ~tasfyn-partyv
==
;div
;div.name: Anton
;div.planet: ~pittyp-pittyp
==
;div
;div.name: Galen
;div.planet: ~talsur-todres
==
;div
;div.name: Curtis
;div.planet: ~tasfyn-partyv
==
;div
;div.name: Anton
;div.planet: ~pittyp-pittyp
==
;div
;div.name: Galen
;div.planet: ~talsur-todres
==
;div
;div.name: Curtis
;div.planet: ~tasfyn-partyv
==
;div
;div.name: Anton
;div.planet: ~pittyp-pittyp
==
;div
;div.name: Galen
;div.planet: ~talsur-todres
==
;div
;div.name: Curtis
;div.planet: ~tasfyn-partyv
==
;div
;div.name: Anton
;div.planet: ~pittyp-pittyp
==
==
==
==

View File

@ -1,208 +0,0 @@
# Contributing to urbit
Thank you for your interest in contributing to urbit.
## Development practice
You may have an identity on the live network, but doing all your
development on the live network would be cumbersome and unnecessary.
Standard practice in urbit development is to work on a fake `~zod`. A
fake `~zod` will get its initial files from the `urb/zod/` directory
rather than trying to sync them over the network, which is invaluable
for working in Hoon. Also, a fake `~zod` or any fake urbit instances you
start do not talk to the live network, but to a fake network that exists
only on your computer.
To start a fake `~zod`, the command is:
bin/urbit -F -I zod -c [pier directory]
To resume one that was already created, just as on the live network,
remove `-c` (but leave the rest of the options there). `-F` uses the
fake network, and `-I` starts an "imperial" instance - that is, an 8-bit
galaxy.
## Kernel development
Working on either C or non-kernel Hoon should not bring any surprises,
but the Hoon kernel (anything under `urb/zod/arvo/`) is bootstrapped
from `urbit.pill` in `urb/`, and must be manually recompiled if any
changes are made. The command to manually recompile the kernel and
install the new kernel is `|reset` in `dojo`. This rebuilds from the
`arvo` directory in the `home` desk in `%clay`. Currently, `|reset`
does not reload apps like `dojo` itself, which will still reference the
old kernel. To force them to reload, make a trivial edit to their main
source file (under the `ape` directory) in `%clay`.
If you do any kernel development, be sure to read the section below about
pills.
## Git practice
Since we use the GitHub issue tracker, it is helpful to contribute via a
GitHub pull request. If you already know what you are doing, skip down
to the Style section.
Start by cloning the repository on your work machine:
git clone https://github.com/urbit/urbit
And, additionally, fork the repository on GitHub by clicking the "Fork"
button. Add your fork as a remote:
git remote add [username] https://github.com/[username]/urbit
and set it as the default remote to push to:
git config --local remote.pushDefault [username]
This is good practice for any project that uses git. You will pull
upstream branches from urbit/urbit and push to your personal urbit fork
by default.
Next, check out `test`, which is the mainline development branch, and
base a new branch on it to do your work on:
git checkout test
git checkout -b [branch name]
Now you are free to do your work on this branch. When finished, you may
want to clean up your commits:
git rebase -i test
Then you can push to your public fork with `git push` and make a pull
request via the GitHub UI. Make sure you request to merge your branch
into `test`, not `master`.
After your changes are merged upstream, you can delete your branch (via
github UI or `git push :[branch]` remotely, and with `git branch -d`
locally).
## Style
The urbit project uses two-space indentation and avoids tab characters.
In C code, it should not be too difficult to mimic the style of the code
around you, which is just fairly standard K&R with braces on every
compound statement. One thing to watch out for is top-level sections in
source files that are denoted by comments and are actually indented one
level.
Hoon will be a less familiar language to many contributors. Some of our
less obvious stylistic rules are:
- Keep your source files 80 characters or less wide. Many urbit
developers use 80 character terminals/tmux panes/&c.
- Tab characters are actually a syntax error, so be extra sure your
editor is not inserting any. Trailing whitespace is *usually* not a
syntax error, but avoiding it is encouraged.
- The kernel convention is that line comments start at column 57 with
the `::` followed by 2 spaces. This leaves 20 characters for the
comment. Outside the kernel, things are less strict.
- Tall arms within a core are conventionally separated by empty comments
(just `::`) at the same indentation level as the initial `++` or `+-`.
The last arm in a core is not followed by an empty comment, because it
is visually closed by the `--` that closes the core. The empty comment
is also sometimes omitted in data structure definitions.
## The kernel and pills
urbit bootstraps itself using a binary blob called `urbit.pill`, which
we do indeed keep in version control. This creates some special
requirements. If you are not changing anything in the kernel (everything
under `urb/zod/arvo/`) then you can skim this section (please do not
skip it entirely, though). If you *are* working there, then this
section is critically important!
The procedure for creating `urbit.pill` is often called "soliding". It
is somewhat similar to `|reset`, but instead of replacing your running
kernel, it writes the compiled kernel to a file. The command to solid
is, on a fakezod:
.urbit/pill +solid
When the compilation finishes, your `urbit.pill` will be found in the
`[pier]/.urb/put/` directory. Copy it into `urb/` and add it to your
commit.
The requirement here is that every commit that changes the kernel must
come with an `urbit.pill` built from the same code in `urb/zod/arvo/`
for that commit. (Only changing the actual Hoon code counts, so a change
to a jet with no corresponding Hoon change does not require a new pill.)
This is so that checking out an arbitrary revision and starting up a
fakezod actually works as expected. However you do this is fine, but I
like to do it as part of my committing process - just before `git
commit`, I fire up a new fakezod. This will use the previous
`urbit.pill`, but the kernel code in `%clay` will be copied from
`urb/zod/arvo/`, so `+solid` will compile it. Then I copy `urbit.pill`
into `urb/` and make my commit.
If you rebase or interactive rebase your commits, be sure to preserve
this property on all the commits you end up with. If multiple people
were collaborating on your branch, you may end up with conflicts in
`urbit.pill` and have to merge the branch into itself to resolve them.
Just do the same procedure to create a new, merged pill before
committing the merge. Otherwise, just make sure to use the correct
`urbit.pill` for each commit.
## Debug urbit with `gdb`
Follow the build instructions in README.md but run `make` with argument `DEBUG=yes`:
(If you've already built urbit first run `make clean`.)
make DEBUG=yes
Run `gdb`, while loading `bin/urbit` and its symbol table:
gdb bin/urbit
Set a breakpoint on `main()` (optional):
break main
Run your urbit comet `mycomet`:
run mycomet
Continue from the breakpoint on `main()`:
continue
## What to work on
If you are not thinking of contributing with a specific goal in mind,
the GitHub issue tracker is the first place you should look for ideas.
Issues are tagged with a priority and a difficulty. A good place to
start is on either a low-difficulty issue or a low-priority issue.
Higher priority issues are likely to be assigned to someone - if this is
the case, then contacting that person to coordinate before starting to
work is probably a good idea.
There is also a "help wanted" tag for things that we are especially
eager to have outside contributions on. Check here first!
## Staying in touch
The urbit developers communicate on urbit itself. Joining the
`~doznec/urbit-meta` channel on `talk` is highly recommended.
Subscribing to `urbit-dev` on Google Groups is also recommended, since
this is where continuity breach notifications are sent.
You can also contact one of the following people:
- Philip Monk
email: philip.monk@tlon.io
urbit: `~wictuc-folrex`
GitHub: [@philipcmonk](https://github.com/philipcmonk/)
- Raymond Pasco
email: ray@the.ug
urbit: `~ramtev-wisbyt`
GitHub: [@juped](https://github.com/juped/)

View File

@ -1,28 +0,0 @@
;div.row
;div.col-md-2.ctrl
;div.icon
;div.home;
;div.app;
;div.dpad
;div.up;
;div.prev;
;div.next;
==
;button.navbar-toggler(type "button"): ☰
==
;ul.nav
;li.nav-item
;a.nav-link: Nock
==
;li.nav-item
;a.nav-link: Hoon
==
;li.nav-item
;a.nav-link: Arvo
==
;li.nav-item.selected
;a.nav-link: Contributing
==
==
==
==

View File

@ -1,3 +0,0 @@
/=main=/pub/fab/
This directory is intended to hold your `%ford` core files.

View File

@ -1 +0,0 @@
;module(js "/home/pub/talk/main.js", css "/home/pub/talk/main.css", component "talk");

View File

@ -1,41 +0,0 @@
/= all /; flop /^ (list (pair time ,*)) /: /%%/ /& /mime/
;div
;link(rel "stylesheet", href "/home/lib/base.css");
;link(rel "stylesheet", href "/home/pub/paste/main.css");
;script@"//code.jquery.com/jquery-2.1.4.min.js";
;script@"/~/as/own/~/at/home/lib/urb.js";
;script:'''
document.title = 'pastebin - urbit'
urb.appl = 'hood'
urb.send.mark = 'write-paste'
submit = function(){
if($("select :selected").attr('value')===undefined) {
$("select").addClass('err')
return false
}
$("select").removeClass('err')
$("textarea,button").attr('disabled', true)
urb.send({
txt:$("textarea").val(),
typ:$("select :selected").val()
}, function(){
$.getJSON('paste/new.json',null,function(resp){
if(!resp) throw "No paste"
window.location = "paste/"+resp.u
})})
}
'''
::
;h1: New
;p:textarea;
;select
;option(): Type
;option(value "md"): Markdown
;option(value "txt"): Text
;option(value "hoon"): Hoon
==
;button(onclick "submit()"):"Submit"
;hr;
;h1: Recent
;* (turn all |=([a=time *] ;p:a/"paste/{<a>}":"{<a>}"))
==

View File

@ -1,2 +0,0 @@
/= all /^ (list (pair time ,*)) /: /%%%/ /& /mime/
?~(all ~ (joba %u |-(?~(t.all s/(scot %da p.i.all) $(all t.all)))))

View File

@ -1,3 +0,0 @@
/=main=/pub/fab/
This directory is intended to hold your `%ford` source files.

View File

@ -1,7 +0,0 @@
{
"version": 3,
"mappings": "AAEA;KACM;EACJ,WAAW,EAAE,KAAK;;ACDpB,QAAS;EACP,OAAO,EAAE,YAAY;;AAGvB,SAAU;EACR,eAAe,EAAE,IAAI;EACrB,OAAO,EAAE,CAAC;;AAIV,cAAM;EACJ,gBAAgB,ECimBY,OAAW;EDhmBvC,YAAY,EAAE,IAAI;EAClB,MAAM,EAAE,IAAI;EACZ,KAAK,EAAE,IAAI;EACX,UAAU,EAAE,MAAM;AAGpB,qBAAa;EACX,OAAO,EAAE,gBAAgB;EACzB,KAAK,EAAE,IAAI;EACX,WAAW,EAAE,KAAK;EAClB,SAAS,EAAE,KAAK;EAChB,WAAW,EAAE,GAAG;EAChB,WAAW,EAAE,IAAI;EACjB,cAAc,EAAE,MAAM;AAGxB;;WAEG;EACD,OAAO,EAAE,YAAY;AAGvB;WACG;EACD,WAAW,EAAE,KAAK;EAClB,SAAS,EAAE,KAAK;EAChB,WAAW,EAAE,GAAG;EAChB,UAAU,EAAE,CAAC;EACb,WAAW,EAAE,CAAC;AAGhB,WAAG;EAAE,WAAW,EAAE,IAAI;AACtB,cAAM;EAAE,aAAa,EAAE,IAAI;;AAG7B,sBAAuB;EAAE,OAAO,EAAE,IAAI;;AAEtC,4BAA6B;EAC3B,OAAO,EAAE,KAAK;EACd,QAAQ,EAAE,QAAQ;EAClB,gBAAgB,EAAE,IAAI;EACtB,UAAU,EAAE,OAAO;EACnB,WAAW,EAAE,IAAI;;AAGnB,OAAQ;EAAE,WAAW,EAAE,IAAI;;AEFvB,yBAAyB;EFK3B,gBAAiB;IAAE,YAAY,EAAE,GAAG;AAKtC,MAAO;EACL,aAAa,EAAE,cAAc;EAC7B,OAAO,EAAE,YAAY;EACrB,WAAW,EAAE,IAAI;EACjB,SAAS,EAAE,IAAI;EACf,OAAO,EAAE,OAAO;EAChB,SAAS,EAAE,IAAI;EACf,UAAU,EAAE,IAAI;EAChB,OAAO,EAAE,IAAI;;AAGf;QACS;EAAE,WAAW,EAAE,IAAI;;AAE5B,SAAU;EACR,aAAa,EAAE,IAAI;;AAGrB,gBAAiB;EACf,YAAY,ECwhBkB,OAAW;EDvhBzC,WAAW,EAAE,KAAK;;AAGpB,QAAS;EAAE,OAAO,EAAE,YAAY;;AAEhC,eAAgB;EACd,YAAY,ECojBgB,OAAU;EDnjBtC,WAAW,EAAE,KAAK;;AAGpB,OAAQ;EACN,OAAO,EAAE,YAAY;EACrB,WAAW,EAAE,IAAI;EACjB,WAAW,EAAE,IAAI;EACjB,WAAW,EAAE,KAAK;EAClB,SAAS,EAAE,KAAK;EAChB,WAAW,EAAE,GAAG;EAChB,cAAc,EAAE,GAAG",
"sources": ["../css/_util.scss","../css/_grams.scss","../bootstrap/scss/_custom.scss","../bootstrap/scss/mixins/_breakpoints.scss"],
"names": [],
"file": "main.css"
}

View File

@ -1,82 +0,0 @@
recl = React.createClass
{div,pre,br,input,textarea,a} = React.DOM
Message = recl
lz: (n) -> if n<10 then "0#{n}" else "#{n}"
convTime: (time) ->
d = new Date time
h = @lz d.getHours()
m = @lz d.getMinutes()
s = @lz d.getSeconds()
"~#{h}.#{m}.#{s}"
render: ->
# pendingClass = if @props.pending isnt "received" then "pending" else ""
delivery = _.uniq _.pluck @props.thought.audience, "delivery"
klass = if delivery.indexOf("received") isnt -1 then " received" else " pending"
speech = @props.thought.statement.speech
attachments = []
while speech.fat?
attachments.push pre {}, speech.fat.tor.tank.txt.join("\n")
speech = speech.fat.taf # XX
if !speech? then return;
if speech.lin?.say is false then klass += " say"
if speech.url then klass += " url"
name = if @props.name then @props.name else ""
aude = _.keys @props.thought.audience
audi = window.util.clipAudi(aude).map (_audi) -> (div {}, _audi.slice(1))
type = ['private','public']
type = type[Number(aude.indexOf(window.util.mainStationPath(window.urb.ship)) is -1)]
mess = switch
when (con = speech.lin) or (con = speech.app) or
(con = speech.exp) or (con = speech.tax)
con.txt
when (con = speech.url)
(a {href:con.txt,target:"_blank"}, con.txt)
else "Unknown speech type:" + (" %"+x for x of speech).join ''
klass += switch
when speech.app? then " say"
when speech.exp? then " exp"
else ""
{ship} = @props
if ship[0] is "~" then ship = ship.slice(1)
div {className:"message#{klass}"}, [
(div {className:"attr"}, [
div {className:"type #{type}"}, ""
div {className:"iden"}, div {className:"ship"}, ship
div {className:"audi"}, audi
div {className:"time"}, @convTime @props.thought.statement.date
])
div {className:"mess"}, mess,
if attachments.length
div {className:"fat"}, attachments
]
window.MessagesComponent = recl
pageSize: 50
paddingTop: 100
getInitialState: -> {station:window.location.pathname.split("/").reverse()[0]}
sortedMessages: (messages) ->
_.sortBy messages, (_message) ->
_message.pending = false
_message.thought.statement.date
render: ->
_messages = @sortedMessages @props.messages
messages = _messages.map (_message,k) =>
if _message.thought.statement.speech?.app
_message.ship = "system"
_message.station = @state.station
React.createElement Message,_message
div {id: "messages"}, messages

View File

@ -1,3 +0,0 @@
$ ->
rend = React.render; rele = React.createElement
rend (rele window.MessagesComponent, messages: window.MessageData), ($ '#cont')[0]

View File

@ -1,85 +0,0 @@
if not window.util then window.util = {}
_.merge window.util,
mainStations: ["court","floor","porch"]
mainStationPath: (user) -> "~#{user}/#{window.util.mainStation(user)}"
mainStation: (user) ->
if not user then user = window.urb.ship
switch user.length
when 3
return "court"
when 6
return "floor"
when 13
return "porch"
clipAudi: (audi) ->
audi = audi.join " "
ms = window.util.mainStationPath window.urb.ship
regx = new RegExp "/#{ms}","g"
audi = audi.replace regx,""
audi.split " "
expandAudi: (audi) ->
audi = audi.join " "
ms = window.util.mainStationPath window.urb.ship
if audi.indexOf(ms) is -1
if audi.length > 0
audi += " "
audi += "#{ms}"
audi.split " "
create: (name) ->
window.talk.StationPersistence.createStation name, (err,res) ->
subscribe: (name) ->
window.talk.StationPersistence.addSource "main",window.urb.ship,["~zod/#{name}"]
uuid32: ->
str = "0v"
str += Math.ceil(Math.random()*8)+"."
for i in [0..5]
_str = Math.ceil(Math.random()*10000000).toString(32)
_str = ("00000"+_str).substr(-5,5)
str += _str+"."
str.slice(0,-1)
populate: (station,number) ->
c = 0
send = ->
if c < number
c++
else
console.log 'done'
return true
_audi = {}
_audi[station] = "pending"
_message =
serial:window.util.uuid32()
audience:_audi
statement:
speech:
say:"Message "+c
time: Date.now()
now: Date.now()
window.talk.MessagePersistence.sendMessage _message,send
send()
getScroll: ->
@writingPosition = $('#c').outerHeight(true)+$('#c').offset().top-$(window).height()
setScroll: ->
window.util.getScroll()
$(window).scrollTop($("#c").height())
isScrolling: ->
if not window.util.writingPosition
window.util.getScroll()
return ($(window).scrollTop()+$('#writing').outerHeight() < window.util.writingPosition)
checkScroll: ->
if window.util.isScrolling()
$('body').addClass 'scrolling'
else
$('body').removeClass 'scrolling'

View File

@ -1,7 +0,0 @@
{
"version": 3,
"mappings": "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",
"sources": ["../css/_util.scss","../css/_nav.scss","../bootstrap/scss/mixins/_breakpoints.scss","../bootstrap/scss/mixins/_urbit.scss","../bootstrap/scss/_custom.scss","../css/_menu.scss","../css/_list.scss"],
"names": [],
"file": "main.css"
}

14
ren/index.hoon Normal file
View File

@ -0,0 +1,14 @@
/+ tree
/, /
/; (getall:tree /h1/h2/h3/h4/h5/h6) /elem/
::
/pub/docs/dev/hoon/runes
/; |= [tip=marl sub=(map span marl) ~]
(zing `(list marl)`[tip (turn (~(tap by sub)) tail)])
/. /; (getall:tree %h1 ~) /elem/
/_ /; (getall:tree %h1 ~) /elem/
== ==
::
::::
::
`(map path marl)`[[/ -.-] ~ ~]

3
ren/paste-new.hoon Normal file
View File

@ -0,0 +1,3 @@
/= all /; flop /^ (list (pair time ,*)) /& /mime/
^- json
?~(all ~ (joba %u s/(scot %da p.i.all)))

32
ren/rss-xml.hoon Normal file
View File

@ -0,0 +1,32 @@
:: Simple rss transformer
::
:::: /hoon/rss-xml/ren
::
/= sum /snip/
/^ kid=(map span ,[marl marl])
/_ /snip/
/$ |=([bem=beam but=path] [our=p.bem tub=(slag 1 (flop but))])
::
:::: ~fyr
::
:: Link from relative path
=+ hok=`hart`[& ~ `/org/urbit/(rsh 3 1 (scot %p our))]
=+ ref=|=(a=path (earn hok `(weld tub a) ~))
:: urb:front attrs confuse RSS validators, readers
=+ no-meta=|=(a=marl `_a`?~(a ~ ?.(?=(%meta n.g.i.a) a $(a t.a))))
::
%- crip %- poxo
;rss(version "2.0")
;channel
;title: *{hed.sum}
;link: {(ref /)}
;description: *{(no-meta tal.sum)}
;* %+ turn (~(tap by kid))
|= [nom=@t hed=marl tal=marl]
;item
;title: *{hed}
;description: *{(no-meta tal)}
;link: {(ref /[nom])}
==
==
==

View File

@ -1,11 +1,9 @@
:: Talk log front-end
::
:::: /hook/hymn/talklog/pub
:::: /hoon/hymn/talklog/ren
::
/? 310
/= mez
/: /===/talk
/% 2
/; pojo
/; |=(a=(list ,[@ p=json]) =.(a (flop a) ?~(a [%a ~] p.i.a)))
/& /json/
@ -26,12 +24,12 @@
== ==
;body
;div#cont;
;script(type "text/javascript", src "/~/at/home/lib/urb.js");
;link/"/home/pub/talk/src/css/main.css"(type "text/css", rel "stylesheet");
;script(type "text/javascript", src "/~/at/lib/js/urb.js");
;link/"/talk/main.css"(type "text/css", rel "stylesheet");
;script: window.MessageData = {mez}
;script@"src/MessagesComponent.coffee"(type "text/coffeescript");
;script@"src/util.coffee"(type "text/coffeescript");
;script@"src/main.coffee"(type "text/coffeescript");
;script@"js/MessagesComponent.coffee"(type "text/coffeescript");
;script@"js/util.coffee"(type "text/coffeescript");
;script@"js/main.coffee"(type "text/coffeescript");
;+ (cdnj "coffee-script/1.7.1/coffee-script.min.js")
==
==

12
ren/tree/combine.hoon Normal file
View File

@ -0,0 +1,12 @@
/+ tree, react
/= mime /mime/
/= body /elem/
/= snip /snip/
/= meta /front/
/= sect /index/
!:
^- tree-include
=+ rj=react-to-json:react
=+ fj=|=(atr=(map span span) [%o (~(run by atr) |=(a=span s/a))])
=+ ij=(map-to-json:tree |=(a=path (crip (spud a))) |=(a=marl [%a (turn a rj)]))
[mime (rj body) (rj /h1 hed.snip) (rj /div tal.snip) (fj meta) (ij sect)]

46
ren/tree/hymn.hoon Normal file
View File

@ -0,0 +1,46 @@
::
/? 314
/- tree-include
/= dat /% /tree-json/ :: default include
/= tub /$ |=([bem=beam *] (flop s.bem))
/= aut /; |=(gas=epic (~(has ju aut.ced.gas) %$ (scot %p p.bem.gas)))
/$ fuel
::
!:
::::
::
;html
;head
;title: Tree
;meta(name "viewport", content "width=device-width, initial-scale=1");
;link(type "text/css", rel "stylesheet", href "//cdnjs.cloudflare.com/ajax/libs/codemirror/4.3.0/codemirror.min.css");
;link(type "text/css", rel "stylesheet", href "/lib/css/fonts.css");
;link(type "text/css", rel "stylesheet", href "/lib/css/bootstrap.css");
;link(type "text/css", rel "stylesheet", href "/lib/css/codemirror.css");
;link(type "text/css", rel "stylesheet", href "/tree/main.css");
::;link(type "text/css", rel "stylesheet", href "http://localhost:8000/docs/pub/tree/main.css");
;link(type "application/rss+xml", rel "alternate", href "/{(spud tub)}.rss-xml");
;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js");
;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js");
;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/libs/react/0.14.6/react.js");
;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/libs/react/0.14.6/react-dom.js");
;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/libs/flux/2.1.1/Flux.js");
;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/libs/codemirror/4.3.0/codemirror.js");
;script(type "text/javascript", src "/lib/js/urb.js");
;script(type "text/javascript", src "/lib/js/hoon.js");
;script(type "text/javascript", src "/tree/main.js");
;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/libs/".
"codemirror/4.3.0/mode/markdown/markdown.min.js");
;* ?. aut ~
[;script(type "text/javascript", src "/~/as/own/~/at/lib/js/urb.js");]~
==
;body
;script(type "text/javascript"): window.tree = {(pojo (joba %data dat))}
;div.container
;div.row#main
;div#head;
;div#body;
==
==
==
==

5
ren/tree/include.hoon Normal file
View File

@ -0,0 +1,5 @@
/- tree-include
/| /tree-combine/
/:/===/web/404:/tree-combine/
==
`tree-include`-<

View File

@ -4,13 +4,9 @@
/? 314
/+ tree
/= gas /$ fuel
/= dat /^ tree-include
/: /===/tree-gen /%
/tree-include/
::
/= dat /^ tree-include /tree-include/
/= kid /^ (map span tree-include)
/: /===/tree-gen /% 2 /_
/tree-include/
/_ /tree-include/
!:
::::
::
@ -21,11 +17,13 @@
$% [%kids p=(list query)]
[%name %t]
[%path %t]
[%spur %t]
[%sect %j]
[%snip %r]
[%head %r]
[%body %r]
[%meta %j]
[%mime %m]
==
++ to-queries
|= a=schema ^- (list query)
@ -38,9 +36,10 @@
%kids [%kids (to-queries ?@(+.a !! +.a))]
==
++ from-type :: XX holding out for noun odors
|= a=$%([%t p=cord] [%r p=json] [%j p=json])
|= a=$%([%t p=cord] [%r p=json] [%j p=json] [%m mime])
?- -.a
%t [%s p.a]
%m (jobe mite/[%s (moon p.a)] octs/[%s q.q.a] ~)
%r p.a
%j p.a
==
@ -52,10 +51,12 @@
?- -.a
%name (from-type +.a ?^(s.bem i.s.bem q.bem))
%path (from-type +.a (crip (spud (flop s.bem))))
%spur (from-type +.a (crip (spud s.bem)))
%head (from-type +.a head.dat)
%snip (from-type +.a snip.dat)
%sect (from-type +.a sect.dat)
%meta (from-type +.a meta.dat)
%mime (from-type +.a mime.dat)
%body (from-type +.a body.dat)
%kids ?< (~(has by (mo p.a)) %kids) :: XX recursion?
=< o/(~(urn by kid) .)
@ -69,6 +70,6 @@
[tree .]
^- json
=+ ^= schem
=+ seh=(fall (~(get by qix.gas) 'q') 'body.r')
=+ seh=(fall (~(get by qix.gas) 'q') 'spur.t_mime.m_body.r_kids.name.t')
~|(bad-noun/seh ;;(schema (rash seh read-schem)))
(from-queries bem.gas(s but.gas) (to-queries schem))

6
ren/urb.hoon Normal file
View File

@ -0,0 +1,6 @@
/% /,
/talk /talklog-hymn/
/web /|(/!hymn/ /tree-hymn/)
/ /tree-hymn/
==
`manx`-.-

View File

@ -1,5 +1,6 @@
|-
$: body=json
$: mime=mime
body=json
head=json
snip=json
meta=json

View File

@ -1,11 +0,0 @@
/+ tree, react
/= body /: /=== /% /elem/
/= snip /: /=== /% /snip/
/= meta /: /=== /% /front/
/= sect /: /=== /% /index/
!:
^- tree-include
=+ rj=react-to-json:react
=+ fj=|=(atr=(map span span) [%o (~(run by atr) |=(a=span s/a))])
=+ ij=(map-to-json:tree |=(a=path (crip (spud a))) |=(a=marl [%a (turn a rj)]))
[(rj body) (rj /h1 hed.snip) (rj /div tal.snip) (fj meta) (ij sect)]

View File

@ -1,50 +0,0 @@
::
/? 314
/- tree-include
/= gas /$ fuel
/= dat /^ tree-include
/: /===/tree-gen /%
/tree-include/
::
/= kid /^ (map span tree-include)
/: /===/tree-gen /% 2 /_
/tree-include/
::
!:
::::
::
=+ dez=(trip &2:%)
=+ kids-json=a/(turn (~(tap by kid)) |=([a=span *] (joba %name s/a)))
;html
;head
;title: Tree
;meta(name "viewport", content "width=device-width, initial-scale=1");
;link(type "text/css", rel "stylesheet", href "//cdnjs.cloudflare.com/ajax/libs/codemirror/4.3.0/codemirror.min.css");
;link(type "text/css", rel "stylesheet", href "/{dez}/lib/css/fonts.css");
;link(type "text/css", rel "stylesheet", href "/{dez}/lib/css/bootstrap.css");
;link(type "text/css", rel "stylesheet", href "/{dez}/lib/css/codemirror.css");
;link(type "text/css", rel "stylesheet", href "/{dez}/pub/tree/main.css");
::;link(type "text/css", rel "stylesheet", href "http://localhost:8000/docs/pub/tree/src/css/main.css");
;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js");
;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js");
;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/libs/react/0.14.6/react.js");
;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/libs/react/0.14.6/react-dom.js");
;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/libs/flux/2.1.1/Flux.js");
;script(type "text/javascript", src "//cdnjs.cloudflare.com/ajax/libs/codemirror/4.3.0/codemirror.js");
;script(type "text/javascript", src "/~/at/{dez}/lib/js/urb.js");
;script(type "text/javascript", src "/{dez}/lib/js/hoon.js");
;script(type "text/javascript", src "/{dez}/pub/tree/main.js");
::;script(type "text/javascript", src "http://localhost:8000/docs/pub/tree/src/js/main.js");
==
;body
;+ =+ inject=(jobe kids/kids-json body/body.dat ~)
;script(type "text/javascript"): window.tree = {(pojo inject)}
::;div.container.nav#nav;
;div.container
;div.row#main
;div#head;
;div#body;
==
==
==
==

1
web/404.md Normal file
View File

@ -0,0 +1 @@
<list data-source="default" is404="true"/>

View File

@ -13,7 +13,7 @@
;html
;head
;title: Coinbase Auth
;script@"/~/at/home/lib/urb.js";
;script@"/~/at/lib/js/urb.js";
==
;body
;*

View File

@ -12,11 +12,11 @@
;html
;head
;script@"/~/at/home/lib/urb.js";
;script@"/~/at/lib/js/urb.js";
;script: urb.appl = 'cloud'
;script@"https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.js";
;script@"https://cdnjs.cloudflare.com/ajax/libs/react/0.12.2/react.js";
::;link/"/main/pub/cloud/src/main.css"(rel "stylesheet");
::;link/"/cloud/main.css"(rel "stylesheet");
;title: DO & GCE Manager
==
;body
@ -25,6 +25,6 @@
authcode.do='{?~(do ~ (trip u.do))}'
"""
;div#container;
;script@"/home/pub/cloud/src/main.js";
;script@"/cloud/main.js";
==
==

View File

@ -94,7 +94,7 @@ GCEControls = React.createClass({
},
render: function(){
ghref = "https://accounts.google.com/o/oauth2/auth?response_type=token&scope=https://www.googleapis.com/auth/compute&redirect_uri=http://localhost:8443/home/pub/cloud/fab&client_id=719712694742-6htfj2t9s1j2jid92rc4dfq9psrr9qpo.apps.googleusercontent.com"
ghref = "https://accounts.google.com/o/oauth2/auth?response_type=token&scope=https://www.googleapis.com/auth/compute&redirect_uri=http://localhost:8443/cloud/fab&client_id=719712694742-6htfj2t9s1j2jid92rc4dfq9psrr9qpo.apps.googleusercontent.com"
return(
div({}, [
div({}, [

View File

@ -21,7 +21,7 @@
;head
;title: Coinbase Auth
;script@"/gop/hart.js";
;script@"/gen/main/lib/urb.js";
;script@"/gen/main/lib/js/urb.js";
;script@"https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.js";
==
;body

View File

@ -1,6 +1,6 @@
:: Console front-end
::
:::: /hook/hymn/fab/sole/pub
:::: /hook/hymn/dojo/web
::
/? 310
|%
@ -18,7 +18,7 @@
"mousetrap/1.4.6/mousetrap.js"
"react/0.11.0/react.js"
==
;script(src "{(spud /~~/~/at/[&2:%]/lib/'urb.js')}");
;script@"/~~/~/at/lib/js/urb.js";
;script: urb.appl = 'dojo'
;style:'''
#term {
@ -32,8 +32,8 @@
;body
;div#err;
;div#term:""
;script@"src/share.coffee"(type "text/coffeescript");
;script@"src/main.coffee"(type "text/coffeescript");
;script@"dojo/share.coffee"(type "text/coffeescript");
;script@"dojo/main.coffee"(type "text/coffeescript");
;+ (cdnj "coffee-script/1.7.1/coffee-script.min.js")
==
==

195
web/lib/css/base.css Normal file
View File

@ -0,0 +1,195 @@
@font-face {
font-family: "bau";
src: url("//storage.googleapis.com/urbit-extra/bau.woff");
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: "bau";
src: url("//storage.googleapis.com/urbit-extra/bau-italic.woff");
font-weight: 400;
font-style: italic;
}
@font-face {
font-family: "bau";
src: url("//storage.googleapis.com/urbit-extra/bau-medium.woff");
font-weight: 500;
font-style: normal;
}
@font-face {
font-family: "bau";
src: url("//storage.googleapis.com/urbit-extra/bau-mediumitalic.woff");
font-weight: 500;
font-style: italic;
}
@font-face {
font-family: "bau";
src: url("//storage.googleapis.com/urbit-extra/bau-bold.woff");
font-weight: 600;
font-style: normal;
}
@font-face {
font-family: "bau";
src: url("//storage.googleapis.com/urbit-extra/bau-bolditalic.woff");
font-weight: 600;
font-style: italic;
}
@font-face {
font-family: "bau";
src: url("//storage.googleapis.com/urbit-extra/bau-super.woff");
font-weight: 600;
font-style: normal;
}
@font-face {
font-family: "bau";
src: url("//storage.googleapis.com/urbit-extra/bau-superitalic.woff");
font-weight: 600;
font-style: italic;
}
@font-face {
font-family: "scp";
src: url("//storage.googleapis.com/urbit-extra/scp-extralight.woff");
font-weight: 200;
font-style: normal;
}
@font-face {
font-family: "scp";
src: url("//storage.googleapis.com/urbit-extra/scp-light.woff");
font-weight: 300;
font-style: normal;
}
@font-face {
font-family: "scp";
src: url("//storage.googleapis.com/urbit-extra/scp-regular.woff");
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: "scp";
src: url("//storage.googleapis.com/urbit-extra/scp-medium.woff");
font-weight: 500;
font-style: normal;
}
@font-face {
font-family: "scp";
src: url("//storage.googleapis.com/urbit-extra/scp-bold.woff");
font-weight: 600;
font-style: normal;
}
@font-face {
font-family: "scp";
src: url("//storage.googleapis.com/urbit-extra/scp-black.woff");
font-weight: 700;
font-style: normal;
}
html,
body {
margin: 0;
padding: 0;
}
html,
input,
button,
body {
font-family: "bau";
font-size: 18px;
}
pre,
code,
.mono {
font-family:"scp";
}
#c {
width: 32rem;
margin-left: -16rem;
position: absolute;
left: 50%;
}
h1,
h2 {
font-weight: 500;
}
h1 {
font-size: 1.6rem;
}
h1:after {
content: "\2014";
margin-left: 1rem;
}
h2 {
font-size: 1rem;
}
h2.advice {
margin-top: 2rem;
color: #555;
}
#c pre {
font-size: .6rem;
margin-top: 2rem;
}
#pass {
width: 32rem;
}
button {
border: .3rem solid #000;
background-color: #fff;
font-size: 1rem;
padding: .3rem;
font-weight: 500;
}
.sig {
font-weight: 400;
font-size: 2rem;
display: inline;
vertical-align: middle;
}
span#ship {
font-family: 'bau';
font-weight: 400;
font-size: 1.2rem;
text-transform: uppercase;
letter-spacing: .1rem;
display: inline-block;
min-width: 1rem;
}
input {
font-family: 'scp';
display: inline;
}
span#ship,
input {
border: none;
padding: .3rem;
outline: none;
border-bottom: 3px solid #555;
}
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) {
#c {
width: 16rem;
margin-left: -8rem;
}
#pass {
width: 16rem;
}
input {
-webkit-appearance: none;
border-radius: 0;
}
}

View File

@ -1,4 +1,5 @@
if(!window.urb.appl) window.urb.appl = null
window.urb = window.urb || {}
window.urb.appl = window.urb.appl || null
window.urb.req = function(method,url,params,json,cb) {
var xhr = new XMLHttpRequest()
@ -281,6 +282,9 @@ window.urb.util = {
if(spur === '/') spur = ''
pathname = pathname || window.location.pathname
if(pathname[0] == '/') pathname = pathname.slice(1)
if(pathname[0] != '~' && pathname[0] != '='){
return spur
}
pathname = pathname.split("/")
var pref, pred, prec, base = ""

View File

@ -3,7 +3,7 @@
:::: /hook/hymn/match
::
/= gas /$ fuel :: get request info
/= src /: /%/ /hook/ :: current source file
/= src /: /%/ /hoon/ :: current source file
::
:::: ~sondel-forsut
::
@ -85,7 +85,7 @@
;* =- (turn `wall`- |=(a=tape ;script(type "text/javascript", src a);))
:~ "//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"
"//cdnjs.cloudflare.com/ajax/libs/codemirror/4.3.0/codemirror.js"
"/home/lib/syntax/hoon.js"
"/lib/syntax/hoon.js"
==
;link(rel "stylesheet", href "//cdnjs.cloudflare.com/ajax/libs/".
"codemirror/4.3.0/codemirror.min.css");

1
web/module/mod.hoon Normal file
View File

@ -0,0 +1 @@
;module(js "/talk/main.js", css "/talk/main.css", component "talk");

View File

@ -1,7 +1,6 @@
:: :: ::
:::: /hook/hymn/fab/oct3/pub/ ::::::
:: :: ::
=+ dez=(trip &2:%)
^- manx
;html
;head
@ -13,19 +12,19 @@
==
;script
=type "text/javascript"
=src "/~~/~/at/base/lib/urb.js"
=src "/~~/~/at/lib/js/urb.js"
;
==
;link
=type "text/css"
=rel "stylesheet"
=href "/{dez}/lib/base.css"
=href "/lib/base.css"
;
==
;link
=type "text/css"
=rel "stylesheet"
=href "/{dez}/pub/oct3/src/main.css"
=href "/oct3/main.css"
;
==
;title: :oct3
@ -44,6 +43,6 @@
==
;div#bord;
;div#audi;
;script(type "text/javascript", src "/{dez}/pub/oct3/src/main.js");
;script(type "text/javascript", src "/oct3/main.js");
==
==

44
web/paste.hoon Normal file
View File

@ -0,0 +1,44 @@
/= all /; flop /^ (list (pair time ,*)) /& /mime/
;html
;head:title:"Pastebin"
;body
;link(rel "stylesheet", href "/lib/base.css");
;link(rel "stylesheet", href "/paste/main.css");
;script@"//code.jquery.com/jquery-2.1.4.min.js";
;script@"/~/as/own/~/at/lib/js/urb.js";
;script:'''
document.title = 'pastebin - urbit'
urb.appl = 'hood'
urb.send.mark = 'write-paste'
submit = function(){
if($("select :selected").attr('value')===undefined) {
$("select").addClass('err')
return false
}
$("select").removeClass('err')
$("textarea,button").attr('disabled', true)
urb.send({
txt:$("textarea").val(),
typ:$("select :selected").val()
}, function(){
$.getJSON('paste.paste-new',null,function(resp){
if(!resp) throw "No paste"
window.location = "paste/"+resp.u
})})
}
'''
::
;h1: New
;p:textarea;
;select
;option(): Type
;option(value "md"): Markdown
;option(value "txt"): Text
;option(value "hoon"): Hoon
==
;button(onclick "submit()"):"Submit"
;hr;
;h1: Recent
;* (turn all |=([a=time *] ;p:a/"paste/{<a>}":"{<a>}"))
==
==

View File

@ -31,10 +31,10 @@
"lodash.js/2.4.1/lodash.min.js"
"react/0.13.1/react.js"
==
;script(type "text/javascript", src "{?:(aut "/~~" "")}/~/at/home/lib/js/urb.js");
;script(type "text/javascript", src "{?:(aut "/~~" "")}/~/at/lib/js/urb.js");
;meta(name "viewport", content "width=device-width, height=device-height, ".
"initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0");
;link(type "text/css", rel "stylesheet", href "/home/pub/talk/main.css");
;link(type "text/css", rel "stylesheet", href "/talk/main.css");
;title: Talk
==
;body
@ -45,6 +45,6 @@
;div#scrolling: BOTTOM
==
;script: window.talk = {(pojo (joba 'mainStation' s/man))}
;script(type "text/javascript", src "/home/pub/talk/main.js");
;script(type "text/javascript", src "/talk/main.js");
==
==

View File

@ -3,12 +3,12 @@
:::: /hook/hymn/unparse/pub
::
/= gas /$ fuel
/= src /: /%%/mear /hoon/
/= src2 /: /%/ /hook/
/= src /: /%/mear /hoon/
/= src2 /: /%/ /hoon/
::
:::: ~sondel-forsut
::
// /%%/mear
// /%/mear
!:
::::
::
@ -65,14 +65,12 @@
:: includes
;* =- (turn `wall`- |=(a=tape ;script(type "text/javascript", src a);))
:~ "//cdnjs.cloudflare.com/ajax/libs/codemirror/4.3.0/codemirror.js"
"/{&2:% ~}/lib/syntax/hoon.js"
"/lib/syntax/hoon.js"
==
;link(rel "stylesheet", href "//cdnjs.cloudflare.com/ajax/libs/".
"codemirror/4.3.0/codemirror.min.css");
;style:'''
.CodeMirror {
height: 70%
}
.CodeMirror {height: 70%}
.cm-s-default .cm-atom {color: #70f}
.cm-s-default .cm-operator {color: #097}
'''