What the fuck is wrong with Virginia Foxx?

Uncategorized No Comments

The kind of bilious, hate-driven homophobic nonsense spewing out of the mouth of Congresswoman Virginia Foxx, R-NC, makes me ill.  I know a lot of smart people in North Carolina.  It remains unclear to me how they could allow a monster like this to govern them.

Unsurprisingly, at this time, the good Congresswoman is unavailable for comment by any phone number I can find (I’ve tried eight so far; they all just ring, or go to voicemail.)

http://www.americablog.com/2009/04/republican-congresswoman-says-matthew.html

If you are a republican, it is people like this which are why your political support has dropped to a historic low of 16%.  For reference, 14% of americans support the legalization of Heroin; you’re near absolute clue zero.  If you’re from North Carolina, I sure hope you’re a Democrat.  If you aren’t, and you know what happened here …

I cannot imagine how Virginia Foxx came to the notion that the Matthew Shephard tragedy was “a hoax.”  This woman should be ashamed of herself for making such a claim.

Please let the congresswoman know what you think.

Phone: (202) 225-2071
Phone: (336) 778-0211
Phone: (828) 265-0240

If this woman retains her seat past the next election, North Carolina will join Texas and Alaska as states full of people with absolutely unfathomable priorities.  Just unbelievable that this woman is willing to show her face in public after perpetrating such obvious hate driven fiction.

I would consider this a new low for a place like Westboro Baptist, the people who stalk funerals.  For this to come out of a seated congressperson’s mouth after 1850 is just stunning.

And here I thought Raleigh-Durham and Chapel Hill were representative of the state.  Makes you wonder what Rep. Brad Miller thinks; he’s forward enough to understand why Don’t Ask Don’t Tell is destructive.

Reminders are nice

Erlang, Miscellaneous, Programming No Comments

Always nice when someone lets you know, y’know?

[19:43] <apples> by the way StoneCypher, if you're curious, the level
          of functionality provided by my SMTP server in C, which is
          ~1000 lines, i trimmed down to less than 100 in erlang :p
[19:45] <StoneCypher> lel
[19:45] <StoneCypher> and i bet it's less buggy now too
[19:45] <apples> quite
[19:46] <apples> oh, and i wrote it in an hour
[19:46] <StoneCypher> awesome
[19:46] <StoneCypher> can i post that quote on my blog?
[19:46] <apples> sure thing

Helps one remember one’s doing the right thing to push people to learn new things.

Kutiman Mixes YouTube

Audio Links, General Interest, Media Links, Miscellaneous, Video Links No Comments

Those of you know know me personally know that I am extremely picky about music: whereas I enjoy nearly every genre, I am very particular about stylistic elements, quality, and skill of execution.

My friend Poffy turned me on to Kutiman Mixes YouTube about an hour ago; I’ve watched it several times before realizing I needed to spread it around.  It appears that some guy got a bunch of YouTube videos and mixed them into a video album, compositing the video elements into a barely explicable thing which vascillates between montage, pastiche and 60s-style disoriented spook video.

It’s honestly mindblowing.  Speaking as someone thoroughly inured to things like the McRoll and the Windows song by being double oldbear enough to remember the various versions of .MOD, this really still tweaks all my knobs.  This isn’t just weird.  This is genuine music.  It’s good.

This is one an mazing.

Senator John McCain is an Idiot

General Interest, Miscellaneous, Rants, Uncategorized No Comments

Apparently John McCain thinks it’s pork to control Mormon Crickets in Utah.  So much so, it seems, that he’s marked it the #6 piece of pork in a trillion dollar spending bill, despite that it’s less than one one thousandth of one percent of the cost.  Given that he’s biblically old, I would have thought he’d understand how important it is to stop SWARMING LOCUSTS.  I shit you not, the quote:

$1 million for mormon cricket control in Utah – is that the species of cricket or a game played by the brits?

