## Kitchen progress, we have a floor!

February 24, 2020 Home renos No comments , , ,

Our contractor installed the new kitchen tiles this weekend, and I think it’s looking pretty good, even without the grout:

There’s still some finicky work with the thresholds to do, but we should be able to get the cabinet installers in to do their work soon.

We spent some time at the house too.  Sofia got tons of the remaining chaos under control, and I putzed away, patching up the giant holes in Connor’s old room’s closet, which we ripped the plumbing and electrical out of (there was improperly installed plumbing and electrical in there for a 2nd floor laundry.)

The holes in the floor are because the old owner didn’t properly replace the subfloor that he massacred to run his plumbing and electical (on one side he didn’t have anything at all, and just covered it up the hole with some click-together hardwood).  I have some nice solid plywood that I’ll put in here to replace the missing OSB, but I couldn’t do that this weekend (at least easily) without my table saw, which was at the new-house.  I’ll also screw in a parallel section of 2×6 on the right hand side of the closet to strengthen the joist, which was also massacred a bit — that’s probably overkill, but I may as well while the floor is open.

## Building a cantilever TV stand

February 17, 2020 Home renos No comments , ,

The basement den in the new house has a really nice built in TV cabinet.

The problem is that gargantuan TVs are too cheap these days, and the one we bought a couple years ago doesn’t fit.  We’ve had the TV propped up in front of the built in cabinet on a temporary stand (the one we used at the old house.)  Our plan was to build a cantilever shelf that just fits into the built in cabinet, which would support the TV, and is non-destructive.  Should we get rid of the current behemoth for a smaller TV, we could just take out the cantilever unit, and things would basically be back to the original state.

I wanted to match character with the original unit, which appears to be built from 3/4″ MDF, and has tasteful lips around all the basic boxes like so

These edges are all 1.5″ thick, 2x the width of the stock used for the box portions of the unit.  Here’s what I built (still not sanded, nor painted)

This is a big shelf, “weighing in” at 51″ wide.  Since I had a left over wide shelf reinforcing bar, I’ve used that underneath

My joinery isn’t perfect, and looked pretty bad before sanding, especially with the glue smears, showing.

After a hand-sand this looked much better.  Only the portion at the very front really needs to be sanded, since the rest will be hidden.  I’ve got to pick up my sander from the old house, and give things a good once over before priming and painting.

Because the shelf and the TV are both big and awkward, I’ve installed it temporarily, even though it’s not sanded and painted yet.  This will keep the TV out of the way for now:

## Kitchen renovation progress.

February 1, 2020 Uncategorized 2 comments ,

We are making good progress on the kitchen renovation (a _lot_ of it over the last couple days).  Here’s a couple weeks ago with the cabinets and backspash removed

then Friday with some of the tile removed:

yesterday, with the tiles, subfloor and unsavable drywall removed

and finally today, after piles of back breaking work and bruises and scratches (removing old tile is not easy!), we’ve got things cleaned up

The wall that had been butchered by the first owners of the house is rebuilt, ready for new drywall on both sides (no more microwave cavity in the stairwell.)

We’ll have to take out the electrical outlet in the stairwell, and fix up the stairwell sconce, which had been “installed” without a standard octagon box.

I was glad to see that the kitchen outlets were all run properly, so we don’t have to cut into the subfloor to run new lines back to the panel.

Next steps:

• choose and order tile, and underlay material
• rough in plumbing
• drywall and flooring installation
• priming
• cabinet and appliance installation
• trimwork and finishing.

## Lines and planes in geometric algebra.

January 30, 2020 Uncategorized No comments

## Motivation.

I have way too many Dover books on mathematics, including [1], which is a nice little book, covering all basics, plus some higher level material like gamma functions, Fourier series, and Laplace transforms. I’d borrowed this book from the Toronto Public Library in my youth. I’ve been meaning to re-read it, and bought my own copy to do so (too long ago.)

