This commit is contained in:
Gavin Whelan 2014-06-02 09:19:06 -04:00
commit 4b4ba12e1c
10 changed files with 260 additions and 194 deletions

View File

@ -1,4 +1,4 @@
!: ::
:: clay (4c), revision control :: clay (4c), revision control
:: ::
|= pit=vase |= pit=vase

View File

@ -33,7 +33,7 @@
+>(mos [[hen [%give %blit (flop wab)]] mos]) +>(mos [[hen [%give %blit (flop wab)]] mos])
:: ::
++ wod :: word forward ++ wod :: word forward
|= bed=bean |= bed=bein
^- @ud ^- @ud
?: =(bul.bed bus.bed) ?: =(bul.bed bus.bed)
bus.bed bus.bed
@ -48,7 +48,7 @@
$(bus.bed +(bus.bed)) $(bus.bed +(bus.bed))
:: ::
++ wob :: word backward ++ wob :: word backward
|= bed=bean |= bed=bein
^- @ud ^- @ud
?: =(0 bus.bed) ?: =(0 bus.bed)
bus.bed bus.bed
@ -63,7 +63,7 @@
$(bus.bed (dec bus.bed)) $(bus.bed (dec bus.bed))
:: ::
++ edit :: change the bed ++ edit :: change the bed
|= bed=bean |= bed=bein
^+ +> ^+ +>
=. q.q.yar [~ bed] =. q.q.yar [~ bed]
?> ?=(^ q.q.yar) ?> ?=(^ q.q.yar)
@ -388,7 +388,7 @@
:: ::
%helo :: trigger prompt %helo :: trigger prompt
%- edit %- edit
=| bed=bean =| bed=bein
=+ ^= hyt ^- hist =+ ^= hyt ^- hist
=+ hyt=(~(get by r.yar) p.fav) =+ hyt=(~(get by r.yar) p.fav)
?~(hyt *hist u.hyt) ?~(hyt *hist u.hyt)

View File

@ -275,7 +275,7 @@
== ==
:: ::
%waft %waft
?. ?=([%hork @ @ ~] tea) ?. ?=([%hork @ ~] tea)
+.$ +.$
(gosh q.p.fav (need (slaw %ud i.t.tea)) ((hard httr) q.fav)) (gosh q.p.fav (need (slaw %ud i.t.tea)) ((hard httr) q.fav))
:: ::
@ -442,13 +442,13 @@
== ==
:: ::
++ hoth :: simple app request ++ hoth :: simple app request
|= [our=ship num=@ud ses=hole app=term pax=path] |= [our=ship num=@ud ses=hole app=term hop=hope]
%_ +> %_ +>
mow mow
:_ mow :_ mow
:^ hen %toss %g :^ hen %toss %g
:- [%hoth (scot %p our) ses (scot %ud num) ~] :- [%hoth (scot %p our) ses (scot %ud num) ~]
[%show [our app] ~ `(unit plan)``[%x [now `~0s] pax]] [%show [our app] ~ hop]
== ==
:: ::
++ hork :: remote request ++ hork :: remote request
@ -854,7 +854,7 @@
^- (unit seam) ^- (unit seam)
?> ?=(^ fur) ?> ?=(^ fur)
?> ?=(^ paw) ?> ?=(^ paw)
`[%aps u.fur i.paw t.paw] `[%apg u.fur i.paw t.paw]
:: ::
++ flea :: permissive decimal ++ flea :: permissive decimal
|= txt=@t |= txt=@t
@ -1449,9 +1449,15 @@
%way [[~ pip] +>.$] %way [[~ pip] +>.$]
%new %new
?- -.som.pip ?- -.som.pip
%aps :: XX a mere stub %apg :: XX a mere stub
~& [%wink-apg p.som.pip r.som.pip]
:- [~ pip(pez %way)] :- [~ pip(pez %way)]
+>.$(..ya (hoth our num ses p.som.pip r.som.pip)) +>.$(..ya (hoth our num ses q.som.pip %& r.som.pip))
::
%apl !!
%apm !!
%aps !!
%apu !!
:: ::
%con %con
:_ +>.$ :_ +>.$
@ -1559,7 +1565,9 @@
; ;
; if(e.keyCode == 69 && ctrl == true) { ; if(e.keyCode == 69 && ctrl == true) {
; console.log('^e') ; console.log('^e')
; $input[0].selectionStart = $input[0].selectionEnd = $input.val().length ; $input[0].selectionStart =
; $input[0].selectionEnd =
; $input.val().length;
; return ; return
; } ; }
; if(e.keyCode == 65 && ctrl == true) { ; if(e.keyCode == 65 && ctrl == true) {
@ -1591,7 +1599,8 @@
; $input.val(hist[hind]) ; $input.val(hist[hind])
; setTimeout(function() { ; setTimeout(function() {
; console.log(hist[hind].length) ; console.log(hist[hind].length)
; $input[0].setSelectionRange(hist[hind].length,hist[hind].length) ; $input[0].setSelectionRange
; (hist[hind].length,hist[hind].length)
; }, 0) ; }, 0)
; return; ; return;
; } ; }

View File

@ -516,6 +516,7 @@
++ make :: reduce silk ++ make :: reduce silk
|= [cof=cafe kas=silk] |= [cof=cafe kas=silk]
^- (bolt cage) ^- (bolt cage)
~& %ford-make
?- -.kas ?- -.kas
^ ^
%. [cof p.kas q.kas] %. [cof p.kas q.kas]

View File

