mirror of
https://github.com/urbit/shrub.git
synced 2024-12-04 04:35:02 +03:00
Tank hax!
This commit is contained in:
parent
26065f3a68
commit
05a39ac52f
@ -844,7 +844,7 @@
|
||||
::
|
||||
++ can :: assemble
|
||||
~/ %can
|
||||
|= [a=bloq b=(list ,[p=@ q=@])]
|
||||
|= [a=bloq b=(list ,[p=@u q=@])]
|
||||
^- @
|
||||
?~ b 0
|
||||
(mix (end a p.i.b q.i.b) (lsh a p.i.b $(b t.b)))
|
||||
@ -856,16 +856,16 @@
|
||||
::
|
||||
++ cut :: slice
|
||||
~/ %cut
|
||||
|= [a=bloq [b=@ c=@] d=@]
|
||||
|= [a=bloq [b=@u c=@u] d=@]
|
||||
(end a c (rsh a b d))
|
||||
::
|
||||
++ end :: tail
|
||||
~/ %end
|
||||
|= [a=bloq b=@ c=@]
|
||||
|= [a=bloq b=@u c=@]
|
||||
(mod c (bex (mul (bex a) b)))
|
||||
::
|
||||
++ fil :: fill bloqstream
|
||||
|= [a=bloq b=@ c=@]
|
||||
|= [a=bloq b=@u c=@]
|
||||
=+ n=0
|
||||
=+ d=c
|
||||
|- ^- @
|
||||
@ -875,7 +875,7 @@
|
||||
::
|
||||
++ lsh :: left-shift
|
||||
~/ %lsh
|
||||
|= [a=bloq b=@ c=@]
|
||||
|= [a=bloq b=@u c=@]
|
||||
(mul (bex (mul (bex a) b)) c)
|
||||
::
|
||||
++ met :: measure
|
||||
@ -912,7 +912,7 @@
|
||||
::
|
||||
++ rsh :: right-shift
|
||||
~/ %rsh
|
||||
|= [a=bloq b=@ c=@]
|
||||
|= [a=bloq b=@u c=@]
|
||||
(div c (bex (mul (bex a) b)))
|
||||
::
|
||||
++ swap |=([a=bloq b=@] (rep a (flop (rip a b)))) :: reverse bloq order
|
||||
@ -1139,12 +1139,12 @@
|
||||
/lyrtesmudnytbyrsenwegfyrmurtelreptegpecnelnevfes'
|
||||
|%
|
||||
++ ind ~/ %ind
|
||||
|= a=@
|
||||
|= a=@tas
|
||||
=+ b=0
|
||||
|- ^- (unit ,@)
|
||||
?:(=(256 b) ~ ?:(=(a (tod b)) [~ b] $(b +(b))))
|
||||
++ ins ~/ %ins
|
||||
|= a=@
|
||||
|= a=@tas
|
||||
=+ b=0
|
||||
|- ^- (unit ,@)
|
||||
?:(=(256 b) ~ ?:(=(a (tos b)) [~ b] $(b +(b))))
|
||||
|
@ -2193,7 +2193,7 @@
|
||||
++ dlab :: 2396 domainlabel
|
||||
%+ sear
|
||||
|= a=@ta
|
||||
?.(=('-' (rsh 3 a (dec (met 3 a)))) [~ u=a] ~)
|
||||
?.(=('-' (rsh 3 (dec (met 3 a)) a)) [~ u=a] ~)
|
||||
%+ cook cass
|
||||
;~(plug aln (star alp))
|
||||
::
|
||||
|
@ -166,7 +166,8 @@
|
||||
case 13: // %retn
|
||||
if(e.shiftKey) return true
|
||||
v = prom.val().replace(/\xa0/g, ' ')
|
||||
cont.textContent += '\n' + prem.textContent + '\n' + v
|
||||
$(cont).append($('<b>').html(prem.innerHTML),
|
||||
$('<span>').text(v))
|
||||
|
||||
jpok('line', v)
|
||||
hist.unshift(v)
|
||||
@ -214,7 +215,16 @@
|
||||
if(dat.data.ok) return;
|
||||
hist = dat.data.history
|
||||
hind = 0
|
||||
cont.textContent = dat.data.lines.join('\n')
|
||||
cont.innerHTML = ''
|
||||
for(var i in dat.data.lines){
|
||||
var lom = dat.data.lines[i]
|
||||
if(typeof lom == 'string')
|
||||
$(cont).append($('<div>').text(lom))
|
||||
else {
|
||||
$(cont).append($('<b>').html(lom.prompt).append('> '),
|
||||
$('<span>').text(lom.task))
|
||||
}
|
||||
}
|
||||
window.scrollTo(0,document.body.scrollHeight)
|
||||
prem.textContent = dat.data.prompt + '> '
|
||||
})
|
||||
@ -282,7 +292,7 @@
|
||||
(spam pax)
|
||||
::
|
||||
%line
|
||||
=. r.tel :_(r.tel leaf/"{(trip p.tel)}> {(trip p.jof)}")
|
||||
=. r.tel :_(r.tel rose/["> " ~ ~]^~[leaf/(trip p.tel) leaf/(trip p.jof)])
|
||||
=. hiz (~(put by hiz) pax tel)
|
||||
?: =('\\' (end 3 1 p.jof))
|
||||
$(jof [%cmd (rsh 3 1 p.jof)])
|
||||
@ -356,10 +366,10 @@
|
||||
:~ [%prompt %s p.tel]
|
||||
[%history %a (turn q.tel |=(a=cord [%s a]))]
|
||||
:+ %lines %a
|
||||
%- turn :_ jape
|
||||
^- wall %- zing
|
||||
^- (list wall)
|
||||
%- flop
|
||||
(turn r.tel (cury wash 0 80))
|
||||
%- zing ^- (list (list json))
|
||||
%- flop %+ turn r.tel |= a=tank
|
||||
?. ?=([%rose [[%'>' %' ' ~] ~ ~] [%leaf *] [%leaf *] ~] a)
|
||||
(turn (wash 0^80 a) jape)
|
||||
[(jobe prompt/(jape p.i.q.a) task/(jape p.i.t.q.a) ~)]~
|
||||
==
|
||||
--
|
||||
|
Loading…
Reference in New Issue
Block a user