Perusing the chapter on vectors, I saw his treatment of lines, specifically the distance from a point to a line, and realized I’d left that elementary geometry topics out of my book.

Let’s tackle this and the similar distance from a plane problem here.

## Distance from a line.

Given a point $$\Bx$$ on a line, and a direction vector $$\Bu$$ for the line, we can parameterize all points $$\By$$ on the line by
\label{eqn:lineAndPlane:20}
\By(t) = \Bx + a \Bu.

In particular, the vector $$\Bx – \By$$ is directed along the line if
\label{eqn:lineAndPlane:40}
\lr{ \Bx – \By } \wedge \Bu = 0.

While \ref{eqn:lineAndPlane:40} holds in $$\mathbb{R}^2$$ (and in fact $$\mathbb{R}^N$$), this relationship is usually written in the $$\mathbb{R}^3$$ specific dual form
\label{eqn:lineAndPlane:60}
\lr{ \Bx – \By } \cross \Bu = 0.

Given a vector $$\Bs$$, representing a point, not necessarily on the line, we can compute the (shortest) distance from that point to the line.

Fig 1. Distance to line.

Referring to fig. 1, it’s clear that we want this distance is just the rejection of $$\Bu$$ from $$\Bd = \Bx – \Bs$$. We can decompose $$\Bd$$ into components parallel and perpendicular to $$\Bu$$ using the usual trick
\label{eqn:lineAndPlane:260}
\begin{aligned}
\Bd
&= \Bd \Bu \inv{\Bu} \\
&=
\lr{ \Bd \cdot \Bu }
\inv{\Bu}
+
\lr{ \Bd \wedge \Bu }
\inv{\Bu},
\end{aligned}

where the first component is the projection along $$\Bu$$, and the last is the rejection. This means that the
directed distance to the line from the point $$\Bs$$ is
\label{eqn:lineAndPlane:80}
\BD = \lr{\lr{\Bx – \Bs} \wedge \Bu } \inv{\Bu}.

Should we want the conventional cross product formulation of this vector, this product may be expanded within a no-op grade-1 selection, applying the duality relation ($$\Bx \wedge \By = I \lr{ \Bx \cross \By }$$) twice
\label{eqn:lineAndPlane:100}
\begin{aligned}
\Bd \wedge \Bu \inv{\Bu}
&=
\Bd \wedge \Bu \frac{\Bu}{\Bu^2}
} \\
&=
\inv{\Bu^2}
I (\Bd \cross \Bu) \Bu
} \\
&=
\inv{\Bu^2}
I (\Bd \cross \Bu) \cdot \Bu
+
I (\Bd \cross \Bu) \wedge \Bu
} \\
&=
\inv{\Bu^2}
I^2 (\Bd \cross \Bu) \cross \Bu
} \\
&=
\frac{\Bu \cross (\Bd \cross \Bu)}{\Bu^2}.
\end{aligned}

## Distance from a plane.

Given two linearly independent vectors $$\Ba, \Bb$$ that span a plane, and a point $$\Bx$$ in the plane, the points in that plane are parameterized by
\label{eqn:lineAndPlane:140}
\By(s,t) = \Bx + s \Ba + t \Bb.

We can form a trivector equation of a plane by wedging both sides, first with $$\Ba$$ and then with $$\Bb$$, yielding
\label{eqn:lineAndPlane:160}
\lr{ \Bx – \By } \wedge \Ba \wedge \Bb = 0.

This equation is satisfied by all points $$\Bx, \By$$ that lie in the plane

We are used to seeing the equation of a plane in dot product form, utilizing a normal. That $$\mathbb{R}^3$$ representation can be recovered utilizing a dual transformation. We introduce a bivector (2-blade) representation of the plane itself
\label{eqn:lineAndPlane:180}
B = \Ba \wedge \Bb,

and then let
\label{eqn:lineAndPlane:200}
B = I \Bn.

