Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ralph
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
16 ms
·
121.
▲
by
ralph
14y ago
You can ignore the bit about Emacs if you wish. http://www.jwz.org/doc/x-cut-and-paste.html
122.
▲
by
ralph
14y ago
Gamers? Why are they heavy users of the decimal module?
123.
▲
by
ralph
14y ago
See also http://news.ycombinator.com/item?id=4583263 for comments though it links straight to Kickstarter, and not Ars Technica.
124.
▲
by
ralph
14y ago
A ternary op, Python's is nice, would be welcome. ;-) map[bool]int{false: 3, true: 14}[foo != 0]
125.
▲
by
ralph
14y ago
Agreed, Rob Pike, in his search engine example at Google's I/O 2012 IIRC, made the explicit point that mutexes are there and that channels are for joining large concurrent parts of the program together; guarding a data structure seems too s
126.
▲
by
ralph
14y ago
I realise the point is to show sometimes vim is inappropriate. However, the commands given in the first one are long-winded and not equivalent, I'm not sure the readers who stand to gain from the article will notice this. As I wrote elsewhe
127.
▲
by
ralph
14y ago
Further to my reply to sibling-reply finnw, here's the pattern of digits, further showing his 10 * 9, etc., breakdown. $ pins | > sed -r ' > :a; s/^([0-9])(.*)\1/\1\2a/; ta; s/[0-9]/a/ > :b; s/a([0-9])(
128.
▲
by
ralph
14y ago
Right, and about a quarter contain the same digit at least twice in a row, which may be the "double digit" the grandparent referred to. $ pins() { seq -f '%04.0f' 0 9999; } $ pins | egrep -c '(.)\1' 2710 $ pins | egrep -c
129.
▲
by
ralph
14y ago
How good is the platform detection accuracy? I ask because for goo.gl I see analytics with the + suffix plump for many "Other Unix" when the majority of those would have been Linux.
130.
▲
by
ralph
14y ago
If definitely existed before 1996 as I recall introducing it to a particular company's servers. :-)
131.
▲
by
ralph
14y ago
Disappointed to see no mention of GNU Stow there, very handy for /usr/local having multiple version of foo installed and being able to make one of them current, e.g. rewind if a new one breaks things. http://www.gnu.org/software/stow/
132.
▲
by
ralph
14y ago
It's read as "cmd, stdout to file, stderr to the same place as stdout".
133.
▲
by
ralph
14y ago
zsh had the idea first IIRC.
134.
▲
by
ralph
14y ago
No, I meant the window's furniture so no colours. I agree, a tty-wrapper, like tmux, would provide another option. I don't suppose there are terminals generally about where `tput hs' is true. Have you considered using the end of the prompt
135.
▲
by
ralph
14y ago
I too prefer just PS1='$ ', I want the cursor to be the same distance from the margin every time, to have maximum length for typing without wrapping, and the ability to put in a few separator lines between command output by just tapping Ret
136.
▲
by
ralph
14y ago
Nice to see tr getting some use, though given the sed on either side I wonder if sed -r 's/\<./\U&/g; s/ +//g; s/[^a-zA-Z].*//' would be better. Note, the last s/// doesn't need a g.
137.
▲
by
ralph
14y ago
Thanks, I think you've corrected me on this before and I haven't learned! My Plan 9 comes from before this switch.
138.
▲
by
ralph
14y ago
To withdraw shell programming from Unix takes away one of its strengths. Not everything warrants Python, etc.
139.
▲
by
ralph
14y ago
Fortunately they fixed that errant man page. :-) http://man.cat-v.org/plan_9/1/cat
140.
▲
by
ralph
14y ago
Removing files is a common need coupled with find yet many readers don't know of -delete; I was pointing it out. That doesn't weaken xargs's valid uses. You seem a little defensive? :-)
141.
▲
by
ralph
14y ago
What's wrong with cat -- * >../foo given that cat(1posix) does support --.
142.
▲
Readable Lisp S-expressions, infix, function calls, and indentation
(readable.sourceforge.net)
2 points
by
ralph
14y ago
|
0 comments
143.
▲
by
ralph
14y ago
Backticks, ``, and $(), use IFS to parse the command's output into words which then become the $()'s replacement and IFS normally contains \n.
144.
▲
by
ralph
14y ago
You wouldn't like Plan 9 then; it wisely took the decision to forbid spaces (U+20) in file names at the kernel level.
145.
▲
by
ralph
14y ago
I think I'm missing your point. doc[12] aren't changed.
146.
▲
Fixing Unix Filenames: Control Characters, Leading Dashes, and Other Problems
(dwheeler.com)
52 points
by
ralph
14y ago
|
43 comments
147.
▲
by
ralph
14y ago
It's most definitely catenate. I understand catenate to mean chain and concatenate to be to chain together. Since "cat foo bar xyzzy" doesn't modify the files to join them in any way I don't think they're chained together. Besides, ken &
148.
▲
by
ralph
14y ago
The difference between cat file | foo foo <file assuming foo only reads stdin so `foo file' isn't possible, is that with the latter the shell will open file for reading on file descriptor 0 (stdin) before execing foo and th
149.
▲
by
ralph
14y ago
But why run so many greps? I don't think there's a need for -n1 here. xargs -rd'\n' grep -l "$@"
150.
▲
by
ralph
14y ago
With < on a FIFO it's the shell that blocks on opening before the command, e.g. cat, is run.
More ›