Friday, October 31, 2014

Friday: The point is, it works.

And it's efficient.

  • Fucking traffic was horrible.  You want to know the real reason traffic was so bad?  It's not this.  The reason comes in two parts.  1) People leave a fucking car length in front of them.  If we're only using 50% of the road surface, it's going to be inefficient.  2) People don't know what damn lane they want to be in.  I saw a number of cars jump from lane to lane without any real reason.  Just "oh, that looks like it's going faster!"  There's a bonus third part: 3) Street parking is stupid, and forces the public to subsidize land owners who don't want to spend the money necessary to construct their own parking.  I hate street parking, and will hate it forever.
  • A tiny hamster who owns a tiny bar.
  • A guinea pig nigiri.
  • Batgirl/Supergirl adventures.

Thursday, October 30, 2014

Thursday: Eh. At least it's almost the weekend.

Yes, that is bread inside of shoes.  No, I don't understand it either.

  • Chipmunk.
  • Squirrel.
  • I would argue that "using the absence of competitors to charge extra fees" is the very definition of a monopoly.  When you use your position to extract rents above normal profits, you've stopped working in the public interest.  If we didn't have to deal with half the country being fucking morons, this kind of shit would get your board of directors sent to jail, and the rest of the company broken up.
  • This is dumb.  They should have just let it go, and dealt with problems with, "yeah?  So?  Go fuck yourself."

Wednesday, October 29, 2014

Wednesday: Stupid supercomputer being stupid.

Wait, did the old Batman show not lie to me?  Was everything labeled with signs back then?

  • Ghost/skeleton fight.
  • I would use the stupid shop-specific size names if they were Charizard related.
  • The second plot is most interesting.  The Republican political ads here have been pointing out how terrible the Hawaii heath exchange is.  It never really mattered, though, because Hawaii already mandated job related heath insurance, so the uninsured rate was low to start with.

Tuesday, October 28, 2014

Tuesday: I'm not saying that everything wrong with the world is due to old people, but...

I mean, some of these people seem like they might be young.  Not that old dude without sleeves, but still.
Lots of links today for some reason.


Monday, October 27, 2014

Monday: Mondays suck.

I think this cat is playing the easiest game of Tetris ever.

Sunday, October 26, 2014

Sunday: Wait, where the fucking weekend go?

Oh yeah, I did that stuff yesterday, and then spent all day today doing errands and crap.  

"Damn it, cat.  I just asked you a simple question.  You don't have to be a jerk about it!"

Saturday, October 25, 2014

Saturday: This is apparently why I write all my own programs.

Because computer programmers are basically awful at everything.

Let's start at the beginning.  Julie mentioned a hack-mo-tron thing about asteroids last week.  I was reasonably sure that the math wasn't super difficult, and so after waking up today, I decided to sit down and see if that was true or not.  First, you need to see the diagram of things from wikipedia:

Then you need to note that the orbit is elliptical, and finally remember Kepler's second law.

And then you do math at it.
It's harder than I thought, mostly because step two doesn't have a analytic solution.  The methodology here is as follows.

  1. First, work in a coordinate system in which the origin is at one focus of the elliptical orbit, and write down the equation for the distance to the orbit from that origin as a function of the true anomaly, listed here as theta.  Precalculate the integral of that because you need it later.
  2. Next, we want to work in fixed (or at least known) time steps.  Therefore we need to know theta as a function of t.  The t here is actually (t_abs - t_perihelion) / period, in order to normalize it sanely.  Next, you do a bunch of calculus, and use the fact that the full area is swept out over one period to calibrate things.  This gives a mess that's effectively a constant for a given t, called kappa here.  This has to be solved analytically, but over the range [-pi:pi], there's only one non-trivial solution, so you can do a quick Newton method solution to find it.
  3. Use the anomaly and orbital radius to write the vector U, which contains the (u,v,w) position in orbit coordinates.
  4. Use R_omega to orient the orbit in real space using omega, the argument of perihelion.  This is just a simple spin.  Next, use R_Omega to handle the inclination, with Omega the ascending node and i the inclination angle.  This yields X, which is the (x,y,z) in a universal coordinate system.
  5. Deproject (x,y,z) to (x',y'), because there is no decent 3d visualization code.
