mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-04 21:33:41 +03:00
Various fixes and improvements.
This commit is contained in:
parent
fee99966cb
commit
418be101ef
@ -194,6 +194,18 @@
|
||||
?~ r.moh ~
|
||||
`(unit json)`(rush q.u.r.moh apex:poja)
|
||||
::
|
||||
++ ecci :: ecce w/oryx
|
||||
|= [orx=oryx moh=moth]
|
||||
^- (unit json)
|
||||
=+ jun=(ecce moh)
|
||||
?~ jun ~
|
||||
?. ?=(%o -.u.jun) ~
|
||||
?. =([~ %s orx] (~(get by p.u.jun) %oryx))
|
||||
~& [%ecci-oryx u.jun]
|
||||
~
|
||||
=+ nuj=(~(get by p.u.jun) %xyro)
|
||||
?~(nuj [~ ~] [~ u.nuj])
|
||||
::
|
||||
++ ecco :: eat headers
|
||||
|= hed=(list ,[p=@t q=@t])
|
||||
=+ mah=*math
|
||||
@ -336,9 +348,7 @@
|
||||
=+ woy=(yule:u.ouy i.t.t.t.t.tea)
|
||||
=< abet =< work =< abet
|
||||
?~ cuy
|
||||
~& %eyre-rasp-none
|
||||
dumb:woy
|
||||
~& [%eyre-rasp-some p.u.cuy]
|
||||
(hear:woy `[%& u.cuy])
|
||||
::
|
||||
?(%rush %rust)
|
||||
@ -1082,14 +1092,15 @@
|
||||
you
|
||||
(need (slaw %ui (cat 3 '0i' i.t.paw)))
|
||||
(need (slaw %ui (cat 3 '0i' i.t.t.paw)))
|
||||
(need (ecce moh))
|
||||
(need (ecci orx.ced moh))
|
||||
==
|
||||
::
|
||||
++ faps :: dispatch %aps
|
||||
|= [fur=(unit term) you=@p paw=path]
|
||||
|= [fur=(unit term) you=@p paw=path moh=moth]
|
||||
^- (unit seam)
|
||||
?> ?=(~ fur)
|
||||
?> ?=([@ @ @ *] paw)
|
||||
?> !=(~ (ecci orx.ced moh))
|
||||
:- ~
|
||||
:* %aps
|
||||
(need ((sand %tas) i.paw))
|
||||
@ -1365,7 +1376,7 @@
|
||||
?+ tri ~
|
||||
%l (foom moh)
|
||||
%m (fapm p.q.pul yun paw moh)
|
||||
%s (faps p.q.pul yun paw)
|
||||
%s (faps p.q.pul yun paw moh)
|
||||
%u (fapu p.q.pul yun paw)
|
||||
==
|
||||
::
|
||||
@ -1505,17 +1516,17 @@
|
||||
(yokg num p.som.pip q.som.pip s.som.pip)
|
||||
::
|
||||
%apm :: message
|
||||
~& [%wink-apm +.som.pip]
|
||||
:: ~& [%wink-apm +.som.pip]
|
||||
:- [~ pip(pez %way)]
|
||||
(yokm num +.som.pip)
|
||||
::
|
||||
%aps :: subscribe
|
||||
~& [%wink-aps +.som.pip]
|
||||
:: ~& [%wink-aps +.som.pip]
|
||||
:- [~ pip(pez %way)]
|
||||
(yoks num +.som.pip)
|
||||
::
|
||||
%apu :: unsubscribe
|
||||
~& [%wink-apu +.som.pip]
|
||||
:: ~& [%wink-apu +.som.pip]
|
||||
:- [~ pip(pez %way)]
|
||||
(yoku num +.som.pip)
|
||||
::
|
||||
@ -2032,8 +2043,7 @@
|
||||
sip.pip
|
||||
:_ sip.pip
|
||||
%- duty
|
||||
:~ (rsh 3 1 (scot %p our))
|
||||
%goe
|
||||
:~ %goe
|
||||
app
|
||||
(rsh 3 2 (scot %ui nap))
|
||||
suc
|
||||
@ -2048,7 +2058,7 @@
|
||||
%= pip
|
||||
pez %new
|
||||
vaz :~ [%ship (quo (rsh 3 1 (scot %p our)))]
|
||||
[%appn (quo app)]
|
||||
[%appl (quo app)]
|
||||
[%port (trip (rsh 3 2 (scot %ui nap)))]
|
||||
[%auto "true"]
|
||||
[%oryx (quo orx.ced)]
|
||||
|
@ -561,7 +561,7 @@
|
||||
++ morn :: install core
|
||||
|= vax=vase
|
||||
^+ +>
|
||||
=+ new=?~(huv.sat & !=(+>+.q.vax +>+.q.u.huv.sat))
|
||||
=+ new=?~(huv.sat & !=(+<+.q.vax +<+.q.u.huv.sat))
|
||||
=. huv.sat `vax
|
||||
?. new +>.$
|
||||
=: act.sat +(act.sat)
|
||||
@ -570,7 +570,7 @@
|
||||
=+ pex=(~(tap by peq.sat) ~)
|
||||
|- ^+ +>.^$
|
||||
?~ pex +>.^$
|
||||
~& [%morn-peek p.i.pex (need (~(get by sup.sat) p.i.pex))]
|
||||
:: ~& [%morn-peek p.i.pex (need (~(get by sup.sat) p.i.pex))]
|
||||
%= $
|
||||
pex t.pex
|
||||
+>.^$ %- quem(hen (need (~(get by r.zam.sat) p.i.pex)))
|
||||
@ -698,14 +698,14 @@
|
||||
::
|
||||
%mess
|
||||
=+ ^= cog ^- term
|
||||
?: =(%$ p.q.kon)
|
||||
%poke
|
||||
(cat 3 'poke-' p.q.kon)
|
||||
?: =(%$ p.q.kon) %poke
|
||||
=+ goc=(cat 3 'poke-' p.q.kon)
|
||||
?:((warm goc) goc %poke)
|
||||
?. (warm cog)
|
||||
(give(qic.sat ~) %rasp ~)
|
||||
?> ?=(^ huv.sat)
|
||||
=+ sam=:(slop [[%atom %ud] ost] [[%atom %p] p.kon] q.q.kon)
|
||||
~& [%mess-poke cog]
|
||||
:: ~& [%mess-poke cog]
|
||||
%+ ford /s/poke
|
||||
[%call (harm cog (conf (core u.huv.sat))) (cove %$ sam)]
|
||||
::
|
||||
|
@ -9587,7 +9587,9 @@
|
||||
?- -.r.gum
|
||||
%pass
|
||||
~? &(!lac !=(%$ p.gum))
|
||||
[%pass p.gum (,@tas +>-.q.q.r.gum) q.gum]
|
||||
:^ %pass [p.gum p.q.r.gum]
|
||||
p.r.gum
|
||||
q.gum
|
||||
[p.q.r.gum ~ [[p.gum p.r.gum] q.gum] q.q.r.gum]
|
||||
::
|
||||
%give
|
||||
|
38
main/app/appbug-2/core.hoon
Normal file
38
main/app/appbug-2/core.hoon
Normal file
@ -0,0 +1,38 @@
|
||||
!: |= *
|
||||
::::::::: Foobug: a simple application.
|
||||
::
|
||||
|_ [hid=hide vat=[%0 p=@ud]]
|
||||
++ poke
|
||||
|= [ost=bone you=ship jon=json]
|
||||
~& [%poke p.vat you (pojo jon)]
|
||||
:_ +>(p.vat +(p.vat))
|
||||
:~ [ost %give %rasp ~]
|
||||
==
|
||||
::
|
||||
++ peek
|
||||
|= [you=ship pax=path]
|
||||
:- %hymn
|
||||
^- manx
|
||||
;html
|
||||
;head
|
||||
;title: Foobug!
|
||||
==
|
||||
;body
|
||||
;p: Dude, the answer is {<p.vat>}.
|
||||
;button(onclick "bump()"): (bump.)
|
||||
;script
|
||||
; var mess = 0;
|
||||
;
|
||||
; function bump() {
|
||||
; xhr = new XMLHttpRequest();
|
||||
; xhr.onload = function() { mess++; }
|
||||
; xhr.open("POST", "/pim/"+user+"/"+appl+"/"+port+"/"+mess)
|
||||
; xhr.setRequestHeader("content-type", "text/json")
|
||||
; xhr.send(JSON.stringify({oryx: oryx, xyro: {}}));
|
||||
; }
|
||||
==
|
||||
==
|
||||
==
|
||||
--
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user