@ -3,7 +3,7 @@
:::: ::::
|= pit=vase |= pit=vase
=> =~ => =~
|% :::::::::::::::::::::::::::::::::::::::::::::::::::::: structures |% :::::::::::::::::::::::::::::::::::::::::::::::::::::: structures
++ axle :: all %gall state ++ axle :: all %gall state
$: %0 :: state version $: %0 :: state version
pol=(map ship mast) :: apps by ship pol=(map ship mast) :: apps by ship
@ -11,24 +11,31 @@
++ bone ,@ud :: opaque duct ++ bone ,@ud :: opaque duct
++ gift :: out result <-$ ++ gift :: out result <-$
$% [%back p=?] :: %mess ack good/bad $% [%back p=?] :: %mess ack good/bad
[%bock p=path q=?] :: %show on/off [%bust ~] :: reset duct
[%crud p=(list tank)] :: error [%crud p=(list tank)] :: error
[%meta p=vase] :: application gift [%rash p=json] :: web reaction
[%rasp p=cage] :: urbit reaction
[%rush p=@da q=json] :: web result
[%rust p=@da q=cage] :: urbit result
[%meta p=vase] :: meta-gift
== :: == ::
++ kiss :: in request ->$ ++ kiss :: in request ->$
$% [%mess p=hasp q=(disk)] :: urbit message $% [%cuff p=(unit cuff) q=kiss] :: controlled kiss
[%mesh p=hasp q=path r=json] :: web message (json)
[%mess p=hasp q=cage] :: urbit message
[%mush p=hasp q=path r=cage] :: web message (mime)
[%nuke p=hasp] :: reset this duct [%nuke p=hasp] :: reset this duct
:: [%puke p=(list tank) q=kiss] :: inbound error :: [%puke p=(list tank) q=kiss] :: kiss will fail
[%user p=(unit chop) q=kiss] :: restriction [%shah p=hasp q=(unit hope)] :: web subscribe
[%show p=hasp q=path r=(unit plan)] :: subscription [%show p=hasp q=(unit hope)] :: urbit subscribe
[%soft p=*] :: soft kiss [%soft p=*] :: soft kiss
== :: == ::
++ knob :: pending action ++ knob :: pending action
$% [%boot ~] :: boot/reboot $% [%boot ~] :: boot/reboot
[%crud p=(list tank)] :: error [%crud p=(list tank)] :: error
[%mess p=(disk)] :: message [%mess p=cage] :: message
[%nuke ~] :: reboot [%nuke ~] :: reboot
[%show p=path q=(unit plan)] :: subscription [%show p=(unit hope)] :: subscription
[%take p=path q=vase] :: user result [%take p=path q=vase] :: user result
== :: == ::
++ mast :: apps by ship ++ mast :: apps by ship
@ -39,7 +46,7 @@
++ rapt |*(a=$+(* *) (qual path path ,@da a)) :: versioned result ++ rapt |*(a=$+(* *) (qual path path ,@da a)) :: versioned result
++ scar :: opaque duct system ++ scar :: opaque duct system
$: p=@ud :: bone sequence $: p=@ud :: bone sequence
q=(map duct ,[p=bone q=(unit chop)]) :: by duct q=(map duct ,[p=bone q=(unit cuff)]) :: by duct
r=(map bone duct) :: by bone r=(map bone duct) :: by bone
== :: == ::
++ seat :: the living app ++ seat :: the living app
@ -55,20 +62,6 @@
[%ruse p=curd] :: user wrapper [%ruse p=curd] :: user wrapper
[%writ p=riot] :: version result [%writ p=riot] :: version result
== :: == ::
++ suit :: application gift
$% [%back p=?] :: %mess ack good/bad
[%bock p=path q=?] :: %show on/off
[%boom ~] :: reset all ducts
[%bust ~] :: reset this duct
[%barn p=(rapt (disk))] :: %v report
[%crud p=(list tank)] :: error notification
[%dash p=(rapt null)] :: %u report
[%dish p=(rapt (disk))] :: %z report
[%diff p=(rapt (unit (disk)))] :: %w report
[%file p=(rapt (disk))] :: %x report
[%fold p=(rapt arch)] :: %y report
[%rasp p=(disk)] :: response message
== ::
++ toil (pair duct knob) :: work in progress ++ toil (pair duct knob) :: work in progress
-- :::::::::::::::::::::::::::::::::::::::::::::::::::::: -- ::::::::::::::::::::::::::::::::::::::::::::::::::::::
|% :::::::::::::::::::::::::::::::::::::::::::::::::::::: functions |% :::::::::::::::::::::::::::::::::::::::::::::::::::::: functions
@ -83,17 +76,17 @@
all all
:: ::
++ read :: read permission ++ read :: read permission
|= law=(unit chop) |= law=(unit cuff)
^- (unit (set monk)) ^- (unit (set monk))
?~(law [~ ~] p.u.law) ?~(law [~ ~] p.u.law)
:: ::
++ ride :: all permission ++ ride :: all permission
|= [use=(unit (set monk)) say=(unit (set monk))] |= [use=(unit (set monk)) say=(unit (set monk))]
^- (unit chop) ^- (unit cuff)
?~(say ~ `[use u.say]) ?~(say ~ `[use u.say])
:: ::
++ rite :: write permission ++ rite :: write permission
|= law=(unit chop) |= law=(unit cuff)
^- (unit (set monk)) ^- (unit (set monk))
?~(law ~ `q.u.law) ?~(law ~ `q.u.law)
:: ::
@ -107,9 +100,9 @@
^+ one ^+ one
(~(gas by one) (~(tap by two) ~)) :: XX ugh (~(gas by one) (~(tap by two) ~)) :: XX ugh
:: ::
++ limp :: merge chops ++ limp :: merge cuffs
|= [a=(unit chop) b=(unit chop)] |= [a=(unit cuff) b=(unit cuff)]
^- (unit chop) ^- (unit cuff)
?~ a b ?~ a b
?~ b a ?~ b a
:- ~ :- ~
@ -135,23 +128,26 @@
++ call :: handle request ++ call :: handle request
|= [hen=duct hil=(hypo kiss)] |= [hen=duct hil=(hypo kiss)]
|- ^- [p=(list move) q=_..^^$] |- ^- [p=(list move) q=_..^^$]
=+ =| law=(unit chop) =+ =| law=(unit cuff)
|- ^- $: law=(unit chop) |- ^- $: law=(unit cuff)
hap=hasp hap=hasp
kon=knob kon=knob
== ==
?- -.q.hil ?- -.q.hil
%cuff $(q.hil q.q.hil, law (limp p.q.hil law))
%mesh !!
%mess [law p.q.hil %mess q.q.hil] %mess [law p.q.hil %mess q.q.hil]
%show [law p.q.hil %show q.q.hil r.q.hil] %mush !!
%shah !!
%show [law p.q.hil %show q.q.hil]
%soft $(q.hil ((hard kiss) p.q.hil)) %soft $(q.hil ((hard kiss) p.q.hil))
%nuke [law p.q.hil %nuke ~] %nuke [law p.q.hil %nuke ~]
%user $(q.hil q.q.hil, law (limp p.q.hil law))
== ==
abet:work:(quem:(boar:(goat hap) hen law) kon) abet:work:(quem:(boar:(goat hap) hen law) kon)
:: ::
++ take :: accept response ++ take :: accept response
|= [pax=path hen=duct hil=(hypo sign)] :: |= [pax=path hen=duct hil=(hypo sign)] ::
^- [(list move) _..^$] ^- [p=(list move) q=_..^$]
=+ lum=(lump pax) =+ lum=(lump pax)
=< abet =< work =< abet =< work
(more:(bear:(gaur p.lum) hen) q.lum hil) (more:(bear:(gaur p.lum) hen) q.lum hil)
@ -250,7 +246,7 @@
:: ::
++ boar :: write forward ++ boar :: write forward
|= $: hen=duct :: cause |= $: hen=duct :: cause
law=(unit chop) :: permissions law=(unit cuff) :: permissions
== ==
=^ orf zam.sat =^ orf zam.sat
=+ orf=(~(get by q.zam.sat) hen) =+ orf=(~(get by q.zam.sat) hen)
@ -466,9 +462,9 @@
[(sump (slot 2 vud)) $(vud (slot 3 vud))] [(sump (slot 2 vud)) $(vud (slot 3 vud))]
:: ::
++ show :: subscribe ++ show :: subscribe
|= [pax=path pul=(unit plan)] :: subscription |= hup=(unit hope) :: subscription
^+ +> ^+ +>
%_(+> vey.sat (~(put to vey.sat) hen %show pax pul)) %_(+> vey.sat (~(put to vey.sat) hen %show hup))
:: ::
++ sump ++ sump
|= wec=vase |= wec=vase
@ -540,9 +536,9 @@
~& %yawn-show ~& %yawn-show
?~ huv.sat ?~ huv.sat
~& [%show-none our app] ~& [%show-none our app]
gone:(give %bock p.kon |) gone:(give %bust ~)
%^ game [%step %peer] u.huv.sat %^ game [%step %peer] u.huv.sat
!>([ost use p.kon q.kon]) !>([ost use p.kon])
:: ::
%take %take
~& %yawn-take ~& %yawn-take

View File

