Older blog entries for edp (starting at number 9)

25 Feb 2005 (updated 26 Feb 2005 at 03:48 UTC) »
mount: only root can do that

Why can't a non-root user do this?

$ dd if=/dev/zero of=img bs=1024k count=1
$ mke2fs -F img
$ mkdir mnt
$ mount -t ext2 -o loop img mnt
$ 

That's (IIUC) the standard way to create an initial ram disk for the linux kernel (as documented in eg its Documentation/initrd.txt).

mkcramfs OTOH doesn't require root privileges; any user can run that program to produce a cramfs image from a directory of its contents.

(But the existence of that tool seems to be a result of the fact that cramfs as a filesystem is readonly, so the above method doesn't work -- you can't create any content in the empty filesystem, because it's readonly -- so they were forced to make a separate tool. I'm not aware of corresponding tools for other filesystems. It's too bad the general method above doesn't work for non-root users. It seems unfortunate that just "mounting" a file to see what's packaged up in it -- that's what a filesystem image is, it's basically just like a ".tar.gz" file isn't it? -- why should that be a security risk?)

two-column xterm (and emacs)

Sometimes "top" output is more lines than fit in an xterm on my screen. But I have width enough for another xterm next to it. I'd like a "two-column" xterm so that the second xterm is treated as a vertical extension of the first one.

I'd also like the same thing in Emacs, where I split the screen down the middle (C-x 3) but the right half is a second column extending the buffer on the left half.

Googling "two-column xterm" came up empty.

(Actually I'm running gnome-terminal, not xterm. But varying the search terms doesn't seem to help.)

I wonder about Emacs. Someone has probably implemented what I want for Emacs, right?! Hmm. Looking at "apropos column" results ... "2C-two-columns" sounded promising but I wasn't able to get it to do anything useful. Reading some more docs I see it's meant for editing files with two columns of text. But I just want to display (and scroll and edit) a regular "single column" text file (buffer, really) using *more* than one column, continuing the text from the bottom of one column at the top of the next column (and so on, with three or more columns.)

Hmm... If I had the two-column xterm (gnome-terminal, whatever) presumably I could *run* Emacs in it and it would Just Work and I'd have my two-column Emacs display. But window-splitting would be kinda weird... Hmm...

UPDATE: C-x 3 M-x follow-mode does exactly what I want! Found it by surfing emacswiki.org a bit... Oh and I see AlanShutko pointed out the same thing; thanks!

RIP HST

ABC news: Writing in The New York Times in 1973, Christopher Lehmann-Haupt worried Thompson might someday "lapse into good taste." "That would be a shame, for while he doesn't see America as Grandma Moses depicted it, or the way they painted it for us in civics class, he does in his own mad way betray a profound democratic concern for the polity," he wrote. "And in its own mad way, it's damned refreshing."

4 Aug 2004 (updated 6 Aug 2004 at 03:22 UTC) »
Fedora Project

Fedora Core 2

I like the new kernel (2.6.7-1.494.2.2)!

This is the first time I've actually noticed a dramatic improvement in responsiveness. Nice...

It also resolved a bug I reported.

Fedora Core 3

I installed FC3-test1 on a machine which already had FC2 so I could use both. Had to learn a little bit more about grub bootloader to achieve that. Nothing much to report about FC3. I was disappointed to find that "development" packages are not GPG-signed. Why not? Why should I trust that the mirrors have good copies of them?

MoinMoin

