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 An adaptive prompt for Bash and Zsh
That wouldn't give the sequence of almost-blank lines I find most helpful. It would also merge the first, long, line of the prompt with the tail of the previous command's output.
ralph··on An adaptive prompt for Bash and Zsh
I use PS1='$ ' on the local machine and 'foo$ ' if I've ssh'd to foo. I prefer this because: the location of the cursor is more fixed, it doesn't wander across the columns as the environment changes, so my eye finds it more quickly; I've a decent amount of line left before it wraps at the end of the terminal, and I often type 100+-character pipelines on the fly; a couple of taps of Enter gives almost blank lines that logically separate when needed. 
ralph··on Pony ORM - Use Pure Python to Speak to Your Data
It seems from others' replies that it's not optional. It certainly isn't in English. I put it in not to correct but to explain my interpretation of what was written to better frame my question.
ralph··on Pony ORM - Use Pure Python to Speak to Your Data
A "couple [of] functions"? What does the other do?
ralph··on Vim Splits – Move Faster and More Naturally
:ls works too.
ralph··on FreeBSD Foundation Announces Capsicum Framework Project
I recall patching majordomo to sort the huge subscriber list (wanting to know a court's actions as they happened) by reverse string, to bring like domains together, before splitting it into chunks of N subscribers and handing those individually to sendmail. Before that, sendmail would be given one email with a huge subscriber list and plod through the recipients, without sorting them so it contacted the same SMTP server many times, and one unresponsive peer would stall delivery for all that followed.
ralph··on Meet the nice-guy lawyers who want $1,000 per worker for using scanners
I know no method to secure the repeal of bad or obnoxious laws so effective as their stringent execution. — http://en.wikiquote.org/wiki/Ulysses_S._Grant
ralph··on Debugging – Section 5.10 of Programming Pearls
One day I found I couldn't log in typing one-handed, holding the keyboard in the other. I finally realised that my password of some years wasn't what I thought it was, I just typed it consistently incorrectly when touch-typing. Quite a secure password when even I didn't know what it was. :-)
ralph··on Yes `yes no`

    tr '\000-\377' '[/*128]\\' </dev/urandom
ralph··on Yes `yes no`
It would have to know the context; those limits don't apply for

    s=`foo`
ralph··on How We Went from 30 Servers to 2: Go
Yes, as you say, it's not known at compile-time and is checked at interpretation time, each time. http://hg.python.org/cpython/file/b49971a1e70d/Python/ceval....
ralph··on How We Went from 30 Servers to 2: Go
The test is in the interpreter, not the compiler to byte-code. Every time the + is evaluated, the interpreter checks for the common case before resorting to finding the first object's method.
ralph··on Unix tricks
You're incorrect. The number of M-backspace you appear to need would seem to depend on how many `little' words comprise the part that needs deleting, e.g. foo/2013-03-13 needed three M-backspace to rid me of the date and a further backspace to remove the trailing slash, which isn't insignificant to all commands, e.g. ls -ld bar/ when bar is a symlink.

In comparison. !$:h understands its task at a higher level. And thanks to key rollover, typing different characters, like !$:h, is quicker than tapping away at . until visual feedback, which may lag, tells me I've done enough.

ralph··on How We Went from 30 Servers to 2: Go
Interesting, thanks.
ralph··on How We Went from 30 Servers to 2: Go
> dereferences the pointers to get the integer values

Doesn't it find a method of x that implements addition?

ralph··on How We Went from 30 Servers to 2: Go
I doubt that. Learn a language's syntax and semantics, perhaps, if it's not C++. Learn its standard library so one uses it aptly rather than re-inventing, less likely, depending on the size of that library. Become proficient in the language's idioms, know its gotchas and what are the more efficient of the choices it presents, less likely still.

Code in it, yes. And I agree with the polyglot.

ralph··on Unix tricks
cd `find -name foo`
ralph··on Unix tricks
No, that gives the last word, as you say, we want the dirname of the last word.

    $ echo foo/bar
    foo/bar
    $ echo !$ !$:h
    foo/bar foo
ralph··on How Balanced Does Database Migrations With Zero Downtime
Is the socat required in the Fabric bits at the end?
ralph··on Today's Outage Post Mortem
Presumably Jupiter's Junos is closed-source, making investigation more difficult? Do they provide it to some of their bigger clients under an agreement?
ralph··on Precious Ink – On handwriting
Ah, the "pulling" issue hadn't occurred to me.

Gold is good because it's flexible but pure gold is too soft and wears too easily so an alloy is used. 14K gold alloy seems to be the sweet spot between flexing and durability, modern 18K loses the former.

ralph··on Precious Ink – On handwriting
Thanks snogglethorpe, that reinforces an opinion I read a while ago when I last looked into this; modern manufactured nibs are steel with little yield and an old gold one can be a better buy for the price. Also, only the Japanese still bother with making old-quality nibs but at a huge price, e.g. the top ones tailor it after having seen you writing. :-)

I've seen nibs for dip pens in the local art-supplies shop, including drawing and map-making nibs, but it's just not practical so I haven't even tried them to see if they're what I want. If they were, I'm puzzled why they have to be dip-only, presumably a fountain nib works differently?

Having searched a little it seems 14K gold alloy is best, but modern rules mean it can't be labelled gold so isn't manufactured any more. http://www.richardspens.com/?page=ref/ttp/materials.htm

ralph··on Precious Ink – On handwriting
I'd like a fountain pen where the nib actually splayed on a little downward pressure so the width of the stroke was wider. Most nibs are far too strong and don't yield at all.
ralph··on Bad sleep 'dramatically' alters body
I recently read a news article that said making roughly in the middle of a night's sleep is natural and you should just expect to doze off again rather than worry about it occurring.
ralph··on The Meaning of 'su'
No, unless one understands the subtleties, it may be best to use -i.

    $ sudo -s
    $ pwd
    /home/ralph
    $ exit
    $ sudo -i
    root@orac:~# pwd
    /root
    root@orac:~# logout
    $
    $ sudo strace -fe execve sudo -s
    execve("/usr/bin/sudo", ["sudo", "-s"], [/* 16 vars */]) = 0
    execve("/bin/bash", ["/bin/bash"], [/* 16 vars */]) = 0
    ...
    $ exit
    $ sudo strace -fe execve sudo -i
    execve("/usr/bin/sudo", ["sudo", "-i"], [/* 16 vars */]) = 0
    execve("/bin/bash", ["-bash"], [/* 16 vars */]) = 0
    ...
    root@orac:~# logout
    $
ralph··on So what happened to the HN server?
I remember when this would have been considered noise here; now it's the top comment.
ralph··on Ways to Tail a Log File on Windows and Linux
Might you re-phrase the question? tail -f won't stop so when do you want the screen to clear?
ralph··on Use long flags when scripting
The OP says to use long-options at all times when not at the command prompt. All this other stuff is a scenario you're placing around it to try and justify it.
ralph··on Use long flags when scripting
Good question. I've used systems, e.g. AIX, where env(1) was in /bin.
ralph··on Use long flags when scripting
> then why am I using the code at all

You're using it because it comes with the job that's paying you and you want to see what it does and form an opinion on its quality. Much crap code is procured and produced by companies.

“…clarity is often achieved through brevity” — Kernighan and Pike, _The Practice of Programming_. It's an excellent book, I recommend every programmer should have read it. http://amazon.com/exec/obidos/ASIN/020161586X/mqq-20 http://cm.bell-labs.com/cm/cs/tpop/

← PreviousPage 2 of 26Next →