With such a substitution, \ref{eqn:lineAndPlane:160} can be transformed
\label{eqn:lineAndPlane:220}
\begin{aligned}
0
&= \lr{ \Bx – \By } \wedge B \\
\lr{ \Bx – \By } B
} \\
\lr{ \Bx – \By } I \Bn
} \\
I \lr{ \Bx – \By } \cdot \Bn
+
I \lr{ \Bx – \By } \wedge \Bn
} \\
&=
I \lr{ \Bx – \By } \cdot \Bn,
\end{aligned}

where the last wedge product could be discarded since it contributes only a vector grade object after multiplication with $$I$$, and that is filtered out by the grade three selection. Multiplication of both sides with $$-I$$ yields
\label{eqn:lineAndPlane:240}
\lr{ \Bx – \By } \cdot \Bn = 0,

the conventional form of the equation of an $$\mathbb{R}^3$$ plane.
If we want a more general representation, then we are better off using the wedge product form of this equation
\label{eqn:lineAndPlane:280}
\lr{ \Bx – \By } \wedge B = 0,

where we use \ref{eqn:lineAndPlane:180} to drop the references to the original spanning vectors $$\Ba, \Bb$$. As with rotations, in geometric algebra, it is more natural to encode the orientation of the plane with a bivector, than to use a spanning pair of vectors in the plane, or the normal to the plane.

For the question of shortest distance from a point to our plane, we want to compute the component of $$\Bd = \Bx – \Bs$$ that lies in the plane represented by $$B$$, and the component perpendicular to that plane. We do so using the same method as above for the line distance problem, writing
\label{eqn:lineAndPlane:300}
\begin{aligned}
\Bd
&= \Bd B \inv{B} \\
&=
\lr{ \Bd \cdot B } \inv{B}
+
\lr{ \Bd \wedge B } \inv{B}.
\end{aligned}

It turns out that these are both vector grade objects (i.e. there are no non-vector grades that cancel perfectly). The first term is the projection of $$\Bd$$ onto the plane $$B$$ whereas the second term is the rejection. Let’s do a few things here to get comfortable with these components. First, let’s verify that they are perpendicular by computing their dot product
\label{eqn:lineAndPlane:320}
\begin{aligned}
\lr{ \lr{ \Bd \cdot B } \inv{B} }
\cdot
\lr{ \lr{ \Bd \wedge B } \inv{B} }
&=
\lr{ \Bd \cdot B } \inv{B}
\lr{ \Bd \wedge B } \inv{B}
} \\
&=
\inv{B^4}
\lr{ \Bd \cdot B } B
\lr{ \Bd \wedge B } B
} \\
&\propto
\lr{ \Bd \cdot B } B^2
\lr{ \Bd \wedge B }
} \\
&\propto
\lr{ \Bd \cdot B }
\lr{ \Bd \wedge B }
} \\
&=
0,
\end{aligned}

where we first used $$B^{-1} = B/B^2$$, then $$\lr{ \Bd \wedge B } B = \pm B \lr{ \Bd \wedge B }$$ (for $$\mathbb{R}^3$$ $$B$$ commutes with the wedge $$\Bd \wedge B$$ is a pseudoscalar, but may anticommute in other dimensions). Finally, within the scalar selection operator we are left with the products of grade-1 and grade-3 objects, which can have only grade 2 or grade 4 components, so the scalar selection is zero.

To confirm the guess that $$\lr{ \Bd \cdot B } \inv{B}$$ lies in the plane, we can expand this object in terms of the spanning vector pair $$\Ba, \Bb$$ to find
\label{eqn:lineAndPlane:340}
\begin{aligned}
\lr{ \Bd \cdot B } \inv{B}
&=
\lr{ \Bd \cdot \lr{ \Ba \wedge \Bb} } \inv{B} \\
&=
\lr{
(\Bd \cdot \Ba) \Bb

(\Bd \cdot \Bb) \Ba
} \inv{B} \\
&\propto
\lr{
u \Ba + v \Bb
}
\cdot \lr{ \Ba \wedge \Bb} \\
&\in \setlr{ \Ba, \Bb }
\end{aligned}