Installed MoinMoin wiki engine at work and at home. I like it. Maybe this will force me to learn python... (I've had some vague ideas about playing with python for a while, but have never gotten around to it. I typically don't learn new languages until I'm forced to...)

Subversion

Loving it! Running vss2svn right now...

GNU bash

Shell scripting hurts my brain.

$ echo foo!bar                 $ echo "foo!bar"
bash: !bar: event not found    bash: !bar": event not found
$ echo foo\!bar                $ echo "foo\!bar"
foo!bar                        foo\!bar
$ echo foo\\!bar               $ echo "foo\\!bar"
foo\!bar                       foo\!bar
$                              $ 

Must be a documentation bug, at least:

  Enclosing  characters  in  double quotes preserves the literal value of
  all characters within the quotes, with the exception of $,  `,  and  \.
  The  characters  $  and  `  retain  their special meaning within double
  quotes.  The backslash retains its special meaning only  when  followed
  by one of the following characters: $, `, ", \, or <newline>.

That explains some of what I thought was weird...

But it suggests that echo "foo!bar" should not be an error.

And I'd think that echo foo\\!bar should be an error.

(Tested on FC2 bash-2.05b-38 and FC3-test1 bash-3.0-1.)

TODO: File bug report...

My last post here was on April 6th.

Since then:

  • lost twin #1
  • lost twin #2
  • my mother's father died
  • my stepfather's father died
  • my uncle died (tragically: altitude sickness in Peru while volunteering humanitarian medical service)
  • our apartment was burglarized

I've got Free Software stuff to ramble on about, but couldn't let all that go without mention. I hope someone might be inspired by it. Appreciate what you have and all that...

7 Apr 2004 (updated 7 Apr 2004 at 03:05 UTC) »

ok, i made some progress...

cdparanoia uses "LBA" mode in the ioctl to read cd Table Of Contents.

other code uses "MSF" (minutes, seconds, frames) mode instead.

using both modes shows the familiar 150 frame difference (M:S.F -> total vs LBA):

  1.  0:02.33 ->    183 vs     33; delta = -150  [format: 2, datamode: 0]
  2.  2:39.23 ->  11948 vs  11798; delta = -150  [format: 2, datamode: 0]
  3.  3:56.35 ->  17735 vs  17585; delta = -150  [format: 2, datamode: 0]
  4.  6:13.68 ->  28043 vs  27893; delta = -150  [format: 2, datamode: 0]
  5.  8:57.53 ->  40328 vs  40178; delta = -150  [format: 2, datamode: 0]
  6. 10:17.13 ->  46288 vs  46138; delta = -150  [format: 2, datamode: 0]
  7. 11:22.55 ->  51205 vs  51055; delta = -150  [format: 2, datamode: 0]
  8. 13:05.10 ->  58885 vs  58735; delta = -150  [format: 2, datamode: 0]
  9. 14:17.03 ->  64278 vs  64128; delta = -150  [format: 2, datamode: 0]
 10. 15:29.38 ->  69713 vs  69563; delta = -150  [format: 2, datamode: 0]
 11. 17:52.58 ->  80458 vs  80308; delta = -150  [format: 2, datamode: 0]
 12. 18:58.50 ->  85400 vs  85250; delta = -150  [format: 2, datamode: 0]
 13. 20:22.58 ->  91708 vs  91558; delta = -150  [format: 2, datamode: 0]
 14. 22:10.05 ->  99755 vs  99605; delta = -150  [format: 2, datamode: 0]
 15. 25:07.65 -> 113090 vs 112940; delta = -150  [format: 2, datamode: 0]
 16. 26:27.55 -> 119080 vs 118930; delta = -150  [format: 2, datamode: 0]
 17. 28:35.25 -> 128650 vs 128500; delta = -150  [format: 2, datamode: 0]
 18. 31:46.08 -> 142958 vs 142808; delta = -150  [format: 2, datamode: 0]
 19. 33:02.48 -> 148698 vs 148548; delta = -150  [format: 2, datamode: 0]
 20. 33:58.05 -> 152855 vs 152705; delta = -150  [format: 2, datamode: 0]
 21. 34:47.68 -> 156593 vs 156443; delta = -150  [format: 2, datamode: 0]
 22. 36:02.48 -> 162198 vs 162048; delta = -150  [format: 2, datamode: 0]
 23. 39:00.55 -> 175555 vs 175405; delta = -150  [format: 2, datamode: 0]
 24. 39:54.43 -> 179593 vs 179443; delta = -150  [format: 2, datamode: 0]
 25. 41:09.45 -> 185220 vs 185070; delta = -150  [format: 2, datamode: 0]
 26. 42:54.33 -> 193083 vs 192933; delta = -150  [format: 2, datamode: 0]
 27. 50:15.10 -> 226135 vs 225985; delta = -150  [format: 2, datamode: 0]
 28. 51:34.03 -> 232053 vs 231903; delta = -150  [format: 2, datamode: 0]
 29. 52:56.63 -> 238263 vs 238113; delta = -150  [format: 2, datamode: 0]
 30. 54:19.70 -> 244495 vs 244345; delta = -150  [format: 2, datamode: 0]
 31. 56:55.55 -> 256180 vs 256030; delta = -150  [format: 2, datamode: 0]
 32. 59:05.15 -> 265890 vs 265740; delta = -150  [format: 2, datamode: 0]
170. 61:39.73 -> 277498 vs 4794173; delta = 4516675  [format: 2, datamode: 0]

uh, except for the lead-out track; i dont know what's up with that.

been learning about audio CD format...

Andy McFadden's CDR FAQ is awesome.

(His page about file formats is also highly recommended.)

i still don't know why cdparanoia prints (typically) 00:00 instead of 00:02 which is returned by the "read TOC" cdrom ioctl for the first track. is it just blindly subtracting 2 seconds or what? must read the source... anyway despite the FAQ i don't understand the exact nature of this 2-second gap.

freedb really is a mess (accurate criticism by jwz). i wonder if there is hope. i'd like to help...

gilbou: thx for the hashing suggestion.

regarding Jazz, how about making its homepage this wikipedia entry instead of the Bluenote label? ;)

i was thinking of submitting some jazz information to coversproject.com...

i have a fair number of jazz cds, which include many "covers" of standards, naturally, and i'd like to have an index of them by song name, so i could easily find all recordings in my library of any song.

i've currently done that only for certain things, like John Zorn's Masada, Art Tatum, and JS Bach (by BWV number).

27 Mar 2004 (updated 27 Mar 2004 at 19:03 UTC) »

music archive TODO:

  1. capture CD audio.

    [CDDA]Paranoia works great.

  2. uniquely identify CD.

    AFAIK there is no way to fully automate this in general.

    existing schemes use number, length, type of tracks. obviously it is easy to "fool" such a system simply by releasing a CD with the same number, length and type of tracks as another CD. so there must be a way to resolve collisions.

    i wonder about matching the extracted audio data exactly. my vague understanding is that there is ambiguity in where the "real" audio data starts (even if the real audio data can be extracted bit-for-bit perfectly). i wonder whether one could get repeatable results by stripping leading frames which were totally silent?

    (also note of course that there exists music which does not come from commericial audio CD. so there must be other ways of identifying music.)

  3. manage other "metadata".

    eg label, release, artist, track info, cover art, liner notes.

    this is by far the most difficult part.

    want to submit/sync/check (some subset of) this stuff to/with/against free music information services like freedb and MusicBrainz.

i've been using GNU software since 198x. first Emacs, then GCC et al.

today i joined the FSF as an Associate Member. finally!

submitted BCEL changes today. one minor doc fix was applied immediately. we'll see what happens with the other stuff.

(haven't yet brought up ideas on enhanced support for dealing with targeters, exception-handler regions, etc. i'll get to that...)

so far, my contributions to free software have been minimal:

  • i've donated money to the Perl Foundation;
  • i've paid money to RedHat;
  • i've reported bugs in various things;
  • i've helped debug emacs (many years ago);
  • i've submitted patches for emacs (many years ago).

things i haven't done which i should:

  • donate money to the FSF;
  • submit StackMap enhancement to BCEL;
  • suggest certain improvements to BCEL...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!