mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-29 01:44:08 +03:00
Merge branch 'master' into lens-export
This commit is contained in:
commit
d9a0cb4c6b
@ -8,10 +8,8 @@ before_install:
|
||||
- git lfs pull
|
||||
|
||||
script:
|
||||
- cachix authtoken "$CACHIX_AUTH_TOKEN" >/dev/null
|
||||
- cachix use urbit2
|
||||
|
||||
- ./sh/cachix
|
||||
- ./sh/cachix || true
|
||||
|
||||
- make
|
||||
- make release
|
||||
|
1
Makefile
1
Makefile
@ -21,6 +21,7 @@ test:
|
||||
pills:
|
||||
sh/update-solid-pill
|
||||
sh/update-brass-pill
|
||||
sh/update-ivory-pill
|
||||
|
||||
clean:
|
||||
rm -rf ./out ./work
|
||||
|
@ -70,11 +70,9 @@ right, and there is no issue about it yet, feel free to open one.
|
||||
If you're looking to get involved, there are a few things you can do:
|
||||
|
||||
- Join the [urbit-dev][list] mailing list.
|
||||
- [Ask us about Hoon School][mail], a course we run to teach the Hoon
|
||||
- [Apply to Hoon School][mail], a course we run to teach the Hoon
|
||||
programming language and Urbit application development.
|
||||
- Check out [good contributor issues][good].
|
||||
- Reach out to [support@urbit.org][mail] to say hi and ask any questions you
|
||||
might have.
|
||||
|
||||
Once you've got your bearings, have a look at [CONTRIBUTING.md][cont] for some
|
||||
pointers on setting up your development environment.
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f643e9f47f00558c8b900bc3d37ed9e5b2c38afae31e80cb106fb32042d8bcbb
|
||||
size 5976443
|
||||
oid sha256:8f6e93cb3ee5fcb0970851bd10d2d2a640ff968292d147c35385623b86570296
|
||||
size 6662042
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:847a5166d8d5106a0c909c914cc96ee6bcb47afef6ebdd6c05bebcd8b01ae87a
|
||||
size 5859838
|
||||
oid sha256:42d7fae92d11b3dbc3ee9aaa1e2edc5328f308c047dcf126b6cd661862904782
|
||||
size 4352384
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:df460df0c422a71df0fca6780ac8766c007fed629e87b1b2cc4b990b9bdcbe02
|
||||
size 8706989
|
||||
oid sha256:d46350623e56ebb6fa15761632923b99339088278d87e221657d64c3c5d501e3
|
||||
size 9349402
|
||||
|
@ -48,4 +48,9 @@ rec {
|
||||
pier = zod;
|
||||
};
|
||||
|
||||
ivory = import ./ivory {
|
||||
inherit arvo pkgs tlon deps debug;
|
||||
pier = zod;
|
||||
};
|
||||
|
||||
}
|
||||
|
22
nix/ops/ivory/builder.sh
Executable file
22
nix/ops/ivory/builder.sh
Executable file
@ -0,0 +1,22 @@
|
||||
source $stdenv/setup
|
||||
|
||||
set -ex
|
||||
|
||||
cp -r $PIER ./pier
|
||||
chmod -R u+rw ./pier
|
||||
|
||||
$URBIT -d ./pier
|
||||
|
||||
cleanup () {
|
||||
if [ -e ./pier/.vere.lock ]
|
||||
then kill $(< ./pier/.vere.lock) || true;
|
||||
fi
|
||||
}
|
||||
|
||||
trap cleanup EXIT
|
||||
|
||||
herb ./pier -P ivory.pill -d '+ivory'
|
||||
|
||||
mv ivory.pill $out
|
||||
|
||||
set +x
|
19
nix/ops/ivory/default.nix
Normal file
19
nix/ops/ivory/default.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{ pkgs, tlon, deps, pier, arvo, debug }:
|
||||
|
||||
let
|
||||
|
||||
urbitExe = if debug
|
||||
then "${tlon.urbit-debug}/bin/urbit-debug -g"
|
||||
else "${tlon.urbit}/bin/urbit";
|
||||
|
||||
in
|
||||
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
name = "ivory";
|
||||
builder = ./builder.sh;
|
||||
buildInputs = [ tlon.herb pkgs.coreutils ];
|
||||
|
||||
URBIT = urbitExe;
|
||||
PIER = pier;
|
||||
ARVO = arvo;
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
pkgs,
|
||||
debug,
|
||||
ivory ? ../../../bin/ivory.pill,
|
||||
argon2, ed25519, ent, ge-additions, h2o, murmur3, scrypt, secp256k1, sni, softfloat3, uv
|
||||
}:
|
||||
|
||||
@ -30,6 +31,7 @@ pkgs.stdenv.mkDerivation {
|
||||
hardeningDisable = if debug then [ "all" ] else [];
|
||||
|
||||
CFLAGS = if debug then "-O3 -g -Werror" else "-O3 -Werror";
|
||||
IVORY = ivory;
|
||||
MEMORY_DEBUG = debug;
|
||||
CPU_DEBUG = debug;
|
||||
EVENT_TIME_DEBUG = false;
|
||||
|
@ -1,6 +1,12 @@
|
||||
{ env_name, env, deps }:
|
||||
|
||||
{ ent, ge-additions, cacert, xxd, name ? "urbit", debug ? false }:
|
||||
{
|
||||
ent,
|
||||
name ? "urbit",
|
||||
debug ? false,
|
||||
ivory ? ../../../bin/ivory.pill,
|
||||
ge-additions, cacert, xxd
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
@ -22,6 +28,7 @@ env.make_derivation {
|
||||
EVENT_TIME_DEBUG = false;
|
||||
NCURSES = env.ncurses;
|
||||
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
|
||||
IVORY = ivory;
|
||||
|
||||
name = "${name}-${env_name}";
|
||||
exename = name;
|
||||
|
332
pkg/arvo/app/azimuth-tracker.hoon
Normal file
332
pkg/arvo/app/azimuth-tracker.hoon
Normal file
@ -0,0 +1,332 @@
|
||||
/+ tapp, stdio
|
||||
=, able:kale
|
||||
=> |%
|
||||
+$ pending-udiffs (map number:block udiffs:point)
|
||||
+$ config
|
||||
$: url=@ta
|
||||
from-number=number:block
|
||||
==
|
||||
+$ app-state ~
|
||||
+$ peek-data ~
|
||||
+$ in-poke-data
|
||||
$% [%watch =config]
|
||||
[%clear ~]
|
||||
[%noun *]
|
||||
==
|
||||
+$ out-poke-data ~
|
||||
+$ in-peer-data ~
|
||||
+$ out-peer-data ~
|
||||
++ tapp
|
||||
%: ^tapp
|
||||
app-state
|
||||
peek-data
|
||||
in-poke-data
|
||||
out-poke-data
|
||||
in-peer-data
|
||||
out-peer-data
|
||||
==
|
||||
++ tapp-async tapp-async:tapp
|
||||
++ stdio (^stdio out-poke-data out-peer-data)
|
||||
--
|
||||
::
|
||||
:: Async helpers
|
||||
::
|
||||
=> |%
|
||||
++ topics
|
||||
=> azimuth-events:azimuth
|
||||
:_ ~
|
||||
:~ broke-continuity
|
||||
changed-keys
|
||||
lost-sponsor
|
||||
escape-accepted
|
||||
==
|
||||
::
|
||||
++ request-rpc
|
||||
|= [url=@ta id=(unit @t) req=request:rpc:ethereum]
|
||||
=/ m (async:stdio ,json)
|
||||
^- form:m
|
||||
%+ (retry json) `10
|
||||
=/ m (async:stdio ,(unit json))
|
||||
^- form:m
|
||||
|^
|
||||
=/ =request:http
|
||||
:* method=%'POST'
|
||||
url=url
|
||||
header-list=['Content-Type'^'application/json' ~]
|
||||
^= body
|
||||
%- some %- as-octt:mimes:html
|
||||
%- en-json:html
|
||||
(request-to-json:rpc:ethereum id req)
|
||||
==
|
||||
;< ~ bind:m (send-request:stdio request)
|
||||
;< rep=(unit client-response:iris) bind:m
|
||||
take-maybe-response:stdio
|
||||
?~ rep
|
||||
(pure:m ~)
|
||||
(parse-response u.rep)
|
||||
::
|
||||
++ parse-response
|
||||
|= =client-response:iris
|
||||
=/ m (async:stdio ,(unit json))
|
||||
^- form:m
|
||||
?> ?=(%finished -.client-response)
|
||||
=/ body=@t q.data:(need full-file.client-response)
|
||||
=/ jon=(unit json) (de-json:html body)
|
||||
?~ jon
|
||||
(pure:m ~)
|
||||
=, dejs-soft:format
|
||||
=/ array=(unit (list response:rpc:jstd))
|
||||
((ar parse-one-response) u.jon)
|
||||
?~ array
|
||||
=/ res=(unit response:rpc:jstd) (parse-one-response u.jon)
|
||||
?~ res
|
||||
(async-fail:stdio %request-rpc-parse-error >id< ~)
|
||||
?: ?=(%error -.u.res)
|
||||
(async-fail:stdio %request-rpc-error >id< >+.res< ~)
|
||||
?. ?=(%result -.u.res)
|
||||
(async-fail:stdio %request-rpc-fail >u.res< ~)
|
||||
(pure:m `res.u.res)
|
||||
(async-fail:stdio %request-rpc-batch >%not-implemented< ~)
|
||||
:: (pure:m `[%batch u.array])
|
||||
::
|
||||
++ parse-one-response
|
||||
|= =json
|
||||
^- (unit response:rpc:jstd)
|
||||
=/ res=(unit [@t ^json])
|
||||
%. json
|
||||
=, dejs-soft:format
|
||||
(ot id+so result+some ~)
|
||||
?^ res `[%result u.res]
|
||||
~| parse-one-response=json
|
||||
:+ ~ %error %- need
|
||||
%. json
|
||||
=, dejs-soft:format
|
||||
(ot id+so error+(ot code+no message+so ~) ~)
|
||||
--
|
||||
::
|
||||
++ retry
|
||||
|* result=mold
|
||||
|= [crash-after=(unit @ud) computation=_*form:(async:stdio (unit result))]
|
||||
=/ m (async:stdio ,result)
|
||||
=| try=@ud
|
||||
|^
|
||||
|- ^- form:m
|
||||
=* loop $
|
||||
?: =(crash-after `try)
|
||||
(async-fail:stdio %retry-too-many ~)
|
||||
;< ~ bind:m (backoff try ~m1)
|
||||
;< res=(unit result) bind:m computation
|
||||
?^ res
|
||||
(pure:m u.res)
|
||||
loop(try +(try))
|
||||
::
|
||||
++ backoff
|
||||
|= [try=@ud limit=@dr]
|
||||
=/ m (async:stdio ,~)
|
||||
^- form:m
|
||||
;< eny=@uvJ bind:m get-entropy:stdio
|
||||
;< now=@da bind:m get-time:stdio
|
||||
%- wait:stdio
|
||||
%+ add now
|
||||
%+ min limit
|
||||
?: =(0 try) ~s0
|
||||
%+ add
|
||||
(mul ~s1 (bex (dec try)))
|
||||
(mul ~s0..0001 (~(rad og eny) 1.000))
|
||||
--
|
||||
::
|
||||
++ get-latest-block
|
||||
|= url=@ta
|
||||
=/ m (async:stdio ,block)
|
||||
^- form:m
|
||||
;< =json bind:m (request-rpc url `'block number' %eth-block-number ~)
|
||||
(get-block-by-number url (parse-eth-block-number:rpc:ethereum json))
|
||||
::
|
||||
++ get-block-by-number
|
||||
|= [url=@ta =number:block]
|
||||
=/ m (async:stdio ,block)
|
||||
^- form:m
|
||||
|^
|
||||
;< =json bind:m
|
||||
(request-rpc url `'block by number' %eth-get-block-by-number number |)
|
||||
=/ =block (parse-block json)
|
||||
?. =(number number.id.block)
|
||||
(async-fail:stdio %reorg-detected >number< >block< ~)
|
||||
(pure:m block)
|
||||
::
|
||||
++ parse-block
|
||||
|= =json
|
||||
^- block
|
||||
=< [[&1 &2] |2]
|
||||
^- [@ @ @]
|
||||
~| json
|
||||
%. json
|
||||
=, dejs:format
|
||||
%- ot
|
||||
:~ hash+parse-hex-result:rpc:ethereum
|
||||
number+parse-hex-result:rpc:ethereum
|
||||
'parentHash'^parse-hex-result:rpc:ethereum
|
||||
==
|
||||
--
|
||||
::
|
||||
++ get-logs-by-hash
|
||||
|= [url=@ta =hash:block]
|
||||
=/ m (async:stdio udiffs:point)
|
||||
^- form:m
|
||||
;< =json bind:m
|
||||
%+ request-rpc url
|
||||
:* `'logs by hash'
|
||||
%eth-get-logs-by-hash
|
||||
hash
|
||||
~[azimuth:contracts:azimuth]
|
||||
topics
|
||||
==
|
||||
=/ event-logs=(list event-log:rpc:ethereum)
|
||||
(parse-event-logs:rpc:ethereum json)
|
||||
=/ =udiffs:point
|
||||
%+ murn event-logs
|
||||
|= =event-log:rpc:ethereum
|
||||
^- (unit [=ship =udiff:point])
|
||||
?~ mined.event-log
|
||||
~
|
||||
?: removed.u.mined.event-log
|
||||
~& [%removed-log event-log]
|
||||
~
|
||||
=/ =id:block [block-hash block-number]:u.mined.event-log
|
||||
=, azimuth-events:azimuth
|
||||
=, abi:ethereum
|
||||
?: =(broke-continuity i.topics.event-log)
|
||||
=/ who=@ (decode-topics t.topics.event-log ~[%uint])
|
||||
=/ num=@ (decode-results data.event-log ~[%uint])
|
||||
`[who id %rift num]
|
||||
?: =(changed-keys i.topics.event-log)
|
||||
=/ who=@ (decode-topics t.topics.event-log ~[%uint])
|
||||
=+ ^- [enc=octs aut=octs sut=@ud rev=@ud]
|
||||
%+ decode-results data.event-log
|
||||
~[[%bytes-n 32] [%bytes-n 32] %uint %uint]
|
||||
`[who id %keys rev sut (pass-from-eth:azimuth enc aut sut)]
|
||||
?: =(lost-sponsor i.topics.event-log)
|
||||
=+ ^- [who=@ pos=@]
|
||||
(decode-topics t.topics.event-log ~[%uint %uint])
|
||||
`[who id %spon ~]
|
||||
?: =(escape-accepted i.topics.event-log)
|
||||
=+ ^- [who=@ wer=@]
|
||||
(decode-topics t.topics.event-log ~[%uint %uint])
|
||||
`[who id %spon `wer]
|
||||
~& [%bad-topic event-log]
|
||||
~
|
||||
(pure:m udiffs)
|
||||
::
|
||||
++ jael-update
|
||||
|= =udiffs:point
|
||||
=/ m (async:stdio ,~)
|
||||
|- ^- form:m
|
||||
=* loop $
|
||||
?~ udiffs
|
||||
(pure:m ~)
|
||||
~& > [%update block i.udiffs]
|
||||
:: ;< ~ bind:m (send-effect [%vent-update i.udiffs])
|
||||
loop(udiffs t.udiffs)
|
||||
--
|
||||
::
|
||||
:: Main loop
|
||||
::
|
||||
=> |%
|
||||
++ watch
|
||||
|= =config
|
||||
=/ m (async:stdio ,~)
|
||||
^- form:m
|
||||
=/ =number:block from-number.config
|
||||
=| =pending-udiffs
|
||||
=| blocks=(list block)
|
||||
|- ^- form:m
|
||||
=* poll-loop $
|
||||
~& [%poll-loop number]
|
||||
;< =latest=block bind:m (get-latest-block url.config)
|
||||
|- ^- form:m
|
||||
=* walk-loop $
|
||||
~& [%walk-loop number]
|
||||
?: (gth number number.id.latest-block)
|
||||
;< now=@da bind:m get-time:stdio
|
||||
;< ~ bind:m (wait:stdio (add now ~s10))
|
||||
poll-loop
|
||||
;< =block bind:m (get-block-by-number url.config number)
|
||||
;< [=new=^pending-udiffs new-blocks=(lest ^block)] bind:m
|
||||
(take-block url.config pending-udiffs block blocks)
|
||||
=: pending-udiffs new-pending-udiffs
|
||||
blocks new-blocks
|
||||
number +(number.id.i.new-blocks)
|
||||
==
|
||||
walk-loop
|
||||
::
|
||||
++ take-block
|
||||
|= [url=@ta =a=pending-udiffs =block blocks=(list block)]
|
||||
=/ m (async:stdio ,[pending-udiffs (lest ^block)])
|
||||
^- form:m
|
||||
~& [%taking id.block]
|
||||
?: &(?=(^ blocks) !=(parent-hash.block hash.id.i.blocks))
|
||||
~& %rewinding
|
||||
(rewind url a-pending-udiffs block blocks)
|
||||
;< =b=pending-udiffs bind:m
|
||||
(release-old-events a-pending-udiffs number.id.block)
|
||||
;< =new=udiffs:point bind:m (get-logs-by-hash url hash.id.block)
|
||||
~? !=(~ new-udiffs) [%adding-diffs new-udiffs]
|
||||
=. b-pending-udiffs (~(put by b-pending-udiffs) number.id.block new-udiffs)
|
||||
(pure:m b-pending-udiffs block blocks)
|
||||
::
|
||||
++ release-old-events
|
||||
|= [=pending-udiffs =number:block]
|
||||
=/ m (async:stdio ,^pending-udiffs)
|
||||
^- form:m
|
||||
=/ rel-number (sub number 30)
|
||||
=/ =udiffs:point (~(get ja pending-udiffs) rel-number)
|
||||
;< ~ bind:m (jael-update udiffs)
|
||||
(pure:m (~(del by pending-udiffs) rel-number))
|
||||
::
|
||||
++ rewind
|
||||
|= [url=@ta =pending-udiffs =block blocks=(list block)]
|
||||
=/ m (async:stdio ,[^pending-udiffs (lest ^block)])
|
||||
|- ^- form:m
|
||||
=* loop $
|
||||
~& [%wind block ?~(blocks ~ i.blocks)]
|
||||
?~ blocks
|
||||
(pure:m pending-udiffs block blocks)
|
||||
?: =(parent-hash.block hash.id.i.blocks)
|
||||
(pure:m pending-udiffs block blocks)
|
||||
;< =next=^block bind:m (get-block-by-number url number.id.i.blocks)
|
||||
?: =(~ pending-udiffs)
|
||||
;< ~ bind:m (disavow block)
|
||||
loop(block next-block, blocks t.blocks)
|
||||
=. pending-udiffs (~(del by pending-udiffs) number.id.block)
|
||||
loop(block next-block, blocks t.blocks)
|
||||
::
|
||||
++ disavow
|
||||
|= =block
|
||||
=/ m (async:stdio ,~)
|
||||
^- form:m
|
||||
(jael-update [*ship id.block %disavow ~]~)
|
||||
--
|
||||
::
|
||||
:: Main
|
||||
::
|
||||
=* default-tapp default-tapp:tapp
|
||||
%- create-tapp-poke-peer-take:tapp
|
||||
|_ [=bowl:gall state=app-state]
|
||||
++ handle-poke
|
||||
|= =in-poke-data
|
||||
=/ m tapp-async
|
||||
^- form:m
|
||||
?- -.in-poke-data
|
||||
%noun (watch (config +.in-poke-data))
|
||||
%watch (watch +.in-poke-data)
|
||||
%clear !!
|
||||
==
|
||||
::
|
||||
++ handle-take
|
||||
|= =sign:tapp
|
||||
!!
|
||||
:: ?> ?=(%sources -.sign)
|
||||
:: (handle-poke %watch +.sign)
|
||||
::
|
||||
++ handle-peer ~(handle-peer default-tapp bowl state)
|
||||
--
|
@ -58,14 +58,48 @@
|
||||
=/ inboxwir /circle/[(scot %p our.bol)]/inbox/config/group
|
||||
=/ inboxi/poke
|
||||
:- %hall-action
|
||||
[%source %inbox %.y (silt [[our.bol %i] ~]~)]
|
||||
:_ this
|
||||
[%source %inbox %.y (silt [[our.bol %i] ~]~)]
|
||||
=/ fakeannounce=poke
|
||||
:- %hall-action
|
||||
[%create %hall-internal-announcements '' %village]
|
||||
=/ announce=poke
|
||||
:- %hall-action
|
||||
[%create %announcements 'Announcements from Tlon' %journal]
|
||||
=/ help=poke
|
||||
:- %hall-action
|
||||
[%create %urbit-help 'Get help about Urbit' %channel]
|
||||
=/ dev=poke
|
||||
:- %hall-action
|
||||
[%create %urbit-dev 'Chat about developing on Urbit' %channel]
|
||||
=/ sourcefakeannounce/poke
|
||||
:- %hall-action
|
||||
[%source %inbox %.y (silt [[our.bol %hall-internal-announcements] ~]~)]
|
||||
=/ sourceannounce/poke
|
||||
:- %hall-action
|
||||
[%source %inbox %.y (silt [[~marzod %announcements] ~]~)]
|
||||
=/ hallactions=(list move)
|
||||
?: =((clan:title our.bol) %czar)
|
||||
~
|
||||
?: =(our.bol ~marzod)
|
||||
~& %marzod-chat
|
||||
:- [ost.bol %poke /announce [our.bol %hall] announce]
|
||||
[ost.bol %poke /announce [our.bol %hall] sourceannounce]~
|
||||
?: =(our.bol ~dopzod)
|
||||
~& %dopzod-chat
|
||||
:- [ost.bol %poke /announce [our.bol %hall] dev]
|
||||
[ost.bol %poke /announce [our.bol %hall] help]~
|
||||
:- [ost.bol %poke /announce [our.bol %hall] fakeannounce]
|
||||
:- [ost.bol %poke /announce [our.bol %hall] sourcefakeannounce]
|
||||
[ost.bol %poke /announce [our.bol %hall] sourceannounce]~
|
||||
=/ moves=(list move)
|
||||
:~ [ost.bol %peer inboxwir [our.bol %hall] inboxpat]
|
||||
[ost.bol %peer circlespat [our.bol %hall] circlespat]
|
||||
[ost.bol %connect / [~ /'~chat'] %chat]
|
||||
[ost.bol %poke /chat [our.bol %hall] inboxi]
|
||||
[ost.bol %poke /chat [our.bol %launch] launcha]
|
||||
==
|
||||
:_ this
|
||||
%+ weld moves hallactions
|
||||
:- [ost.bol %poke /chat [our.bol %launch] launcha]~
|
||||
this(sta u.old)
|
||||
::
|
||||
|
File diff suppressed because one or more lines are too long
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.7 KiB |
@ -5,7 +5,8 @@
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
|
||||
<link rel="stylesheet" href="/~chat/css/index.css" />
|
||||
<link rel="stylesheet" href="/~chat/css/index.css" />
|
||||
<link rel="icon" type="image/png" href="/~launch/img/Favicon.png">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root" />
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -16,6 +16,7 @@
|
||||
$% [%dns-authority =authority]
|
||||
[%dns-bind =ship =target]
|
||||
[%handle-http-request =inbound-request:eyre]
|
||||
[%noun noun=*]
|
||||
==
|
||||
+$ out-poke-data
|
||||
$% [%dns-bind =ship =target]
|
||||
@ -603,7 +604,7 @@
|
||||
=/ m (async:stdio (unit bound))
|
||||
^- form:m
|
||||
?: &(?=(^ existing) =(target cur.u.existing))
|
||||
~| %bind-duplicate-wat-do !!
|
||||
(pure:m existing)
|
||||
::
|
||||
=/ pre=(unit [@ta ^target])
|
||||
?~(existing ~ (some [id cur]:u.existing))
|
||||
@ -612,6 +613,14 @@
|
||||
:: XX retryable?
|
||||
::
|
||||
?. &(?=(^ rep) =(200 p.u.rep))
|
||||
?: &(?=(^ rep) =(401 p.u.rep))
|
||||
:: XX automate
|
||||
::
|
||||
~& %authentication-failure
|
||||
~& (skim q.u.rep |=((pair @t @t) ?=(%www-authenticate p)))
|
||||
(pure:m ~)
|
||||
::
|
||||
~& [%create-bind-failed rep]
|
||||
(pure:m ~)
|
||||
::
|
||||
=* httr u.rep
|
||||
@ -623,12 +632,7 @@
|
||||
(json-octs u.r.httr parse-record:(provider authority))
|
||||
?~(dat ~. id.u.dat)
|
||||
::
|
||||
=/ =address:dns
|
||||
?>(?=(%direct -.target) +.target)
|
||||
=/ =turf
|
||||
(weld dom.authority /(crip +:(scow %p ship)))
|
||||
;< ~ bind:m (poke-app:stdio collector-app [%dns-complete ship address turf])
|
||||
;< now=@da bind:m get-time:stdio
|
||||
;< now=@da bind:m get-time:stdio
|
||||
=/ =bound
|
||||
[now id target ?~(existing ~ [[wen cur] hit]:u.existing)]
|
||||
(pure:m (some bound))
|
||||
@ -699,6 +703,23 @@
|
||||
?. (team:title [our src]:bowl)
|
||||
~| %bind-yoself !!
|
||||
?- -.in-poke-data
|
||||
%noun
|
||||
?: ?=(%debug noun.in-poke-data)
|
||||
~& bowl
|
||||
:: XX redact secrets
|
||||
::
|
||||
~& state
|
||||
(pure:m state)
|
||||
::
|
||||
:: XX heavy-handed, will duplicate subscriptions
|
||||
:: should track bones
|
||||
::
|
||||
?: ?=(%resubscribe noun.in-poke-data)
|
||||
;< ~ bind:m (peer-app:stdio collector-app /requests)
|
||||
(pure:m state)
|
||||
::
|
||||
~& %poke-unknown
|
||||
(pure:m state)
|
||||
::
|
||||
%dns-authority
|
||||
?. =(~ nem.state)
|
||||
@ -723,7 +744,7 @@
|
||||
=* nam u.nem.state
|
||||
=* who ship.in-poke-data
|
||||
=* tar target.in-poke-data
|
||||
?. ?=(%indirect -.tar)
|
||||
?: ?=(%indirect -.tar)
|
||||
~| %indirect-unsupported !!
|
||||
:: defer %indirect where target isn't yet bound
|
||||
::
|
||||
@ -738,6 +759,10 @@
|
||||
?~ new
|
||||
~& [%bind-failed in-poke-data]
|
||||
(pure:m state)
|
||||
=/ =turf
|
||||
(weld dom.aut.nam /(crip +:(scow %p who)))
|
||||
;< ~ bind:m
|
||||
(poke-app:stdio collector-app [%dns-complete who +.tar turf])
|
||||
=. bon.nam (~(put by bon.nam) who u.new)
|
||||
=. nem.state (some nam)
|
||||
::
|
||||
|
@ -8,10 +8,14 @@
|
||||
requested=(map ship address:dns)
|
||||
completed=(map ship binding:dns)
|
||||
==
|
||||
+$ peek-data [%noun (list (pair ship address:dns))]
|
||||
+$ peek-data
|
||||
$% [%requested (list (pair ship address:dns))]
|
||||
[%completed (list (pair ship binding:dns))]
|
||||
==
|
||||
+$ in-poke-data
|
||||
$% [%dns-address =address:dns]
|
||||
[%dns-complete =ship =binding:dns]
|
||||
[%noun noun=*]
|
||||
==
|
||||
+$ out-poke-data
|
||||
$% [%drum-unlink =dock]
|
||||
@ -78,6 +82,15 @@
|
||||
^- (quip move _this)
|
||||
=< abet
|
||||
?- -.in-poke-data
|
||||
%noun
|
||||
?: ?=(%debug noun.in-poke-data)
|
||||
~& bowl
|
||||
~& state
|
||||
this
|
||||
::
|
||||
~& %poke-unknown
|
||||
this
|
||||
::
|
||||
%dns-address
|
||||
=* who src.bowl
|
||||
=* adr address.in-poke-data
|
||||
@ -111,9 +124,10 @@
|
||||
=/ req=(unit address:dns) (~(get by requested.state) who)
|
||||
:: ignore established bindings that don't match requested
|
||||
::
|
||||
?: ?& ?=(^ req)
|
||||
?: ?| ?=(~ req)
|
||||
!=(adr u.req)
|
||||
==
|
||||
~& %unknown-complete
|
||||
this
|
||||
=: requested.state (~(del by requested.state) who)
|
||||
completed.state (~(put by completed.state) who [adr tuf])
|
||||
@ -124,10 +138,12 @@
|
||||
++ peek
|
||||
|= =path
|
||||
^- (unit (unit peek-data))
|
||||
~& path
|
||||
?+ path [~ ~]
|
||||
[%x %requested ~]
|
||||
[~ ~ %noun ~(tap by requested.state)]
|
||||
[~ ~ %requested ~(tap by requested.state)]
|
||||
::
|
||||
[%x %completed ~]
|
||||
[~ ~ %completed ~(tap by completed.state)]
|
||||
==
|
||||
::
|
||||
++ peer
|
||||
@ -149,10 +165,10 @@
|
||||
=. ..this (give-result path %dns-request i.requests)
|
||||
loop(requests t.requests)
|
||||
::
|
||||
=/ who (slaw %p i.path)
|
||||
=/ who=(unit @p) (slaw %p i.path)
|
||||
?~ who
|
||||
~| %invalid-path !!
|
||||
?~ dun=(~(get by completed.state) who)
|
||||
?~ dun=(~(get by completed.state) u.who)
|
||||
this
|
||||
(give-result path %dns-binding u.dun)
|
||||
--
|
||||
|
@ -211,6 +211,9 @@
|
||||
~| [%dns-collector-reserved-address if.adr] !!
|
||||
;< requested=? bind:m (request-by-ip if.adr)
|
||||
:: XX save failure?
|
||||
::
|
||||
~? =(requested.state (some address.in-poke-data))
|
||||
%re-requesting
|
||||
=? requested.state requested
|
||||
(some address.in-poke-data)
|
||||
(pure:m state)
|
||||
|
@ -3314,7 +3314,7 @@
|
||||
|= {t/telegram c/@ud k/(map serial @ud) s/(map circle (list @ud))}
|
||||
:+ +(c) (~(put by k) uid.t c)
|
||||
=/ src/circle
|
||||
?: (~(has by aud.t) [our.bol nom]) [our.bol nom]
|
||||
?: (~(has in aud.t) [our.bol nom]) [our.bol nom]
|
||||
?~ aud.t ~&(%strange-aud [our.bol %inbox])
|
||||
n.aud.t
|
||||
%+ ~(put by s) src
|
||||
|
BIN
pkg/arvo/app/launch/img/Favicon.png
Normal file
BIN
pkg/arvo/app/launch/img/Favicon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.8 KiB |
@ -7,6 +7,7 @@
|
||||
=name "viewport"
|
||||
=content "width=device-width, initial-scale=1, shrink-to-fit=no";
|
||||
;link(rel "stylesheet", href "/~launch/css/index.css");
|
||||
;link(rel "icon", type "image/png", href "/~launch/img/Favicon.png");
|
||||
==
|
||||
;body
|
||||
;div#root;
|
||||
|
@ -1,18 +0,0 @@
|
||||
|= scripts=marl
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Home</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
|
||||
<link rel="stylesheet" href="/~launch/css/index.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="root" />
|
||||
<script src="/~/channel/channel.js"></script>
|
||||
<script src="/~modulo/session.js"></script>
|
||||
<script src="/~launch/js/tiles.js"></script>
|
||||
<script src="/~launch/js/index.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -123,6 +123,7 @@
|
||||
++ reap
|
||||
|= [=wire saw=(unit tang)]
|
||||
^- (quip move _this)
|
||||
::
|
||||
~& [%reap wire]
|
||||
?: =([%export ~] wire)
|
||||
[~ this]
|
||||
@ -138,6 +139,7 @@
|
||||
++ coup
|
||||
|= [=wire saw=(unit tang)]
|
||||
^- (quip move _this)
|
||||
::
|
||||
~& [%coup wire]
|
||||
::
|
||||
?: =([%import ~] wire)
|
||||
|
@ -348,7 +348,9 @@
|
||||
[~ da-this]
|
||||
=. subs.sat (~(del by subs.sat) who.del col.del)
|
||||
:- ~(tap in ~(key by pos.u.old))
|
||||
(da-emit [ost.bol %pull /collection/[col.del] [who.del %publish] ~])
|
||||
%- da-emil
|
||||
:- [ost.bol %pull /collection/[col.del] [who.del %publish] ~]
|
||||
(affection-primary del)
|
||||
:: iterate through post ids collected before, removing each from
|
||||
:: secondary indices in state
|
||||
::
|
||||
@ -382,7 +384,8 @@
|
||||
=. da-this (da-remove who.del col.del u.pos.del)
|
||||
(da-emil (affection del))
|
||||
=. subs.sat (~(put by subs.sat) [who.del col.del] new)
|
||||
(da-remove who.del col.del u.pos.del)
|
||||
=. da-this (da-remove who.del col.del u.pos.del)
|
||||
(da-emil (affection-primary del))
|
||||
::
|
||||
==
|
||||
::
|
||||
@ -527,6 +530,15 @@
|
||||
|= del=delta
|
||||
^- (quip move _this)
|
||||
da-done:(da-change:da del)
|
||||
:: +affection: rumors to primary
|
||||
::
|
||||
++ affection-primary
|
||||
|= del=delta
|
||||
^- (list move)
|
||||
%+ turn (prey:pubsub:userlib /primary bol)
|
||||
|= [b=bone *]
|
||||
^- move
|
||||
[b %diff %publish-rumor del]
|
||||
:: +affection: rumors to interested
|
||||
::
|
||||
++ affection
|
||||
@ -1023,7 +1035,15 @@
|
||||
%edit-collection
|
||||
?. =(src.bol our.bol)
|
||||
[~ this]
|
||||
[~ this]
|
||||
=/ pax=path /web/publish/[name.act]/publish-info
|
||||
=/ col=(unit collection) (~(get by pubs.sat) name.act)
|
||||
?~ col
|
||||
[~ this]
|
||||
?: ?=(%.n -.dat.col.u.col)
|
||||
[~ this]
|
||||
=/ out=collection-info p.dat.col.u.col(title title.act)
|
||||
:_ this
|
||||
[(write-file pax %publish-info !>(out))]~
|
||||
::
|
||||
%edit-post
|
||||
?. =(who.act our.bol)
|
||||
|
File diff suppressed because one or more lines are too long
@ -9,6 +9,7 @@
|
||||
=name "viewport"
|
||||
=content "width=device-width, initial-scale=1, shrink-to-fit=no";
|
||||
;link(rel "stylesheet", href "/~publish/index.css");
|
||||
;link(rel "icon", type "image/png", href "/~launch/img/Favicon.png");
|
||||
;script@"/~/channel/channel.js";
|
||||
;script@"/~modulo/session.js";
|
||||
;script: window.injectedState = {(en-json:html inject)}
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1391,13 +1391,15 @@
|
||||
::
|
||||
:: prints binding details. goes both ways.
|
||||
::
|
||||
:: XX this type is a misjunction, audience can be ~
|
||||
::
|
||||
|= qur/(unit $@(char audience))
|
||||
^+ ..sh-work
|
||||
?^ qur
|
||||
?^ u.qur
|
||||
=+ cha=(~(get by bound) u.qur)
|
||||
(sh-fact %txt ?~(cha "none" [u.cha]~))
|
||||
=+ pan=~(tap in (~(get ju binds) u.qur))
|
||||
=+ pan=~(tap in (~(get ju binds) `@t`u.qur))
|
||||
?: =(~ pan) (sh-fact %txt "~")
|
||||
=< (sh-fact %mor (turn pan .))
|
||||
|=(a/audience [%txt ~(ar-phat ar a)])
|
||||
|
@ -1,125 +0,0 @@
|
||||
/+ *server
|
||||
/= tile-js
|
||||
/^ octs
|
||||
/; as-octs:mimes:html
|
||||
/: /===/app/timer/js/tile
|
||||
/| /js/
|
||||
/~ ~
|
||||
==
|
||||
/= timer-png
|
||||
/^ (map knot @)
|
||||
/: /===/app/timer/img /_ /png/
|
||||
=, format
|
||||
::
|
||||
|%
|
||||
:: +move: output effect
|
||||
::
|
||||
+$ move [bone card]
|
||||
:: +card: output effect payload
|
||||
::
|
||||
+$ poke
|
||||
$% [%launch-action [@tas path @t]]
|
||||
==
|
||||
::
|
||||
+$ card
|
||||
$% [%poke wire dock poke]
|
||||
[%http-response =http-event:http]
|
||||
[%connect wire binding:eyre term]
|
||||
[%diff %json json]
|
||||
[%wait wire @da]
|
||||
[%rest wire @da]
|
||||
==
|
||||
::
|
||||
--
|
||||
::
|
||||
|_ [bol=bowl:gall tim=@da]
|
||||
::
|
||||
++ this .
|
||||
::
|
||||
++ bound
|
||||
|= [wir=wire success=? binding=binding:eyre]
|
||||
^- (quip move _this)
|
||||
[~ this]
|
||||
::
|
||||
++ prep
|
||||
|= old=(unit tim=@da)
|
||||
^- (quip move _this)
|
||||
=/ launcha [%launch-action [%timer /tile '/~timer/js/tile.js']]
|
||||
:-
|
||||
:~
|
||||
[ost.bol %connect / [~ /'~timer'] %timer]
|
||||
[ost.bol %poke /timer [our.bol %launch] launcha]
|
||||
==
|
||||
?~ old
|
||||
this
|
||||
%= this
|
||||
tim tim.u.old
|
||||
==
|
||||
::
|
||||
++ peer-tile
|
||||
|= pax=path
|
||||
^- (quip move _this)
|
||||
?: =(tim *@da)
|
||||
[[ost.bol %diff %json [%s '']]~ this]
|
||||
[[ost.bol %diff %json [%s (scot %da tim)]]~ this]
|
||||
::
|
||||
++ send-tile-diff
|
||||
|= jon=json
|
||||
^- (list move)
|
||||
%+ turn (prey:pubsub:userlib /tile bol)
|
||||
|= [=bone ^]
|
||||
[bone %diff %json jon]
|
||||
::
|
||||
++ poke-json
|
||||
|= jon=json
|
||||
^- (quip move _this)
|
||||
?. ?=(%s -.jon)
|
||||
[~ this]
|
||||
=/ str/@t +.jon
|
||||
?: =(str 'start')
|
||||
=/ data/@da (add now.bol ~s10)
|
||||
:_ this(tim data)
|
||||
[[ost.bol %wait /timer data] (send-tile-diff [%s (scot %da data)])]
|
||||
?: =(str 'stop')
|
||||
:_ this(tim *@da)
|
||||
[[ost.bol %rest /timer tim] (send-tile-diff [%s ''])]
|
||||
[~ this]
|
||||
::
|
||||
++ poke-handle-http-request
|
||||
%- (require-authorization:app ost.bol move this)
|
||||
|= =inbound-request:eyre
|
||||
^- (quip move _this)
|
||||
=/ request-line (parse-request-line url.request.inbound-request)
|
||||
=/ back-path (flop site.request-line)
|
||||
=/ name=@t
|
||||
=/ back-path (flop site.request-line)
|
||||
?~ back-path
|
||||
''
|
||||
i.back-path
|
||||
::
|
||||
?+ site.request-line
|
||||
[[ost.bol %http-response not-found:app]~ this]
|
||||
::
|
||||
:: tile
|
||||
::
|
||||
[%'~timer' %js %tile ~]
|
||||
[[ost.bol %http-response (js-response:app tile-js)]~ this]
|
||||
::
|
||||
:: images
|
||||
::
|
||||
[%'~timer' %img *]
|
||||
=/ img (as-octs:mimes:html (~(got by timer-png) `@ta`name))
|
||||
:_ this
|
||||
[ost.bol %http-response (png-response:app img)]~
|
||||
==
|
||||
::
|
||||
++ wake
|
||||
|= [wir=wire err=(unit tang)]
|
||||
^- (quip move _this)
|
||||
?~ err
|
||||
:- (send-tile-diff [%s 'alarm'])
|
||||
this(tim *@da)
|
||||
~& err
|
||||
[~ this]
|
||||
::
|
||||
--
|
Binary file not shown.
Before Width: | Height: | Size: 20 KiB |
Binary file not shown.
Before Width: | Height: | Size: 15 KiB |
Binary file not shown.
Before Width: | Height: | Size: 16 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
14
pkg/arvo/gen/dns-collector/complete.hoon
Normal file
14
pkg/arvo/gen/dns-collector/complete.hoon
Normal file
@ -0,0 +1,14 @@
|
||||
:: :dns-collector: manually "complete" (fulfill) requests
|
||||
::
|
||||
:::: /hoon/complete/dns-collector/gen
|
||||
::
|
||||
/- *dns, *sole
|
||||
/+ *generators
|
||||
:- %say
|
||||
|= $: [now=@da eny=@uvJ bec=beak]
|
||||
[who=@p addr=@if =turf ~]
|
||||
~
|
||||
==
|
||||
:- %dns-complete
|
||||
^- [ship binding]
|
||||
[who [%if addr] turf]
|
@ -95,7 +95,6 @@
|
||||
[%home %launch]
|
||||
[%home %chat]
|
||||
[%home %publish]
|
||||
[%home %timer]
|
||||
[%home %clock]
|
||||
[%home %weather]
|
||||
==
|
||||
|
@ -47,7 +47,7 @@
|
||||
++ js-response
|
||||
|= oct-js=octs
|
||||
^- http-event:http
|
||||
[%start [200 ['content-type' 'application/js']~] [~ oct-js] %.y]
|
||||
[%start [200 ['content-type' 'text/javascript']~] [~ oct-js] %.y]
|
||||
::
|
||||
++ json-response
|
||||
|= oct-js=octs
|
||||
@ -103,7 +103,7 @@
|
||||
++ js-response
|
||||
|= =octs
|
||||
^- simple-payload:http
|
||||
[[200 ['content-type' 'application/js']~] `octs]
|
||||
[[200 ['content-type' 'text/javascript']~] `octs]
|
||||
::
|
||||
++ json-response
|
||||
|= =octs
|
||||
|
@ -251,11 +251,13 @@
|
||||
::
|
||||
=/ old ((soft tapp-state) u.old-state)
|
||||
?~ old
|
||||
~& [%tapp-reset dap.bowl]
|
||||
:: XX may break contracts!
|
||||
:: XX use only for development may break contracts!
|
||||
:: XX if active clam contracts only to abort transaction?
|
||||
::
|
||||
`this-tapp
|
||||
:: ~& [%tapp-reset dap.bowl]
|
||||
:: `this-tapp
|
||||
~| [%tapp-load-incompatible dap.bowl]
|
||||
!!
|
||||
::
|
||||
:: because the clam replaces the active continuation with
|
||||
:: the bunt of its mold, we must fail the transaction
|
||||
|
@ -73,7 +73,10 @@
|
||||
content+so:dejs
|
||||
==
|
||||
::
|
||||
++ delete-collection (of:dejs coll+(su:dejs sym) ~)
|
||||
++ delete-collection
|
||||
%- ot:dejs
|
||||
:~ coll+(su:dejs sym)
|
||||
==
|
||||
::
|
||||
++ delete-post
|
||||
%- ot:dejs
|
||||
@ -92,9 +95,6 @@
|
||||
%- ot:dejs
|
||||
:~ name+(su:dejs sym)
|
||||
title+so:dejs
|
||||
comments+comment-config
|
||||
allow-edit+edit-config
|
||||
perm+perm-config
|
||||
==
|
||||
::
|
||||
++ edit-post
|
||||
|
@ -8,7 +8,7 @@
|
||||
%+ sort ~(val by comments)
|
||||
|= [a=comment:publish b=comment:publish]
|
||||
^- ?
|
||||
(lte date-created.info.a date-created.info.b)
|
||||
(gte date-created.info.a date-created.info.b)
|
||||
::
|
||||
/_ /publish-comment/
|
||||
result
|
||||
|
@ -25,13 +25,7 @@
|
||||
[%delete-post coll=@tas post=@tas]
|
||||
[%delete-comment coll=@tas post=@tas comment=@tas]
|
||||
::
|
||||
$: %edit-collection
|
||||
name=@tas
|
||||
title=@t
|
||||
com=comment-config
|
||||
edit=edit-config
|
||||
perm=perm-config
|
||||
==
|
||||
[%edit-collection name=@tas title=@t]
|
||||
::
|
||||
$: %edit-post
|
||||
who=@p
|
||||
|
@ -1479,13 +1479,13 @@
|
||||
::
|
||||
++ get :: grab value by key
|
||||
~/ %get
|
||||
|= b/*
|
||||
^- {$@(~ {~ u/_?>(?=(^ a) q.n.a)})}
|
||||
=+ 42
|
||||
|* b=*
|
||||
=> .(b `_?>(?=(^ a) p.n.a)`b)
|
||||
|- ^- (unit _?>(?=(^ a) q.n.a))
|
||||
?~ a
|
||||
~
|
||||
?: =(b p.n.a)
|
||||
[~ u=q.n.a]
|
||||
(some q.n.a)
|
||||
?: (gor b p.n.a)
|
||||
$(a l.a)
|
||||
$(a r.a)
|
||||
@ -10727,11 +10727,11 @@
|
||||
{$rock *} |- ^- type
|
||||
?@ q.gen [%atom p.gen `q.gen]
|
||||
[%cell $(q.gen -.q.gen) $(q.gen +.q.gen)]
|
||||
{$sand *} |- ^- type
|
||||
?@ q.gen
|
||||
?: =(%n p.gen) ?>(=(0 q.gen) [%atom p.gen ~ q.gen])
|
||||
?:(=(%f p.gen) ?>((lte q.gen 1) bool) [%atom p.gen ~])
|
||||
[%cell $(q.gen -.q.gen) $(q.gen +.q.gen)]
|
||||
{$sand *} ?@ q.gen
|
||||
?: =(%n p.gen) ?>(=(0 q.gen) [%atom p.gen `q.gen])
|
||||
?: =(%f p.gen) ?>((lte q.gen 1) bool)
|
||||
[%atom p.gen ~]
|
||||
$(-.gen %rock)
|
||||
{$tune *} (face p.gen sut)
|
||||
{$dttr *} %noun
|
||||
{$dtts *} bool
|
||||
@ -10746,6 +10746,7 @@
|
||||
{$sgzp *} ~_(duck(sut ^$(gen p.gen)) $(gen q.gen))
|
||||
{$sgbn *} $(gen q.gen)
|
||||
{$tsbn *} $(gen q.gen, sut $(gen p.gen))
|
||||
{$tscm *} $(gen q.gen, sut (busk p.gen))
|
||||
{$wtcl *} =+ [fex=(gain p.gen) wux=(lose p.gen)]
|
||||
%- fork :~
|
||||
?:(=(%void fex) %void $(sut fex, gen q.gen))
|
||||
@ -10754,7 +10755,7 @@
|
||||
{$fits *} bool
|
||||
{$wthx *} bool
|
||||
{$dbug *} ~_((show %o p.gen) $(gen q.gen))
|
||||
{$zpcm *} (play p.gen)
|
||||
{$zpcm *} $(gen p.gen)
|
||||
{$lost *} %void
|
||||
{$zpmc *} (cell $(gen p.gen) $(gen q.gen))
|
||||
{$zpts *} %noun
|
||||
|
@ -2271,7 +2271,7 @@
|
||||
::
|
||||
u.existing
|
||||
::
|
||||
=/ already-heard=? (~(has by fragments.partial-rcv-message) seq)
|
||||
=/ already-heard=? (~(has by fragments.partial-rcv-message) `^fragment-num``@`seq)
|
||||
:: ack dupes except for the last fragment, in which case drop
|
||||
::
|
||||
?: already-heard
|
||||
|
@ -2264,7 +2264,7 @@
|
||||
:: These convert between aeon (version number), tako (commit hash), yaki
|
||||
:: (commit data structure), lobe (content hash), and blob (content).
|
||||
++ aeon-to-tako ~(got by hit.dom)
|
||||
++ aeon-to-yaki (cork aeon-to-tako tako-to-yaki)
|
||||
++ aeon-to-yaki |=(=aeon (tako-to-yaki (aeon-to-tako aeon)))
|
||||
++ lobe-to-blob ~(got by lat.ran)
|
||||
++ tako-to-yaki ~(got by hut.ran)
|
||||
++ lobe-to-mark
|
||||
@ -3670,8 +3670,11 @@
|
||||
|%
|
||||
:: These convert between aeon (version number), tako (commit hash), yaki
|
||||
:: (commit data structure), lobe (content hash), and blob (content).
|
||||
::
|
||||
:: XX the following are duplicated from the +state core
|
||||
::
|
||||
++ aeon-to-tako ~(got by hit.dom)
|
||||
++ aeon-to-yaki (cork aeon-to-tako tako-to-yaki)
|
||||
++ aeon-to-yaki |=(=aeon (tako-to-yaki (aeon-to-tako aeon)))
|
||||
++ lobe-to-blob ~(got by lat.ran)
|
||||
++ tako-to-yaki ~(got by hut.ran)
|
||||
++ page-to-lobe page-to-lobe:util
|
||||
|
@ -424,7 +424,7 @@
|
||||
;body
|
||||
;div#main
|
||||
;div#inner
|
||||
;h1#topborder:"Modulo"
|
||||
;h1#topborder:"Welcome"
|
||||
;h1:"{(scow %p our)}"
|
||||
;form(action "/~/login", method "post", enctype "application/x-www-form-urlencoded")
|
||||
;input(type "password", name "password", placeholder "passcode", autofocus "true");
|
||||
@ -1042,7 +1042,7 @@
|
||||
%.n
|
||||
:: is this a session that we know about?
|
||||
::
|
||||
?~ session=(~(get by sessions.authentication-state.state) u.session-id)
|
||||
?~ session=(~(get by sessions.authentication-state.state) `@uv`u.session-id)
|
||||
%.n
|
||||
:: is this session still valid?
|
||||
::
|
||||
@ -1098,7 +1098,7 @@
|
||||
==
|
||||
:: client is requesting the javascript shim
|
||||
::
|
||||
(return-static-data-on-duct 200 'application/javascript' channel-js)
|
||||
(return-static-data-on-duct 200 'text/javascript' channel-js)
|
||||
::
|
||||
?: =('PUT' method.request)
|
||||
:: PUT methods starts/modifies a channel, and returns a result immediately
|
||||
@ -1382,8 +1382,10 @@
|
||||
=/ channel-wire=path
|
||||
/channel/subscription/[channel-id]/(scot %ud subscription-id.i.requests)
|
||||
::
|
||||
=/ subscriptions
|
||||
subscriptions:(~(got by session.channel-state.state) channel-id)
|
||||
=/ usession (~(get by session.channel-state.state) channel-id)
|
||||
?~ usession
|
||||
$(requests t.requests)
|
||||
=/ subscriptions subscriptions:u.usession
|
||||
::
|
||||
?~ maybe-subscription=(~(get by subscriptions) channel-wire)
|
||||
:: the client sent us a weird request referring to a subscription
|
||||
@ -1567,8 +1569,11 @@
|
||||
|= channel-id=@t
|
||||
^- [(list move) server-state]
|
||||
::
|
||||
=/ session
|
||||
(~(got by session.channel-state.state) channel-id)
|
||||
=/ usession=(unit channel)
|
||||
(~(get by session.channel-state.state) channel-id)
|
||||
?~ usession
|
||||
[~ state]
|
||||
=/ session=channel u.usession
|
||||
::
|
||||
:_ %_ state
|
||||
session.channel-state
|
||||
|
@ -473,7 +473,13 @@
|
||||
|= dap/dude
|
||||
=- ?.(=(p our) - -(r [%da now])) :: soft dependencies
|
||||
^- beak
|
||||
byk:(~(got by bum.mas) dap)
|
||||
?~ app-data=(~(get by bum.mas) dap)
|
||||
::
|
||||
:: XX this fallback is necessary, as .dap could be either the source
|
||||
:: or the destination app. ie, it might not exist locally ...
|
||||
::
|
||||
[our %home %da now]
|
||||
byk.u.app-data
|
||||
::
|
||||
++ mo-peek
|
||||
~/ %mo-peek
|
||||
|
@ -246,19 +246,19 @@
|
||||
=. tuf.own.pki turf.tac
|
||||
:: our initial galaxy table as a +map from +life to +public
|
||||
::
|
||||
=/ point-diffs=(list [who=ship =point-diff])
|
||||
=/ =udiffs:point
|
||||
%~ tap by
|
||||
%- ~(run by czar.tac)
|
||||
|=([=life =pass] `point-diff`[%changed-keys life 1 pass])
|
||||
|=([=life =pass] `udiff:point`[*[@ @] %keys life 1 pass])
|
||||
=. +>.$
|
||||
|- ^+ +>.^$
|
||||
?~ point-diffs
|
||||
?~ udiffs
|
||||
+>.^$
|
||||
=. +>.^$
|
||||
%- curd =< abet
|
||||
%- public-keys:~(feel su hen our pki etn sap)
|
||||
[%diff who point-diff]:i.point-diffs
|
||||
$(point-diffs t.point-diffs)
|
||||
[%diff ship udiff]:i.udiffs
|
||||
$(udiffs t.udiffs)
|
||||
::
|
||||
=. moz
|
||||
%+ weld moz
|
||||
@ -681,7 +681,7 @@
|
||||
..feel
|
||||
=. ..feel
|
||||
%- public-keys:feel
|
||||
[%diff who.i.passes %changed-keys 1 1 pass.i.passes]
|
||||
[%diff who.i.passes *[@ @] %keys 1 1 pass.i.passes]
|
||||
$(passes t.passes)
|
||||
--
|
||||
--
|
||||
@ -703,32 +703,36 @@
|
||||
(~(get ju ney.zim) who.i.pointl)
|
||||
[%full (my i.pointl ~)]
|
||||
=* who who.vent-result
|
||||
=* point-diff point-diff.vent-result
|
||||
=* udiff udiff.vent-result
|
||||
=/ maybe-point (~(get by pos.zim) who)
|
||||
=/ =point (fall maybe-point *point)
|
||||
:: XX don't do max etc, just do the thing
|
||||
=. point
|
||||
?- -.point-diff
|
||||
%new-sponsor
|
||||
point(sponsor sponsor.point-diff)
|
||||
?- +<.udiff
|
||||
%spon
|
||||
point(sponsor sponsor.udiff)
|
||||
::
|
||||
%changed-continuity
|
||||
point(rift (max rift.point-diff rift.point))
|
||||
%rift
|
||||
point(rift (max rift.udiff rift.point))
|
||||
::
|
||||
%changed-keys
|
||||
%keys
|
||||
%_ point
|
||||
life (max life.point-diff life.point)
|
||||
life (max life.udiff life.point)
|
||||
keys
|
||||
%+ ~(put by keys.point)
|
||||
life.point-diff
|
||||
[crypto-suite pass]:point-diff
|
||||
life.udiff
|
||||
[crypto-suite pass]:udiff
|
||||
==
|
||||
::
|
||||
%disavow
|
||||
~| %not-implemented !!
|
||||
==
|
||||
=. pos.zim (~(put by pos.zim) who point)
|
||||
%+ vent-give
|
||||
(~(get ju ney.zim) who)
|
||||
?~ maybe-point
|
||||
[%full (my [who point]~)]
|
||||
[%diff who point-diff]
|
||||
[%diff who udiff]
|
||||
:: :: ++vein:feel:su
|
||||
++ private-keys :: kick private keys
|
||||
|= [=life =ring]
|
||||
|
@ -2313,21 +2313,112 @@
|
||||
::
|
||||
:: %kale only talks to %ames and itself.
|
||||
::
|
||||
++ block
|
||||
=< block
|
||||
|%
|
||||
+$ hash @uxblockhash
|
||||
+$ number @udblocknumber
|
||||
+$ id [=hash =number]
|
||||
+$ block [=id =parent=hash]
|
||||
--
|
||||
::
|
||||
:: Azimuth points form a groupoid, where the objects are all the
|
||||
:: possible values of +point and the arrows are the possible values
|
||||
:: of (list point-diff). Composition of arrows is concatenation,
|
||||
:: and you can apply the diffs to a +point with +apply.
|
||||
::
|
||||
:: It's simplest to consider +point as the product of three
|
||||
:: groupoids, Rift, Keys, and Sponsor. The objects of the product
|
||||
:: are the product of the objects of the underlying groupoids. The
|
||||
:: arrows are a list of a sum of the diff types of the underlying
|
||||
:: groupoids. Given an arrow=(list diff), you can project to the
|
||||
:: underlying arrows with +skim filtering on the head of each
|
||||
:: diff.
|
||||
::
|
||||
:: The identity element is ~. Clearly, composing this with any +diff
|
||||
:: gives the original +diff. Since this is a category, +compose must
|
||||
:: be associative (true, because concatenation is associative). This
|
||||
:: is a groupoid, so we must further have that every +point-diff has an
|
||||
:: inverse. These are given by the +inverse operation.
|
||||
::
|
||||
++ point
|
||||
$: =rift
|
||||
=life
|
||||
keys=(map life [crypto-suite=@ud =pass])
|
||||
sponsor=(unit @p)
|
||||
==
|
||||
+$ point-diff
|
||||
$% [%changed-continuity =rift]
|
||||
[%changed-keys =life crypto-suite=@ud =pass]
|
||||
[%new-sponsor sponsor=(unit @p)]
|
||||
==
|
||||
=< point
|
||||
|%
|
||||
+$ point
|
||||
$: =rift
|
||||
=life
|
||||
keys=(map life [crypto-suite=@ud =pass])
|
||||
sponsor=(unit @p)
|
||||
==
|
||||
::
|
||||
+$ key-update [=life crypto-suite=@ud =pass]
|
||||
::
|
||||
:: Invertible diffs
|
||||
::
|
||||
+$ diffs (list diff)
|
||||
+$ diff
|
||||
$% [%rift from=rift to=rift]
|
||||
[%keys from=key-update to=key-update]
|
||||
[%spon from=(unit @p) to=(unit @p)]
|
||||
==
|
||||
::
|
||||
:: Non-invertible diffs
|
||||
::
|
||||
+$ udiffs (list [=ship =udiff])
|
||||
+$ udiff
|
||||
$: =id:block
|
||||
$% [%rift =rift]
|
||||
[%keys key-update]
|
||||
[%spon sponsor=(unit @p)]
|
||||
[%disavow ~]
|
||||
== ==
|
||||
::
|
||||
++ inverse
|
||||
|= diffs=(list diff)
|
||||
^- (list diff)
|
||||
%- flop
|
||||
%+ turn diffs
|
||||
|= =diff
|
||||
^- ^diff
|
||||
?- -.diff
|
||||
%rift [%rift &2 |2]:diff
|
||||
%keys [%keys &2 |2]:diff
|
||||
%spon [%spon &2 |2]:diff
|
||||
==
|
||||
::
|
||||
++ compose
|
||||
(bake weld ,[(list diff) (list diff)])
|
||||
::
|
||||
++ apply
|
||||
|= [diffs=(list diff) =point]
|
||||
(roll diffs (apply-diff point))
|
||||
::
|
||||
++ apply-diff
|
||||
|= =point
|
||||
|: [*=diff point]
|
||||
^- ^point
|
||||
?- -.diff
|
||||
%rift
|
||||
?> =(rift.point from.diff)
|
||||
point(rift to.diff)
|
||||
::
|
||||
%keys
|
||||
?> =(life.point life.from.diff)
|
||||
?> =((~(get by keys.point) life.point) `+.from.diff)
|
||||
%_ point
|
||||
life life.to.diff
|
||||
keys (~(put by keys.point) life.to.diff +.to.diff)
|
||||
==
|
||||
::
|
||||
%spon
|
||||
?> =(sponsor.point from.diff)
|
||||
point(sponsor to.diff)
|
||||
==
|
||||
--
|
||||
::
|
||||
+$ vent-result
|
||||
$% [%full points=(map ship point)]
|
||||
[%diff who=ship =point-diff]
|
||||
[%diff who=ship =udiff:point]
|
||||
==
|
||||
:: ::
|
||||
++ gift :: out result <-$
|
||||
@ -8478,6 +8569,11 @@
|
||||
adr=(list address)
|
||||
top=(list ?(@ux (list @ux)))
|
||||
==
|
||||
$: %eth-get-logs-by-hash
|
||||
has=@
|
||||
adr=(list address)
|
||||
top=(list ?(@ux (list @ux)))
|
||||
==
|
||||
[%eth-get-filter-changes fid=@ud]
|
||||
[%eth-get-transaction-count adr=address]
|
||||
[%eth-get-transaction-receipt txh=@ux]
|
||||
@ -8490,6 +8586,7 @@
|
||||
[%eth-new-filter fid=@ud]
|
||||
[%eth-get-filter-logs los=(list event-log)]
|
||||
[%eth-get-logs los=(list event-log)]
|
||||
[%eth-get-logs-by-hash los=(list event-log)]
|
||||
[%eth-got-filter-changes los=(list event-log)]
|
||||
[%eth-transaction-hash haz=@ux]
|
||||
==
|
||||
@ -8665,7 +8762,25 @@
|
||||
?~ tob.req ~
|
||||
`['toBlock' (block-to-json u.tob.req)]
|
||||
::
|
||||
::TODO fucking tmi
|
||||
?: =(0 (lent adr.req)) ~
|
||||
:+ ~ 'address'
|
||||
?: =(1 (lent adr.req)) (tape (address-to-hex (snag 0 adr.req)))
|
||||
:- %a
|
||||
(turn adr.req (cork address-to-hex tape))
|
||||
::
|
||||
?~ top.req ~
|
||||
:+ ~ 'topics'
|
||||
(topics-to-json top.req)
|
||||
==
|
||||
::
|
||||
%eth-get-logs-by-hash
|
||||
:- 'eth_getLogs'
|
||||
:_ ~ :- %o
|
||||
%- ~(gas by *(map @t json))
|
||||
=- (murn - same)
|
||||
^- (list (unit (pair @t json)))
|
||||
:~ `['blockHash' (tape (transaction-to-hex has.req))]
|
||||
::
|
||||
?: =(0 (lent adr.req)) ~
|
||||
:+ ~ 'address'
|
||||
?: =(1 (lent adr.req)) (tape (address-to-hex (snag 0 adr.req)))
|
||||
|
@ -2033,7 +2033,7 @@
|
||||
%start
|
||||
:- 200
|
||||
:~ ['content-type' 'text/html']
|
||||
['content-length' '1751']
|
||||
['content-length' '1752']
|
||||
==
|
||||
[~ (login-page:http-server-gate `'/~landscape/inner-path' ~nul)]
|
||||
complete=%.y
|
||||
|
@ -426,7 +426,7 @@ url = "http://localhost:%s" % PORT
|
||||
r = requests.post(url, data=json.dumps(payload))
|
||||
|
||||
if r.text[0] == '"':
|
||||
print r.text[1:-1].decode('string_escape')
|
||||
print r.text[1:-1].encode('utf-8').decode('string_escape')
|
||||
elif r.text[0] == '{':
|
||||
# print r.text
|
||||
json_data = json.loads(r.text)
|
||||
|
1
pkg/urbit/.gitignore
vendored
1
pkg/urbit/.gitignore
vendored
@ -4,6 +4,7 @@
|
||||
/config.mk
|
||||
include/config.h
|
||||
include/ca-bundle.h
|
||||
include/ivory.h
|
||||
#
|
||||
# Build Outputs
|
||||
#
|
||||
|
@ -7,7 +7,7 @@ daemon = $(wildcard daemon/*.c)
|
||||
worker = $(wildcard worker/*.c)
|
||||
|
||||
common = $(jets) $(noun) $(vere)
|
||||
headers = $(shell find include -type f) include/ca-bundle.h
|
||||
headers = $(shell find include -type f) include/ca-bundle.h include/ivory.h
|
||||
|
||||
common_objs = $(shell echo $(common) | sed 's/\.c/.o/g')
|
||||
daemon_objs = $(shell echo $(daemon) | sed 's/\.c/.o/g')
|
||||
@ -27,6 +27,10 @@ ifeq ($(SSL_CERT_FILE),)
|
||||
$(error SSL_CERT_FILE is undefined)
|
||||
endif
|
||||
|
||||
ifeq ($(IVORY),)
|
||||
$(error IVORY is undefined)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
.PHONY: all test clean mkproper
|
||||
@ -44,7 +48,7 @@ clean:
|
||||
rm -f ./tags $(all_objs) $(all_exes)
|
||||
|
||||
mrproper: clean
|
||||
rm -f config.mk include/config.h include/ca-bundle.h
|
||||
rm -f config.mk include/config.h include/ca-bundle.h include/ivory.h
|
||||
|
||||
################################################################################
|
||||
|
||||
@ -54,6 +58,12 @@ include/ca-bundle.h:
|
||||
@xxd -i include/ca-bundle.crt > include/ca-bundle.h
|
||||
@rm include/ca-bundle.crt
|
||||
|
||||
include/ivory.h:
|
||||
@echo XXD -i $(IVORY)
|
||||
@cat $(IVORY) > u3_Ivory.pill
|
||||
@xxd -i u3_Ivory.pill > include/ivory.h
|
||||
@rm u3_Ivory.pill
|
||||
|
||||
build/hashtable_tests: $(common_objs) tests/hashtable_tests.o
|
||||
@echo CC -o $@
|
||||
@mkdir -p ./build
|
||||
|
@ -472,7 +472,6 @@ static void
|
||||
report(void)
|
||||
{
|
||||
printf("urbit %s\n", URBIT_VERSION);
|
||||
printf("---------\nLibraries\n---------\n");
|
||||
printf("gmp: %s\n", gmp_version);
|
||||
printf("sigsegv: %d.%d\n",
|
||||
(libsigsegv_version >> 8) & 0xff,
|
||||
|
@ -1240,7 +1240,7 @@
|
||||
/* u3_pier_tank(): dump single tank.
|
||||
*/
|
||||
void
|
||||
u3_pier_tank(c3_l tab_l, u3_noun tac);
|
||||
u3_pier_tank(c3_l tab_l, c3_w pri_w, u3_noun tac);
|
||||
|
||||
/* u3_pier_punt(): dump tank list.
|
||||
*/
|
||||
|
@ -3,9 +3,10 @@
|
||||
*/
|
||||
#include "all.h"
|
||||
|
||||
#if 0
|
||||
extern void
|
||||
u3_pier_tank(c3_l tab_l, u3_noun tac);
|
||||
|
||||
u3_pier_tank(c3_l tab_l, c3_w pri_w, u3_noun tac);
|
||||
#endif
|
||||
|
||||
// duck: create a duck core for mean.
|
||||
//
|
||||
@ -67,7 +68,7 @@
|
||||
sprintf(ugh_c, "%s: %s: 0x%8x:",
|
||||
paz_c, pfix_c, u3r_mug(typ));
|
||||
#if 0
|
||||
u3_pier_tank(0, u3n_kick_on(u3qfu_dunq(van, ugh_c, typ)));
|
||||
u3_pier_tank(0, 0, u3n_kick_on(u3qfu_dunq(van, ugh_c, typ)));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,8 @@
|
||||
#include "all.h"
|
||||
#include "vere/vere.h"
|
||||
|
||||
#include "ivory.h"
|
||||
|
||||
// stash config flags for worker
|
||||
//
|
||||
static c3_w sag_w;
|
||||
@ -334,7 +336,7 @@ _daemon_come(u3_noun star, u3_noun pill, u3_noun path)
|
||||
static void
|
||||
_daemon_slog(u3_noun hod)
|
||||
{
|
||||
u3_pier_tank(0, u3k(u3t(hod)));
|
||||
u3_pier_tank(0, 0, u3k(u3t(hod)));
|
||||
u3z(hod);
|
||||
}
|
||||
|
||||
@ -873,10 +875,7 @@ u3_daemon_commence()
|
||||
lit = u3m_file(u3_Host.ops_u.lit_c);
|
||||
}
|
||||
else {
|
||||
extern c3_w u3_Ivory_length_w;
|
||||
extern c3_y u3_Ivory_pill_y[];
|
||||
|
||||
lit = u3i_bytes(u3_Ivory_length_w, u3_Ivory_pill_y);
|
||||
lit = u3i_bytes(u3_Ivory_pill_len, u3_Ivory_pill);
|
||||
}
|
||||
|
||||
if ( c3n == u3v_boot_lite(lit)) {
|
||||
|
134397
pkg/urbit/vere/ivory.c
134397
pkg/urbit/vere/ivory.c
File diff suppressed because it is too large
Load Diff
@ -824,13 +824,7 @@ _pier_work_slog(u3_writ* wit_u, c3_w pri_w, u3_noun tan)
|
||||
}
|
||||
#endif
|
||||
|
||||
switch ( pri_w ) {
|
||||
case 3: fprintf(stderr, ">>> "); break;
|
||||
case 2: fprintf(stderr, ">> "); break;
|
||||
case 1: fprintf(stderr, "> "); break;
|
||||
}
|
||||
|
||||
u3_pier_tank(0, tan);
|
||||
u3_pier_tank(0, pri_w, tan);
|
||||
}
|
||||
|
||||
/* _pier_work_exit(): handle subprocess exit.
|
||||
@ -1928,30 +1922,29 @@ _pier_tape(FILE* fil_u, u3_noun tep)
|
||||
while ( c3y == u3du(tap) ) {
|
||||
c3_c car_c;
|
||||
|
||||
if ( u3h(tap) >= 127 ) {
|
||||
car_c = '?';
|
||||
} else car_c = u3h(tap);
|
||||
// XX this utf-8 caution is unwarranted
|
||||
//
|
||||
// we already write() utf8 directly to streams in term.c
|
||||
//
|
||||
// if ( u3h(tap) >= 127 ) {
|
||||
// car_c = '?';
|
||||
// } else
|
||||
car_c = u3h(tap);
|
||||
|
||||
putc(car_c, fil_u);
|
||||
tap = u3t(tap);
|
||||
}
|
||||
|
||||
u3z(tep);
|
||||
}
|
||||
|
||||
/* _pier_wall(): dump a wall, old style. Don't do this.
|
||||
*/
|
||||
static void
|
||||
_pier_wall(u3_noun wol)
|
||||
_pier_wall(FILE* fil_u, u3_noun wol)
|
||||
{
|
||||
FILE* fil_u = u3_term_io_hija();
|
||||
u3_noun wal = wol;
|
||||
|
||||
// XX temporary, for urb.py test runner
|
||||
//
|
||||
if ( c3y == u3_Host.ops_u.dem ) {
|
||||
fil_u = stderr;
|
||||
}
|
||||
|
||||
while ( u3_nul != wal ) {
|
||||
_pier_tape(fil_u, u3k(u3h(wal)));
|
||||
|
||||
@ -1960,16 +1953,52 @@ _pier_wall(u3_noun wol)
|
||||
|
||||
wal = u3t(wal);
|
||||
}
|
||||
u3_term_io_loja(0);
|
||||
|
||||
u3z(wol);
|
||||
}
|
||||
|
||||
/* u3_pier_tank(): dump single tank.
|
||||
*/
|
||||
void
|
||||
u3_pier_tank(c3_l tab_l, u3_noun tac)
|
||||
u3_pier_tank(c3_l tab_l, c3_w pri_w, u3_noun tac)
|
||||
{
|
||||
u3_pier_punt(tab_l, u3nc(tac, u3_nul));
|
||||
u3_noun blu = u3_term_get_blew(0);
|
||||
c3_l col_l = u3h(blu);
|
||||
FILE* fil_u = u3_term_io_hija();
|
||||
|
||||
// XX temporary, for urb.py test runner
|
||||
//
|
||||
if ( c3y == u3_Host.ops_u.dem ) {
|
||||
fil_u = stderr;
|
||||
}
|
||||
|
||||
switch ( pri_w ) {
|
||||
case 3: fprintf(fil_u, ">>> "); break;
|
||||
case 2: fprintf(fil_u, ">> "); break;
|
||||
case 1: fprintf(fil_u, "> "); break;
|
||||
}
|
||||
|
||||
// if we have no arvo kernel and can't evaluate nock
|
||||
// only print %leaf tanks
|
||||
//
|
||||
if ( 0 == u3A->roc ) {
|
||||
if ( c3__leaf == u3h(tac) ) {
|
||||
_pier_tape(fil_u, u3k(u3t(tac)));
|
||||
putc(13, fil_u);
|
||||
putc(10, fil_u);
|
||||
}
|
||||
}
|
||||
// We are calling nock here, but hopefully need no protection.
|
||||
//
|
||||
else {
|
||||
u3_noun wol = u3dc("wash", u3nc(tab_l, col_l), u3k(tac));
|
||||
|
||||
_pier_wall(fil_u, wol);
|
||||
}
|
||||
|
||||
u3_term_io_loja(0);
|
||||
u3z(blu);
|
||||
u3z(tac);
|
||||
}
|
||||
|
||||
/* u3_pier_punt(): dump tank list.
|
||||
@ -1977,41 +2006,14 @@ u3_pier_tank(c3_l tab_l, u3_noun tac)
|
||||
void
|
||||
u3_pier_punt(c3_l tab_l, u3_noun tac)
|
||||
{
|
||||
u3_noun blu = u3_term_get_blew(0);
|
||||
c3_l col_l = u3h(blu);
|
||||
u3_noun cat = tac;
|
||||
u3_noun cat = tac;
|
||||
|
||||
// We are calling nock here, but hopefully need no protection.
|
||||
//
|
||||
while ( c3y == u3r_du(cat) ) {
|
||||
if ( 0 == u3A->roc ) {
|
||||
u3_noun act = u3h(cat);
|
||||
|
||||
if ( c3__leaf == u3h(act) ) {
|
||||
FILE* fil_u = u3_term_io_hija();
|
||||
|
||||
// XX temporary, for urb.py test runner
|
||||
//
|
||||
if ( c3y == u3_Host.ops_u.dem ) {
|
||||
fil_u = stderr;
|
||||
}
|
||||
|
||||
_pier_tape(fil_u, u3k(u3t(act)));
|
||||
putc(13, fil_u);
|
||||
putc(10, fil_u);
|
||||
|
||||
u3_term_io_loja(0);
|
||||
}
|
||||
}
|
||||
else {
|
||||
u3_noun wol = u3dc("wash", u3nc(tab_l, col_l), u3k(u3h(cat)));
|
||||
|
||||
_pier_wall(wol);
|
||||
}
|
||||
u3_pier_tank(tab_l, 0, u3k(u3h(cat)));
|
||||
cat = u3t(cat);
|
||||
}
|
||||
|
||||
u3z(tac);
|
||||
u3z(blu);
|
||||
}
|
||||
|
||||
/* u3_pier_sway(): print trace.
|
||||
|
@ -784,11 +784,15 @@ _term_read_cb(uv_stream_t* tcp_u,
|
||||
*/
|
||||
static void
|
||||
_term_try_write_str(u3_utty* uty_u,
|
||||
const c3_c* hun_y)
|
||||
const c3_c* str_c)
|
||||
{
|
||||
// c3_i fid_i = uv_fileno(&uty_u->pop_u);
|
||||
c3_i fid_i = uty_u->pop_u.io_watcher.fd; // XX old libuv
|
||||
_write(fid_i, hun_y, strlen(hun_y));
|
||||
c3_w len_w = strlen(str_c);
|
||||
|
||||
if ( len_w != write(fid_i, str_c, len_w) ) {
|
||||
// ignore, we just tryin
|
||||
}
|
||||
}
|
||||
|
||||
/* _term_try_move_left(): move the cursor left (off-thread).
|
||||
|
@ -6,7 +6,7 @@ fail () {
|
||||
}
|
||||
|
||||
if [ -z "$CACHIX_SIGNING_KEY" ]
|
||||
then fail "The CACHIX_AUTH_TOKEN environment variable needs to be set."
|
||||
then fail "The CACHIX_SIGNING_KEY environment variable needs to be set."
|
||||
fi
|
||||
|
||||
if [ -z "$CACHIX_AUTH_TOKEN" ]
|
||||
|
6
sh/update-ivory-pill
Executable file
6
sh/update-ivory-pill
Executable file
@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
|
||||
pkg=$(nix-build nix/ops -A ivory --no-out-link)
|
||||
cp $pkg bin/ivory.pill
|
Loading…
Reference in New Issue
Block a user