Alvin Alexander | Java, Scala, Unix, Perl, Mac OS X

When real and unreal both
Are absent from before the mind,
Nothing else remains for mind to do
But rest in perfect peace,
From concept free.

~ Shantideva

“Conscience, when it is flawless, is the voice of our soul, whispering in our ear.”

~ B.K.S. Iyengar, in the book, Light on Life: The Yoga Journey to Wholeness

If it seems like someone is winking at you, a) they might be, it’s Valentine’s week, or, b) they may have a condition known as blepharospasm, which is a symptom of MCAS. My right eye started doing this 10-15 years ago, long before I knew anything about MCAS.

(Turns out there are ~5,000 mast cells per cubic mm of conjunctival tissue, i.e., the inside of the eyelids.)

blepharospasm, or trembling of the eye

Back in the days before global warming the winters could be cold and long, and one year on February 11th I was on a yoga retreat in Mexico, which is where this picture was taken.

In the days before global warming

Everyone tells me that the cardiologist I see is the best heart doctor in this area, so on Thursday we were talking and I was telling him about mast cell disease, and said, “So that fake heart attack I had last May may have been allergic angina, you know, Kounis Syndrome. If we had known about MCAS at that time I might not have needed that angiogram, yada yada yada.” Then he said, “Wait, what was the name of that disease?”

At first I was upset that he didn’t know what this was, but then I realized how rare mast cell disease is. (This is the same doctor who knew what a Pheochromocytoma is, and told me to get to the Mayo Clinic.)

The good news is that I was able to give him all of the information I have on mast cell disease and Kounis Syndrome, so hopefully in the future he can try giving patients who present unusually some Benadryl and see if that helps. (I started to write, “Give them Benadryl instead of an angiogram,” but the stress test showed a possible dead spot in my heart, so I was getting that angiogram one way or another.)

(This image comes from the book, Never Bet Against Occam: Mast Cell Activation Disease.)

Allergic angina (Kounis Syndrome) in mast cell disease patients

“The way we experience every part of our lives is affected by the qualities of our mind and by the coloring filters of our mental attitude.”

From the book, When the Chocolate Runs Out

My favorite line from this “Bear Safety” sign in Alaska:

“Play dead unless it starts to eat you, then fight back.

bear safety sign in Alaska

I just ran across this photo of my old apartment. I like using a shoji screen to add a temporary “wall” in different spaces, and I used to keep Christmas lights going for most of the winter evenings, as shown.

Shoji screen in my apartment

For many years I’ve dreamt of a basement with secret walls and hidden compartments. The basement is underneath a store, and I always assumed that someone lived in the hidden compartments, but I could never find who it was that lived down there, or find all of the compartments.

With my newfound ability to stay conscious most of the night I found all of the compartments this morning, and I was stunned to learn that dozens of people lived in them. I was further surprised that I “knew” most of the people from previous dreams.

At first a few of them tried to kill me. One of them stabbed me with a syringe of some sort. That knocked me down pretty good, and under normal circumstances I might have gone back to sleep, but a few people, including an advanced yoga instructor I met several years ago, helped me recover. When everyone learned that I wouldn't/couldn’t die, they gave up.

I watched the movie Deuce Bigalow a few nights ago, and ever since then I keep hearing the song Call Me by Blondie on the radio. I think the universe may be suggesting a new career path, though I could be reading it wrong.

As a quick note, this stackexchange.com page has some good background information on how to install a deb package file from the command line on Debian Linux (which in my case is Ubuntu 16.04). The short answer is that if you have a deb file named google-chrome-stable_current_amd64.deb, you’ll want to run these two commands, one after the other, as shown:

If you need to dump the contents of an array to the Android Log (Logcat) output, I can confirm that this approach works, at least with simple arrays of integers and strings that know how to print themselves:

Log.i("MyAndroidClass", Arrays.toString(arr));

If you’re trying to print more complicated arrays of custom objects you’ll probably need to implement good toString methods on those objects, and then this technique should work.

As a quick note, if you need some examples of the syntax of how to write a Java method that returns a generic type, I hope these are helpful:

As a quick note, here’s a Java method that will round a float to the nearest half value, such as 1.0, 1.5, 2.0, 2.5, etc.:

/**
 * converts as follows:
 * 1.1  -> 1.0
 * 1.3  -> 1.5
 * 2.1  -> 2.0
 * 2.25 -> 2.5
 */
public static float roundToHalf(float f) {
    return Math.round(f * 2) / 2.0f;
}

The comments show how this function converts the example float values to their nearest half value, so I won’t add any more comments here.

As a quick note, here’s the source code for a Java “approximately equal” function that I use in an Android application:

I went of my diet a little last night by eating some mozzarella cheese and half a beer, and this morning I woke up extremely itchy with several bumps. That’s how I roll with my version of MCAS.

“As your practice proceeds you’ll be able to remain conscious as you transition from your normal waking state into the states of sleep ... once you can remain conscious like this, you’ll no longer sleep but merely pass through the night by going into deeper states of meditation.”

To those who know me that sounds like something I might write, but those words were published by Ram Dass in 1971.

This image shows a little more of his text. I deleted a few sentences that were repetitive or used obscure words.

Ram Dass on sleep and dreaming

From a Phys.org article titled The thermodynamics of learning:

“The greatest significance of our work is that we bring the second law of thermodynamics to the analysis of neural networks,” Sebastian Goldt at the University of Stuttgart, Germany, told Phys.org. “The second law is a very powerful statement about which transformations are possible — and learning is just a transformation of a neural network at the expense of energy. This makes our results quite general and takes us one step towards understanding the ultimate limits of the efficiency of neural networks.”

The thermodynamics of learning

Last week I was wondering how mechanical watches work, and this morning Erik Bruchez shared this ‘animated infographic’ article on how they work.

How a mechanical watch works