Merge branch 'space-tools' into test

Conflicts:
	urb/urbit.pill
	urb/zod/base/arvo/time.hoon
This commit is contained in:
Anton Dyudin 2015-05-07 10:21:00 -07:00
commit b72da57ce8
10 changed files with 204 additions and 24 deletions

View File

@ -36,6 +36,7 @@
== ::
++ dill-flog :: sent to %dill
$% [%crud p=%hax-init [%leaf p=tape] ~] :: initialize ship
[%heft ~] :: weigh memory
[%veer p=@ta q=path r=@t] :: install vane
[%vega p=path] :: reboot by path
[%verb ~] :: verbose mode
@ -180,6 +181,13 @@
[ost %pass /verb %d %flog %verb ~]
==
::
++ he-wish-mass
%_ .
moz
:_ moz
[ost %pass /heft %d %flog %heft ~]
==
::
++ he-wish-init
|= him=ship
%_ +>.$
@ -429,6 +437,11 @@
~& %poke-helm-verb
he-abet:he-wish-verb:(hake ost her)
::
++ poke-helm-mass
|= [ost=bone her=ship ~]
~& %poke-helm-mass
he-abet:he-wish-mass:(hake ost her)
::
++ poke-helm-init
|= [ost=bone her=ship him=ship]
~& %poke-helm-init

View File

@ -17,6 +17,7 @@
++ gift :: out result <-$
$% [%hear p=lane q=@] :: receive packet
[%init p=@p] :: report install
[%mass p=mass] :: memory usage
[%send p=lane q=@] :: transmit packet
[%waft p=sock q=*] :: response message
[%wart p=sock q=@tas r=path s=*] :: network request
@ -36,6 +37,7 @@
[%sith p=@p q=@uw r=?] :: imperial generator
[%wake ~] :: timer activate
[%want p=sock q=path r=*] :: send message
[%wegh ~] :: report memory
[%wont p=sock q=path r=*] :: e2e send message
== ::
++ move ,[p=duct q=(mold note gift)] :: local move
@ -1882,8 +1884,11 @@
++ knob
|= [hen=duct kyz=kiss]
^- [(list move) _+>]
?: ?=([%crud *] kyz)
?: ?=(%crud -.kyz)
[[[hen [%slip %d %flog kyz]] ~] +>]
?: ?=(%wegh -.kyz)
~& %ames-weighing
[[hen %give %mass wegh]~ +>]
=+ ^= fuy
^- [p=(list boon) q=fort]
?- -.kyz
@ -1985,4 +1990,11 @@
[~ `@ud`p.p.q.i.lew.wod.u.fod]
?~ val.saf.u.gys ~
[~ `@ud`p.i.val.saf.u.gys]
::
++ wegh
^- mass
:- %|
:~ fox/`fox
:: cor/`.
==
--

View File

@ -20,8 +20,8 @@
++ gift :: out result <-$
$% [%ergo p=@p q=@tas r=@ud s=(list ,[path (unit mime)])]
:: version update
[%mere p=(each (set path) (pair term (list tank)))]
:: merge result
[%mass p=mass] :: memory usage
[%mere p=(each (set path) (pair term tang))] :: merge result
[%note p=@tD q=tank] :: debug message
[%writ p=riot] :: response
== ::
@ -39,6 +39,7 @@
[%plug p=@p q=@tas r=@p s=@tas] :: unset upstream
[%wart p=sock q=@tas r=path s=*] :: network request
[%warp p=sock q=riff] :: file request
[%wegh ~] :: report memory
== ::
++ mery ::
$: gem=germ :: strategy
@ -2578,6 +2579,14 @@
%c
[%warp [p.p.q.hic p.p.q.hic] ryf]
==
::
%wegh
:_ ..^$ :_ ~
:^ hen %give %mass
:- %|
:~ ruf/`ruf
:: cor/`..^$
==
==
::
++ doze

View File