And this is where things become me bashing my head against fucking programmers.  I did the initial coding in octave, as after prototyping it, I could simply convert my scalar values to vectors and use the element-wise math in there to parallel a lot of orbits together.  Plus: built in linear algebra and function solvers.  Great.

Except generating a plot in octave in 3d is apparently ruled by the whims of lunatics.  The manual says you can call the axis() function to define the axes of the system, and if you specify "manual," that's retained.  However, every call to scatter3() seemed to reset to an auto set of axes, so even though I generated the thousand frames for my movie, since each frame had unique axes, it looks like shit.  No amount of dicking with the axes elements could fix this.

Ok.  So let's try perl.  Except Gtk is fucking stupid.  Just brain-numbingly "no, you have to do things this way, because there is no other way to do it."  Everything has to have a handler, and a caller, and they all have to be manually packed into other objects, and even then, getting an object you can draw to and clear...  Whatever.  Gtk is broken by design, and I hope the people who wrote it feel bad.

Googling points me to the GD library for perl.  Great.  Allocate an image object of size blah, fill with color whatever, draw to it in arbitrary fashions as you'd expect.  Wonderful.  And it has a 3d mode?  Excellent.

Except 3d mode can do lines, and curves, and polygons, but not a fucking point.  You can't just render a point in 3d space.

Fine, we'll do step five above, because it's functionally equivalent to the R_Omega transform.  You project to a new axis, and then dump the data that's not perpendicular to that axis, as it's just the depth information that you can't see in a 2d figure.  Not that bad of an issue.  

Let's check with a quick test to make sure things work.  There's even an animated gif output product so I can make the movie of the orbits directly.  But, because captain computer decided to increment the version from to 2.1.yyy such that yyy < xxx, and then included a check in the makefile that animated gif support is only available when xxx > 33, this doesn't work.  There's a bug report on it in ubuntu, but it hasn't been propagated to debian, so maybe install it from source locally, and fix the bug yourself, and then.

No.  Fuck it.  It shouldn't be my job to fix things because every damn computer programmer elsewhere can't adequately test their shit.  I'm reasonably sure my math is fine, but without a decent data visualization code, I can't check.

So I went and ate a burger and had some cheese tots.

Thursday, October 23, 2014

Thursday: Crunch.

Today was nearly super eventful.  I was driving home, and was behind a new SUV.  I could tell it was new as it still had a temporary license plate.  We got to The Worst Intersection Ever:
Manoa and East Manoa Roads.
We're travelling down East Manoa road towards the red dot in this story.  We stop at the intersection, and then the SUV starts going again, despite there being cars coming in the approaching Manoa road lane.  Those cars pretty much all slammed on their brakes, as did the SUV at the last moment.  I really thought I was going to have to call the cops to report a giant wreck.  The approaching cars had to swerve across the line to get past and onto Manoa road, and everyone eventually made it home safely.

But this is stupid.  This should be a damn roundabout.  There wouldn't even need to be that much construction.  Mohala way does cut all the way through to Manoa road.  It's dumb, but it's there.  If this was clearly signed as a roundabout, then traffic on Manoa road would all split onto the East Manoa road merge, people could turn onto Mohala or continue on East Manoa, or they could continue on the Mohala cut-through back to the continuation of Manoa road.  Simple, and it keeps traffic flowing, instead of forcing the traffic on East Manoa to wait for approaching Manoa road traffic.  I'm not sure there's another place in existence that would benefit from a roundabout more.

Except possibly the crap storm that is the Oahu/Manoa/Lowrey intersection.  It's a five way stop.  A five fucking way stop.  Roundabout.  There's enough road surface that it could again be added with minimal construction.
Then I got home, went all the way to my apartment, and found this note on my door.

"Please staff."  No.
It was super heavy.
This is a far larger book than I expected.
I'll have to read it when I finish the one I'm reading now.

Wednesday, October 22, 2014

Wednesday: Argh.

This cookie was deceptively not as good as it appeared.

Tuesday, October 21, 2014

Tuesday: Blah.

