Fix RSS
[git/dscho.git] / blog.rss
blob5412f1f288ba198d1d1ddfe793c906526bdcb799
1 <?xml version="1.0" encoding="utf-8"?>
2 <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
3 <channel>
4 <title>Dscho's blog</title>
5 <link>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html</link>
6 <atom:link href="http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=blog.rss" rel="self" type="application/rss+xml"/>
7 <description>A few stories told by Dscho</description>
8 <lastBuildDate>Sun, 25 Jan 2009 14:29:08 +0100</lastBuildDate>
9 <language>en-us</language>
10 <item>
11 <title>Regular diff with word coloring (as opposed to word diff)</title>
12 <link>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#1232888842</link>
13 <guid>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#1232888842</guid>
14 <pubDate>Sun, 25 Jan 2009 14:07:22 +0100</pubDate>
15 <description><![CDATA[Regular diff with word coloring (as opposed to word diff)
16 </p><p>
17 You know, if I were a bit faster with everything I do, I could do so much more!
18 </p><p>
19 For example, Junio's idea that you could keep showing a regular diff, only
20 coloring the words that have been removed/deleted.
21 </p><p>
22 Just imagine looking at the diff of a long line in LaTeX source code. It
23 should be much nicer to the eye to see the complete removed/added sentences
24 instead of one sentence with colored words in between, disrupting your read
25 flow.
26 </p><p>
27 Compare these two versions:
28 </p><p>
29 Regular diff with colored words:
30 <blockquote><tt>
31 -This sentence has a <font color=red>tyop</font> in it.<br>
32 +This sentence has a <font color=green>typo</font> in it.<br>
33 </tt></blockquote>
34 </p><p>
35 Word diff:
36 <blockquote><tt>
37 This sentence has a <font color=red>tyop</font><font color=green>typo</font> in it.<br>
38 </tt></blockquote>
39 </p><p>
40 And it should not be hard to do at all!
41 </p><p>
42 In <i>diff&#95;words&#95;show()</i>, we basically get the minus lines as
43 <i>diff&#95;words->minus</i> and the plus lines as <i>diff&#95;words->plus</i>. The
44 function then prepares the word lists and calls the xdiff engine to do all the
45 hard work, analyzing the result from xdiff and printing the lines in
46 <i>fn&#95;out&#95;diff&#95;words&#95;aux()</i>.
47 </p><p>
48 So all that would have to be changed would be to <u>record</u> the positions
49 of the removed/added words instead of outputting them, and at the end printing
50 the minus/plus buffers using the recorded information to color the words.
51 </p><p>
52 This would involve
53 </p><p>
54 <ul>
55 <li>adding two new members holding the offsets in the <i>diff&#95;words</i>
56 struct,
57 <li>having a special handling for that mode in
58 <i>fn&#95;out&#95;diff&#95;words&#95;aux()</i> that appends the offsets and
59 returns,
60 <li>adding a function <i>show&#95;lines&#95;with&#95;colored&#95;words()</i> that
61 outputs a buffer with a given prefix ('-' or '+') and coloring the words at
62 given offsets with a given color,
63 <li>modify <i>diff&#95;words&#95;show()</i> to call that function for the "special
64 case: only removal" and at the end of the function, and
65 <li> disabling the <i>fwrite()</i> at the end of <i>diff<u>words</u>show()</i> for that
66 mode.
67 </ul>
68 </p><p>
69 Of course, the hardest part is to find a nice user interface for that. Maybe
70 <i>--colored-words</i>? &#x263a;]]></description>
71 </item>
72 <item>
73 <title>Ideas for a major revamp of the <i>--preserve-merges</i> handling in <i>git rebase</i></title>
74 <link>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#1232828715</link>
75 <guid>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#1232828715</guid>
76 <pubDate>Sat, 24 Jan 2009 21:25:15 +0100</pubDate>
77 <description><![CDATA[Ideas for a major revamp of the <i>--preserve-merges</i> handling in <i>git rebase</i>
78 </p><p>
79 As probably everybody agrees, the code to preserve merges is a big mess
80 right now.
81 </p><p>
82 Worse, the whole concept of "pick <merge-sha1>" just does not fly well.
83 </p><p>
84 So I started a <u>major</u> cleanup, which happens to reduce the code very
85 nicely so far.
86 </p><p>
87 It will take a few days to flesh out, I guess, but these are the major
88 ideas of my work:
89 </p><p>
90 <b>pick $sha1</b><br>
91 <blockquote>will only work on non-merges in the future.</blockquote>
92 <b>merge $sha1 [$sha1...] was $sha1 Merge ...</b><br>
93 <blockquote>will merge the given list of commits into the current HEAD, for
94 the user's reference and to keep up-to-date what was rewritten,
95 the original merge is shown after the keyword "was" (which is not
96 a valid SHA-1, luckily).</blockquote>
97 <b>goto $sha1</b><br>
98 <blockquote>will reset the HEAD to the given commit.</blockquote>
99 <b>$sha1'</b><br>
100 <blockquote>for merge and goto, if a $sha1 ends in a single quote, the
101 rewritten commit is substituted (if there is one).</blockquote>
102 </p><p>
103 Example:
104 </p><p>
105 <pre>
106 A - B - - - E
108 C - D
109 </pre>
110 </p><p>
111 could yield this TODO script:
112 </p><p>
113 <pre>
114 pick A
115 pick C
116 pick D
117 goto A'
118 pick B
119 merge D' was E
120 </pre>
121 </p><p>
122 This should lead to a much more intuitive user experience.
123 </p><p>
124 I am very sorry if somebody actually scripted <i>rebase -i -p</i> (by setting
125 GIT_EDITOR with a script), but I am very certain that this cleanup is
126 absolutely necessary to make <i>rebase -i -p</i> useful.]]></description>
127 </item>
128 <item>
129 <title>Thoughts about <i>interactive rebase</i></title>
130 <link>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#1232778113</link>
131 <guid>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#1232778113</guid>
132 <pubDate>Sat, 24 Jan 2009 07:21:53 +0100</pubDate>
133 <description><![CDATA[Thoughts about <i>interactive rebase</i>
134 </p><p>
135 Somebody mentioned that my <i>my-next</i> branch is a mess, as it mixes all
136 kinds of topics.
137 </p><p>
138 That is undeniably true, however, there is a good reason that I do not
139 have a lot of topic branches: I work on more than just one computer.
140 </p><p>
141 To make sure that I do not lose a commit by mistake, I always <i>rebase -i</i>
142 the <i>my-next</i> branch of the computer I happen to work on on top of the
143 <i>my-next</i> branch I fetch from <a href=http://repo.or.cz>repo.or.cz</a>.
144 </p><p>
145 To rebase a lot of topic branches at the same time seems a bit complicated.
146 But that is actually what the <i>-p</i> option (preserve merges) is all about.
147 </p><p>
148 The only problem is that the code for <i>rebase -i -p</i> has been messed up
149 recently, quite successfully, I might add.
150 </p><p>
151 Worse, some people are pushing for a completely and total unintuitive syntax.
152 </p><p>
153 So maybe I will start to work on <i>-p</i> again, for my own use (I should learn
154 to heed the principle more: work on things I can use myself).
155 </p><p>
156 My current idea is to implement a "goto" statement that will jump to another
157 commit. To make it easily usable, I will add the semantics that "goto" will
158 always try to go to the <u>rewritten</u> version of the given commit; if the user
159 wanted to have the original commit, she has to paste the unabbreviated commit
160 name.
161 </p><p>
162 The more I think about it, the more I actually like this idea &#x263a;
163 </p><p>
164 Of course, working on this little project means that I will have to cope with
165 that ugly code again. *urgh*]]></description>
166 </item>
167 <item>
168 <title>Git Logos</title>
169 <link>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#1232745071</link>
170 <guid>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#1232745071</guid>
171 <pubDate>Fri, 23 Jan 2009 22:11:11 +0100</pubDate>
172 <description><![CDATA[Git Logos
173 </p><p>
174 The other day, when I did not exactly have too much time on my hands, but
175 definitely too much motivation, I played around creating several logos.
176 </p><p>
177 An ambigram (if you turn it 180 degrees around the appropriate axis, it looks
178 exactly the same as unrotated):
179 </p><p>
180 <center>
181 <table border=0>
182 <tr>
183 <td align=center>
184 <embed type="image/svg+xml"
185 src="dscho.git?a=blob_plain;hb=aaa9edafbe6ca5349ad7b36848fb294e5f4fc529;f=git-ambigram.svg" width=317 />
186 </td>
187 </tr>
188 <tr>
189 <td align=center>
190 <a href=dscho.git?a=blob_plain;hb=aaa9edafbe6ca5349ad7b36848fb294e5f4fc529;f=git-ambigram.svg>git-ambigram.svg</a>
191 </td>
192 </tr>
193 </table>
194 </center>
195 </p><p>
196 A play on gitk:
197 </p><p>
198 <center>
199 <table border=0>
200 <tr>
201 <td align=center>
202 <embed type="image/svg+xml"
203 src="dscho.git?a=blob_plain;hb=aaa9edafbe6ca5349ad7b36848fb294e5f4fc529;f=git-gitk-logo.svg" width=325 />
204 </td>
205 </tr>
206 <tr>
207 <td align=center>
208 <a href=dscho.git?a=blob_plain;hb=aaa9edafbe6ca5349ad7b36848fb294e5f4fc529;f=git-gitk-logo.svg>git-gitk-logo.svg</a>
209 </td>
210 </tr>
211 </table>
212 </center>
213 </p><p>
214 A play on the test you have to go through before getting new glasses:
215 </p><p>
216 <center>
217 <table border=0>
218 <tr>
219 <td align=center>
220 <embed type="image/svg+xml"
221 src="dscho.git?a=blob_plain;hb=aaa9edafbe6ca5349ad7b36848fb294e5f4fc529;f=git-visual-test.svg" width=325 />
222 </td>
223 </tr>
224 <tr>
225 <td align=center>
226 <a href=dscho.git?a=blob_plain;hb=aaa9edafbe6ca5349ad7b36848fb294e5f4fc529;f=git-visual-test.svg>git-visual-test.svg</a>
227 </td>
228 </tr>
229 </table>
230 </center>
231 </p><p>
232 This is Henrik Nyh's logo (converted to .svg by yours truly):
233 </p><p>
234 <center>
235 <table border=0>
236 <tr>
237 <td align=center>
238 <embed type="image/svg+xml"
239 src="dscho.git?a=blob_plain;hb=aaa9edafbe6ca5349ad7b36848fb294e5f4fc529;f=gitlogo.svg" width=165 />
240 </td>
241 </tr>
242 <tr>
243 <td align=center>
244 <a href=dscho.git?a=blob_plain;hb=aaa9edafbe6ca5349ad7b36848fb294e5f4fc529;f=gitlogo.svg>gitlogo.svg</a>
245 </td>
246 </tr>
247 </table>
248 </center>
249 </p><p>
250 And of course, the original logo...
251 </p><p>
252 <center>
253 <table border=0>
254 <tr>
255 <td align=center>
256 <embed type="image/svg+xml"
257 src="dscho.git?a=blob_plain;hb=aaa9edafbe6ca5349ad7b36848fb294e5f4fc529;f=original-git-logo.svg" width=165 />
258 </td>
259 </tr>
260 <tr>
261 <td align=center>
262 <a href=dscho.git?a=blob_plain;hb=aaa9edafbe6ca5349ad7b36848fb294e5f4fc529;f=original-git-logo.svg>original-git-logo.svg</a>
263 </td>
264 </tr>
265 </table>
266 </center>
267 </p><p>
268 Maybe some of you have fun with them...]]></description>
269 </item>
270 <item>
271 <title>How to deal with files that are not source code when merging</title>
272 <link>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#1232742582</link>
273 <guid>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#1232742582</guid>
274 <pubDate>Fri, 23 Jan 2009 21:29:42 +0100</pubDate>
275 <description><![CDATA[How to deal with files that are not source code when merging
276 </p><p>
277 Last week, one of the mentors of last year's <a href=http://code.google.com/soc>
278 Summer of Code</a> mentioned the idea that merge strategies are in dear need
279 for file types other than source code.
280 </p><p>
281 I think this idea is awesome, even if I cannot bring myself to believe that
282 any of the file types would make a good Summer of Code project: either they
283 are too complicated (think raster images such as .png or even .jpg), or they
284 are too straight-forward (think LaTeX, where all that is needed is a good
285 graphical user interface to inspect the three versions: <i>ours</i>, <i>baseline</i>
286 and <i>theirs</i>).
287 </p><p>
288 The LaTeX idea would be a good project for me to mentor, though: I have a
289 pretty clear idea how it should be done; I just lack the time (and motivation)
290 to do it myself.
291 </p><p>
292 As for OpenOffice text documents, vector graphics (such as .svg), or more
293 specific data such as spreadsheets, I think that all of these are really
294 difficult: the problem is not so much the implementation (i.e. the programming
295 part of it), but the design.
296 </p><p>
297 This design should involve much more than a Summer of Code project is about:
298 you would need to survey users' expectations, and at least the mentor -- if
299 not the student -- would need to be an expert in usability questions, which
300 is rather unlikely in the realm of Open Source.
301 </p><p>
302 Maybe this is the missing part in Open Source: we have many brilliant
303 programmers, but next to nobody with a good idea how to design intuitive
304 user interfaces.
305 </p><p>
306 That might be related to the fact that brilliant software engineers, as they
307 can be found in Open Source, are not exactly known for their social skills,
308 a human trait that seems to be a very important prerequisite for designing
309 intuitive user interfaces.
310 </p><p>
311 Well, I have <a href=http://git.or.cz/gitwiki/SoC2009Ideas#head-6188833471f79f277e162ef9fbe1592aa10b5f6c>
312 added</a> the proposal to Git's Summer of Code idea page on the Git Wiki; We will
313 see what comes out of it.]]></description>
314 </item>
315 <item>
316 <title>The UGFWIINI contest</title>
317 <link>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#1232626236</link>
318 <guid>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#1232626236</guid>
319 <pubDate>Thu, 22 Jan 2009 13:10:36 +0100</pubDate>
320 <description><![CDATA[The UGFWIINI contest
321 </p><p>
322 Just in case somebody finds this blog, here is a challenge. Inspired by my
323 own little hack (this blog), I announce the "Using Git For What It Is Not
324 Intended" contest.
325 </p><p>
326 And it is especially cool, since the acronym sounds cool! You might miss
327 this fact if you do no know that I pronounce the "F" like an "A" so that
328 it sounds cool.
329 </p><p>
330 This will be a running contest; whenever I have 10 valid applications, I
331 will announce a winner on the Git mailing list.
332 </p><p>
333 So, what accounts for a valid application?
334 </p><p>
335 <ul>
336 <li> You must use a Git program (the term is used loosely here, GitWeb is
337 considered a Git program, for example).
338 <li> The program must be intended for something completely different than
339 what you are using it for. E.g. GitWeb -- which was intended to let
340 you browse through the history using your web browser -- is used
341 to serve a blog to the wide world.
342 <li> You must be able to prove that you actually used the Git program to
343 the purpose you claim, preferably in a live demonstration like this
344 one.
345 <li> Nobody and nothing must be harmed in the process (except your
346 laughing muscle, that's okay).
347 </ul>
348 </p><p>
349 So, how does such an abuse look like?
350 </p><p>
351 <ul>
352 <li> ... like this blog.
353 <li> Managing your mail (in maildir format) in a Git repository.
354 <li> Finding duplicate files by
355 <table
356 border=1 bgcolor=white>
357 <tr><td bgcolor=lightblue colspan=3>
358 &nbsp;
359 </td></tr>
360 <tr><td>
361 <table cellspacing=5 border=0
362 style="color:black;">
363 <tr><td>
364 <pre>
365 $ git init
366 $ git add .
367 $ git ls-files --stage | sort -k2 | uniq -d -s7 -w40
368 </pre>
369 </td></tr>
370 </table>
371 </td></tr>
372 </table>
373 <li> Abusing the Git alias mechanism to call scripts defined directly in
374 the config.
375 </ul>
376 </p><p>
377 I am really looking forward to all of your submissions... *chuckles*
378 </p><p>]]></description>
379 </item>
380 <item>
381 <title>Top-posting</title>
382 <link>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#1232611542</link>
383 <guid>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#1232611542</guid>
384 <pubDate>Thu, 22 Jan 2009 09:05:42 +0100</pubDate>
385 <description><![CDATA[Top-posting
386 </p><p>
387 Okay, last post for a while. But this is something that is nagging me
388 tremendously. I should probably just let go, but in my deepest inner self,
389 really close to my heart, I refuse to believe that any human beings could
390 be incapable of certain degrees of reason.
391 </p><p>
392 Take the example of top-posting. Everybody who read a top-posted email
393 knows that you have to scroll down, possibly weeding through tons of
394 pages to find out what the heck the author of the last reply was replying
396 </p><p>
397 Never mind that it would take the author of the reply just a couple of
398 seconds to remove all the irrelevant stuff -- as she already knows what
399 is the relevant part, saving minutes, in case of mailing lists hours,
400 easily, to the readers who otherwise would have to discern what is
401 irrelevant and what is relevant first.
402 </p><p>
403 It is a horrible time waste. But of course not for the top-poster.
404 </p><p>
405 The problem is that I frequently run into such people, and when I write
406 them a polite mail, explaining to them that it is impolite to top-post,
407 and why, the answers I get sometimes make me check if the sky is still up
408 and the earth down. Yesterday was an example of such a dubitable
409 pleasure.
410 </p><p>
411 Most funny are the ridiculous attempts by those persons at explaining why
412 top-posting is <i>so</i> much superior to anything else.
413 </p><p>
414 Which is good, because if they were not that funny, they would be pretty sad.]]></description>
415 </item>
416 <item>
417 <title>Sverre's hat</title>
418 <link>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#1232607201</link>
419 <guid>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#1232607201</guid>
420 <pubDate>Thu, 22 Jan 2009 07:53:21 +0100</pubDate>
421 <description><![CDATA[Sverre's hat
422 </p><p>
423 The fun part about a blog is that you can talk about less technical stuff.
424 For example, Sverre's hat.
425 </p><p>
426 Let me start a bit earlier, so that you get the context.
427 </p><p>
428 Last year, at the <a href=http://git.or.cz/gitwiki/GitTogether>GitTogether</a>,
429 we had an <a href=http://en.wikipedia.org/wiki/Unconference>unconference style
430 conference</a>, which basically meant that it was our job to decide what
431 we want to talk about.
432 </p><p>
433 It turned out to be pretty hard, because there was so much we wanted to
434 discuss, and because we wanted to get to know each other, and we wanted to
435 do some hacking.
436 </p><p>
437 So to help us decide what subjects, and in which order we wanted to have
438 scheduled, Shawn opened a series on <a href=http://moderator.appspot.com/>
439 Google Moderator</a>, a nifty, yet simple application which allows a group
440 to agree quickly on an agenda.
441 </p><p>
442 It worked quite well; However, that little saboteur displayed his sense of
443 humor so overtly that some entertaining Gitter put the question "Should Sverre
444 wear a hat?" on the agenda.
445 </p><p>
446 Sure enough, the subject got voted up, and eventually, we got Sverre a hat:
447 </p><p>
448 <center><img src=dscho.git?a=blob_plain;hb=30319f7436828cd15db8a531a0057351d8e361c0;f=sverre-hat.jpg sverre-hat.jpg></center>
449 </p><p>
450 By the way, another thing I like about this blog engine is that there are no
451 comments... Nothing is more annoying than leaving a comment on a blog,
452 forgetting about it for a few months, and then finding somebody answered
453 ages ago.
454 </p><p>
455 Update: Sverre says it was dsymonds idea.]]></description>
456 </item>
457 <item>
458 <title>Let there be images!</title>
459 <link>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#1232604722</link>
460 <guid>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#1232604722</guid>
461 <pubDate>Thu, 22 Jan 2009 07:12:02 +0100</pubDate>
462 <description><![CDATA[Let there be images!
463 </p><p>
464 One of the most important features of blogs is the ability to insert images.
465 So what would this blog be, if it could not present something that says
466 more than a thousand words?
467 </p><p>
468 So here it goes, my first picture in this blog, taken from my Google Tech
469 Talk in Mountain View:
470 </p><p>
471 <center><img src=dscho.git?a=blob_plain;hb=85b89d1cd73acd65ca4381be901d50287dde8170;f=all-your-rebase.png width=500px></center>
472 </p><p>
473 Now this blog starts to look like a real blog...]]></description>
474 </item>
475 <item>
476 <title>My blog has style</title>
477 <link>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#1232599693</link>
478 <guid>http://repo.or.cz/w/git/dscho.git?a=blob_plain;hb=blog;f=index.html#1232599693</guid>
479 <pubDate>Thu, 22 Jan 2009 05:48:13 +0100</pubDate>
480 <description><![CDATA[My blog has style
481 </p><p>
482 It is official. The blog has a style sheet now.
483 </p><p>
484 The major problem was how to design the system such that it would work
485 both locally and on <a href=http://repo.or.cz>repo.or.cz</a> via gitweb.
486 </p><p>
487 Basically, I realized that I'd need a dry run mode anyway, to prevent
488 all my failed attemp.. oops, I meant, to prevent an accidental push
489 when I am at an, ahem, intermediate state of the 'blog' branch.
490 </p><p>
491 Therefore, I could write a different file locally, which I can load
492 into my venerable Firefox.
493 </p><p>
494 The next plans with my new toy are to enable an easy way to support
495 showing images, and then maybe a table of contents. External links
496 would be cool (<a href=http://repo.or.cz>repo.or.cz</a> does not count, it is special-cased), too.
497 </p><p>
498 And later maybe a cut-off, with automatic generation of links to older
499 posts. Hmm, for those, I'll have to change the URL to include the
500 current commit name, so that the images will be found, too...
501 </p><p>
502 Which in turn means that I'll have to parse the source for new
503 images first, so that they can be in the commit that index.html
504 will link to, <u>before</u> it gets committed. Oh well, that cannot be
505 helped! &#x263a;]]></description>
506 </item>
507 </channel>
508 </rss>