@ -480,7 +480,8 @@
$(a (sub a b), c +(c)) $(a (sub a b), c +(c))
:: ::
++ fac :: factorial ++ fac :: factorial
|= a=@ :: This should be jetted. ~/ %fac
|= a=@
^- @ ^- @
?: =(0 a) ?: =(0 a)
1 1
@ -1323,7 +1324,7 @@
++ in :: set engine ++ in :: set engine
~/ %in ~/ %in
|/ a=(set) |/ a=(set)
+- all +- all :: logical AND
~/ %all ~/ %all
|* b=$+(* ?) |* b=$+(* ?)
|- ^- ? |- ^- ?
@ -1331,7 +1332,7 @@
& &
?&((b n.a) $(a l.a) $(a r.a)) ?&((b n.a) $(a l.a) $(a r.a))
:: ::
+- any +- any :: logical OR
~/ %any ~/ %any
|* b=$+(* ?) |* b=$+(* ?)
|- ^- ? |- ^- ?
@ -1339,7 +1340,7 @@
| |
?|((b n.a) $(a l.a) $(a r.a)) ?|((b n.a) $(a l.a) $(a r.a))
:: ::
+- del +- del :: b without any a
~/ %del ~/ %del
|* b=* |* b=*
|- ^+ a |- ^+ a
@ -1356,7 +1357,7 @@
[n.l.a l.l.a $(l.a r.l.a)] [n.l.a l.l.a $(l.a r.l.a)]
[n.r.a $(r.a l.r.a) r.r.a] [n.r.a $(r.a l.r.a) r.r.a]
:: ::
+- dig +- dig :: axis of a in b
|= b=* |= b=*
=+ c=1 =+ c=1
|- ^- (unit ,@) |- ^- (unit ,@)
@ -1366,7 +1367,7 @@
$(a l.a, c (peg c 6)) $(a l.a, c (peg c 6))
$(a r.a, c (peg c 7)) $(a r.a, c (peg c 7))
:: ::
+- gas +- gas :: concatenate
~/ %gas ~/ %gas
|= b=(list ,_?>(?=(^ a) n.a)) |= b=(list ,_?>(?=(^ a) n.a))
|- ^+ a |- ^+ a
@ -1374,7 +1375,7 @@
a a
$(b t.b, a (put(+< a) i.b)) $(b t.b, a (put(+< a) i.b))
:: ::
+- has +- has :: b exists in a check
~/ %has ~/ %has
|* b=* |* b=*
|- ^- ? |- ^- ?
@ -1386,7 +1387,7 @@
$(a l.a) $(a l.a)
$(a r.a) $(a r.a)
:: ::
+- put +- put :: puts b in a, sorted
~/ %put ~/ %put
|* b=* |* b=*
|- ^+ a |- ^+ a
@ -1406,13 +1407,13 @@
[n.a l.a c] [n.a l.a c]
[n.c [n.a l.a l.c] r.c] [n.c [n.a l.a l.c] r.c]
:: ::
+- rep +- rep :: replace by tile
|* [b=* c=_,*] |* [b=* c=_,*]
|- |-
?~ a b ?~ a b
$(a r.a, b $(a l.a, b (c n.a b))) $(a r.a, b $(a l.a, b (c n.a b)))
:: ::
+- tap +- tap :: list tiles a set
~/ %tap ~/ %tap
|= b=(list ,_?>(?=(^ a) n.a)) |= b=(list ,_?>(?=(^ a) n.a))
^+ b ^+ b
@ -1420,7 +1421,7 @@
b b
$(a r.a, b [n.a $(a l.a)]) $(a r.a, b [n.a $(a l.a)])
:: ::
+- wyt +- wyt :: depth of set
.+ .+
|- ^- @ |- ^- @
?~(a 0 +((add $(a l.a) $(a r.a)))) ?~(a 0 +((add $(a l.a) $(a r.a))))
@ -1438,12 +1439,12 @@
:: ::
++ ja :: jar engine ++ ja :: jar engine
|/ a=(jar) |/ a=(jar)
+- get +- get :: gets list by key
|* b=* |* b=*
=+ c=(~(get by a) b) =+ c=(~(get by a) b)
?~(c ~ u.c) ?~(c ~ u.c)
:: ::
+- add +- add :: adds key-list pair
|* [b=* c=*] |* [b=* c=*]
=+ d=(get(a +>) b) =+ d=(get(a +>) b)
(~(put by a) [d c]) (~(put by a) [d c])
@ -1451,17 +1452,17 @@
:: ::
++ ju :: jug engine ++ ju :: jug engine
|/ a=(jug) |/ a=(jug)
+- get +- get :: gets set by key
|* b=* |* b=*
=+ c=(~(get by a) b) =+ c=(~(get by a) b)
?~(c ~ u.c) ?~(c ~ u.c)
:: ::
+- has +- has :: existence check
|* [b=* c=*] |* [b=* c=*]
^- ? ^- ?
(~(has in (get(+< a) b)) c) (~(has in (get(+< a) b)) c)
:: ::
+- put +- put :: adds key-set pair
|* [b=* c=*] |* [b=* c=*]
^+ a ^+ a
=+ d=(get(+< a) b) =+ d=(get(+< a) b)
@ -1471,7 +1472,7 @@
++ by :: map engine ++ by :: map engine
~/ %by ~/ %by
|/ a=(map) |/ a=(map)
+- all +- all :: logical AND
~/ %all ~/ %all
|* b=$+(* ?) |* b=$+(* ?)
|- ^- ? |- ^- ?
@ -1479,7 +1480,7 @@
& &
?&((b q.n.a) $(a l.a) $(a r.a)) ?&((b q.n.a) $(a l.a) $(a r.a))
:: ::
+- any +- any :: logical OR
~/ %any ~/ %any
|* b=$+(* ?) |* b=$+(* ?)
|- ^- ? |- ^- ?
@ -1487,7 +1488,7 @@
| |
?|((b q.n.a) $(a l.a) $(a r.a)) ?|((b q.n.a) $(a l.a) $(a r.a))
:: ::
+- del +- del :: delete at key b
~/ %del ~/ %del
|* b=* |* b=*
|- ^+ a |- ^+ a
@ -1504,7 +1505,7 @@
[n.l.a l.l.a $(l.a r.l.a)] [n.l.a l.l.a $(l.a r.l.a)]
[n.r.a $(r.a l.r.a) r.r.a] [n.r.a $(r.a l.r.a) r.r.a]
:: ::
+- dig +- dig :: axis of b key
|= b=* |= b=*
=+ c=1 =+ c=1
|- ^- (unit ,@) |- ^- (unit ,@)
@ -1514,7 +1515,7 @@
$(a l.a, c (peg c 6)) $(a l.a, c (peg c 6))
$(a r.a, c (peg c 7)) $(a r.a, c (peg c 7))
:: ::
+- gas +- gas :: concatenate
~/ %gas ~/ %gas
|* b=(list ,[p=* q=*]) |* b=(list ,[p=* q=*])
=> .(b `(list ,_?>(?=(^ a) n.a))`b) => .(b `(list ,_?>(?=(^ a) n.a))`b)
@ -1523,7 +1524,7 @@
a a
$(b t.b, a (put(+< a) p.i.b q.i.b)) $(b t.b, a (put(+< a) p.i.b q.i.b))
:: ::
+- get +- get :: grab value by key
~/ %get ~/ %get
|* b=* |* b=*
|- ^- ?(~ [~ u=_?>(?=(^ a) q.n.a)]) |- ^- ?(~ [~ u=_?>(?=(^ a) q.n.a)])
@ -1535,18 +1536,18 @@
$(a l.a) $(a l.a)
$(a r.a) $(a r.a)
:: ::
+- has +- has :: key existence check
~/ %has ~/ %has
|* b=* |* b=*
!=(~ (get(+< a) b)) !=(~ (get(+< a) b))
:: ::
+- mar +- mar :: add with validation
|* [b=_?>(?=(^ a) p.n.a) c=(unit ,_?>(?=(^ a) q.n.a))] |* [b=_?>(?=(^ a) p.n.a) c=(unit ,_?>(?=(^ a) q.n.a))]
?~ c ?~ c
(del b) (del b)
(put b u.c) (put b u.c)
:: ::
+- put +- put :: adds key-value pair
~/ %put ~/ %put
|* [b=* c=*] |* [b=* c=*]
|- ^+ a |- ^+ a
@ -1568,13 +1569,13 @@
[n.a l.a d] [n.a l.a d]
[n.d [n.a l.a l.d] r.d] [n.d [n.a l.a l.d] r.d]
:: ::
+- rep +- rep :: replace by product
|* [b=* c=_,*] |* [b=* c=_,*]
|- |-
?~ a b ?~ a b
$(a r.a, b $(a l.a, b (c n.a b))) $(a r.a, b $(a l.a, b (c n.a b)))
:: ::
+- rib +- rib :: transform + product
|* [b=* c=_,*] |* [b=* c=_,*]
|- ^+ [b a] |- ^+ [b a]
?~ a [b ~] ?~ a [b ~]
@ -1584,13 +1585,13 @@
=+ f=$(a r.a, b -.e) =+ f=$(a r.a, b -.e)
[-.f [n.a +.e +.f]] [-.f [n.a +.e +.f]]
:: ::
+- run +- run :: turns to tuples
|* b=_,* |* b=_,*
|- |-
?~ a a ?~ a a
[[p.n.a (b q.n.a)] $(a l.a) $(a r.a)] [[p.n.a (b q.n.a)] $(a l.a) $(a r.a)]
:: ::
+- tap +- tap :: listify pairs
~/ %tap ~/ %tap
|= b=(list ,_?>(?=(^ a) n.a)) |= b=(list ,_?>(?=(^ a) n.a))
^+ b ^+ b
@ -1598,7 +1599,7 @@
b b
$(a r.a, b [n.a $(a l.a)]) $(a r.a, b [n.a $(a l.a)])
:: ::
+- uni +- uni :: union, merge
~/ %uni ~/ %uni
|= b=_a |= b=_a
?@ b a ?@ b a
@ -1607,7 +1608,7 @@
b (~(uni by l.b) r.b) b (~(uni by l.b) r.b)
== ==
:: ::
+- wyt +- wyt :: depth of map
.+ .+
|- ^- @ |- ^- @
?~(a 0 +((add $(a l.a) $(a r.a)))) ?~(a 0 +((add $(a l.a) $(a r.a))))
@ -1626,17 +1627,17 @@
$(a [n.r.a $(a [n.a l.a l.r.a]) r.r.a]) $(a [n.r.a $(a [n.a l.a l.r.a]) r.r.a])
a a
:: ::
+- dep +- dep :: max depth of queue
|- ^- @ |- ^- @
?~ a 0 ?~ a 0
+((max $(a l.a) $(a r.a))) +((max $(a l.a) $(a r.a)))
:: ::
+- gas +- gas :: insert list to que
|= b=(list ,_?>(?=(^ a) n.a)) |= b=(list ,_?>(?=(^ a) n.a))
|- ^+ a |- ^+ a
?~(b a $(b t.b, a (put(+< a) i.b))) ?~(b a $(b t.b, a (put(+< a) i.b)))
:: ::
+- get +- get :: head-tail pair
|- ^+ [p=?>(?=(^ a) n.a) q=a] |- ^+ [p=?>(?=(^ a) n.a) q=a]
?~ a ?~ a
!! !!
@ -1648,27 +1649,27 @@
[n.a l.a q.b] [n.a l.a q.b]
[n.q.b [n.a l.a l.q.b] r.q.b] [n.q.b [n.a l.a l.q.b] r.q.b]
:: ::
+- nap +- nap :: removes head
?> ?=(^ a) ?> ?=(^ a)
?: =(~ l.a) r.a ?: =(~ l.a) r.a
=+ b=get(+< l.a) =+ b=get(+< l.a)
bal(+< ^+(a [p.b q.b r.a])) bal(+< ^+(a [p.b q.b r.a]))
:: ::
+- put +- put :: insert new head
|* b=* |* b=*
|- ^+ a |- ^+ a
?~ a ?~ a
[b ~ ~] [b ~ ~]
bal(+< a(l $(a l.a))) bal(+< a(l $(a l.a)))
:: ::
+- tap +- tap :: adds list to end
|= b=(list ,_?>(?=(^ a) n.a)) |= b=(list ,_?>(?=(^ a) n.a))
^+ b ^+ b
?~ a ?~ a
b b
$(a r.a, b [n.a $(a l.a)]) $(a r.a, b [n.a $(a l.a)])
:: ::
+- top +- top :: produces head
|- ^- (unit ,_?>(?=(^ a) n.a)) |- ^- (unit ,_?>(?=(^ a) n.a))
?~ a ~ ?~ a ~
?~(r.a [~ n.a] $(a r.a)) ?~(r.a [~ n.a] $(a r.a))
@ -1772,19 +1773,19 @@
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: section 2eB, parsing (tracing) :: :: section 2eB, parsing (tracing) ::
:: ::
++ last |= [zyc=hair naz=hair] ++ last |= [zyc=hair naz=hair] :: farther trace
^- hair ^- hair
?: =(p.zyc p.naz) ?: =(p.zyc p.naz)
?:((gth q.zyc q.naz) zyc naz) ?:((gth q.zyc q.naz) zyc naz)
?:((gth p.zyc p.naz) zyc naz) ?:((gth p.zyc p.naz) zyc naz)
:: ::
++ lust |= [weq=char naz=hair] ++ lust |= [weq=char naz=hair] :: detect newline
^- hair ^- hair
?:(=(10 weq) [+(p.naz) 1] [p.naz +(q.naz)]) ?:(=(10 weq) [+(p.naz) 1] [p.naz +(q.naz)])
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: section 2eC, parsing (custom rules) :: :: section 2eC, parsing (custom rules) ::
:: ::
++ cold ++ cold :: replace w/ constant
~/ %cold ~/ %cold
|* [cus=* sef=_rule] |* [cus=* sef=_rule]
~/ %fun ~/ %fun
@ -1794,7 +1795,7 @@
vex vex
[p=p.vex q=[~ u=[p=cus q=q.u.q.vex]]] [p=p.vex q=[~ u=[p=cus q=q.u.q.vex]]]
:: ::
++ cook ++ cook :: apply gate
~/ %cook ~/ %cook
|* [poq=_,* sef=_rule] |* [poq=_,* sef=_rule]
~/ %fun ~/ %fun
@ -1804,7 +1805,7 @@
vex vex
[p=p.vex q=[~ u=[p=(poq p.u.q.vex) q=q.u.q.vex]]] [p=p.vex q=[~ u=[p=(poq p.u.q.vex) q=q.u.q.vex]]]
:: ::
++ easy ++ easy :: always parse
~/ %easy ~/ %easy
|* huf=* |* huf=*
~/ %fun ~/ %fun
@ -1812,19 +1813,19 @@
^- (like ,_huf) ^- (like ,_huf)
[p=p.tub q=[~ u=[p=huf q=tub]]] [p=p.tub q=[~ u=[p=huf q=tub]]]
:: ::
++ fail |=(tub=nail [p=p.tub q=~]) ++ fail |=(tub=nail [p=p.tub q=~]) :: never parse
++ full ++ full :: has to fully parse
|* sef=_rule |* sef=_rule
|= tub=nail |= tub=nail
=+ vex=(sef tub) =+ vex=(sef tub)
?@(q.vex vex ?:(=(~ q.q.u.q.vex) vex [p=p.vex q=~])) ?@(q.vex vex ?:(=(~ q.q.u.q.vex) vex [p=p.vex q=~]))
:: ::
++ funk ++ funk :: add to tape first
|* [pre=tape sef=_rule] |* [pre=tape sef=_rule]
|= tub=nail |= tub=nail
(sef p.tub (weld pre q.tub)) (sef p.tub (weld pre q.tub))
:: ::
++ here ++ here :: place-based apply
~/ %here ~/ %here
|* [hez=_|=([a=pint b=*] [a b]) sef=_rule] |* [hez=_|=([a=pint b=*] [a b]) sef=_rule]
~/ %fun ~/ %fun
@ -1834,7 +1835,7 @@
vex vex
[p=p.vex q=[~ u=[p=(hez [p.tub p.q.u.q.vex] p.u.q.vex) q=q.u.q.vex]]] [p=p.vex q=[~ u=[p=(hez [p.tub p.q.u.q.vex] p.u.q.vex) q=q.u.q.vex]]]
:: ::
++ jest ++ jest :: match a cord
|= daf=@t |= daf=@t
|= tub=nail |= tub=nail
=+ fad=daf =+ fad=daf
@ -1846,7 +1847,7 @@
$(p.tub (lust i.q.tub p.tub), q.tub t.q.tub, daf (rsh 3 1 daf)) $(p.tub (lust i.q.tub p.tub), q.tub t.q.tub, daf (rsh 3 1 daf))
:: ::
++ just :: XX redundant, jest ++ just :: XX redundant, jest
~/ %just ~/ %just :: match a char
|= daf=char |= daf=char
~/ %fun ~/ %fun
|= tub=nail |= tub=nail
@ -1857,13 +1858,13 @@
(fail tub) (fail tub)
(next tub) (next tub)
:: ::
++ knee ++ knee :: callbacks
|* [gar=* sef=_|.(rule)] |* [gar=* sef=_|.(rule)]
|= tub=nail |= tub=nail
^- (like ,_gar) ^- (like ,_gar)
((sef) tub) ((sef) tub)
:: ::
++ mask ++ mask :: match char in set
~/ %mask ~/ %mask
|= bud=(list char) |= bud=(list char)
~/ %fun ~/ %fun
@ -1875,7 +1876,7 @@
(fail tub) (fail tub)
(next tub) (next tub)
:: ::
++ next ++ next :: consume a char
|= tub=nail |= tub=nail
^- (like char) ^- (like char)
?@ q.tub ?@ q.tub
@ -1883,7 +1884,7 @@
=+ zac=(lust i.q.tub p.tub) =+ zac=(lust i.q.tub p.tub)
[zac [~ i.q.tub [zac t.q.tub]]] [zac [~ i.q.tub [zac t.q.tub]]]
:: ::
++ sear ++ sear :: conditional cook
~/ %sear ~/ %sear
|* [pyq=_|=(* *(unit)) sef=_rule] |* [pyq=_|=(* *(unit)) sef=_rule]
~/ %fun ~/ %fun
@ -1896,7 +1897,7 @@
[p=p.vex q=~] [p=p.vex q=~]
[p=p.vex q=[~ u=[p=u.gey q=q.u.q.vex]]] [p=p.vex q=[~ u=[p=u.gey q=q.u.q.vex]]]
:: ::
++ shim ++ shim :: match char in range
~/ %shim ~/ %shim
|= [les=@ mos=@] |= [les=@ mos=@]
~/ %fun ~/ %fun
@ -1908,7 +1909,7 @@
(fail tub) (fail tub)
(next tub) (next tub)
:: ::
++ stag ++ stag :: add a label
~/ %stag ~/ %stag
|* [gob=* sef=_rule] |* [gob=* sef=_rule]
~/ %fun ~/ %fun
@ -1982,7 +1983,7 @@
?> ?=(^ q.wag) ?> ?=(^ q.wag)
[(last p.vex p.wag) [~ (raq p.u.q.vex p.u.q.wag) q.u.q.wag]] [(last p.vex p.wag) [~ (raq p.u.q.vex p.u.q.wag) q.u.q.wag]]
:: ::
++ stun ++ stun :: parse several times
~/ %stun ~/ %stun
|* [[les=@ mos=@] fel=_rule] |* [[les=@ mos=@] fel=_rule]
~/ %fun ~/ %fun
@ -2006,7 +2007,7 @@
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: section 2eD, parsing (combinators) :: :: section 2eD, parsing (combinators) ::
:: ::
++ bend ++ bend :: conditional comp
~/ %bend ~/ %bend
|* raq=_|*([a=* b=*] [~ u=[a b]]) |* raq=_|*([a=* b=*] [~ u=[a b]])
~/ %fun ~/ %fun
@ -2024,7 +2025,7 @@
:: ::
++ comp ++ comp
~/ %comp ~/ %comp
|* raq=_|*([a=* b=*] [a b]) |* raq=_|*([a=* b=*] [a b]) :: arbitrary compose
~/ %fun ~/ %fun
|* [vex=edge sab=_rule] |* [vex=edge sab=_rule]
?@ q.vex ?@ q.vex
@ -2035,18 +2036,18 @@
[p=yur q=q.yit] [p=yur q=q.yit]
[p=yur q=[~ u=[p=(raq p.u.q.vex p.u.q.yit) q=q.u.q.yit]]] [p=yur q=[~ u=[p=(raq p.u.q.vex p.u.q.yit) q=q.u.q.yit]]]
:: ::
++ glue ++ glue :: add rule
~/ %glue ~/ %glue
|* bus=_rule |* bus=_rule
~/ %fun ~/ %fun
|* [vex=edge sab=_rule] |* [vex=edge sab=_rule]
(plug vex ;~(pfix bus sab)) (plug vex ;~(pfix bus sab))
:: ::
++ pfix ++ pfix :: discard first rule
~/ %pfix ~/ %pfix
(comp |*([a=* b=*] b)) (comp |*([a=* b=*] b))
:: ::
++ plug ++ plug :: first then second
~/ %plug ~/ %plug
|* [vex=edge sab=_rule] |* [vex=edge sab=_rule]
?@ q.vex ?@ q.vex
@ -2057,7 +2058,7 @@
[p=yur q=q.yit] [p=yur q=q.yit]
[p=yur q=[~ u=[p=[p.u.q.vex p.u.q.yit] q=q.u.q.yit]]] [p=yur q=[~ u=[p=[p.u.q.vex p.u.q.yit] q=q.u.q.yit]]]
:: ::
++ pose ++ pose :: first or second
~/ %pose ~/ %pose
|* [vex=edge sab=_rule] |* [vex=edge sab=_rule]
?@ q.vex ?@ q.vex
@ -2065,7 +2066,7 @@
[p=(last p.vex p.roq) q=q.roq] [p=(last p.vex p.roq) q=q.roq]
vex vex
:: ::
++ sfix ++ sfix :: discard second rule
~/ %sfix ~/ %sfix
(comp |*([a=* b=*] a)) (comp |*([a=* b=*] a))
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@ -2107,7 +2108,7 @@
|* [bus=_rule fel=_rule] |* [bus=_rule fel=_rule]
;~((comp raq) fel (stir rud raq ;~(pfix bus fel))) ;~((comp raq) fel (stir rud raq ;~(pfix bus fel)))
:: ::
++ star ++ star :: 0 or more times
|* fel=_rule |* fel=_rule
(stir `(list ,_(wonk *fel))`~ |*([a=* b=*] [a b]) fel) (stir `(list ,_(wonk *fel))`~ |*([a=* b=*] [a b]) fel)
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@ -2149,16 +2150,19 @@
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: section 2eG, parsing (whitespace) :: :: section 2eG, parsing (whitespace) ::
:: ::
++ dog ;~(plug dot gay) ++ dog ;~(plug dot gay) ::
++ doh ;~(plug ;~(plug hep hep) gay) ++ doh ;~(plug ;~(plug hep hep) gay) ::
++ dun (cold ~ ;~(plug hep hep)) ++ dun (cold ~ ;~(plug hep hep)) :: -- (phep) to ~
++ duq (cold ~ ;~(plug tis hep)) ++ duz (cold ~ ;~(plug tis tis)) :: == (stet) to ~
++ duz (cold ~ ;~(plug tis tis)) ++ gah (mask [`@`10 ' ' ~]) :: newline or ace
++ gah (mask [`@`10 ' ' ~]) ++ gap (cold ~ ;~(plug gaq (star ;~(pose vul gah)))) ::
++ gap (cold ~ ;~(plug gaq (star ;~(pose vul gah)))) ++ gaq ;~ pose :: end of line
++ gaq ;~(pose (just `@`10) ;~(plug gah ;~(pose gah vul)) vul) (just `@`10)
++ gay ;~(pose gap (easy ~)) ;~(plug gah ;~(pose gah vul))
++ vul %- cold :- ~ vul
==
++ gay ;~(pose gap (easy ~)) ::
++ vul %- cold :- ~ :: comments
;~ plug col col ;~ plug col col
(star ;~(pose (shim 32 126) (shim 128 255))) (star ;~(pose (shim 32 126) (shim 128 255)))
(just `@`10) (just `@`10)
@ -2166,31 +2170,39 @@
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: section 2eH, parsing (idioms) :: :: section 2eH, parsing (idioms) ::
:: ::
++ alf ;~(pose low hig) ++ alf ;~(pose low hig) :: alphabetic
++ aln ;~(pose low hig nud) ++ aln ;~(pose low hig nud) :: alphanumeric
++ alp ;~(pose low hig nud hep) ++ alp ;~(pose low hig nud hep) :: alphanumeric and -
++ bet ;~(pose (cold 2 hep) (cold 3 lus)) ++ bet ;~(pose (cold 2 hep) (cold 3 lus)) :: axis syntax - +
++ bin (bass 2 (most gon but)) ++ bin (bass 2 (most gon but)) :: binary to atom
++ but (cook |=(a=@ (sub a '0')) (shim '0' '1')) ++ but (cook |=(a=@ (sub a '0')) (shim '0' '1')) :: binary digit
++ cit (cook |=(a=@ (sub a '0')) (shim '0' '7')) ++ cit (cook |=(a=@ (sub a '0')) (shim '0' '7')) :: octal digit
++ dem (bass 10 (most gon dit)) ++ dem (bass 10 (most gon dit)) :: decimal to atom
++ dit (cook |=(a=@ (sub a '0')) (shim '0' '9')) ++ dit (cook |=(a=@ (sub a '0')) (shim '0' '9')) :: decimal digit
++ gul ;~(pose (cold 2 gal) (cold 3 gar)) ++ gul ;~(pose (cold 2 gal) (cold 3 gar)) :: axis syntax < >
++ gon ;~(pose ;~(plug bas gay fas) (easy ~)) ++ gon ;~(pose ;~(plug bas gay fas) (easy ~)) :: long numbers \ /
++ hex (bass 16 (most gon hit)) ++ hex (bass 16 (most gon hit)) :: hex to atom
++ hig (shim 'A' 'Z') ++ hig (shim 'A' 'Z') :: uppercase
++ hit ;~ pose ++ hit ;~ pose :: hex digits
dit dit
(cook |=(a=char (sub a 87)) (shim 'a' 'f')) (cook |=(a=char (sub a 87)) (shim 'a' 'f'))
(cook |=(a=char (sub a 55)) (shim 'A' 'F')) (cook |=(a=char (sub a 55)) (shim 'A' 'F'))
== ==
++ low (shim 'a' 'z') ++ low (shim 'a' 'z') :: lowercase
++ mes (cook |=([a=@ b=@] (add (mul 16 a) b)) ;~(plug hit hit)) ++ mes %+ cook :: hexbyte
++ nix (boss 256 (star ;~(pose aln cab))) |=([a=@ b=@] (add (mul 16 a) b))
++ nud (shim '0' '9') ;~(plug hit hit)
++ poy ;~(pfix bas ;~(pose bas soq mes)) ++ nix (boss 256 (star ;~(pose aln cab))) ::
++ qit ;~(pose (shim 32 38) (shim 40 91) (shim 93 126) (shim 128 255) poy) ++ nud (shim '0' '9') :: numeric
++ qut (ifix [soq soq] (boss 256 (more gon qit))) ++ poy ;~(pfix bas ;~(pose bas soq mes)) :: escape chars
++ qit ;~ pose :: chars in a cord
(shim 32 38)
(shim 40 91)
(shim 93 126)
(shim 128 255)
poy
==
++ qut (ifix [soq soq] (boss 256 (more gon qit))) :: cord
++ sym ++ sym
%+ cook %+ cook
|=(a=tape (rap 3 ^-((list ,@) a))) |=(a=tape (rap 3 ^-((list ,@) a)))
@ -2208,7 +2220,7 @@
?> ?=(^ q.wag) ?> ?=(^ q.wag)
[p.wag [~ (peg p.u.q.vex p.u.q.wag) q.u.q.wag]] [p.wag [~ (peg p.u.q.vex p.u.q.wag) q.u.q.wag]]
== ==
++ vit ++ vit :: base64 digit
;~ pose ;~ pose
(cook |=(a=@ (sub a 65)) (shim 'A' 'Z')) (cook |=(a=@ (sub a 65)) (shim 'A' 'Z'))
(cook |=(a=@ (sub a 71)) (shim 'a' 'z')) (cook |=(a=@ (sub a 71)) (shim 'a' 'z'))
@ -2219,7 +2231,7 @@
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: section 2eI, parsing (external) :: :: section 2eI, parsing (external) ::
:: ::
++ rash |*([naf=@ sab=_rule] (scan (trip naf) sab)) ++ rash |*([naf=@ sab=_rule] (scan (trip naf) sab)) ::
++ rush |*([naf=@ sab=_rule] (rust (trip naf) sab)) ++ rush |*([naf=@ sab=_rule] (rust (trip naf) sab))
++ rust |* [los=tape sab=_rule] ++ rust |* [los=tape sab=_rule]
=+ vex=((full sab) [[1 1] los]) =+ vex=((full sab) [[1 1] los])
@ -5156,7 +5168,7 @@
%void %void
[%face cog der] [%face cog der]
:: ::
++ bean ^-(type [%fork [%cube 0 %atom %f] [%cube 1 %atom %f]]) ++ bool ^-(type [%fork [%cube 0 %atom %f] [%cube 1 %atom %f]])
++ flay ++ flay
~/ %flay ~/ %flay
|= pok=port |= pok=port
@ -7023,9 +7035,9 @@
[(nice %noun) [%2 q:$(gen p.gen, gol %noun) q:$(gen q.gen, gol %noun)]] [(nice %noun) [%2 q:$(gen p.gen, gol %noun) q:$(gen q.gen, gol %noun)]]
:: ::
[%dtts *] [%dtts *]
[(nice bean) [%5 q:$(gen p.gen, gol %noun) q:$(gen q.gen, gol %noun)]] [(nice bool) [%5 q:$(gen p.gen, gol %noun) q:$(gen q.gen, gol %noun)]]
:: ::
[%dtwt *] [(nice bean) [%3 q:$(gen p.gen, gol %noun)]] [%dtwt *] [(nice bool) [%3 q:$(gen p.gen, gol %noun)]]
[%ktbr *] =+(vat=$(gen p.gen) [(wrap(sut p.vat) %iron) q.vat]) [%ktbr *] =+(vat=$(gen p.gen) [(wrap(sut p.vat) %iron) q.vat])
[%ktls *] [%ktls *]
=+(hif=(nice (play p.gen)) [hif q:$(gen q.gen, gol hif)]) =+(hif=(nice (play p.gen)) [hif q:$(gen q.gen, gol hif)])
@ -7058,7 +7070,7 @@
$(gen r.gen, sut (busk p.gen q.gen)) $(gen r.gen, sut (busk p.gen q.gen))
:: ::
[%wtcl *] [%wtcl *]
=+ nor=$(gen p.gen, gol bean) =+ nor=$(gen p.gen, gol bool)
=+ fex=(gain p.gen) =+ fex=(gain p.gen)
=+ wux=(lose p.gen) =+ wux=(lose p.gen)
=+ ^= duy =+ ^= duy
@ -7070,7 +7082,7 @@
[(fork p.hiq p.ran) (cond duy q.hiq q.ran)] [(fork p.hiq p.ran) (cond duy q.hiq q.ran)]
:: ::
[%wtts *] [%wtts *]
:- (nice bean) :- (nice bool)
%- fish(sut (play ~(bunt al p.gen))) %- fish(sut (play ~(bunt al p.gen)))
(cove q:$(gen [%cnzz q.gen], gol %noun)) (cove q:$(gen [%cnzz q.gen], gol %noun))
:: ::
@ -7184,9 +7196,9 @@
=+([$(gen p.gen, gol %noun) $(gen q.gen, gol %noun)] (both %noun)) =+([$(gen p.gen, gol %noun) $(gen q.gen, gol %noun)] (both %noun))
:: ::
[%dtts *] [%dtts *]
=+([$(gen p.gen, gol %noun) $(gen q.gen, gol %noun)] (both bean)) =+([$(gen p.gen, gol %noun) $(gen q.gen, gol %noun)] (both bool))
:: ::
[%dtwt *] =+($(gen p.gen, gol %noun) (both bean)) :: XX =| [%dtwt *] =+($(gen p.gen, gol %noun) (both bool)) :: XX =|
[%ktbr *] [%ktbr *]
=+(vat=$(gen p.gen) [(wrap(sut p.vat) %iron) (wrap(sut q.vat) %iron)]) =+(vat=$(gen p.gen) [(wrap(sut p.vat) %iron) (wrap(sut q.vat) %iron)])
:: ::
@ -7218,7 +7230,7 @@
== ==
:: ::
[%wtcl *] [%wtcl *]
=+ nor=$(gen p.gen, gol bean) =+ nor=$(gen p.gen, gol bool)
=+ ^= hiq ^- [p=type q=type] =+ ^= hiq ^- [p=type q=type]
=+ fex=[p=(gain p.gen) q=(gain(sut dox) p.gen)] =+ fex=[p=(gain p.gen) q=(gain(sut dox) p.gen)]
?: =(%void p.fex) ?: =(%void p.fex)
@ -7243,7 +7255,7 @@
=+ pov=[p=(fish(sut p.waz) p.syx) q=(fish(sut q.waz) q.syx)] =+ pov=[p=(fish(sut p.waz) p.syx) q=(fish(sut q.waz) q.syx)]
?. &(=(p.syx q.syx) =(p.pov q.pov)) ?. &(=(p.syx q.syx) =(p.pov q.pov))
~|(%mull-bonk-a !!) ~|(%mull-bonk-a !!)
(both bean) (both bool)
:: ::
[%zpcb *] ~_((show %o p.gen) $(gen q.gen)) [%zpcb *] ~_((show %o p.gen) $(gen q.gen))
[%zpcm *] [(nice (play p.gen)) (play(sut dox) p.gen)] [%zpcm *] [(nice (play p.gen)) (play(sut dox) p.gen)]
@ -7536,11 +7548,11 @@
$(mew t.mew, rag q:(tock p.i.mew ^$(gen q.i.mew) rag)) $(mew t.mew, rag q:(tock p.i.mew ^$(gen q.i.mew) rag))
[%dtkt *] %noun [%dtkt *] %noun
[%dtls *] [%atom %$] [%dtls *] [%atom %$]
[%dtzy *] ?:(=(%f p.gen) ?>((lte q.gen 1) bean) [%atom p.gen]) [%dtzy *] ?:(=(%f p.gen) ?>((lte q.gen 1) bool) [%atom p.gen])
[%dtzz *] [%cube q.gen ?:(.?(q.gen) %noun [%atom p.gen])] [%dtzz *] [%cube q.gen ?:(.?(q.gen) %noun [%atom p.gen])]
[%dttr *] %noun [%dttr *] %noun
[%dtts *] bean [%dtts *] bool
[%dtwt *] bean [%dtwt *] bool
[%ktbr *] (wrap(sut $(gen p.gen)) %iron) [%ktbr *] (wrap(sut $(gen p.gen)) %iron)
[%ktls *] $(gen p.gen) [%ktls *] $(gen p.gen)
[%ktpm *] (wrap(sut $(gen p.gen)) %zinc) [%ktpm *] (wrap(sut $(gen p.gen)) %zinc)
@ -8523,7 +8535,6 @@
++ gunk ~+((glue muck)) ++ gunk ~+((glue muck))
++ butt |*(zor=_rule ?:(tol ;~(sfix zor ;~(plug gap duz)) zor)) ++ butt |*(zor=_rule ?:(tol ;~(sfix zor ;~(plug gap duz)) zor))
++ ulva |*(zor=_rule ?.(tol fail ;~(sfix zor ;~(plug gap dun)))) ++ ulva |*(zor=_rule ?.(tol fail ;~(sfix zor ;~(plug gap dun))))
++ neck ;~(pose duz ;~(pfix ;~(plug duq gap) wisp))
++ hank (most muck loaf) ++ hank (most muck loaf)
++ loaf ?:(tol tall wide) ++ loaf ?:(tol tall wide)
++ lobe ?:(tol howl toil) ++ lobe ?:(tol howl toil)
@ -8814,7 +8825,7 @@
== :: == ::
++ desk ,@tas :: ship desk case spur ++ desk ,@tas :: ship desk case spur
++ cage ,[p=lode q=vase] :: structured data ++ cage ,[p=lode q=vase] :: structured data
++ chop :: permissions ++ cuff :: permissions
$: p=(unit (set monk)) :: readers $: p=(unit (set monk)) :: readers
q=(set monk) :: authors q=(set monk) :: authors
== :: == ::

