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

Today a person did something that upset me. For a few moments it really bothered me and I thought, “Wow, this person is being a real jerk.” Then I remembered the phrase, “Every obnoxious act is a cry for help,” and I realized that this was this other person’s way of saying that they were hurting, and it helped me calm down in regards to them.

If you’re interested in the future of Scala, i.e., Scala 3, also known as Dotty, Martin Odersky recently shared a working draft document titled, Functional Typelevel Programming in Scala. See the “Files Changed” link on that page for the complete working document.

Functional Typelevel Programming in Scala (Martin Odersky)

I just ran across this image, which was my first attempt at a cover for my book, Functional Programming, Simplified.

Original Functional Programming, Simplified book cover

“You are more beautiful than music.”

“Your face is like a poem.”

“And in your eyes ... heaven.”

A bumper sticker seen in Alaska on July 5, 2010: “I don’t mind straight people as long as they act gay in public.”

As a brief update, I’m home from the hospital following my surgery last week. I’m not back to writing any software or books, but hopefully I’ll start getting back to work next week.

If you like reading PDFs of presentations, here’s a PDF from a Twitter employee named How We Built Tools That Scale to Millions of Lines of Code.

I'm sitting at Panera Bread, reviewing the first two chapters of the Scala Cookbook. Chapter 1 sucks, someone’s gonna have to do something about that. Chapter 2 isn’t too bad.

Wow, this radiation is good stuff. I just woke from a very long dream sequence where I was in three and then four dimensions, all at one time. It was similar to what happened to Picard in the last episode of STNG. In my case I was trying to help the people in the third dimension, who I originally thought may have had an earthquake, but as I later found out, they were in some sort of battle or war. As Spock would say, fascinating.

The bad news is that I’ll be in the hospital most of next week after surgery to remove part of my digestive system, but the good news is that I just received the first proof of Hello, Scala, and I should have time to review it.

First proof of Hello, Scala

“People tend to overestimate or underestimate how wonderful the experience (enlightenment) is. How wonderful is it? Well, I would say that anyone who has entered into the world of no-self, emptiness, and wisdom mind, who abides in that world, if you gave them a choice to live one day knowing what they know, or live an entire lifetime but not be allowed to know that, I think — I can’t speak for everyone — but I would say most people who live in that world would say, ‘I’d rather have one day knowing what I know than a lifetime of not being able to know this.’ So that’s how wonderful it is.”

~ Shinzen Young, in this video

“She had been born with a face that would let her get her way
He saw that face and he lost all control
All control”

A thing I love about Bob Seger is that his lyrics and the enthusiasm of his music remind me of being a much younger man, maybe the end of the teenage years and the beginning of the 20s. These lyrics in particular are from his song Hollywood Nights.

Two thoughts of the day:

Nobody owes you anything. I’m often surprised to hear people tell stories about how they’re butthurt because they feel like someone owes them something. (Typically they think friends and family members should owe them something.)

The only time you really lose is when you don’t try. A lot of people have interesting ideas, but never do anything with them. I think I lost nine games as a baseball pitcher in high school, but I won a lot more games than that, and it would have been a much bigger loss if I thought, “Gosh, I could be a great pitcher if only someone gave me a chance.”

If you’re ever in Alaska, adn.com has a nice list of twelve Anchorage-area hikes.

Dear Diary: Day 20 of not having a thyroid (because of thyroid cancer), not taking thyroid medicine, and the low-iodine diet.

I didn’t know if a person could lose weight without a thyroid, but I’ve dropped six pounds so far. In all I’ve dropped 20 pounds since I finished writing the Scala Cookbook (when I was working around the clock, not exercising, and eating crap).

Blood pressure is usually about 96/56, heart rate 48-54 BPM, and that’s without taking any heart meds. (I’d pass out for sure if I took those.) Low on energy and can’t take my usual long walks without getting the shakes.

Hopefully I’ll pass the blood test on Wednesday — my TSH level needs to be 30 or higher — so I can start the radiation treatment.

~ a note from June 16, 2014, after having my thyroid removed

I don’t remember the original source of this Zen selfie stick image, but I like it.

Zen selfie stick

This page contains a large collection of examples of how to use the methods on the Scala Array class.

I just noticed this quirk when trying to create an array of characters with the Scala Array.range method:

# works as expected
('a' to 'e').toArray              // Array[Char] = Array(a, b, c, d, e)

# surprise: Array.range always returns Array[Int]
val a = Array.range('a', 'e')     // Array[Int] = Array(97, 98, 99, 100)

I was surprised to see that the Scaladoc for the Array object states that the second example is expected behavior; Array.range always returns an Array[Int]. I suspect this has something to do with a Scala Array being backed by a Java array, but I didn’t dig into the source code to confirm this.

For much more information about arrays, see my Scala Array class examples tutorial.

Note: I’ve disabled comments and the contact form on this website until after I recover from my next surgery.

I can’t eat solid foods right now, but after the operation I’m going to check out Fuzzy’s Taco Shop. Or go to Texas. One of those two. Maybe both.

Fuzzy’s Taco Shop