It was a nice warm day today (unlike all of last week), so I rode down to the beach this afternoon as a break from work. Now, I’d heard the phrase “sea of gold” applied to the ocean before, but this was the first time I’d seen it. The angle of the sun made the vast expanse of the sea look like how you might imagine molten gold*. It was beautiful. It was also painful to look at because it was so bright. In ten minutes only the distant ocean looked golden, and in fifteen the entire effect was gone.
* Actual molten gold looks glowy red-orange, like pretty much any other molten metal, because the black-body radiation exceeds the reflected light.
Comments Off on Sea of gold
The shell reads scripts in as it runs, and not even nicely line-by-line, so when you modify a running script, weird things can happen as the shell gets inconsistent versions. Usually this just results in harmless errors like “/home/jlxmodmap not found”, but if you’re like me you worry about “rm tmpfile; process importantfile” turning into “rm importantfile”. The usual technique for the paranoid is to “mv script script.old; cp script.old script”; the shell sees the old script, which you keep unmodified, while you edit the copy. But it’d be nice if you didn’t have to do this everytime…
So, someone told me the trick of having all the work a script does happen in a shell function, which you call at the end of your script. I’m using this for my .xsession (canonical example of a script modified while it’s running), which looks like:
main() {
do stuff
do more stuff
do even more stuff
exit
}
main
voilà. It’s already read in all of main() by the time it runs it, so you can modify it freely, except when it’s just starting up and parsing things.
Comments Off on Protecting running scripts from modifications
So, the results from the meta-meta-analysis (seriously) are in: Despite what well-selling relationship books may tell you, men and women are way more alike than different. Ha! I figured this was all over-exaggerated and over-weighted.
Popular science version
Real science version
Comments Off on Men are from Earth, women are from Earth