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 Colorized man pages
I find searching bash(1) just fine with less(1) and do it quite often. The groff mailing list, the main discussion point for all things troff, is slowly chipping away at adding more semantic information to man pages. The BSDs have been making progress here.
ralph··on Colorized man pages
`info foo | less' has it produce the whole "page" as plain text, suitable for easy reading and regexp searching.
ralph··on Go 1.1.1 is released
If it's not thought interesting then it won't meet the front page?
ralph··on Go 1.1.1 is released
Dupe. https://news.ycombinator.com/item?id=5872550
ralph··on ffind: a sane replacement for command line file search
Is this not equivalent and avoids running grep(1) once for each path?

    find -exec grep -iH ${1?} {} +
Though it still runs grep on directories.
ralph··on Facts about Wayland vs X
OK, I've gone and read the OP's text rather than just the quoted part. It seems he's talking about combining multiple X screens into one logical coordinate space, like I expect one or more of the existing extensions do, e.g. Xinerama.
ralph··on Facts about Wayland vs X
Coordinates in the X protocol are signed 16-bit so a screen can run from 0 to 32,767 along an edge. I agree though, the initial complaint is unclear and may be about something else.
ralph··on How Go uses Go to build itself
Yes, C across AIX, Suns, Silicon Graphics, whatever those HP ones were, and others. Platform differences were common, bugs rare because many had been before me and they could always be worked around; I didn't have to fix a C compiler. When writing a compiler the aim is to fix the compiler.

This isn't getting us anywhere. We disagree. I value the opinion of that lot given their many decades of experience. I used to have your opinion, based on textbooks. They've made a good point, one I can see has considered thought behind it.

ralph··on How Go uses Go to build itself
Yes, because of the stableness of the C compiler, bigger test audience, etc., compared to a new language under rapid development.
ralph··on How Go uses Go to build itself
This is flawed AFAICS. It assumes that because 1.0 is fixed in specification that there are no bugs in the implementation. To return to my original point, these smart guys are on the record stating that's why they didn't do a self-hosting compiler; good enough for me. :-)
ralph··on How Go uses Go to build itself
Sorry, I don't understand. You seem to be saying there's only two versions of the compiler, one written in a foreign language, e.g. C, the other in a subset, e.g. Gosub, called G-2. But then there's "whatever is the current version of the language", which suggests to me incremental improvements, e.g. the language develops as experience is gained rather than being fully planned on day one. So doesn't G-2 undergo changes to implement these? You may keep calling it G-2 but there are many (I never said thousands) of versions of it.
ralph··on How Go uses Go to build itself
That's not how the books say to do it, and you're right, given who created Go you'd think they'd know this stuff. :-)

Many generations of the compiler are created. Let's say the compiler-in-C is worked on until it compiles subset Gosub1 which is just enough to write compiler-in-Gosub1 that duplicates compiler-in-C's behaviour. From now, compiler-in-C atrophies. G-2 features are implemented in G-1's compiler, though nothing uses them yet. The compiler's source then uses these, making it G-2 source, only compilable by a G-2-grokking compiler.

Weeks later we have a G-40 where a bug is discovered, introduced in G-20. It wasn't in the compiler-in-C so that's not useful. Choices include fixing it at `head', which can sometimes be awkward as described earlier, or fixing the initial G-20 implementation and then rolling forward all changes from there assuming the fix doesn't break code that was depending on the errant behaviour.

ralph··on How Go uses Go to build itself
Seemingly often enough that it deterred them with Go. No, you may not be able to revert to before the bug was introduced as it may be the bug was there ever since that feature was added. As soon as it is self-hosted, the old compiler becomes quickly irrelevant, i.e. the code rapidly diverts from what it can compile.
ralph··on How Go uses Go to build itself
The Go developers have said they deliberately didn't try and write Go in Go because they've done that with other languages, possibly Alef, I forget, and a bug can arise where the fix is obvious if it wasn't that the bug exists and would be triggered by the fix. Instead, a more awkward fix has to be figured out that doesn't trigger the bug. Of course, once the bug is fixed the original straightforward fix can be substituted but it's all unwanted hassle.
ralph··on Golang heap corruption during garbage collection
But then the debugger can't be called ogle.
ralph··on Relative Line Numbers in Vim
Pre-vim, one would get quite proficient at judging line distances, e.g. 11yy, through practice. Mind you, that was probably helped by text being a fixed size on a serial terminal and bigger than much text today. However, I do wonder if the article is over-promoting movement by lines. Movement commands like ), }, ]], and good old / should be readily considered as well.
ralph··on Poll: Full-time software engineers in London, what's your annual salary?
Here's a £ sign for someone to edit in.
ralph··on A faster way to delete millions of files in a directory
It's not that I'd use Perl for the task, just that I don't think rsync is special. Indeed, rsync has the overhead of forking a child and communicating empty/'s bareness.
ralph··on A faster way to delete millions of files in a directory
This Perl beats rsync by quite a margin here.

    perl -e 'opendir D, "."; @f = grep {$_ ne "." && $_ ne ".."} readdir D;
        unlink(@f) == $#f + 1 or die'
It goes a bit quicker still if @f and the error handling are omitted.

The original article is comparing different things some of the time, e.g. find is having to stat(2) everything to test if it's a file.

ralph··on Watchman: Faster builds with large source trees
I often think it would be useful for a filesystem to provide a digest of a file's content. It's the FS that knows when the file's content changes and the digest is out of date, and it also only needs to recalculate if anything asks. It wouldn't necessarily have to read all the bytes of the file to re-calculate; it may be a hierarchical digest where much of the existing, stored, labour can be re-used.
ralph··on Four Steps to Google, Without a Degree
This team of about 10, was it at Google or elsewhere? Wasn't sure given the higher-level context.
ralph··on Show HN: Find the email address of any GitHub user
It could be better bash, e.g. using [[ instead of [. Also,

    curl -s https://api.github.com/users/$2/events/public |
    grep "\"gravatar_id\":" |
    sed -e's/[,|"]//g' |
    head -n 1 |
    awk '{print $(NF)}'
can be

    curl -sS https://api.github.com/users/$2/events/public |
    sed -n '/"gravatar_id":/!d; s/",//; s/.*"//p; q'
and so on.
ralph··on Meet Runscope
Would be nice if the title had a few words describing what it is.
ralph··on Poll: Which is your primary text editor?
I assume he's thinking of things like http://www.xemacs.org/
ralph··on New Google+ is beautiful?
I agree with your general point. Are you aware that j and k work in multi-column format too, though k seems to not move enough to make the top of the post visible from under the fixed horizontal bar.
ralph··on The Reliability of Go
The go command does more than just compile. http://golang.org/doc/cmd
ralph··on Stop avoiding regular expressions damn it
No, not always. That's a poor example biased to simple string handling.
ralph··on How zsh is more useful than bash
In bash: cd ${PWD/foo/bar}
ralph··on Big-O Algorithm Complexity Cheat Sheet
http://en.wikiquote.org/wiki/Xun_Zi doesn't seem to have it; perhaps an update's required?
ralph··on Simple Raspberry Pi Rack
AIUI, and you may know this, the reason they don't is it would make each Pi considerably more expensive.
Page 1 of 26Next →