This commit is contained in:
John Dulin 2014-06-01 18:31:41 -07:00
commit 6cb0150ae1
10 changed files with 221 additions and 156 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1773,19 +1773,19 @@
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: section 2eB, parsing (tracing) ::
::
++ last |= [zyc=hair naz=hair]
++ last |= [zyc=hair naz=hair] :: farther trace
^- hair
?: =(p.zyc p.naz)
?:((gth q.zyc q.naz) zyc naz)
?:((gth p.zyc p.naz) zyc naz)
::
++ lust |= [weq=char naz=hair]
++ lust |= [weq=char naz=hair] :: detect newline
^- hair
?:(=(10 weq) [+(p.naz) 1] [p.naz +(q.naz)])
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: section 2eC, parsing (custom rules) ::
::
++ cold
++ cold :: replace w/ constant
~/ %cold
|* [cus=* sef=_rule]
~/ %fun
@ -1795,7 +1795,7 @@
vex
[p=p.vex q=[~ u=[p=cus q=q.u.q.vex]]]
::
++ cook
++ cook :: apply gate
~/ %cook
|* [poq=_,* sef=_rule]
~/ %fun
@ -1805,7 +1805,7 @@
vex
[p=p.vex q=[~ u=[p=(poq p.u.q.vex) q=q.u.q.vex]]]
::
++ easy
++ easy :: always parse
~/ %easy
|* huf=*
~/ %fun
@ -1813,19 +1813,19 @@
^- (like ,_huf)
[p=p.tub q=[~ u=[p=huf q=tub]]]
::
++ fail |=(tub=nail [p=p.tub q=~])
++ full
++ fail |=(tub=nail [p=p.tub q=~]) :: never parse
++ full :: has to fully parse
|* sef=_rule
|= tub=nail
=+ vex=(sef tub)
?@(q.vex vex ?:(=(~ q.q.u.q.vex) vex [p=p.vex q=~]))
::
++ funk
++ funk :: add to tape first
|* [pre=tape sef=_rule]
|= tub=nail
(sef p.tub (weld pre q.tub))
::
++ here
++ here :: place-based apply
~/ %here
|* [hez=_|=([a=pint b=*] [a b]) sef=_rule]
~/ %fun
@ -1835,7 +1835,7 @@
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
|= tub=nail
=+ fad=daf
@ -1847,7 +1847,7 @@
$(p.tub (lust i.q.tub p.tub), q.tub t.q.tub, daf (rsh 3 1 daf))
::
++ just :: XX redundant, jest
~/ %just
~/ %just :: match a char
|= daf=char
~/ %fun
|= tub=nail
@ -1858,13 +1858,13 @@
(fail tub)
(next tub)
::
++ knee
++ knee :: callbacks
|* [gar=* sef=_|.(rule)]
|= tub=nail
^- (like ,_gar)
((sef) tub)
::
++ mask
++ mask :: match char in set
~/ %mask
|= bud=(list char)
~/ %fun
@ -1876,7 +1876,7 @@
(fail tub)
(next tub)
::
++ next
++ next :: consume a char
|= tub=nail
^- (like char)
?@ q.tub
@ -1884,7 +1884,7 @@
=+ zac=(lust i.q.tub p.tub)
[zac [~ i.q.tub [zac t.q.tub]]]
::
++ sear
++ sear :: conditional cook
~/ %sear
|* [pyq=_|=(* *(unit)) sef=_rule]
~/ %fun
@ -1897,7 +1897,7 @@
[p=p.vex q=~]
[p=p.vex q=[~ u=[p=u.gey q=q.u.q.vex]]]
::
++ shim
++ shim :: match char in range
~/ %shim
|= [les=@ mos=@]
~/ %fun
@ -1909,7 +1909,7 @@
(fail tub)
(next tub)
::
++ stag
++ stag :: add a label
~/ %stag
|* [gob=* sef=_rule]
~/ %fun
@ -1983,7 +1983,7 @@
?> ?=(^ 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
|* [[les=@ mos=@] fel=_rule]
~/ %fun
@ -2007,7 +2007,7 @@
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: section 2eD, parsing (combinators) ::
::
++ bend
++ bend :: conditional comp
~/ %bend
|* raq=_|*([a=* b=*] [~ u=[a b]])
~/ %fun
@ -2025,7 +2025,7 @@
::
++ comp
~/ %comp
|* raq=_|*([a=* b=*] [a b])
|* raq=_|*([a=* b=*] [a b]) :: arbitrary compose
~/ %fun
|* [vex=edge sab=_rule]
?@ q.vex
@ -2036,18 +2036,18 @@
[p=yur q=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
|* bus=_rule
~/ %fun
|* [vex=edge sab=_rule]
(plug vex ;~(pfix bus sab))
::
++ pfix
++ pfix :: discard first rule
~/ %pfix
(comp |*([a=* b=*] b))
::
++ plug
++ plug :: first then second
~/ %plug
|* [vex=edge sab=_rule]
?@ q.vex
@ -2058,7 +2058,7 @@
[p=yur q=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
|* [vex=edge sab=_rule]
?@ q.vex
@ -2066,7 +2066,7 @@
[p=(last p.vex p.roq) q=q.roq]
vex
::
++ sfix
++ sfix :: discard second rule
~/ %sfix
(comp |*([a=* b=*] a))
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@ -2108,7 +2108,7 @@
|* [bus=_rule fel=_rule]
;~((comp raq) fel (stir rud raq ;~(pfix bus fel)))
::
++ star
++ star :: 0 or more times
|* fel=_rule
(stir `(list ,_(wonk *fel))`~ |*([a=* b=*] [a b]) fel)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@ -2150,16 +2150,19 @@
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: section 2eG, parsing (whitespace) ::
::
++ dog ;~(plug dot gay)
++ doh ;~(plug ;~(plug hep hep) gay)
++ dun (cold ~ ;~(plug hep hep))
++ duq (cold ~ ;~(plug tis hep))
++ duz (cold ~ ;~(plug tis tis))
++ gah (mask [`@`10 ' ' ~])
++ gap (cold ~ ;~(plug gaq (star ;~(pose vul gah))))
++ gaq ;~(pose (just `@`10) ;~(plug gah ;~(pose gah vul)) vul)
++ gay ;~(pose gap (easy ~))
++ vul %- cold :- ~
++ dog ;~(plug dot gay) ::
++ doh ;~(plug ;~(plug hep hep) gay) ::
++ dun (cold ~ ;~(plug hep hep)) :: -- (phep) to ~
++ duz (cold ~ ;~(plug tis tis)) :: == (stet) to ~
++ gah (mask [`@`10 ' ' ~]) :: newline or ace
++ gap (cold ~ ;~(plug gaq (star ;~(pose vul gah)))) ::
++ gaq ;~ pose :: end of line
(just `@`10)
;~(plug gah ;~(pose gah vul))
vul
==
++ gay ;~(pose gap (easy ~)) ::
++ vul %- cold :- ~ :: comments
;~ plug col col
(star ;~(pose (shim 32 126) (shim 128 255)))
(just `@`10)
@ -2167,31 +2170,39 @@
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: section 2eH, parsing (idioms) ::
::
++ alf ;~(pose low hig)
++ aln ;~(pose low hig nud)
++ alp ;~(pose low hig nud hep)
++ bet ;~(pose (cold 2 hep) (cold 3 lus))
++ bin (bass 2 (most gon but))
++ but (cook |=(a=@ (sub a '0')) (shim '0' '1'))
++ cit (cook |=(a=@ (sub a '0')) (shim '0' '7'))
++ dem (bass 10 (most gon dit))
++ dit (cook |=(a=@ (sub a '0')) (shim '0' '9'))
++ gul ;~(pose (cold 2 gal) (cold 3 gar))
++ gon ;~(pose ;~(plug bas gay fas) (easy ~))
++ hex (bass 16 (most gon hit))
++ hig (shim 'A' 'Z')
++ hit ;~ pose
++ alf ;~(pose low hig) :: alphabetic
++ aln ;~(pose low hig nud) :: alphanumeric
++ alp ;~(pose low hig nud hep) :: alphanumeric and -
++ bet ;~(pose (cold 2 hep) (cold 3 lus)) :: axis syntax - +
++ bin (bass 2 (most gon but)) :: binary to atom
++ but (cook |=(a=@ (sub a '0')) (shim '0' '1')) :: binary digit
++ cit (cook |=(a=@ (sub a '0')) (shim '0' '7')) :: octal digit
++ dem (bass 10 (most gon dit)) :: decimal to atom
++ dit (cook |=(a=@ (sub a '0')) (shim '0' '9')) :: decimal digit
++ gul ;~(pose (cold 2 gal) (cold 3 gar)) :: axis syntax < >
++ gon ;~(pose ;~(plug bas gay fas) (easy ~)) :: long numbers \ /
++ hex (bass 16 (most gon hit)) :: hex to atom
++ hig (shim 'A' 'Z') :: uppercase
++ hit ;~ pose :: hex digits
dit
(cook |=(a=char (sub a 87)) (shim 'a' 'f'))
(cook |=(a=char (sub a 55)) (shim 'A' 'F'))
==
++ low (shim 'a' 'z')
++ mes (cook |=([a=@ b=@] (add (mul 16 a) b)) ;~(plug hit hit))
++ nix (boss 256 (star ;~(pose aln cab)))
++ nud (shim '0' '9')
++ poy ;~(pfix bas ;~(pose bas soq mes))
++ qit ;~(pose (shim 32 38) (shim 40 91) (shim 93 126) (shim 128 255) poy)
++ qut (ifix [soq soq] (boss 256 (more gon qit)))
++ low (shim 'a' 'z') :: lowercase
++ mes %+ cook :: hexbyte
|=([a=@ b=@] (add (mul 16 a) b))
;~(plug hit hit)
++ nix (boss 256 (star ;~(pose aln cab))) ::
++ nud (shim '0' '9') :: numeric
++ 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
%+ cook
|=(a=tape (rap 3 ^-((list ,@) a)))
@ -2209,7 +2220,7 @@
?> ?=(^ q.wag)
[p.wag [~ (peg p.u.q.vex p.u.q.wag) q.u.q.wag]]
==
++ vit
++ vit :: base64 digit
;~ pose
(cook |=(a=@ (sub a 65)) (shim 'A' 'Z'))
(cook |=(a=@ (sub a 71)) (shim 'a' 'z'))
@ -2220,7 +2231,7 @@
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: 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))
++ rust |* [los=tape sab=_rule]
=+ vex=((full sab) [[1 1] los])
@ -5157,7 +5168,7 @@
%void
[%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
|= pok=port
@ -7024,9 +7035,9 @@
[(nice %noun) [%2 q:$(gen p.gen, gol %noun) q:$(gen q.gen, gol %noun)]]
::
[%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])
[%ktls *]
=+(hif=(nice (play p.gen)) [hif q:$(gen q.gen, gol hif)])
@ -7059,7 +7070,7 @@
$(gen r.gen, sut (busk p.gen q.gen))
::
[%wtcl *]
=+ nor=$(gen p.gen, gol bean)
=+ nor=$(gen p.gen, gol bool)
=+ fex=(gain p.gen)
=+ wux=(lose p.gen)
=+ ^= duy
@ -7071,7 +7082,7 @@
[(fork p.hiq p.ran) (cond duy q.hiq q.ran)]
::
[%wtts *]
:- (nice bean)
:- (nice bool)
%- fish(sut (play ~(bunt al p.gen)))
(cove q:$(gen [%cnzz q.gen], gol %noun))
::
@ -7185,9 +7196,9 @@
=+([$(gen p.gen, gol %noun) $(gen q.gen, gol %noun)] (both %noun))
::
[%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 *]
=+(vat=$(gen p.gen) [(wrap(sut p.vat) %iron) (wrap(sut q.vat) %iron)])
::
@ -7219,7 +7230,7 @@
==
::
[%wtcl *]
=+ nor=$(gen p.gen, gol bean)
=+ nor=$(gen p.gen, gol bool)
=+ ^= hiq ^- [p=type q=type]
=+ fex=[p=(gain p.gen) q=(gain(sut dox) p.gen)]
?: =(%void p.fex)
@ -7244,7 +7255,7 @@
=+ pov=[p=(fish(sut p.waz) p.syx) q=(fish(sut q.waz) q.syx)]
?. &(=(p.syx q.syx) =(p.pov q.pov))
~|(%mull-bonk-a !!)
(both bean)
(both bool)
::
[%zpcb *] ~_((show %o p.gen) $(gen q.gen))
[%zpcm *] [(nice (play p.gen)) (play(sut dox) p.gen)]
@ -7537,11 +7548,11 @@
$(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) 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])]
[%dttr *] %noun
[%dtts *] bean
[%dtwt *] bean
[%dtts *] bool
[%dtwt *] bool
[%ktbr *] (wrap(sut $(gen p.gen)) %iron)
[%ktls *] $(gen p.gen)
[%ktpm *] (wrap(sut $(gen p.gen)) %zinc)
@ -8524,7 +8535,6 @@
++ gunk ~+((glue muck))
++ butt |*(zor=_rule ?:(tol ;~(sfix zor ;~(plug gap duz)) zor))
++ ulva |*(zor=_rule ?.(tol fail ;~(sfix zor ;~(plug gap dun))))
++ neck ;~(pose duz ;~(pfix ;~(plug duq gap) wisp))
++ hank (most muck loaf)
++ loaf ?:(tol tall wide)
++ lobe ?:(tol howl toil)
@ -8815,7 +8825,7 @@
== ::
++ desk ,@tas :: ship desk case spur
++ cage ,[p=lode q=vase] :: structured data
++ chop :: permissions
++ cuff :: permissions
$: p=(unit (set monk)) :: readers
q=(set monk) :: authors
== ::

