02 December 2016

Horrible Hacks

A confession inspired by this article... here's one of my horrible hacks.

I once ran out of space for buffers in a program on the PDP-11, so I re-used some of the stack space above main()s entry for extra scratch space, and then made sure main() never returned. There was a bunch of memory (over a kilobyte!) at the top of stack containing the environment and command line arguments, so that was space I didn't need once I started. So long as I scanned them and stashed anything of value before I needed to use the space, anyway.

But later it turned out I needed the environment back when I wanted to run another program so the first thing I did was write() the environment to a file, and then when I called anything I read() that file back into place between the fork() and exec().
 
So, what horrible hacks are you guiltily proud of?
 

28 November 2016

Clinton is not pushing for an audit

A rare post, and a rarer topical one without any snark or attempts at humor.

Hillary Clinton and her team is NOT 'pushing for', 'supporting', or otherwise taking part in the effort to have any states electoral results audited and/or recounted.

They are going to participate in any recounts that occur, and they pretty much have to simply because their opponents are going to be involved. But to claim that this means they're part of the push for recounts is at the best misplaced enthusiasm.

And yet a lot of sites, including the Guardian and even Snopes, are talking about Clinton's sudden reversal, based on this post by Marc Elias on Medium.

The post starts out by rejecting the necessity of a special effort to recount these states, and repeats that, good and hard, with details as to why it's not necessary, for several paragraphs. Then it finally makes the most lukewarm announcement possible that now that a recount has been initiated they will participate, and if a recount happens in the other states, they will participate there as well.

Because we had not uncovered any actionable evidence of hacking or outside attempts to alter the voting technology, we had not planned to exercise this option ourselves, but now that a recount has been initiated in Wisconsin, we intend to participate in order to ensure the process proceeds in a manner that is fair to all sides. If Jill Stein follows through as she has promised and pursues recounts in Pennsylvania and Michigan, we will take the same approach in those states as well. We do so fully aware that the number of votes separating Donald Trump and Hillary Clinton in the closest of these states — Michigan — well exceeds the largest margin ever overcome in a recount. But regardless of the potential to change the outcome in any of the states, we feel it is important, on principle, to ensure our campaign is legally represented in any court proceedings and represented on the ground in order to monitor the recount process itself.

That's all. Participation, if and when recounts occur, to cover their legal behinds.

What does this participation entail?

According to the New York Times, this won't involve any material support, but be limited to paying for the presence of their lawyers to monitor the process.

This is basically the minimum level of engagement they could possibly take. This is hardly a reversal. It is not support for Jill Stein's efforts. It is not endorsement nor is it pushing for the recount.

Now... they may take a stronger position on the recount in the future, but as of the morning of the 28th of November, 2016 this is as far as they have gone.

25 May 2016

But who can fear a kzin who is having his ears scratched?

One day, as one does, I searched for this line from Ringworld: "But who can fear a kzin who is having his ears scratched?"

Some fine fellow provided it as an example for the use of "scratched" in a Hungarian-English dictionary.

De ki félne egy kzintől, aki hagyja a füle tövét vakarni?
-- http://www.hungarianenglishdictionary.com/hu/vakar.asp

07 February 2016

No, blowing up the Death Star won't collapse Galactic Civilization.


What part of "it's a galactic civilization" did you miss?

1. The Republic/Empire is a robust Kardashev level II civilization, and not a young one. It's got a LOT of civilized worlds, and is clearly heading for KIII classification. Blowing up a whole planet didn't kick off a depression. Analyzing the resources of a civilization like that using assumptions based on our civilization is like Pliny the Younger looking at the possibility of building an aircraft carrier based on the resources of a slave-based economy and deciding that sinking a single vessel would collapse the world's economy.

2. The Death Star is not productive infrastructure. It's sunk costs. Any economic impact it has is in the past. If maintaining the production lines for the Death Star have a positive impact on the economy, then blowing it up to keep the lines flowing as you build another one is probably the best thing you can do. Of course those same production lines can be used for building, I don't know, modern housing for Jakku scavengers instead. Point is, there's no benefit to the Galactic economy from the continued existence of the Death Star.

3. They make a big deal about the amount of steel involved. That amount of steel is basically lying around in nickel-iron asteroids for the taking in any "dirty" system with a lot of small body matter. That whole part of the paper is like Pliny calculating how many slaves would be needed to dig up the iron ore for the aircraft carrier I mentioned two paragraphs back.

30 December 2015

New Years Resolutions

A quick search on Google confirmed that people are really not stretching themselves when choosing their new years resolutions.

Search term "new years resolution" "1920x1080" got a creditable 33,000 hits... but it looks like almost 80,000 people were willing to put up with 640x480:


COUNT   RESOLUTION
67      2560x2048
239     1900x1200
878     1152x864
2330    1440x1080
4600    1280x1024
9130    2048x1536
10600   1280x960
33000   1920x1080
38400   1024x768
53400   800x600
78900   640x480


Shameful, really

05 November 2015

There is no dark side of the moon really. Matter of fact it's all dark.

The moon's albedo is actually quite low. The Earth is significantly brighter, thanks to the clouds and oceans... which are shiny enough that there's a visible highlight in the center of the disc from the sun directly behind the spacecraft. So in this image, with the brightness adjusted for the larger planet, you get to see the true color of our dry, airless companion world.

Suggested listening for the day: Albedo 0.39

Aug 5: From a Million Miles Away, NASA Camera Shows Moon Crossing Face of Earth

02 October 2015

The Last Android Villain...

I bought a non-Nexus Android phone a few years back. It was my first smartphone. It was released less than a year before Android 4.0 shipped. When I bought it, ICS was already going out to developers.

Did it get an update?

Bollocks.



The cellphone business is chronically sick.



In this article disparaging Nexus phones as "advertising" Vlad Savov writes:
Google's Nexus phones are just ads
I've spent the past couple of days desperately trying to puzzle out the purpose behind Google's newly announced Nexus 5X and 6P smartphones. [...]
One word. Updates.
Google, our knight in shining armor and a propeller hat, has come to save us from the evils of perfidious carriers, ugly Android skins, and late software updates.
I wouldn't mind late software updates. I mind not getting them at all. If you get a flagship phone, it might get updates for a year or two. Then I guess you're supposed to buy a new phone. If you get a mid-range or entry-level phone? You get Bollocks.
There isn't a single Android device manufacturer that is happy with the Nexus program, and I've spoken with them all.
Have you asked them about updates?
Motorola went all-out with the Moto X Pure this year, seeking to deliver the cleanest possible Android experience, best possible specs, and lowest possible price, all while operating independently of carrier interference.
Now they're no longer owned by Google, let's see how they do with updates. If they keep them up, I'll consider getting one. There's a lot of things I really dislike about Nexus phones. Like the lack of SD card slots, which more or less force you to depend on the Google cloud.
 Android phone makers have grown more conscientious and restrained.
Except when it comes to updates.
There is no Android villain left for the Nexus crusader to slay.
Updates.
Making Android profitable for Android phone makers is one of the great challenges of our time.
I'd be happy with a spec-for-spec replacement for my Nexus 4, with an SD card slot. Is that hard to do? The Nexus 5X is more than I want. I was looking at Chinese phones shipping with plain old AOSP or Cyanogen, because I knew the community could support them even if the manufacturer couldn't.
I wish Google would recognize that and try to do more to support Android as a whole rather than just its own good name.
With the phone manufacturers undercutting it all the time, by releasing phones that never receive a single update, they kind of have to.