View File

@ -348,7 +348,7 @@
~|(%test-fail-seal !!) ~|(%test-fail-seal !!)
msg msg
:: ::
++ hmac :: HMAC calculation ++ hmac :: HMAC-SHA1
|= [key=@ mes=@] |= [key=@ mes=@]
=+ ip=(fil 2 64 0x36) =+ ip=(fil 2 64 0x36)
=+ op=(fil 3 64 0x5c) =+ op=(fil 3 64 0x5c)
@ -2007,7 +2007,7 @@
raz=(map path race) :: statements inbound raz=(map path race) :: statements inbound
ryl=(map path rill) :: statements outbound ryl=(map path rill) :: statements outbound
== :: == ::
++ bean :: terminal control ++ bein :: terminal control
$: $: bul=@ud :: buffer length $: $: bul=@ud :: buffer length
bus=@ud :: cursor in buffer bus=@ud :: cursor in buffer
but=(list ,@c) :: buffer text but=(list ,@c) :: buffer text
@ -2062,7 +2062,7 @@
q=@ud :: depth q=@ud :: depth
r=(list (list ,@c)) :: kills r=(list (list ,@c)) :: kills
== :: == ::
++ blur ,[p=@ud q=(unit bean) r=blot] :: columns, prompt ++ blur ,[p=@ud q=(unit bein) r=blot] :: columns, prompt
++ boar :: execution instance ++ boar :: execution instance
$% [%n p=(unit coal) q=claw r=lath] :: new/ready $% [%n p=(unit coal) q=claw r=lath] :: new/ready
[%r p=(unit worm)] :: running/done [%r p=(unit worm)] :: running/done
@ -2128,7 +2128,6 @@
[%helo p=path q=prod] :: trigger prompt [%helo p=path q=prod] :: trigger prompt
[%hole p=lane q=@] :: packet failed [%hole p=lane q=@] :: packet failed
[%hoop p=(unit)] :: namespace response [%hoop p=(unit)] :: namespace response
[%hope p=path] :: namespace request
[%info p=@p q=@tas r=nori] :: internal edit [%info p=@p q=@tas r=nori] :: internal edit
[%ingo p=@p q=@tas r=nori] :: internal noun edit [%ingo p=@p q=@tas r=nori] :: internal noun edit
[%init p=@p] :: report install [%init p=@p] :: report install
@ -2149,7 +2148,7 @@
[%logo p=@] :: logout [%logo p=@] :: logout
[%loot p=@tas q=path] :: request directory [%loot p=@tas q=path] :: request directory
[%make p=(unit ,@t) q=@ud r=@] :: wild license [%make p=(unit ,@t) q=@ud r=@] :: wild license
[%mean p=ship q=term r=chop s=vase] :: application event [%mean p=ship q=term r=cuff s=vase] :: application event
[%meta p=vase] :: meta-card [%meta p=vase] :: meta-card
[%meat p=ship q=card] :: concrete app action [%meat p=ship q=card] :: concrete app action
[%mess p=hasp q=(disk)] :: urbit message [%mess p=hasp q=(disk)] :: urbit message
@ -2168,7 +2167,7 @@
[%rest ~] :: reset to factory [%rest ~] :: reset to factory
[%save p=path q=@] :: write atomic file [%save p=path q=@] :: write atomic file
[%send p=lane q=@] :: transmit packet [%send p=lane q=@] :: transmit packet
[%show p=hasp q=path r=(unit plan)] :: subscription [%show p=hasp q=(unit hope)] :: urbit subscribe
[%sith p=@p q=@uw] :: imperial generator [%sith p=@p q=@uw] :: imperial generator
[%soft p=*] :: untyped card [%soft p=*] :: untyped card
[%sync ~] :: reset soft state [%sync ~] :: reset soft state
@ -2238,6 +2237,10 @@
cum=(map ,@tas ,*) :: custom dirt cum=(map ,@tas ,*) :: custom dirt
== :: == ::
++ cult (map duct rave) :: subscriptions ++ cult (map duct rave) :: subscriptions
++ cuff :: permissions
$: p=(unit (set monk)) :: readers
q=(set monk) :: authors
== ::
++ deed ,[p=@ q=step] :: signature, stage ++ deed ,[p=@ q=step] :: signature, stage
++ dome :: project state ++ dome :: project state
$: ang=agon :: pedigree $: ang=agon :: pedigree
@ -2350,6 +2353,7 @@
++ hiss ,[p=purl q=moth] :: outbound request ++ hiss ,[p=purl q=moth] :: outbound request
++ hist ,[p=@ud q=(list ,@t)] :: depth texts ++ hist ,[p=@ud q=(list ,@t)] :: depth texts
++ hole ,@t :: session identity ++ hole ,@t :: session identity
++ hope (pair ,? path) :: view/subscribe
++ hook path :: request origin ++ hook path :: request origin
++ hoot ,[p=? q=? r=(unit ,@ud) s=host] :: secure/mapped/host ++ hoot ,[p=? q=? r=(unit ,@ud) s=host] :: secure/mapped/host
++ hort ,[p=(unit ,@ud) q=host] :: http port/host ++ hort ,[p=(unit ,@ud) q=host] :: http port/host
@ -2544,6 +2548,7 @@
++ rump ,[p=care q=case r=@tas s=path] :: relative path ++ rump ,[p=care q=case r=@tas s=path] :: relative path
++ rung $: rus=(map desk rede) :: neighbor desks ++ rung $: rus=(map desk rede) :: neighbor desks
== :: == ::
++ sash (pair term (unit hope)) :: web subscribe
++ saba ,[p=ship q=@tas r=moar s=(list nori)] :: patch/merge ++ saba ,[p=ship q=@tas r=moar s=(list nori)] :: patch/merge
++ sufi :: domestic host ++ sufi :: domestic host
$: hoy=(list ship) :: hierarchy $: hoy=(list ship) :: hierarchy
@ -2561,7 +2566,11 @@
pus=(unit ,@ta) :: password pus=(unit ,@ta) :: password
== :: == ::
++ seam :: logical request ++ seam :: logical request
$% [%aps p=term q=term r=path] :: app; logo; path $% [%apg p=term q=logo r=path] :: app get
[%apl p=term q=@ud r=term] :: app poll
[%apm p=term q=json] :: app message
[%aps p=term q=term r=(unit path)] :: app subscribe
[%apu p=term q=logo r=octs] :: app upload
[%cog p=@ud q=@ud] :: console get [%cog p=@ud q=@ud] :: console get
[%con p=@ud] :: console face [%con p=@ud] :: console face
[%cop p=@ud q=@ud r=json] :: console put [%cop p=@ud q=@ud r=json] :: console put

