jlm-blog
~jlm

9-Nov-2016

I do not understand my own country

Filed under: politics — jlm @ 07:57

Donald Trump has just won the election. I am more baffled by this election result than I’ve ever been, by far. I might disagree with the people who voted for Reagan or W., but I understood plausible rationales for those decisions. I don’t in this case. I spent my entire childhood in Oregon (HRC 51½%) and my entire adult life in California (HRC 61½%), and I don’t even understand how these two states didn’t end up in Hillary Clinton’s camp by much larger margins. I must be in a bubble inside a bubble, and I don’t know how to communicate with those outside.

2-Aug-2016

Solving the quartic using “obvious” steps

Filed under: math — jlm @ 21:40

Looking over the derivations of solutions to quartics (fourth-degree polynomials), I was a little disturbed at how, except for René Descartes’s, the derivations all have steps where “magic” occurs, by which I mean that a step does something mathematically valid but very unintuitive, which just happens to make stuff later on work out just right.

So I wondered whether one could take an approach like Lodovico Ferrari’s, but do it without his “magic”. The basic idea to Ferrari’s approach is to convert the depressed* quartic equation f(x) = x⁴ + αx² + βx + γ = 0 into (x²+p)² = m(x+q)², because taking the square root of both sides produces the quadratic equation x²+p = ±(x+q)√m.

(x²+p)² = m(x+q)² expands into x⁴ + 2px² + p² = m(x²+2xq+q²), which is x⁴ + (2p−m)x² − 2mqx + p² − mq² = 0. We can name that polynomial g(x). From above, we know that the roots of g are the same as the roots of x² ± (x+q)√m + p, and the quadratic formula easily gives us those roots in terms of m, p, & q.

g ≡ f iff α = 2p−m and β = −2mq and γ = p²−mq². Thus our task is to get values for p, q, & m which satisfy these three equations.
m = −β/2q and p = ½(α+m), so p = ½(α − β/2q).
γ = p² − q²m = p² + q²β/2q = p² + ½βq = [½(α − β/2q)]² + ½βq = ¼[α² − αβ/q + β ²/4q² + 2βq].
4γq² = α²q² − αβq + ¼β ² + 2βq³.
2βq³ + (α² − 4γ)q² − αβq + ¼β ² = 0, which is just a cubic in q, which is something we’re presumed to know how to solve. Using q we get m and p from m=−β/2q and p=½(α+m).

With these values of m, p, & q, f ≡ g. So the roots of g(x) from above are the roots of f(x), et voilà, we’re done, no magic needed.

 

*A depressed nth degree polynomial is one in which the (n−1)th term has a coefficient of zero, so a depressed quartic is a quartic equation with no cubic term. For any nth degree polynomial F(x) = xn + an−1xn−1 + an−2xn−2 + …, there is a depressed nth degree polynomial f(x) = xn + bn−2xn−2 + … such that F(x+s) = f(x), because the coefficient of the (n−1)th term of F(x+s) is ns+an−1, which can always be made zero by selecting s to be –an−1/n.

6-Jul-2016

Would the HMS Boaty McBoatface have been an EU vessel?

Filed under: econ, politics — jlm @ 19:45

Not long before the referendum on whether Britain should leave the EU, there was a plebiscite about what to name its newest oceanographic research vessel. To the amusement of the rest of the world, the winning name was ‘Boaty McBoatface’. However, that election result was not enacted, whereas the UK government is treating the Brexit election result as binding. The rest of the world, at least as judged by its various stock markets, was not amused.

On the news there’s been a lot of talk about the so-called ‘regrexit’ theory that many Britons who voted ‘Leave’ were casting ‘protest votes’: expecting that ‘Remain’ would win by a significant margin (despite the polls), they felt their votes wouldn’t affect the election’s result, so even though they wanted ‘Remain’ to win, they voted ‘Leave’ as a signal of their dissatisfaction of the status quo. So, what if the UK government had enacted the earlier vote? If the British had had to put up with having their premier oceanographic ship being named Boaty McBoatface to the derision of the rest of the oceanographic community, that would have been a lesson that votes do matter. If the regrexit theory is correct, then the English are learning that lesson with the very consequential Brexit vote, and it’d have been much better if they’d have learned it from the vote about the boat.

