HNHacker News
TopNewBestAskShowJobs

ralph

1,089 karma · joined March 1, 2007

Ralph Corderoy, https://plus.google.com/#115649437518703495227/about

C, Unix system and shell, Python, X Windows, ARM, ...

submissionscomments
ralph··on Dear people-who-run-Twitter, whom to follow, whom
Almost certainly that one. Mr Burns, is that you? You've had me accessing bits that hadn't been scrubbed in a long time and have suffered some rot. Have you just arrived at number 63 or just left? There's a Dorset LUG if you're interested.

Morse can be cheesy, but I thought it was a cultural reference that Americans may know. :-)

ralph··on Dear people-who-run-Twitter, whom to follow, whom
You might sound like Inspector Morse; he was repeatedly correcting Lewis. Here in England, "everyone" doesn't say "who" when they mean "whom".
ralph··on Dear people-who-run-Twitter, whom to follow, whom
Victoria Coren's had an interesting career. Writer, TV presenter, including _Balderdash and Piffle_ connected to the Oxford English Dictionary, poker player, and porn film maker, though just the once. It's nice to see see someone well known, in the UK at least, show their pedant side. Hopefully, her appearance on news.yc will make twitter take note. :-) http://en.wikipedia.org/wiki/Victoria_Coren
ralph··on Ask YC Archive
Agreed.

    $ wget -qO- http://www.gabrielweinberg.com/startupswiki/Ask_YC_Archive |
    > egrep -o 'item\?id=[0-9]+' |
    > sort -t= -k2nr |
    > sed q
    item?id=363096
    $
ralph··on Sharpie reinvents the pen with liquid pencil
As a sinister southpaw myself, I've never understood why fellow left-handers grip the pen in an unusual curled-round fashion such that their hand rests on what's just written.

I hold it like a right-handed person would. http://blogs.suntimes.com/ebert/hand-holding-pen.jpg But mirror-imaged. Is it because these left-handers are set on the wrong path by right-handed teachers who don't know better?

ralph··on How grep got its name
"ed was a command-line editor that worked identically to the colon-commands in vi and vim—in fact, you can press Q to get into ed mode (then type vi to get back into vim)."

This is wrong. Pressing Q in vi quits visual mode and returns you to ex(1). ex(1) precedes vi(1) and was an extended editor, based on ed(1). That's why the commands are similar, but not identical. And ed(1) isn't dead, it still is a command-line editor. :-)