Similarly, if $$\lr{ \Bd \cdot B } \inv{B}$$ has any component in the plane, dotting with $$B$$ should be non-zero, but we have
\label{eqn:lineAndPlane:360}
\begin{aligned}
\lr{ \lr{ \Bd \cdot B } \inv{B} } \cdot B
&=
\gpgradeone{ \lr{ \Bd \cdot B } \inv{B} B } \\
&=
\gpgradeone{ \Bd \cdot B } \\
&= 0,
\end{aligned}

which demonstrates that this is the component we are interested in. The directed (shortest) distance from the point $$\Bs$$ to the plane is therefore
\label{eqn:lineAndPlane:380}
\BD
=
\lr{ \lr{ \Bx – \Bs } \wedge B } \inv{B}.

There should be a dual form for this relationship too, so let’s see what it looks like. First note that for vector $$\Bd$$
\label{eqn:lineAndPlane:400}
\begin{aligned}
\Bd \wedge B
&=
\Bd I \Bn
} \\
&=
I (\Bd \cdot \Bn),
\end{aligned}

so
\label{eqn:lineAndPlane:420}
\begin{aligned}
\BD
&=
I \lr{ \lr{ \Bx – \Bs } \cdot \Bn } \inv{I \Bn} \\
&=
\lr{ \Bx – \Bs } \cdot \Bn \inv{\Bn}.
\end{aligned}

This would conventionally be written in terms of a unit vector $$\ncap$$ as $$\lr{\lr{ \Bx – \Bs } \cdot \ncap} \ncap$$.

## Summary.

We can write the equation of a line, plane, (volume, …) in a uniform fashion as
\label{eqn:lineAndPlane:440}
\lr{ \By – \Bx } \wedge V = 0,

where $$V = \Bu_1, \Bu_1 \wedge \Bu_2, \Bu_1 \wedge \Bu_2 \wedge \cdots \wedge \Bu_n$$ depending on the dimenion of the desired subspace, where $$\Bu_k$$ are linearly independent vectors spanning that space, and $$\Bx$$ is one point in that subspace.

The (directed) distance from a vector $$\Bs$$ to that subspace is given by
\label{eqn:lineAndPlane:460}
\BD = \lr{ \Bx – \Bs } \wedge V \inv{V}.

For the $$\mathbb{R}^3$$ special case of a line, where $$V = \ucap$$ is a unit vector on the line, we showed that this reduces to
\label{eqn:lineAndPlane:480}
\BD = \ucap \cross \lr{ \lr{ \Bx – \Bs } \cross \ucap },

For the $$\mathbb{R}^3$$ special case of a line, where $$V = I \ncap$$ is a unit bivector representing the plane, we found that we could write \ref{eqn:lineAndPlane:460} as a projection onto the normal to the plane
\label{eqn:lineAndPlane:500}
\BD = \lr{ \lr{ \Bx – \Bs } \cdot \ncap } \ncap.

Again, only for $$\mathbb{R}^3$$ we were also able to write the equation of the plane itself in dual form as
\label{eqn:lineAndPlane:520}
\lr{ \By – \Bx } \cdot \ncap = 0.

These dual forms would also be possible for other special cases (like the equation of a volume in $$\mathbb{R}^4$$ and the distance from a point to that volume), but should we desire general relationships valid in all dimension (even $$\mathbb{R}^2$$), we can stick to \ref{eqn:lineAndPlane:440} and \ref{eqn:lineAndPlane:460}.

# References

[1] David Vernon Widder. Advanced calculus. Courier Corporation, 1989.

## Falling victim to youtube clickbait: Sociologist claims “Math is racist”

January 24, 2020 Incoherent ramblings No comments , , , ,

I made the mistake of listening to the following stupid interview while eating lunch today:

