Name: Ed Price
Member since: 2004-02-21 04:40:22
Last Login: 2007-02-01 02:29:40

Homepage: http://www.livejournal.com/users/edp/

Notes:

Computer programmer. Bach fan.

Recent blog entries by edp

http://www.theregister.co.uk/2005/05/27/device_driver_flaws/:

"If you can crash your kernel with an application that is a kernel flaw - if you can crash your kernel with a device driver, that is a device driver flaw."

Blegh.

(TODO: try out HURD...)

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.

6 older entries...

 

edp certified others as follows:

  • edp certified edp as Apprentice
  • edp certified rms as Master
  • edp certified alan as Master
  • edp certified rth as Master
  • edp certified raph as Master

Others have certified edp as follows:

  • edp certified edp as Apprentice
  • lerdsuwa certified edp as Apprentice
  • sashako certified edp as Apprentice

[ Certification disabled because you're not logged in. ]

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!

X
Share this page