Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ralph
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
18 ms
·
151.
▲
by
ralph
14y ago
No, cat(1) stands for catenate, not concatenate. http://en.wiktionary.org/wiki/catenate
152.
▲
by
ralph
14y ago
Wanting to remove the files was so common that some finds have it built-in. Avoids even the overhead of -exec rm {} +. find -name '*.log' -delete
153.
▲
by
ralph
14y ago
IFS needs some care and attention and read should have -r. $ ls -Q " spaces " $ ls | while IFS="\n" read -r f; do ls "$f"; done spaces $ For lots of grim detail see David A. Wheeler's http://www.dwheeler.
154.
▲
by
ralph
14y ago
Sorry, what do you think vim $(grep -lr foo | xargs) is doing? Assuming a missing directory after the `foo' why can't it just be vim $(grep -lr foo .) I don't see that xargs's default behaviour is adding anything. For
155.
▲
by
ralph
14y ago
I too like xargs but see no need for these two xargs given sed is already used? find images -name '*.jpg' | sed 's/\.jpg$// s/.*/convert -geometry 200x &.jpg &_thumb.jpg/'
156.
▲
by
ralph
14y ago
dstat(1) is another of this ilk, also Python. I prefer it because new results are printed under old, giving history in scrollback. If on a machine where these aren't available, `vmstat 1' is the standard historical fallback.
157.
▲
by
ralph
14y ago
That's missing some quotes; it's trying to set an environment variable called -g, which is an invalid identifier. Mine is export PAGER=less LESS='-wiXz-2$j15' LESSBINFMT=.
158.
▲
by
ralph
14y ago
I too would favour Steve McConnell's _Code Complete_ over Jeff's blog-post collection but having read the book when it came out, i.e. not recently, I wasn't too keen overall, perhaps it was McConnell's Microsoft background. My preference is
159.
▲
by
ralph
14y ago
Not sure why it got all the down votes. Since Visual BASIC faded away there's been two mainstream languages that have come in for much complaint; C++ and PHP. All languages suffer some valid criticism as none are perfect but the weight of c
160.
▲
by
ralph
14y ago
He was very biased; it counts for little.
161.
▲
by
ralph
14y ago
Regardless of the structure of modern usage its syntax is still very noisy for the reader. It seems the majority prefer the cleaner syntax that doesn't use punctuation to define the type of access a la BASIC.
162.
▲
by
ralph
14y ago
They could drift. Better to do a one-ping ping and run iwconfig once in a loop.
163.
▲
by
ralph
14y ago
I can understand liking the regularity but in production code or web examples it shouldn't be done because of the overhead. However, your example doesn't make sense. If sort, tai64nlocal, and ffmpeg are all happy to read stdin so you can do
164.
▲
by
ralph
14y ago
Who said the GiBs need to be fetched from disk; they could already be in RAM. Even if not, it's still adding many system calls and context switches when the CPU could be doing other things; the machine isn't running just this one thing.
165.
▲
by
ralph
14y ago
If you really prefer to see things in order then <foo sort | ... is an alternative to cat foo | sort | ... though I wouldn't particularly recommend it. Instead the overhead of cat(1) should be omitted and it written in
166.
▲
by
ralph
14y ago
Perhaps because sending GiBs through read(2) and write(2) unnecessarily isn't a NOP?
167.
▲
by
ralph
14y ago
I'm also self-taught but find not all comp. sci. books are dry, particularly those with a Bell Labs background. Something about their writing style perhaps. You may want to peruse Aho and Ullman's excellent C edition of Foundations of Compu
168.
▲
by
ralph
14y ago
This post by rsc should answer your questions and more. http://research.swtch.com/interfaces
169.
▲
by
ralph
14y ago
Dupe of http://news.ycombinator.com/item?id=4431154
170.
▲
by
ralph
14y ago
I'd recommend it too. I used to hang out on comp.compilers back when John was drafting it so, thanks to vetting the AIX bits, I got my name in the final book's acknowledgements (alongside dozens of others). Small thing, I know, but still p
171.
▲
by
ralph
14y ago
Also sudo. $ sudo -i # tr \\0 \\n </proc/$$/cmdline -bash #
172.
▲
by
ralph
14y ago
def wrap_around(self): """Change the position of the bubble to toroidally "wrap around" if it goes off one edge of the map.""" if self.pos.x < 0: self.pos.x += 1 if self.pos.y <
173.
▲
by
ralph
14y ago
No, Amazon dishes out -20 to all amazon.com IDs. Other countries have other numbers, e.g. -21 is amazon.co.uk.
174.
▲
by
ralph
14y ago
Given the http://www.amazon.com/gp/product/1591845297/?tag=referly-20 URL how does referly know which of its users to pass Amazon's commission onto? Several could turn up to refer on the same product.
175.
▲
by
ralph
14y ago
If y and slope are floating point in the first block then might not y end at other than the desired endpoint because of accumulative error?
176.
▲
by
ralph
14y ago
Did you know it can provide a one-time pad of ten verification codes to print out and store and it will provide another batch on request?
177.
▲
by
ralph
14y ago
find(1) has an -ls built-in, thought the format is slightly different. You can also use -printf to suit. Also, later GNU finds make some uses of xargs unnecessary. find -type f -exec ls -ltr {} +
178.
▲
by
ralph
14y ago
Dupe of http://news.ycombinator.com/item?id=4327654 (thanks to non-canonical URL).
179.
▲
by
ralph
14y ago
What were the most common activities done by the IPs that were "new" in the last twelve hours? New compared to the history of IPs available. Just wondering if it was orchestrated or whether it would give a clue as to the resource that was c
180.
▲
by
ralph
14y ago
I looked through the BASIC manual of the ZX81; it had no thick section of memory addresses?
More ›