mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-11 04:48:00 +03:00
Merge branch 'master' into newbreach
Took master's pill. Conflicts: Makefile urb/urbit.pill
This commit is contained in:
commit
c8655dbeca
199
arvo/eyre.hoon
199
arvo/eyre.hoon
@ -15,20 +15,30 @@
|
||||
fon=(map ship rote) :: foreign servers
|
||||
ask=[p=@ud q=(map ,@ud ,[p=duct q=hiss])] :: outgoing by number
|
||||
kes=(map duct ,@ud) :: outgoing by duct
|
||||
lor=(map duct dual) :: incoming by duct
|
||||
== ::
|
||||
++ coal :: console
|
||||
$: ino=@ud :: input sequence
|
||||
ono=@ud :: (lent out)
|
||||
voy=(map ,@ud (list ,@ud)) :: waiters (q.rey)
|
||||
out=(list json) :: output commands
|
||||
== ::
|
||||
++ cyst :: client session
|
||||
$: ced=cred :: credential
|
||||
cow=(map ,@ud coal) :: consoles
|
||||
cug=(list ,@t) :: unacked cookies
|
||||
lax=@da :: last used
|
||||
rey=[p=@ud q=(map ,@ud pimp)] :: live requests
|
||||
== ::
|
||||
++ dual ,[p=@ud q=(each ,[p=ship q=hole] ship)] :: request handle
|
||||
++ dude ,[p=@tas q=@] :: client identity
|
||||
++ loco ,[p=? q=(unit ,@tas) r=path] :: logical construct
|
||||
++ pest :: request in progress
|
||||
$| $? %new :: virgin
|
||||
%way :: waiting for %clay
|
||||
%way :: waiting
|
||||
== ::
|
||||
$% [%err p=@ud q=(list tank)] :: error report
|
||||
$% [%con p=@ud q=@ud r=json] :: console action
|
||||
[%err p=@ud q=(list tank)] :: error report
|
||||
[%fin p=love] :: ready to send
|
||||
[%haz p=riot] :: clay responded
|
||||
[%raw p=hiss] :: wild url
|
||||
@ -200,6 +210,16 @@
|
||||
[[sec (rash i.u.hot thor:epur)] p.ryp q.ryp]
|
||||
==
|
||||
(hell pul +.fav [p.heq mah s.heq])
|
||||
::
|
||||
%thud :: cancel request
|
||||
=+ dul=(~(get by lor) hen)
|
||||
?~ dul +.$
|
||||
=. lor (~(del by lor) hen)
|
||||
?- -.q.u.dul
|
||||
& =+ boy=(myth p.p.q.u.dul q.p.q.u.dul)
|
||||
?~(boy +.$ abet:(idle:u.boy p.u.dul))
|
||||
| (hops p.q.u.dul p.u.dul)
|
||||
==
|
||||
::
|
||||
%thou :: remote return
|
||||
?> ?=([@ *] tea)
|
||||
@ -248,19 +268,23 @@
|
||||
++ gosh :: receive %pr response
|
||||
|= [him=ship num=@ud har=httr]
|
||||
^+ +>
|
||||
=+ rot=(need (~(get by fon) him))
|
||||
=+ zer=(need (~(get by q.rem.rot) num))
|
||||
=+ ryt=(~(get by fon) him)
|
||||
?~ ryt +>.$
|
||||
=+ zur=(~(get by q.rem.u.ryt) num)
|
||||
?~ zur +>.$
|
||||
%_ +>.$
|
||||
mow :_(mow [wru zer [%thou har]])
|
||||
fon (~(put by fon) him rot(q.rem (~(del by q.rem.rot) num)))
|
||||
mow :_(mow [wru u.zur [%thou har]])
|
||||
fon (~(put by fon) him u.ryt(q.rem (~(del by q.rem.u.ryt) num)))
|
||||
==
|
||||
::
|
||||
++ gout
|
||||
|= [our=ship ses=hole num=@ud rot=riot]
|
||||
^+ +>
|
||||
=+ sef=`serf`(need (~(get by own) our))
|
||||
=+ cyz=`cyst`(need (~(get by wup.sef) ses))
|
||||
abet:work:(~(iota ya [our ses] sef cyz) num rot)
|
||||
=+ suf=(~(get by own) our)
|
||||
?~ suf +>.$
|
||||
=+ cuz=(~(get by wup.u.suf) ses)
|
||||
?~ cuz +>.$
|
||||
abet:work:(~(iota ya [our ses] u.suf u.cuz) num rot)
|
||||
::
|
||||
++ hajj :: send %pr response
|
||||
|= [him=ship tus=path har=httr]
|
||||
@ -270,8 +294,12 @@
|
||||
++ hare :: receive request
|
||||
|= [tus=path him=ship hor=*]
|
||||
^+ +>
|
||||
=+ hyx=((hard httx) hor)
|
||||
+>.$(mow :_(mow [wru [/e [%e (scot %p him) tus] hen] [%this hyx]]))
|
||||
=+ hux=((hard (unit httx)) hor)
|
||||
%_ +>.$
|
||||
mow
|
||||
:_ mow
|
||||
[wru [/e [%e (scot %p him) tus] hen] ?~(hux [%thud ~] [%this u.hux])]
|
||||
==
|
||||
::
|
||||
++ hell :: request, no ship
|
||||
|= [pul=purl hyx=httx moh=moth]
|
||||
@ -306,6 +334,19 @@
|
||||
[%warp our rif]
|
||||
==
|
||||
::
|
||||
++ hops :: cancel remote
|
||||
|= [him=ship num=@]
|
||||
^+ +>
|
||||
=+ mun=(scot %ud num)
|
||||
=+ rot=(need (~(get by fon) him))
|
||||
%_ +>.$
|
||||
mow
|
||||
:_ mow
|
||||
:+ [~ %gold sor.rot]
|
||||
[/a [%e %hork mun ~] hen]
|
||||
[%want him [%q %pr %e %hork mun ~] ~]
|
||||
==
|
||||
::
|
||||
++ hork :: remote request
|
||||
|= [him=ship hyx=httx]
|
||||
^+ +>
|
||||
@ -321,11 +362,12 @@
|
||||
=+ num=p.rem.rot
|
||||
=+ mun=(scot %ud num)
|
||||
%_ +>.$
|
||||
lor (~(put by lor) hen num [%| him])
|
||||
mow
|
||||
:_ mow
|
||||
:+ [~ %gold sor.rot]
|
||||
[/a [%e %hork mun ~] hen]
|
||||
[%want him [%q %pr %e %hork mun ~] hyx]
|
||||
[%want him [%q %pr %e %hork mun ~] [~ hyx]]
|
||||
::
|
||||
fon
|
||||
%+ ~(put by fon) him
|
||||
@ -450,12 +492,14 @@
|
||||
cip
|
||||
~
|
||||
==
|
||||
::
|
||||
~
|
||||
::
|
||||
:_ ~
|
||||
%^ cat 3
|
||||
(cat 3 (cat 3 pef.sef '=') ses)
|
||||
:: (cat 3 '; HttpOnly' ?.(sec '' '; Secure'))
|
||||
'; HttpOnly'
|
||||
'; Path=/; HttpOnly'
|
||||
::
|
||||
now
|
||||
[1 ~]
|
||||
@ -466,6 +510,14 @@
|
||||
|= fav=card
|
||||
+>(mow :_(mow [wru hen fav]))
|
||||
::
|
||||
++ myth :: load session
|
||||
|= [our=ship ses=hole]
|
||||
=+ suf=(~(get by own) our)
|
||||
?~ suf ~
|
||||
=+ cuz=(~(get by wup.u.suf) ses)
|
||||
?~ cuz ~
|
||||
[~ u=~(. ya [our ses] u.suf u.cuz)]
|
||||
::
|
||||
++ ya :: session engine
|
||||
=| [[our=ship ses=hole] serf cyst]
|
||||
=* sef ->-
|
||||
@ -478,6 +530,46 @@
|
||||
(~(put by own) our sef(wup (~(put by wup) ses cyz)))
|
||||
==
|
||||
::
|
||||
++ dodo :: console s->c
|
||||
|= [con=@ud fav=card]
|
||||
^+ +>
|
||||
=+ cal=(need (~(get by cow) con))
|
||||
=+ ^= jon ^- json
|
||||
?: ?=(%helo -.fav)
|
||||
%+ joba %helo
|
||||
%- jobe
|
||||
:~ [%path [%a `(list jval)`(turn p.fav |=(a=@ta [%s a]))]]
|
||||
[%prod ~[%a [%s p.q.fav] (jape q.q.fav) (jape r.q.fav)]]
|
||||
==
|
||||
%+ joba %text
|
||||
:- %a ^- (list jval)
|
||||
?+ -.fav ~|(-.fav !!)
|
||||
%tell (turn p.fav |=(a=@t [%s a]))
|
||||
%text [%s (crip p.fav)]~
|
||||
%talk (turn (~(win re p.fav) [0 80]) |=(a=tape [%s (crip a)]))
|
||||
%warn [%s (crip '!' p.fav)]~
|
||||
==
|
||||
=+ ^= yov ^- (list ,@ud)
|
||||
=+ yov=(~(get by voy.cal) ono.cal)
|
||||
?~(yov ~ u.yov)
|
||||
=: voy.cal (~(del by voy.cal) ono.cal)
|
||||
ono.cal +(ono.cal)
|
||||
out.cal [jon out.cal]
|
||||
==
|
||||
=. cow (~(put by cow) con cal)
|
||||
?~(yov +>.$ (dove ~[%a (jone ono.cal) (jone ino.cal) jon] yov))
|
||||
::
|
||||
++ dove :: console waiters
|
||||
|= [jon=json yov=(list ,@ud)]
|
||||
^+ +>
|
||||
=+ noz=`pest`[%fin %mid /text/json (tact (pojo jon))]
|
||||
|- ^+ +>.^$
|
||||
?~ yov +>.^$
|
||||
=+ pup=(~(get by q.rey) i.yov)
|
||||
?~ pup $(yov t.yov)
|
||||
?> ?=(%way pez.u.pup)
|
||||
$(yov t.yov, q.rey (~(put by q.rey) i.yov u.pup(pez noz)))
|
||||
::
|
||||
++ flux :: credential caboose
|
||||
|= [nep=@tas quy=quay]
|
||||
^- coin
|
||||
@ -546,16 +638,17 @@
|
||||
=- =+ pey=(cat 3 (end 3 2 nep) %v)
|
||||
=+ ven=+((,@ (need (sky %cw p.toe q.toe r.toe ~))))
|
||||
=+ ^= cal :/
|
||||
"call('".
|
||||
"path='".
|
||||
"/{(trip (rsh 3 1 p.toe))}".
|
||||
"/{(trip pey)}".
|
||||
"/{(scow %ud ven)}".
|
||||
"/{(trip q.toe)}');"
|
||||
[-.sac (weld `marl`+.sac `marl`[cal ~])]
|
||||
"/{(trip q.toe)}';"
|
||||
[-.sac [cal +.sac]]
|
||||
^= sac
|
||||
;script
|
||||
;
|
||||
; tries = 0;
|
||||
; call = function(path) {
|
||||
; call = function() {
|
||||
; xhr = new XMLHttpRequest();
|
||||
; xhr.open('GET', path, true);
|
||||
; xhr.addEventListener('load', function() {
|
||||
@ -572,6 +665,7 @@
|
||||
; setTimeout(call,1000*tries);
|
||||
; tries++;
|
||||
; }
|
||||
; call();
|
||||
==
|
||||
::
|
||||
++ holy :: structured request
|
||||
@ -595,8 +689,9 @@
|
||||
%e & :: stranger
|
||||
%u p.p.pul :: guest
|
||||
%i !=(~ aut.ced) :: neighbor
|
||||
%o =+ urb=(~(get by aut.ced) %$) :: owner
|
||||
?~(urb | (levy u.urb |=(a=@ =(our a))))
|
||||
%o &
|
||||
:: %o =+ urb=(~(get by aut.ced) %$) :: owner
|
||||
:: ?~(urb | (levy u.urb |=(a=@ =(our a))))
|
||||
==
|
||||
?= $? %p :: application
|
||||
%c :: console
|
||||
@ -615,11 +710,21 @@
|
||||
?(%p %c %l) !!
|
||||
==
|
||||
::
|
||||
++ into
|
||||
++ idle :: cancel request
|
||||
|= num=@ud
|
||||
^+ +>
|
||||
=+ pup=(~(get by q.rey) num)
|
||||
?~ pup +>.$
|
||||
=. q.rey (~(del by q.rey) num)
|
||||
?. ?=(%way pez.u.pup) +>.$
|
||||
+>.$(..ya (hoot our num ses `riff`[p.som.u.pup ~]))
|
||||
::
|
||||
++ into :: introduce
|
||||
|= [pul=purl moh=moth]
|
||||
^+ +>
|
||||
=+ num=p.rey
|
||||
%= +>.$
|
||||
lor (~(put by lor) hen num [%& our ses])
|
||||
p.rey +(num)
|
||||
q.rey
|
||||
%+ ~(put by q.rey) num
|
||||
@ -634,9 +739,12 @@
|
||||
++ iota :: change response
|
||||
|= [num=@ud rot=riot]
|
||||
^+ +>
|
||||
=+ pip=`pimp`(need (~(get by q.rey) num))
|
||||
?> ?=(%way pez.pip)
|
||||
+>.$(q.rey (~(put by q.rey) num pip(pez [%haz rot])))
|
||||
=+ pup=(~(get by q.rey) num)
|
||||
?~ pup
|
||||
~& [%iota-lost ses num rot]
|
||||
+>.$
|
||||
?> ?=(%way pez.u.pup)
|
||||
+>.$(q.rey (~(put by q.rey) num u.pup(pez [%haz rot])))
|
||||
::
|
||||
++ lace :: load and execute
|
||||
|= [pax=path sam=vase]
|
||||
@ -953,6 +1061,34 @@
|
||||
==
|
||||
==
|
||||
==
|
||||
::
|
||||
[%con *]
|
||||
=+ ^= cal ^- coal
|
||||
=+ cal=(~(get by cow) p.pez.pip)
|
||||
?^ cal u.cal
|
||||
*coal
|
||||
?. =(q.pez.pip ino.cal)
|
||||
=. cow (~(put by cow) p.pez.pip cal)
|
||||
:_ +>.$
|
||||
[~ pip(pez [%err 500 [%leaf "cons: {<q.pez.pip>}, {<ino.cal>}."]~])]
|
||||
=+ ^= fuv ^- (unit card)
|
||||
?. ?=(%o -.r.pez.pip) ~
|
||||
=+ lin=(~(get by p.r.pez.pip) %line)
|
||||
?^ lin ?.(?=(%s -.u.lin) ~ [~ %line p.u.lin])
|
||||
=+ syc=(~(get by p.r.pez.pip) %sync)
|
||||
?^ syc [~ %hail ~]
|
||||
=+ lig=(~(get by p.r.pez.pip) %ling)
|
||||
?^ lig [~ %ling ~]
|
||||
~
|
||||
:_ %_ +>.$
|
||||
mow
|
||||
?~ fuv mow
|
||||
:_ mow
|
||||
:+ [~ %gold our]
|
||||
[/b [%e %cons ses (scot %ud p.pez.pip) ~] hen]
|
||||
u.fuv
|
||||
==
|
||||
[~ `pimp`pip(pez `pest`[%fin %raw 200 ~ ~])]
|
||||
::
|
||||
[%err *]
|
||||
[~ +>.$(..ya (muff [%thou (loft `love`[%zap +.pez.pip])]))]
|
||||
@ -981,22 +1117,6 @@
|
||||
=+ sez=step
|
||||
?: =(rey.sez rey) sez
|
||||
$(+ sez)
|
||||
::
|
||||
++ into
|
||||
|= [pul=purl moh=moth]
|
||||
^+ +>
|
||||
=+ num=p.rey
|
||||
%= +>.$
|
||||
p.rey +(num)
|
||||
q.rey
|
||||
%+ ~(put by q.rey) num
|
||||
^- pimp
|
||||
:* !?=(%head p.moh)
|
||||
hen
|
||||
*seam
|
||||
`pest`[%raw pul moh]
|
||||
==
|
||||
==
|
||||
--
|
||||
--
|
||||
--
|
||||
@ -1009,6 +1129,7 @@
|
||||
++ beat :: process move
|
||||
|= [wru=(unit writ) tea=wire hen=duct fav=curd]
|
||||
=> .(fav ((hard card) fav))
|
||||
=. ney (shax :(mix (shax now) +(eny) ney)) :: XX!! shd not need
|
||||
?: ?=(%crud -.fav)
|
||||
[[[wru [/d hen] %flog fav] ~] ..^$]
|
||||
^- [p=(list move) q=vane]
|
||||
|
146
arvo/hoon.hoon
146
arvo/hoon.hoon
@ -126,7 +126,6 @@
|
||||
$= q ::
|
||||
[p=?(~ axis) q=(list ,[p=type q=foot])] ::
|
||||
== ::
|
||||
++ reef ,[p=[p=? q=@ud] q=@ud] :: XX not used
|
||||
++ rege $| ?(%dote %ende %sart %empt %boun %bout) :: parsed regex
|
||||
$% [%lite p=char] :: literal
|
||||
[%pair p=rege q=rege] :: ordering
|
||||
@ -190,13 +189,13 @@
|
||||
++ twig $& [p=twig q=twig] ::
|
||||
$% ::
|
||||
[%$ p=axis] :: blip, empty name
|
||||
:: :::::: tile reductions
|
||||
:: ::
|
||||
[%bccb p=tile] :: bunt a tile
|
||||
[%bccm p=tile] :: clam a tile
|
||||
[%bcpt p=wing q=tile] :: whip p into q
|
||||
[%bctr p=tile] :: static bunt w/ ^~
|
||||
[%bczp p=base] :: bunt an axil
|
||||
:: :::::: cores
|
||||
:: ::
|
||||
[%brcb p=tile q=(map term foot)] :: %gold tray, sample p
|
||||
[%brcn p=(map term foot)] :: %gold core, natural
|
||||
[%brdt p=twig] :: dry %gold trap
|
||||
@ -208,7 +207,7 @@
|
||||
[%brtr p=tile q=twig] :: vulcan. wet gate
|
||||
[%brts p=tile q=twig] :: dry %gold gate
|
||||
[%brwt p=twig] :: dry %lead trap
|
||||
:: :::::: tuples
|
||||
:: ::
|
||||
[%clcb p=twig q=twig] :: [q p]
|
||||
[%clcn p=tusk] :: [[p ~] ~]
|
||||
[%clfs p=twig] :: [%$ [%$ p ~] ~]
|
||||
@ -218,7 +217,7 @@
|
||||
[%clsg p=tusk] :: [p ~]
|
||||
[%cltr p=tusk] :: p as a tuple
|
||||
[%clzz p=tusk] :: macro
|
||||
:: :::::: invocations
|
||||
:: ::
|
||||
[%cncb p=wing q=tram] :: %=, then cast to p
|
||||
[%cncl p=twig q=twig] :: pull $.p w/ sample q
|
||||
[%cndt p=twig q=twig] :: %-(q p)
|
||||
@ -230,8 +229,6 @@
|
||||
[%cnts p=wing q=tram] :: eval. p w/ q changes
|
||||
[%cnzy p=term] :: pulls limb p
|
||||
[%cnzz p=wing] :: pulls p
|
||||
:: ::
|
||||
:: :: nock
|
||||
:: ::
|
||||
[%dtkt p=twig] :: Nock 11 data skyhook
|
||||
[%dtls p=twig] :: Nock 4 increment
|
||||
@ -785,68 +782,6 @@
|
||||
|-
|
||||
?~ a ~
|
||||
(weld i.a $(a t.a))
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
:: section 2bC, gears ::
|
||||
::
|
||||
++ from :: range
|
||||
|= [a=@ b=@]
|
||||
^- (gear ,@)
|
||||
=+ c=0
|
||||
|?
|
||||
?: =(c b)
|
||||
~
|
||||
[i=a t=^?(..$(a +(a), c +(c)))]
|
||||
::
|
||||
++ long ::
|
||||
|* a=(gear)
|
||||
=+ b=0
|
||||
|- ^- @
|
||||
=+ c=(a)
|
||||
?~ c
|
||||
b
|
||||
$(b +(b), a t.c)
|
||||
::
|
||||
++ lone |*(a=* |?([i=a t=none])) ::
|
||||
++ mill
|
||||
|* [a=_,* b=(gear)]
|
||||
|?
|
||||
=+ c=(b)
|
||||
?~ c
|
||||
~
|
||||
[i=(a i.c) t=^?(..$(b t.c))]
|
||||
::
|
||||
++ none |?(~) ::
|
||||
++ over ::
|
||||
|= [a=@ b=@]
|
||||
^- (gear ,@)
|
||||
|?
|
||||
?: =(a b)
|
||||
[i=a t=none]
|
||||
[i=a t=^?(..$(a +(a)))]
|
||||
::
|
||||
++ pull ::
|
||||
|* a=(gear)
|
||||
|= b=_^+(|-(=+(b=(a) ?~(b ~ [i=i.b t=$(a t.b)]))) ~)
|
||||
^+ b
|
||||
=+ c=(a)
|
||||
?~ c
|
||||
b
|
||||
$(b [i.c b], a t.c)
|
||||
::
|
||||
++ push ::
|
||||
|* a=(gear)
|
||||
|= b=_^+(|-(=+(b=(a) ?~(b ~ [i=i.b t=$(a t.b)]))) ~)
|
||||
^+ b
|
||||
=+ c=((pull a) ~)
|
||||
((pull (spin c)) b)
|
||||
::
|
||||
++ spin ::
|
||||
|* a=(list)
|
||||
=> .(a `_(homo a)`a)
|
||||
|?
|
||||
?~ a
|
||||
~
|
||||
[i=i.a t=^?(..$(a t.a))]
|
||||
:::::::::::::::::::::::::::::::::::::::::::::::::::::: ::
|
||||
:::: chapter 2c, simple noun surgery ::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
@ -1591,6 +1526,15 @@
|
||||
b
|
||||
$(a r.a, b [n.a $(a l.a)])
|
||||
::
|
||||
+- uni
|
||||
~/ %uni
|
||||
|= b=_a
|
||||
?@ b a
|
||||
%= $
|
||||
a (~(put by a) p.n.b q.n.b)
|
||||
b (~(uni by l.b) r.b)
|
||||
==
|
||||
::
|
||||
+- wyt
|
||||
.+
|
||||
|- ^- @
|
||||
@ -2734,6 +2678,7 @@
|
||||
^= gam ^- [p=tape q=tape]
|
||||
?+ hay [~ ((ox-co [10 3] |=(a=@ ~(d ne a))) q.p.lot)]
|
||||
%b [['0' 'b' ~] ((ox-co [2 4] |=(a=@ ~(d ne a))) q.p.lot)]
|
||||
%i [['0' 'i' ~] ((d-co 1) q.p.lot)]
|
||||
%x [['0' 'x' ~] ((ox-co [16 4] |=(a=@ ~(x ne a))) q.p.lot)]
|
||||
%v [['0' 'v' ~] ((ox-co [32 5] |=(a=@ ~(x ne a))) q.p.lot)]
|
||||
%w [['0' 'w' ~] ((ox-co [64 5] |=(a=@ ~(w ne a))) q.p.lot)]
|
||||
@ -2836,6 +2781,7 @@
|
||||
;~ pfix (just '0')
|
||||
;~ pose
|
||||
(stag %ub ;~(pfix (just 'b') bay:ag))
|
||||
(stag %ui ;~(pfix (just 'i') dim:ag))
|
||||
(stag %ux ;~(pfix (just 'x') hex:ag))
|
||||
(stag %uv ;~(pfix (just 'v') viz:ag))
|
||||
(stag %uw ;~(pfix (just 'w') wiz:ag))
|
||||
@ -3747,7 +3693,9 @@
|
||||
|= [old=* new=*] ^- udon
|
||||
:- pum
|
||||
?+ pum ~|(%unsupported !!)
|
||||
%a [%a old new]
|
||||
%a [%d (nude old new)]
|
||||
:: %b =+ [hel=(cue ((hard ,@) old)) hev=(cue ((hard ,@) new))]
|
||||
:: [%d (nude hel hev)]
|
||||
%c =+ [hel=(lore ((hard ,@) old)) hev=(lore ((hard ,@) new))]
|
||||
[%c (lusk hel hev (loss hel hev))]
|
||||
==
|
||||
@ -3851,6 +3799,7 @@
|
||||
?+ -.q.don ~|(%unsupported !!)
|
||||
%a q.p.q.don
|
||||
%c (lurk ((hard (list)) src) p.q.don)
|
||||
%d (lure src p.q.don)
|
||||
==
|
||||
::
|
||||
%c
|
||||
@ -3862,6 +3811,15 @@
|
||||
==
|
||||
==
|
||||
::
|
||||
++ lure :: apply tree diff
|
||||
|= [a=* b=upas]
|
||||
^- *
|
||||
?^ -.b
|
||||
[$(b -.b) $(b +.b)]
|
||||
?+ -.b ~|(%unsupported !!)
|
||||
%0 .*(a [0 p.b])
|
||||
%1 .*(a [1 p.b])
|
||||
==
|
||||
++ limp :: invert patch
|
||||
|= don=udon ^- udon
|
||||
:- p.don
|
||||
@ -3953,6 +3911,37 @@
|
||||
$(hel t.hel, rag (done %| [i.hel ~] ~))
|
||||
$(hel t.hel, hev t.hev, rag (done %| [i.hel ~] [i.hev ~]))
|
||||
--
|
||||
++ nude :: tree change
|
||||
|= [a=* b=*]
|
||||
^- [p=upas q=upas]
|
||||
=< [p=(tred a b) q=(tred b a)]
|
||||
|%
|
||||
++ axes :: locs of nouns
|
||||
|= [a=@ b=*] ^- (map ,* axis)
|
||||
=+ c=*(map ,* axis)
|
||||
|- ^- (map ,* axis)
|
||||
=> .(c (~(put by c) b a))
|
||||
?@ b
|
||||
c
|
||||
%- ~(uni by c)
|
||||
%- ~(uni by $(a (mul 2 a), b -.b))
|
||||
$(a +((mul 2 a)), b +.b)
|
||||
++ tred :: diff a->b
|
||||
|= [a=* b=*] ^- upas
|
||||
=| c=(unit ,*)
|
||||
=+ d=(axes 1 a)
|
||||
|- ^- upas
|
||||
=> .(c (~(get by d) b))
|
||||
?~ c
|
||||
?@ b
|
||||
[%1 b]
|
||||
=+ e=^-(upas [$(b -.b) $(b +.b)])
|
||||
?- e
|
||||
[[%1 *] [%1 *]] [%1 [p.p.e p.q.e]]
|
||||
* e
|
||||
==
|
||||
[%0 u.c]
|
||||
--
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
:: section 2eW, lite number theory ::
|
||||
::
|
||||
@ -7452,12 +7441,16 @@
|
||||
%+ cook |=(a=(list tuna) a)
|
||||
%+ ifix [gap ;~(plug gap duz)]
|
||||
%+ most gap
|
||||
;~ pfix
|
||||
;~(plug sem ace)
|
||||
%+ cook
|
||||
|= a=tape
|
||||
[%a %smdq (weld a `tape`[`@`10 ~])]
|
||||
(star (shim 32 255))
|
||||
;~ pfix sem
|
||||
;~ pose
|
||||
;~ pfix ace
|
||||
%+ cook
|
||||
|= a=tape
|
||||
[%a %smdq (weld a `tape`[`@`10 ~])]
|
||||
(star (shim 32 255))
|
||||
==
|
||||
(easy [%a %smdq `@`10 ~])
|
||||
==
|
||||
==
|
||||
::
|
||||
++ nol :: tall tail
|
||||
@ -8593,6 +8586,7 @@
|
||||
::
|
||||
++ poke :: external apply
|
||||
|= [now=@da ovo=ovum]
|
||||
=. eny (mix eny (shax now))
|
||||
^- [(list ovum) _+>]
|
||||
=^ zef fan
|
||||
(~(hurl (is eny vil bud fan) now) ovo)
|
||||
|
@ -504,10 +504,10 @@
|
||||
?~ myn ~
|
||||
?: =(~ t.myn) (trip i.myn)
|
||||
(weld (trip i.myn) `tape`['/' $(myn t.myn)])
|
||||
|
||||
++ poja
|
||||
::
|
||||
++ poja :: parse JSON
|
||||
|%
|
||||
++ valu :: JSON value
|
||||
++ valu :: JSON value
|
||||
%+ knee *jval |. ~+
|
||||
;~ pfix spac
|
||||
;~ pose
|
||||
@ -588,14 +588,12 @@
|
||||
++ mayb |*(bus=_rule ;~(pose bus (easy "")))
|
||||
++ twel |=([a=tape b=tape] (weld a b))
|
||||
++ piec
|
||||
|* bus=_rule
|
||||
(cook |=(a=@ [a ~]) bus)
|
||||
--
|
||||
|
||||
|* bus=_rule
|
||||
(cook |=(a=@ [a ~]) bus)
|
||||
--
|
||||
::
|
||||
++ pojo :: print json
|
||||
|= val=jval
|
||||
!:
|
||||
^- tape
|
||||
?~ val "null"
|
||||
?- -.val
|
||||
@ -635,12 +633,32 @@
|
||||
"}"
|
||||
==
|
||||
==
|
||||
++ jesc
|
||||
::
|
||||
++ joba
|
||||
|= [p=@t q=jval]
|
||||
^- json
|
||||
[%o [[p q] ~ ~]]
|
||||
::
|
||||
++ jobe
|
||||
|= a=(list ,[p=@t q=jval])
|
||||
^- json
|
||||
[%o (~(gas by *(map ,@t jval)) a)]
|
||||
::
|
||||
++ jape
|
||||
|= a=tape
|
||||
^- jval
|
||||
[%s (crip a)]
|
||||
::
|
||||
++ jone
|
||||
|= a=@
|
||||
?+ a [a ~]
|
||||
10
|
||||
"\\n"
|
||||
==
|
||||
^- jval
|
||||
:- %n
|
||||
?: =(0 a) '0'
|
||||
(crip (flop |-(^-(tape ?:(=(0 a) ~ [(add '0' (mod a 10)) $(a (div a 10))])))))
|
||||
::
|
||||
++ jesc
|
||||
|= a=@ ^- tape
|
||||
?.(=(10 a) [a ~] "\\n")
|
||||
::
|
||||
++ taco :: atom to octstream
|
||||
|= tam=@ ^- octs
|
||||
@ -824,7 +842,6 @@
|
||||
==
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::
|
||||
++ woof (list $|(@ud [p=@ud q=@ud])) :: udon transform
|
||||
++ lisp :: transform urge
|
||||
|* wig=(urge)
|
||||
|= dog=woof
|
||||
@ -1989,6 +2006,7 @@
|
||||
[%they p=@ud q=httr] :: response to %them
|
||||
[%this p=? q=clip r=httq] :: secure/src/req
|
||||
[%thou p=httr] :: raw http response
|
||||
[%thud ~] :: cancel http request
|
||||
[%thug p=@p q=@p] :: sign in client
|
||||
[%thus p=@ud q=(unit hiss)] :: http request/cancel
|
||||
[%tory p=(list ,@t)] :: history dump
|
||||
|
@ -191,7 +191,7 @@
|
||||
=+ len=(met 7 msg)
|
||||
=+ adj=?:(=(0 len) 1 len)
|
||||
=+ hax=(shax (mix key (shax (mix adj msg))))
|
||||
=+ haf=(cut 7 [0 1] hax)
|
||||
=+ haf=(mix (cut 7 [0 1] hax) (cut 7 [1 1] hax))
|
||||
=+ ret=(can 7 ~[[2 hax] [adj (mix (burn key haf adj) msg)]])
|
||||
ret
|
||||
++ de
|
||||
@ -201,7 +201,7 @@
|
||||
~
|
||||
=+ adj=(sub toh 2)
|
||||
=+ [hax=(end 8 1 cep) bod=(rsh 8 1 cep)]
|
||||
=+ haf=(cut 7 [0 1] hax)
|
||||
=+ haf=(mix (cut 7 [0 1] hax) (cut 7 [1 1] hax))
|
||||
=+ msg=(mix (burn key haf adj) bod)
|
||||
?. =(hax (shax (mix key (shax (mix adj msg)))))
|
||||
~
|
||||
|
@ -11,9 +11,9 @@
|
||||
=+ foo=`manx`i/;"foobarz"
|
||||
=+ lam=`(list manx)`[lim lum lom ~]
|
||||
;=
|
||||
;title: Hi again!
|
||||
;title: Hi foo!
|
||||
;
|
||||
;p: Hello, world. Goodbye! Hello! Typing...
|
||||
;p: Hello, world. Goodbye! Hello! Typing... more typing...
|
||||
;p:"Hello: pos is {<pos>}"
|
||||
;- "Goodbye"
|
||||
;+ ;p:"Hello again"
|
||||
|
@ -27,7 +27,7 @@
|
||||
6
|
||||
--
|
||||
|%
|
||||
++ cott
|
||||
++ cott
|
||||
;~ pose
|
||||
(shim 0 8)
|
||||
(shim 11 37)
|
||||
@ -88,7 +88,7 @@
|
||||
==
|
||||
inlt
|
||||
==
|
||||
;~ mcat
|
||||
;~ mcat
|
||||
(wcat ;~(plug ;~(plug pam hax ;~(sfix (plus nud) sem)) (easy ";")))
|
||||
inlt
|
||||
==
|
||||
@ -241,7 +241,7 @@
|
||||
|= [a=@ b=@]
|
||||
%+ knee *down |. ~+
|
||||
;~ pose
|
||||
inli
|
||||
inli
|
||||
hrul
|
||||
;~(pfix (just `@`10) (lmel a b))
|
||||
==
|
||||
@ -266,7 +266,7 @@
|
||||
|= [a=@ b=@]
|
||||
%+ knee *down |. ~+
|
||||
(colk a b ;~(pfix dim:ag dot (plus whit) (lelm a +(b))))
|
||||
++ bark
|
||||
++ bark
|
||||
|= a=@
|
||||
%+ knee *down |. ~+
|
||||
;~ pose
|
||||
|
@ -1 +1,8 @@
|
||||
This is a trivial **markdown file**. When I type stuff, it appears!
|
||||
#This is a header
|
||||
|
||||
This is a simple **markdown file**. When I type stuff, it appears!
|
||||
|
||||
I can get it to reload and everything...
|
||||
But if there are multiple lines...
|
||||
|
||||
I really do expect a paragraph break, here, though. I don't
|
||||
|
Loading…
Reference in New Issue
Block a user