14 - [-] Convert to Typed Racket
15 - [x] build executable (otherwise too-slow)
22 Discover new peers mentioned by known peers.
24 - see timeline ops above
28 - Watch FIFO for lines, then read, timestamp and append [+ upload].
29 Can be part of a "live" mode, along with background polling and
30 incremental printing. Sort of an ii-like IRC experience.
32 - see timeline ops above
33 - see hashtag and channels above
36 - [ ] all - use all known peers
37 - [ ] fast - all except peers known to be slow or unavailable
40 - calls user-configured command to upload user's own timeline file to their server
41 Looks like a better CLI parser than "racket/cmdline": https://docs.racket-lang.org/natural-cli/
42 But it is no longer necessary now that I've figured out how to chain (command-line ..) calls.
49 - [-] parse peer refs from peer timelines
50 - [x] mentions from timeline messages
51 - [x] @<source.nick source.url>
53 - [ ] "following" from timeline comments: # following = <nick> <uri>
54 - [ ] Parse User-Agent web access logs.
55 - [-] Update peer ref file(s)
58 - [ ] peers-followed (by others, parsed from comments)
59 - [ ] peers-down (net errors)
61 Rough sketch from late 2019:
64 let write file peers =
67 (* Fetch could mean either or both of:
68 * - fetch peer's we-are-twtxt.txt
69 * - fetch peer's twtxt.txt and extract mentioned peer URIs
74 let rec discover peers_old =
76 Set.fold peers_old ~init:peers_old ~f:(fun peers p ->
79 (* TODO: Should p be moved to down set here? *)
83 Set.union peers peers_fetched
86 if Set.empty (Set.diff peers_old peers_all) then
90 let rec loop interval peers_old =
91 let peers_all = discover peers_old in
92 let (peers_up, peers_down) = test peers_all in
93 write "peers-all.txt" peers_all;
94 write "peers-up.txt" peers_up;
95 write "peers-down.txt" peers_down;
97 loop interval peers_all
99 loop (Sys.argv.(1)) (read "peers-all.txt")
103 - [ ] user-agent file as CLI option - need to run at least the crawler as another user
104 - [ ] Support fetching rsync URIs
105 - [ ] Check for peer duplicates:
106 - [ ] same nick for N>1 URIs
107 - [ ] same URI for N>1 nicks
108 - [ ] Background polling and incremental timeline updates.
109 We can mark which messages have already been printed and print new ones as
112 - [ ] Polling mode/command, where tt periodically polls peer timelines
113 - [ ] nick tiebreaker(s)
114 - [ ] some sort of a hash of URI?
115 - [ ] angry-purple-tiger kind if thingie?
116 - [ ] P2P nick registration?
117 - [ ] Peers vote by claiming to have seen a nick->uri mapping?
118 The inherent race condition would be a feature, since all user name
119 registrations are races.
122 - [ ] download times per peer
123 - [ ] Support redirects
124 - should permanent redirects update the peer ref somehow?
125 - [ ] Support time ranges (i.e. reading the timeline between given time points)
126 - [ ] optional text wrap
128 - [ ] timeline limits
129 - [ ] peer refs set operations (perhaps better done externally?)
130 - [ ] timeline as a result of a query (peer ref set op + filter expressions)
132 - [ ] highlight mentions
133 - [ ] filter on mentions
134 - [ ] highlight hashtags
135 - [ ] filter on hashtags
136 - [ ] hashtags as channels? initial hashtag special?
138 - [ ] console logger colors by level ('error)
139 - [ ] file logger ('debug)
140 - [ ] Suport immutable timelines
141 - store individual messages
143 - something like DBM or SQLite - faster
144 - filesystem - transparent, easily published - probably best
145 - [ ] block(chain/tree) of twtxts
146 - distributed twtxt.db
147 - each twtxt.txt is a ledger
148 - peers can verify states of ledgers
149 - peers can publish known nick->url mappings
150 - peers can vote on nick->url mappings
151 - we could break time periods into blocks
152 - how to handle the facts that many(most?) twtxt are unseen by peers
157 - [x] Dedup read-in peers before using them.
158 - [x] Prevent redundant downloads
160 - [x] Check Last-Modified if no ETag was provided
161 - [x] Parse rfc2822 timestamps
162 - [x] caching (use cache by default, unless explicitly asked for update)
163 - [x] value --> cache
164 - [x] value <-- cache
166 - [x] Logger sync before exit.
167 - [x] Implement rfc3339->epoch
168 - [x] Remove dependency on rfc3339-old
169 - [x] remove dependency on http-client
170 - [x] Build executable
171 Implies fix of "collection not found" when executing the built executable
172 outside the source directory:
174 collection-path: collection not found
176 in collection directories:
178 /usr/share/racket/collects/racket/private/collect.rkt:11:53: fail
179 /usr/share/racket/collects/setup/getinfo.rkt:17:0: get-info
180 /usr/share/racket/collects/racket/contract/private/arrow-val-first.rkt:555:3
181 /usr/share/racket/collects/racket/cmdline.rkt:191:51
187 - [~] named timelines/peer-sets
188 REASON: That is basically files of peers, which we already support.