However, it’s worth considering the possibility that the regrexit theory is wrong and the English aren’t as dumb as they look. Sure, the finance sector is going to see a lot of its jobs move to Paris, Dublin, Brussels, etc., but most Britons don’t work in finance, and I’m betting that majority thought they would like the consequences of a weaker pound: British goods now appear cheaper to the rest of the world, so British manufacturing will see a boost, and that’s enough reason to vote ‘aye’ on the Exit. This argument doesn’t get much traction from economists, but those who believe it are sincere in their ‘Leave’ votes — even if you can easily counter it, it’s by no means a frivolous argument.

OK, the economic ramifications of the Brexit can (and surely will) fill a book, but what about the political ramifications? I find it stunning that one of the most powerful positions in the world, the prime minister of the UK, is now one which seemingly no-one wants! David Cameron has announced that he’s going to resign. Boris Johnson, Brexit’s most prominent cheerleader and Cameron’s expected successor, has said he’s not going to run. I expected him to be waltzing his way to 10 Downing St. on rhetoric of how Brexit was the first step to Britain’s upcoming new golden age. Nigel Farage, head of the UKIP, who has just led that party to the achievement of its primary raison d’etre (huge success!), is resigning his post. Regrexit appears to strike these politicians hard. Why aren’t Johnson and Farage, the ostensible winners here, riding their chariot in a victory lap? Instead they’re slinking off as if they lost. I do not understand this.

25-Jun-2016

How Brexit looks to this outsider

Filed under: politics — jlm @ 07:00

“Do not pull trigger whilst aimed at foot” — damn, should ’ave read this earlier!

(Yeah, my drawing could apply to anything the UK’s ever done wrong, but this looks to me like it’s the most applicable act in my lifetime.)

16-Jun-2016

#enough was only enough for what’s not enough

Filed under: politics — jlm @ 07:40

Somehow, the massacre in Orlando wasn’t enough to galvanize most of Congress into even discussing substantive gun reform. WTF?

Somehow, it wasn’t enough to even get some far-from-adequate band-aid measures proposed by Connecticut senator Chris Murphy to the vote. (Yes, the Connecticut in “mass shooting at Sandy Hook Elementary School in Newtown, Connecticut in 2012”, that Connecticut.) I call the measures inadequate because they would not have hindered in any way Newtown shooter Adam Lanza nor Orlando shooter Omar Mateen in obtaining the assault rifles they used in their killing sprees.

So, Sen. Murphy mounted a filibuster to get his ineffective and inadequate bills to a vote, and staffers arranged a supporting social media campaign around the Twitter hashtag #enough. And that worked to get a vote scheduled on Sen. Murphy’s stupid bills.

So, we keep on killing ourselves with these weapons, and spend all of the political energy these mass murders produced on measures which, had they been in effect, would not have even kept the guns the killers used out of their hands.

What is wrong with us?

15-Jun-2016

Super Breakout Guy

Filed under: philosophy — jlm @ 17:27

Fiction literature (especially comic books and movies) often includes characters with “superpowers”, abilities intrinsic to them which are beyond that of ordinary people, powers which no humans in the real world have. There are millions of possible superpowers (and some settings, like the X-Men universe, go so far as to include hordes of undeveloped background characters with minor superpowers), but I’d like you to consider just one: Super Breakout Guy, with the power to break out of any confines! No prison holds him, he can always escape. When marooned on a deserted island, the rough and shark-infested waters separating it from the distant mainland don’t block him. Why, he can even escape from more abstract limits: He slips the surly bonds of gravity and takes flight. He sends 200-character tweets. Freedom, heck yeah! He has even broken out of this hypothetical situation and is right here right now!

Well, no. Of course not. Hypothesizing someone able to break out of hypothetical situations doesn’t make them exist. Hypothetically, someone moving from hypothetical to actual would be actual, but actually they remain hypothetical (and that’s no surprise). See this Usenet Oracle post for an especially amusing take on this.

