Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
smcdow
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
31.
▲
by
smcdow
15y ago
How do you handle DMA and other I/O in your system?
32.
▲
by
smcdow
15y ago
Um, no mention of shell functions? I recommend to the author that he spend a full day carefully studying the bash man page.
33.
▲
by
smcdow
15y ago
So what? Even then, there will be no concurrency issues in a single threaded application.
34.
▲
by
smcdow
15y ago
Please explain why this would be true for single-threaded applications.
35.
▲
by
smcdow
15y ago
A (possibly) cleaner way would be to use Boost.asio. I haven't yet evaluated the POSIX Signal handing part of Boost.asio, but I'm hopeful that it will be useful for my purposes.
36.
▲
by
smcdow
15y ago
I'd keep an int flag, initialized to zero. The sighandler sets the flag. The flag is checked (and reset) on entry to newCoin(). Not exactly pretty, but using signals to trigger to produce reports isn't exactly pretty either. Unfortunately
37.
▲
by
smcdow
15y ago
FWIW, printf() is not async-signal-safe. It's bad form to call such routines from within a signal handler. Here's a list of async-signal-safe functions (scroll down): http://pubs.opengroup.org/onlinepubs/009695399/functions/xsh... I know
38.
▲
by
smcdow
15y ago
I think the only real metric that matters is: Which platform generates the most revenue for developers?
39.
▲
by
smcdow
15y ago
I'd love to get rid of iTunes, but AirPlay is a complete necessity for me. iTunes + AirPortExpress == poor-man's-sonos. Also, podcasts would be good.
40.
▲
by
smcdow
15y ago
Sorry, but real BMWs have only two wheels. http://www.bmwmotorcycles.com/us/en/index.html
41.
▲
by
smcdow
15y ago
He claims his commute involves one hour per day walking and one hour per day riding on a train. THIS IS NOT COMMUTING. Commuting is getting in your car and sitting in traffic for two hours per day.
42.
▲
by
smcdow
15y ago
This is simple, standard Paleo diet behavior. Here it is in a nutshell: No grains nor legumes; minimize fructose; minimize PUFAs; emphasize MUFAs and saturated fats, especially short- and medium- chain triglycerides; aim for 20% carbs, 65%
43.
▲
by
smcdow
15y ago
Props to Trent and all, but Kraftwerk was doing all this and more in the 1970s. They're the original Mensch-Maschine.
44.
▲
by
smcdow
15y ago
ps -ef | grep foo | grep -v grep Will fail if foo="grep"
45.
▲
by
smcdow
15y ago
Drop it in your .bashrc and just type "psg foo"
46.
▲
by
smcdow
15y ago
function psg () { [[ -z "$1" ]] && return ; local _first=${1:0:1} ; local _rest=${1:1} ; [[ -z "$_rest" ]] && _rest='[^]]' ; local _com="ps -ef | grep '[$_first]'$_rest" ; eval "$_com" }
47.
▲
by
smcdow
15y ago
Out of curiosity, I tried this and it worked fine: seq $((2**32)) | perl -ne '/find me/ && print'
48.
▲
by
smcdow
15y ago
Seriously? People still do this? ps -ef | grep foo | grep -v grep This always works: ps -ef | grep '[f]oo' And, if you're running a modern operating system: pgrep foo
49.
▲
by
smcdow
16y ago
Does no one in HN understand the basic concepts of configuration management?
50.
▲
by
smcdow
16y ago
Look in Rosedale. You can still get a good house for under $500K.
51.
▲
by
smcdow
16y ago
Where the stable version for RHEL-5?
52.
▲
by
smcdow
18y ago
Workaround? Are you suggesting that MySQL somehow hotpatch the kernel (which is what would be needed to fix the problem)? When was the last time you saw a userland process hotpatch a kernel? This issue belongs to the kernel hackers, not use
53.
▲
by
smcdow
18y ago
Until system scripts start being written in alternative shells (which will never happen), I wouldn't bother learning any other shell than /bin/sh (and, by extension, bash). For more complex applications, stick to Python. Also, I never reall
54.
▲
by
smcdow
18y ago
Yes, calories==energy. But why is it necessarily "spill out all over"? If thermodynamics apply (and they do), then adding more fuel to a fire makes the fire burn hotter. Or, to keep the car analogy, pumping more gas to the engine makes the
55.
▲
by
smcdow
18y ago
whoops, sorry, on crack. You can't after it's been deleted.
56.
▲
by
smcdow
18y ago
yes, you can. and this is better than copying.
57.
▲
by
smcdow
18y ago
Oh, brother, formatting.<p> <pre> $ echo 'echo $0' > 'Hello, world!' $ chmod +x 'Hello, world!' $ 'Hello, world!' Hello, world! $ wc 'Hello, World!' 1 2 8 Hello, world! </pre>
58.
▲
by
smcdow
18y ago
Not really: $ echo 'echo $0' > 'Hello, world!' $ chmod +x 'Hello, world!' $ 'Hello, world!' Hello, world! $ wc 'Hello, World!' 1 2 8 Hello, world! 8 bytes. I think that's probably as small as you can get.
59.
▲
by
smcdow
18y ago
It can be done in 8 bytes.
60.
▲
by
smcdow
18y ago
Ugh. As someone with an EE degree, this is a nice allegory explaining why anyone with a CS degree coming in an job interview at my company has to demonstrate that they've overcome their deficiencies introduced by the CS program. Usually a f
More ›