View File

@ -6,7 +6,7 @@
=> + => +
=> ^/===/lib/pony => ^/===/lib/pony
=> ^/===/lib/chat => ^/===/lib/chat
=+ flag=?(%elvis %quiet %time [%haus p=@p]) =+ flag=?(%all %rooms %monitor %never %leet %nub %time [%haus p=@p])
=+ flags=*(list flag) =+ flags=*(list flag)
=> |% => |%
++ chk-flag |=(f=@tas (lien flags |=(flag =(f +<)))) ++ chk-flag |=(f=@tas (lien flags |=(flag =(f +<))))
@ -75,10 +75,16 @@
:- %leaf :- %leaf
%+ welp %+ welp
?. (chk-flag %time) ~ ?. (chk-flag %time) ~
"{(scow %ud h.da)}:{(scow %ud m.da)} " (weld (timestamp sen) " ")
"%{(trip roo)} {chr}{nym}: {(trip p.dum)}" "%{(trip roo)} {chr}{nym}: {(trip p.dum)}"
== ==
:: ::
++ timestamp
|= t=@da
=+ da=(yell t)
"{?:((gth 10 h.da) "0" "")}{(scow %ud h.da)}:".
"{?:((gth 10 m.da) "0" "")}{(scow %ud m.da)}"
++ read-wlist ++ read-wlist
|= pax=path |= pax=path
%- (unit (list)) %- (unit (list))
@ -104,8 +110,6 @@
|= [est=time *] |= [est=time *]
|= args=(list flag) |= args=(list flag)
=. flags `(list flag)`args =. flags `(list flag)`args
?: &((chk-flag %elvis) (chk-flag %quiet))
~| %invalid-parameters !!
=+ sta=est :: move up to declaration of state =+ sta=est :: move up to declaration of state
=. wak est =. wak est
=. bud :: future maintainers: don't add more cell types with changing this =. bud :: future maintainers: don't add more cell types with changing this
@ -113,9 +117,14 @@
(roll args |=([p=flag q=@p] ?:(?=(^ p) p.p q))) (roll args |=([p=flag q=@p] ?:(?=(^ p) p.p q)))
bud bud
=. kills %- (list ,@p) =. kills %- (list ,@p)
(fall (read-wlist /[(scot %p who)]/conf/[(scot %da est)]/chat/killfile/wlist) ~) %+ fall
(read-wlist /[(scot %p who)]/conf/[(scot %da est)]/chat/killfile/wlist)
~
=. rooms %- (list ^room) =. rooms %- (list ^room)
(fall (read-wlist /[(scot %p who)]/conf/[(scot %da est)]/chat/[(scot %p bud)]/wlist) ~[coci]) %+ fall
%- read-wlist
/[(scot %p who)]/conf/[(scot %da est)]/chat/[(scot %p bud)]/wlist
~[coci]
|- ^- bowl |- ^- bowl
=< abet:init =< abet:init
|% |%
@ -195,10 +204,17 @@
== ==
:: ::
++ priv :: private message ++ priv :: private message
|= [her=@p mes=^mess] |= [now=@da her=@p mes=^mess]
^+ +> ^+ +>
?: (dead her) +> ?: (dead her) +>
(show (rend est '(private)' "" (trip (numb her est)) mes)) =+ ^= nym
=+ yow=(scot %p her)
=+ ^= woy
%- (hard ,@t)
.^(%a (scot %p who) %name (scot %da now) (scot %p her) ~)
?: =(%$ woy) yow
(cat 3 yow (cat 3 ' ' woy))
(show (rend est '(private)' "" (trip nym) mes))
:: ::
++ said :: server message ++ said :: server message
|= [her=@p duz=(list zong)] |= [her=@p duz=(list zong)]
@ -234,14 +250,28 @@
q q
== ==
?(%new %out) ?(%new %out)
?: ?| (dead p.r.i.duz) ?. ?& !(dead p.r.i.duz)
(chk-flag %quiet) ?| (chk-flag %all)
&(!(chk-flag %elvis) (gth sta p.i.duz)) ?& (lth sta p.i.duz)
== ?| (chk-flag %rooms)
?& =(coci q.i.duz)
(chk-flag %monitor)
== == ==
== ==
~ ~
?- -.i.duz :_ ~ :- %leaf
%new ~[[%leaf "{(trip q.r.i.duz)} saunters into %{(trip q.i.duz)}"]] ;: weld
%out ~[[%leaf "{(trip q.r.i.duz)} ducks out of %{(trip q.i.duz)}"]] ?. (chk-flag %time) ~
(timestamp p.i.duz)
?- -.i.duz
%new " +"
%out " -"
==
?: (chk-flag %nub)
(trip q.r.i.duz)
(scow %p p.r.i.duz)
?: (chk-flag %monitor) ~
(weld " %" (trip q.i.duz))
== == == ==
== ==
:: ::
@ -256,7 +286,9 @@
giz giz
=+ j=(jam (weld her (skip kills |=(a=@p (lien her |=(b=@p =(a b))))))) =+ j=(jam (weld her (skip kills |=(a=@p (lien her |=(b=@p =(a b)))))))
=+ encoded=(cat 3 (scot %uw j) `@t`10) :: Base-64 encoding =+ encoded=(cat 3 (scot %uw j) `@t`10) :: Base-64 encoding
[[%ok (foal /[(scot %p who)]/conf/[(scot %da est)]/chat/killfile/wlist encoded)] giz] :_ giz
:- %ok
(foal /[(scot %p who)]/conf/[(scot %da est)]/chat/killfile/wlist encoded)
== ==
:: ::
++ resurrect ++ resurrect
@ -266,7 +298,9 @@
giz giz
=+ j=(jam (skip kills |=(a=@p (lien her |=(b=@p =(a b)))))) =+ j=(jam (skip kills |=(a=@p (lien her |=(b=@p =(a b))))))
=+ encoded=(cat 3 (scot %uw j) `@t`10) :: Base-64 encoding =+ encoded=(cat 3 (scot %uw j) `@t`10) :: Base-64 encoding
[[%ok (foal /[(scot %p who)]/conf/[(scot %da est)]/chat/killfile/wlist encoded)] giz] :_ giz
:- %ok
(foal /[(scot %p who)]/conf/[(scot %da est)]/chat/killfile/wlist encoded)
== ==
:: ::
++ add-room ++ add-room
@ -278,7 +312,10 @@
giz giz
=+ encoded=(cat 3 (scot %uw (jam rs)) `@t`10) :: Base-64 encoding =+ encoded=(cat 3 (scot %uw (jam rs)) `@t`10) :: Base-64 encoding
:_ giz :_ giz
[%ok (foal /[(scot %p who)]/conf/[(scot %da est)]/chat/[(scot %p bud)]/wlist encoded)] :- %ok
%+ foal
/[(scot %p who)]/conf/[(scot %da est)]/chat/[(scot %p bud)]/wlist
encoded
== ==
~ ~
`zing`[%lus roo] `zing`[%lus roo]
@ -293,7 +330,10 @@
=+ j=(jam rs) =+ j=(jam rs)
=+ encoded=(cat 3 (scot %uw j) `@t`10) :: Base-64 encoding =+ encoded=(cat 3 (scot %uw j) `@t`10) :: Base-64 encoding
:_ giz :_ giz
[%ok (foal /[(scot %p who)]/conf/[(scot %da est)]/chat/[(scot %p bud)]/wlist encoded)] :- %ok
%+ foal
/[(scot %p who)]/conf/[(scot %da est)]/chat/[(scot %p bud)]/wlist
encoded
== ==
~ ~
`zing`[%hep roo] `zing`[%hep roo]
@ -358,6 +398,6 @@
(nice [~ (need (slaw %p i.t.pax))] p.nut) (nice [~ (need (slaw %p i.t.pax))] p.nut)
%up ?>(?=(%up -.nut) (toke p.nut)) %up ?>(?=(%up -.nut) (toke p.nut))
%wa ?>(?=(%wa -.nut) take) %wa ?>(?=(%wa -.nut) take)
%ya ?>(?=(%lq -.nut) (priv p.nut ((hard ^mess) r.nut))) %ya ?>(?=(%lq -.nut) (priv now p.nut ((hard ^mess) r.nut)))
== ==
-- --

View File

@ -186,7 +186,7 @@
:_ abet:pof(roo.ful oldroo) :_ abet:pof(roo.ful oldroo)
%- ~(gas by m) %- ~(gas by m)
%+ turn %+ turn
(skip p.zig |=(a=room (levy roo.ful:pof |=(a=room =(a ^a))))) (skip p.zig |=(a=room (levy roo.ful:pof |=(a=room !=(a ^a)))))
|=(r=room [r ~[[%out now r call:pof]]]) |=(r=room [r ~[[%out now r call:pof]]])
== ==
(tilt zew) (tilt zew)

View File

@ -6,6 +6,6 @@
|= [bud=@p ~] |= [bud=@p ~]
^- bowl ^- bowl
:_ ~ :_ ~
:~ [%la ((hard tank) .^(%c /(scot %p bud)/show=))] :~ :: [%la ((hard tank) .^(%c /(scot %p bud)/show=))]
[%la ((hard tank) .^(%a /(scot %p bud)/show=))] [%la ((hard tank) .^(%a /(scot %p who)/show=/(scot %p bud)))]
== ==