Showing posts with label tech. Show all posts
Showing posts with label tech. Show all posts

28 April 2008

Bye bye, XEmacs

Nice long rant from Stevey on why XEmacs needs to be put out of its misery: “XEmacs is Dead. Long Live XEmacs!”.

17 April 2008

Your ecosystem sucks

Come on, Microsoft. Seriously. WTF?

25 March 2008

dcmd now in devscripts

In case anyone out there is using my dcmd script, I'll note that it's now included in devscripts (starting with version 2.10.20). The devscripts version doesn't behave differently when called as dscp or drsync, I have the following aliases to get the old behavior:

alias dscp='dcmd scp'
alias drsync='dcmd rsync -av'
As always, feedback welcome.

23 March 2008

Cleaner

In the productive procrastination department: I repackaged rcs using debhelper (it feels like the future) and while I was at it, I implemented MadCoder's git maintenance scheme where changes from upstream are maintained in a rebased integration branch and serialized as patches in the Debian branch (master in my case) using git format-patch. It's pretty nice:

  • I can use native Git commands to edit/refresh patches, which beats quilt any day;
  • Changes to upstream are visible both as a git branch and as separated, commented patches in the Debian branch;
  • If necessary (e.g. in case of NMU), outside contributors can just dump a -p1 patch in debian/patches and be done with it.
Of course this is a very low-maintenance package (the last upstream release was 13 years ago) so it doesn't matter very much which maintenance strategy it uses, but after implementing it I'm pretty confident that it works and I might switch my other packages to it.

If you're interested in knowing more about clever ways to use modern VCS for packaging, you may want to join the vcs-pkg mailing-list.

18 March 2008

GNOME 2.22 in sid: check (mostly)


The status page speaks for itself: most of GNOME 2.22 is now available in sid. A few packages are being staged in experimental to avoid breaking too much stuff, and a few of the remaining missing pieces are waiting in NEW. Special thanks to Sebastian Dröge who's done an incredible work with more than 90 uploads over the past week!

16 March 2008

Updated Debian Vcs-* statistics

Today I discovered that I have a nightly cron job on one of my machines to generate the Vcs statistics I mentioned previously; somehow I had forgotten. So here's an updated graph:

Subversion and Git are still growing fast, the others aren't very successful. 18.8% of all source packages in main are maintained in Subversion, and Git is up to 4.3%.

It's also interesting to note that 91% of the packages maintained in Subversion are hosted on Alioth (svn.debian.org) whereas 77% of the packages maintained in Git are on git.debian.org.

15 March 2008

Looking forward to Firefox/Iceweasel 3.0

After using Firefox 3 Beta 4 (built from source) for a few hours, I'm pretty impressed:

  • Google Reader is much, much faster. Since I spend a fair amount of time in it every day, it's a welcome improvement. Overall, the browser feels faster.
  • Widgets now have a native GTK+ look'n'feel, and the user interface is more polished. Nice.
  • The address bar has a new completion strategy which is... weird. It now shows the title of the history item as well as the address itself, resulting in an unnecessarily large box. I'll have to get used to it.
  • Search Keys says that it doesn't support Beta 4, but it does. Just edit the xpi and change the version range in the rdf file. Can't live without it!
  • Memory-wise, it seems better than Firefox 2, but not strikingly so.
Now I just have to wait for Iceweasel 3.0, and in the meantime I won't be going back to version 2.0!

13 March 2008

Emacs in bzr: initial impressions

So, since Emacs is apparently switching to bzr, I thought I'd try it out. The first thing I noticed is that cloning the repository is very slow. So slow that I killed it, thinking that it was stuck, but it wasn't. It turns out that the official page recommends downloading a tarball instead, so I did that.

Once I had my local Emacs branch, I tried a simple bzr log to see how recent the repository was. It sat there for a whole minute before even starting to show something. Apparently, all the history commands are slow... This is with a hot cache:

