Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
neoteric
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
neoteric
5y ago
Absolutely, RAII is an abstraction (and a useful one), but it has a cost in that it prevents a form of useful optimization because cleanup is required at the destruction of the stack frame. You'd expect the same in C if you explicitly
2.
▲
by
neoteric
5y ago
One thing I've been thinking about in C++ land is that just how much the idiomatic usage of RAII actually prevents the compiler from doing it's own tail call optimization. Any object instantiated in automatic storage with a non-t
3.
▲
by
neoteric
13y ago
For what it's worth, this is broken when the target directory contains spaces/wildcard characters, etc. I would suggest you consider using something like the following to generate the command line you pass to ssh: printf -v c
4.
▲
by
neoteric
13y ago
Firstly, the Linux kernel already provides easy accessors for the MSRs, see arch/x86/include/asm/msr.h. Secondly, have you investigated the existing msr-tools package, and the existing driver for msr accesses? (see 
5.
▲
by
neoteric
13y ago
How would that work? The MSRs are _not_ memory mapped.
6.
▲
by
neoteric
14y ago
The contrived examples you've shown aren't examples of POSIX-incompatibility, or bugs in `find` at all. You've explicitly involved the shell. Of course trying to run every directory name as a shell command string is going to result in exe
7.
▲
by
neoteric
14y ago
I am assuming a POSIX-compliant implementation of `find`. The shell is not involved. FWIW, your `find -print0`/`xargs -0` is not POSIX.
8.
▲
by
neoteric
14y ago
This is simply not true: $ mkdir '; echo woops' $ find . -type d -exec echo {} ';' . ./; echo woops As you can see 'woops' is never echoed. EDIT: The reason being the shell is never involved in this process, and the sh