@ -59,12 +59,26 @@
++ gill (pair ship term) :: general contact
-- ::
=> |% :: console protocol
++ axle :: all dill state
++ old-axle :: all dill state
$: %2 ::
ore=(unit ship) :: identity once set
hey=(unit duct) :: default duct
dug=(map duct axon) :: conversations
== ::
++ axle :: all dill state
$: %3 ::
ore=(unit ship) :: identity once set
hey=(unit duct) :: default duct
dug=(map duct axon) :: conversations
$= hef :: other weights
$: a=(unit mass) ::
c=(unit mass) ::
e=(unit mass) ::
f=(unit mass) ::
g=(unit mass) ::
t=(unit mass) ::
== ::
== ::
++ axon :: dill per duct
$: ram=term :: console program
tem=(unit (list dill-belt)) :: pending, reverse
@ -94,8 +108,9 @@
[%sav p=path q=@] :: save to file
== ::
++ flog :: sent to %dill
$% [%crud p=@tas q=(list tank)] ::
[%text p=tape] ::
$% [%crud p=@tas q=(list tank)] :: error with trace
[%heft ~] :: system memory
[%text p=tape] :: print text
[%veer p=@ta q=path r=@t] :: install vane
[%vega p=path] :: reboot by path
[%verb ~] :: verbose mode
@ -105,6 +120,7 @@
[%blit p=(list blit)] :: terminal output
[%init p=@p] :: set owner
[%logo ~] :: logout
[%mass p=mass] :: memory usage
[%veer p=@ta q=path r=@t] :: install vane
[%vega p=path] :: reboot by path
[%verb ~] :: verbose mode
@ -117,6 +133,7 @@
[%flog p=flog] :: wrapped error
[%flow p=@tas q=(list gill)] :: terminal config
[%hail ~] :: terminal refresh
[%heft ~] :: system memory
[%hook ~] :: this term hung up
[%harm ~] :: all terms hung up
[%init p=ship] :: after gall ready
@ -143,6 +160,7 @@
== ::
++ note-dill :: note to self, odd
$% [%crud p=@tas q=(list tank)] ::
[%heft ~] ::
[%init p=ship] ::
[%text p=tape] ::
[%veer p=@ta q=path r=@t] :: install vane
@ -156,11 +174,12 @@
[%took p=[p=ship q=path] q=ship] ::
== ::
++ note ::
$? [?(%a %c %e %f %g %t) %wegh ~] ::
$% [%a note-ames] :: out request $->
[%c note-clay] ::
[%d note-dill] ::
[%g note-gall] ::
== ::
== == ::
++ riff ,[p=desk q=(unit rave)] :: see %clay
++ sign-ames ::
$% [%nice ~] ::
@ -184,12 +203,13 @@
$% [%wake ~] ::
== ::
++ sign :: in result $<-
$? [?(%a %c %e %f %g %t) %mass p=mass] ::
$% [%a sign-ames] ::
[%c sign-clay] ::
[%d sign-dill] ::
[%g sign-gall] ::
[%t sign-time] ::
== ::
== == ::
:::::::: :: dill tiles
--
=| all=axle
@ -215,6 +235,7 @@
%crud :: (send `dill-belt`[%cru p.kyz q.kyz])
(crud p.kyz q.kyz)
%blew (send %rez p.p.kyz q.p.kyz)
%heft heft
%veer (dump kyz)
%vega (dump kyz)
%verb (dump kyz)
@ -260,6 +281,19 @@
(dump %logo ~)
(done %blit [bit ~])
::
++ heft
%_ .
moz
:* [hen %pass /heft/ames %a %wegh ~]
[hen %pass /heft/clay %c %wegh ~]
[hen %pass /heft/eyre %e %wegh ~]
[hen %pass /heft/ford %f %wegh ~]
[hen %pass /heft/gall %g %wegh ~]
[hen %pass /heft/time %t %wegh ~]
moz
==
==
::
++ init :: initialize
~& [%dill-init our]
=+ myt=(flop (need tem))
@ -300,10 +334,55 @@
:_(moz [hen %pass ~ %g %took [our [ram ~]] our])
==
::
++ wegh
^- mass
:- %|
:~ ore/`ore.all
hey/`hey.all
dug/`dug.all
:: cor/`..as
==
::
++ wegt
|= [lal=?(%a %c %e %f %g %t) mas=mass]
^+ +>
=. hef.all
?- lal
%a ~?(?=(^ a.hef.all) %double-mass-a hef.all(a `mas))
%c ~?(?=(^ c.hef.all) %double-mass-c hef.all(c `mas))
%e ~?(?=(^ e.hef.all) %double-mass-e hef.all(e `mas))
%f ~?(?=(^ f.hef.all) %double-mass-f hef.all(f `mas))
%g ~?(?=(^ g.hef.all) %double-mass-g hef.all(g `mas))
%t ~?(?=(^ t.hef.all) %double-mass-t hef.all(t `mas))
==
?. ?& ?=(^ a.hef.all)
?=(^ c.hef.all)
?=(^ e.hef.all)
?=(^ f.hef.all)
?=(^ g.hef.all)
?=(^ t.hef.all)
==
+>.$
%+ done(hef.all [~ ~ ~ ~ ~ ~])
%mass
=> [hef.all d=wegh]
:- %|
:~ ames/u.a
clay/u.c
dill/d
eyre/u.e
ford/u.f
gall/u.g
time/u.t
==
::
++ take :: receive
|= sih=sign
|= [tea=wire sih=sign]
^+ +>
?- sih
[?(%a %c %e %f %g %t) %mass *]
(wegt -.sih p.sih)
::
[%a %nice *]
:: ~& [%take-nice-ames sih]
+>
@ -311,14 +390,14 @@
[%a %init *]
+>(moz :_(moz [hen %give +.sih]))
::
[%c %mere *]
[%c %mere *] :: i don't think we get these anymore
?: ?=(%& -.p.sih)
+>.$
~| %dill-mere-fail
~| p.p.p.sih
|-
?~ q.p.p.sih !!
~> %mean.|.(i.q.p.p.sih) :: interpolate ford fail into stack trace
~> %mean.|.(i.q.p.p.sih) :: interpolate ford fail into stack trace
$(q.p.p.sih t.q.p.p.sih)
::
[%c %note *]
@ -425,7 +504,9 @@
~
::
++ load :: trivial
|= old=axle
|= old=?(old-axle axle)
?: ?=(%2 -.old)
$(old [%3 ore hey dug ~ ~ ~ ~ ~ ~]:old)
..^$(all old)
:: |= old=* :: diable
:: ..^$(ore.all `~zod)
@ -454,6 +535,6 @@
[~ ..^$]
=+ our=?>(?=(^ ore.all) u.ore.all)
=^ moz all
abet:(~(take as [~ hen our] (~(got by dug.all) hen)) q.hin)
abet:(~(take as [~ hen our] (~(got by dug.all) hen)) tea q.hin)
[moz ..^$]
--

View File

@ -5,7 +5,8 @@
=> =~
|% :: interfaces
++ gift :: out result <-$
$% [%thou p=httr] :: raw http response
$% [%mass p=mass] :: memory usage
[%thou p=httr] :: raw http response
[%thus p=@ud q=(unit hiss)] :: http request/cancel
[%veer p=@ta q=path r=@t] :: drop-through
[%vega p=path] :: drop-through
@ -28,6 +29,7 @@
[%this p=? q=clip r=httq] :: inbound request
[%thud ~] :: inbound cancel
[%wart p=sack q=@tas r=_`[path *]`*gram] :: urbit message
[%wegh ~] :: report memory
== ::
++ move ,[p=duct q=(mold note gift)] :: local move
++ note :: out request $->
@ -482,6 +484,8 @@
=. sop (~(put by sop) p.u.mez q.p.kyz |)
(ames-gram q.p.kyz hat/~ p.u.mez our-host)
==
::
%wegh !!
==
::
++ axon :: accept response
@ -1255,6 +1259,13 @@
((hard kiss) q.hic)
==
^- [p=(list move) q=_..^$]
?: ?=(%wegh -.q.hic)
:_ ..^$ :_ ~
:^ hen %give %mass
:- %|
:~ bol/`bol
:: cor/`..^$
==
=+ our=`@p`0x100 :: XX sentinel
=+ ska=(slod ski)
=+ sky=|=(* `(unit)`=+(a=(ska +<) ?~(a ~ ?~(u.a ~ [~ u.u.a]))))

View File

@ -10,6 +10,7 @@
++ bead ,[p=(set beam) q=gage] :: computed result
++ gift :: out result <-$
$% [%made p=@uvH q=(each gage tang)] :: computed result
[%mass p=mass] :: memory usage
[%news ~] :: fresh depends
== ::
++ heel path :: functional ending
@ -51,6 +52,7 @@
++ kiss :: in request ->$
$% [%exec p=@p q=beak r=(unit silk)] :: make / kill
[%wasp p=@p q=@uvH] :: depends query
[%wegh ~] :: report memory
== ::
++ milk (trel ship desk silk) :: sourced silk
++ move ,[p=duct q=(mold note gift)] :: local move
@ -1649,6 +1651,13 @@
|= [hen=duct hic=(hypo (hobo kiss))]
^- [p=(list move) q=_..^$]
=> .(q.hic ?.(?=(%soft -.q.hic) q.hic ((hard kiss) p.q.hic)))
?: ?=(%wegh -.q.hic)
:_ ..^$ :_ ~
:^ hen %give %mass
:- %|
:~ lex/`lex
:: cor/`..^$
==
=+ ^= our ^- @p
?- -.q.hic
%exec p.q.hic

View File

@ -29,6 +29,7 @@
[%crud p=@tas q=(list tank)] :: physical error
[%dumb ~] :: close duct
[%gone p=hapt] :: app death
[%mass p=mass] :: memory usage
[%mean p=ares] :: message failure
[%meta p=vase] :: meta-gift
[%nice ~] :: message success
@ -45,6 +46,7 @@
[%rote p=sack q=path r=*] :: remote request
[%roth p=sack q=path r=*] :: remote response
[%took p=hapt q=ship] :: remote acknowledge
[%wegh ~] :: report memory
[%wipe p=hapt] :: forget app
== ::
++ knob :: pending action
@ -237,6 +239,7 @@
|% :: vane interface
++ call :: handle request
|= [hen=duct hic=(hypo (hobo kiss))]
^- [p=(list move) q=_..^$]
=> .(q.hic ?.(?=(%soft -.q.hic) q.hic ((hard kiss) p.q.hic)))
?- -.q.hic
%init
@ -247,6 +250,14 @@
::
%roth
(gawd hen p.q.hic q.q.hic ((hard ,[@ud roon]) r.q.hic))
::
%wegh
:_ ..^$ :_ ~
:^ hen %give %mass
:- %|
:~ all/`all
:: cor/`..^$
==
::
%wipe
=+ mat=(~(got by pol.all) p.p.q.hic)

View File

@ -9637,6 +9637,7 @@
$% [%tabl p=(list (pair marc marc))] :: map
== ::
++ mark ,@tas :: content type
++ mass (each noun (list (pair cord ,mass))) :: memory usage
++ mill (each vase milt) :: vase/metavase
++ milt ,[p=* q=*] :: metavase
++ monk (each ship khan) :: general identity
@ -10084,6 +10085,20 @@
$(ova t.ova, +>+.^$ (veer now q.i.ova))
?: ?=(%vega -.q.i.ova)
(vega now t.ova (path +.q.i.ova))
?: ?=(%mass -.q.i.ova)
=+ avo=$(ova t.ova)
:_ +.avo
:_ -.avo
%= i.ova
q.q
:- %|
:~ [%hoon `pit]
[%zuse `bud]
[%hoon-cache `p.niz]
[%vanes q.q.i.ova]
[%dot `.]
==
==
=+(avo=$(ova t.ova) [[i.ova -.avo] +.avo])
++ wish |=(* (^wish ((hard ,@ta) +<))) :: 20
--

View File

@ -1,6 +1,6 @@
:: :: %time, just a timer
!? 164
::::
!:::
|= pit=vase
=> =~
|%
@ -15,13 +15,14 @@
++ weight
(each noun (list (pair tape weight)))
++ gift :: out result <-$
$% [%wake ~] :: wakey-wakey
[%wegh weight] ::
$% [%mass p=mass] :: memory usage
[%wake ~] :: wakey-wakey
== ::
++ kiss :: in request ->$
$% [%rest p=@da] :: cancel alarm
[%wait p=@da] :: set alarm
[%wake ~] :: timer activate
[%wegh ~] :: report memory
== ::
++ move ,[p=duct q=(mold note gift)] :: local move
++ note ,~ :: out request $->
@ -172,12 +173,16 @@
==
=^ mof tym
?- -.q.hic
%rest =. q.tym (~(put up q.tym) p.q.hic hen)
=. tym (raze tym)
[~ tym]
%wait =. p.tym (~(put up p.tym) p.q.hic hen)
=. tym (raze tym)
[~ tym]
%rest
=. q.tym (~(put up q.tym) p.q.hic hen)
=. tym (raze tym)
[~ tym]
::
%wait
=. p.tym (~(put up p.tym) p.q.hic hen)
=. tym (raze tym)
[~ tym]
::
%wake
|- ^+ [*(list move) tym]
=. tym (raze tym)
@ -186,6 +191,14 @@
?: (lte now p.nex) [~ tym]
=^ mof tym $(p.tym ~(pop up p.tym))
[[`move`[q.nex %give %wake ~] mof] tym]
::
%wegh
:_ tym :_ ~
:^ hen %give %mass
:- %|
:~ tym/`tym
:: cor/`..^$
==
==
[mof ..^$]
::

View File

@ -80,7 +80,13 @@ module.exports = recl
_input: (e) ->
text = @$writing.text()
length = text.length
# geturl = new RegExp "(^|[ \t\r\n])((ftp|http|https|gopher|mailto|news|nntp|telnet|wais|file|prospero|aim|webcal):(([A-Za-z0-9$_.+!*(),;/?:@&~=-])|%[A-Fa-f0-9]{2}){2,}(#([a-zA-Z0-9][a-zA-Z0-9$_.+!*(),;/?:@&~=%-]*))?([A-Za-z0-9$_+!*();/?:~-]))", "g"
# geturl = new RegExp [
# '(^|[ \t\r\n])((ftp|http|https|gopher|mailto|'
# 'news|nntp|telnet|wais|file|prospero|aim|webcal'
# '):(([A-Za-z0-9$_.+!*(),;/?:@&~=-])|%[A-Fa-f0-9]{2}){2,}'
# '(#([a-zA-Z0-9][a-zA-Z0-9$_.+!*(),;/?:@&~=%-]*))?'
# '([A-Za-z0-9$_+!*();/?:~-]))'
# ].join() , "g"
# urls = text.match(geturl)
# if urls isnt null and urls.length > 0
# for url in urls