Scala, Java, Unix, MacOS tutorials (page 27)

This is an excerpt from the Scala Cookbook, 2nd Edition. This is Recipe 24.7, Building Modular Systems with Scala 3.

Problem

You’re familiar with Martin Odersky’s statement that Scala developers should use “functions for the logic, and objects for the modularity,” so you want to know how to build modules in Scala.

The following paragraphs are a quote from Peter Gabriel, discussing a moment of “enlightenment” that reminds me of the movie V for Vendetta:

I was doing some gigs in Germany with Frank Zappa ... we were supporting Frank Zappa. And his audience in Berlin were very much old hardcore hippies, and they thought I was just cheap shit, and the boos was just ... this rain of stuff being thrown on the stage. It was very humbling.

Next night we’re in another German city and I thought, “Oh shit, here we go”, and we go out there again, and a similar sort of reaction, they hate it. But it wasn’t just the music, it was me, personally, you know, they meant it.

And suddenly I had one of those moments and I thought, “That’s it, I’m no longer afraid.

You know the thing you’re most scared of when you get on stage is being rejected and booed off, and I suddenly realized I’d been booed off and I was still out there. They didn’t like it any more, but I was still doing it, and they couldn’t stop me.

And I just started giggling. And Tony Levin looked over like I’d gone crazy. But it was a fantastic moment of enlightenment.

One of my uncles was Mousey Alexander. I didn’t know him very well, only meeting him a few times that I can recall. The most I remember about him was (a) watching him play drums at a jazz club in Chicago one time when I was young, and also (b) spending a little time with him on a vacation in New York. (In particular I remember going fishing with him and my dad in New York. We caught something like 40 small fish in an hour or two. Every time we dropped a line in the water we caught a fish in a matter of moments.) I also remembered that he called a lot of people “cat” or a “cool cat.”

I was told that he played on the Johnny Carson show and also played at The White House. I think he’s most well known for playing with Benny Goodman and Clark Terry. If you’re interested you can read more about him at that Wikipedia link, and thanks to YouTube you can also find some of his performances there as well, including this Doc Severinsen “Airmail Special.”

Mousey Alexander - The Mouse Roars

Many years ago I was traveling and stopped at a donut shop in a small town. A young woman was working behind the counter, and I noticed that she had a tattoo of words on her left arm, but the words were upside down to me.

There was nobody else there at the time, so I said something like, “May I ask about your tattoo? It looks interesting.” I’m always fascinated by tattoos, because I assume they’re an expression of a person’s personality.

She moved her arm around so I could see the words, and explained that she gets nervous and panics a bit at times, like when the store gets busy. So at the store she’ll take someone’s order, then turn around like she’s getting the donuts, but look at her arm and read the words to herself as a way to calm down (like reminding oneself of a mantra).

I always thought that was smart, and I think of it myself when my own life gets hectic.

“A Yogi is one who has union with the supreme consciousness.”
~ Yogi Bhajan

“Samadhi is the culmination of yoga; it is a state of bliss and union with the universal spirit.”
~ B.K.S. Iyengar

“Seeing into one’s own nature is the goal of Zen.”
~ Thich Nhat Hanh

Back in March, 2010, I drove up to Alaska. This is the office of a little motel in Canada ... at the moment I can’t remember the name of the town, but I know where to find it. :)

Cute motel in Canada in the winter

I haven’t been back to Alaska in a long time now, but this is what the movie theater in Homer, Alaska looked like the last time I was there.

The movie theater in Homer, Alaska

In honor of Rare Disease Day (February 28th), here’s  a today.com story about a woman who has a more severe form of the illness/disease I have. A few quotes:

“Johanna Watkins, 30, is allergic to almost everything and everyone, including her husband Scott, 29. She’s been diagnosed with mast cell activation syndrome, a rare and progressive immunological condition.”

“She has a list of 15 foods she can eat and that’s it. Even those foods make her feel ill, it’s just that they don’t kill her. She’s eaten the same two meals for two years.”

Update: In 2016 Johanna wrote this article, What I’ve learned being isolated and allergic to everything.

(The image is from the today.com story.)

Rare disease makes woman allergic to everything, including her husband

This is a terrific photo of the Flying Squirrel Bakery Cafe in Talkeetna, Alaska. The photo comes from this Facebook page, and their website is flyingsquirrelcafe.com.

Entrance to the Flying Squirrel Bakery Cafe in Talkeetna, Alaska

A great Harley-Davidson motorycle ad: “If you didn’t have to answer to anyone, what would you do?”

Harley Davidson motorcycle ad: What would you do?

Seeing that we had another snow storm here in Colorado, I thought I'd share another photo of El Sanctuario de Chimayo in the winter. (El Sanctuario de Chimayo, near Santa Fe, New Mexico)

El Sanctuario de Chimayo, candlelights in winter

This Winnie The Pooh caption reminds me of one of those “bad lip reading” videos. :)

Winnie The Pooh - Bad lip reading

Back in the days of my youth, the town I lived in used to hold Little League tryouts in the first floor of this old white building. In one of the exercises, one of the coaches — my dad — used to hit ground balls to us. All of us wannabe players would stand in a single-file line near the front door and front windows, with the line wrapping along the windows on the right side. My dad would stand at the back of the building with a bat and hit these rubber-coated baseballs at us. We had to field them and then throw them to another coach who stood at the back of the building.

An old white building I have one memory of

“Could I have a glass of alcohol?” A favorite quote from the movie, Bridesmaids.

Could I have a glass of alcohol?

This photo is from the Talkeetna Air Taxi Facebook page. Back in the day, I lived about 100 yards from where this photo was taken.

Talkeetna, Alaska, in the early winter

El Sanctuario de Chimayo, near Santa Fe, New Mexico, in the winter.

El Sanctuario de Chimayo, in the winter

Another great photo of Anchorage, Alaska from the Alaska Dispatch Facebook page. (I would link to their page, but this looks suspiciously like a postcard I used to have.)

Anchorage, Alaska: Full moon over the mountains

From a very funny Doc Martin episode.

Doc Martin: The Baker, The Colonel

A picture of four sled dog paintings from a motel in Healy, Alaska.

A picture of four sled dog paintings from a motel in Healy, Alaska

A snow covered road in Wasilla, Alaska, from the winter of 2010/2011. They don't plow the roads much in Alaska, especially the side roads.

A snow covered road in Wasilla, Alaska