I mean seriously, that’s so fundamentally uninformed that I can’t even mock it.  A million dollars is a bargain for statewide pest control that costs hundreds of millions of dollars in structural and crop damage annually.  He’s old enough that, statistically speaking, he should have seen every living thing at least twice by now (including brontosaurus); one is tempted to remind him of that crawly sandwich he had with Joseph Smith.

“I have no idea what they’re even talking about, so surely I’m qualified to think it’s pork!  Who needs locust control anyway?”

Asshat.

Link: Programmer Competency Matrix

Miscellaneous, Programming No Comments

I originally found the PCM through Starling Software‘s copy, but it turns out to originally be by Sijin Joseph.  As both sites have lots of other interesting content, I’m linking both.

The Programmer Competency Matrix is a surprisingly realistic grid of capabilities sorted by topic, which gives an extremely rough but in my opinion basically valid idea of an engineer’s gumption.  Starling republished it as part of their standard set of tools to be used during a hire.

Regardless of whether you agree with the grid or its data, it’s fun.  Have a look, and try scoring yourself.

Math only shows some countries the love

General Interest, Miscellaneous No Comments

It turns out that time() is going to report 1234567890 on Valentine’s Day this year for about 1/3 of the planet.  Anyone on the wrong side of Greenwich Mean Time gets the joke.

Adware Scumbag Self Justification

General Interest, Programming, Rants No Comments

One of the most amazing things to me about the typical adware scumbag is their desperation to justify their own behavior.  An interview with such a person just went onto slashdot, in which in the site afterword, he attempts to compare his choices to the Millgram Experiment.

Of course, anyone with half a clue will remember three things:

  1. He was not being instructed by an authority figure that adware was in the victim’s best interest
  2. His goal was making money
  3. He had months, including time away from the authority figure, in which to think it over

The dirtbag goes on to talk about how difficult it was to ignore a challenging occupation when one doesn’t have many other options.  Thing is, I could be making tons of money as a pirate, or writing malware, and I manage to get through my day without doing it.  I’m also willing to bet that Drew Peters wasn’t actually looking for other jobs at the time.

“It’s even harder if the bad starts out small and slowly gets bigger.”

Horseshit.  The second you do something bad, you object, and if they try to force you, you walk away.  That’s why when I found out my old boss Russell was triple- or more billing his clients in my name, I told him that he stopped tomorrow, or I walked.  Did I get fired?  Sure, but I told the client what happened, so so did Russell, and I ended up getting the job back with a different boss and a much larger hourly billable.

Oh, and I had my honesty and decency intact.

Go to hell, Matt Knox.  It’s not that hard to not write malware.  It’s just hard for people like you.  I hope that eventually you find yourself the victim of the things you’ve done to others; you’ve almost certainly caused far more damage than you’ll ever understand, during a time where it was extremely easy to get other work.

Disgusting.

WebKit overflow:hidden and clear:none clipping failure

Programming, Web and Web Standards No Comments

There is a failure in WebKit to honor overflow:hidden with clear:none on child elements.  This prevents several cheesy no-table space filling strategies which have worked portably since IE3 from working in WebKit derived browsers (safari, chrome, etc.)

Test case with screen shots and examples.

I have submitted this as Bug 23221.

A Better Erlang TCP listening pattern: addressing the fast packet loss problem

Erlang, Programming, Tools and Libraries, Tutorials 11 Comments

[digg-reddit-me]I’ve had mixed reactions to this when I’ve discussed it with people on IRC.  This may be well known to oldbear Erlang programmers.  I suppose it’s also possible that I’m wrong, though I’ve talked to several people I respect, and more than one of them have suggested that they were already aware of this problem.  If I’m wrong, please let me know; I’m open to the possibility that there’s a better answer that I just don’t know about.  I’ve never seen it discussed on the web, at least. Update: Serge Aleynikov points out that this TrapExit tutorial documents this approach.

I think this is probably real.

I believe there is a significant defect in the idiomatic listener pattern as discussed by most Erlang websites and as provided by most Erlang example code, and which is found in many Erlang applications.  This defect is relatively easily repaired once noticed without significant impact on surrounding code, and I have added functionality to my ScUtil Library to handle this automatically under the name standard_listener.