And this is why the Ontological Argument is unpersuasive. It defines God as “being than which no greater can be conceived”, and puts forward for consideration a “being than which no greater can be conceived, and which exists”. Conceptually, this being exists. Hypothetically, Super Breakout Guy is actual. But conceiving something able to become greater than a mere conception has as little power as hypothesizing someone able to break out of hypotheticals: In order to break out of the realm of mere conceptions, such a being must first be admitted to be actual, otherwise it is only conceivable that it could be greater than mere conceptions are.

(What if Super Breakout Guy breaks out of the bounds of logic?)

28-May-2016

twitcode #3: new mail in mbox

Filed under: programming — jlm @ 09:12

Once upon a time, people’s interactions with computers (those few people who got to interact with computers directly) was mostly through a teletype: a combination of a keyboard where they could type instructions to the computer and a printer where it gave the responses back to them. This model is tenaciously clung to by a handful of still-active projects such as gdb, but the bulk of its use nowadays is from command shells (bash, zsh, cmd.exe) because command-response interaction is much easier to specify, record, automate, examine, modify, and perform remotely in a teletype-style than a GUI-style.
(more…)

3-Dec-2015

Open Hardware flourishing in Shenzhen?

Filed under: news — jlm @ 14:03

NPR’s “Planet Money” is very often very interesting, but something on their Nov 27 broadcast about “hoverboard” design and manufacture caught my interest especially: at about 7:25, they talk about how Shenzhen’s small, agile factories don’t keep their designs as trade secrets. Instead, they make them freely available, so that their [potential] customers can easily see if the factory’s products will work with their design, or how it might be altered to work better, or for incorporation into their design from the get-go. Also, because their peer factories are also publishing their designs, a factory can design its products to incorporate or interoperate well with the products of those other factories. Also also, you can pull good design elements in from other factories’ designs, just as those other factories can pull in elements of your factory’s designs and make their products incorporate or interoperate well with your products! Interesting to hear the “bazaar” model of an open marketplace of free designs operating at such a large scale!

24-Nov-2015

twitcode #2: stream filter to decode MIME

Filed under: programming — jlm @ 12:12

Messing around with some mail handling scripts, I was surprised I didn’t find any good ways to decode MIME as a stream filter. Ten minutes later, I have 13 lines of Perl which do it in 201 characters in my normal non-terse style. It’s great for normal use, but a tiny bit of golfing fits it in a tweet’s 140-character limit:

$ cat mime_decode.pl
#!/usr/bin/perl -w
use strict; use utf8; use MIME::WordDecoder; 
binmode(STDOUT, ":utf8");
while (<>) { print mime_to_perl_string($_); }
$ wc mime_decode.pl
  4  16 137 mime_decode.pl

Good thing there was already a method which does all the real work…

21-Nov-2015

If business hours are 9–5, noon should be 1 PM

Filed under: time — jlm @ 08:36

Today the sun rose at 06:55. I rose at 07:15, being one of those morning persons who madden the folks who go to bed at 03:00, by which time I’ve been conked out fo[u]r hours. Yep, even being one of “those people”, I still missed the sunrise (and that’s normal for me).

Yet, today’s sunset… it’s at 16:53! The “day” closes before the banks do! Now, this crazy skewing of things isn’t because western California is geographically displaced from the reference meridian: high (“solar”) noon here is 11:54. If we’re only 6 minutes displaced from solar time, how come there’s so much more daylight in the morning than the evening? It’s because our standard “business hours” are shifted away from the center. Starting a working day at 09:00 and ending it at 17:00 has three hours before noon but five hours after it. If we shifted our clocks so that solar noon was ∼13:00 (which is what we do for the majority of the year which has DST in effect) then things would be more sensible: about four working hours before solar noon (09:00 – 13:00) and about four after it (13:00 – 17:00). The sun would have risen today at 07:55 and set at 17:53, and wouldn’t everyone be happier with that? Why don’t we just have “daylight savings time” in effect year-round? And then we’d also get the bonus of not having to move our clocks an hour twice a year. And of not having motorists on the roads with an hour less sleep than they’re used to on that one day in spring where DST starts and traffic accidents spike — which, come to think of it, is a far more important reason to quit doing a semiannual time change.

Powered by WordPress