mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-01 11:33:41 +03:00
Merge branch 'master' into langserver-rpc-rewrite
This commit is contained in:
commit
3c74888c9d
@ -10,7 +10,7 @@ A personal server operating function.
|
|||||||
|
|
||||||
[azim]: https://etherscan.io/address/0x223c067f8cf28ae173ee5cafea60ca44c335fecb
|
[azim]: https://etherscan.io/address/0x223c067f8cf28ae173ee5cafea60ca44c335fecb
|
||||||
[aens]: https://etherscan.io/address/azimuth.eth
|
[aens]: https://etherscan.io/address/azimuth.eth
|
||||||
[brid]: https://github.com/urbit/bridge/releases
|
[brid]: https://github.com/urbit/bridge
|
||||||
[arvo]: https://github.com/urbit/urbit/tree/master/pkg/arvo
|
[arvo]: https://github.com/urbit/urbit/tree/master/pkg/arvo
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:23ec7d497dd53f180b8753bd196f92695c7d60dad52f2b57061fc8642cdae4e2
|
oid sha256:e6232e5bcb64be057ccd9b4c23bbd636814d50778e4f3a01fbf2ee0042fe3d44
|
||||||
size 9645510
|
size 9635072
|
||||||
|
@ -256,8 +256,8 @@
|
|||||||
%- zing
|
%- zing
|
||||||
%+ turn ufs
|
%+ turn ufs
|
||||||
|= uf=unix-effect
|
|= uf=unix-effect
|
||||||
:~ [%give %fact `/effect %aqua-effect !>(`aqua-effect`[ship uf])]
|
:~ [%give %fact ~[/effect] %aqua-effect !>(`aqua-effect`[ship uf])]
|
||||||
[%give %fact `/effect/[-.q.uf] %aqua-effect !>(`aqua-effect`[ship uf])]
|
[%give %fact ~[/effect/[-.q.uf]] %aqua-effect !>(`aqua-effect`[ship uf])]
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
=. this
|
=. this
|
||||||
@ -265,7 +265,7 @@
|
|||||||
%- emit-cards
|
%- emit-cards
|
||||||
%+ turn ~(tap by unix-effects)
|
%+ turn ~(tap by unix-effects)
|
||||||
|= [=ship ufs=(list unix-effect)]
|
|= [=ship ufs=(list unix-effect)]
|
||||||
[%give %fact `path %aqua-effects !>(`aqua-effects`[ship (flop ufs)])]
|
[%give %fact ~[path] %aqua-effects !>(`aqua-effects`[ship (flop ufs)])]
|
||||||
::
|
::
|
||||||
=. this
|
=. this
|
||||||
%- emit-cards
|
%- emit-cards
|
||||||
@ -275,28 +275,28 @@
|
|||||||
=/ =path /effect/(scot %p ship)
|
=/ =path /effect/(scot %p ship)
|
||||||
%+ turn ufs
|
%+ turn ufs
|
||||||
|= uf=unix-effect
|
|= uf=unix-effect
|
||||||
[%give %fact `path %aqua-effect !>(`aqua-effect`[ship uf])]
|
[%give %fact ~[path] %aqua-effect !>(`aqua-effect`[ship uf])]
|
||||||
::
|
::
|
||||||
=. this
|
=. this
|
||||||
%- emit-cards
|
%- emit-cards
|
||||||
%+ turn ~(tap by unix-effects)
|
%+ turn ~(tap by unix-effects)
|
||||||
|= [=ship ufs=(list unix-effect)]
|
|= [=ship ufs=(list unix-effect)]
|
||||||
=/ =path /effects/(scot %p ship)
|
=/ =path /effects/(scot %p ship)
|
||||||
[%give %fact `path %aqua-effects !>(`aqua-effects`[ship (flop ufs)])]
|
[%give %fact ~[path] %aqua-effects !>(`aqua-effects`[ship (flop ufs)])]
|
||||||
::
|
::
|
||||||
=. this
|
=. this
|
||||||
%- emit-cards
|
%- emit-cards
|
||||||
%+ turn ~(tap by unix-events)
|
%+ turn ~(tap by unix-events)
|
||||||
|= [=ship ve=(list unix-timed-event)]
|
|= [=ship ve=(list unix-timed-event)]
|
||||||
=/ =path /events/(scot %p ship)
|
=/ =path /events/(scot %p ship)
|
||||||
[%give %fact `path %aqua-events !>(`aqua-events`[ship (flop ve)])]
|
[%give %fact ~[path] %aqua-events !>(`aqua-events`[ship (flop ve)])]
|
||||||
::
|
::
|
||||||
=. this
|
=. this
|
||||||
%- emit-cards
|
%- emit-cards
|
||||||
%+ turn ~(tap by unix-boths)
|
%+ turn ~(tap by unix-boths)
|
||||||
|= [=ship bo=(list unix-both)]
|
|= [=ship bo=(list unix-both)]
|
||||||
=/ =path /boths/(scot %p ship)
|
=/ =path /boths/(scot %p ship)
|
||||||
[%give %fact `path %aqua-boths !>(`aqua-boths`[ship (flop bo)])]
|
[%give %fact ~[path] %aqua-boths !>(`aqua-boths`[ship (flop bo)])]
|
||||||
::
|
::
|
||||||
[(flop cards) all-state]
|
[(flop cards) all-state]
|
||||||
::
|
::
|
||||||
|
@ -78,8 +78,8 @@
|
|||||||
?~ udiffs
|
?~ udiffs
|
||||||
~
|
~
|
||||||
=/ =path /(scot %p ship.i.udiffs)
|
=/ =path /(scot %p ship.i.udiffs)
|
||||||
:* [%give %fact `/ %azimuth-udiff !>(i.udiffs)]
|
:* [%give %fact ~[/] %azimuth-udiff !>(i.udiffs)]
|
||||||
[%give %fact `path %azimuth-udiff !>(i.udiffs)]
|
[%give %fact ~[path] %azimuth-udiff !>(i.udiffs)]
|
||||||
$(udiffs t.udiffs)
|
$(udiffs t.udiffs)
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
|
@ -122,7 +122,7 @@
|
|||||||
?- -.sign
|
?- -.sign
|
||||||
%poke-ack [- all-state]:(on-agent:def wire sign)
|
%poke-ack [- all-state]:(on-agent:def wire sign)
|
||||||
%watch-ack [- all-state]:(on-agent:def wire sign)
|
%watch-ack [- all-state]:(on-agent:def wire sign)
|
||||||
%kick [?:(?=([%chat-store ~] wire) ~[connect] ~) all-state]
|
%kick [?:(?=([%chat-store ~] wire) ~[connect:tc] ~) all-state]
|
||||||
%fact
|
%fact
|
||||||
?+ p.cage.sign ~|([%chat-cli-bad-sub-mark wire p.cage.sign] !!)
|
?+ p.cage.sign ~|([%chat-cli-bad-sub-mark wire p.cage.sign] !!)
|
||||||
%chat-update (diff-chat-update:tc wire !<(chat-update q.cage.sign))
|
%chat-update (diff-chat-update:tc wire !<(chat-update q.cage.sign))
|
||||||
@ -1044,7 +1044,7 @@
|
|||||||
|= fec=sole-effect:sole-sur
|
|= fec=sole-effect:sole-sur
|
||||||
^- card
|
^- card
|
||||||
::TODO don't hard-code session id 'drum' here
|
::TODO don't hard-code session id 'drum' here
|
||||||
[%give %fact `/sole/drum %sole-effect !>(fec)]
|
[%give %fact ~[/sole/drum] %sole-effect !>(fec)]
|
||||||
:: +tab: print tab-complete list
|
:: +tab: print tab-complete list
|
||||||
::
|
::
|
||||||
++ tab
|
++ tab
|
||||||
|
@ -186,7 +186,7 @@
|
|||||||
:~ (pull-wire [%backlog (weld path.act /0)])
|
:~ (pull-wire [%backlog (weld path.act /0)])
|
||||||
(pull-wire [%mailbox path.act])
|
(pull-wire [%mailbox path.act])
|
||||||
(delete-permission [%chat path.act])
|
(delete-permission [%chat path.act])
|
||||||
[%give %kick `[%mailbox path.act] ~]~
|
[%give %kick [%mailbox path.act]~ ~]~
|
||||||
==
|
==
|
||||||
?. |(=(u.ship src.bol) (team:title our.bol src.bol))
|
?. |(=(u.ship src.bol) (team:title our.bol src.bol))
|
||||||
:: if neither ship = source or source = us, do nothing
|
:: if neither ship = source or source = us, do nothing
|
||||||
@ -229,7 +229,7 @@
|
|||||||
?: ?&(?=(^ backlog-start) (~(got by allow-history) pas))
|
?: ?&(?=(^ backlog-start) (~(got by allow-history) pas))
|
||||||
(paginate-messages pas u.box u.backlog-start)
|
(paginate-messages pas u.box u.backlog-start)
|
||||||
~
|
~
|
||||||
[%give %kick `[%backlog pax] `src.bol]~
|
[%give %kick [%backlog pax]~ `src.bol]~
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ paginate-messages
|
++ paginate-messages
|
||||||
@ -302,7 +302,7 @@
|
|||||||
:: if ship is not permitted, kick their subscription
|
:: if ship is not permitted, kick their subscription
|
||||||
=/ mail-path
|
=/ mail-path
|
||||||
(oust [(dec (lent t.pax)) (lent t.pax)] `(list @t)`t.pax)
|
(oust [(dec (lent t.pax)) (lent t.pax)] `(list @t)`t.pax)
|
||||||
[%give %kick `[%mailbox mail-path] `ship]~
|
[%give %kick [%mailbox mail-path]~ `ship]~
|
||||||
::
|
::
|
||||||
++ fact-chat-update
|
++ fact-chat-update
|
||||||
|= [wir=wire fact=chat-update]
|
|= [wir=wire fact=chat-update]
|
||||||
@ -327,11 +327,11 @@
|
|||||||
::
|
::
|
||||||
%message
|
%message
|
||||||
:_ state
|
:_ state
|
||||||
[%give %fact `[%mailbox path.fact] %chat-update !>(fact)]~
|
[%give %fact [%mailbox path.fact]~ %chat-update !>(fact)]~
|
||||||
::
|
::
|
||||||
%messages
|
%messages
|
||||||
:_ state
|
:_ state
|
||||||
[%give %fact `[%mailbox path.fact] %chat-update !>(fact)]~
|
[%give %fact [%mailbox path.fact]~ %chat-update !>(fact)]~
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ handle-foreign
|
++ handle-foreign
|
||||||
|
@ -245,7 +245,7 @@
|
|||||||
++ update-subscribers
|
++ update-subscribers
|
||||||
|= [pax=path update=chat-update]
|
|= [pax=path update=chat-update]
|
||||||
^- (list card)
|
^- (list card)
|
||||||
[%give %fact `pax %chat-update !>(update)]~
|
[%give %fact ~[pax] %chat-update !>(update)]~
|
||||||
::
|
::
|
||||||
++ send-diff
|
++ send-diff
|
||||||
|= [pax=path upd=chat-update]
|
|= [pax=path upd=chat-update]
|
||||||
|
@ -239,8 +239,8 @@
|
|||||||
^- (list card)
|
^- (list card)
|
||||||
=/ updates-json (update-to-json upd)
|
=/ updates-json (update-to-json upd)
|
||||||
=/ configs-json (configs-to-json configs-scry)
|
=/ configs-json (configs-to-json configs-scry)
|
||||||
:~ [%give %fact `/primary %json !>(updates-json)]
|
:~ [%give %fact ~[/primary] %json !>(updates-json)]
|
||||||
[%give %fact `/configs %json !>(configs-json)]
|
[%give %fact ~[/configs] %json !>(configs-json)]
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
:: +utilities
|
:: +utilities
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -28,7 +28,7 @@
|
|||||||
++ give-result
|
++ give-result
|
||||||
|= [=the=path =cage]
|
|= [=the=path =cage]
|
||||||
^- card
|
^- card
|
||||||
[%give %fact `the-path cage]
|
[%give %fact ~[the-path] cage]
|
||||||
--
|
--
|
||||||
::
|
::
|
||||||
^- agent:gall
|
^- agent:gall
|
||||||
|
@ -830,7 +830,7 @@
|
|||||||
++ he-diff :: emit update
|
++ he-diff :: emit update
|
||||||
|= fec/sole-effect
|
|= fec/sole-effect
|
||||||
^+ +>
|
^+ +>
|
||||||
(he-card %give %fact `/sole/[id] %sole-effect !>(fec))
|
(he-card %give %fact ~[/sole/[id]] %sole-effect !>(fec))
|
||||||
::
|
::
|
||||||
++ he-stop :: abort work
|
++ he-stop :: abort work
|
||||||
^+ .
|
^+ .
|
||||||
|
@ -337,7 +337,7 @@
|
|||||||
:_ dog(history actual-history)
|
:_ dog(history actual-history)
|
||||||
%+ turn actual-vows
|
%+ turn actual-vows
|
||||||
|= =id:block
|
|= =id:block
|
||||||
[%give %fact `[%logs path] %eth-watcher-diff !>([%disavow id])]
|
[%give %fact [%logs path]~ %eth-watcher-diff !>([%disavow id])]
|
||||||
::
|
::
|
||||||
++ release-logs
|
++ release-logs
|
||||||
|= [=path dog=watchdog]
|
|= [=path dog=watchdog]
|
||||||
@ -362,7 +362,7 @@
|
|||||||
%+ turn loglist
|
%+ turn loglist
|
||||||
|= =event-log:rpc:ethereum
|
|= =event-log:rpc:ethereum
|
||||||
^- card
|
^- card
|
||||||
[%give %fact `[%logs path] %eth-watcher-diff !>([%log event-log])]
|
[%give %fact [%logs path]~ %eth-watcher-diff !>([%log event-log])]
|
||||||
=^ cards-2 dog $(numbers t.numbers)
|
=^ cards-2 dog $(numbers t.numbers)
|
||||||
[(weld cards-1 cards-2) dog]
|
[(weld cards-1 cards-2) dog]
|
||||||
--
|
--
|
||||||
|
@ -126,7 +126,7 @@
|
|||||||
:_ state(synced (~(del by synced.state) path.act))
|
:_ state(synced (~(del by synced.state) path.act))
|
||||||
%+ snoc
|
%+ snoc
|
||||||
(pull-wire group-wire path.act)
|
(pull-wire group-wire path.act)
|
||||||
[%give %kick `[%group path.act] ~]
|
[%give %kick [%group path.act]~ ~]
|
||||||
?: |(=(u.ship src.bol) (team:title our.bol src.bol))
|
?: |(=(u.ship src.bol) (team:title our.bol src.bol))
|
||||||
:: delete a foreign ship's path
|
:: delete a foreign ship's path
|
||||||
=/ group-wire [(scot %p u.ship) %group path.act]
|
=/ group-wire [(scot %p u.ship) %group path.act]
|
||||||
@ -150,7 +150,7 @@
|
|||||||
:_ state(synced (~(del by synced.state) pax.diff))
|
:_ state(synced (~(del by synced.state) pax.diff))
|
||||||
%+ snoc
|
%+ snoc
|
||||||
(update-subscribers [%group pax.diff] diff)
|
(update-subscribers [%group pax.diff] diff)
|
||||||
[%give %kick `[%group pax.diff] ~]
|
[%give %kick [%group pax.diff]~ ~]
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ handle-foreign
|
++ handle-foreign
|
||||||
@ -212,7 +212,7 @@
|
|||||||
++ update-subscribers
|
++ update-subscribers
|
||||||
|= [pax=path diff=group-update]
|
|= [pax=path diff=group-update]
|
||||||
^- (list card)
|
^- (list card)
|
||||||
[%give %fact `pax %group-update !>(diff)]~
|
[%give %fact ~[pax] %group-update !>(diff)]~
|
||||||
::
|
::
|
||||||
++ pull-wire
|
++ pull-wire
|
||||||
|= [wir=wire pax=path]
|
|= [wir=wire pax=path]
|
||||||
|
@ -148,7 +148,7 @@
|
|||||||
++ update-subscribers
|
++ update-subscribers
|
||||||
|= [pax=path act=group-action]
|
|= [pax=path act=group-action]
|
||||||
^- (list card)
|
^- (list card)
|
||||||
[%give %fact `pax %group-update !>(act)]~
|
[%give %fact ~[pax] %group-update !>(act)]~
|
||||||
::
|
::
|
||||||
++ send-diff
|
++ send-diff
|
||||||
|= [pax=path act=group-action]
|
|= [pax=path act=group-action]
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
?: (team:title our.bowl src.bowl)
|
?: (team:title our.bowl src.bowl)
|
||||||
:: outgoing. we must be inviting another ship. send them the invite.
|
:: outgoing. we must be inviting another ship. send them the invite.
|
||||||
::
|
::
|
||||||
?> !(team:title our.bowl ship.invite.act)
|
?> !(team:title our.bowl recipient.invite.act)
|
||||||
[(invite-hook-poke:do recipient.invite.act act)]~
|
[(invite-hook-poke:do recipient.invite.act act)]~
|
||||||
:: else incoming. ensure invitatory exists and invite is not a duplicate.
|
:: else incoming. ensure invitatory exists and invite is not a duplicate.
|
||||||
::
|
::
|
||||||
|
@ -169,7 +169,7 @@
|
|||||||
++ update-subscribers
|
++ update-subscribers
|
||||||
|= [pax=path upd=invite-update]
|
|= [pax=path upd=invite-update]
|
||||||
^- card
|
^- card
|
||||||
[%give %fact `pax %invite-update !>(upd)]
|
[%give %fact ~[pax] %invite-update !>(upd)]
|
||||||
::
|
::
|
||||||
++ send-diff
|
++ send-diff
|
||||||
|= [pax=path upd=invite-update]
|
|= [pax=path upd=invite-update]
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
?> ?=(%invite-update p.cage.sign)
|
?> ?=(%invite-update p.cage.sign)
|
||||||
:~ :*
|
:~ :*
|
||||||
%give %fact
|
%give %fact
|
||||||
`/primary %json
|
~[/primary] %json
|
||||||
!>((update-to-json !<(invite-update q.cage.sign)))
|
!>((update-to-json !<(invite-update q.cage.sign)))
|
||||||
== ==
|
== ==
|
||||||
==
|
==
|
||||||
|
@ -153,7 +153,7 @@
|
|||||||
=/ dat=(unit [json url=@t]) (~(get by data) name)
|
=/ dat=(unit [json url=@t]) (~(get by data) name)
|
||||||
?~ dat [~ this]
|
?~ dat [~ this]
|
||||||
:_ this(data (~(put by data) name [jon url.u.dat]))
|
:_ this(data (~(put by data) name [jon url.u.dat]))
|
||||||
[%give %fact `/main %json !>((frond:enjs:format name jon))]~
|
[%give %fact ~[/main] %json !>((frond:enjs:format name jon))]~
|
||||||
::
|
::
|
||||||
++ on-arvo
|
++ on-arvo
|
||||||
|= [wir=wire sin=sign-arvo]
|
|= [wir=wire sin=sign-arvo]
|
||||||
|
@ -94,7 +94,8 @@
|
|||||||
::
|
::
|
||||||
%fact
|
%fact
|
||||||
=^ cards this (take-export !<(* q.cage.sign))
|
=^ cards this (take-export !<(* q.cage.sign))
|
||||||
:_ this :_ cards
|
:_ this(job.state ~)
|
||||||
|
:_ cards
|
||||||
?> ?=(^ job.state)
|
?> ?=(^ job.state)
|
||||||
?> ?=(%export -.source.com.u.job.state)
|
?> ?=(%export -.source.com.u.job.state)
|
||||||
[%pass /export %agent [our.bowl app.source.com.u.job.state] %leave ~]
|
[%pass /export %agent [our.bowl app.source.com.u.job.state] %leave ~]
|
||||||
@ -135,7 +136,7 @@
|
|||||||
=/ enc (en:base64 octs)
|
=/ enc (en:base64 octs)
|
||||||
(pairs:enjs:format file+s+output data+s+enc ~)
|
(pairs:enjs:format file+s+output data+s+enc ~)
|
||||||
::
|
::
|
||||||
:_ this(job.state ~)
|
:_ this
|
||||||
%+ give-simple-payload:app eyre-id.u.job.state
|
%+ give-simple-payload:app eyre-id.u.job.state
|
||||||
(json-response:gen (json-to-octs jon))
|
(json-response:gen (json-to-octs jon))
|
||||||
::
|
::
|
||||||
|
@ -165,14 +165,14 @@
|
|||||||
++ kick-proxy
|
++ kick-proxy
|
||||||
|= [who=ship =path]
|
|= [who=ship =path]
|
||||||
^- card
|
^- card
|
||||||
[%give %kick `path `who]
|
[%give %kick ~[path] `who]
|
||||||
::
|
::
|
||||||
++ handle-proxy-sign
|
++ handle-proxy-sign
|
||||||
|= [=path =sign:agent:gall]
|
|= [=path =sign:agent:gall]
|
||||||
^- (quip card _state)
|
^- (quip card _state)
|
||||||
?- -.sign
|
?- -.sign
|
||||||
%poke-ack ~|([dap.bowl %unexpected-poke-ack path] !!)
|
%poke-ack ~|([dap.bowl %unexpected-poke-ack path] !!)
|
||||||
%fact [[%give %fact `path cage.sign]~ state]
|
%fact [[%give %fact ~[path] cage.sign]~ state]
|
||||||
%kick [[(proxy-pass-link-store path %watch path)]~ state]
|
%kick [[(proxy-pass-link-store path %watch path)]~ state]
|
||||||
::
|
::
|
||||||
%watch-ack
|
%watch-ack
|
||||||
|
@ -131,7 +131,7 @@
|
|||||||
:_ state
|
:_ state
|
||||||
:_ cards
|
:_ cards
|
||||||
:+ %give %fact
|
:+ %give %fact
|
||||||
:+ `[%local-pages path]
|
:+ [%local-pages path]~
|
||||||
%link-update
|
%link-update
|
||||||
!>([%local-pages path [page]~])
|
!>([%local-pages path [page]~])
|
||||||
:: +hear-submission: record page someone else saved
|
:: +hear-submission: record page someone else saved
|
||||||
@ -154,7 +154,7 @@
|
|||||||
:_ state
|
:_ state
|
||||||
:_ ~
|
:_ ~
|
||||||
:+ %give %fact
|
:+ %give %fact
|
||||||
:+ `[%submissions path]
|
:+ [%submissions path]~
|
||||||
%link-update
|
%link-update
|
||||||
!>([%submissions path [submission]~])
|
!>([%submissions path [submission]~])
|
||||||
::
|
::
|
||||||
|
@ -140,7 +140,7 @@
|
|||||||
==
|
==
|
||||||
:: delete the permission path and its subscriptions from this hook.
|
:: delete the permission path and its subscriptions from this hook.
|
||||||
::
|
::
|
||||||
:- :- [%give %kick `[%permission path.act] ~]
|
:- :- [%give %kick [%permission path.act]~ ~]
|
||||||
(leave-permission path.act)
|
(leave-permission path.act)
|
||||||
%_ state
|
%_ state
|
||||||
synced (~(del by synced) path.act)
|
synced (~(del by synced) path.act)
|
||||||
@ -278,7 +278,7 @@
|
|||||||
^- (list card)
|
^- (list card)
|
||||||
%+ turn ~(tap in access-paths)
|
%+ turn ~(tap in access-paths)
|
||||||
|= access-path=path
|
|= access-path=path
|
||||||
[%give %kick `[%permission access-path] `check-ship]
|
[%give %kick [%permission access-path]~ `check-ship]
|
||||||
::
|
::
|
||||||
++ permission-scry
|
++ permission-scry
|
||||||
|= pax=path
|
|= pax=path
|
||||||
@ -313,7 +313,7 @@
|
|||||||
++ update-subscribers
|
++ update-subscribers
|
||||||
|= [=path upd=permission-update]
|
|= [=path upd=permission-update]
|
||||||
^- card
|
^- card
|
||||||
[%give %fact `path %permission-update !>(upd)]
|
[%give %fact ~[path] %permission-update !>(upd)]
|
||||||
::
|
::
|
||||||
++ leave-permission
|
++ leave-permission
|
||||||
|= =path
|
|= =path
|
||||||
|
@ -184,7 +184,7 @@
|
|||||||
++ update-subscribers
|
++ update-subscribers
|
||||||
|= [pax=path upd=permission-update]
|
|= [pax=path upd=permission-update]
|
||||||
^- (list card)
|
^- (list card)
|
||||||
[%give %fact `pax %permission-update !>(upd)]~
|
[%give %fact ~[pax] %permission-update !>(upd)]~
|
||||||
::
|
::
|
||||||
++ send-diff
|
++ send-diff
|
||||||
|= [pax=path upd=permission-update]
|
|= [pax=path upd=permission-update]
|
||||||
|
@ -730,15 +730,15 @@
|
|||||||
++ affection-primary
|
++ affection-primary
|
||||||
|= del=delta
|
|= del=delta
|
||||||
^- (list card)
|
^- (list card)
|
||||||
[%give %fact `/primary %publish-rumor !>(del)]~
|
[%give %fact ~[/primary] %publish-rumor !>(del)]~
|
||||||
:: +affection: rumors to interested
|
:: +affection: rumors to interested
|
||||||
::
|
::
|
||||||
++ affection
|
++ affection
|
||||||
|= del=delta
|
|= del=delta
|
||||||
^- (list card)
|
^- (list card)
|
||||||
=/ wir=wire /collection/[col.del]
|
=/ wir=wire /collection/[col.del]
|
||||||
:~ [%give %fact `/primary %publish-rumor !>(del)]
|
:~ [%give %fact ~[/primary] %publish-rumor !>(del)]
|
||||||
[%give %fact `wir %publish-rumor !>(del)]
|
[%give %fact ~[wir] %publish-rumor !>(del)]
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ get-post-by-index
|
++ get-post-by-index
|
||||||
@ -1263,7 +1263,7 @@
|
|||||||
=/ upd=update [%invite %.y src.bol coll.act title.act]
|
=/ upd=update [%invite %.y src.bol coll.act title.act]
|
||||||
:_ state
|
:_ state
|
||||||
%+ welp make-tile-moves
|
%+ welp make-tile-moves
|
||||||
[%give %fact `/primary %publish-update !>(upd)]~
|
[%give %fact ~[/primary] %publish-update !>(upd)]~
|
||||||
::
|
::
|
||||||
:: %reject-invite: remove invite from list, acceptance is handled by
|
:: %reject-invite: remove invite from list, acceptance is handled by
|
||||||
:: %subscribe action
|
:: %subscribe action
|
||||||
@ -1276,7 +1276,7 @@
|
|||||||
=/ upd=update [%invite %.n who.act coll.act u.title]
|
=/ upd=update [%invite %.n who.act coll.act u.title]
|
||||||
:_ state
|
:_ state
|
||||||
%+ welp make-tile-moves
|
%+ welp make-tile-moves
|
||||||
[%give %fact `/primary %publish-update !>(upd)]~
|
[%give %fact ~[/primary] %publish-update !>(upd)]~
|
||||||
::
|
::
|
||||||
:: %serve:
|
:: %serve:
|
||||||
::
|
::
|
||||||
@ -1406,7 +1406,7 @@
|
|||||||
[%pass wir %agent [who.act %publish] %watch wir]~
|
[%pass wir %agent [who.act %publish] %watch wir]~
|
||||||
?~ title ~
|
?~ title ~
|
||||||
=/ upd=update [%invite %.n who.act coll.act u.title]
|
=/ upd=update [%invite %.n who.act coll.act u.title]
|
||||||
[%give %fact `/primary %publish-update !>(upd)]~
|
[%give %fact ~[/primary] %publish-update !>(upd)]~
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
:: %unsubscribe: unsub from a foreign blog, delete all state related to it
|
:: %unsubscribe: unsub from a foreign blog, delete all state related to it
|
||||||
@ -1435,7 +1435,7 @@
|
|||||||
:- [%pass wir %agent [who.act %publish] %leave ~]
|
:- [%pass wir %agent [who.act %publish] %leave ~]
|
||||||
%+ welp make-tile-moves
|
%+ welp make-tile-moves
|
||||||
=/ rum=rumor [%remove who.act coll.act ~]
|
=/ rum=rumor [%remove who.act coll.act ~]
|
||||||
[%give %fact `/primary %publish-rumor !>(rum)]~
|
[%give %fact ~[/primary] %publish-rumor !>(rum)]~
|
||||||
::
|
::
|
||||||
:: %read: notify that we've seen a post
|
:: %read: notify that we've seen a post
|
||||||
::
|
::
|
||||||
@ -1445,7 +1445,7 @@
|
|||||||
%+ welp make-tile-moves
|
%+ welp make-tile-moves
|
||||||
::
|
::
|
||||||
=/ upd=update [%unread %.n (sy [who.act coll.act post.act] ~)]
|
=/ upd=update [%unread %.n (sy [who.act coll.act post.act] ~)]
|
||||||
[%give %fact `/primary %publish-update !>(upd)]~
|
[%give %fact ~[/primary] %publish-update !>(upd)]~
|
||||||
::
|
::
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
@ -1597,7 +1597,7 @@
|
|||||||
::
|
::
|
||||||
++ make-tile-moves
|
++ make-tile-moves
|
||||||
^- (list card)
|
^- (list card)
|
||||||
[%give %fact `/publishtile %json !>(make-tile-json)]~
|
[%give %fact ~[/publishtile] %json !>(make-tile-json)]~
|
||||||
::
|
::
|
||||||
++ make-tile-json
|
++ make-tile-json
|
||||||
^- json
|
^- json
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,5 +1,3 @@
|
|||||||
:: Thread manager
|
|
||||||
::
|
|
||||||
/- spider
|
/- spider
|
||||||
/+ libstrand=strand, default-agent, verb
|
/+ libstrand=strand, default-agent, verb
|
||||||
=, strand=strand:libstrand
|
=, strand=strand:libstrand
|
||||||
@ -127,9 +125,6 @@
|
|||||||
|- ^- (quip card _this)
|
|- ^- (quip card _this)
|
||||||
?~ yarns
|
?~ yarns
|
||||||
`this
|
`this
|
||||||
?. ?=([@ ~] i.yarns)
|
|
||||||
$(yarns t.yarns)
|
|
||||||
~| killing=i.yarns
|
|
||||||
=^ cards-1 state
|
=^ cards-1 state
|
||||||
(handle-stop-thread:sc (yarn-to-tid i.yarns) |)
|
(handle-stop-thread:sc (yarn-to-tid i.yarns) |)
|
||||||
=^ cards-2 this
|
=^ cards-2 this
|
||||||
@ -139,8 +134,6 @@
|
|||||||
++ on-poke
|
++ on-poke
|
||||||
|= [=mark =vase]
|
|= [=mark =vase]
|
||||||
^- (quip card _this)
|
^- (quip card _this)
|
||||||
?: ?=(%spider-kill mark)
|
|
||||||
(on-load on-save)
|
|
||||||
=^ cards state
|
=^ cards state
|
||||||
?+ mark (on-poke:def mark vase)
|
?+ mark (on-poke:def mark vase)
|
||||||
%spider-input (on-poke-input:sc !<(input vase))
|
%spider-input (on-poke-input:sc !<(input vase))
|
||||||
@ -357,15 +350,12 @@
|
|||||||
^- ^card
|
^- ^card
|
||||||
?+ card card
|
?+ card card
|
||||||
[%pass * *] [%pass [%thread tid p.card] q.card]
|
[%pass * *] [%pass [%thread tid p.card] q.card]
|
||||||
[%give %fact *]
|
[%give ?(%fact %kick) *]
|
||||||
?~ path.p.card
|
=- card(paths.p -)
|
||||||
card
|
%+ turn paths.p.card
|
||||||
card(path.p `[%thread tid u.path.p.card])
|
|= =path
|
||||||
::
|
^- ^path
|
||||||
[%give %kick *]
|
[%thread tid path]
|
||||||
?~ path.p.card
|
|
||||||
card
|
|
||||||
card(path.p `[%thread tid u.path.p.card])
|
|
||||||
==
|
==
|
||||||
=. cards (weld cards cards.r)
|
=. cards (weld cards cards.r)
|
||||||
=^ final-cards=(list card) state
|
=^ final-cards=(list card) state
|
||||||
@ -391,13 +381,14 @@
|
|||||||
++ thread-say-fail
|
++ thread-say-fail
|
||||||
|= [=tid =term =tang]
|
|= [=tid =term =tang]
|
||||||
^- (list card)
|
^- (list card)
|
||||||
:~ [%give %fact `/thread-result/[tid] %thread-fail !>([term tang])]
|
:~ [%give %fact ~[/thread-result/[tid]] %thread-fail !>([term tang])]
|
||||||
[%give %kick `/thread-result/[tid] ~]
|
[%give %kick ~[/thread-result/[tid]] ~]
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ thread-fail
|
++ thread-fail
|
||||||
|= [=yarn =term =tang]
|
|= [=yarn =term =tang]
|
||||||
^- (quip card ^state)
|
^- (quip card ^state)
|
||||||
|
%- (slog leaf+"strand {<yarn>} failed" leaf+<term> tang)
|
||||||
=/ =tid (yarn-to-tid yarn)
|
=/ =tid (yarn-to-tid yarn)
|
||||||
=/ fail-cards (thread-say-fail tid term tang)
|
=/ fail-cards (thread-say-fail tid term tang)
|
||||||
=^ cards state (thread-clean yarn)
|
=^ cards state (thread-clean yarn)
|
||||||
@ -409,8 +400,8 @@
|
|||||||
:: %- (slog leaf+"strand {<yarn>} finished" (sell vase) ~)
|
:: %- (slog leaf+"strand {<yarn>} finished" (sell vase) ~)
|
||||||
=/ =tid (yarn-to-tid yarn)
|
=/ =tid (yarn-to-tid yarn)
|
||||||
=/ done-cards=(list card)
|
=/ done-cards=(list card)
|
||||||
:~ [%give %fact `/thread-result/[tid] %thread-done vase]
|
:~ [%give %fact ~[/thread-result/[tid]] %thread-done vase]
|
||||||
[%give %kick `/thread-result/[tid] ~]
|
[%give %kick ~[/thread-result/[tid]] ~]
|
||||||
==
|
==
|
||||||
=^ cards state (thread-clean yarn)
|
=^ cards state (thread-clean yarn)
|
||||||
[(weld done-cards cards) state]
|
[(weld done-cards cards) state]
|
||||||
|
@ -135,7 +135,7 @@
|
|||||||
currently+(~(got by p.u.ujon) 'currently')
|
currently+(~(got by p.u.ujon) 'currently')
|
||||||
daily+(~(got by p.u.ujon) 'daily')
|
daily+(~(got by p.u.ujon) 'daily')
|
||||||
==
|
==
|
||||||
:- [%give %fact `/weathertile %json !>(jon)]~
|
:- [%give %fact ~[/weathertile] %json !>(jon)]~
|
||||||
%= state
|
%= state
|
||||||
data jon
|
data jon
|
||||||
time now.bol
|
time now.bol
|
||||||
|
@ -291,7 +291,7 @@
|
|||||||
?~ biz (flop moz)
|
?~ biz (flop moz)
|
||||||
:_ (flop moz)
|
:_ (flop moz)
|
||||||
=/ =dill-blit:dill ?~(t.biz i.biz [%mor (flop biz)])
|
=/ =dill-blit:dill ?~(t.biz i.biz [%mor (flop biz)])
|
||||||
[%give %fact `/drum %dill-blit !>(dill-blit)]
|
[%give %fact ~[/drum] %dill-blit !>(dill-blit)]
|
||||||
::
|
::
|
||||||
++ se-adit :: update servers
|
++ se-adit :: update servers
|
||||||
^+ .
|
^+ .
|
||||||
@ -478,7 +478,7 @@
|
|||||||
::
|
::
|
||||||
++ se-blit-sys :: output to system
|
++ se-blit-sys :: output to system
|
||||||
|= bil/dill-blit:dill ^+ +>
|
|= bil/dill-blit:dill ^+ +>
|
||||||
(se-emit %give %fact `/drum %dill-blit !>(bil))
|
(se-emit %give %fact ~[/drum] %dill-blit !>(bil))
|
||||||
::
|
::
|
||||||
++ se-show :: show buffer, raw
|
++ se-show :: show buffer, raw
|
||||||
|= lin/(pair @ud stub)
|
|= lin/(pair @ud stub)
|
||||||
|
@ -49,9 +49,9 @@
|
|||||||
[%http-response-header !>(response-header.simple-payload)]
|
[%http-response-header !>(response-header.simple-payload)]
|
||||||
=/ data-cage
|
=/ data-cage
|
||||||
[%http-response-data !>(data.simple-payload)]
|
[%http-response-data !>(data.simple-payload)]
|
||||||
:~ [%give %fact `/http-response/[eyre-id] header-cage]
|
:~ [%give %fact ~[/http-response/[eyre-id]] header-cage]
|
||||||
[%give %fact `/http-response/[eyre-id] data-cage]
|
[%give %fact ~[/http-response/[eyre-id]] data-cage]
|
||||||
[%give %kick `/http-response/[eyre-id] ~]
|
[%give %kick ~[/http-response/[eyre-id]] ~]
|
||||||
==
|
==
|
||||||
--
|
--
|
||||||
++ gen
|
++ gen
|
||||||
|
@ -1,55 +1,89 @@
|
|||||||
:: Ames extends Arvo's %pass/%give move semantics across the network.
|
:: Ames extends Arvo's %pass/%give move semantics across the network.
|
||||||
::
|
::
|
||||||
:: A "forward flow" message, which is like a request, is passed to
|
:: Ames receives packets as Arvo events and emits packets as Arvo
|
||||||
:: Ames from a local vane. Ames transmits the message to the peer's
|
:: effects. The runtime is responsible for transferring the bytes in
|
||||||
:: Ames, which passes the message to the destination vane.
|
:: an Ames packet across a physical network to another ship.
|
||||||
::
|
::
|
||||||
:: Once the peer has processed the "forward flow" message, it sends a
|
:: The runtime tells Ames which physical address a packet came from,
|
||||||
:: message acknowledgment over the wire back to the local Ames. This
|
:: represented as an opaque atom. Ames can emit a packet effect to
|
||||||
:: ack can either be positive or negative, in which case we call it a
|
:: one of those opaque atoms or to the Urbit address of a galaxy
|
||||||
:: "nack". (Don't confuse Ames nacks with TCP nacks, which are a
|
:: (root node), which the runtime is responsible for translating to a
|
||||||
:: different concept).
|
:: physical address. One runtime implementation sends UDP packets
|
||||||
|
:: using IPv4 addresses for ships and DNS lookups for galaxies, but
|
||||||
|
:: other implementations may overlay over other kinds of networks.
|
||||||
::
|
::
|
||||||
:: When the local Ames receives either a positive message ack or a
|
:: A local vane can pass Ames a %plea request message. Ames
|
||||||
:: combination of a nack and nack-trace (explained in more detail
|
:: transmits the message over the wire to the peer ship's Ames, which
|
||||||
|
:: passes the message to the destination vane.
|
||||||
|
::
|
||||||
|
:: Once the peer has processed the %plea message, it sends a
|
||||||
|
:: message-acknowledgment packet over the wire back to the local
|
||||||
|
:: Ames. This ack can either be positive to indicate the request was
|
||||||
|
:: processed, or negative to indicate the request failed, in which
|
||||||
|
:: case it's called a "nack". (Don't confuse Ames nacks with TCP
|
||||||
|
:: nacks, which are a different concept).
|
||||||
|
::
|
||||||
|
:: When the local Ames receives either a positive message-ack or a
|
||||||
|
:: combination of a nack and naxplanation (explained in more detail
|
||||||
:: below), it gives an %done move to the local vane that had
|
:: below), it gives an %done move to the local vane that had
|
||||||
:: requested the original "forward flow" message be sent.
|
:: requested the original %plea message be sent.
|
||||||
::
|
::
|
||||||
:: A "backward flow" message, which is similar to a response or a
|
:: A local vane can give Ames zero or more %boon response messages in
|
||||||
:: subscription update, is given to Ames from a local vane. Ames
|
:: response to a %plea, on the same duct that Ames used to pass the
|
||||||
:: transmits the message to the peer's Ames, which gives the message
|
:: %plea to the vane. Ames transmits a %boon over the wire to the
|
||||||
:: to the destination vane.
|
:: peer's Ames, which gives it to the destination vane on the same
|
||||||
|
:: duct the vane had used to pass the original %plea to Ames.
|
||||||
::
|
::
|
||||||
:: Ames will give a %memo to a vane upon hearing the message from a
|
:: %boon messages are acked automatically by the receiver Ames. They
|
||||||
:: remote. This message is a "backward flow" message, forming one of
|
:: cannot be nacked, and Ames only uses the ack internally, without
|
||||||
:: potentially many responses to a "forward flow" message that a
|
:: notifying the client vane that gave Ames the %boon.
|
||||||
:: local vane had passed to our local Ames, and which local Ames had
|
|
||||||
:: relayed to the remote. Ames gives the %memo on the same duct the
|
|
||||||
:: local vane had originally used to pass Ames the "forward flow"
|
|
||||||
:: message.
|
|
||||||
::
|
::
|
||||||
:: Backward flow messages are acked automatically by the receiver.
|
:: If the Arvo event that completed receipt of a %boon message
|
||||||
:: They cannot be nacked, and Ames only uses the ack internally,
|
:: crashes, Ames instead sends the client vane a %lost message
|
||||||
:: without notifying the client vane.
|
:: indicating the %boon was missed.
|
||||||
::
|
::
|
||||||
:: Forward flow messages can be nacked, in which case the peer will
|
:: %plea messages can be nacked, in which case the peer will send
|
||||||
:: send both a message-nack packet and a nack-trace message, which is
|
:: both a message-nack packet and a naxplanation message, which is
|
||||||
:: sent on a special diagnostic flow so as not to interfere with
|
:: sent in a way that does not interfere with normal operation. The
|
||||||
:: normal operation. The nack-trace is sent as a full Ames message,
|
:: naxplanation is sent as a full Ames message, instead of just a
|
||||||
:: instead of just a packet, because the contained error information
|
:: packet, because the contained error information can be arbitrarily
|
||||||
:: can be arbitrarily large.
|
:: large. A naxplanation can only give rise to a positive ack --
|
||||||
|
:: never ack an ack, and never nack a naxplanation.
|
||||||
::
|
::
|
||||||
:: Once the local Ames has received the nack-trace, it knows the peer
|
:: Ames guarantees a total ordering of messages within a "flow",
|
||||||
:: has received the full message and failed to process it. This
|
:: identified in other vanes by a duct and over the wire by a "bone":
|
||||||
:: means if we later hear an ack packet on the failed message, we can
|
:: an opaque number. Each flow has a FIFO queue of %plea requests
|
||||||
:: ignore it.
|
:: from the requesting ship to the responding ship and a FIFO queue
|
||||||
|
:: of %boon's in the other direction.
|
||||||
::
|
::
|
||||||
:: Also, due to Ames's exactly-once delivery semantics, we know that
|
:: Message order across flows is not specified and may vary based on
|
||||||
:: when we receive a nack-trace for message n, we know the peer has
|
:: network conditions.
|
||||||
:: positively acked all messages m+1 through n-1, where m is the last
|
::
|
||||||
:: message for which we heard a nack-trace. If we haven't heard acks
|
:: Ames guarantees that a message will only be delivered once to the
|
||||||
:: on all those messages, we apply positive acks when we hear the
|
:: destination vane.
|
||||||
:: nack-trace.
|
::
|
||||||
|
:: Ames encrypts every message using symmetric-key encryption by
|
||||||
|
:: performing an elliptic curve Diffie-Hellman using our private key
|
||||||
|
:: and the public key of the peer. For ships in the Jael PKI
|
||||||
|
:: (public-key infrastructure), Ames looks up the peer's public key
|
||||||
|
:: from Jael. Comets (128-bit ephemeral addresses) are not
|
||||||
|
:: cryptographic assets and must self-attest over Ames by sending a
|
||||||
|
:: single self-signed packet containing their public key.
|
||||||
|
::
|
||||||
|
:: When a peer suffers a continuity breach, Ames removes all
|
||||||
|
:: messaging state related to it. Ames does not guarantee that all
|
||||||
|
:: messages will be fully delivered to the now-stale peer. From
|
||||||
|
:: Ames's perspective, the newly restarted peer is a new ship.
|
||||||
|
:: Ames's guarantees are not maintained across a breach.
|
||||||
|
::
|
||||||
|
:: A vane can pass Ames a %heed $task to request Ames track a peer's
|
||||||
|
:: responsiveness. If our %boon's to it start backing up locally,
|
||||||
|
:: Ames will give a %clog back to the requesting vane containing the
|
||||||
|
:: unresponsive peer's urbit address. This interaction does not use
|
||||||
|
:: ducts as unique keys. Stop tracking a peer by sending Ames a
|
||||||
|
:: %jilt $task.
|
||||||
|
::
|
||||||
|
:: Debug output can be adjusted using %sift and %spew $task's.
|
||||||
::
|
::
|
||||||
:: protocol-version: current version of the ames wire protocol
|
:: protocol-version: current version of the ames wire protocol
|
||||||
::
|
::
|
||||||
@ -530,7 +564,15 @@
|
|||||||
:: The first bone is 0. They increment by 4, since each flow includes
|
:: The first bone is 0. They increment by 4, since each flow includes
|
||||||
:: a bit for each message determining forward vs. backward and a
|
:: a bit for each message determining forward vs. backward and a
|
||||||
:: second bit for whether the message is on the normal flow or the
|
:: second bit for whether the message is on the normal flow or the
|
||||||
:: associated diagnostic flow (for nack-traces).
|
:: associated diagnostic flow (for naxplanations).
|
||||||
|
::
|
||||||
|
:: The least significant bit of a $bone is:
|
||||||
|
:: 1 if "forward", i.e. we send %plea's on this flow, or
|
||||||
|
:: 0 if "backward", i.e. we receive %plea's on this flow.
|
||||||
|
::
|
||||||
|
:: The second-least significant bit is 1 if the bone is a
|
||||||
|
:: naxplanation bone, and 0 otherwise. Only naxplanation
|
||||||
|
:: messages can be sent on a naxplanation bone, as %boon's.
|
||||||
::
|
::
|
||||||
+$ ossuary
|
+$ ossuary
|
||||||
$: =next=bone
|
$: =next=bone
|
||||||
@ -542,43 +584,40 @@
|
|||||||
:: Messages queue up in |message-pump's .unsent-messages until they
|
:: Messages queue up in |message-pump's .unsent-messages until they
|
||||||
:: can be packetized and fed into |packet-pump for sending. When we
|
:: can be packetized and fed into |packet-pump for sending. When we
|
||||||
:: pop a message off .unsent-messages, we push as many fragments as
|
:: pop a message off .unsent-messages, we push as many fragments as
|
||||||
:: we can into |packet-pump, then place the remaining in
|
:: we can into |packet-pump, which sends every packet it eats.
|
||||||
:: .unsent-fragments.
|
:: Packets rejected by |packet-pump are placed in .unsent-fragments.
|
||||||
::
|
::
|
||||||
:: When we hear a packet ack, we send it to |packet-pump. If we
|
:: When we hear a packet ack, we send it to |packet-pump to be
|
||||||
:: haven't seen it before, |packet-pump reports the fresh ack.
|
:: removed from its queue of unacked packets.
|
||||||
::
|
::
|
||||||
:: When we hear a message ack (positive or negative), we treat that
|
:: When we hear a message ack (positive or negative), we treat that
|
||||||
:: as though all fragments have been acked. If this message is not
|
:: as though all fragments have been acked. If this message is not
|
||||||
:: .current, then it's a future message and .current has not yet been
|
:: .current, then this ack is for a future message and .current has
|
||||||
:: acked, so we place the ack in .queued-message-acks.
|
:: not yet been acked, so we place the ack in .queued-message-acks.
|
||||||
::
|
::
|
||||||
:: If we hear a message ack before we've sent all the
|
:: If we hear a message ack before we've sent all the fragments for
|
||||||
:: fragments for that message, clear .unsent-fragments. If the
|
:: that message, clear .unsent-fragments and have |packet-pump delete
|
||||||
:: message ack was positive, print it out because it indicates the
|
:: all sent fragments from the message. If this early message ack was
|
||||||
:: peer is not behaving properly.
|
:: positive, print it out because it indicates the peer is not
|
||||||
|
:: behaving properly.
|
||||||
::
|
::
|
||||||
:: If the ack is for the current message, emit the message ack,
|
:: If the ack is for the current message, have |packet-pump delete
|
||||||
:: increment .current, and check if this next message is in
|
:: all packets from the message, give the message ack back
|
||||||
:: .queued-message-acks. If it is, emit the message (n)ack,
|
:: to the client vane, increment .current, and check if this next
|
||||||
:: increment .current, and check the next message. Repeat until
|
:: message is in .queued-message-acks. If it is, emit the message
|
||||||
:: .current is not fully acked.
|
:: (n)ack, increment .current, and check the next message. Repeat
|
||||||
::
|
:: until .current is not fully acked.
|
||||||
:: When we hear a message nack, we send it to |packet-pump, which
|
|
||||||
:: deletes all packets from that message. If .current gets nacked,
|
|
||||||
:: clear .unsent-fragments and go into the same flow as when we hear
|
|
||||||
:: the last packet ack on a message.
|
|
||||||
::
|
::
|
||||||
:: The following equation is always true:
|
:: The following equation is always true:
|
||||||
:: .next - .current == number of messages in flight
|
:: .next - .current == number of messages in flight
|
||||||
::
|
::
|
||||||
:: At the end of a task, |message-pump sends a %halt task to
|
:: At the end of a task, |message-pump sends a %halt task to
|
||||||
:: |packet-pump, which can trigger a timer to be set or cleared based
|
:: |packet-pump, which can trigger a timer to be set or cleared based
|
||||||
:: on congestion control calculations. When it fires, the timer will
|
:: on congestion control calculations. When the timer fires, it will
|
||||||
:: generally cause one or more packets to be resent.
|
:: generally cause a packet to be re-sent.
|
||||||
::
|
::
|
||||||
:: Message sequence numbers start at 1 so the first message will be
|
:: Message sequence numbers start at 1 so that the first message will
|
||||||
:: greater than .last-acked.message-sink-state on the receiver.
|
:: be greater than .last-acked.message-sink-state on the receiver.
|
||||||
::
|
::
|
||||||
:: current: sequence number of earliest message sent or being sent
|
:: current: sequence number of earliest message sent or being sent
|
||||||
:: next: sequence number of next message to send
|
:: next: sequence number of next message to send
|
||||||
@ -618,7 +657,14 @@
|
|||||||
:: algorithm. The information signals and their responses are
|
:: algorithm. The information signals and their responses are
|
||||||
:: identical to those of the "NewReno" variant of Reno; the
|
:: identical to those of the "NewReno" variant of Reno; the
|
||||||
:: implementation differs because Ames acknowledgments differ from
|
:: implementation differs because Ames acknowledgments differ from
|
||||||
:: TCP's and because we're using functional data structures.
|
:: TCP's, because this code uses functional data structures, and
|
||||||
|
:: because TCP's sequence numbers reset when a peer becomes
|
||||||
|
:: unresponsive, whereas Ames sequence numbers only change when a
|
||||||
|
:: ship breaches.
|
||||||
|
::
|
||||||
|
:: A deviation from Reno is +fast-resend-after-ack, which re-sends
|
||||||
|
:: timed-out packets when a peer starts responding again after a
|
||||||
|
:: period of unresponsiveness.
|
||||||
::
|
::
|
||||||
:: If .skips reaches 3, we perform a fast retransmit and fast
|
:: If .skips reaches 3, we perform a fast retransmit and fast
|
||||||
:: recovery. This corresponds to Reno's handling of "three duplicate
|
:: recovery. This corresponds to Reno's handling of "three duplicate
|
||||||
@ -697,8 +743,6 @@
|
|||||||
==
|
==
|
||||||
:: $note: request to other vane
|
:: $note: request to other vane
|
||||||
::
|
::
|
||||||
:: TODO: specialize gall interface for subscription management
|
|
||||||
::
|
|
||||||
:: Ames passes a %plea note to another vane when it receives a
|
:: Ames passes a %plea note to another vane when it receives a
|
||||||
:: message on a "forward flow" from a peer, originally passed from
|
:: message on a "forward flow" from a peer, originally passed from
|
||||||
:: one of the peer's vanes to the peer's Ames.
|
:: one of the peer's vanes to the peer's Ames.
|
||||||
@ -729,13 +773,6 @@
|
|||||||
== == ==
|
== == ==
|
||||||
:: $sign: response from other vane
|
:: $sign: response from other vane
|
||||||
::
|
::
|
||||||
:: A vane gives a %boon sign to Ames on a duct on which it had
|
|
||||||
:: previously received a message on a "forward flow". Ames will
|
|
||||||
:: transmit the message to the peer that had originally sent the
|
|
||||||
:: message on the forward flow. The peer's Ames will then give the
|
|
||||||
:: message to the remote vane from which the forward flow message
|
|
||||||
:: originated.
|
|
||||||
::
|
|
||||||
+$ sign
|
+$ sign
|
||||||
$~ [%b %wake ~]
|
$~ [%b %wake ~]
|
||||||
$% $: %b
|
$% $: %b
|
||||||
@ -1126,11 +1163,70 @@
|
|||||||
--
|
--
|
||||||
:: +scry: dereference namespace
|
:: +scry: dereference namespace
|
||||||
::
|
::
|
||||||
|
:: The ones producing vases are expected to be used like this:
|
||||||
|
::
|
||||||
|
:: &tang [(sell .^(vase %a /=peer=/~zod)) ~]
|
||||||
|
::
|
||||||
++ scry
|
++ scry
|
||||||
|= [fur=(unit (set monk)) ren=@tas why=shop syd=desk lot=coin tyl=path]
|
|= [fur=(unit (set monk)) ren=@tas why=shop syd=desk lot=coin tyl=path]
|
||||||
^- (unit (unit cage))
|
^- (unit (unit cage))
|
||||||
|
?. =(lot [%$ %da now]) ~
|
||||||
|
?. =(%$ ren) [~ ~]
|
||||||
|
?. =([%& our] why)
|
||||||
|
[~ ~]
|
||||||
|
?+ syd ~
|
||||||
|
%peer
|
||||||
|
?. ?=([@ ~] tyl) [~ ~]
|
||||||
|
=/ who (slaw %p i.tyl)
|
||||||
|
?~ who [~ ~]
|
||||||
|
=/ per (~(get by peers.ames-state) u.who)
|
||||||
|
=/ res
|
||||||
|
?- per
|
||||||
|
~ %unknown
|
||||||
|
[~ %alien *] %alien
|
||||||
|
[~ %known *]
|
||||||
|
=, u.per
|
||||||
|
:* %known
|
||||||
|
symkeymug=(mug symmetric-key)
|
||||||
|
life=life
|
||||||
|
pubkey=public-key
|
||||||
|
sponsor=sponsor
|
||||||
|
route=route
|
||||||
|
qos=qos
|
||||||
|
ossuary=ossuary
|
||||||
|
snd=~(key by snd)
|
||||||
|
rcv=~(key by rcv)
|
||||||
|
nax=nax
|
||||||
|
heeds=heeds
|
||||||
|
==
|
||||||
|
==
|
||||||
|
``noun+!>(!>(res))
|
||||||
::
|
::
|
||||||
[~ ~]
|
%bones
|
||||||
|
?. ?=([@ ~] tyl) [~ ~]
|
||||||
|
=/ who (slaw %p i.tyl)
|
||||||
|
?~ who [~ ~]
|
||||||
|
=/ per (~(get by peers.ames-state) u.who)
|
||||||
|
?. ?=([~ %known *] per) [~ ~]
|
||||||
|
=/ res
|
||||||
|
=, u.per
|
||||||
|
[snd=~(key by snd) rcv=~(key by rcv)]
|
||||||
|
``noun+!>(res)
|
||||||
|
::
|
||||||
|
%snd-bone
|
||||||
|
?. ?=([@ @ ~] tyl) [~ ~]
|
||||||
|
=/ who (slaw %p i.tyl)
|
||||||
|
?~ who [~ ~]
|
||||||
|
=/ ost (slaw %ud i.t.tyl)
|
||||||
|
?~ ost [~ ~]
|
||||||
|
=/ per (~(get by peers.ames-state) u.who)
|
||||||
|
?. ?=([~ %known *] per) [~ ~]
|
||||||
|
=/ mps (~(get by snd.u.per) u.ost)
|
||||||
|
?~ mps [~ ~]
|
||||||
|
=/ res
|
||||||
|
u.mps
|
||||||
|
``noun+!>(!>(res))
|
||||||
|
==
|
||||||
--
|
--
|
||||||
:: helpers
|
:: helpers
|
||||||
::
|
::
|
||||||
@ -1381,10 +1477,15 @@
|
|||||||
?> =(rcvr-life.shut-packet our-life.channel)
|
?> =(rcvr-life.shut-packet our-life.channel)
|
||||||
:: non-galaxy: update route with heard lane or forwarded lane
|
:: non-galaxy: update route with heard lane or forwarded lane
|
||||||
::
|
::
|
||||||
=? route.peer-state
|
=? route.peer-state
|
||||||
?& !=(%czar (clan:title her.channel))
|
?: =(%czar (clan:title her.channel))
|
||||||
!=([~ %& *] route.peer-state)
|
%.n
|
||||||
==
|
=/ is-old-direct=? ?=([~ %& *] route.peer-state)
|
||||||
|
=/ is-new-direct=? ?=(~ origin.packet)
|
||||||
|
:: old direct takes precedence over new indirect
|
||||||
|
::
|
||||||
|
|(is-new-direct !is-old-direct)
|
||||||
|
::
|
||||||
?~ origin.packet
|
?~ origin.packet
|
||||||
`[direct=%.y lane]
|
`[direct=%.y lane]
|
||||||
`[direct=%.n u.origin.packet]
|
`[direct=%.n u.origin.packet]
|
||||||
@ -1512,6 +1613,7 @@
|
|||||||
::
|
::
|
||||||
:: Abandon all pretense of continuity and delete all messaging state
|
:: Abandon all pretense of continuity and delete all messaging state
|
||||||
:: associated with .ship, including sent and unsent messages.
|
:: associated with .ship, including sent and unsent messages.
|
||||||
|
:: Also cancel all timers related to .ship.
|
||||||
::
|
::
|
||||||
++ on-publ-breach
|
++ on-publ-breach
|
||||||
|= =ship
|
|= =ship
|
||||||
@ -2053,7 +2155,11 @@
|
|||||||
++ send-shut-packet
|
++ send-shut-packet
|
||||||
|= =shut-packet
|
|= =shut-packet
|
||||||
^+ peer-core
|
^+ peer-core
|
||||||
:: swizzle bone just before sending; TODO document
|
:: swizzle last bone bit before sending
|
||||||
|
::
|
||||||
|
:: The peer has the opposite perspective from ours about what
|
||||||
|
:: kind of flow this is (forward/backward), so flip the bit
|
||||||
|
:: here.
|
||||||
::
|
::
|
||||||
=. bone.shut-packet (mix 1 bone.shut-packet)
|
=. bone.shut-packet (mix 1 bone.shut-packet)
|
||||||
::
|
::
|
||||||
@ -2201,7 +2307,7 @@
|
|||||||
:: +on-sink-boon: handle response message received by |message-sink
|
:: +on-sink-boon: handle response message received by |message-sink
|
||||||
::
|
::
|
||||||
:: .bone must be mapped in .ossuary.peer-state, or we crash.
|
:: .bone must be mapped in .ossuary.peer-state, or we crash.
|
||||||
:: This means a malformed message will kill a channel. We
|
:: This means a malformed message will kill a flow. We
|
||||||
:: could change this to a no-op if we had some sort of security
|
:: could change this to a no-op if we had some sort of security
|
||||||
:: reporting.
|
:: reporting.
|
||||||
::
|
::
|
||||||
@ -2491,7 +2597,7 @@
|
|||||||
^+ message-pump
|
^+ message-pump
|
||||||
=/ top-live
|
=/ top-live
|
||||||
(peek:packet-queue:*make-packet-pump live.packet-pump-state.state)
|
(peek:packet-queue:*make-packet-pump live.packet-pump-state.state)
|
||||||
?. |(?=(~ top-live) (gte current.state message-num.key.u.top-live))
|
?. |(?=(~ top-live) (lte current.state message-num.key.u.top-live))
|
||||||
~| [%strange-current current=current.state key.u.top-live]
|
~| [%strange-current current=current.state key.u.top-live]
|
||||||
!!
|
!!
|
||||||
message-pump
|
message-pump
|
||||||
@ -2654,7 +2760,7 @@
|
|||||||
:: +on-hear: handle ack on a live packet
|
:: +on-hear: handle ack on a live packet
|
||||||
::
|
::
|
||||||
:: If the packet was in our queue, delete it and update our
|
:: If the packet was in our queue, delete it and update our
|
||||||
:: metrics. Otherwise, no-op.
|
:: metrics, possibly re-sending skipped packets. Otherwise, no-op.
|
||||||
::
|
::
|
||||||
++ on-hear
|
++ on-hear
|
||||||
|= [=message-num =fragment-num]
|
|= [=message-num =fragment-num]
|
||||||
|
@ -44,12 +44,13 @@
|
|||||||
::
|
::
|
||||||
:: Type of request.
|
:: Type of request.
|
||||||
::
|
::
|
||||||
:: %d produces a set of desks, %p gets file permissions, %u checks for
|
:: %d produces a set of desks, %p gets file permissions, %t gets all paths
|
||||||
:: existence, %v produces a ++dome of all desk data, %w gets @ud and @da
|
:: with the specified prefix, %u checks for existence, %v produces a ++dome
|
||||||
:: variants for the given case, %x gets file contents, %y gets a directory
|
:: of all desk data, %w gets @ud and @da variants for the given case, %x
|
||||||
:: listing, and %z gets a recursive hash of the file contents and children.
|
:: gets file contents, %y gets a directory listing, and %z gets a recursive
|
||||||
|
:: hash of the file contents and children.
|
||||||
::
|
::
|
||||||
:: ++ care ?($d $p $u $v $w $x $y $z)
|
:: ++ care ?($d $p $t $u $v $w $x $y $z)
|
||||||
::
|
::
|
||||||
:: Keeps track of subscribers.
|
:: Keeps track of subscribers.
|
||||||
::
|
::
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
++ state
|
++ state
|
||||||
$: :: state version
|
$: :: state version
|
||||||
::
|
::
|
||||||
%2
|
%3
|
||||||
:: agents by ship
|
:: agents by ship
|
||||||
::
|
::
|
||||||
=agents
|
=agents
|
||||||
@ -904,7 +904,7 @@
|
|||||||
%give
|
%give
|
||||||
=/ =gift:agent p.card
|
=/ =gift:agent p.card
|
||||||
?: ?=(%kick -.gift)
|
?: ?=(%kick -.gift)
|
||||||
=/ ducts=(list duct) (ap-ducts-from-path path.gift ship.gift)
|
=/ ducts=(list duct) (ap-ducts-from-paths paths.gift ship.gift)
|
||||||
%+ turn ducts
|
%+ turn ducts
|
||||||
|= =duct
|
|= =duct
|
||||||
~? &(=(duct system-duct.agents.state) !=(agent-name %hood))
|
~? &(=(duct system-duct.agents.state) !=(agent-name %hood))
|
||||||
@ -914,7 +914,7 @@
|
|||||||
?. ?=(%fact -.gift)
|
?. ?=(%fact -.gift)
|
||||||
[agent-duct %give %unto gift]~
|
[agent-duct %give %unto gift]~
|
||||||
::
|
::
|
||||||
=/ ducts=(list duct) (ap-ducts-from-path path.gift ~)
|
=/ ducts=(list duct) (ap-ducts-from-paths paths.gift ~)
|
||||||
=/ =cage cage.gift
|
=/ =cage cage.gift
|
||||||
%+ turn ducts
|
%+ turn ducts
|
||||||
|= =duct
|
|= =duct
|
||||||
@ -1010,6 +1010,17 @@
|
|||||||
::
|
::
|
||||||
++ ap-agent-core
|
++ ap-agent-core
|
||||||
~(. agent.current-agent ap-construct-bowl)
|
~(. agent.current-agent ap-construct-bowl)
|
||||||
|
:: +ap-ducts-from-paths: get ducts subscribed to paths
|
||||||
|
::
|
||||||
|
++ ap-ducts-from-paths
|
||||||
|
|= [target-paths=(list path) target-ship=(unit ship)]
|
||||||
|
^- (list duct)
|
||||||
|
?: &(?=(~ target-paths) ?=(~ target-ship))
|
||||||
|
~[agent-duct]
|
||||||
|
%- zing
|
||||||
|
%+ turn target-paths
|
||||||
|
|= =path
|
||||||
|
(ap-ducts-from-path `path target-ship)
|
||||||
:: +ap-ducts-from-path: get ducts subscribed to path
|
:: +ap-ducts-from-path: get ducts subscribed to path
|
||||||
::
|
::
|
||||||
++ ap-ducts-from-path
|
++ ap-ducts-from-path
|
||||||
@ -1567,16 +1578,177 @@
|
|||||||
=? all-state ?=(%1 -.all-state)
|
=? all-state ?=(%1 -.all-state)
|
||||||
(state-1-to-2 all-state)
|
(state-1-to-2 all-state)
|
||||||
::
|
::
|
||||||
?> ?=(%2 -.all-state)
|
=? all-state ?=(%2 -.all-state)
|
||||||
|
(state-2-to-3 all-state)
|
||||||
|
::
|
||||||
|
?> ?=(%3 -.all-state)
|
||||||
gall-payload(state all-state)
|
gall-payload(state all-state)
|
||||||
::
|
::
|
||||||
:: +all-state: upgrade path
|
:: +all-state: upgrade path
|
||||||
::
|
::
|
||||||
++ all-state $%(state-0 state-1 ^state)
|
++ all-state $%(state-0 state-1 state-2 ^state)
|
||||||
|
::
|
||||||
|
++ state-2-to-3
|
||||||
|
|= =state-2
|
||||||
|
^- ^state
|
||||||
|
%= state-2
|
||||||
|
- %3
|
||||||
|
running.agents-2
|
||||||
|
%- ~(run by running.agents-2.state-2)
|
||||||
|
|= =running-agent-2
|
||||||
|
^- running-agent
|
||||||
|
%= running-agent-2
|
||||||
|
agent-2 (agent-2-to-3 agent-2.running-agent-2)
|
||||||
|
==
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ agent-2-to-3
|
||||||
|
|= =agent-2
|
||||||
|
^- agent
|
||||||
|
=> |%
|
||||||
|
++ cards-2-to-3
|
||||||
|
|= cards=(list card:^agent-2)
|
||||||
|
^- (list card:agent)
|
||||||
|
%+ turn cards
|
||||||
|
|= =card:^agent-2
|
||||||
|
^- card:agent
|
||||||
|
?. ?=([%give ?(%fact %kick) *] card) card
|
||||||
|
%=(card path.p (drop path.p.card))
|
||||||
|
--
|
||||||
|
|_ =bowl:gall
|
||||||
|
+* this .
|
||||||
|
pass ~(. agent-2 bowl)
|
||||||
|
++ on-init
|
||||||
|
=^ cards agent-2 on-init:pass
|
||||||
|
[(cards-2-to-3 cards) this]
|
||||||
|
::
|
||||||
|
++ on-save
|
||||||
|
on-save:pass
|
||||||
|
::
|
||||||
|
++ on-load
|
||||||
|
|= old-state=vase
|
||||||
|
=^ cards agent-2 (on-load:pass old-state)
|
||||||
|
[(cards-2-to-3 cards) this]
|
||||||
|
::
|
||||||
|
++ on-poke
|
||||||
|
|= [=mark =vase]
|
||||||
|
=^ cards agent-2 (on-poke:pass mark vase)
|
||||||
|
[(cards-2-to-3 cards) this]
|
||||||
|
::
|
||||||
|
++ on-watch
|
||||||
|
|= =path
|
||||||
|
=^ cards agent-2 (on-watch:pass path)
|
||||||
|
[(cards-2-to-3 cards) this]
|
||||||
|
::
|
||||||
|
++ on-leave
|
||||||
|
|= =path
|
||||||
|
=^ cards agent-2 (on-leave:pass path)
|
||||||
|
[(cards-2-to-3 cards) this]
|
||||||
|
::
|
||||||
|
++ on-peek
|
||||||
|
|= =path
|
||||||
|
(on-peek:pass path)
|
||||||
|
::
|
||||||
|
++ on-agent
|
||||||
|
|= [=wire =sign:agent:gall]
|
||||||
|
=^ cards agent-2 (on-agent:pass wire sign)
|
||||||
|
[(cards-2-to-3 cards) this]
|
||||||
|
::
|
||||||
|
++ on-arvo
|
||||||
|
|= [=wire =sign-arvo]
|
||||||
|
=^ cards agent-2 (on-arvo:pass wire sign-arvo)
|
||||||
|
[(cards-2-to-3 cards) this]
|
||||||
|
::
|
||||||
|
++ on-fail
|
||||||
|
|= [=term =tang]
|
||||||
|
=^ cards agent-2 (on-fail:pass term tang)
|
||||||
|
[(cards-2-to-3 cards) this]
|
||||||
|
--
|
||||||
|
::
|
||||||
|
++ state-2
|
||||||
|
$: %2
|
||||||
|
=agents-2
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ agents-2
|
||||||
|
$: system-duct=duct
|
||||||
|
outstanding=(map [wire duct] (qeu remote-request))
|
||||||
|
contacts=(set ship)
|
||||||
|
running=(map term running-agent-2)
|
||||||
|
blocked=(map term blocked)
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ running-agent-2
|
||||||
|
$: cache=worm
|
||||||
|
control-duct=duct
|
||||||
|
live=?
|
||||||
|
=stats
|
||||||
|
=subscribers
|
||||||
|
=agent-2
|
||||||
|
=beak
|
||||||
|
marks=(map duct mark)
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ agent-2
|
||||||
|
=< form
|
||||||
|
|%
|
||||||
|
+$ step (quip card form)
|
||||||
|
+$ card (wind note gift)
|
||||||
|
+$ note note:agent
|
||||||
|
+$ task task:agent
|
||||||
|
+$ sign sign:agent
|
||||||
|
+$ gift
|
||||||
|
$% [%fact path=(unit path) =cage]
|
||||||
|
[%kick path=(unit path) ship=(unit ship)]
|
||||||
|
[%watch-ack p=(unit tang)]
|
||||||
|
[%poke-ack p=(unit tang)]
|
||||||
|
==
|
||||||
|
++ form
|
||||||
|
$_ ^|
|
||||||
|
|_ bowl
|
||||||
|
++ on-init
|
||||||
|
*(quip card _^|(..on-init))
|
||||||
|
::
|
||||||
|
++ on-save
|
||||||
|
*vase
|
||||||
|
::
|
||||||
|
++ on-load
|
||||||
|
|~ old-state=vase
|
||||||
|
*(quip card _^|(..on-init))
|
||||||
|
::
|
||||||
|
++ on-poke
|
||||||
|
|~ [mark vase]
|
||||||
|
*(quip card _^|(..on-init))
|
||||||
|
::
|
||||||
|
++ on-watch
|
||||||
|
|~ path
|
||||||
|
*(quip card _^|(..on-init))
|
||||||
|
::
|
||||||
|
++ on-leave
|
||||||
|
|~ path
|
||||||
|
*(quip card _^|(..on-init))
|
||||||
|
::
|
||||||
|
++ on-peek
|
||||||
|
|~ path
|
||||||
|
*(unit (unit cage))
|
||||||
|
::
|
||||||
|
++ on-agent
|
||||||
|
|~ [wire sign]
|
||||||
|
*(quip card _^|(..on-init))
|
||||||
|
::
|
||||||
|
++ on-arvo
|
||||||
|
|~ [wire sign-arvo]
|
||||||
|
*(quip card _^|(..on-init))
|
||||||
|
::
|
||||||
|
++ on-fail
|
||||||
|
|~ [term tang]
|
||||||
|
*(quip card _^|(..on-init))
|
||||||
|
--
|
||||||
|
--
|
||||||
::
|
::
|
||||||
++ state-1-to-2
|
++ state-1-to-2
|
||||||
|= =state-1
|
|= =state-1
|
||||||
^- ^state
|
^- state-2
|
||||||
%= state-1
|
%= state-1
|
||||||
- %2
|
- %2
|
||||||
+.agents-1 [~ +.agents-1.state-1]
|
+.agents-1 [~ +.agents-1.state-1]
|
||||||
@ -1590,7 +1762,7 @@
|
|||||||
++ agents-1
|
++ agents-1
|
||||||
$: system-duct=duct
|
$: system-duct=duct
|
||||||
contacts=(set ship)
|
contacts=(set ship)
|
||||||
running=(map term running-agent)
|
running=(map term running-agent-2)
|
||||||
blocked=(map term blocked)
|
blocked=(map term blocked)
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
@ -1602,7 +1774,7 @@
|
|||||||
running.agents-0
|
running.agents-0
|
||||||
%- ~(run by running.agents-0.state-0)
|
%- ~(run by running.agents-0.state-0)
|
||||||
|= =running-agent-0
|
|= =running-agent-0
|
||||||
^- running-agent
|
^- running-agent-2
|
||||||
%= running-agent-0
|
%= running-agent-0
|
||||||
agent-0 (agent-0-to-1 agent-0.running-agent-0)
|
agent-0 (agent-0-to-1 agent-0.running-agent-0)
|
||||||
==
|
==
|
||||||
@ -1610,7 +1782,7 @@
|
|||||||
::
|
::
|
||||||
++ agent-0-to-1
|
++ agent-0-to-1
|
||||||
|= =agent-0
|
|= =agent-0
|
||||||
^- agent
|
^- agent-2
|
||||||
|_ =bowl:gall
|
|_ =bowl:gall
|
||||||
+* this .
|
+* this .
|
||||||
pass ~(. agent-0 bowl)
|
pass ~(. agent-0 bowl)
|
||||||
@ -1692,7 +1864,7 @@
|
|||||||
+$ card (wind note gift)
|
+$ card (wind note gift)
|
||||||
+$ note note:agent
|
+$ note note:agent
|
||||||
+$ task task:agent
|
+$ task task:agent
|
||||||
+$ gift gift:agent
|
+$ gift gift:agent-2
|
||||||
+$ sign sign:agent
|
+$ sign sign:agent
|
||||||
++ form
|
++ form
|
||||||
$_ ^|
|
$_ ^|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1887,8 +1887,8 @@
|
|||||||
[%poke-as =mark =cage]
|
[%poke-as =mark =cage]
|
||||||
==
|
==
|
||||||
+$ gift
|
+$ gift
|
||||||
$% [%fact path=(unit path) =cage]
|
$% [%fact paths=(list path) =cage]
|
||||||
[%kick path=(unit path) ship=(unit ship)]
|
[%kick paths=(list path) ship=(unit ship)]
|
||||||
[%watch-ack p=(unit tang)]
|
[%watch-ack p=(unit tang)]
|
||||||
[%poke-ack p=(unit tang)]
|
[%poke-ack p=(unit tang)]
|
||||||
==
|
==
|
||||||
|
@ -120,8 +120,8 @@
|
|||||||
(pure:m ~)
|
(pure:m ~)
|
||||||
=/ =path /(scot %p ship.i.udiffs)
|
=/ =path /(scot %p ship.i.udiffs)
|
||||||
=/ cards
|
=/ cards
|
||||||
:~ [%give %fact `/ %azimuth-udiff !>(i.udiffs)]
|
:~ [%give %fact ~[/] %azimuth-udiff !>(i.udiffs)]
|
||||||
[%give %fact `path %azimuth-udiff !>(i.udiffs)]
|
[%give %fact ~[path] %azimuth-udiff !>(i.udiffs)]
|
||||||
==
|
==
|
||||||
;< ~ bind:m (send-raw-cards:strandio cards)
|
;< ~ bind:m (send-raw-cards:strandio cards)
|
||||||
loop(udiffs t.udiffs)
|
loop(udiffs t.udiffs)
|
||||||
|
@ -99,6 +99,21 @@ h2 {
|
|||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* embeds */
|
||||||
|
.embed-container {
|
||||||
|
position: relative;
|
||||||
|
height: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.embed-container iframe, .embed-container object, .embed-container embed {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
/* responsive */
|
/* responsive */
|
||||||
|
|
||||||
@media all and (max-width: 34.375em) {
|
@media all and (max-width: 34.375em) {
|
||||||
@ -114,6 +129,9 @@ h2 {
|
|||||||
.h-100-minus-96-s {
|
.h-100-minus-96-s {
|
||||||
height: calc(100% - 96px);
|
height: calc(100% - 96px);
|
||||||
}
|
}
|
||||||
|
.embed-container {
|
||||||
|
padding-bottom: 56.25%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (min-width: 34.375em) and (max-width: 46.875em) {
|
@media all and (min-width: 34.375em) and (max-width: 46.875em) {
|
||||||
@ -123,6 +141,9 @@ h2 {
|
|||||||
.h-100-minus-48-m {
|
.h-100-minus-48-m {
|
||||||
height: calc(100% - 48px);
|
height: calc(100% - 48px);
|
||||||
}
|
}
|
||||||
|
.embed-container {
|
||||||
|
padding-bottom: 56.25%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (min-width: 46.875em) and (max-width: 60em) {
|
@media all and (min-width: 46.875em) and (max-width: 60em) {
|
||||||
@ -132,6 +153,9 @@ h2 {
|
|||||||
.h-100-minus-48-l {
|
.h-100-minus-48-l {
|
||||||
height: calc(100% - 48px);
|
height: calc(100% - 48px);
|
||||||
}
|
}
|
||||||
|
.embed-container {
|
||||||
|
padding-bottom: 37.5%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (min-width: 60em) {
|
@media all and (min-width: 60em) {
|
||||||
@ -141,4 +165,52 @@ h2 {
|
|||||||
.h-100-minus-48-xl {
|
.h-100-minus-48-xl {
|
||||||
height: calc(100% - 48px);
|
height: calc(100% - 48px);
|
||||||
}
|
}
|
||||||
|
.embed-container {
|
||||||
|
padding-bottom: 28.125%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* dark */
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
.bg-black-d {
|
||||||
|
background-color: black;
|
||||||
|
}
|
||||||
|
.white-d {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
.gray1-d {
|
||||||
|
color: #4d4d4d;
|
||||||
|
}
|
||||||
|
.gray2-d {
|
||||||
|
color: #7f7f7f;
|
||||||
|
}
|
||||||
|
.gray3-d {
|
||||||
|
color: #b1b2b3;
|
||||||
|
}
|
||||||
|
.gray4-d {
|
||||||
|
color: #e6e6e6;
|
||||||
|
}
|
||||||
|
.bg-gray0-d {
|
||||||
|
background-color: #333;
|
||||||
|
}
|
||||||
|
.b--gray0-d {
|
||||||
|
border-color: #333;
|
||||||
|
}
|
||||||
|
.b--gray2-d {
|
||||||
|
border-color: #7f7f7f;
|
||||||
|
}
|
||||||
|
.bb-d {
|
||||||
|
border-bottom-width: 1px;
|
||||||
|
border-bottom-style: solid;
|
||||||
|
}
|
||||||
|
.invert-d {
|
||||||
|
filter: invert(1);
|
||||||
|
}
|
||||||
|
.o-60-d {
|
||||||
|
opacity: .6;
|
||||||
|
}
|
||||||
|
a {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
}
|
}
|
@ -230,14 +230,15 @@ export class ChatScreen extends Component {
|
|||||||
<Link to="/~chat/">{"⟵ All Chats"}</Link>
|
<Link to="/~chat/">{"⟵ All Chats"}</Link>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
className="pl3 pt2 bb b--gray4 flex relative overflow-x-scroll overflow-x-auto-l overflow-x-auto-xl flex-shrink-0"
|
className={`pl3 pt2 bb b--gray4 b--gray2-d bg-black-d flex relative overflow-x-scroll
|
||||||
|
overflow-x-auto-l overflow-x-auto-xl flex-shrink-0`}
|
||||||
style={{ height: 48 }}>
|
style={{ height: 48 }}>
|
||||||
<SidebarSwitcher
|
<SidebarSwitcher
|
||||||
sidebarShown={this.props.sidebarShown}
|
sidebarShown={this.props.sidebarShown}
|
||||||
popout={this.props.popout}
|
popout={this.props.popout}
|
||||||
/>
|
/>
|
||||||
<Link to={`/~chat/` + isinPopout + `room` + state.station}
|
<Link to={`/~chat/` + isinPopout + `room` + state.station}
|
||||||
className="pt2">
|
className="pt2 white-d">
|
||||||
<h2
|
<h2
|
||||||
className="mono dib f8 fw4 v-top"
|
className="mono dib f8 fw4 v-top"
|
||||||
style={{ width: "max-content" }}>
|
style={{ width: "max-content" }}>
|
||||||
@ -253,7 +254,7 @@ export class ChatScreen extends Component {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
className="overflow-y-scroll pt3 pb2 flex flex-column-reverse"
|
className="overflow-y-scroll bg-black-d pt3 pb2 flex flex-column-reverse"
|
||||||
style={{ height: "100%", resize: "vertical" }}
|
style={{ height: "100%", resize: "vertical" }}
|
||||||
onScroll={this.onScroll}>
|
onScroll={this.onScroll}>
|
||||||
<div
|
<div
|
||||||
|
@ -80,9 +80,9 @@ export class JoinScreen extends Component {
|
|||||||
render() {
|
render() {
|
||||||
const { props } = this;
|
const { props } = this;
|
||||||
|
|
||||||
let joinClasses = "db f9 green2 ba pa2 b--green2 pointer";
|
let joinClasses = "db f9 green2 ba pa2 b--green2 bg-gray0-d pointer";
|
||||||
if ((!this.state.station) || (this.state.station === "/")) {
|
if ((!this.state.station) || (this.state.station === "/")) {
|
||||||
joinClasses = 'db f9 gray2 ba pa2 b--gray3 pointer';
|
joinClasses = 'db f9 gray2 ba pa2 b--gray3 bg-gray0-d pointer';
|
||||||
}
|
}
|
||||||
|
|
||||||
let errElem = (<span />);
|
let errElem = (<span />);
|
||||||
@ -95,7 +95,8 @@ export class JoinScreen extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="h-100 w-100 pa3 pt2 overflow-x-hidden flex flex-column">
|
<div className={`h-100 w-100 pa3 pt2 overflow-x-hidden flex flex-column
|
||||||
|
bg-black-d white-d`}>
|
||||||
<div
|
<div
|
||||||
className="w-100 dn-m dn-l dn-xl inter pt1 pb6 f8">
|
className="w-100 dn-m dn-l dn-xl inter pt1 pb6 f8">
|
||||||
<Link to="/~chat/">{"⟵ All Chats"}</Link>
|
<Link to="/~chat/">{"⟵ All Chats"}</Link>
|
||||||
@ -106,7 +107,7 @@ export class JoinScreen extends Component {
|
|||||||
<p className="f9 gray2 mb4">Chat names use lowercase, hyphens, and slashes.</p>
|
<p className="f9 gray2 mb4">Chat names use lowercase, hyphens, and slashes.</p>
|
||||||
<textarea
|
<textarea
|
||||||
ref={ e => { this.textarea = e; } }
|
ref={ e => { this.textarea = e; } }
|
||||||
className="f7 mono ba b--gray3 pa3 mb2 db"
|
className="f7 mono ba b--gray3 b--gray2-d bg-black-d white-d pa3 mb2 db"
|
||||||
placeholder="~zod/chatroom"
|
placeholder="~zod/chatroom"
|
||||||
spellCheck="false"
|
spellCheck="false"
|
||||||
rows={1}
|
rows={1}
|
||||||
|
@ -175,7 +175,7 @@ export class ChatInput extends Component {
|
|||||||
this.bindShortcuts();
|
this.bindShortcuts();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="pa3 cf flex black bt b--gray4" style={{ flexGrow: 1 }}>
|
<div className="pa3 cf flex black white-d bt b--gray4 b--gray2-d bg-black-d" style={{ flexGrow: 1 }}>
|
||||||
<div
|
<div
|
||||||
className="fl"
|
className="fl"
|
||||||
style={{
|
style={{
|
||||||
@ -185,9 +185,9 @@ export class ChatInput extends Component {
|
|||||||
}}>
|
}}>
|
||||||
<Sigil ship={window.ship} size={24} color="#4330FC" />
|
<Sigil ship={window.ship} size={24} color="#4330FC" />
|
||||||
</div>
|
</div>
|
||||||
<div className="fr h-100 flex" style={{ flexGrow: 1 }}>
|
<div className="fr h-100 flex bg-black-d" style={{ flexGrow: 1 }}>
|
||||||
<textarea
|
<textarea
|
||||||
className={"pl3 bn"}
|
className={"pl3 bn bg-black-d white-d"}
|
||||||
style={{ flexGrow: 1, height: 28, paddingTop: 6, resize: "none" }}
|
style={{ flexGrow: 1, height: 28, paddingTop: 6, resize: "none" }}
|
||||||
autoCapitalize="none"
|
autoCapitalize="none"
|
||||||
autoFocus={(
|
autoFocus={(
|
||||||
|
@ -14,9 +14,9 @@ export class ChatTabBar extends Component {
|
|||||||
|
|
||||||
if (props.location.pathname.includes('/settings')) {
|
if (props.location.pathname.includes('/settings')) {
|
||||||
memColor = 'gray3';
|
memColor = 'gray3';
|
||||||
setColor = 'black';
|
setColor = 'black white-d';
|
||||||
} else if (props.location.pathname.includes('/members')) {
|
} else if (props.location.pathname.includes('/members')) {
|
||||||
memColor = 'black';
|
memColor = 'black white-d';
|
||||||
setColor = 'gray3';
|
setColor = 'gray3';
|
||||||
} else {
|
} else {
|
||||||
memColor = 'gray3';
|
memColor = 'gray3';
|
||||||
@ -55,7 +55,7 @@ export class ChatTabBar extends Component {
|
|||||||
<a href={`/~chat/popout/room` + props.station} target="_blank"
|
<a href={`/~chat/popout/room` + props.station} target="_blank"
|
||||||
className="dib fr">
|
className="dib fr">
|
||||||
<img
|
<img
|
||||||
className={`flex-shrink-0 pr2 dn ` + hidePopoutIcon}
|
className={`flex-shrink-0 pr2 dn invert-d ` + hidePopoutIcon}
|
||||||
src="/~chat/img/popout.png"
|
src="/~chat/img/popout.png"
|
||||||
height="16"
|
height="16"
|
||||||
width="16"/>
|
width="16"/>
|
||||||
|
@ -17,7 +17,7 @@ export class HeaderBar extends Component {
|
|||||||
: "dn db-m db-l db-xl";
|
: "dn db-m db-l db-xl";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`bg-black w-100 justify-between ` + popoutHide}
|
<div className={`bg-black bb-d b--gray2-d w-100 justify-between ` + popoutHide}
|
||||||
style={{ height: 48, padding: 8}}>
|
style={{ height: 48, padding: 8}}>
|
||||||
<a className="db"
|
<a className="db"
|
||||||
style={{ background: '#1A1A1A',
|
style={{ background: '#1A1A1A',
|
||||||
|
@ -16,7 +16,7 @@ export class SidebarSwitcher extends Component {
|
|||||||
api.sidebarToggle();
|
api.sidebarToggle();
|
||||||
}}>
|
}}>
|
||||||
<img
|
<img
|
||||||
className={`pr3 dn ` + popoutSwitcher}
|
className={`pr3 dn invert-d ` + popoutSwitcher}
|
||||||
src={
|
src={
|
||||||
this.props.sidebarShown
|
this.props.sidebarShown
|
||||||
? "/~chat/img/ChatSwitcherLink.png"
|
? "/~chat/img/ChatSwitcherLink.png"
|
||||||
|
@ -80,7 +80,7 @@ export class InviteElement extends Component {
|
|||||||
<div></div>
|
<div></div>
|
||||||
);
|
);
|
||||||
|
|
||||||
let modifyButtonClasses = "db f9 ba pa2 b--black pointer";
|
let modifyButtonClasses = "db f9 ba pa2 white-d bg-gray0-d b--black b--gray2-d pointer";
|
||||||
if (state.error) {
|
if (state.error) {
|
||||||
modifyButtonClasses = modifyButtonClasses + ' gray3';
|
modifyButtonClasses = modifyButtonClasses + ' gray3';
|
||||||
}
|
}
|
||||||
@ -96,7 +96,7 @@ export class InviteElement extends Component {
|
|||||||
<div>
|
<div>
|
||||||
<textarea
|
<textarea
|
||||||
ref={ e => { this.textarea = e; } }
|
ref={ e => { this.textarea = e; } }
|
||||||
className="f7 mono ba b--gray3 pa3 mb4 db w-100"
|
className="f7 mono ba b--gray3 bg-black-d white-d pa3 mb4 db w-100"
|
||||||
style={{
|
style={{
|
||||||
resize: 'none',
|
resize: 'none',
|
||||||
height: 50
|
height: 50
|
||||||
|
@ -16,14 +16,14 @@ export class MemberElement extends Component {
|
|||||||
let actionElem;
|
let actionElem;
|
||||||
if (props.ship === props.owner) {
|
if (props.ship === props.owner) {
|
||||||
actionElem = (
|
actionElem = (
|
||||||
<p className="w-20 dib list-ship black f8 c-default">
|
<p className="w-20 dib list-ship black white-d f8 c-default">
|
||||||
Host
|
Host
|
||||||
</p>
|
</p>
|
||||||
);
|
);
|
||||||
} else if (window.ship !== props.ship && window.ship === props.owner) {
|
} else if (window.ship !== props.ship && window.ship === props.owner) {
|
||||||
actionElem = (
|
actionElem = (
|
||||||
<a onClick={this.onRemove.bind(this)}
|
<a onClick={this.onRemove.bind(this)}
|
||||||
className="w-20 dib list-ship black f8 pointer">
|
className="w-20 dib list-ship black white-d f8 pointer">
|
||||||
Ban
|
Ban
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
@ -38,7 +38,7 @@ export class MemberElement extends Component {
|
|||||||
<Sigil ship={props.ship} size={32} />
|
<Sigil ship={props.ship} size={32} />
|
||||||
<p
|
<p
|
||||||
className={
|
className={
|
||||||
"w-70 mono list-ship dib v-mid black ml2 nowrap f8"
|
"w-70 mono list-ship dib v-mid black white-d ml2 nowrap f8"
|
||||||
}>
|
}>
|
||||||
~{props.ship}
|
~{props.ship}
|
||||||
</p>
|
</p>
|
||||||
|
@ -8,6 +8,21 @@ import _ from 'lodash';
|
|||||||
|
|
||||||
|
|
||||||
export class Message extends Component {
|
export class Message extends Component {
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
this.state = {
|
||||||
|
unfold: false
|
||||||
|
};
|
||||||
|
this.unFoldEmbed = this.unFoldEmbed.bind(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
unFoldEmbed(id) {
|
||||||
|
let unfoldState = this.state.unfold;
|
||||||
|
unfoldState = !unfoldState;
|
||||||
|
this.setState({unfold: unfoldState});
|
||||||
|
let iframe = this.refs.iframe;
|
||||||
|
iframe.setAttribute('src', iframe.getAttribute('data-src'));
|
||||||
|
}
|
||||||
|
|
||||||
renderContent() {
|
renderContent() {
|
||||||
const { props } = this;
|
const { props } = this;
|
||||||
@ -34,10 +49,20 @@ export class Message extends Component {
|
|||||||
let imgMatch =
|
let imgMatch =
|
||||||
/(jpg|img|png|gif|tiff|jpeg|JPG|IMG|PNG|TIFF|GIF|webp|WEBP|webm|WEBM)$/
|
/(jpg|img|png|gif|tiff|jpeg|JPG|IMG|PNG|TIFF|GIF|webp|WEBP|webm|WEBM)$/
|
||||||
.exec(letter.url);
|
.exec(letter.url);
|
||||||
|
// this is jank
|
||||||
|
// TODO do we know ID lenght?
|
||||||
|
let youTubeRegex = new RegExp(''
|
||||||
|
+ /(?:https?:\/\/(?:[a-z]+.)?)/.source // protocol
|
||||||
|
+ /(?:youtu\.?be(?:\.com)?\/)(?:embed\/)?/.source // short and long-links
|
||||||
|
+ /(?:(?:(?:(?:watch\?)?(?:time_continue=(?:[0-9]+))?.+v=)?([a-zA-Z0-9_-]+))(?:\?t\=(?:[0-9a-zA-Z]+))?)/.source // id
|
||||||
|
)
|
||||||
|
let ytMatch =
|
||||||
|
youTubeRegex.exec(letter.url);
|
||||||
let contents = letter.url;
|
let contents = letter.url;
|
||||||
if (imgMatch) {
|
if (imgMatch) {
|
||||||
contents = (
|
contents = (
|
||||||
<img
|
<img
|
||||||
|
className="o-60-d"
|
||||||
src={letter.url}
|
src={letter.url}
|
||||||
style={{
|
style={{
|
||||||
width: "50%",
|
width: "50%",
|
||||||
@ -45,18 +70,58 @@ export class Message extends Component {
|
|||||||
}}
|
}}
|
||||||
></img>
|
></img>
|
||||||
);
|
);
|
||||||
}
|
return (
|
||||||
return (
|
<a className="f7 lh-copy v-top bb word-break-all"
|
||||||
<a className="f7 lh-copy v-top bb b--black word-break-all"
|
href={letter.url}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer">
|
||||||
|
{contents}
|
||||||
|
</a>
|
||||||
|
);
|
||||||
|
} else if (ytMatch) {
|
||||||
|
contents = (
|
||||||
|
<div className={'embed-container mb2 w-100 w-75-l w-50-xl ' +
|
||||||
|
((this.state.unfold === true)
|
||||||
|
? "db"
|
||||||
|
: "dn")}>
|
||||||
|
<iframe
|
||||||
|
ref="iframe"
|
||||||
|
width="560"
|
||||||
|
height="315"
|
||||||
|
data-src={`https://www.youtube.com/embed/${ytMatch[1]}`}
|
||||||
|
frameBorder="0" allow="picture-in-picture, fullscreen">
|
||||||
|
</iframe>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<a href={letter.url}
|
||||||
|
className="f7 lh-copy v-top bb word-break-all"
|
||||||
href={letter.url}
|
href={letter.url}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer">
|
rel="noopener noreferrer">
|
||||||
{contents}
|
{letter.url}
|
||||||
</a>
|
</a>
|
||||||
);
|
<a className="f7 pointer pl2 lh-copy v-top word-break-all"
|
||||||
|
onClick={e => this.unFoldEmbed()}>
|
||||||
|
[embed]
|
||||||
|
</a>
|
||||||
|
{contents}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
return (
|
||||||
|
<a className="f7 lh-copy v-top bb b--black word-break-all"
|
||||||
|
href={letter.url}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer">
|
||||||
|
{contents}
|
||||||
|
</a>
|
||||||
|
);
|
||||||
|
}
|
||||||
} else if ('me' in letter) {
|
} else if ('me' in letter) {
|
||||||
return (
|
return (
|
||||||
<p className='f7 lh-copy v-top'>
|
<p className='f7 i lh-copy v-top'>
|
||||||
{letter.me}
|
{letter.me}
|
||||||
</p>
|
</p>
|
||||||
);
|
);
|
||||||
@ -89,7 +154,7 @@ export class Message extends Component {
|
|||||||
render() {
|
render() {
|
||||||
const { props } = this;
|
const { props } = this;
|
||||||
let pending = !!props.msg.pending ? ' o-40' : '';
|
let pending = !!props.msg.pending ? ' o-40' : '';
|
||||||
let datestamp = "~" + moment.unix(props.msg.when / 1000).format('YYYY.MM.D');
|
let datestamp = "~" + moment.unix(props.msg.when / 1000).format('YYYY.M.D');
|
||||||
|
|
||||||
let paddingTop = props.paddingTop ? {'paddingTop': '6px'} : '';
|
let paddingTop = props.paddingTop ? {'paddingTop': '6px'} : '';
|
||||||
|
|
||||||
@ -115,15 +180,15 @@ export class Message extends Component {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
className="fr clamp-message"
|
className="fr clamp-message white-d"
|
||||||
style={{ flexGrow: 1, marginTop: -8 }}>
|
style={{ flexGrow: 1, marginTop: -8 }}>
|
||||||
<div className="hide-child" style={paddingTop}>
|
<div className="hide-child" style={paddingTop}>
|
||||||
<p className="v-mid mono f9 gray dib mr3">
|
<p className="v-mid mono f9 gray2 dib mr3">
|
||||||
{props.msg.author.slice(0, 1) === "~" ? "" : "~"}
|
{props.msg.author.slice(0, 1) === "~" ? "" : "~"}
|
||||||
{props.msg.author}
|
{props.msg.author}
|
||||||
</p>
|
</p>
|
||||||
<p className="v-mid mono f9 gray dib">{timestamp}</p>
|
<p className="v-mid mono f9 gray2 dib">{timestamp}</p>
|
||||||
<p className="v-mid mono f9 ml2 gray dib child dn-s">{datestamp}</p>
|
<p className="v-mid mono f9 ml2 gray2 dib child dn-s">{datestamp}</p>
|
||||||
</div>
|
</div>
|
||||||
{this.renderContent()}
|
{this.renderContent()}
|
||||||
</div>
|
</div>
|
||||||
@ -138,9 +203,9 @@ export class Message extends Component {
|
|||||||
style={{
|
style={{
|
||||||
minHeight: "min-content"
|
minHeight: "min-content"
|
||||||
}}>
|
}}>
|
||||||
<p className="child pt2 pl2 pr1 mono f9 gray dib">{timestamp}</p>
|
<p className="child pt2 pl2 pr1 mono f9 gray2 dib">{timestamp}</p>
|
||||||
<div className="fr f7 clamp-message" style={{ flexGrow: 1 }}>
|
<div className="fr f7 clamp-message white-d pr3" style={{ flexGrow: 1 }}>
|
||||||
{this.renderContent()}
|
{this.renderContent()}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -18,7 +18,7 @@ export class SidebarInvite extends Component {
|
|||||||
return (
|
return (
|
||||||
<div className='pa3'>
|
<div className='pa3'>
|
||||||
<div className='w-100 v-mid'>
|
<div className='w-100 v-mid'>
|
||||||
<p className="dib f8 mono">
|
<p className="dib f8 mono gray4-d">
|
||||||
{props.invite.text}
|
{props.invite.text}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -28,7 +28,7 @@ export class SidebarInvite extends Component {
|
|||||||
Accept Invite
|
Accept Invite
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
className="dib pointer ml4 pa2 f9 bg-black white mt4"
|
className="dib pointer ml4 pa2 f9 bg-black bg-gray0-d white mt4"
|
||||||
onClick={this.onDecline.bind(this)}>
|
onClick={this.onDecline.bind(this)}>
|
||||||
Decline
|
Decline
|
||||||
</a>
|
</a>
|
||||||
|
@ -58,15 +58,15 @@ export class SidebarItem extends Component {
|
|||||||
|
|
||||||
let description = this.getLetter(props.description);
|
let description = this.getLetter(props.description);
|
||||||
|
|
||||||
let selectedCss = !!props.selected ? 'bg-gray5' : 'bg-white pointer';
|
let selectedCss = !!props.selected ? 'bg-gray5 bg-gray0-d gray3-d' : 'bg-white bg-black-d gray3-d pointer';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={"z1 pa3 pt4 pb4 bb b--gray4 " + selectedCss}
|
className={"z1 pa3 pt4 pb4 bb b--gray4 b--gray2-d " + selectedCss}
|
||||||
onClick={this.onClick.bind(this)}>
|
onClick={this.onClick.bind(this)}>
|
||||||
<div className="w-100 v-mid">
|
<div className="w-100 v-mid">
|
||||||
<p className={"dib mono f8 " + unreadElem }>
|
<p className={"dib mono f8 " + unreadElem }>
|
||||||
<span className={(unreadElem === "") ? "gray3" : ""}>
|
<span className={(unreadElem === "") ? "gray3 gray2-d" : ""}>
|
||||||
{title.substr(0, title.indexOf("/"))}/
|
{title.substr(0, title.indexOf("/"))}/
|
||||||
</span>
|
</span>
|
||||||
{title.substr(title.indexOf("/") + 1)}
|
{title.substr(title.indexOf("/") + 1)}
|
||||||
|
@ -76,21 +76,21 @@ export class MemberScreen extends Component {
|
|||||||
let isinPopout = this.props.popout ? "popout/" : "";
|
let isinPopout = this.props.popout ? "popout/" : "";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="h-100 w-100 overflow-x-hidden flex flex-column">
|
<div className="h-100 w-100 overflow-x-hidden flex flex-column white-d">
|
||||||
<div
|
<div
|
||||||
className="w-100 dn-m dn-l dn-xl inter pt4 pb6 pl3 f8"
|
className="w-100 dn-m dn-l dn-xl inter pt4 pb6 pl3 f8"
|
||||||
style={{ height: "1rem" }}>
|
style={{ height: "1rem" }}>
|
||||||
<Link to="/~chat/">{"⟵ All Chats"}</Link>
|
<Link to="/~chat/">{"⟵ All Chats"}</Link>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
className="pl3 pt2 bb b--gray4 flex relative overflow-x-scroll overflow-x-auto-l overflow-x-auto-xl flex-shrink-0"
|
className="pl3 pt2 bb b--gray4 b--gray2-d bg-black-d flex relative overflow-x-scroll overflow-x-auto-l overflow-x-auto-xl flex-shrink-0"
|
||||||
style={{ height: 48 }}>
|
style={{ height: 48 }}>
|
||||||
<SidebarSwitcher
|
<SidebarSwitcher
|
||||||
sidebarShown={this.props.sidebarShown}
|
sidebarShown={this.props.sidebarShown}
|
||||||
popout={this.props.popout}
|
popout={this.props.popout}
|
||||||
/>
|
/>
|
||||||
<Link to={`/~chat/` + isinPopout + `room` + state.station}
|
<Link to={`/~chat/` + isinPopout + `room` + state.station}
|
||||||
className="pt2">
|
className="pt2 white-d">
|
||||||
<h2
|
<h2
|
||||||
className="mono dib f8 fw4 v-top"
|
className="mono dib f8 fw4 v-top"
|
||||||
style={{ width: "max-content" }}>
|
style={{ width: "max-content" }}>
|
||||||
|
@ -168,9 +168,9 @@ export class NewScreen extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let createClasses = "pointer db f9 green2 ba pa2 b--green2";
|
let createClasses = "pointer db f9 green2 bg-gray0-d ba pa2 b--green2";
|
||||||
if (!this.state.idName) {
|
if (!this.state.idName) {
|
||||||
createClasses = 'pointer db f9 gray2 ba pa2 b--gray3';
|
createClasses = 'pointer db f9 gray2 ba bg-gray0-d pa2 b--gray3';
|
||||||
}
|
}
|
||||||
|
|
||||||
let idErrElem = (<span />);
|
let idErrElem = (<span />);
|
||||||
@ -192,7 +192,8 @@ export class NewScreen extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="h-100 w-100 w-50-l w-50-xl pa3 pt2 overflow-x-hidden flex flex-column">
|
<div className={`h-100 w-100 w-50-l w-50-xl pa3 pt2 overflow-x-hidden
|
||||||
|
bg-black-d white-d flex flex-column`}>
|
||||||
<div className="w-100 dn-m dn-l dn-xl inter pt1 pb6 f8">
|
<div className="w-100 dn-m dn-l dn-xl inter pt1 pb6 f8">
|
||||||
<Link to="/~chat/">{"⟵ All Chats"}</Link>
|
<Link to="/~chat/">{"⟵ All Chats"}</Link>
|
||||||
</div>
|
</div>
|
||||||
@ -203,7 +204,7 @@ export class NewScreen extends Component {
|
|||||||
Lowercase alphanumeric characters, dashes, and slashes only
|
Lowercase alphanumeric characters, dashes, and slashes only
|
||||||
</p>
|
</p>
|
||||||
<textarea
|
<textarea
|
||||||
className="f7 ba b--gray3 pa3 db w-100"
|
className="f7 ba b--gray3 b--gray2-d bg-black-d white-d pa3 db w-100"
|
||||||
placeholder="secret-chat"
|
placeholder="secret-chat"
|
||||||
rows={1}
|
rows={1}
|
||||||
style={{
|
style={{
|
||||||
@ -216,7 +217,7 @@ export class NewScreen extends Component {
|
|||||||
<div className="dropdown relative">
|
<div className="dropdown relative">
|
||||||
<select
|
<select
|
||||||
style={{WebkitAppearance: "none"}}
|
style={{WebkitAppearance: "none"}}
|
||||||
className="pa3 f8 bg-white br0 w-100 inter"
|
className="pa3 f8 bg-white bg-black-d white-d br0 w-100 inter"
|
||||||
value={this.state.securityValue}
|
value={this.state.securityValue}
|
||||||
onChange={this.securityChange}>
|
onChange={this.securityChange}>
|
||||||
<option value="village">Village</option>
|
<option value="village">Village</option>
|
||||||
@ -232,7 +233,7 @@ export class NewScreen extends Component {
|
|||||||
</p>
|
</p>
|
||||||
<textarea
|
<textarea
|
||||||
ref={e => { this.textarea = e; }}
|
ref={e => { this.textarea = e; }}
|
||||||
className="f7 mono ba b--gray3 pa3 mb4 db w-100"
|
className="f7 mono ba b--gray3 b--gray2-d bg-black-d white-d pa3 mb4 db w-100"
|
||||||
placeholder="~zod, ~bus"
|
placeholder="~zod, ~bus"
|
||||||
spellCheck="false"
|
spellCheck="false"
|
||||||
style={{
|
style={{
|
||||||
|
@ -49,7 +49,7 @@ export class SettingsScreen extends Component {
|
|||||||
|
|
||||||
let chatOwner = (deSig(props.match.params.ship) === window.ship);
|
let chatOwner = (deSig(props.match.params.ship) === window.ship);
|
||||||
|
|
||||||
let deleteButtonClasses = (chatOwner) ? 'b--red2 red2 pointer' : 'b--grey3 grey3 c-default';
|
let deleteButtonClasses = (chatOwner) ? 'b--red2 red2 pointer bg-gray0-d' : 'b--grey3 grey3 bg-gray0-d c-default';
|
||||||
let leaveButtonClasses = (!chatOwner) ? "pointer" : "c-default";
|
let leaveButtonClasses = (!chatOwner) ? "pointer" : "c-default";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -58,7 +58,7 @@ export class SettingsScreen extends Component {
|
|||||||
<p className="f8 mt3 lh-copy db">Leave Chat</p>
|
<p className="f8 mt3 lh-copy db">Leave Chat</p>
|
||||||
<p className="f9 gray2 db mb4">Remove this chat from your chat list. You will need to request for access again.</p>
|
<p className="f9 gray2 db mb4">Remove this chat from your chat list. You will need to request for access again.</p>
|
||||||
<a onClick={(!chatOwner) ? this.deleteChat.bind(this) : null}
|
<a onClick={(!chatOwner) ? this.deleteChat.bind(this) : null}
|
||||||
className={"dib f9 black ba pa2 b--black " + leaveButtonClasses}>Leave this chat</a>
|
className={"dib f9 black gray4-d bg-gray0-d ba pa2 b--black b--gray2-d " + leaveButtonClasses}>Leave this chat</a>
|
||||||
</div>
|
</div>
|
||||||
<div className={"w-100 fl mt3 " + ((!chatOwner) ? 'o-30' : '')}>
|
<div className={"w-100 fl mt3 " + ((!chatOwner) ? 'o-30' : '')}>
|
||||||
<p className="f8 mt3 lh-copy db">Delete Chat</p>
|
<p className="f8 mt3 lh-copy db">Delete Chat</p>
|
||||||
@ -83,21 +83,21 @@ export class SettingsScreen extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="h-100 w-100 overflow-x-hidden flex flex-column">
|
<div className="h-100 w-100 overflow-x-hidden flex flex-column white-d">
|
||||||
<div
|
<div
|
||||||
className="w-100 dn-m dn-l dn-xl inter pt4 pb6 pl3 f8"
|
className="w-100 dn-m dn-l dn-xl inter pt4 pb6 pl3 f8"
|
||||||
style={{ height: "1rem" }}>
|
style={{ height: "1rem" }}>
|
||||||
<Link to="/~chat/">{"⟵ All Chats"}</Link>
|
<Link to="/~chat/">{"⟵ All Chats"}</Link>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
className="pl3 pt2 bb b--gray4 flex relative overflow-x-scroll overflow-x-auto-l overflow-x-auto-xl flex-shrink-0"
|
className="pl3 pt2 bb b--gray4 b--gray2-d bg-black-d flex relative overflow-x-scroll overflow-x-auto-l overflow-x-auto-xl flex-shrink-0"
|
||||||
style={{ height: 48 }}>
|
style={{ height: 48 }}>
|
||||||
<SidebarSwitcher
|
<SidebarSwitcher
|
||||||
sidebarShown={this.props.sidebarShown}
|
sidebarShown={this.props.sidebarShown}
|
||||||
popout={this.props.popout}
|
popout={this.props.popout}
|
||||||
/>
|
/>
|
||||||
<Link to={`/~chat/` + isinPopout + `room` + state.station}
|
<Link to={`/~chat/` + isinPopout + `room` + state.station}
|
||||||
className="pt2">
|
className="pt2 white-d">
|
||||||
<h2
|
<h2
|
||||||
className="mono dib f8 fw4 v-top"
|
className="mono dib f8 fw4 v-top"
|
||||||
style={{ width: "max-content" }}>
|
style={{ width: "max-content" }}>
|
||||||
@ -118,7 +118,7 @@ export class SettingsScreen extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="h-100 w-100 overflow-x-hidden flex flex-column">
|
<div className="h-100 w-100 overflow-x-hidden flex flex-column white-d">
|
||||||
<div
|
<div
|
||||||
className="w-100 dn-m dn-l dn-xl inter pt4 pb6 pl3 f8"
|
className="w-100 dn-m dn-l dn-xl inter pt4 pb6 pl3 f8"
|
||||||
style={{ height: "1rem" }}>
|
style={{ height: "1rem" }}>
|
||||||
|
@ -71,18 +71,19 @@ export class Sidebar extends Component {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="h-100-minus-96-s h-100 w-100 overflow-x-hidden flex flex-column relative z1">
|
<div className={`h-100-minus-96-s h-100 w-100 overflow-x-hidden flex
|
||||||
|
bg-black-d flex-column relative z1`}>
|
||||||
<div className="overflow-y-auto h-100">
|
<div className="overflow-y-auto h-100">
|
||||||
{sidebarInvites}
|
{sidebarInvites}
|
||||||
{sidebarItems}
|
{sidebarItems}
|
||||||
</div>
|
</div>
|
||||||
<div className="absolute z2 tc w-100 bg-transparent"
|
<div className="absolute z2 tc w-100 bg-transparent"
|
||||||
style={{ bottom: 10 }}>
|
style={{ bottom: 10 }}>
|
||||||
<a className="dib f9 pa3 bt bb bl br tc pointer bg-white"
|
<a className="dib f9 pa3 bt bb bl br tc pointer bg-white bg-gray0-d gray4-d b--gray2-d"
|
||||||
onClick={this.onClickNew.bind(this)}>
|
onClick={this.onClickNew.bind(this)}>
|
||||||
Create New Chat
|
Create New Chat
|
||||||
</a>
|
</a>
|
||||||
<a className="dib f9 pa3 bt bb br tl pointer bg-white"
|
<a className="dib f9 pa3 bt bb br tl pointer bg-white bg-gray0-d gray4-d b--gray2-d"
|
||||||
onClick={this.onClickJoin.bind(this)}>
|
onClick={this.onClickJoin.bind(this)}>
|
||||||
Join Existing Chat
|
Join Existing Chat
|
||||||
</a>
|
</a>
|
||||||
|
@ -19,7 +19,7 @@ export class Skeleton extends Component {
|
|||||||
: "";
|
: "";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="h-100 w-100 absolute">
|
<div className="h-100 w-100 absolute bg-black-d">
|
||||||
<HeaderBar spinner={this.props.spinner} popout={this.props.popout} />
|
<HeaderBar spinner={this.props.spinner} popout={this.props.popout} />
|
||||||
<div className={`cf w-100 absolute flex ` +
|
<div className={`cf w-100 absolute flex ` +
|
||||||
((this.props.chatHideonMobile)
|
((this.props.chatHideonMobile)
|
||||||
@ -29,7 +29,7 @@ export class Skeleton extends Component {
|
|||||||
? "h-100"
|
? "h-100"
|
||||||
: "h-100-minus-48-m h-100-minus-48-l h-100-minus-48-xl")}>
|
: "h-100-minus-48-m h-100-minus-48-l h-100-minus-48-xl")}>
|
||||||
<div className={
|
<div className={
|
||||||
`fl h-100 br b--gray4 overflow-x-hidden
|
`fl h-100 br b--gray4 b--gray2-d overflow-x-hidden
|
||||||
flex-basis-full-s flex-basis-300-m flex-basis-300-l
|
flex-basis-full-s flex-basis-300-m flex-basis-300-l
|
||||||
flex-basis-300-xl ` +
|
flex-basis-300-xl ` +
|
||||||
sidebarHide + " " +
|
sidebarHide + " " +
|
||||||
@ -43,7 +43,7 @@ export class Skeleton extends Component {
|
|||||||
<a className="pl3 pb6" href="/">
|
<a className="pl3 pb6" href="/">
|
||||||
{"⟵ Landscape"}
|
{"⟵ Landscape"}
|
||||||
</a>
|
</a>
|
||||||
<div className="bb b--gray4 inter f8 pl3 pt6 pb3">All Chats</div>
|
<div className="bb b--gray4 white-d inter f8 pl3 pt6 pb3">All Chats</div>
|
||||||
</div>
|
</div>
|
||||||
{this.props.sidebar}
|
{this.props.sidebar}
|
||||||
</div>
|
</div>
|
||||||
|
@ -19,7 +19,8 @@ export class Input extends Component {
|
|||||||
let ignoredKeys = ["Meta", "Alt", "Control", "Escape", "Shift",
|
let ignoredKeys = ["Meta", "Alt", "Control", "Escape", "Shift",
|
||||||
"F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8",
|
"F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8",
|
||||||
"F9", "F10", "F11", "F12", "Backspace", "Unidentified",
|
"F9", "F10", "F11", "F12", "Backspace", "Unidentified",
|
||||||
"Delete", "Insert", "Home", "PageUp", "PageDown", "End"
|
"Delete", "Insert", "Home", "PageUp", "PageDown", "End",
|
||||||
|
"Dead"
|
||||||
];
|
];
|
||||||
|
|
||||||
// submit on enter
|
// submit on enter
|
||||||
|
@ -33,7 +33,12 @@ CFLAGS := $(CFLAGS)
|
|||||||
all: $(all_exes)
|
all: $(all_exes)
|
||||||
|
|
||||||
test: $(test_exes)
|
test: $(test_exes)
|
||||||
for x in $^; do echo "\n$$x" && ./$$x; done
|
@FAIL=0; \
|
||||||
|
for x in $^; \
|
||||||
|
do echo "\n$$x" && ./$$x; \
|
||||||
|
if [ $$? != 0 ]; then FAIL=1; fi; \
|
||||||
|
done; \
|
||||||
|
if [ $$FAIL != 0 ]; then echo "\n" && exit 1; fi;
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f ./tags $(all_objs) $(all_exes)
|
rm -f ./tags $(all_objs) $(all_exes)
|
||||||
|
@ -13,6 +13,9 @@
|
|||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
#include <ncurses/term.h>
|
#include <ncurses/term.h>
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
|
#include <openssl/conf.h>
|
||||||
|
#include <openssl/engine.h>
|
||||||
|
#include <openssl/err.h>
|
||||||
#include <openssl/ssl.h>
|
#include <openssl/ssl.h>
|
||||||
#include <h2o.h>
|
#include <h2o.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
@ -744,12 +747,38 @@ main(c3_i argc,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize OpenSSL for client and server
|
// Initialize OpenSSL for client and server
|
||||||
*/
|
//
|
||||||
SSL_library_init();
|
{
|
||||||
SSL_load_error_strings();
|
SSL_library_init();
|
||||||
|
SSL_load_error_strings();
|
||||||
|
}
|
||||||
|
|
||||||
|
// initialize curl
|
||||||
|
//
|
||||||
|
if ( 0 != curl_global_init(CURL_GLOBAL_DEFAULT) ) {
|
||||||
|
u3l_log("boot: curl initialization failed\r\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
u3_daemon_commence();
|
u3_daemon_commence();
|
||||||
|
|
||||||
|
// uninitialize curl
|
||||||
|
//
|
||||||
|
curl_global_cleanup();
|
||||||
|
|
||||||
|
// uninitialize OpenSSL
|
||||||
|
//
|
||||||
|
// see https://wiki.openssl.org/index.php/Library_Initialization
|
||||||
|
//
|
||||||
|
{
|
||||||
|
ENGINE_cleanup();
|
||||||
|
CONF_modules_unload(1);
|
||||||
|
EVP_cleanup();
|
||||||
|
CRYPTO_cleanup_all_ex_data();
|
||||||
|
SSL_COMP_free_compression_methods();
|
||||||
|
ERR_free_strings();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -17,16 +17,27 @@
|
|||||||
**/
|
**/
|
||||||
/* Assert. Good to capture.
|
/* Assert. Good to capture.
|
||||||
*/
|
*/
|
||||||
# define c3_assert(x) \
|
|
||||||
do { \
|
# if defined(ASAN_ENABLED) && defined(__clang__)
|
||||||
if (!(x)) { \
|
# define c3_assert(x) \
|
||||||
fprintf(stderr, "\rAssertion '%s' " \
|
do { \
|
||||||
"failed in %s:%d\n", \
|
if (!(x)) { \
|
||||||
#x, __FILE__, __LINE__); \
|
c3_cooked(); \
|
||||||
c3_cooked(); \
|
assert(x); \
|
||||||
assert(x); \
|
} \
|
||||||
} \
|
} while(0)
|
||||||
} while(0)
|
# else
|
||||||
|
# define c3_assert(x) \
|
||||||
|
do { \
|
||||||
|
if (!(x)) { \
|
||||||
|
fprintf(stderr, "\rAssertion '%s' " \
|
||||||
|
"failed in %s:%d\n", \
|
||||||
|
#x, __FILE__, __LINE__); \
|
||||||
|
c3_cooked(); \
|
||||||
|
assert(x); \
|
||||||
|
} \
|
||||||
|
} while(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Stub.
|
/* Stub.
|
||||||
*/
|
*/
|
||||||
|
@ -74,14 +74,29 @@
|
|||||||
|
|
||||||
# else
|
# else
|
||||||
#error "port: headers"
|
#error "port: headers"
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# ifndef __has_feature
|
||||||
|
# define __has_feature(x) 0
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# if __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__)
|
||||||
|
# define ASAN_ENABLED
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
/** Address space layout.
|
/** Address space layout.
|
||||||
**/
|
**/
|
||||||
# if defined(U3_OS_linux)
|
# if defined(U3_OS_linux)
|
||||||
# define U3_OS_LoomBase 0x36000000
|
# ifdef __LP64__
|
||||||
# define U3_OS_LoomBits 29 // ie, 2^29 words == 2GB
|
# ifdef ASAN_ENABLED
|
||||||
|
# define U3_OS_LoomBase 0x10007ffff000
|
||||||
|
# else
|
||||||
|
# define U3_OS_LoomBase 0x200000000
|
||||||
|
# endif
|
||||||
|
# else
|
||||||
|
# define U3_OS_LoomBase 0x36000000
|
||||||
|
# endif
|
||||||
|
# define U3_OS_LoomBits 29 // ie, 2^29 words == 2GB
|
||||||
# elif defined(U3_OS_osx)
|
# elif defined(U3_OS_osx)
|
||||||
# ifdef __LP64__
|
# ifdef __LP64__
|
||||||
# define U3_OS_LoomBase 0x200000000
|
# define U3_OS_LoomBase 0x200000000
|
||||||
|
@ -231,7 +231,8 @@
|
|||||||
*/
|
*/
|
||||||
typedef struct _u3_cttp {
|
typedef struct _u3_cttp {
|
||||||
u3_creq* ceq_u; // request list
|
u3_creq* ceq_u; // request list
|
||||||
h2o_http1client_ctx_t* //
|
h2o_timeout_t tim_u; // request timeout
|
||||||
|
h2o_http1client_ctx_t //
|
||||||
ctx_u; // h2o client ctx
|
ctx_u; // h2o client ctx
|
||||||
void* tls_u; // client SSL_CTX*
|
void* tls_u; // client SSL_CTX*
|
||||||
} u3_cttp;
|
} u3_cttp;
|
||||||
@ -394,7 +395,7 @@
|
|||||||
c3_o diz_o; // spinner activated
|
c3_o diz_o; // spinner activated
|
||||||
c3_d eve_d; // spin count
|
c3_d eve_d; // spin count
|
||||||
c3_d end_d; // spinner end tick (ms)
|
c3_d end_d; // spinner end tick (ms)
|
||||||
c3_c* why_c; // spinner label
|
c3_c why_c[5]; // spinner label
|
||||||
} sun_u;
|
} sun_u;
|
||||||
} u3_utat;
|
} u3_utat;
|
||||||
|
|
||||||
@ -871,7 +872,7 @@
|
|||||||
/* u3_term_start_spinner(): prepare spinner state. RETAIN.
|
/* u3_term_start_spinner(): prepare spinner state. RETAIN.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
u3_term_start_spinner(c3_c* why_c, c3_o now_o);
|
u3_term_start_spinner(u3_noun say, c3_o now_o);
|
||||||
|
|
||||||
/* u3_term_stop_spinner(): reset spinner state and restore input line.
|
/* u3_term_stop_spinner(): reset spinner state and restore input line.
|
||||||
*/
|
*/
|
||||||
|
@ -329,6 +329,7 @@ _mutate_cat(u3_noun big, c3_l axe_l, u3_noun som)
|
|||||||
*tar = _edit_or_mutate_cat(*tar, u3x_mas(axe_l), som);
|
*tar = _edit_or_mutate_cat(*tar, u3x_mas(axe_l), som);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
cel_u->mug_w = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -348,6 +349,7 @@ _mutate(u3_noun big, u3_noun axe, u3_noun som)
|
|||||||
? &(cel_u->hed)
|
? &(cel_u->hed)
|
||||||
: &(cel_u->tel);
|
: &(cel_u->tel);
|
||||||
*tar = _edit_or_mutate(*tar, mor, som);
|
*tar = _edit_or_mutate(*tar, mor, som);
|
||||||
|
cel_u->mug_w = 0;
|
||||||
u3z(mor);
|
u3z(mor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -470,7 +472,6 @@ u3i_list(u3_weak one, ...);
|
|||||||
return cut_t ? cut_w : i_w;
|
return cut_t ? cut_w : i_w;
|
||||||
}
|
}
|
||||||
|
|
||||||
__attribute__((no_sanitize_address))
|
|
||||||
static u3_noun // transfer
|
static u3_noun // transfer
|
||||||
_molt_apply(u3_noun som, // retain
|
_molt_apply(u3_noun som, // retain
|
||||||
c3_w len_w,
|
c3_w len_w,
|
||||||
@ -496,7 +497,6 @@ u3i_list(u3_weak one, ...);
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
__attribute__((no_sanitize_address))
|
|
||||||
u3_noun
|
u3_noun
|
||||||
u3i_molt(u3_noun som, ...)
|
u3i_molt(u3_noun som, ...)
|
||||||
{
|
{
|
||||||
|
@ -1535,6 +1535,7 @@ _cm_limits(void)
|
|||||||
|
|
||||||
// Moar core.
|
// Moar core.
|
||||||
//
|
//
|
||||||
|
# ifndef ASAN_ENABLED
|
||||||
{
|
{
|
||||||
getrlimit(RLIMIT_CORE, &rlm);
|
getrlimit(RLIMIT_CORE, &rlm);
|
||||||
rlm.rlim_cur = RLIM_INFINITY;
|
rlm.rlim_cur = RLIM_INFINITY;
|
||||||
@ -1545,6 +1546,7 @@ _cm_limits(void)
|
|||||||
u3l_log("boot: core limit: %s\r\n", strerror(errno));
|
u3l_log("boot: core limit: %s\r\n", strerror(errno));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* _cm_signals(): set up interrupts, etc.
|
/* _cm_signals(): set up interrupts, etc.
|
||||||
|
@ -161,7 +161,6 @@ u3r_at(u3_atom a, u3_noun b)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
__attribute__((no_sanitize_address))
|
|
||||||
c3_o
|
c3_o
|
||||||
u3r_vmean(u3_noun som, va_list ap)
|
u3r_vmean(u3_noun som, va_list ap)
|
||||||
{
|
{
|
||||||
|
@ -576,7 +576,6 @@ u3_ames_io_exit(u3_pier* pir_u)
|
|||||||
u3_ames* sam_u = pir_u->sam_u;
|
u3_ames* sam_u = pir_u->sam_u;
|
||||||
|
|
||||||
if ( c3y == sam_u->liv ) {
|
if ( c3y == sam_u->liv ) {
|
||||||
// XX remove had_u/wax_u union, cast and close wax_u
|
|
||||||
uv_close(&sam_u->had_u, 0);
|
uv_close(&sam_u->had_u, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,8 @@ u3_behn_io_init(u3_pier *pir_u)
|
|||||||
void
|
void
|
||||||
u3_behn_io_exit(u3_pier *pir_u)
|
u3_behn_io_exit(u3_pier *pir_u)
|
||||||
{
|
{
|
||||||
|
u3_behn* teh_u = pir_u->teh_u;
|
||||||
|
uv_close((uv_handle_t*)&teh_u->tim_u, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* _behn_time_cb(): timer callback.
|
/* _behn_time_cb(): timer callback.
|
||||||
|
@ -835,7 +835,7 @@ _cttp_creq_connect(u3_creq* ceq_u)
|
|||||||
( c3y == ceq_u->sec ) ? 443 : 80;
|
( c3y == ceq_u->sec ) ? 443 : 80;
|
||||||
|
|
||||||
// connect by IP
|
// connect by IP
|
||||||
h2o_http1client_connect(&ceq_u->cli_u, ceq_u, u3_Host.ctp_u.ctx_u, ipf_u,
|
h2o_http1client_connect(&ceq_u->cli_u, ceq_u, &u3_Host.ctp_u.ctx_u, ipf_u,
|
||||||
por_s, c3y == ceq_u->sec, _cttp_creq_on_connect);
|
por_s, c3y == ceq_u->sec, _cttp_creq_on_connect);
|
||||||
|
|
||||||
// set hostname for TLS handshake
|
// set hostname for TLS handshake
|
||||||
@ -947,22 +947,6 @@ _cttp_init_tls()
|
|||||||
return tls_u;
|
return tls_u;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* _cttp_init_h2o: initialize h2o client ctx and timeout
|
|
||||||
*/
|
|
||||||
static h2o_http1client_ctx_t*
|
|
||||||
_cttp_init_h2o()
|
|
||||||
{
|
|
||||||
h2o_timeout_t* tim_u = c3_malloc(sizeof(*tim_u));
|
|
||||||
|
|
||||||
h2o_timeout_init(u3L, tim_u, 300 * 1000);
|
|
||||||
|
|
||||||
h2o_http1client_ctx_t* ctx_u = c3_calloc(sizeof(*ctx_u));
|
|
||||||
ctx_u->loop = u3L;
|
|
||||||
ctx_u->io_timeout = tim_u;
|
|
||||||
|
|
||||||
return ctx_u;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* u3_cttp_ef_http_client(): send an %http-client (outgoing request) to cttp.
|
/* u3_cttp_ef_http_client(): send an %http-client (outgoing request) to cttp.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
@ -1011,9 +995,26 @@ u3_cttp_ef_bake()
|
|||||||
void
|
void
|
||||||
u3_cttp_io_init()
|
u3_cttp_io_init()
|
||||||
{
|
{
|
||||||
|
// zero-initialize h2o ctx
|
||||||
|
//
|
||||||
|
memset(&u3_Host.ctp_u.ctx_u, 0, sizeof(u3_Host.ctp_u.ctx_u));
|
||||||
|
|
||||||
|
// link to event loop
|
||||||
|
//
|
||||||
|
u3_Host.ctp_u.ctx_u.loop = u3L;
|
||||||
|
|
||||||
|
// link to initialized request timeout
|
||||||
|
//
|
||||||
|
h2o_timeout_init(u3L, &u3_Host.ctp_u.tim_u, 300 * 1000);
|
||||||
|
u3_Host.ctp_u.ctx_u.io_timeout = &u3_Host.ctp_u.tim_u;
|
||||||
|
|
||||||
|
// link to initialized tls ctx
|
||||||
|
//
|
||||||
u3_Host.ctp_u.tls_u = _cttp_init_tls();
|
u3_Host.ctp_u.tls_u = _cttp_init_tls();
|
||||||
u3_Host.ctp_u.ctx_u = _cttp_init_h2o();
|
u3_Host.ctp_u.ctx_u.ssl_ctx = u3_Host.ctp_u.tls_u;
|
||||||
u3_Host.ctp_u.ctx_u->ssl_ctx = u3_Host.ctp_u.tls_u;
|
|
||||||
|
// zero-initialize request list
|
||||||
|
//
|
||||||
u3_Host.ctp_u.ceq_u = 0;
|
u3_Host.ctp_u.ceq_u = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1022,7 +1023,19 @@ u3_cttp_io_init()
|
|||||||
void
|
void
|
||||||
u3_cttp_io_exit(void)
|
u3_cttp_io_exit(void)
|
||||||
{
|
{
|
||||||
SSL_CTX_free(u3_Host.ctp_u.tls_u);
|
// cancel requests
|
||||||
c3_free(u3_Host.ctp_u.ctx_u->io_timeout);
|
//
|
||||||
c3_free(u3_Host.ctp_u.ctx_u);
|
{
|
||||||
|
u3_creq* ceq_u = u3_Host.ctp_u.ceq_u;
|
||||||
|
|
||||||
|
while ( ceq_u ) {
|
||||||
|
_cttp_creq_quit(ceq_u);
|
||||||
|
ceq_u = ceq_u->nex_u;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// dispose of global resources
|
||||||
|
//
|
||||||
|
h2o_timeout_dispose(u3L, &u3_Host.ctp_u.tim_u);
|
||||||
|
SSL_CTX_free(u3_Host.ctp_u.tls_u);
|
||||||
}
|
}
|
||||||
|
@ -928,8 +928,8 @@ u3_daemon_commence()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* listen on command socket
|
// listen on command socket
|
||||||
*/
|
//
|
||||||
{
|
{
|
||||||
c3_c buf_c[256];
|
c3_c buf_c[256];
|
||||||
|
|
||||||
@ -948,7 +948,6 @@ u3_daemon_commence()
|
|||||||
uv_run(u3L, UV_RUN_DEFAULT);
|
uv_run(u3L, UV_RUN_DEFAULT);
|
||||||
|
|
||||||
_daemon_loop_exit();
|
_daemon_loop_exit();
|
||||||
exit(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* u3_daemon_bail(): immediately shutdown.
|
/* u3_daemon_bail(): immediately shutdown.
|
||||||
|
@ -1764,14 +1764,15 @@ u3_http_io_talk(void)
|
|||||||
void
|
void
|
||||||
u3_http_io_exit(void)
|
u3_http_io_exit(void)
|
||||||
{
|
{
|
||||||
// Note: nothing in this codepath can print to uH!
|
// dispose of configuration to avoid restarts
|
||||||
// it will seriously mess up your terminal
|
//
|
||||||
|
_http_form_free();
|
||||||
|
|
||||||
// u3_http* htp_u;
|
// close all servers
|
||||||
|
//
|
||||||
// for ( htp_u = u3_Host.htp_u; htp_u; htp_u = htp_u->nex_u ) {
|
for ( u3_http* htp_u = u3_Host.htp_u; htp_u; htp_u = htp_u->nex_u ) {
|
||||||
// _http_serv_close_hard(htp_u);
|
_http_serv_close(htp_u);
|
||||||
// }
|
}
|
||||||
|
|
||||||
// XX close u3_Host.fig_u.cli_u and con_u
|
// XX close u3_Host.fig_u.cli_u and con_u
|
||||||
|
|
||||||
|
@ -643,11 +643,11 @@ static void
|
|||||||
_pier_work_spin_start(u3_writ* wit_u)
|
_pier_work_spin_start(u3_writ* wit_u)
|
||||||
{
|
{
|
||||||
u3_pier* pir_u = wit_u->pir_u;
|
u3_pier* pir_u = wit_u->pir_u;
|
||||||
c3_o now_o = c3n;
|
c3_o now_o = c3n;
|
||||||
c3_c* why_c = 0;
|
u3_noun say = u3_blip;
|
||||||
|
|
||||||
if ( wit_u->evt_d <= pir_u->lif_d ) {
|
if ( wit_u->evt_d <= pir_u->lif_d ) {
|
||||||
why_c = strdup("nock");
|
say = c3__nock;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
u3_noun why;
|
u3_noun why;
|
||||||
@ -661,7 +661,7 @@ _pier_work_spin_start(u3_writ* wit_u)
|
|||||||
|
|
||||||
|
|
||||||
if ( c3__term != why ) {
|
if ( c3__term != why ) {
|
||||||
why_c = u3r_string(why);
|
say = why;
|
||||||
}
|
}
|
||||||
else if ( ( u3_none != (cad = u3r_at(7, wit_u->job)) ) &&
|
else if ( ( u3_none != (cad = u3r_at(7, wit_u->job)) ) &&
|
||||||
( u3_none != (tag = u3r_at(2, cad)) ) &&
|
( u3_none != (tag = u3r_at(2, cad)) ) &&
|
||||||
@ -674,7 +674,7 @@ _pier_work_spin_start(u3_writ* wit_u)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
u3_term_start_spinner(why_c, now_o);
|
u3_term_start_spinner(say, now_o);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* _pier_work_spin_stop(): deactivate spinner.
|
/* _pier_work_spin_stop(): deactivate spinner.
|
||||||
@ -1261,10 +1261,6 @@ _pier_loop_exit(u3_pier* pir_u)
|
|||||||
// XX legacy handlers, not yet scoped to a pier
|
// XX legacy handlers, not yet scoped to a pier
|
||||||
//
|
//
|
||||||
{
|
{
|
||||||
cod_l = u3a_lush(c3__term);
|
|
||||||
u3_term_io_exit();
|
|
||||||
u3a_lop(cod_l);
|
|
||||||
|
|
||||||
cod_l = u3a_lush(c3__http);
|
cod_l = u3a_lush(c3__http);
|
||||||
u3_http_io_exit();
|
u3_http_io_exit();
|
||||||
u3a_lop(cod_l);
|
u3a_lop(cod_l);
|
||||||
@ -1272,6 +1268,10 @@ _pier_loop_exit(u3_pier* pir_u)
|
|||||||
cod_l = u3a_lush(c3__cttp);
|
cod_l = u3a_lush(c3__cttp);
|
||||||
u3_cttp_io_exit();
|
u3_cttp_io_exit();
|
||||||
u3a_lop(cod_l);
|
u3a_lop(cod_l);
|
||||||
|
|
||||||
|
cod_l = u3a_lush(c3__term);
|
||||||
|
u3_term_io_exit();
|
||||||
|
u3a_lop(cod_l);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,4 +63,6 @@ u3_save_io_init(u3_pier *pir_u)
|
|||||||
void
|
void
|
||||||
u3_save_io_exit(u3_pier *pir_u)
|
u3_save_io_exit(u3_pier *pir_u)
|
||||||
{
|
{
|
||||||
|
u3_save* sav_u = pir_u->sav_u;
|
||||||
|
uv_close((uv_handle_t*)&sav_u->tim_u, 0);
|
||||||
}
|
}
|
||||||
|
@ -787,12 +787,11 @@ _term_spin_timer_cb(uv_timer_t* tim_u)
|
|||||||
*cur_c++ = daz_c[lag_d % strlen(daz_c)];
|
*cur_c++ = daz_c[lag_d % strlen(daz_c)];
|
||||||
c3_w sol_w = 1; // spinner length (utf-32)
|
c3_w sol_w = 1; // spinner length (utf-32)
|
||||||
|
|
||||||
if ( tat_u->sun_u.why_c ) {
|
if ( tat_u->sun_u.why_c[0] ) {
|
||||||
strncpy(cur_c, dal_c, 2);
|
strncpy(cur_c, dal_c, 2);
|
||||||
cur_c += 2;
|
cur_c += 2;
|
||||||
sol_w += 1; // length of dal_c (utf-32)
|
sol_w += 1; // length of dal_c (utf-32)
|
||||||
|
|
||||||
// c3_w wel_w = strlen(tat_u.sun_u->why_c);
|
|
||||||
strncpy(cur_c, tat_u->sun_u.why_c, 4);
|
strncpy(cur_c, tat_u->sun_u.why_c, 4);
|
||||||
cur_c += 4;
|
cur_c += 4;
|
||||||
sol_w += 4; // XX assumed utf-8
|
sol_w += 4; // XX assumed utf-8
|
||||||
@ -826,17 +825,17 @@ _term_spin_timer_cb(uv_timer_t* tim_u)
|
|||||||
#define _SPIN_RATE_US 250UL // spinner rate (ms/frame)
|
#define _SPIN_RATE_US 250UL // spinner rate (ms/frame)
|
||||||
#define _SPIN_IDLE_US 500UL // spinner cools down if stopped this long
|
#define _SPIN_IDLE_US 500UL // spinner cools down if stopped this long
|
||||||
|
|
||||||
/* u3_term_start_spinner(): prepare spinner state
|
/* u3_term_start_spinner(): prepare spinner state. RETAIN.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
u3_term_start_spinner(c3_c* why_c, c3_o now_o)
|
u3_term_start_spinner(u3_noun say, c3_o now_o)
|
||||||
{
|
{
|
||||||
if ( c3n == u3_Host.ops_u.tem ) {
|
if ( c3n == u3_Host.ops_u.tem ) {
|
||||||
u3_utty* uty_u = _term_main();
|
u3_utty* uty_u = _term_main();
|
||||||
u3_utat* tat_u = &uty_u->tat_u;
|
u3_utat* tat_u = &uty_u->tat_u;
|
||||||
|
|
||||||
c3_free(tat_u-> sun_u.why_c);
|
tat_u->sun_u.why_c[4] = 0;
|
||||||
tat_u->sun_u.why_c = why_c;
|
u3r_bytes(0, 4, (c3_y*)tat_u->sun_u.why_c, say);
|
||||||
|
|
||||||
tat_u->sun_u.eve_d = 0;
|
tat_u->sun_u.eve_d = 0;
|
||||||
// XX must be c3n for cursor backoff from EOL?
|
// XX must be c3n for cursor backoff from EOL?
|
||||||
@ -865,6 +864,8 @@ u3_term_stop_spinner(void)
|
|||||||
u3_utty* uty_u = _term_main();
|
u3_utty* uty_u = _term_main();
|
||||||
u3_utat* tat_u = &uty_u->tat_u;
|
u3_utat* tat_u = &uty_u->tat_u;
|
||||||
|
|
||||||
|
memset(tat_u->sun_u.why_c, 0, 5);
|
||||||
|
|
||||||
uv_timer_stop(&tat_u->sun_u.tim_u);
|
uv_timer_stop(&tat_u->sun_u.tim_u);
|
||||||
|
|
||||||
if ( c3y == tat_u->sun_u.diz_o ) {
|
if ( c3y == tat_u->sun_u.diz_o ) {
|
||||||
|
@ -850,6 +850,10 @@ _worker_poke_exit(c3_w cod_w) // exit code
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// XX move to jets.c
|
||||||
|
//
|
||||||
|
c3_free(u3D.ray_u);
|
||||||
|
|
||||||
exit(cod_w);
|
exit(cod_w);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,6 @@ boot_ship() {
|
|||||||
rev=$2
|
rev=$2
|
||||||
|
|
||||||
git checkout $rev
|
git checkout $rev
|
||||||
make install
|
|
||||||
urbit -d -F $ship -B bin/brass.pill
|
urbit -d -F $ship -B bin/brass.pill
|
||||||
}
|
}
|
||||||
|
|
||||||
|
14
sh/test-whitespace
Executable file
14
sh/test-whitespace
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
whitespace=$(find . \
|
||||||
|
\( -path ./.git -o \
|
||||||
|
-path ./nix -o \
|
||||||
|
-path ./bin \) -prune \
|
||||||
|
-o -type f -exec egrep -lI " +$" {} \;);
|
||||||
|
|
||||||
|
if [ ! -z "$whitespace" ]
|
||||||
|
then
|
||||||
|
echo "found trailing whitespace in:";
|
||||||
|
echo "$whitespace";
|
||||||
|
exit 1;
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user