Showing posts with label planet. Show all posts
Showing posts with label planet. 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!”.

18 April 2008

Shared links for 2008-04-18

17 April 2008

Your ecosystem sucks

Come on, Microsoft. Seriously. WTF?

06 April 2008

Shared links for 2008-04-06

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.

24 March 2008

Shared links for 2008-03-24

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.

19 March 2008

Shared links for 2008-03-19

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!

17 March 2008

Shared links for 2008-03-17

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!

02 March 2008

Shared links for 2008-03-02

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.

23 February 2008

Shared links for 2008-02-23

22 February 2008

Shared links for 2008-02-22

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.)

15 February 2008

Shared links for 2008-02-15

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!)