Show off.

Monday, October 20, 2014

Monday: Ugh.

Sunday, October 19, 2014

Sunday: Never try new things.

"Wait, that's just ramen."

Yes, but I went with the spicy "word I forgot" style, which uses the kotteri base, but adds spicy stuff.  It's not as good as the kotteri. "Yeah, it's not as good as the kotteri," said the guy at the ramen place.  It's not bad, and it's not super spicy, but it does have a bit of a raw pepper flavor that I'm not much of a fan of.

I also saw this very happy spoon.  Keep being happy, happy spoon.

Saturday, October 18, 2014

Saturday: Hurric-apocalypse!

Hurricane Ana hit today.  I was ready.
Hurricane water!

Hurricane pizza!

Hurricane fan!
 Yeah. That's the hurricane.  Maybe it's hiding?

This is what it looked like yesterday.

Here's the totally gratuitous blink between the two.

Basically, it turned out to be just a normal rainy day.

  • I didn't like the links I had, so I'm just going to use pancake cat and be done with it. 

Friday, October 17, 2014

Friday: I'm pretty sure I won't even need to close my storm shutters for this hurricane.

"Am I doing all the music at this monster slaying?  Wait...why am I doing music at a monster slaying?  I don't think all these people are supposed to be here.  I don't think I'M supposed to be here.  Yeah, this all makes about as much sense as my instrument here."

Thursday, October 16, 2014

Thursday: Fine, this post just isn't going to have a title.

Or useful text, I guess.

Or a picture.

I do have links, though.

Wednesday, October 15, 2014

Wednesday: Good news/bad news.

The good news is that the matrix I've assumed was sparse, diagonal enough, and symmetric is all of those things.

The bad news is that that's pretty much the only thing that I could call "science" that I accomplished today.

I guess that given that each of the ~300 computers that need to stay up do stay up most days, I guess I should be happy that things don't explode more often.

Tuesday, October 14, 2014

Tuesday: Stupid supercomputers.

So there's this supercomputer we use.  When I was setting things up, I had to chose a place to put the data.  I chose the partition that had 1.1 petabytes, assuming that would probably be just fine.  I know that things make lots of files, but we transfer everything back from the SC, and have been relying on the fact that there's a kind of "quota" system that deletes old files.  A large part of the set up was engineering a solution to that quota deleting files we weren't done with.

Then today I got an email telling me that I'm using 25% of that partition, and although that's in principle fine, the partition is getting full, so maybe I should knock it off a bit.

It turns out that I can make enough output data products fast enough to overwhelm the thing that's there to stop people from filling up the disks.  Oops.  Sorry, government supercomputer.  I'll clean things up.

And this was in the free pile at work today.  A German language poster for Princess Mononoke.

And no, I didn't take it, because I'm already super cool.

Monday, October 13, 2014

Monday: I saw a different cat today.

I should probably just draw them with crayons in the future.

Sunday, October 12, 2014

Sunday: Why is finding a place for dinner always such a problem?