$ time bzr log >/dev/null
bzr log > /dev/null 44.89s user 0.58s system 99% cpu 45.563 total
$ time bzr version-info
revision-id: cvs-1:monnier-20080313012033-9ewl8gg4q3bw01z3
date: 2008-03-13 01:20:33 +0000
build-date: 2008-03-13 20:14:17 +0100
revno: 87445
branch-nick: sandbox
bzr version-info 6.41s user 0.14s system 99% cpu 6.549 total
$
Six seconds just to show me the current revision?!

Compare with my favorite scm, in a repository that contains the same history, also converted with cvsps:
$ time git log >/dev/null
git log > /dev/null 1.81s user 0.05s system 99% cpu 1.862 total
$ time git show >/dev/null
git show > /dev/null 0.02s user 0.00s system 85% cpu 0.023 total
$
Fortunately, other bzr commands such as status, diff, commit are pretty fast so this might be a problem with the conversion process, or something. At least I hope so, because as is it's completely unusable!

01 March 2008

Fast directory navigation

About a year ago I stumbled upon this post which mentions the following shell keybindings: M-- for pushd .. and M-= for popd. Since the dash and equal signs are very conveniently placed next to each other, this allows fast directory navigation with accessible keystrokes and is especially convenient to move up in the directory hierarchy. Very neat.

Of course I use zsh and not bash, so I had to "port" this hack to zsh, which resulted in somewhat obscure code compared to the bash version:

function up-one-dir { set -E; pushd ..; set +E; zle redisplay; zle -M `pwd` }
function back-one-dir { set -E; popd; set +E; zle redisplay; zle -M `pwd` }
zle -N up-one-dir
zle -N back-one-dir
bindkey "^[-" up-one-dir
bindkey "^[=" back-one-dir
Not so pretty, but it works. The only problem is that I do most of my shell interaction through shell-mode in Emacs, not in zle-capable terminals. So I also had to write a shell-mode version, which turned out to be even uglier because I basically had to rip off the shell-resync-dirs code to handle comint interaction and directory tracking. Here it is in all its glory:
(defun ore-shell-dirnav (direction)
(interactive)
(let* ((proc (get-buffer-process (current-buffer)))
(pmark (process-mark proc))
(cmd (if (eq direction 'up) "pushd .." "popd")))
(goto-char pmark)
(sit-for 0)
(comint-send-string proc cmd)
(comint-send-string proc "\n")
(set-marker pmark (point))
(let ((pt (point))
(regexp
(concat
(if comint-process-echoes
(concat "\\(" (regexp-quote cmd) "\n\\)")
"\\(\\)")
"\\(.+\n\\)")))
(insert "\n")
(backward-char 1)
(while (not (looking-at regexp))
(accept-process-output proc)
(goto-char pt)))
(goto-char pmark)
(delete-char 1)
(let* ((dl (buffer-substring (match-beginning 2) (1- (match-end 2))))
(dl-len (length dl))
(ds '())
(i 0))
(delete-region (match-beginning 2) (1- (match-end 2)))
(while (< i dl-len)
(string-match "\\s *\\(\\S +\\)\\s *" dl i) ; pick off next dir
(setq ds (cons (concat comint-file-name-prefix
(substring dl (match-beginning 1)
(match-end 1)))
ds))
(setq i (match-end 0)))
(let ((ds (nreverse ds)))
(condition-case nil
(progn (shell-cd (car ds))
(setq shell-dirstack (cdr ds)
shell-last-dir (car shell-dirstack))
(shell-dirstack-message))
(error (message "Couldn't cd")))))))

(defun ore-shell-dirnav-up ()
(interactive)
(ore-shell-dirnav 'up))

(defun ore-shell-dirnav-down ()
(interactive)
(ore-shell-dirnav 'down))

(define-key shell-mode-map (kbd "M--") 'ore-shell-dirnav-up)
(define-key shell-mode-map (kbd "M-=") 'ore-shell-dirnav-down)
Phew. It's a lot of code for a seemingly simple feature, but the time it saves me probably adds up to a few hours per year, so it's worth it.

18 February 2008

All in the little things

This week's Emacs has a (small) new feature which I find pretty neat; when you search for a string that cannot be found, the failing part gets highlighted in the prompt:



Since isearch is the most efficient way of moving around (at least for long distance jumps) in Emacs buffers, being able to correct typos immediately is essential and this tiny change helps a lot!

(Oh, and there's also a new M-x emacs-uptime command. Just so you know.)

14 February 2008

So what's wrong with 1975 programming?

I enjoyed reading the ArchitectNotes on the Varnish wiki:

Take Squid for instance, a 1975 program if I ever saw one: You tell it how much RAM it can use and how much disk it can use. It will then spend inordinate amounts of time keeping track of what HTTP objects are in RAM and which are on disk and it will move them forth and back depending on traffic patterns.

Well, today computers really only have one kind of storage, and it is usually some sort of disk, the operating system and the virtual memory management hardware has converted the RAM to a cache for the disk storage.

So what happens with squid's elaborate memory management is that it gets into fights with the kernel's elaborate memory management, and like any civil war, that never gets anything done.
Varnish was designed by FreeBSD developer Poul-Henning Kamp. There is something to be said about user-space apps designed by kernel developers: they're always super fast because kernel developers know how to make the most of the system, having spent hours optimizing the kernel itself for some usage patterns.

This is why git (designed by Linus Torvalds, for those of you who've lived under a rock for the past three years) is so much faster than other comparable systems, for example. It uses tricks such as giving the O_NOATIME flag to open() to avoid updating access times on files where it knows that they don't matter, and it's a "huge time-saver". (Of course, you can also just mount your partitions with noatime and enjoy a similar performance boost in all applications!)

09 February 2008

emacs-snapshot 20080209-1

Now internally based on Unicode, with a new Xft-capable font backend, D-Bus integration, built-in EasyPG, XEmbed goodness, etc. And legions of bugs waiting to bite you. Get it from here as usual.

We also have a (completely fabricated) screenshot of the new font backend, for your viewing pleasure:

20 January 2008

Everybody loves xkcd

Even Phil Zimmermann.

06 January 2008

Flickr favorites RSS feeds

Sometime in the last few weeks Flickr started offering RSS feeds of favorites; as far as I can tell they didn't announce it anywhere. This was my #1 feature request. Yay!

26 December 2007

Quote

Linus on the value of documentation:

You seem to put a lot of trust in a piece of documentation.

Do you realize how those pieces of paper are written? They are written by people who have absolutely *nothing* to do with the actual implementation, and whose job it is to write documentation. And while the people who actually do the programming etc are supposed to help them, the two parties generally detest each other.

Technical writers hate the "real engineers" for not helping them, and the "real engineers" tend to dislike having to be pestered to explain their stuff and have to read through some document that isn't meant for them, but that they need to sign off on.

In other words: please do *not* expect that the documentation actually matches reality. You seem to think that the documentation came first and/or is quite accurate. That's not at all likely to be true.
(link)

17 December 2007

Lessig

Awesome as always.

05 December 2007

Note to self #233

To avoid having ugly fonts on a brand new Debian install:

  • dpkg-reconfigure fontconfig-config and answer No to the question about bitmapped fonts.
  • Install ttf-bitstream-vera.
(In related news, installing Debian on the Dell XPS M1330 is totally boring, because everything just works. Even the remote control.)

01 December 2007

More Vcs-* statistics

Expanding on my previous post, this time with a graph:

The first package to add a Vcs field was amule on June 7th, 2006. And it was Bzr.

24 November 2007

emacs-snapshot 20071124-1

It's been a while since I last posted about emacs-snapshot, so here's a summary of the latest changes:

  • New packages: nXML, remember.el, bubbles.el (a Same Game implementation), doc-view.el (to view PDF/PS/DVI files in Emacs), ...
  • Many commands now have useful minibuffer defaults (accessible using M-n).
  • M-q, M-$, TAB now operate on the region if it's active and transient-mark-mode is enabled.
  • diff-mode now does word-level highlighting of hunks.

23 November 2007

Favorite word of the day

warkitting: a combination of wardriving and rootkitting, where an adversary maliciously alters a router’s configuration over a wireless connection.
(from this paper)