ralph··on What's wrong with 1975 programming
http://www.gnu.org/software/hello/manual/autoconf/Why-Not-Im...
ralph··on Everyone Who Tried to Convince Me to Use Vim Was Wrong
c is for change, as d is for delete, i for insert, and s for substitute.
ralph··on Everyone Who Tried to Convince Me to Use Vim Was Wrong
No, vi often isn't installed, e.g. on Linux ADSL routers. If there is one editor it will be ed(1), the one true editor. :) That's why everyone should know it. Besides, it is a bit easier to use ed blind to edit a file from a mental image of the file's contents than it is vi.
ralph··on Everyone Who Tried to Convince Me to Use Vim Was Wrong
Exactly. Emacs didn't start on Unix IIRC and seems to prefer to have everything built in. vi was created by Bill Joy on Unix and wanted to work with the rich language of shell commands from the start, as ed(1) did, so it concentrated on editing text well and integrating with Unix well. To see some Emacs users you wonder why they're even bothering to run on Unix. ;-)
ralph··on Everyone Who Tried to Convince Me to Use Vim Was Wrong
Surely Caps Lock is already mapped to Ctrl? Then Ctrl-[ for Escape becomes easier as do all the other Ctrl combinations.
ralph··on Everyone Who Tried to Convince Me to Use Vim Was Wrong
HJKL's location on a QWERTY keyboard directly influenced them being chosen. They were to hand under the right hand, and mnemonically, ^H is BS, ^J is LF, ^K is VT (vertical tab) which at least keys the vertical connection going, and L is just at the opposite end to H. :-)
ralph··on Everyone Who Tried to Convince Me to Use Vim Was Wrong
vi commands $, %. and ^ are conveniently placed on QWERTY; Shift-4/5/6. If you use the one true style of braces for your C code then you can move through if-else-if chains quickly. $ moves to the end of the line, placing you on the open brace, % moves to the matching close brace at the start of the next

    } else if (...) {
line, repeat... To go the other direction, ^ moves you to the first non-white character, the close brace.
ralph··on Ask HN: Share a gem. Teach me and you.

    ... | sort -nr | head
...may save tail(1) some work.
ralph··on Guido van Rossum: Thoughts about Python Future
For a good summary of this whole area, see Russ Cox's http://swtch.com/~rsc/thread/ page.
ralph··on Experimenting with Node.js
I think he's saying that the main event loop has called a callback, only to have that callback either call the main event loop, or something similar that processes events until a certain condition, and that in turn may cause other callbacks to be called. Stack depth has increased. And it tends to lead to bugs because sometimes unconsidered things happen in the midst of the first callback's processing.
ralph··on Useful things you can make SSH do
Have you tried

    ssh -T foo bash -i
ralph··on Useful things you can make SSH do
ssh(1) only compresses if configured too, see the -C option.
ralph··on The absolute bare minimum every programmer should know about regular expressions

    $ printf 'a[]b[c]d[ef][g[h]i\n' | sed 's/\[[^][]*]/-/g'
    a-b-d-[g-i
    $ ed
    a
    a[]b[c]d[ef][g[h]i
    .
    s/\[[^][]*]/-/g
    p
    a-b-d-[g-i
    q
    ?
    q
    $
ralph··on All image-editing software gets scaling wrong
They are indeed the same. How did it pass?

    $ foo()
    > {
    >     wget -qO- "${1?}" |
    >     sed -n '/.*title"/!d; s///; s/">.*//; s/.*"//p; q'
    > }
    $ cat <(foo 'http://news.ycombinator.com/item?id=1141971') \
    >     <(foo 'http://news.ycombinator.com/item?id=1523991') |
    > uniq -c
          2 http://www.4p8.com/eric.brasseur/gamma.html
    $
ralph··on Checking that functions are constant time with Valgrind
Is it only branch instructions that matter in the disassembly? Might some instructions not take a varying amount of cycles depending on the data/ALU flags?
ralph··on Are your rsync transfers slow?
If you like netcat, look at socat(1). It does everything nc(1) does and more.
ralph··on UK Ordnance Survey Opens Up Detailed Map Data, API
Am I right in thinking that this is post code <-> lat/long, and not post code <-> address which Royal Mail still keep under wraps?
ralph··on Autoconf and portable programs: the joke
There are standard ones you can pick up for many things, e.g. http://ac-archive.sourceforge.net/
ralph··on Autoconf and portable programs: the joke
Is testing if "mkdir -p" is "thread-safe" practical? If you can trigger the failure in a configure test, fine, you know it's not. But if you don't manage to trigger the race condition after a few goes, what do you do?

You can't get ./configure to prove this platform's mkdir is safe so testing for versions of mkdir you know are safe having seen their source seems reasonable.

ralph··on Libtask: a Coroutine Library for C and Unix
It's unfortunate that he leaves channels until last and doesn't describe them fully. Understanding the benefits of structuring code to use channels is up there with other programming paradigms.
ralph··on Low Level Bit Hacks You Absolutely Must Know
That's http://graphics.stanford.edu/~seander/bithacks.html#CountBit...
ralph··on Investigating sine waves in Google Trends
"job search": http://www.google.com/trends?q=job+search&ctab=0&geo...

Interesting dip come December and then a spurt that more than makes up for it in January. New year, new job?

ralph··on Clixpy is recording your actions right now
"Clixpy`s Demo" -- wrong quote.
ralph··on Bead sort: faster than O(N log N) sort
The brightly coloured slides on CSP-style programming, using Occam, at http://www.cs.kent.ac.uk/teaching/08/modules/CO/6/31/slides/ include a O(n) "sort pump" starting on page 14 of http://www.cs.kent.ac.uk/teaching/08/modules/CO/6/31/slides/... that's also O(n) for space.

Those slides are an interesting read generally if you're not familiar with CSP/Alef/Limbo-style programming, despite the crufty Occam syntax.

← PreviousPage 13 of 26Next →