This was a stupid interview, and was probably just designed to piss people off:

1. The premise itself is asinine.  There have probably been racist applications of all fields of study, but that does not imply any intrinsic racism.  Individuals can be racist, but it takes extraordinary circumstances to make a subject racist.
2. The interview format was ridiculous.  If one makes the unlikely assumption that there is some sort of nuanced view to the thesis, how can somebody be expected to explain it in 4 minutes in an aggressive and confrontational interview?

Sadly, it sounded like the interviewee actually did want to make the claim that “math is racist”.  However, she was actively trying to bend language to her will, redefining racism in the process, which is both lazy and pathetic.  It seems to me that it is profoundly immoral to attempt to use words that have historical baggage, words that invoke an emotional reaction because of that history, and then do a bait-and-switch redefinition of the word under the covers.  It’s like playing the magician’s game, distracting somebody with the left hand, while the tricky right hand palms the coin.

What would racist fields of study actually be?  How about the research programs of the Nazi doctors, or US military radiation experimentation on blacks in the ’50s [1].  Those I’d call racist research programs.  To use abuses of math to call the subject itself racist weakens the term to the point that it is meaningless.

The 4 minute constraint on this interview was also pointless.  I don’t have any confidence that the interviewee would have been able to provide a coherent argument, but this sound bite format made that a certainty.  Calling that an interview is as ridiculous as the thesis.  Kudos to the interviewer for quickly calling her on her BS as it was spouted, but he should be ashamed of trying to fit that “discussion” into a couple of minutes.

<h1>References</h1>

[1] William Blum. <em>Rogue state: A guide to the world’s only superpower</em>. Zed Books, 2006.

## Some adverts from 1930’s and 1940’s Argosy pulp magazines

December 29, 2019 Incoherent ramblings No comments ,

I have a whole pile of 1930’s and 40’s era pulp fiction magazines that I bought when I was a kid.  I’d read all the Tarzan books and was also raised in a Scientology household where LRH was revered, so I hoped to buy some of the original Argosy pulp fiction mags that I understood featured both these authors.

I asked at my local used bookstore if they had any such magazines and was told yes, but “If you want them, you buy the whole box.”  The bookstore owner didn’t want to haul the box out of the back storage room, have me flip through them, not find what I was interested in, and then have to put them all back.  I basically had to buy the whole lot sight unseen.  For $15 I ended up with a giant box that had a whole bunch of Argosy magazines as well as a whole bunch of “Blue Book” (a “magazine for boys and men”.) I didn’t score the Burroughs nor the LRH that I was hoping for, but they were pretty neat nonetheless. Plus there were a couple 1910’s era magazines that I also scored, which I thought were worth the$15 just by themselves.

Despite how cool I thought these mags were, the bulk of them have languished in boxes (kept from degrading in comic book bags), for years in various basements.  When my latest move was pending, I thought it was time to get rid of some of them.  They didn’t move on kijji nor facebook-marketplace, but I gave a few away to people who came by the house, and have now also started sprinkling some of these around various Toronto “Little Free Libraries” in the new neighbourhood.

The aspect of these magazines that I like the best are the ads.  Here are the ads from two 1936 issues and one 194x issue (both of which now live in a neighborhood little free library.)

## Amazon’s kindle-direct now has Canadian manufacturing

As a “kdp” author, I got an email about new Canadian manufacturing for kindle-direct orders (i.e. my Geometric Algebra book and various UofT physics and engineering class notes compilations.)

Here’s a fragment of that email:

“We’re excited to announce paperback manufacturing in Canada! This enables new features for KDP authors, including:

Please note that, as of today, proof copies and author orders for authors in Canada will still be printed and shipped from the US.”

With the low price that I set my book prices at, paying just the US shipping for an “author proof” has been about the same as ordering a normal copy, so now there will really be no point to ordering proofs anymore.

## Interesting z/OS (clang based) compiler release notes.

