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