News for hackers. Stuff that matters.

mgedmin

Re:Mutt 1.6 on Tuesday April 05, 2016 @06:54AM (#11429377)
w3m renders HTML tables better. Or at least it used to, when I was setting up my mailcap a long time ago.

For interactive terminal web browsing I prefer links/elinks (again, compared to lynx/w3m a long time ago).

Re:Gnome 3.12 Released on Thursday March 27, 2014 @08:03AM (#7479793)
I miss the world clock too :(

I wonder how hard it would be to write an extension.

Re:Gnome 3.12 Released on Thursday March 27, 2014 @07:59AM (#7479776)
There's a switch to turn that off in gnome-tweak-tool.
Re:Gnome 3.12 Released on Thursday March 27, 2014 @07:46AM (#7479726)
You get split Nautilus windows in GNOME the same way you get split anything windows: tile the window to the left (Super+Left or drag window until mouse touches the left screen edge), open new Nautilus window, tile it to the right (Super+Right or draw window until mouse touches the right screen edge). Presto.
Re:How I Fired Myself on Tuesday March 05, 2013 @01:19AM (#5323226)
You need to wrap the escapes in \[ \] to tell bash (actually readline) that these characters do not advance the cursor when printed.
Re:Your Bash Prompt Needs This on Saturday April 28, 2012 @03:17PM (#3903788)
This makes Alt-Backspace do the same thing as Ctrl-W, which is delete-everything-until-the-next-space. I'm missing the delete-last-segment-of-the-path function.

Edit: I know I can customize the word style using $WORDCHARS, or 'autoload select-word-style'; my problem is that I'm used to having the capability to use two different word styles at once.

I'm looking through the command list in zshzle(1), and I'm a bit confused about the differences between backward-delete-word and backward-kill-word. Some short experiments I did failed to notice any differences (foo/bar/baz M-x backward-delete-word deletes foo/bar/baz). There's also vi-backward-kill-word which deletes 'baz', then '/', then 'bar', then '/', then 'foo'. I want a key to delete 'baz', then 'bar/', then 'foo', and I've no idea how to get it...

Re:Your Bash Prompt Needs This on Saturday April 28, 2012 @10:52AM (#3903080)
I tried, for a week, got very frustrated and switched back.

The little itch that drove me crazy was command-line editing: in bash (and all readline apps) when I have

   command long/path/to/some/file
I can press Alt-Backspace to delete 'file', or I can press Ctrl-W to delete 'long/path/to/some/file'.

I tried various hacks to make zsh do the same, then gave up.

Re:Your Bash Prompt Needs This on Saturday April 28, 2012 @10:49AM (#3903071)
Personally I do not use virtualenv activation. Instead I prefer to explicitly launch Python and/or scripts with bin/python, bin/scriptname etc., either with my current working directory in the virtualenv, or by creating a symlink ./bin -> .virtualenv/bin in the project root.
Re:Your Bash Prompt Needs This on Saturday April 28, 2012 @10:04AM (#3902961)
I added a newline (\n) to the beginning of my prompt. This way I never lose program output -- and also it's easier to see where previous commands begin and end in the scrollback buffer.
Re:Help, Linux ate my RAM on Tuesday March 13, 2012 @06:45PM (#3700722)
You can't really do sums of top columns, because some memory is shared and you'll end up double-counting it.

And you can't just subtract the shared memory numbers, because different sets of pages are shared between different sets of processes, and top doesn't give enough information to figure out what's actually happening where.

Running the pmaps tool on all pids and summing the Pss number is perhaps the closest you can get to the actual memory use.

Re:Help, Linux ate my RAM on Tuesday March 13, 2012 @06:37PM (#3700698)
The ongoing efforts of the MemShrink project keep finding memory leaks -- usually in Firefox addons. You can read more about it at http://blog.mozilla.com/nnethercote/category/memshrink/
Re:Help, Linux ate my RAM on Tuesday March 13, 2012 @05:58PM (#3700588)
While more powerful, atop is rather confusing. htop is friendly.
Re:Help, Linux ate my RAM on Tuesday March 13, 2012 @05:55PM (#3700579)
RSS also includes shared memory pages (those that are currently resident).
Re:Here is why vim uses the hjkl keys as arrow keys on Friday March 09, 2012 @05:32PM (#3686284)
I can hit ZZ faster than ctrl-x ctrl-s ;)
Re:Here is why vim uses the hjkl keys as arrow keys on Friday March 09, 2012 @05:27PM (#3686261)
> As a digraph they never occur in a natural language

I wonder how Dijkstra would react to that statement.

Re:Fixing the Python subprocess interface on Monday January 30, 2012 @06:15PM (#3531029)
Exactly. If you look at the sources, you'll see that the arguments are all joined into a single string with spaces, then split back into separate words using shlex.split().

So cat("filename with spaces in it") will fail, but cat("'filename with spaces in it') ought to succeed.

It's a neat experiment, but using this module in production would not be a great idea.

Re:Understanding the bin, sbin, usr/bin , usr/sbin split on Sunday January 29, 2012 @07:08AM (#3525086)
In that case they were not FHS compliant.
Re:Is Programming Less Exciting Today? on Thursday January 26, 2012 @06:30PM (#3516469)
As an example: I was playing Myst, uh, IV? And there was this puzzle that required me to find a short-enough path from one kind of a spot to a different kind of a spot (you had to pick up a soap bubble with a spoon and carry it somewhere, but it would evaporate if you carried it for too long; anyway, the details don't matter).

I was making a map of the level on a piece of paper, and bungled it up (the rooms that were supposed to be adjacent appeared on two completely opposite sides of the paper or something like that). The obvious next step was to write a Python script to take a description of the map (room X: exit north leads to room Y, exit south leads to room Z, etc.) and produce a map (in ASCII art; I didn't want to spend too much time on superfluous graphics).

It was more exciting to write that script and see the map it generated than it was to play the game itself.

I may be weird.

Re:Is Programming Less Exciting Today? on Thursday January 26, 2012 @06:16PM (#3516409)
Is solving puzzles exciting? People solve crosswords for fun.

Not every programming task is exciting, but some can be fun.

Re:The Art of Unix Programming on Saturday January 07, 2012 @09:59AM (#3437115)
Have you ever seen the fetchmail source code?
Re:Doctorow: The coming war on general-purpose computation on Monday January 02, 2012 @02:05AM (#3415104)
> the reference implementation and all known shipping versions of secure boot have a switch to disable it if the user so chooses

Matthew Garrett reported a while back[1] that some vendors will not provide an option to disable secure boot.

[1] http://mjg59.dreamwidth.org/5850.html

Re:Why the Vasa sank: Lessons learned on Monday January 02, 2012 @01:53AM (#3415084)
This comment was clearly written by a non-Unicode expert ;)

U+2070 SUPERSCRIPT ZERO (⁰) is not the same character as U+00B0 DEGREE SIGN (°). They look rather distinct on my screen (I assume both characters come from Verdana, the font specified in the CSS of this site).

Re:2000x performance win on Saturday December 10, 2011 @11:06AM (#3337772)
Is this really a bug in grep, rather than a bug in Solaris's libc? I've never seen grep so slow, and I've been using UTF-8 locales for years.

I'm not denying that grep was buggy (there's a link to grep's bug tracker to a bug that was closed more than a year ago), but I'm surprised at the magnitude of the slowdown.

Re:Python Ecosystem - An Introduction on Thursday December 08, 2011 @04:00PM (#3331099)
My fingers often type "test" when I want to type "text".
Re:Python Ecosystem - An Introduction on Thursday December 08, 2011 @03:58PM (#3331086)
PYTHONSTARTUP also lets you enable things like

  * coloured prompt
  * tab-completion
  * persistent history
Here's mine: http://mg.pov.lt/pythonrc
Re:Python Ecosystem - An Introduction on Thursday December 08, 2011 @11:53AM (#3329846)
My reasons for preferring pyflakes over pylint: * pyflakes are fast * pyflakes is less likely to flood me with false positives

What are your reasons for preferring pylint?

Re:Two decades of productivity: Vim's 20th anniversary on Wednesday November 02, 2011 @03:31PM (#3188546)
There's also :vimgrep

I believe it's more useful on Windows machines, which for some reason usually come without preinstalled grep.

Re:Boot a linux kernel right inside your browser. on Tuesday May 17, 2011 @10:14AM (#2556413)
I don't see vim in there, but there's a minimalistic vi.
Re:Are SSDs worth the money? on Thursday May 05, 2011 @10:42AM (#2517529)
As a developer I often have to recursively grep large source trees. With an HDD that was painful, no matter how much RAM I added to my laptop -- the whole source tree was rarely cached. With an SSD, I can grep a few hundred megs of sources in a couple of seconds.

Now I'm someone who hates having to wait unnecessarily, and considers even 1 or 2 seconds of application startup time to be unacceptably slow (hence Chromium instead of Firefox). For me the expensive Intel SSD was worth the money.

Re:Ubuntu 11.04 (Natty Narwhal) on Thursday April 28, 2011 @03:05PM (#2494659)
Originally Unity was built with Mutter, then they switched to Compiz.

Older »