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

Traditionally I’ve spent a number of springs in Virginia Beach.

#MeepMeep

Virginia Beach or bust?

Every spring I think about moving back to Alaska, and last night I ran across this high resolution map of Talkeetna. For the record, I used to live on I Street in Talkeetna, which isn’t shown on the map.

A map of Talkeetna, Alaska

The book Business Adventures: Twelve Classic Tales from the World of Wall Street is one of the most highly recommended books by Warren Buffett. He told Bill Gates about it in 1991, and Mr. Gates calls it “the best business book he’s ever read.”

Business Adventures: Twelve Classic Tales from the World of Wall Street

Noting Gone may lead to a spontaneous spirit of love and service (bodhicitta). As I’ve said, where sensory events go to is where sensory events arise from. Gone points to the source of your own consciousness ... so Noting Gone can lead to a spontaneous sense of oneness with — and commitment to — all beings.”

From the book, The Science of Enlightenment: How Meditation Works by Shinzen Young.

(I don’t remember where he stated it, but I also remember that Shinzen Young said that if he could only teach one meditation technique, it would be noting gone.)

There seems to be a lot of OOP-bashing lately, which I’m not a fan of, but this article titled Goodbye, OOP makes decent points about the problems with inheritance, encapsulation, and polymorphism. IMHO, OOP still makes sense in certain areas, including GUIs like Java Swing and JavaFX, so I’m not ready to throw it out completely or bash it.

Some problems with OOP

Way back when I was working on a cover for my “Functional Programming in Scala” book, I saw this book (Everything You Need to Ace Math in One Big Fat Notebook) on the Facebook page of a bookstore in Alaska that I used to live next to. I’m trying to make functional programming as simple as possible, so I have thought about covers that look a little like this, but I don’t want to go quite that far with the design.

Everything You Need to Ace Math

This photo is from the Cubs Facebook page back in 2015. It’s relevant again in 2021, because Jake Arrieta is back with the Cubs.

Jake Arrieta is back with the Cubs

With the Iditarod race coming soon, I thought I’d re-share this: The Alaska Dispath News has a great video documentary that details what happened during the wild finish to the 2014 Iditarod race. This photo shows Dallas Seavey very shortly after he crossed the finish line, not knowing that he won the race.

Video documentary about the wild finish to the 2014 Iditarod

Inspired by a conversation with a friend recently about “trying to love everyone,” I dug into things a little more and found the following information from Ram Dass, Zen masters, the Maharaj-ji (Neem Karoli Baba), and Yoda.

As I keep trying to figure out what Ram Dass means when he says, “love everyone,” I dug through his book, be love now and found these two quotes:

Here’s a quick example of how to use Scala 3 (Dotty) enums, including using them as constructor and method parameters, and in a match expression. First, some Scala 3 enums for a pizza store application:

As a brief note, if you want to use the Scala 3 nightly build as your REPL, one way to do that is with this project I just put on Github. Just:

  1. Clone that project
  2. cd into its directory
  3. Type sbt to start sbt
  4. Type console to start a Scala 3 REPL inside sbt
  5. Use the latest, greatest Scala syntax, as shown in this image:

How to use Scala 3 nightly build REPL with sbt

The hack that makes this work is in the build.sbt file, and shown here in bold:

lazy val root = project
  .in(file("."))
  .settings(
    name := "Scala3Nightly",
    description := "Lets me use the Scala 3 nightly build",
    version := "0.1.0",
    scalaVersion := dottyLatestNightlyBuild.get,
    useScala3doc := true,
  )

As shown in the build.sbt file, I found that scalaVersion hack on this page: github.com/scala/scala3-example-project.

Sorry, I have to run off to a meeting now, but if you want to use the latest Scala 3 nightly build as your REPL, I hope this is helpful.

(Also, as shown in this gitter.im/dotty link, you can use Coursier for this purpose, but in this case it’s much easier to use this sbt hack to create a Scala 3 REPL with the latest nightly build, imho.)

I’m reminded today that I wrote my Cato software way back in 2011. Cato, is a free CRUD generator for PHP, Java, and more. Never pay for a PHP/Java CRUD generator when you can get one for free — Cato is 100% free and open source!

As a note to self, while I was doing a Shinzen Young style “noting” meditating this morning (Feb. 11, 2021), I felt pressure on the right side of my head. It was like if you have a sinus infection or had some dental work, and the right side of your face has that pressure. Meanwhile, the left side of my face/head felt perfectly clear. So in addition to noting “rest” and “hear,” I started noting “pressure.” The more I focused on the pressure, it eventually went away.

Another thought from this morning is that many thoughts come and go during meditation, but some of them are particularly sticky. You try to let them come and go, but they’re like flypaper or something — ridiculously sticky. I felt like a cat who gets tape on its paw and keeps shaking the paw, but the tape won’t come off. This reminded me of Pema Chodron talking about getting stuck and unstuck, though I can’t remember her exact terminology.

“I wish it need not have happened in my time,” said Frodo.

“So do I,” said Gandalf, “and so do all who live to see such times. But that is not for them to decide. All we have to decide is what to do with the time that is given us.”

~ The Fellowship of the Ring

In a lucid dream this morning a bunch of people came into my apartment uninvited. All but one of them were maintenance people, and they immediately started renovating my apartment. I argued with them that a little notice would have been nice.

While that was going on, I saw that the other person was a Tibetan monk. While the maintenance people started drilling and cutting in various locations, the monk walked around the apartment breaking all of my things. He’d pick up a glass and let it drop to the floor and break, or work harder to break other things, slamming them to the ground. I ran over to him and asked, “Why are you breaking all of my things?”

He didn’t reply, but broke some DVDs in his hands. For some reason this made me more lucid in the dream, so I stepped on some of the DVDs he had dropped to the floor so I could crunch them more. “I get it,” I said, “it’s the whole ‘impermanence’ thing, right?” Then I thought of something and said, “Stay right here for a moment. Break something if you need to, but I’ll be right back.”

Then I went over to my DVD collection and grabbed my Dalai Lama video collection. I went back to the monk, handed him the DVDs, and said, “Here, you can break these, too. Or watch them. I don’t care.”

Then I remembered that my tv had just started on fire when the maintenance people did something, but it didn’t matter, the monk took the DVDs and sat down silently.

(January 28, 2020)

In a way I know my heart is waking up
As all the walls come tumbling down
Closer than I’ve ever felt before
And I know, and you know
There’s no need for words right now

~ from the song Breathe, by Faith Hill

“My purpose is to serve humanity ... every day is a battlefield ... if you fight with anger, you’re part of the problem, if you fight with joy, you’re a solution. You have to have conviction, ‘Before I die, there will be hearts touched by my spirit.’”

~ Carlos Santana

Back in the day I lived in this house.

My old Kentucky home

I don’t know how long it lasts, but on Feb. 6, 2021, I just saw that Amazon is having a big sale on the Ring Alarm Five-Piece Kit.