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

A favorite quote from an all-time favorite movie, Peaceful Warrior.

You need to start asking better questions

I don’t remember the origin of this photo, but here are two moose fighting in Palmer, Alaska.

I lived in Palmer when I first started going through the thyroid issues, and because of those issues I’d go for walks at any time during the day, 24 hours a day. One late night or early morning I went for a walk and came across a moose, but fortunately I saw it early and it was a non issue. He or she went on their way, and I went the other way.

Two moose fighting in Palmer, Alaska

One new thing I learned in the last week is the `htop` command. It’s a nicely-improved version of the standard top command. This image provides some hints as to its features. If you have a Mac, you can install it with Homebrew.

The Unix/Linux `htop` command

This page contains a large collection of examples of how to use the Scala Map class. There are currently well over 100 examples.

A Scala Map is a collection of unique keys and their associated values (i.e., a collection of key/value pairs), similar to a Java Map, Ruby Hash, or Python dictionary.

Here’s a photo from Virginia Beach at sunrise in late May, 2019. I used a dark black and white filter when taking the photo, but everything else is natural.

Sunrise at Virginia Beach, May, 2019

In two small tests where GraalVM was able to create a native executable, the native executable ran significantly faster than the equivalent Scala/Java code running with the Java 8 JVM, and also reduced RAM consumption by a whopping 98% in a long-running example. On the negative side, GraalVM currently doesn’t seem to work with Swing applications.

Once upon a time, a black bear walked into the Breeze Inn in Seward, Alaska ... but was encouraged to leave.

Bear walks into the Breeze Inn, Seward, Alaska

Here’s part of the road (I-25) from Colorado to Santa Fe, New Mexico.

The road from Colorado to Santa Fe, New Mexico

This week in mast cell disease (MCAS) included temporary kidney shutdown on Wednesday (swollen feet and ankles), insane migraine Thursday, fake heart attack Friday, and hives on Saturday. I used to think it was going to kill me, but now I think it’s just here to torture me.

Back on July 20, 2010, I found this little chalet while walking in a small neighborhood in Wasilla, Alaska. I remember really liking the A-frame style, and also the 1-car, 1-snowmobile (snowmachine) garage. Although looking at it now, it appears there’s no simple way to pull straight in and out of the garage.

Little house in Wasilla, Alaska

If you ever need to drive from the Boulder/Denver, Colorado area to (or from) Santa Fe, New Mexico, the gray route on the left in this image is the most scenic, the one to take if you only get one shot at it. Lots of mountain views and ranches, and many small towns.

Once you get off of I-25, the blue road that goes through Taos is also very scenic, and is particularly pretty in the winter. I usually take the gray road back to Colorado, and the Taos road down to Santa Fe.


Driving from Boulder, Colorado to Santa Fe, New Mexico

A short chapter on "metaphor", from the terrific book, Zen Master Raven.

Metaphor, from Zen Master Raven
Table of Contents1 - Example2 - A more complex example3 - Problems?4 - Summary

If you’re ever working on a really small Scala project — something that contains only a few source code files — and don’t want to use SBT to create a JAR file, you can do it yourself manually. Let’s look at a quick example. Note that the commands below work on Mac and Linux systems, and should work on Windows with minor changes.

The sign pretty much says it all: Cheap beer, lousy food. This sign is from a restaurant in Seward, Alaska.

Cheap beer and lousy food (a restaurant in Seward, Alaska)
Table of Contents1 - An Akka “Hello, world” example2 - A second example3 - More examples4 - Where Akka fits in5 - Source code6 - Key points7 - See also

This is an excerpt from my book, Hello, Scala. In this lesson I’ll show two examples of applications that use Akka actors, both of which can help you get started with my larger “Alexa written with Akka” = Aleka application.

Back to top

An Akka “Hello, world” example

First, let’s look at an example of how to write a “Hello, world” application using Akka.

Writing a “Hello” actor

An actor is an instance of the class, and once it’s created it starts running on a parallel thread, and all it does is respond to messages that are sent to it. For this “Hello, world” example I want an actor that responds to “hello” messages, so I start with code like this:

One of the tremendous views from the long bike and walking path in Palmer, Alaska. The Boulder, Colorado area is great, but there’s something about being in Alaska, where the population density is about 1/10th or 1/100th of what it is here that’s really wonderful.

The bike path in Palmer, Alaska has a great story titled How it started: First jobs in football for all 32 NFL head coaches. Below are some of my favorites quotes from some of the coaches.

Ron Rivera:

“I was going to make them need me by working as hard as I could,” Rivera said. “I did everything from taking coaches’ cars to get washed and gassed, picking up lunch. I did all the quality control breakdowns. Basically, from the ground up. I learned what it took to be successful. You had to make yourself indispensable, where they had to have you around to help the team.

A friend of a friend posted this false image on her Facebook page, and several people responded with profane comments about AOC. Finally someone else who actually put some thought into it posted this Snopes page showing that AOC never said anything like this. The fact is, the entire commentary was fabricated. Per Snopes:

“The source of the fabricated article, Taters Gonna Tate, is part of a network of sites and social media accounts operated by Christopher Blair, who produces a high volume of junk news and misinformation, much of it inflammatory, which he presents as ‘satire.’”

The sad thing is that some people don’t think, and they seem to want to believe propaganda like this. Two things are going through my mind after seeing this racism and hatred. First, we really need to focus on the state of education in the United States, both IQ and EQ. Second, I think a lot of people have pent-up anger because no matter how hard they work, they don’t have much money, because in America the rich are getting richer and the poor are getting poorer, and the middle class is disappearing.

Disinformation, and the people who believe it

This photo shows the size of our teeny weeny little Sun compared to a few other stars. From the excellent web page, "The Scala of the Universe 2".

The scale of the universe (our sun compared to other stars)

One of my favorite road signs in Alaska - “Caution: Yield to All Aircraft.” Seems like great advice. You can find this sign somewhere around Lake Hood, in Anchorage, Alaska.

Yield to aircraft sign in Anchorage, Alaska