December 13, 2019 C/C++ development and debugging. No comments , , , ,

The release notes for the latest z/OS C/C++ compiler are interesting.  When I was at IBM they were working on “clangtana”, a clang frontend melded with the legacy TOBY backend.  This really surprised me, but was consistent with the fact that the IBM compiler guys kept saying that they were continually losing their internal funding — that project was a clever way to do more with less resources.  I think they’d made the clangtana switch for zLinux by the time I left, with AIX to follow once they had resolved some ABI incompatibility issues.  At the time, I didn’t know (nor care) about the status of that project on z/OS.

Well, years later, it looks like they’ve now switched to a clang based compiler frontend on z/OS too.  This major change appears to have a number of side effects that I can imagine will be undesirable to existing mainframe customers:

• Compiler now requires POSIX(ON) and Unix System Services.  No more compilation using JCL.
• Compiler support for 31-bit applications appears to be dropped (64-bit only!)
• Only ibm-1047 is supported for both source and runtime character set encoding.
• C89 support appears to have been dropped.
• Hex floating support has been dropped.
• No decimal floating point support.
• SIMD support isn’t implemented.
• Metal C support has been dropped.

i.e. if you want C++14, you have to be willing to give up a lot to get it.  They must be using an older clang, because this “new” compiler doesn’t include C++17 support.  I’m surprised that they didn’t even manage multiple character set support for this first compiler release.

It is interesting that they’ve also dropped IPA and PDF support, and that the optimization options have changed.  Does that mean that they’ve actually not only dropped the old Montana frontend, but also gutted the whole backend, switching to clang exclusively?

## weird match.com identity theft?

November 29, 2019 Incoherent ramblings No comments , , , ,

My gmail inbox was filled with “Like” emails from various guys this morning, and it appeared that somebody had created a new match.com profile using my gmail address:

Weirder still, the identity using my email address, was that of a woman:

I don’t understand the motivation of using my email address, since I was able to use that email address to submit a password change.  At that point, I was able to see that the profile was for somebody purporting to be an Australian.

In the time between changing that passsword to lock out the originator of this profile, and switching it to ‘not visible’, the password appears to be reset again.  I’m not sure how that would be possible given that the password change confirmation emails were going to my gmail account.

This made me wonder if match.com is populating itself with fake profiles, and they’ve now switched this one to use a different email address?  That theory seems to be substantiated by the following article about an FTC law suite against match.com for the use of fake profiles.  Looks like their angle is getting people to purchase paid subscriptions after seeing that there was interest in the fake profiles they generated:

“According to the FTC’s complaint, Match sent emails to nonsubscribers stating that someone had expressed an interest in that consumer. Specifically, when nonsubscribers with free accounts received likes, favorites, emails, and instant messages on Match.com, they also received emailed ads from Match encouraging them to subscribe to Match.com to view the identity of the sender and the content of the communication.”

Assuming that this case is not yet resolved, it’s pretty clumsy of match.com to continue to play the same scam.  It’s also pretty clumsy of them to use a female identity for me, but I guess my name is non-standard enough that they didn’t know what to do with it (either that, or they just take a lazy 50/50 chance when creating their fake profiles.)

EDIT: managed to re-reset the password, long enough to figure out how to shut down the identity.   Before I did so, I grabbed a screen shot of “my” profile:

I see that the “Profile Hidden” that I selected the first time I logged in was still selected.  I also tried changing the email address associated with this profile to one that I use only for spam, but match.com won’t allow that without also knowing the birthday that they used to create the fake profile.

## Clocker: A nice world clock app for the mac

November 14, 2019 mac No comments , ,

Our company is scattered to the wind around the world, and I’m often left wondering “what time is it there, right now?”

There’s lots of world clock apps and websites available, but I’m really liking clocker for this at the moment.  Here’s my current view of the local times for my colleagues

( I often work with people in Brussels, Paris, and the UK too, but that’s all in the Zurich timezone. )