View File

@ -348,7 +348,7 @@
~|(%test-fail-seal !!)
msg
::
++ hmac :: HMAC calculation
++ hmac :: HMAC-SHA1
|= [key=@ mes=@]
=+ ip=(fil 2 64 0x36)
=+ op=(fil 3 64 0x5c)
@ -2000,7 +2000,7 @@
raz=(map path race) :: statements inbound
ryl=(map path rill) :: statements outbound
== ::
++ bean :: terminal control
++ bein :: terminal control
$: $: bul=@ud :: buffer length
bus=@ud :: cursor in buffer
but=(list ,@c) :: buffer text
@ -2055,7 +2055,7 @@
q=@ud :: depth
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
$% [%n p=(unit coal) q=claw r=lath] :: new/ready
[%r p=(unit worm)] :: running/done
@ -2121,7 +2121,6 @@
[%helo p=path q=prod] :: trigger prompt
[%hole p=lane q=@] :: packet failed
[%hoop p=(unit)] :: namespace response
[%hope p=path] :: namespace request
[%info p=@p q=@tas r=nori] :: internal edit
[%init p=@p] :: report install
[%into p=@p q=@tas r=nori] :: external edit
@ -2140,7 +2139,7 @@
[%logo p=@] :: logout
[%loot p=@tas q=path] :: request directory
[%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
[%meat p=ship q=card] :: concrete app action
[%mess p=hasp q=(disk)] :: urbit message
@ -2159,7 +2158,7 @@
[%rest ~] :: reset to factory
[%save p=path q=@] :: write atomic file
[%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
[%soft p=*] :: untyped card
[%sync ~] :: reset soft state
@ -2229,6 +2228,10 @@
cum=(map ,@tas ,*) :: custom dirt
== ::
++ cult (map duct rave) :: subscriptions
++ cuff :: permissions
$: p=(unit (set monk)) :: readers
q=(set monk) :: authors
== ::
++ deed ,[p=@ q=step] :: signature, stage
++ dome :: project state
$: ang=agon :: pedigree
@ -2341,6 +2344,7 @@
++ hiss ,[p=purl q=moth] :: outbound request
++ hist ,[p=@ud q=(list ,@t)] :: depth texts
++ hole ,@t :: session identity
++ hope (pair ,? path) :: view/subscribe
++ hook path :: request origin
++ hoot ,[p=? q=? r=(unit ,@ud) s=host] :: secure/mapped/host
++ hort ,[p=(unit ,@ud) q=host] :: http port/host
@ -2535,6 +2539,7 @@
++ rump ,[p=care q=case r=@tas s=path] :: relative path
++ 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
++ sufi :: domestic host
$: hoy=(list ship) :: hierarchy
@ -2552,7 +2557,11 @@
pus=(unit ,@ta) :: password
== ::
++ 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
[%con p=@ud] :: console face
[%cop p=@ud q=@ud r=json] :: console put

View File

@ -6,7 +6,7 @@
=> +
=> ^/===/lib/pony
=> ^/===/lib/chat
=+ flag=?(%elvis %quiet %time [%haus p=@p])
=+ flag=?(%all %rooms %monitor %never %leet %nub %time [%haus p=@p])
=+ flags=*(list flag)
=> |%
++ chk-flag |=(f=@tas (lien flags |=(flag =(f +<))))
@ -75,10 +75,16 @@
:- %leaf
%+ welp
?. (chk-flag %time) ~
"{(scow %ud h.da)}:{(scow %ud m.da)} "
(weld (timestamp sen) " ")
"%{(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
|= pax=path
%- (unit (list))
@ -104,8 +110,6 @@
|= [est=time *]
|= args=(list flag)
=. flags `(list flag)`args
?: &((chk-flag %elvis) (chk-flag %quiet))
~| %invalid-parameters !!
=+ sta=est :: move up to declaration of state
=. wak est
=. 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)))
bud
=. 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)
(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
=< abet:init
|%
@ -195,10 +204,17 @@
==
::
++ priv :: private message
|= [her=@p mes=^mess]
|= [now=@da her=@p mes=^mess]
^+ +>
?: (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
|= [her=@p duz=(list zong)]
@ -234,14 +250,28 @@
q
==
?(%new %out)
?: ?| (dead p.r.i.duz)
(chk-flag %quiet)
&(!(chk-flag %elvis) (gth sta p.i.duz))
==
?. ?& !(dead p.r.i.duz)
?| (chk-flag %all)
?& (lth sta p.i.duz)
?| (chk-flag %rooms)
?& =(coci q.i.duz)
(chk-flag %monitor)
== == ==
== ==
~
?- -.i.duz
%new ~[[%leaf "{(trip q.r.i.duz)} saunters into %{(trip q.i.duz)}"]]
%out ~[[%leaf "{(trip q.r.i.duz)} ducks out of %{(trip q.i.duz)}"]]
:_ ~ :- %leaf
;: weld
?. (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
=+ 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
[[%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
@ -266,7 +298,9 @@
giz
=+ j=(jam (skip kills |=(a=@p (lien her |=(b=@p =(a b))))))
=+ 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
@ -278,7 +312,10 @@
giz
=+ encoded=(cat 3 (scot %uw (jam rs)) `@t`10) :: Base-64 encoding
:_ 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]
@ -293,7 +330,10 @@
=+ j=(jam rs)
=+ encoded=(cat 3 (scot %uw j) `@t`10) :: Base-64 encoding
:_ 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]
@ -358,6 +398,6 @@
(nice [~ (need (slaw %p i.t.pax))] p.nut)
%up ?>(?=(%up -.nut) (toke p.nut))
%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)
%- ~(gas by m)
%+ 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]]])
==
(tilt zew)

View File

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