The fundamental problem is essentially a form of race condition.  The idiomatic listener is, roughly:

do_listen(Port, Opts, Handler) ->

    case gen_tcp:listen(Port, Opts) of

        { ok, ListeningSocket } ->
            listen_loop(ListeningSocket, Handler);

        { error, E } ->
            { error, E }

    end.

listen_loop(ListeningSocket, Handler) ->

    case gen_tcp:accept(ListeningSocket) of

        { ok, ConnectedSocket } ->
            spawn(node(), Handler, [ConnectedSocket]),
            listen_loop(ListeningSocket);

        { error, E } ->
            { error, E }

    end.

Now consider the case of a server under very heavy load.  Further, consider that the listening socket is opened either {active,true} or {active,once}, which is true in the vast bulk of Erlang network applications, meaning that packets are delivered automatically to the socket owner.  The general pattern is that the listening socket accepts a connection, spawns a handling process, passes the connected socket to that handling process, and the handling process takes ownership of the socket.

The problem is that it takes time for that all to happen, and Erlang doesn’t specify or allow you to control its timeslicing behavior (as well it should not).  As active sockets are managed by a standalone process, this means that if the connecting client is fast and the network is fast, the first packet (even the first several under extreme circumstances) could be delivered before the socket has been taken over by the handling PID, meaning that its contents would be dispatched to the wrong process, with no indication of where they were meant to go.  This invalidates connections and fills a non-discarding mailbox, which is a potentially serious memory leak (especially given that erlang’s response to out of memory conditions is to abort an entire VM.)

Obviously, this is intolerable.  There are better answers, though, than to switch to {active,false}.  One suggestion I heard was to pre-spawn handlers in order to reduce the gap time, but that doesn’t solve the problem, it just makes it less likely.

The approach that I took is to lie.  standard_listener takes the following steps to resolve the problem:

  1. Add the default {active,true} to the inet options list, if it isn’t already present.
  2. Strip out the {active,Foo} from the inet options list, and store it as ActiveStatus.
  3. Add {active,false} to the inet options list, and use that options list to open the listener.
  4. When spawning handler processes, pass a shunt as the starting function, taking the real handling function and the real ActiveStatus as arguments
  5. The shunt sets the real ActiveStatus from inside the handler process, at which point the socket begins delivering messages

This neatly closes the problem.  A free, MIT license implementation can be found in ScUtil beginning in version 96.  A simplified, corrected example follows for immediate reference; the thing in ScUtil is more feature complete.

do_listen(Port, Opts) ->

    ActiveStatus = case proplists:get_value(active, SocketOptions) of
        undefined -> true;
        Other     -> Other
    end,

    FixedOpts = proplists:delete(active, SocketOptions)
             ++ [{active, false}],

    case gen_tcp:listen(Port, FixedOpts) of

        { ok, ListeningSocket } ->
            listen_loop(ActiveStatus, ListeningSocket);

        { error, E } ->
            { error, E }

    end.

listen_loop(ActiveStatus, ListeningSocket, Handler) ->

    case gen_tcp:accept(ListeningSocket) of

        { ok, ConnectedSocket } ->
            spawn(?MODULE, shunt, [ActiveStatus,ConnectedSocket,Handler]),
            listen_loop(ActiveStatus, ListeningSocket, Handler);

        { error, E } ->
            { error, E }

    end.

shunt(ActiveStatus, ConnectedSocket, Handler) ->

    controlling_process(ConnectedSocket, self()),
    inet:setopts(ConnectedSocket, [{active, ActiveStatus}]),
    Handler(ConnectedSocket).

A Happy New Year’s into 2009 to All

Miscellaneous No Comments

A happy, healthy and safe 2009 to everyone.  Remember the best parts in people you know, help the less fortunate, and help make 2009 better than 2008 in your part of the world.

« Previous Entries Next Entries »