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