HN user

noste

84 karma
Posts0
Comments36
View on HN
No posts found.

How about using diff and sed -i?

  # This version is obviously unsafe
  verbose_sed() {
    sed -i.old -e "$1" "$2"
    diff -u "$2.old" "$2"
    rm "$2.old"
  }
  
  verbose_sed s/vim/emacs/g rant.txt
You could then use all the tools that we already have for working with patches: colordiff to colorize the output, diffstat for a summary of changes, patch -R for reverting the changes, and so on.

Of course, you're more likely to than not already using version control, which gives you all this and much more, even if you were to use vanilla find+sed.

Do Plants Think? 14 years ago

That Wikipedia article mentions that "According to author Adam Gollner, some fruitarians eat only fallen fruit."

What fascinates me in this article (and in other similar efforts), is the ambient nature of these new senses. While it is true that you can look at a compass in order to find the magnetic north, I'd imagine it is very different to "just know" where it happens to be at any given moment.

That being said, there is interesting stuff to be done without DIY surgeries. For example, Christina Kubisch used to auralize electromagnetic fields using some portable gear, and wander around urban areas listening sounds made by security systems, WLAN hotspots, and the like (see interview here: http://www.christinakubisch.de/pdf/Kubisch_Interview.pdf ).

While I think you're right in that VPN setups make a lot of things smoother, SSH actually compares pretty well with the first two of your examples.

"Yeah, there is. First, doing it with SSH+keys requires either multi-step (which is annoying, esp. for copying files), or exposing each servers SSH to the net (which might be unfeasible if you don't have public IPs for everything)."

You can work around much of the annoying stuff in multi-step setups by using SSH's ProxyCommand configuration variable. For example, you could have something like this in your local .ssh/config:

  Host prod-db
    ProxyCommand ssh bastion nc -w1 %h %p
After which 'ssh prod-db' and 'scp prod-db:...' work as if the bastion host wasn't between you and prod-db.

"Second, getting a dump of a table from your MySQL DB with SSH+keys:"

If you can access prod-db with SSH, you can dump the database with a single command:

  $ ssh prod-db mysqldump what-i-need > file.sql

Most of the plastic bottles sold in Finland were reusable up until 2008 or so, but now that the tax levied on non-reusable containers has been removed, most of the bottles appear to be of single-use variety.

I think that Ubuntu enables hinting on default. According to FreeType's docs/TRUETYPE the TT_CONFIG_OPTION_BYTECODE_INTERPRETER macro should be defined, should you want to enable patent encumbered parts.

On a karmic box:

  $ apt-get source libfreetype6
  $ grep -h TT_CONFIG_OPTION_BYTECODE freetype-2.3.9/debian/patches-freetype/*
  -/* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
  +#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
The End of Men 16 years ago

> All else held equal, that is simply not true in modern America. There are very powerful incentives to hire the equivalently qualified black guy in order to avoid lawsuits.

What about the audit studies that would appear to indicate otherwise? For example, an audit study from 2004 states in its abstract that "White names receive 50 percent more callbacks for interviews. Callbacks are also more responsive to resume quality for White names than for African American ones. The racial gap is uniform across occupation, industry, and employer size."[1], and earlier experiment would appear to show that white applicants with criminal records are called back slightly more often than black applicants without one[2].

1. Bertrand and Mullainathan: "Are Emily and Greg More Employable than Lakisha and Jamal? A Field Experiment on Labor Market Discrimination" http://www.economics.harvard.edu/faculty/mullainathan/files/...

2. Devah Pager: "The mark of a criminal record" http://www.irp.wisc.edu/publications/focus/pdfs/foc232i.pdf

"I also recall a zombie novel, which was published in serial form online before being published in physical form. Quite good, as I remember. Might have been called Empire - the plot synopsis fits what I remember, but the online serial version doesn't seem to be available any more."

David Wellington (http://www.davidwellington.net/) has written a number of zombie novels that were first published in serialized form online and subsequently in print.

"Note how instead of saying, "Ocaml doesn't have with-open-file or unwind-protect", he says, "Here's how you have to do with-open-file and unwind-protect in Ocaml". No! You do not go around trying to turn other languages into Lisp if you want to code in Lisp. If you want to code in Lisp, you code in Lisp."

What would be the OCaml solution for the problem that unwind-protect solves? In Haskell, I would use bracket, and appropriately the API documentation of bracket gives the definition of withFile as an example:

  withFile name mode = bracket (openFile name mode) hClose
(see http://haskell.org/ghc/docs/latest/html/libraries/base/Contr...)

There are no PPA in Debian, so staying with an old distro really means using old software.

Debian has http://backports.org/ ("Backports are recompiled packages from testing (mostly) and unstable (in a few cases only, e.g. security updates), so they will run without new libraries (wherever it is possible) on a stable Debian distribution.")