Fallback on ~/.tt/peers when peer ref file unspecified
[tt.git] / TODO
CommitLineData
a78e83b8 1# vim:sw=2:sts=2:
e678174b
SK
2TODO
3====
33cf2848 4
e678174b
SK
5Legend:
6- [ ] not started
7- [-] in-progress
8- [x] done
9- [~] cancelled
33cf2848 10
e678174b
SK
11In-progress
12-----------
13
14- [-] Convert to Typed Racket
15 - [x] build executable (otherwise too-slow)
16 - [-] add signatures
17 - [x] top-level
18 - [ ] inner
19 - [ ] imports
24f1f64b
SK
20- [-] commands:
21 - [x] r | read
d96fa613 22 - see timeline ops above
24f1f64b 23 - [ ] w | write
d96fa613
SK
24 - arg or stdin
25 - nick expand to URI
24f1f64b 26 - [ ] q | query
d96fa613
SK
27 - see timeline ops above
28 - see hashtag and channels above
4214c0f3 29 - [x] d | download
e678174b
SK
30 - [ ] options:
31 - [ ] all - use all known peers
32 - [ ] fast - all except peers known to be slow or unavailable
33 REQUIRES: stats
3a4b2233 34 - [x] u | upload
54c0807b 35 - calls user-configured command to upload user's own timeline file to their server
24f1f64b
SK
36 Looks like a better CLI parser than "racket/cmdline": https://docs.racket-lang.org/natural-cli/
37 But it is no longer necessary now that I've figured out how to chain (command-line ..) calls.
e678174b
SK
38- [-] Output formats:
39 - [x] text long
40 - [x] text short
41 - [ ] HTML
42 - [ ] JSON
43- [-] Peer discovery
44 - [-] parse peer refs from peer timelines
45 - [x] mentions from timeline messages
46 - [x] @<source.nick source.url>
47 - [x] @<source.url>
48 - [x] "following" from timeline comments: # following = <nick> <uri>
8cd862ed 49 - [ ] Parse User-Agent web access logs.
b06cbfc2
SK
50 - [ ] Update peer ref file(s)
51 Rough sketch from late 2019:
c91a1ca9
SK
52 let read file =
53 ...
54 let write file peers =
55 ...
56 let fetch peer =
57 (* Fetch could mean either or both of:
58 * - fetch peer's we-are-twtxt.txt
59 * - fetch peer's twtxt.txt and extract mentioned peer URIs
60 * *)
61 ...
62 let test peers =
63 ...
64 let rec discover peers_old =
65 let peers_all =
66 Set.fold peers_old ~init:peers_old ~f:(fun peers p ->
67 match fetch p with
68 | Error _ ->
69 (* TODO: Should p be moved to down set here? *)
70 log_warning ...;
71 peers
72 | Ok peers_fetched ->
73 Set.union peers peers_fetched
74 )
75 in
76 if Set.empty (Set.diff peers_old peers_all) then
77 peers_all
78 else
79 discover peers_all
80 let rec loop interval peers_old =
81 let peers_all = discover peers_old in
82 let (peers_up, peers_down) = test peers_all in
83 write "peers-all.txt" peers_all;
84 write "peers-up.txt" peers_up;
85 write "peers-down.txt" peers_down;
86 sleep interval;
87 loop interval peers_all
88 let () =
89 loop (Sys.argv.(1)) (read "peers-all.txt")
e678174b
SK
90
91Backlog
92-------
93- [ ] nick tiebreaker(s)
94 - [ ] some sort of a hash of URI?
95 - [ ] angry-purple-tiger kind if thingie?
96 - [ ] P2P nick registration?
97 - [ ] Peers vote by claiming to have seen a nick->uri mapping?
98 The inherent race condition would be a feature, since all user name
99 registrations are races.
100 REQUIRES: blockchain
101- [ ] stats
102 - [ ] download times per peer
103- [ ] Support redirects
54c0807b 104 - should permanent redirects update the peer ref somehow?
e678174b
SK
105- [ ] Support time ranges (i.e. reading the timeline between given time points)
106- [ ] optional text wrap
107- [ ] write
108- [ ] timeline limits
54c0807b
SK
109- [ ] peer refs set operations (perhaps better done externally?)
110- [ ] timeline as a result of a query (peer ref set op + filter expressions)
e678174b
SK
111- [ ] config files
112- [ ] highlight mentions
113- [ ] filter on mentions
114- [ ] highlight hashtags
115- [ ] filter on hashtags
116- [ ] hashtags as channels? initial hashtag special?
117- [ ] query language
118- [ ] console logger colors by level ('error)
119- [ ] file logger ('debug)
120- [ ] Suport immutable timelines
121 - store individual messages
122 - where?
123 - something like DBM or SQLite - faster
124 - filesystem - transparent, easily published - probably best
125 - [ ] block(chain/tree) of twtxts
126 - distributed twtxt.db
127 - each twtxt.txt is a ledger
128 - peers can verify states of ledgers
129 - peers can publish known nick->url mappings
130 - peers can vote on nick->url mappings
131 - we could break time periods into blocks
132 - how to handle the facts that many(most?) twtxt are unseen by peers
133 - longest X wins?
134
135Done
136----
137- [x] caching (use cache by default, unless explicitly asked for update)
138 - [x] value --> cache
139 - [x] value <-- cache
140 REQUIRES: d command
141- [x] Logger sync before exit.
142- [x] Implement rfc3339->epoch
143- [x] Remove dependency on rfc3339-old
144- [x] remove dependency on http-client
145- [x] Build executable
146 Implies fix of "collection not found" when executing the built executable
147 outside the source directory:
148
149 collection-path: collection not found
150 collection: "tt"
151 in collection directories:
152 context...:
153 /usr/share/racket/collects/racket/private/collect.rkt:11:53: fail
154 /usr/share/racket/collects/setup/getinfo.rkt:17:0: get-info
155 /usr/share/racket/collects/racket/contract/private/arrow-val-first.rkt:555:3
156 /usr/share/racket/collects/racket/cmdline.rkt:191:51
157 '|#%mzc:p
158
159
160Cancelled
161---------
162- [~] named timelines/peer-sets
163 REASON: That is basically files of peers, which we already support.
This page took 0.031952 seconds and 4 git commands to generate.