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

“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

“Enlightenment is like a free fall. It’s like falling off a cliff that never ends, and you’ve acclimatized to it.”

~ 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

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

You need to start asking better questions

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

I got a “chemo ninja” t-shirt like this one when I was recovering from thyroid cancer. Think I’m gonna need a new one after they remove part of my digestive system in about ten days.

Chemo ninja t-shirt
Table of Contents1 - Build tools2 - Testing tools3 - Database4 - Functional Programming5 - Asynchronous/parallel/concurrent programming6 - Web frameworks7 - JSON8 - HTTP clients9 - Configuration/properties10 - Many more

This page is a collection of popular tools, libraries, and frameworks for the Scala programming language.

Back to top

Build tools

As a brief note to self, here’s an example JavaFX application written in Scala:

object MainWindow {
    def main(args: Array[String]) {
        Application.launch(classOf[MainWindow], args: _*)
    }
}

class MainWindow extends Application  {
    override def start(stage: Stage) {
        val borderPane = new MainBorderPane
        val scene = new Scene(borderPane, 600, 400)
        scene.getStylesheets.add(getClass.getResource("pizza.css").toExternalForm)
        stage.setScene(scene)
        stage.setTitle("Al’s Pizza")
        stage.show
    }
}

You’re not an official geek unless you’ve watched Firefly.

Firefly: Stop her from being cheerful, please

At some point somebody was like, “Let’s get a mast cell — a type of white blood cell — from a bone marrow biopsy, magnify it 1,000 times, piss it off, and see what happens.”

The result? Ka-boom! It looks like a little firework went off when it released its histamine, tryptase, serotonin, superoxide, heparin, thromboxane, PGD2, PAF, and other granules.

That’s pretty much what it feels like, lol. I used to tell doctors that it felt like I had been drugged, and indeed, I was.

(Image from this nih.org research paper.)

MCAD: What an activated mast cell looks like

“Mast cell disorders are neoplastic disorders, which means the mast cells multiply continuously over the patient’s lifetime. As with cancer cells, mast cells do not die, disappear, or cease to function, on their own.”

Linux grep commands FAQ: Can you share some Linux/Unix grep command examples?

Sure. The name grep means "general regular expression parser", but you can think of the grep command as a "search" command for Unix and Linux systems: it's used to search for text strings and more-complicated "regular expressions" within one or more files.

I think it's easiest to learn how to use the grep command by showing examples, so let's dive right in.