I spent nearly an hour and a half searching though yelp trying to find someplace to go get dinner today.  The biggest problem is that everything that came up was either someplace I've been recently, or was in a food genre that I didn't want to have (no yelp.  I do not want to go to one of the ninety Korean BBQ places you suggested.  I'm not in the mood).

Eventually after turning off every filter except "open now," I stumbled across Win-Spuntino.  An Italian place.  That does takeout.  It's like the place that I've been searching for forever since we don't have Fazolis.  They just opened a few months ago, so that explains why I haven't heard about it before.

It's hidden next to that Foodland that I always drive past to go get ramen, and there's always piles of traffic, and I wonder WTF half the island is doing going to Foodland.  Turns out there's a lot of other stuff in that place.

Like Doraemon.

So what's it like?  The whole place is tiny, like smaller than my apartment tiny.  They have a seating area, but it's mainly a take-out place.  This means that it's also a bit odd, because they have table service, but it really feels like they're working far harder than they need to.  I mean, I can see the pop machine over there.  I could just walk over and get my own refill.  I feel extra lazy when you do it for me.

They also play "Let's Praise the Fuck out of Jesus" music, which I didn't notice until I was in the middle of eating.  That's generally something I'm not a fan of.

But the food's the actual important thing:
Oh yeah, even for dine in, they serve it in take out containers.  This makes sense for two reasons.
That's their chicken parm, with the partially eaten garlic bread that came out first.  Reason two that the to-go contains make sense: no one is going to finish this pile of food, so it's ready to take home the leftovers.  Slightly spicy sauce, chicken that isn't dry and overcooked, garlic bread that could use more butter, but all garlic bread needs more butter.  So it's a good and proper chicken parm.

The only thing that makes this not a full replacement for Fazolis is that there's no small sizes or sampler, so I can't do the thing where I mix the alfredo and red sauces into a delicious pink middle ground.  It's reasonably close, and I can imagine stopping by after work, placing a to-go order, getting some groceries at the Foodland, and then picking it up after that and going home.

It only took five years, but I think I've found my Italian place.

Saturday, October 11, 2014

Saturday: I couldn't decide what I wanted to eat

So, you know:

  • Aku.
  • What are you doing, dog?  You're not an otter!
  • I've come to the conclusion that the original Star Trek is objectively a bad TV show.  This week's episode had the crew discovering a dead base, and subsequently have to battle fuckery.  Last week's episode had the crew discovering a dead ship, and subsequently had to battle fuckery.  It's not like there was an actual problem, just boom.  This guy's going to do bullshit to fuck things up for no damn reason.

Friday, October 10, 2014

Friday: Here's a political ad.

The actual quote is "I just can't carry the cooler."

This is one of the oddest commercials I've seen.  Apparently the one poll that's been done has Takai down, which I can't imagine is accurate, but that does explain why he's started advertising.  His other commercials are more normal, but this one is just so hilariously bizarre.

Plus, Charles Djou is such an obvious liar when he says things like, "Hawaii needs someone who can work with the president and the Republicans in Congress."  Go fuck yourself.

Thursday, October 9, 2014

Thursday: So that kind of works.

Kind of.

Wednesday, October 8, 2014

Wednesday: Too much stuff today.

First, this set of photos from the eclipse last night:
My camera will not focus when the Moon is saturated.
Second this photo of the rainbow my prism made as the sun was setting:

Third, I never expected last week when I wrote this post about Hatsune Miku that she would be appearing on Letterman tonight.  WTF?
Image in inevitable case that video is taken down:


Tuesday, October 7, 2014

Tuesday: We finish each other's sandwiches!

That is not what you were going to say, liar.

This is actually going to be a math post about Markov chains.

Last night Julie was talking about Markov chains, which led to me sending her boring math stuff, and then remembering that I wrote a thing to produce simulated tweets from my twitter archive.  And then this morning while reading the arXiv/stats listings, I found this paper, which uses board games like Monopoly to talk about MCs.  

In any case, one of the things Julie mentioned today was this KimKierkegaardashian thing that merges two different people into one tweet.  I don't think the KK twitter is actually generated by an MC, as it's way less random that MC generators tend to come up with.

Also that's where the title/gif come from.  Same concept.

Anyway, this made me wonder about the math problem.  If you did want to do that with MCs, and still keep something similar, how would that work?  I was going to put a test example here, but coming up with two or more useful corpora is harder than I thought it would be while driving home.  My test case was going to be "Brock vs Brock," but doing a quick quote pull, and then running it through (Julie's) MC code showed that there wasn't enough text to get a decent chain.  Too many of the words were only used once, so the chains generated were largely just the input.

So, let's do it theoretically instead of experimentally.  MCs are just a matrix, T, defining the transition probabilities from word 1 to word 2.  1->2 is not likely to be the same as 2->1, and the matrix is probably going to be sparse (no corpus is likely to contain the phrase "the angrily" as that's grammatically wrong or "taco hater" as that doesn't exist).  Start from a random initial word, denoted by a state vector, s, indicating which word was chosen, and then the new state is just s' = random(Ts), where the random() chooses from the set of probabilities Ts generates.

What does this have to do with the Brock vs Brock thing?  The simplest thing would be to just take T_brock and add it to T_otherbrock.  This gives transitions that are something like an average of the two Brocks.  This might work, but it's not likely to be funny.  It also won't have the discontinuity in thought the KK or Hans/Anna things do.

So, let's take advantage of the fact that T can be arbitrarily large, and simply index both Brocks differently.  This constructs T', which is just a block matrix with T_brock and T_otherbrock aligned diagonally.  Leaving it like this allows an initial word from Brock to create a chain, but it will be bound to just that one Brock.  There is no jumping between the two, as the other two quadrants of T' are zeros.  That's boring.  To allow jumps from one corpus to the other, some values in those quadrants need to be populated.

My thought (and this is what would have been nice to have an experimental set to work with) is that choosing words that are excessively popular in both corpora would be where to break.  Removing the indexing different for these words will make them common to both, and allow chains that start in one to migrate to another.  Using popular words will ensure that there is a transition with some decent probability, but that you won't get a bunch of switches.  In addition, I suspect conjunctions and articles are going to end up being the common words, and that seems like it'd generate the funniest chains.

Monday, October 6, 2014

Monday: I saw a cat after work today.

It ran away too quickly, so here's a tablet sketch instead.

Sunday, October 5, 2014

Sunday: Well, it was close.

I had the idea to get a cheese steak for lunch today.  So I did the obvious thing, and looked to see what the internet suggested.  "Oh, this place in Kailua looks cool, let's drive over there and try it out!"

It's good that I continued searching until I found their facebook page.  It turns out that they closed.  Last week.  I was literally one week late on the cheese steak train.

HBC has a cheese steak.
Also this bird.
I completely reworked it, though.  It comes with 1000 island dressing, and a horseradish cream, but I had those removed (along with the peppers, and I just now noticed that the onions were gone too), and added mushrooms.
And it's dippable, which is partially why I wanted to get rid of the other wet ingredients.
This version isn't bad, but it still has two issues:  the beef is too thick and dry, and the cheese should be doubled.  Still, not terrible, and it solved the cheese steak problem for the day.

Also, in the off chance that Fox TV marketing reads this, I'm intentionally not watching the show you've been promoting constantly.  It looks like it sucks, and you need to not be rewarded for making shitty shows and then pointing at it like it's not.

Saturday, October 4, 2014

Saturday: I should probably try to do something tomorrow.

Other than eating fish and taking mosaics.

Friday, October 3, 2014

Friday: This may be one of those "stick with me" kind of things.

Today's music video:

You should be able to see the title information, and see that this is the song "Ray" by "Bump of Chicken," and think that's what we're going to talk about.  What a silly name, right?

Nope.  I heard this song on the radio and my first thought was, "holy crap, I think this is the first Hatsune Miku song I've heard."  Who?  You'll have to skip to ~10 seconds in to see her.

"Wait, this cartoon character?"

Yes.  Hatsune Miku isn't real, she's a computer program that can sing.  Specifically, she's one of the many different Vocaloids, which all have unique voices.  Puppycat from Bee and Puppycat is voiced by a different one.  The main difference is that Hatsune Miku has a significant marketing push, to the point where she's actually performed live concerts.

This is where I put the Macross+ link.

  • I'm tempted to go see this Ghost in the Shell marathon tomorrow.  The problem is, part 4 isn't released, so I'd just be going to see parts 1-3.
  • I did not know this about the Honolulu area, and wonder how much of this is skewed due to the military presence here (since I don't see how to link to just Honolulu, the numbers are 1.41 men/women; 119/100 employed men/women, 59/100 employed women/men).
  • The full story is good to read, but this is the best summary I found.  I'm not surprised Pen isn't running things day-to-day.  The good thing is that he at least has a team that understands the show coming after him, unlike others in the past (cough, cough, Dexter's Lab, cough, cough Johnny Bravo).
  • Yeah, but I refuse to buy a Domino's pizza in case that jackass who used to own it has any share in it still.
  • I used twitter instead, and then compared my "followers" and "following" number (on the official Pokedex).  Togetic.  Or Skitty.  Hrm.

Thursday, October 2, 2014

Thursday: No picture, because I can't find anything that looks interesting.

  • I was cleaning out people I followed on twitter yesterday so I could have a nice round number.  One of the things I unfollowed was The Mechanical Pulse, which used to do cool techno on the college station.  It's apparently ended now, but I periodically re-discover a similar show that plays while I drive home on Thursdays.  I'm hoping I'll remember it now.
  • Speaking of college, apparently they're shooting the inevitably terrible Batman/Superman movie there.
  • If they sold this during regular hours, I'd at least try it.  Without ranch of course, because ranch sucks.
  • So the CEO is approving the sale of the Canadian part of Sears to the hedge fund that he controls?  This sounds like some sort of scam, but he's been such a disaster at running Sears, I can't imagine he has an actual plan.
  • Dumb people continue to be dumb, even after being proven wrong.  Some dumb people hide when you tell them they're wrong.  Other dumb people continue to argue that they're still right, because they're not just regular dumb, they're maliciously dumb.
  • The fact that I had to find this story on Buzzfeed is depressing.  Also depressing?  The fact that prosecutors have no actual incentive to work for justice.  More convictions is always good for them, and if that involves twisting a law so they can send mothers to jail because their abusive husbands/boyfriends kill their child, then all the better for them.  Go back and read that sentence again.  What kind of shitbag of a prosecutor would think that that serves any concept of justice?  Feel free to read the story if you basically just want to get worked up into a rage.
  • I forgot my Batman link.  My question: how exactly does Bruce launder his money to the League?

Wednesday, October 1, 2014

Wednesday: Remember when it rained yesterday?

Guess which part of the ledge outside my window got wet.  Bonus points:  which part is slightly lower than the surroundings.
Reading Julie's post today reminded me why I hate python so much.  My initial thought to "how to call a shell script" is system.  Or backtics.  Since you probably care about the return results, backtics would work better.  I guess you could do an open on the command with a pipe to read from the output of the pipe, which is basically what backtics do, except the open is line-by-line.

But, of course, that's in the sane world of perl, so you google "python perl backtics," because this is obviously a question everyone would have.  Then you get this, and see that there's an os.system module that's basically the same as perl system, and os.popen, which is basically backtics.

Except os.popen is "obsolete," and you're supposed to use subprocess.Popen, which is "the correct way to do it."  Double except you probably should be using subprocess32 backport of the 3.2 subprocess.

Which is all bullshit.  Make a thing, make the thing do the thing, then leave it the fuck alone.  Don't keep re-engineering it "to be better."  Don't deprecate something and then come back with "oh, well, you should update your code to the newest version of things.  As far as I can tell, the only major removal between C from 1872 and the newest C11 standard are:

  1. Old functions that returned int didn't need to have that defined, as that was assumed.
  2. gets() is replaced by gets_s(), because gets() can cause buffer overflow issues that are major security issues.
That's it.  Like 139 years, and two things removed.  Perl is similar.  Remember when I mentioned the thousand ways to do this easy thing in perl?  I left out calling the IPC::Open2/IPC::Open3 modules.  Perl is ugly precisely because it's flexible.  There are legitimately five different ways to get the output of a shell script.  Why?  Because sometimes doing it way 1 is easier, sometimes you really need to use way 5.  Taking things out "because that's the wrong way" is how someone tells you that they think you're stupid, and that you need to do things the way they say you should.

I've noticed that a lot of the computer programmers I've met over the years seem to think that "just redesign it" is the solution to lots of problems.  Like there's an objectively perfect solution to every problem, and even though this solution works, it's wrong to not look for the perfect one.

Fuck that shit.  Sure, my Frankenstein monster bleeds from its eyes, and can only drown a child if it's also simultaneously pissing itself.  No, that was not the design.  I don't care.  I made a monster to terrorize the villagers, and if the details are a bit off but the villagers are still terrorized at the end of the day, I'm not going to complain.

  • This is why I think I have all the DVDs for the Superfriends show.  Because sometimes Green Lantern has three arms, sometimes Batman can fly, and sometimes everyone needs to go rescue Flash from the Legion of Doom, including Flash.
  • I'm not a big fan of elephants, but they do have this going for them.
  • Adventure Time.