|
|
boston.conman.org.atom.xml - sfeed_tests - sfeed tests and RSS and Atom files |
|
|
 |
git clone git://git.codemadness.org/sfeed_tests (git://git.codemadness.org) |
|
|
 |
Log |
|
|
 |
Files |
|
|
 |
Refs |
|
|
 |
README |
|
|
 |
LICENSE |
|
|
|
--- |
|
|
|
boston.conman.org.atom.xml (60119B) |
|
|
|
--- |
|
|
|
1 <?xml version="1.0" encoding="UTF-8"?> |
|
|
|
2 <feed xmlns="http://www.w3.org/2005/Atom"> |
|
|
|
3 |
|
|
|
4 <title>The Boston Diaries</title> |
|
|
|
5 <updated>2023-02-24T08:41:07Z</updated> |
|
|
|
6 <id>http://boston.conman.org/</id> |
|
|
|
7 |
|
|
|
8 <link |
|
|
|
9 rel = "self" |
|
|
|
10 type = "application/atom+xml" |
|
|
|
11 hreflang = "en-US" |
|
|
|
12 href = "http://boston.conman.org/index.atom" |
|
|
|
13 title = "The Boston Diaries" |
|
|
|
14 /> |
|
|
|
15 |
|
|
|
16 <link |
|
|
|
17 rel = "alternate" |
|
|
|
18 type = "text/html" |
|
|
|
19 hreflang = "en-US" |
|
|
|
20 href = "http://boston.conman.org/" |
|
|
|
21 title = "The Boston Diaries" |
|
|
|
22 /> |
|
|
|
23 |
|
|
|
24 <author> |
|
|
|
25 <name>Sean Conner</name> |
|
|
|
26 <email>sean@conman.org</email> |
|
|
|
27 <uri>http://www.conman.org/people/spc/</uri> |
|
|
|
28 </author> |
|
|
|
29 |
|
|
|
30 <generator uri="http://boston.conman.org/about/" version="mod_blog v52, CGILIB 6.12.0, Lua 5.4.3, This is GDBM version 1.8.0, as of May 19, 1999.">mod_blog</generator> |
|
|
|
31 <rights>© 1999-2023 by Sean Conner. All Rights Reserved</rights> |
|
|
|
32 |
|
|
|
33 <entry> |
|
|
|
34 <id>tag:boston.conman.org,2023-02-23:/2023/02/23.1</id> |
|
|
|
35 <title type="text">A breakdown of the triple-star pointer</title> |
|
|
|
36 <updated>2023-02-24T00:44:41Z</updated> |
|
|
|
37 <link rel="alternate" type="text/html" hreflang="en-US" href="https://boston.conman.org/2023/02/23.1" /> |
|
|
|
38 <link rel="alternate" type="text/gemini" hreflang="en-US" href="gemini://gemini.conman.org/boston/2023/02/23.1" /> |
|
|
|
39 <link rel="alternate" type="text/plain" hreflang="en-US" href="gopher://gopher.conman.org/0Phlog:2023/02/23.1" /> |
|
|
|
40 <category term="programming"/> |
|
|
|
41 <category term="C programming"/> |
|
|
|
42 <category term="char ***"/> |
|
|
|
43 <category term="pointer to a pointer to a pointer"/> |
|
|
|
44 <category term="C"/> |
|
|
|
45 |
|
|
|
46 <content type="html"><P>I few days ago I read “<A CLASS="external" HREF="https://dorinlazar.ro/220710-trying-to-modernize-goaccess.en/">Lessons learnt while trying to modernize some C code</A>” |
|
|
|
47 (via <A CLASS="external" HREF="https://lobste.rs/s/r8b8d1/lessons_learnt_while_trying_modernize">Lobsters</A>) |
|
|
|
48 and one of the problems of C stated stood out to me: “Avoid constructs like <CODE>char ***</CODE>. I thought it was a joke, but people do |
|
|
|
49 pass around <CODE>char ***</CODE> and it’s insane—almost impossible to comprehend why |
|
|
|
50 do you need a pointer to a pointer to a pointer.” |
|
|
|
51 Yes, |
|
|
|
52 it happens, |
|
|
|
53 but come on! |
|
|
|
54 That doesn't happen often enough to complain about!</P> |
|
|
|
55 |
|
|
|
56 <P>And then I found one <A CLASS="external" HREF="https://github.com/spc476/mod_blog/blob/8eb3f660edd5a35c09616d058307e5a166052c99/src/blog.c#L335">in my own code</A>!</P> |
|
|
|
57 |
|
|
|
58 <P>Sigh.</P> |
|
|
|
59 |
|
|
|
60 <P>Okay, |
|
|
|
61 at least I can explain why I needed a <CODE>char ***</CODE>. |
|
|
|
62 It's not insane, |
|
|
|
63 and it's not impossible to comprehend why. |
|
|
|
64 I'll start with <CODE>char *'</CODE>. |
|
|
|
65 In C, |
|
|
|
66 that means “string” |
|
|
|
67 (the exceptions are just that—exceptions). |
|
|
|
68 We can replace <CODE>char *</CODE> with <CODE>typedef char *cstring</CODE> which gets rid of one “*”, |
|
|
|
69 leaving effectively <CODE>cstring **</CODE>.</P> |
|
|
|
70 |
|
|
|
71 <P>Now, |
|
|
|
72 when you see <CODE>char **</CODE>, |
|
|
|
73 say in <CODE>int main(int argc,char **argv)</CODE>, |
|
|
|
74 it generally has the meaning of an array of strings: |
|
|
|
75 <CODE>int main(int argc,char *argv[])</CODE>. |
|
|
|
76 Sometimes it could mean just a pointer to a pointer, |
|
|
|
77 but I'm using the “array of strings” meaning in my code. |
|
|
|
78 Translated using the custom type I defined above, |
|
|
|
79 <CODE>char **</CODE> becomes becomes <CODE>cstring []</CODE> and |
|
|
|
80 <CODE>char ***</CODE> becomes <CODE>cstring *[]</CODE>—a pointer to an array of strings. |
|
|
|
81 And this idiom, |
|
|
|
82 when it happens, |
|
|
|
83 usually means the callee is going to allocate the memory for the array of strings and return it via the pointer. |
|
|
|
84 Which is exactly what the function I wrote does.</P> |
|
|
|
85 |
|
|
|
86 <P>So when I expect a <CODE>char ***</CODE> here, |
|
|
|
87 what I'm asking for is a pointer to an array of strings |
|
|
|
88 (aka character pointers or character arrays). |
|
|
|
89 The only thing insane about this is the syntax, |
|
|
|
90 and maybe the semantics |
|
|
|
91 (pointers and arrays are near enough the same that it's dangerous) |
|
|
|
92 but I've been working with C long enough that I just kind of accept it.</P> |
|
|
|
93 |
|
|
|
94 <P>Now, |
|
|
|
95 just don't ask about <CODE>char ****</CODE>—that's just silly talk!</P> |
|
|
|
96 </content> |
|
|
|
97 </entry> |
|
|
|
98 <entry> |
|
|
|
99 <id>tag:boston.conman.org,2023-02-16:/2023/02/16.1</id> |
|
|
|
100 <title type="text">I guess now Bunny can add “upholsterer” to her list of hobbies</title> |
|
|
|
101 <updated>2023-02-22T04:57:24Z</updated> |
|
|
|
102 <link rel="alternate" type="text/html" hreflang="en-US" href="https://boston.conman.org/2023/02/16.1" /> |
|
|
|
103 <link rel="alternate" type="text/gemini" hreflang="en-US" href="gemini://gemini.conman.org/boston/2023/02/16.1" /> |
|
|
|
104 <link rel="alternate" type="text/plain" hreflang="en-US" href="gopher://gopher.conman.org/0Phlog:2023/02/16.1" /> |
|
|
|
105 <category term="daily life"/> |
|
|
|
106 <category term="repairs"/> |
|
|
|
107 <category term="upholstry"/> |
|
|
|
108 |
|
|
|
109 <content type="html"><P>A few weeks ago, |
|
|
|
110 the top arm coverings of my office chair basically crumbled and fell off.</P> |
|
|
|
111 |
|
|
|
112 <DIV CLASS="pf"> |
|
|
|
113 |
|
|
|
114 <IMG SRC="/2023/02/16/naked-chair.jpg" WIDTH="400" HEIGHT="300" ALT="[Picture of a chair with arms, but the arms are missing a cover.] Black always makes things slimmer. Only in this case, it is slimmer without the rubber covering." TITLE="Black always makes things slimmer. Only in this case, it is slimmer without the rubber covering."> |
|
|
|
115 |
|
|
|
116 </DIV> |
|
|
|
117 |
|
|
|
118 <P>The old coverings were some combination of rubber and plastic and I guess over time, |
|
|
|
119 they just became brittle or dried out, |
|
|
|
120 and fell apart. |
|
|
|
121 This exposed the underlying hard plastic frame underneath. |
|
|
|
122 It wouldn't be that bad actually, |
|
|
|
123 except for all the square holes, |
|
|
|
124 used to both lessen the amount of hard plastic required, |
|
|
|
125 and to give the old covers something to grip onto.</P> |
|
|
|
126 |
|
|
|
127 <DIV CLASS="pf"> |
|
|
|
128 |
|
|
|
129 <IMG SRC="/2023/02/16/naked-arm.jpg" WIDTH="400" HEIGHT="300" ALT="[Closeup of an uncovered arm on the office chair showing a surface with cutouts to save material, but makes it uncomfortable to use as an arm rest.] It's a combination arm rest and cheese grater!" TITLE="It's a combination arm rest and cheese grater!"> |
|
|
|
130 |
|
|
|
131 </DIV> |
|
|
|
132 |
|
|
|
133 <P>Resting my arms on the bare arm rests is uncomfortable—it's not exactly cutting into my skin, |
|
|
|
134 but I can feel the square holes which is unpleasant, |
|
|
|
135 and left a square pattern on my arms. |
|
|
|
136 My idea was to take some foam and wrap some cloth type material around it and the plastic frame. |
|
|
|
137 But it was Bunny who made the new covers from material lying about Chez Boca.</P> |
|
|
|
138 |
|
|
|
139 <DIV CLASS="pf"> |
|
|
|
140 |
|
|
|
141 <IMG SRC="/2023/02/16/new-sleeve.jpg" WIDTH="400" HEIGHT="300" ALT="[Picture of a new arm cover for an office chair.] Grab a strobe black light, turn up the techo, and we can have a rave!" TITLE="Grab a strobe black light, turn up the techo, and we can have a rave!"> |
|
|
|
142 |
|
|
|
143 </DIV> |
|
|
|
144 |
|
|
|
145 <P>It's basically a tube of cloth wrapping the foam, with some extra material folded back onto itself to form some flaps to go around the ends of the arm rests. |
|
|
|
146 Here I am demonstrating how it works with my fingers.</P> |
|
|
|
147 |
|
|
|
148 <DIV CLASS="pf"> |
|
|
|
149 |
|
|
|
150 <IMG SRC="/2023/02/16/flap.jpg" WIDTH="400" HEIGHT="300" ALT="[Picture demonstrating the flap on the new arm covers to hold it onto the chair.] Makes for a lousy puppet. Maybe with some googly eyes?" TITLE="Makes for a lousy puppet. Maybe with some googly eyes?"> |
|
|
|
151 |
|
|
|
152 </DIV> |
|
|
|
153 |
|
|
|
154 <P>The material has some stretch ability, |
|
|
|
155 which helps to keep it on the arm rests.</P> |
|
|
|
156 |
|
|
|
157 <DIV CLASS="pf"> |
|
|
|
158 |
|
|
|
159 <IMG SRC="/2023/02/16/clothed-chair.jpg" WIDTH="400" HEIGHT="300" ALT="[Picture of a chair with arms, now with the new arm covers.] Is it not nifty?" TITLE="Is it not nifty?"> |
|
|
|
160 |
|
|
|
161 </DIV> |
|
|
|
162 |
|
|
|
163 <P>It adds a nice bit of color to the chair, |
|
|
|
164 and it's a lot more confortable than the old covering. |
|
|
|
165 Nice job indeed!</P> |
|
|
|
166 </content> |
|
|
|
167 </entry> |
|
|
|
168 <entry> |
|
|
|
169 <id>tag:boston.conman.org,2023-02-13:/2023/02/13.1</id> |
|
|
|
170 <title type="text">The Nile is nice this time of year</title> |
|
|
|
171 <updated>2023-02-15T20:49:44Z</updated> |
|
|
|
172 <link rel="alternate" type="text/html" hreflang="en-US" href="https://boston.conman.org/2023/02/13.1" /> |
|
|
|
173 <link rel="alternate" type="text/gemini" hreflang="en-US" href="gemini://gemini.conman.org/boston/2023/02/13.1" /> |
|
|
|
174 <link rel="alternate" type="text/plain" hreflang="en-US" href="gopher://gopher.conman.org/0Phlog:2023/02/13.1" /> |
|
|
|
175 <category term="daily life"/> |
|
|
|
176 <category term="glasses"/> |
|
|
|
177 <category term="new glasses"/> |
|
|
|
178 <category term="Flexons"/> |
|
|
|
179 <category term="eye glasses"/> |
|
|
|
180 <category term="spectacles"/> |
|
|
|
181 <category term="denial"/> |
|
|
|
182 <category term="The Nile"/> |
|
|
|
183 |
|
|
|
184 <content type="html"><P>On Friday, |
|
|
|
185 February 3<SUP>rd</SUP>, |
|
|
|
186 I broke <A CLASS="local" HREF="/2004/05/10.1">my glasses</A>. |
|
|
|
187 I was out and someone complemented me on my shades. |
|
|
|
188 I pointed out that they were just clip on shades, |
|
|
|
189 but I went further to show that my glasses were flexible. |
|
|
|
190 That's when I snapped off the left arm of my glasses at the hinge. |
|
|
|
191 In retrospect, |
|
|
|
192 I should not have done that.</P> |
|
|
|
193 |
|
|
|
194 <P>But they were nineteen years old. |
|
|
|
195 And it was clear to Bunny that I needed new glasses anyway. |
|
|
|
196 As she keeps pointing out, |
|
|
|
197 my glasses would slowly creep down my face, |
|
|
|
198 but that was only to keep things in focus. |
|
|
|
199 It had nothing to do with my eye sight changing.</P> |
|
|
|
200 |
|
|
|
201 <P>Nope.</P> |
|
|
|
202 |
|
|
|
203 <P>But now I had no excuse. |
|
|
|
204 The next day I picked out new frames |
|
|
|
205 (<A CLASS="external" HREF="https://www.flexon.com/">Flexon</A>, |
|
|
|
206 same manufactorer as my old ones). |
|
|
|
207 One of the store employees tried to fix my existing pair of glasses with tape, |
|
|
|
208 and all I can say about that—it was an attempt. |
|
|
|
209 The employee also managed to knock off the nose pad on the left side of my glasses |
|
|
|
210 (sigh) |
|
|
|
211 so now the glasses were even less stable on my face than before. |
|
|
|
212 I did manage to get an appointment for an eye exam on Monday the 6<SUP>th</SUP>.</P> |
|
|
|
213 |
|
|
|
214 <P>Monday, |
|
|
|
215 and I go for the exam. |
|
|
|
216 Things were going well until the end, |
|
|
|
217 when the doctor pointed out that it was time for me to get progressive lenses. |
|
|
|
218 Or, |
|
|
|
219 you know, |
|
|
|
220 bifocals.</P> |
|
|
|
221 |
|
|
|
222 <P>No! |
|
|
|
223 I am not that old! |
|
|
|
224 I don't need bifocals! |
|
|
|
225 I'm still only … um … oh … <I>mumblety-mum</I> years old.</P> |
|
|
|
226 |
|
|
|
227 <P>Man, |
|
|
|
228 the Nile is a nice place, |
|
|
|
229 isn't it?</P> |
|
|
|
230 |
|
|
|
231 <P>I could expect the new glasses to be ready in seven to ten days.</P> |
|
|
|
232 |
|
|
|
233 <P>Eight days of my old glasses falling off my face |
|
|
|
234 (and constantly adjusting them when they don't), |
|
|
|
235 and my new glasses are ready. |
|
|
|
236 With “progressive” lenses. |
|
|
|
237 I have up to 30 days to decide if I like them, |
|
|
|
238 and if I don't, |
|
|
|
239 I can get … sigh … <EM>bifocals</EM>.</P> |
|
|
|
240 |
|
|
|
241 <DIV CLASS="pf"> |
|
|
|
242 |
|
|
|
243 <IMG SRC="/2023/02/13/glasses.jpg" WIDTH="400" HEIGHT="300" ALT="[Picture of me with my new glasses] Pay no attention to all the white hair—we're here for the glasses" TITLE="Pay no attention to all the white hair—we're here for the glasses"> |
|
|
|
244 |
|
|
|
245 </DIV> |
|
|
|
246 |
|
|
|
247 <P>The progressive lenses are <EM>weird</EM>. |
|
|
|
248 Parts of my peripheral vision are blurry. |
|
|
|
249 If I move my head back and forth, |
|
|
|
250 surfaces along the bottom of my glasses undulate in an unnerving manner. |
|
|
|
251 Sometimes when I tilt my head, |
|
|
|
252 it feels like |
|
|
|
253 (to borrow a movie term) |
|
|
|
254 a zoom-in but with improper focusing. |
|
|
|
255 It's trippy, |
|
|
|
256 but without the side effects of a bad drug trip.</P> |
|
|
|
257 |
|
|
|
258 <P>We'll see if I can get used to them.</P> |
|
|
|
259 |
|
|
|
260 <P>Oh, |
|
|
|
261 and one more amusing fact about my new glasses—the lenses are so think at the edges, |
|
|
|
262 that the arms don't fold down all the way.</P> |
|
|
|
263 </content> |
|
|
|
264 </entry> |
|
|
|
265 <entry> |
|
|
|
266 <id>tag:boston.conman.org,2023-02-04:/2023/02/04.1</id> |
|
|
|
267 <title type="text">Notes about an overheard conversation while driving home</title> |
|
|
|
268 <updated>2023-02-05T00:48:40Z</updated> |
|
|
|
269 <link rel="alternate" type="text/html" hreflang="en-US" href="https://boston.conman.org/2023/02/04.1" /> |
|
|
|
270 <link rel="alternate" type="text/gemini" hreflang="en-US" href="gemini://gemini.conman.org/boston/2023/02/04.1" /> |
|
|
|
271 <link rel="alternate" type="text/plain" hreflang="en-US" href="gopher://gopher.conman.org/0Phlog:2023/02/04.1" /> |
|
|
|
272 <category term="overheard conversations"/> |
|
|
|
273 <category term="driving"/> |
|
|
|
274 <category term="around the bus"/> |
|
|
|
275 |
|
|
|
276 <content type="html"><P>“Why the convoluted way home?” <!-- me --> </P> |
|
|
|
277 |
|
|
|
278 <P>“Are you driving?” </P> |
|
|
|
279 |
|
|
|
280 <P>“No. I'm just curious.” </P> |
|
|
|
281 |
|
|
|
282 <P>“Because you told me to go around.” </P> |
|
|
|
283 |
|
|
|
284 <P>“I told you to get into the other lane to go around <EM>the bus!</EM>” </P> |
|
|
|
285 |
|
|
|
286 <P>“No, |
|
|
|
287 you just told me to go around.” </P> |
|
|
|
288 |
|
|
|
289 <P>“The bus.” </P> |
|
|
|
290 |
|
|
|
291 <P>“Around. |
|
|
|
292 Besides, |
|
|
|
293 this way, I don't have to take a left turn.” </P> |
|
|
|
294 |
|
|
|
295 <P>“Pththththththth.” </P> |
|
|
|
296 |
|
|
|
297 <P>“Argument of last resort, I see.” </P> |
|
|
|
298 </content> |
|
|
|
299 </entry> |
|
|
|
300 <entry> |
|
|
|
301 <id>tag:boston.conman.org,2023-01-24:/2023/01/24.2</id> |
|
|
|
302 <title type="text">Notes on a seriously first world problem</title> |
|
|
|
303 <updated>2023-01-25T01:46:31Z</updated> |
|
|
|
304 <link rel="alternate" type="text/html" hreflang="en-US" href="https://boston.conman.org/2023/01/24.2" /> |
|
|
|
305 <link rel="alternate" type="text/gemini" hreflang="en-US" href="gemini://gemini.conman.org/boston/2023/01/24.2" /> |
|
|
|
306 <link rel="alternate" type="text/plain" hreflang="en-US" href="gopher://gopher.conman.org/0Phlog:2023/01/24.2" /> |
|
|
|
307 <category term="smart TVs"/> |
|
|
|
308 <category term="foreign language interface"/> |
|
|
|
309 <category term="modern technology"/> |
|
|
|
310 <category term="first world problem"/> |
|
|
|
311 |
|
|
|
312 <content type="html"><P>“채널 하나 둘 셋 …” </P> |
|
|
|
313 |
|
|
|
314 <P>“Why is the TV speaking Korean?” </P> |
|
|
|
315 |
|
|
|
316 <P>“채널 하나 둘 넷 …” </P> |
|
|
|
317 |
|
|
|
318 <P>“I don't know. |
|
|
|
319 It just started happening!” </P> |
|
|
|
320 |
|
|
|
321 <P>“채널 하나 둘 다섯 … ” </P> |
|
|
|
322 |
|
|
|
323 <P>“Let me see … wait! |
|
|
|
324 The configuration menu is also in Korean!” </P> |
|
|
|
325 |
|
|
|
326 <P>“당연하지 …” </P> |
|
|
|
327 |
|
|
|
328 <P>“I guess we're just going to have to learn Korean.” </P> |
|
|
|
329 |
|
|
|
330 <P>“무아하하하하 …” </P> |
|
|
|
331 </content> |
|
|
|
332 </entry> |
|
|
|
333 <entry> |
|
|
|
334 <id>tag:boston.conman.org,2023-01-24:/2023/01/24.1</id> |
|
|
|
335 <title type="text">Notes on an overheard conversation about “Muskrat Love” as it played on satellite radio</title> |
|
|
|
336 <updated>2023-01-25T02:01:00Z</updated> |
|
|
|
337 <link rel="alternate" type="text/html" hreflang="en-US" href="https://boston.conman.org/2023/01/24.1" /> |
|
|
|
338 <link rel="alternate" type="text/gemini" hreflang="en-US" href="gemini://gemini.conman.org/boston/2023/01/24.1" /> |
|
|
|
339 <link rel="alternate" type="text/plain" hreflang="en-US" href="gopher://gopher.conman.org/0Phlog:2023/01/24.1" /> |
|
|
|
340 <category term="overheard conversations"/> |
|
|
|
341 <category term="Captain and Tennille"/> |
|
|
|
342 <category term="the Bionic Watermelon"/> |
|
|
|
343 |
|
|
|
344 <content type="html"><P>“If you would have asked me who sang that, |
|
|
|
345 I wouldn't have been able to answer.” </P> |
|
|
|
346 |
|
|
|
347 <P>“Wow! |
|
|
|
348 Captain and Tennille! |
|
|
|
349 That takes me back.” </P> |
|
|
|
350 |
|
|
|
351 <P>“Me too.” </P> |
|
|
|
352 |
|
|
|
353 <P>“Do you want to know what else the Captain and Tennille reminds me of?” </P> |
|
|
|
354 |
|
|
|
355 <P>“What?” </P> |
|
|
|
356 |
|
|
|
357 <P>“The Bionic Watermelon.” </P> |
|
|
|
358 |
|
|
|
359 <P>“What?” </P> |
|
|
|
360 |
|
|
|
361 <P>“<A CLASS="external" HREF="https://www.youtube.com/watch?v=DCYbjzHVLQI">The Bionic Watermelon</A>.” </P> |
|
|
|
362 |
|
|
|
363 <P>“You are weird, sir.” </P> |
|
|
|
364 |
|
|
|
365 </content> |
|
|
|
366 </entry> |
|
|
|
367 <entry> |
|
|
|
368 <id>tag:boston.conman.org,2023-01-23:/2023/01/23.1</id> |
|
|
|
369 <title type="text">A few small differences</title> |
|
|
|
370 <updated>2023-01-24T10:08:02Z</updated> |
|
|
|
371 <link rel="alternate" type="text/html" hreflang="en-US" href="https://boston.conman.org/2023/01/23.1" /> |
|
|
|
372 <link rel="alternate" type="text/gemini" hreflang="en-US" href="gemini://gemini.conman.org/boston/2023/01/23.1" /> |
|
|
|
373 <link rel="alternate" type="text/plain" hreflang="en-US" href="gopher://gopher.conman.org/0Phlog:2023/01/23.1" /> |
|
|
|
374 <category term="programming"/> |
|
|
|
375 <category term="library design"/> |
|
|
|
376 <category term="DNS"/> |
|
|
|
377 <category term="mDNS"/> |
|
|
|
378 |
|
|
|
379 <content type="html"><P>I received the following patch for <A CLASS="external" HREF="https://github.com/spc476/SPCDNS/">my <ABBR TITLE="Domain Name Service">DNS</ABBR> library</A>:</P> |
|
|
|
380 |
|
|
|
381 <BLOCKQUOTE CITE="https://github.com/spc476/SPCDNS/pull/13#issue-1550568965" TITLE="Mdns mods by oviano · Pull Request #13 · spc476/SPCDNS"> |
|
|
|
382 |
|
|
|
383 <P>I am hoping to use this library to encode and decode <ABBR TITLE="multicast Domain Name Service">mDNS</ABBR> queries and |
|
|
|
384 responses. It seems that the <ABBR TITLE="multicast Domain Name Service">mDNS</ABBR> is mostly the same as unicast <ABBR TITLE="Domain Name Service">DNS</ABBR>, except |
|
|
|
385 for a few small differences which I aim to add to this <ABBR TITLE="Pull Request">PR</ABBR> as I encounter |
|
|
|
386 them.</P> |
|
|
|
387 |
|
|
|
388 <P CLASS="cite"><CITE><A CLASS="external" HREF="https://github.com/spc476/SPCDNS/pull/13#issue-1550568965">Mdns mods by oviano · Pull Request #13 · spc476/SPCDNS</A></CITE></P> |
|
|
|
389 </BLOCKQUOTE> |
|
|
|
390 |
|
|
|
391 |
|
|
|
392 <P>Those “few small differences” turn out not to be so small.</P> |
|
|
|
393 |
|
|
|
394 <P>The main <ABBR TITLE="Request For Comment">RFC</ABBR>s for <ABBR TITLE="multicast Domain Name Service">mDNS</ABBR> appear to be <A CLASS="external" HREF="https://www.ietf.org/rfc/rfc6762.txt"><ABBR TITLE="Request For Comment">RFC</ABBR>-6762</A> and <A CLASS="local" HREF="https://www.ietf.org/rfc/rfc6763.txt"><ABBR TITLE="Request For Comment">RFC</ABBR>-6763</A> and to support them in full requires breaking changes to my library. |
|
|
|
395 The first are a bunch of flags, |
|
|
|
396 defined in <ABBR TITLE="Request For Comment">RFC</ABBR>-6762 and it affects pretty much the entire codebase. |
|
|
|
397 The first deals with “Questions Requesting Unicast Responses.” |
|
|
|
398 Most flags are defined in the header section, |
|
|
|
399 but for this, |
|
|
|
400 it's “the top bit in the class field of a <ABBR TITLE="Domain Name Service">DNS</ABBR> question as the unicast-response bit.” |
|
|
|
401 And because <ABBR TITLE="multicast Domain Name Service">mDNS</ABBR> specifically allows multiple questions, |
|
|
|
402 it's seems like it could be set per-question, |
|
|
|
403 and not per the request as a whole, |
|
|
|
404 as the <ABBR TITLE="Request For Comment">RFC</ABBR> states: “[w]hen this bit is set in a |
|
|
|
405 question, it indicates that the querier is willing to accept unicast |
|
|
|
406 replies in response to this specific query, as well as the usual |
|
|
|
407 multicast responses.” |
|
|
|
408 To me, |
|
|
|
409 that says, |
|
|
|
410 “each resource record needs a flag for a unicast reponse.” |
|
|
|
411 The other bit the “outdated cache entry” bit. |
|
|
|
412 which again applies to individual resource records and not to the request as a whole. |
|
|
|
413 And again, |
|
|
|
414 to me, |
|
|
|
415 that says, |
|
|
|
416 “each resoure record needs a flag to invalidate previously cached values.” |
|
|
|
417 |
|
|
|
418 <P>How to handle this … well, |
|
|
|
419 one way would be to a Boolean field to each resource record type to hide protocol details |
|
|
|
420 (which was the point in this library frankly). |
|
|
|
421 But that can break existing code as the new fields will need initialization:</P> |
|
|
|
422 |
|
|
|
423 <PRE CLASS="language-C" TITLE="C"> |
|
|
|
424 dns_question_t domain; |
|
|
|
425 |
|
|
|
426 domain.name = host; |
|
|
|
427 domain.type = RR_A; |
|
|
|
428 domain.class = CLASS_IN; |
|
|
|
429 domain.uc = true; /* we want unicast reply */ |
|
|
|
430 |
|
|
|
431 /* and the other flag */ |
|
|
|
432 |
|
|
|
433 dns_a_t addr; |
|
|
|
434 |
|
|
|
435 addr.name = host; |
|
|
|
436 addr.type = RR_A; |
|
|
|
437 addr.class = CLASS_IN; |
|
|
|
438 addr.ttl = 0; |
|
|
|
439 addr.ic = true; /* invalidate cache data */ |
|
|
|
440 addr.address = address; |
|
|
|
441 </PRE> |
|
|
|
442 |
|
|
|
443 |
|
|
|
444 <P>and document that the <VAR>uc</VAR> and <VAR>ic</VAR> fields are for <ABBR TITLE="multicast Domain Name Service">mDNS</ABBR> use; |
|
|
|
445 if you aren't using <ABBR TITLE="multicast Domain Name Service">mDNS</ABBR>, |
|
|
|
446 then they should be set to <CODE>false</CODE>.</P> |
|
|
|
447 |
|
|
|
448 <P>Another approach is to leak protocol details and require the user to do something like:</P> |
|
|
|
449 |
|
|
|
450 <PRE CLASS="language-C" TITLE="C"> |
|
|
|
451 /* We're making a query and want a unicast reply */ |
|
|
|
452 dns_question_t domain; |
|
|
|
453 |
|
|
|
454 domain.name = host; |
|
|
|
455 domain.type = RR_A; |
|
|
|
456 domain.class = CLASS_IN | UNICAST_REPLY; |
|
|
|
457 |
|
|
|
458 /* We're replying to a query and want to invalidate this record */ |
|
|
|
459 dns_a_t addr; |
|
|
|
460 |
|
|
|
461 addr.name = host; |
|
|
|
462 addr.type = RR_A; |
|
|
|
463 addr.class = CLASS_IN | INVALIDATE_CACHE; |
|
|
|
464 addr.ttl = 0; |
|
|
|
465 addr.address = address; |
|
|
|
466 </PRE> |
|
|
|
467 |
|
|
|
468 |
|
|
|
469 <P>And that's a less-breaking change, |
|
|
|
470 but on the decoding side, |
|
|
|
471 I still need some form of flag in the structure to indicate these flags were set because otherwise data is lost.</P> |
|
|
|
472 |
|
|
|
473 <P>I'm not sure which approach is best. |
|
|
|
474 The first does a better job of hiding the <ABBR TITLE="Domain Name Service">DNS</ABBR> protocol details, |
|
|
|
475 but breaks more code. |
|
|
|
476 The second is less breaking, |
|
|
|
477 as I could ignore any cache flags on encoding, |
|
|
|
478 but it leaks details of <ABBR TITLE="Domain Name Service">DNS</ABBR> encoding to user code. |
|
|
|
479 I tend to favor the first but I really dislike the breaking aspect of it. |
|
|
|
480 And That's just the first <ABBR TITLE="Request For Comment">RFC</ABBR>.</P> |
|
|
|
481 |
|
|
|
482 <P>The other <ABBR TITLE="Request For Comment">RFC</ABBR> utilizes what I consider to be an implementation detail of the <ABBR TITLE="Domain Name Service">DNS</ABBR> protocol to radically alter how I handle text resource records. |
|
|
|
483 The <ABBR TITLE="Request For Comment">RFC</ABBR> that defined modern <ABBR TITLE="Domain Name Service">DNS</ABBR>, |
|
|
|
484 <A CLASS="local" HREF="https://www.ietf.org/rfc/rfc1035.txt"><ABBR TITLE="Request For Comment">RFC</ABBR>-1035</A>, |
|
|
|
485 describes the format for a text resource record, |
|
|
|
486 but is silent as to semantics.</P> |
|
|
|
487 |
|
|
|
488 <P>Individual resource records come with a 16-bit length, |
|
|
|
489 so in theory, |
|
|
|
490 a resource record could be up to 65535 bytes in size, |
|
|
|
491 but it's rare to get a record that size. |
|
|
|
492 The base type of a text resource record is a “string.” |
|
|
|
493 and <ABBR TITLE="Request For Comment">RFC</ABBR>-1035 defines a “string” as one byte for the length, |
|
|
|
494 followed by that many bytes as the contents. |
|
|
|
495 The length of a “string” is defined as one byte, |
|
|
|
496 which limits the length of 255 bytes in size. |
|
|
|
497 This means, |
|
|
|
498 in practice, |
|
|
|
499 that a text resource record can contain several “strings.” |
|
|
|
500 |
|
|
|
501 <P>How SPCDNS handles this now is that I assume a text resource record only has one value—a string:</P> |
|
|
|
502 |
|
|
|
503 <PRE CLASS="language-C" TITLE="C"> |
|
|
|
504 typedef struct dns_txt_t /* RFC-1035 */ |
|
|
|
505 { |
|
|
|
506 char const *name; |
|
|
|
507 dns_type_t type; |
|
|
|
508 dns_class_t class; |
|
|
|
509 TTL ttl; |
|
|
|
510 size_t len; |
|
|
|
511 char const *text; |
|
|
|
512 } dns_txt_t; |
|
|
|
513 </PRE> |
|
|
|
514 |
|
|
|
515 |
|
|
|
516 <P>When encoding such a record, |
|
|
|
517 I break the given string into as few <ABBR TITLE="Domain Name Service">DNS</ABBR> “strings” as possible. |
|
|
|
518 Give this a 300 byte string, |
|
|
|
519 and you get two <ABBR TITLE="Domain Name Service">DNS</ABBR> “strings” encoded, |
|
|
|
520 one being 255 byte long, and the other one 45 bytes long. |
|
|
|
521 Upon decoding, |
|
|
|
522 all the strings in a single text resource record are concatenated into a single string. |
|
|
|
523 As I said, |
|
|
|
524 <ABBR TITLE="Domain Name Service">DNS</ABBR>-1035 doesn't go into the semantics of a text resource record, |
|
|
|
525 and I did what I felt was best.</P> |
|
|
|
526 |
|
|
|
527 <P><ABBR TITLE="Request For Comment">RFC</ABBR>-6763 uses the <ABBR TITLE="Domain Name Service">DNS</ABBR> “string” encoding for semantic information:</P> |
|
|
|
528 |
|
|
|
529 <PRE CLASS="language-data" TITLE="data"> |
|
|
|
530 Apple TV - Office._airplay._tcp.local. 10 IN TXT ( |
|
|
|
531 "acl=0" |
|
|
|
532 "btaddr=00:00:00:00:00:00" |
|
|
|
533 "deviceid=A8:51:AB:10:21:AE" |
|
|
|
534 "fex=1d9/St5/FbwooQ" |
|
|
|
535 "features=0x4A7FDFD5,0xBC157FDE" |
|
|
|
536 "flags=0x18644" |
|
|
|
537 "gid=F014C3FF-1420-4374-81DE-237CD6892579" |
|
|
|
538 "igl=1" |
|
|
|
539 "gcgl=1" |
|
|
|
540 "model=AppleTV14,1" |
|
|
|
541 "protovers=1.1" |
|
|
|
542 "pi=c6fe9e6e-cec2-44c8-9c66-8994c6ad47" |
|
|
|
543 "depsi=4A342DB4-3A0C-47A6-9143-9F6BF83F0EDD" |
|
|
|
544 "pk=5ab1ac3988a6a358db0a6e71a18d31b8d525ec30ce81a4b7b20f2630449f6591" |
|
|
|
545 "srcvers=670.6.2" |
|
|
|
546 "osvers=16.2" |
|
|
|
547 "vv=2" |
|
|
|
548 ) |
|
|
|
549 </PRE> |
|
|
|
550 |
|
|
|
551 |
|
|
|
552 <P>I have to admit, |
|
|
|
553 this is ingenious—each <ABBR TITLE="Domain Name Service">DNS</ABBR> “string” here defines a name/value pair. |
|
|
|
554 But I did not see this use at all.</P> |
|
|
|
555 |
|
|
|
556 <P>I wonder how much code out there dealing with <ABBR TITLE="Domain Name Service">DNS</ABBR> packets (not specifically <ABBR TITLE="multicast Domain Name Service">mDNS</ABBR>) |
|
|
|
557 would treat these records:</P> |
|
|
|
558 |
|
|
|
559 <PRE CLASS="language-DNS" TITLE="DNS"> |
|
|
|
560 IN TXT "v=spf1 +mx +ip4:71.19.142.20/32 -all" |
|
|
|
561 IN TXT "google-site-verification=<SPAN CLASS="cut">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</SPAN>" |
|
|
|
562 </PRE> |
|
|
|
563 |
|
|
|
564 |
|
|
|
565 <P>the same way as:</P> |
|
|
|
566 |
|
|
|
567 <PRE CLASS="language-DNS" TITLE="DNS"> |
|
|
|
568 IN TXT ( |
|
|
|
569 "v=spf1 +mx +ip4:71.19.142.20/32 -all" |
|
|
|
570 "google-site-verification=<SPAN CLASS="cut">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</SPAN>" |
|
|
|
571 ) |
|
|
|
572 </PRE> |
|
|
|
573 |
|
|
|
574 |
|
|
|
575 <P>The first returns two text resource records, |
|
|
|
576 each consisting of a single <ABBR TITLE="Domain Name Service">DNS</ABBR> “string,” |
|
|
|
577 the second one text resource record but with two <ABBR TITLE="Domain Name Service">DNS</ABBR> “strings.” |
|
|
|
578 My gut feeling is “not many would deal with the second format” but I can't know that for sure.</P> |
|
|
|
579 |
|
|
|
580 <P>And changing how I deal with text resource records in SPCDNS would be a major breaking change.</P> |
|
|
|
581 |
|
|
|
582 <P>This is one change I really don't know how to approach.</P> |
|
|
|
583 </content> |
|
|
|
584 </entry> |
|
|
|
585 <entry> |
|
|
|
586 <id>tag:boston.conman.org,2023-01-19:/2023/01/19.1</id> |
|
|
|
587 <title type="text">The good news? Somebody wants to use my blogging engine. The bad news? Somebody wants to use my blogging engine</title> |
|
|
|
588 <updated>2023-01-20T05:58:02Z</updated> |
|
|
|
589 <link rel="alternate" type="text/html" hreflang="en-US" href="https://boston.conman.org/2023/01/19.1" /> |
|
|
|
590 <link rel="alternate" type="text/gemini" hreflang="en-US" href="gemini://gemini.conman.org/boston/2023/01/19.1" /> |
|
|
|
591 <link rel="alternate" type="text/plain" hreflang="en-US" href="gopher://gopher.conman.org/0Phlog:2023/01/19.1" /> |
|
|
|
592 <category term="mod_blog"/> |
|
|
|
593 <category term="blogging"/> |
|
|
|
594 <category term="documentation"/> |
|
|
|
595 <category term="program assumptions"/> |
|
|
|
596 <category term="assumptions in mod_blog"/> |
|
|
|
597 |
|
|
|
598 <content type="html"><P>Over the 23 year history of <CODE><A CLASS="external" HREF="https://github.com/spc476/mod_blog">mod_blog</A></CODE>, |
|
|
|
599 I've given up on the notion of anyone other than me using it. |
|
|
|
600 There was only one other person who used it for just a few months before deciding blogging wasn't for him <!-- it was Mark --> and that was way back in 2002. |
|
|
|
601 So it was completely by surprise that I recently received <A CLASS="external" HREF="https://github.com/spc476/mod_blog/issues/1">a bug report</A> on it.</P> |
|
|
|
602 |
|
|
|
603 <P>Oh my … someone else is trying to use it.</P> |
|
|
|
604 |
|
|
|
605 <P>I never did fully document it. |
|
|
|
606 And there are, |
|
|
|
607 as I'm finding, |
|
|
|
608 an amazing number of things I'm assuming about the environment, |
|
|
|
609 such as:</P> |
|
|
|
610 |
|
|
|
611 <UL> |
|
|
|
612 |
|
|
|
613 <LI><P>That it's running under <A CLASS="external" HREF="https://httpd.apache.org/">Apache</A>. |
|
|
|
614 I do make use of the environment variable <CODE>$DOCUMENT_ROOT</CODE>, |
|
|
|
615 which technically is Apache specific |
|
|
|
616 (per the <ABBR TITLE="Common Gateway Interface">CGI</ABBR> RFC “<A CLASS="external" HREF="https://www.ietf.org/rfc/rfc3875.txt">The Comman Gateway Interface Version 1.1</A>” as it's not documented there) |
|
|
|
617 and, |
|
|
|
618 as I found out over the years, |
|
|
|
619 the variables <CODE>$REDIRECT_REMOTE_USER</CODE> and <CODE>$REDIRECT_BLOG_CONFIG</CODE>. |
|
|
|
620 Other web servers might not define those, |
|
|
|
621 or might work differently. |
|
|
|
622 I don't know, |
|
|
|
623 I only have ever used <CODE>mod_blog</CODE> with Apache.</P></LI> |
|
|
|
624 |
|
|
|
625 <LI><P>How to configure Apache to run <CODE>mod_blog</CODE>. |
|
|
|
626 I wanted to hide the fact that I'm running a <ABBR TITLE="Common Gateway Interface">CGI</ABBR> program to drive my blog, |
|
|
|
627 not for “security-through-obscurity” reasons, |
|
|
|
628 but for “easy to understand and modify the <ABBR TITLE="Uniform Resource Locator">URL</ABBR>” reasons. |
|
|
|
629 I think <ABBR TITLE="Uniform Resource Locator">URL</ABBR>s like <CODE>https://boston.conman.org/2023/01/19.1</CODE> looks much nicer than <CODE>https://boston.conman.org/boston.cgi?2023/01/19.1</CODE> |
|
|
|
630 (and nevermind the hideousness of <CODE>https://boston.conman.org/cgi-bin/boston.cgi?year=2023&amp;month=1&amp;day=19&amp;entry=1</CODE> that it could have been). |
|
|
|
631 The other benefit is that if I ever do get around to making <CODE>mod_blog</CODE> an actual Apache module |
|
|
|
632 (which was my original intent) |
|
|
|
633 <A CLASS="external" HREF="https://www.w3.org/Provider/Style/URI.html">links won't break</A>.</P> |
|
|
|
634 |
|
|
|
635 <P>As such, |
|
|
|
636 I use Apache's <CODE><A CLASS="external" HREF="https://httpd.apache.org/docs/2.4/mod/mod_rewrite.html#rewriterule">RewriteRule</A></CODE> to map all requests through <CODE>mod_blog</CODE>. |
|
|
|
637 The code base also assumes this as it relies upon the environment variable <CODE>$PATH_INFO</CODE> always being set, |
|
|
|
638 which isn't a given, |
|
|
|
639 depending upon how a <ABBR TITLE="Common Gateway Interface">CGI</ABBR> program is referenced via the web.</P></LI> |
|
|
|
640 |
|
|
|
641 <LI><P>The environment variable <CODE>$BLOG_CONFIG</CODE> is set to the configuration file. |
|
|
|
642 The configuration file can be either specified via the command line or stored in the environment variable. |
|
|
|
643 I added the environment to avoid having to embed the location in the executable or to expose the location in the query portion of a <ABBR TITLE="Uniform Resource Locator">URL</ABBR>. |
|
|
|
644 And again, |
|
|
|
645 this comes back to the previous point—how to configure this under Apache (<CODE><A CLASS="external" HREF="https://httpd.apache.org/docs/2.4/mod/mod_env.html#setenv">SetEnv</A></CODE> is the answer). |
|
|
|
646 I also have it set in my own environment |
|
|
|
647 (command line) |
|
|
|
648 as it makes it easy to test. |
|
|
|
649 It also makes it easy to fix spelling mistakes on the server as I can directly edit the files, |
|
|
|
650 which leads into the next point.</P></LI> |
|
|
|
651 |
|
|
|
652 <LI><P>All the files used by <CODE>mod_blog</CODE> are readable and writable by the program. |
|
|
|
653 My blog is, |
|
|
|
654 as far as I can tell, |
|
|
|
655 unique in that I can send in posts via email, |
|
|
|
656 in addition to a web page. |
|
|
|
657 Email support, |
|
|
|
658 for me, |
|
|
|
659 was non-negotiable. |
|
|
|
660 I get to use my preferred editor for writing, |
|
|
|
661 and by posting it via email, |
|
|
|
662 everything is handled automatically. |
|
|
|
663 I'm not aware of any other blogging system set up this way, |
|
|
|
664 and this is only viable because I run my own email server on the same box as my webserver.</P> |
|
|
|
665 |
|
|
|
666 <P>The issue becomes one of permissions. |
|
|
|
667 The web server runs as its own user. |
|
|
|
668 Email is delivered as the user of the recipient. |
|
|
|
669 Both can add new posts. |
|
|
|
670 I solved that issue my making <CODE>mod_blog</CODE> always run under my userid |
|
|
|
671 (it's “setuid” for the technically proficient). |
|
|
|
672 This means I don't have to make a bunch of files world writable on my server. |
|
|
|
673 I can make edits on the files directly as me. |
|
|
|
674 I can add entries via the web, |
|
|
|
675 email, |
|
|
|
676 or as a file from the command line |
|
|
|
677 (which <CODE>mod_blog</CODE> also supports).</P></LI> |
|
|
|
678 |
|
|
|
679 </UL> |
|
|
|
680 |
|
|
|
681 <P>And that's just off the top of my head. |
|
|
|
682 There's probably more assumptions made that I'm just not thinking of. |
|
|
|
683 It's issues like these where one can spend 90% of the time writing 90% of the code, |
|
|
|
684 and then spend another 90% of the time writing the final 10% of the code and documentation.</P> |
|
|
|
685 |
|
|
|
686 <P>I'm also amused by the timing. |
|
|
|
687 Back in August, |
|
|
|
688 I removed a ton of optional code that I never used, |
|
|
|
689 and because no one else was using <CODE>mod_blog</CODE>, |
|
|
|
690 it was just sitting there untested. |
|
|
|
691 And now someone wants to use the code.</P> |
|
|
|
692 |
|
|
|
693 <P>Heh.</P> |
|
|
|
694 |
|
|
|
695 <P>But also, gulp! |
|
|
|
696 I've got 23 years of experience with the code, |
|
|
|
697 so I know all the ins and outs of using it. |
|
|
|
698 Documenting this? |
|
|
|
699 So someone else can use this? |
|
|
|
700 Good lord!</P> |
|
|
|
701 </content> |
|
|
|
702 </entry> |
|
|
|
703 <entry> |
|
|
|
704 <id>tag:boston.conman.org,2023-01-16:/2023/01/16.1</id> |
|
|
|
705 <title type="text">The other SFTP that never was</title> |
|
|
|
706 <updated>2023-01-17T02:44:59Z</updated> |
|
|
|
707 <link rel="alternate" type="text/html" hreflang="en-US" href="https://boston.conman.org/2023/01/16.1" /> |
|
|
|
708 <link rel="alternate" type="text/gemini" hreflang="en-US" href="gemini://gemini.conman.org/boston/2023/01/16.1" /> |
|
|
|
709 <link rel="alternate" type="text/plain" hreflang="en-US" href="gopher://gopher.conman.org/0Phlog:2023/01/16.1" /> |
|
|
|
710 <category term="RFC-913"/> |
|
|
|
711 <category term="Simple File Transfer Protocol"/> |
|
|
|
712 <category term="SFTP"/> |
|
|
|
713 <category term="Internet protocols"/> |
|
|
|
714 |
|
|
|
715 <content type="html"><P>For reasons, |
|
|
|
716 I'm doing some research into the history of <ABBR TITLE="File Transport Protocol">FTP</ABBR> when I come across an <ABBR TITLE="Request For Comments">RFC</ABBR> for SFTP. |
|
|
|
717 Only this isn't the <A CLASS="external" HREF="https://en.wikipedia.org/wiki/SSH_File_Transfer_Protocol" TITLE="Secure File Transport Protocol">SFTP</A> that is used today, |
|
|
|
718 but instead the <A CLASS="external" HREF="https://www.ietf.org/rfc/rfc913.txt">Simple File Transfer Protocol</A> from 1984. |
|
|
|
719 Unlike <ABBR TITLE="Trivial File Transport Protocol">TFTP</ABBR>, |
|
|
|
720 it uses <ABBR TITLE="Transmission Control Protocol">TCP</ABBR>, |
|
|
|
721 and unlike <ABBR TITLE="File Transport Protocol">FTP</ABBR>, |
|
|
|
722 it only uses a single network connection.</P> |
|
|
|
723 |
|
|
|
724 <P>But this bit is why I'm writing about this:</P> |
|
|
|
725 |
|
|
|
726 <BLOCKQUOTE> |
|
|
|
727 |
|
|
|
728 <H4>Random Access</H4> |
|
|
|
729 |
|
|
|
730 <P>Pro: Wouldn't it be nice if (WIBNIF) SFTP had a way of |
|
|
|
731 accessing parts of a file?</P> |
|
|
|
732 |
|
|
|
733 <P>Con: Forget it, this is supposed to be SIMPLE file transfer. |
|
|
|
734 If you need random access use real <ABBR TITLE="File Transport Protocol">FTP</ABBR> (oops, real <ABBR TITLE="File Transport Protocol">FTP</ABBR> doesn't |
|
|
|
735 have random access either – invent another protocol?).</P> |
|
|
|
736 |
|
|
|
737 <P>Resolution: I have not made any provision for Random Access.</P> |
|
|
|
738 |
|
|
|
739 </BLOCKQUOTE> |
|
|
|
740 |
|
|
|
741 <P>That “other protocol” would take several more years to be invented, |
|
|
|
742 and then take over the networking world.</P> |
|
|
|
743 </content> |
|
|
|
744 </entry> |
|
|
|
745 <entry> |
|
|
|
746 <id>tag:boston.conman.org,2023-01-12:/2023/01/12.1</id> |
|
|
|
747 <title type="text">It's probably a good thing some malformed URLs are considered “valid”</title> |
|
|
|
748 <updated>2023-01-13T04:01:30Z</updated> |
|
|
|
749 <link rel="alternate" type="text/html" hreflang="en-US" href="https://boston.conman.org/2023/01/12.1" /> |
|
|
|
750 <link rel="alternate" type="text/gemini" hreflang="en-US" href="gemini://gemini.conman.org/boston/2023/01/12.1" /> |
|
|
|
751 <link rel="alternate" type="text/plain" hreflang="en-US" href="gopher://gopher.conman.org/0Phlog:2023/01/12.1" /> |
|
|
|
752 <category term="testing"/> |
|
|
|
753 <category term="debugging"/> |
|
|
|
754 <category term="URLs"/> |
|
|
|
755 <category term="malformed URLs"/> |
|
|
|
756 |
|
|
|
757 <content type="html"><P>It seems it's all too easy to generate <A CLASS="local" HREF="/2023/01/11.1">double slashes in the path component</A> of a <ABBR TITLE="Uniform Resource Locator">URL</ABBR>, |
|
|
|
758 because I received via email a report that my |
|
|
|
759 <A CLASS="local" HREF="/bostondiaries.rss">current</A> |
|
|
|
760 <A CLASS="local" HREF="/index.atom">feed</A> |
|
|
|
761 <A CLASS="local" HREF="/index.json">files</A> |
|
|
|
762 all had that issue.</P> |
|
|
|
763 |
|
|
|
764 <P>Sigh.</P> |
|
|
|
765 |
|
|
|
766 <P>I made a change a few months ago in how I internally store the base <ABBR TITLE="Uniform Resource Locator">URL</ABBR> of my blog. |
|
|
|
767 It used to be that I did not store the trailing slash |
|
|
|
768 (so that <CODE>"https://boston.conman.org/"</CODE> would be stored as <CODE>"https://bost.conman.org"</CODE>) |
|
|
|
769 so I had code to keep adding it back in when generating links. |
|
|
|
770 I changed the code to store the tailing slash, |
|
|
|
771 but missed one section of code because I don't subscribe to any of my feed files and didn't notice the issue.</P> |
|
|
|
772 |
|
|
|
773 <P>I also fixed an actual crashing bug. |
|
|
|
774 All I have to say about that is that web robots are quite good at generating <A CLASS="local" HREF="/2019/07/09.1">really garbage requests</A> using a <A CLASS="external" HREF="https://www.iana.org/assignments/http-methods/http-methods.xhtml">variety of methods</A>—it's like free <A CLASS="external" HREF="https://en.wikipedia.org/wiki/Fuzzing">fuzz testing</A>! |
|
|
|
775 Woo hoo! |
|
|
|
776 <EM>Sob!</EM> </P> |
|
|
|
777 </content> |
|
|
|
778 </entry> |
|
|
|
779 <entry> |
|
|
|
780 <id>tag:boston.conman.org,2023-01-11:/2023/01/11.1</id> |
|
|
|
781 <title type="text">It's apparently a valid URL, despite it being malformed in my opinion</title> |
|
|
|
782 <updated>2023-01-11T21:35:07Z</updated> |
|
|
|
783 <link rel="alternate" type="text/html" hreflang="en-US" href="https://boston.conman.org/2023/01/11.1" /> |
|
|
|
784 <link rel="alternate" type="text/gemini" hreflang="en-US" href="gemini://gemini.conman.org/boston/2023/01/11.1" /> |
|
|
|
785 <link rel="alternate" type="text/plain" hreflang="en-US" href="gopher://gopher.conman.org/0Phlog:2023/01/11.1" /> |
|
|
|
786 <category term="URLs"/> |
|
|
|
787 <category term="parsing URLs"/> |
|
|
|
788 <category term="WhatWG living standard"/> |
|
|
|
789 <category term="bug"/> |
|
|
|
790 |
|
|
|
791 <content type="html"><P>I've had a <A CLASS="local" HREF="/2023/01/02.1">few</A> <A CLASS="local" HREF="/2023/01/08.1">posts</A> make it to the front page of <A CLASS="external" HREF="https://lobste.rs/">Lobsters</A>. |
|
|
|
792 Lobsters supports <A CLASS="external" HREF="https://www.w3.org/TR/webmention/">webmention</A>, |
|
|
|
793 yet I never received a webmention for those two posts. |
|
|
|
794 I checked the logs and yes, |
|
|
|
795 they were received but I rejected them with a “bad request.” |
|
|
|
796 It took a bit of sleuthing, |
|
|
|
797 but I found the root cause—the <ABBR TITLE="Uniform Resource Locator">URL</ABBR> of my post was, |
|
|
|
798 accoring to my code, |
|
|
|
799 invalid. |
|
|
|
800 Lobsters was sending in a <ABBR TITLE="Uniform Resource Locator">URL</ABBR> of the form <CODE>https://boston.conman.org//2023/01/02.1</CODE>—notice the two slashes in front of the path. |
|
|
|
801 My code was having none of that.</P> |
|
|
|
802 |
|
|
|
803 <P>I'm not sure why Lobsters was sending a <ABBR TITLE="Uniform Resource Locator">URL</ABBR> of that form as <A CLASS="local" HREF="/2022/12/14.1">previous</A> <A CLASS="local" HREF="/2022/12/21.1">webmentions</A> worked fine, |
|
|
|
804 but when I checked <A CLASS="external" HREF="https://lobste.rs/domains/boston.conman.org">previous submissions to Lobsters</A> I saw some of the links had a double slash in the path portion. |
|
|
|
805 As it's considered valid by the <A CLASS="external" HREF="https://url.spec.whatwg.org/#urls">What Working Group? “living standard,”</A> |
|
|
|
806 I ended up having to accept what I consider a malformed <ABBR TITLE="Uniform Resource Locator">URL</ABBR>.</P> |
|
|
|
807 |
|
|
|
808 <P>Sigh.</P> |
|
|
|
809 </content> |
|
|
|
810 </entry> |
|
|
|
811 <entry> |
|
|
|
812 <id>tag:boston.conman.org,2023-01-09:/2023/01/09.1</id> |
|
|
|
813 <title type="text">An epiphany about bloated web pages might be the result of a dumb network</title> |
|
|
|
814 <updated>2023-01-17T06:30:14Z</updated> |
|
|
|
815 <link rel="alternate" type="text/html" hreflang="en-US" href="https://boston.conman.org/2023/01/09.1" /> |
|
|
|
816 <link rel="alternate" type="text/gemini" hreflang="en-US" href="gemini://gemini.conman.org/boston/2023/01/09.1" /> |
|
|
|
817 <link rel="alternate" type="text/plain" hreflang="en-US" href="gopher://gopher.conman.org/0Phlog:2023/01/09.1" /> |
|
|
|
818 <category term="networks"/> |
|
|
|
819 <category term="dumb networks"/> |
|
|
|
820 <category term="smart networks"/> |
|
|
|
821 <category term="Internet"/> |
|
|
|
822 <category term="telephony"/> |
|
|
|
823 <category term="the web"/> |
|
|
|
824 <category term="C2 Wiki"/> |
|
|
|
825 <category term="John Carmack quote"/> |
|
|
|
826 |
|
|
|
827 <content type="html"><P>I was scared by an epiphany I had the other day when I read a quote by <A CLASS="external" HREF="https://en.wikipedia.org/wiki/John_Carmack">John Carmack</A>. |
|
|
|
828 But before I get to the quote and the ephiphany, |
|
|
|
829 I need to give some background to understand where I was, |
|
|
|
830 and where I am.</P> |
|
|
|
831 |
|
|
|
832 <P>First, |
|
|
|
833 for the years I was working for The Corporation |
|
|
|
834 (and later, |
|
|
|
835 The Enterprise), |
|
|
|
836 I was in essense, |
|
|
|
837 working in telephony networking, |
|
|
|
838 and I was never a fan of telephony networking |
|
|
|
839 (the <A CLASS="local" HREF="/2012/01/31.1">Protocol Stack From Hell</A> notwithstanding).</P> |
|
|
|
840 |
|
|
|
841 <P>Basically, |
|
|
|
842 the paradigm in telephony is a “smart network” and a “dumb edge.” |
|
|
|
843 All the “intelligence” of an application on telephony is on the network side of things—the “edge” here being the device the end user interacts with. |
|
|
|
844 In the old days, |
|
|
|
845 this was an on-off switch, |
|
|
|
846 a microphone and a speaker. |
|
|
|
847 Later models this device included a tone generator. |
|
|
|
848 So any features needed to be handled on the network side because the end user device |
|
|
|
849 (the “edge”) |
|
|
|
850 was incapable of doing much at all. |
|
|
|
851 If a person wants a new feature, |
|
|
|
852 they have to get it implemented on the entire network, |
|
|
|
853 or it's effectively not supported at all |
|
|
|
854 (because there's not much one can do with an on-off switch, |
|
|
|
855 speaker, |
|
|
|
856 microphone and a tone generator).</P> |
|
|
|
857 |
|
|
|
858 <P>Contrast this with the Internet—it's a “dumb network” with a “smart edge”—all the network has to do is sling packets back and forth, |
|
|
|
859 not concerning itself with the contents. |
|
|
|
860 The “edge” in this case is (was?) a general purpose computer that can be programmed to do just about anything. |
|
|
|
861 So if a person wants a new feature, |
|
|
|
862 all that's needed is a program on at least two endpoints and said feature exists—there's no need to inform the rest of the network of it, |
|
|
|
863 as long as the “dumb network” can do its job and sling the data between the two endpoints. |
|
|
|
864 Want an alternative to the web? |
|
|
|
865 <A CLASS="external" HREF="https://gemini.circumlunar.space/">Just do it</A>. |
|
|
|
866 Want an alternative to <ABBR TITLE="Internet Relay Chat">IRC</ABBR>? |
|
|
|
867 <A CLASS="external" HREF="https://www.lifewire.com/what-is-aim-1949607">Just</A> |
|
|
|
868 <A CLASS="external" HREF="https://www.jabber.org/">do</A> |
|
|
|
869 <A CLASS="external" HREF="https://www.signal.org/">it</A>.</P> |
|
|
|
870 |
|
|
|
871 <P>Second, |
|
|
|
872 I have always had a hard time understanding why people keep insisting on writing bespoke web browsers in JavaScript that just show text, |
|
|
|
873 when the user is already using a web browser has already been written to display text. |
|
|
|
874 The poster child for this |
|
|
|
875 (in my opinion) |
|
|
|
876 is the <A CLASS="external" HREF="https://wiki.c2.com/">Portland Pattern Repository</A>, |
|
|
|
877 a large repository of programming wisdom, |
|
|
|
878 that, |
|
|
|
879 for whatever reason, |
|
|
|
880 Ward Cunningham |
|
|
|
881 (creator of the site) |
|
|
|
882 felt that a normal web browser wasn't good enough to browse a text-only website and thus demands the latest and greatest in JavaScript conformance to view text. |
|
|
|
883 He's free to do so, |
|
|
|
884 but I find it annoying that I can no longer read a site I enjoyed |
|
|
|
885 (and even contributed to), |
|
|
|
886 just because I haven't updated my browser for the past twenty minutes. |
|
|
|
887 I'm not even asking to participate in editing the site any more, |
|
|
|
888 I just want to <EM>read</EM> it!</P> |
|
|
|
889 |
|
|
|
890 <P>And finally we get to the John Carmack quote:</P> |
|
|
|
891 |
|
|
|
892 <BLOCKQUOTE CITE="https://twitter.com/id_aa_carmack/status/1350672098029694998"> |
|
|
|
893 |
|
|
|
894 <P>It is amusing to consider how much of the world you could serve |
|
|
|
895 something like Twitter to from a single beefy server if it really |
|
|
|
896 was just shuffling tweet sized buffers to network offload cards. |
|
|
|
897 Smart clients instead of web pages could make a very large |
|
|
|
898 difference.</P> |
|
|
|
899 |
|
|
|
900 <P CLASS="cite"><CITE><A CLASS="external" HREF="https://twitter.com/id_aa_carmack/status/1350672098029694998">John Carmack Tweet</A></CITE></P> |
|
|
|
901 |
|
|
|
902 </BLOCKQUOTE> |
|
|
|
903 |
|
|
|
904 <P>Oh crap.</P> |
|
|
|
905 |
|
|
|
906 <P>“Smart clients”—“smart edge.” </P> |
|
|
|
907 |
|
|
|
908 <P>“Web pages”—“data.” </P> |
|
|
|
909 |
|
|
|
910 <P>My dislike of the Portland Pattern Repository just got ran over by my liking of dumb networks and smart edges.</P> |
|
|
|
911 |
|
|
|
912 <P>Ward Cunningham wants a smarter edge to view his site |
|
|
|
913 (and to “improve server performance” if you read the comments in the web page returned from the site) |
|
|
|
914 and I can't begrudge him that—<EM>I</EM> like smart edges! |
|
|
|
915 It makes more sense to me than a smart network. |
|
|
|
916 But at the same time, |
|
|
|
917 I want a web site to just return text to a “dumb browser,” |
|
|
|
918 even if the browser I'm using is not particularly dumb.</P> |
|
|
|
919 |
|
|
|
920 <P>Do we, |
|
|
|
921 in fact, |
|
|
|
922 have too much intelligence in web servers? |
|
|
|
923 Do we want to push all the intelligence to the client? |
|
|
|
924 Do I have to reconcile my love of simple web clients and intelligent web servers with my love of the dumb network and smart edges? |
|
|
|
925 (And to spell it out—the “network” in this analogy is the web server and the “edge” is the web browser) |
|
|
|
926 Where does the simplicity need to reside?</P> |
|
|
|
927 </content> |
|
|
|
928 </entry> |
|
|
|
929 <entry> |
|
|
|
930 <id>tag:boston.conman.org,2023-01-08:/2023/01/08.1</id> |
|
|
|
931 <title type="text">Today's date happens more frequently on Sunday than any other day of the week</title> |
|
|
|
932 <updated>2023-01-08T05:25:22Z</updated> |
|
|
|
933 <link rel="alternate" type="text/html" hreflang="en-US" href="https://boston.conman.org/2023/01/08.1" /> |
|
|
|
934 <link rel="alternate" type="text/gemini" hreflang="en-US" href="gemini://gemini.conman.org/boston/2023/01/08.1" /> |
|
|
|
935 <link rel="alternate" type="text/plain" hreflang="en-US" href="gopher://gopher.conman.org/0Phlog:2023/01/08.1" /> |
|
|
|
936 <category term="frequency of dates on days of weeks"/> |
|
|
|
937 <category term="somebody's birthday"/> |
|
|
|
938 |
|
|
|
939 <content type="html"><P><A CLASS="local" HREF="/2018/01/08.1">Five years ago</A>, |
|
|
|
940 I posted that January 8<SUP>th</SUP> is less like to occur on Monday. |
|
|
|
941 At the time, |
|
|
|
942 I just accepted it, |
|
|
|
943 but when I recently came across that post a few days ago, |
|
|
|
944 I figured I should actually see if that's true. |
|
|
|
945 I ran the numbers from 1583 |
|
|
|
946 (the first full year under the Gregorian calendar) to now:</P> |
|
|
|
947 |
|
|
|
948 <TABLE> |
|
|
|
949 <CAPTION>Number of times January 8<SUP>th</SUP> fell on a day of the week, since 1583</CAPTION> |
|
|
|
950 <TBODY> |
|
|
|
951 <TR><TD>Sunday</TD> <TD CLASS="num">65</TD></TR> |
|
|
|
952 <TR><TD>Friday</TD> <TD CLASS="num">64</TD></TR> |
|
|
|
953 <TR><TD>Tuesday</TD> <TD CLASS="num">64</TD></TR> |
|
|
|
954 <TR><TD>Wednesday</TD> <TD CLASS="num">63</TD></TR> |
|
|
|
955 <TR><TD>Thursday</TD> <TD CLASS="num">62</TD></TR> |
|
|
|
956 <TR><TD>Saturday</TD> <TD CLASS="num">62</TD></TR> |
|
|
|
957 <TR><TD>Monday</TD> <TD CLASS="num">61</TD></TR> |
|
|
|
958 </TBODY> |
|
|
|
959 </TABLE> |
|
|
|
960 |
|
|
|
961 |
|
|
|
962 <P>What are the odds I'd find this result on a Sunday? |
|
|
|
963 <SPAN CLASS="comments">[High, given your results. —Editor]</SPAN> |
|
|
|
964 <SPAN CLASS="comments">[Har har. —Sean]</SPAN> |
|
|
|
965 I was expecting the results to be nearly equal. |
|
|
|
966 I also find it funny that the actual average, |
|
|
|
967 63, |
|
|
|
968 happens on Wednesday, |
|
|
|
969 the most average day of the week |
|
|
|
970 (you see, Wednesday being in the middle of the week and the average is … oh bother!). |
|
|
|
971 I wonder what causes this?</P> |
|
|
|
972 </content> |
|
|
|
973 </entry> |
|
|
|
974 <entry> |
|
|
|
975 <id>tag:boston.conman.org,2023-01-06:/2023/01/06.1</id> |
|
|
|
976 <title type="text">“The street finds its own uses for things.”</title> |
|
|
|
977 <updated>2023-01-09T03:18:26Z</updated> |
|
|
|
978 <link rel="alternate" type="text/html" hreflang="en-US" href="https://boston.conman.org/2023/01/06.1" /> |
|
|
|
979 <link rel="alternate" type="text/gemini" hreflang="en-US" href="gemini://gemini.conman.org/boston/2023/01/06.1" /> |
|
|
|
980 <link rel="alternate" type="text/plain" hreflang="en-US" href="gopher://gopher.conman.org/0Phlog:2023/01/06.1" /> |
|
|
|
981 <category term="Gemini"/> |
|
|
|
982 <category term="toxic Gemini community"/> |
|
|
|
983 <category term="naysayers"/> |
|
|
|
984 <category term="Gemini support"/> |
|
|
|
985 <category term="William Gibson quote"/> |
|
|
|
986 |
|
|
|
987 <content type="html"><P>There's a little bit of pushback on the whole <A CLASS="external" HREF="https://codeberg.org/bacardi55/gemini-mentions-rfc">Gemini mentions</A> concept. |
|
|
|
988 Sandra wrote:</P> |
|
|
|
989 |
|
|
|
990 <BLOCKQUOTE CITE="gemini://idiomdrottning.org/gem-mentions" TITLE="Gemini mention, an ongoing discussion"> |
|
|
|
991 |
|
|
|
992 <P>I had Atom and was pretty happy with that and people were like |
|
|
|
993 “why don’t you implement Gemini too” and I did and it was a bee and |
|
|
|
994 a half because back then almost no Gemini server supported different |
|
|
|
995 languages for different pages without serious hoops and then gmisub |
|
|
|
996 and then broken redirects and then dir traversal and then this and |
|
|
|
997 then that and then the other and after a while it’s all hacking and |
|
|
|
998 no writing.</P> |
|
|
|
999 |
|
|
|
1000 <P>…</P> |
|
|
|
1001 |
|
|
|
1002 <P>I really, really don’t wanna implement this and that means either |
|
|
|
1003 there’s a non-zero amount of grumpy grognards who don’t wanna do it |
|
|
|
1004 (in which case you’re gonna have to use the other methods anyway, |
|
|
|
1005 like Cosmos), so there’s no point in doing it, or I’m gonna get |
|
|
|
1006 dragged kicking and screaming into doing it which I really hope does |
|
|
|
1007 not happen.</P> |
|
|
|
1008 |
|
|
|
1009 <P>I think bacardi55 is cool and I haven’t wanted to say anything about |
|
|
|
1010 the project out of the “if you can’ [sic] say anything nice…” principle |
|
|
|
1011 but then it seemed as if it were picking up steam and getting |
|
|
|
1012 implemented.</P> |
|
|
|
1013 |
|
|
|
1014 <P CLASS="cite"><CITE><A CLASS="external" HREF="gemini://idiomdrottning.org/gem-mentions">Gemini mention, an ongoing discussion</A></CITE></P> |
|
|
|
1015 |
|
|
|
1016 </BLOCKQUOTE> |
|
|
|
1017 |
|
|
|
1018 <P>I'm not familiar with the “was a bee and a half” idiom, |
|
|
|
1019 but I suspect it means something like “annoying,” |
|
|
|
1020 given the context. |
|
|
|
1021 And if supporting Gemini was “annoying” then why even continue with it? |
|
|
|
1022 The issues brought up, |
|
|
|
1023 like the lack of per-page language support, |
|
|
|
1024 were found by people trying to use Gemini, |
|
|
|
1025 finding issues, |
|
|
|
1026 and solving the issues. |
|
|
|
1027 It would have been easy for most of the issues to be ignored, |
|
|
|
1028 thanks to Gemini's “simplicity of implementatin <SPAN LANG="de" TITLE="above all">über alles</SPAN>.” |
|
|
|
1029 That would not have been a good idea long term, |
|
|
|
1030 and thus, |
|
|
|
1031 Gemini gets complex.</P> |
|
|
|
1032 |
|
|
|
1033 <P>And Gemini mentions aren't mandatory, |
|
|
|
1034 just like not every website supports <A CLASS="external" HREF="https://www.w3.org/TR/webmention/">webmentions</A>. |
|
|
|
1035 Don't like it? |
|
|
|
1036 Don't bother with it. |
|
|
|
1037 Taken to the limit, |
|
|
|
1038 “I really hope does not happen” applied to Gemini means Gemini doesn't exist |
|
|
|
1039 (and there are plenty of people who questioned the concept of Gemini).</P> |
|
|
|
1040 |
|
|
|
1041 <P>And as bacardi55 said:</P> |
|
|
|
1042 |
|
|
|
1043 <BLOCKQUOTE CITE="gemini://gmi.bacardi55.io/gemlog/2022/02/28/why-did-i-work-on-gemini-mention/" TITLE="Why did I work on gemini mention"> |
|
|
|
1044 |
|
|
|
1045 <P>The main reason I "jumped" into this "issue" can be reduced to one sentence: I did it for <EM>me</EM> :)</P> |
|
|
|
1046 |
|
|
|
1047 <P CLASS="cite"><CITE><A CLASS="external" HREF="gemini://gmi.bacardi55.io/gemlog/2022/02/28/why-did-i-work-on-gemini-mention/">Why did I work on gemini mention</A></CITE></P> |
|
|
|
1048 |
|
|
|
1049 </BLOCKQUOTE> |
|
|
|
1050 |
|
|
|
1051 <P>If others find it useful, |
|
|
|
1052 so be it. |
|
|
|
1053 <!-- And at times, I find the Gemini community to be rather toxic. I'm trying to avoid that myself. --> |
|
|
|
1054 As William Gibson said: “The street finds its own uses for things.” |
|
|
|
1055 Besides, |
|
|
|
1056 given my past experience with the Gemini community<!-- who tend to crucify those that do the actual programming -->, |
|
|
|
1057 I think there will be only two sites supporting Gemini mentions.</P> |
|
|
|
1058 </content> |
|
|
|
1059 </entry> |
|
|
|
1060 <entry> |
|
|
|
1061 <id>tag:boston.conman.org,2023-01-04:/2023/01/04.1</id> |
|
|
|
1062 <title type="text">Thoughts on an implementation of Gemini mentions</title> |
|
|
|
1063 <updated>2023-01-04T21:09:54Z</updated> |
|
|
|
1064 <link rel="alternate" type="text/html" hreflang="en-US" href="https://boston.conman.org/2023/01/04.1" /> |
|
|
|
1065 <link rel="alternate" type="text/gemini" hreflang="en-US" href="gemini://gemini.conman.org/boston/2023/01/04.1" /> |
|
|
|
1066 <link rel="alternate" type="text/plain" hreflang="en-US" href="gopher://gopher.conman.org/0Phlog:2023/01/04.1" /> |
|
|
|
1067 <category term="programming"/> |
|
|
|
1068 <category term="Gemini mentions"/> |
|
|
|
1069 |
|
|
|
1070 <content type="html"><P>The <A CLASS="local" HREF="/2023/01/02.2">other day</A> I didn't have much to say about the <A CLASS="external" HREF="https://codeberg.org/bacardi55/gemini-mentions-rfc">Gemini Mentions</A> proposal. |
|
|
|
1071 Now that I've implemented it for my Gemini site |
|
|
|
1072 (the <A CLASS="site" HREF="gemini://gemini.conman.org/extensions/GLV-1/handlers/mention.lua">code</A> has been upated extensively since the other day), |
|
|
|
1073 <A CLASS="external" HREF="gemini://gmi.bacardi55.io/gemlog/2023/01/03/gemini-mention-coincidence/">I have more thoughts</A>.</P> |
|
|
|
1074 |
|
|
|
1075 <P>First, having the location locked to <CODE>/.well-known/mention</CODE> works fine for single-user sites, |
|
|
|
1076 but it doesn't work that well for sites that host multiple users under a single domain. |
|
|
|
1077 Alice who has pages under <CODE>gemini://example.com/alice/</CODE> and want to participate with Gemini mentions. |
|
|
|
1078 So might Dave under <CODE>gemini://example.com/dave/</CODE>. |
|
|
|
1079 Bob, |
|
|
|
1080 who has pages under <CODE>gemini://example.com/bob/</CODE> doesn't care, |
|
|
|
1081 nor does Carol, |
|
|
|
1082 under <CODE>gemini://example.com/carol/</CODE>. |
|
|
|
1083 How to manage <CODE>gemini://example.com/.well-known/mentions</CODE> where half the users want it, |
|
|
|
1084 and the other half don't? |
|
|
|
1085 Having the ability to specify individual endpoints, |
|
|
|
1086 say with a <ABBR TITLE="Common Gateway Interface">CGI</ABBR> script, |
|
|
|
1087 would at least let Alice and Dave participate without having to bug the <CODE>example.com</CODE> admin to install a service under a single location.</P> |
|
|
|
1088 |
|
|
|
1089 <P>Second, |
|
|
|
1090 not every person may want to have every page to receive a mention. |
|
|
|
1091 I know I don't—I want to restrict mentions to the blog portion of my Gemini site. |
|
|
|
1092 The proposal only states that “a capsule owner MUST implement a basic endpoint: <CODE>/.well-known/mention</CODE>,” |
|
|
|
1093 but it says nothing about limiting what pages can be the target of a mention. |
|
|
|
1094 I suppose having a link to <CODE>/.well-known/mentions</CODE> on a page could indicate that page can receive mentions, |
|
|
|
1095 but the implication is that the endpoint link doesn't have to be mentioned at all. |
|
|
|
1096 For now, |
|
|
|
1097 I just filter requests to my blog entries and for other pages I return a “bad request.” </P> |
|
|
|
1098 |
|
|
|
1099 <P>Third, |
|
|
|
1100 I'm still unsure about sending a single <ABBR TITLE="Uniform Resource Indicator">URI</ABBR>. |
|
|
|
1101 My implementation does scan the given <ABBR TITLE="Uniform Resource Indicator">URI</ABBR> for links to my blog, |
|
|
|
1102 and will grab the first link that matches a blog entry from the <ABBR TITLE="Uniform Resource Indicator">URI</ABBR> |
|
|
|
1103 (and ignores other links to my Gemini site—see point above). |
|
|
|
1104 Sending in two links, |
|
|
|
1105 as in a <A CLASS="external" HREF="https://www.w3.org/TR/webmention/">webmention</A> provides some form of check on the request.</P> |
|
|
|
1106 |
|
|
|
1107 <P>Fourth, |
|
|
|
1108 I don't check for the “RE:” in the link text as I don't think it's needed. |
|
|
|
1109 The specification implies it has to be “RE:” |
|
|
|
1110 (in all caps), |
|
|
|
1111 but I can see “Re:” and “re:” being used as well, |
|
|
|
1112 because humans are going to human and be lazy |
|
|
|
1113 (or trollish and use “rE:” just to mess with people; or not include it at |
|
|
|
1114 all).</P> |
|
|
|
1115 |
|
|
|
1116 <P>I also did a <A CLASS="site" HREF="gemini://gemini.conman.org/extensions/GLV-1/handlers/mention.lua">second implemenation</A> that addresses all these points |
|
|
|
1117 (and the <A CLASS="site" HREF="gemini://gemini.conman.org/extensions/GLV-1/handlers/gemmention.lua">code</A> for this version is very similar to the other one). |
|
|
|
1118 I guess I'll see which one becomes more popular.</P> |
|
|
|
1119 </content> |
|
|
|
1120 </entry> |
|
|
|
1121 |
|
|
|
1122 |
|
|
|
1123 </feed> |
|