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

The moon setting over the Rocky Mountains at five o'clock this morning.

~ Broomfield, Colorado, March 13, 2014

The moon setting over the Rocky Mountains

The hospital was mostly empty yesterday morning (March 10, 2020). When I went to the Imaging Department, the technician was standing at the front desk waiting for me, his only patient. The grocery store was out of TP. But the Moonset around 6:45am was beautiful.

What a marvelous morning for a Moonset

April, 2024 Update: This ZIO cheatsheet is currently being updated to ZIO 2.x, but it’s still a work in progress.

If you want a good cheat sheet right now, see this one on github. I’m creating my own as I learn ZIO and read the ZIOnomicon book. During the learning process I find that it’s much better to create your own by hand, that way you get something that’s meaningful to you.

Note that almost all of these initial examples come from the ZIOnomicon book and the video that I link to later.

The ZIO Scaladoc

Here’s a link to the ZIO Scaladoc. That’s for the companion object, and this link is for the companion trait.

As I get close to releasing the Second Edition of the Scala Cookbook, I’m trying to use the “foo bar baz” phrase less often, and trying to find better and more meaningful phrases. Thanks to Arrow and The Flash, one phrase I’m using is “Big Belly Burger.”

If you know any great phrases to use to help rid the world of “foo bar baz,” let me know here on Twitter. Here are a few I just looked up:

bond, james bond 
clear eyes full hearts can’t lose (friday night fights)
elementary, my dear Watson 
fasten your seatbelts 
frankly my dear 
gonna need a bigger boat 
hasta la vista (baby)
here’s looking at you kid
I see dead people 
just keep swimming
make my day
no crying in baseball 
not in kansas any more 
of all the gin joints 
open the pod bay doors, HAL 
pass the beernuts (Cheers)
play it again sam
show me the money
shaken, not stirred
Soylent Green is people 
the walking dead 
too much fruit (in the house)
who’s on first?
why so serious?
you talking to me? 
you’ll thank me later
Phrases to use instead of 'foo bar baz'

It’s important to remember that even when successful people say things, they’re often just opinions, not facts. Starbucks’ CEO Howard Schultz once told Jeff Bezos of Amazon, “You have no physical presence. That is going to hold you back.”

Back in 2011 I was at the start of the Iditarod race, which started on the frozen lake in Willow, Alaska.

The 2011 Iditarod race sign, Willow, Alaska

If you ever wondered what the theme song is from The Dead Zone tv series, it’s a song called New Year’s Prayer, by Jeff Buckley.

I haven’t looked into the details, but somehow the song New Year’s Prayer was released on an album almost a year to the date after Mr. Buckley died, drowning in the Mississippi River.

Per this tweet, back on May 15 Martin Odersky shared a slide with these contents:

The essence of Scala: Fusion of functional and object-oriented programming in a typed setting:

- Functions for the logic
- Objects for the modularity

This is a photo of the rubber duck, Mr. Bubble bath soap, and bathtub at the Talkeetna Roadhouse in Talkeetna, Alaska. I stayed there several times, but I’ll guess this was from the fall of 2010.

The rubber duck at the Talkeetna Roadhouse

As I was sitting in my favorite coffee shop in Seward this afternoon, a dog walked in the back door and just stood there, looking at everyone. The owner tells me he was looking for a good poker game. ;)

~ photo from Seward, Alaska, February 25, 2011

A dog walks into a coffee shop

A cartoonized bearded version of me, circa 2021.

Cartoon, bearded me

This is me with a mustache, circa early 2021. I had this mustache for a few minutes when I shaved off my beard. Hopefully I look like a cowboy, lol. :)

Me, with a mustache, black and white

Today (February 19th) is an anniversary for me. After knowing “something” was wrong for a long time — I used to tell doctors it felt like I had been poisoned or was experiencing the symptoms of anaphylaxis or sepsis — I went unconscious for the first time on this date in 2014.

While that in many ways was a horrible event — if I had fallen to the right instead of the left when I blacked out, I probably would have cracked my head on the bathtub and died right then — in the end it was necessary for doctors (and I) to take things more seriously, which resulted in seeing a total of 26 doctors to learn that I have MCAS, a rare but treatable non-contagious blood disease (something I was born with).

Last week I was trying to remember the name of a hotel in Wyoming that has/had a big boot in front of it. Then Google came up with an interesting suggestion. :)

Wyoming big booty hotel

Let it be known that on February 17, 2021, I finished writing the last chapter of the Scala Cookbook, 2nd Edition. Everything from here on out is editing and verifying the rest of the content.

Scala FAQ: Where are Coursier files stored on macOS?

Solution: The files Coursier downloads are located under this directory on macOS:

~/Library/Caches/Coursier

More specifically, in early 2021 they’re located under this directory:

~/Library/Caches/Coursier/v1

In a related note, this is my current JAVA_HOME, via Coursier:

/Users/al/Library/Caches/Coursier/jvm/adopt@1.11.0-9/Contents/Home

After a while this can be important to know, because the subdirectories can get quite large. Mine is currently over 4GB in size, and I’d like to delete some of that.

See the Coursier docs for more information.

At $50 or $60, I know the Scala Cookbook, 2nd Edition — estimated at 700+ pages — is expensive. But if it helps to know it, I’ve been working on one recipe for three days. And this isn’t the only one. Asking questions on Gitter channels, the Contributors website, testing and reporting bugs for developers, digging through code. All so you don’t have to. ;)

TIL that you can import/load a JAR file into the Scala Ammonite REPL using this import command:

import $cp.foo.`simpletest_3.0.0-0.2.0.jar`

During a dream this morning, I was going off to college and my wife’s grandparents gave us a stack of papers, thinking I could use them at school. The papers were all like plain printing paper, and most were clean, but some of them had things written or printed on the back side. They were big on using everything, so the implication was that I could use the blank side for my needs.

When I flipped one of the pages over I saw that there was writing in my grandfather’s handwriting. It was like a diary page, with today’s date on it (with a different year), and it had two notes about his wife. The first was, “Take care of you Dilly,” meaning that he would take care of her. The second was, “Seriously, I think that was the best meal you have ever made.”

~ February 16, 2021