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

I did a “gratitude” meditation exercise two nights ago, and it ended up going almost four hours. (Fortunately for me, at advanced levels you can trade some meditation time for sleep.)

The technique is to put your mind in the area of your heart and express things you’re thankful for, including this crazy body I have, all of you, and in the end, basically everything.

If it helps you can start by feeling love for one being — such as Zeus — and work out from there.

A soul that temporarily has a body

At some point it really hits you that I’m some soul that’s pushing this vehicle that was named “Alvin” around, and YOU are also some other individual soul. So when YOU don’t do what I want, that’s okay, because you’re another student here in Earth School. Basically, MY soul needs to give YOUR soul that freedom to work your stuff out.

I noticed that the ZIO 2 ZIO.fromOption method returns Option[Nothing] as its error type, so I asked my friend Claude about it, and got the following response, which I have cleaned up a little.

A woman in a dream this morning was quite distraught and spoke only Spanish. I tried communicating by speaking very slowly (“Why .. are .. you .. here?”, “You're .. in .. the .. wrong .. dream”), but that didn’t help at all.

Scala FAQ: What is the Nothing type in Scala, and how do I use it?

Solution

In Scala, the Nothing type is called a bottom type, which means it is a sub-type of every other type in the Scala type system. It is also specifically a data type that has no instances.

In practical use, Nothing is used to indicate that a computation or function will never produce a result normally, either because it throws an exception, enters an infinite loop, or encounters some other abnormal termination.

Visually, this is what the Nothing type looks like in the Scala type hierarchy (image courtesy of this scala-lang.org page):

The Scala type hierarchy and the Nothing data type

Scala: Common uses of Nothing

Some common use cases of Nothing in Scala include:

If you’ve ever seen the “Maine Cabin Masters” tv show, you may have seen the black flag that they fly on their cabins while they’re working on them. If you ever wondered about their black flag, here’s what I can tell you from this deleted scene video:

  • In the video, which was posted on March 19, 2020, Ryan states that the flag is new.
  • The flag signifies the Maine Cabin Masters “are here” and “we’re kicking butt on this project, and it’s going to be the best this camp will ever be.”
  • It is the Maine Cabin Masters “skull and crossbones.”
  • The image is a Chase Morrill design.

As I work more with ZIO 2, I also find myself thinking a lot about the ZIO 2 mental model, by which I partially mean “a way of thinking about your code” and also “ZIO 2 best practices.”

Here are my initial notes. Also, I hope that most of this code is mine, but several snippets are from other sources that I don’t remember, including the official ZIO 2 docs.

Functional Programming, Simplified — currently 5-star rated on Gumroad.com, 4.5-star rated on Amazon, and one of the all-time best-selling books on functional programming — is currently on sale in three formats (prices shown in USD):

PDF Format
currently FREE!

PDF version of Functional Programming, Simplified

Paperback Book
$39.99 on Amazon

Print version of Functional Programming, Simplified

Kindle eBook
$9.99 on Amazon

Kindle version of Functional Programming, Simplified

I recently watched the movie, The Ten Commandments, and when I saw Sephora, I thought, “She looks familiar.”

It turns out she’s played by Yvonne De Carlo. She’s the actress who’s portrayed on my Learn Scala 3 book cover, which is based on the 1950 movie, Buccaneer’s Girl, which she starred in. (Until this, I thought I only knew her as Lily Munster on The Munsters.)

And if you like the movie The Ten Commandments, I also wrote this blog post about The Ten Commandments and the 2024 Presidential Election.

Yvonne De Carlo in The Ten Commandments (and more)

“Always kiss me goodnight. Always kiss me goodmorning, too.”

~ as seen in a house in Florida

Always kiss me goodnight

As a brief note today, here is a short list of spiritual teachers I am aware of who have expressed the idea “I am not the body.” Sri Nisargadatta Maharaj made this the most obvious to me by writing a book titled, “I Am Not The Body,” but when you think about it, many spiritual teachers have said the exact same thing in different ways.

One thing you learn when you really become dedicated to mindfulness practice is that every moment you aren’t being mindful, you’re feeding your ego. Any thought about the past or future solidifies this “ego-cage” you have built up in your mind.

(Note: I saw the term ego-cage in a book, but I don’t remember which one.)

“The whole essence of Zen consists in walking along the razor’s edge of Now.”

~ Eckhart Tolle

I know that I may never get to any “final” stages of enlightenment, but IMHO and as near as I can tell from my current meditation practice level, the last steps leading up to enlightenment/awakening/liberation are:

I’m glad to report that my book, Learn Functional Programming The Fast Way, is five-star rated on Gumroad.com. And as I write this sentence on September 6, 2024, it’s also FREE!

Learn Functional Programming The Fast Way is five-star rated on Gumroad.com

Scala 3 FAQ: What are opaque types in Scala?

Discussion

I previously wrote a little about Opaque Types in Scala 3, and today, as I’m working on a new video about opaque types, I thought I’d add some more information about them.

After my first-ever bought with diverticulitis, I wanted to make notes about what happened over the last five days.

Monday, April 7, 2015

On April 7, 2015, I woke up at 3:30am with pain and discomfort in my lower-left abdomen. I knew something was wrong, but I didn’t know what it was. It felt like a golf ball was lodged in there, and several hours later it was still there.

While many people know the famous Ram Dass book, Be Here Now — which is currently the #1 All-Time Best-Selling book in Spiritualism on Amazon — I’d argue that it’s not necessarily his best book.

For example, I have met a few people in my travels who were struggling to read and understand it it because of all the art and 1960s “hippie style” stuff — which I personally like — and it was at that time I realized that while Be Here Now is his most famous book, it may not be his best book. (The problem with the “hippie stuff” is that it’s also distracting.)

Ram Dass’s best books

IMHO, I think the following books are his best, where I believe best will also depend on (a) a person’s experience with his writings and teachings, and also (b) their own progress on the spiritual path. And in this case, I think it’s also about book’s that are more straight to the point.

When I first started meditating in the 1990s, I often had a hard time getting into the proper meditative state when I sat down on the meditation cushion. My “monkey mind” would be jumping all over the place, and it would take me a long time to get it to settle down. Many times I couldn’t even get it to settle down before my 30-minute timer went off.

Because of that, and because I really wanted to become better at meditating, I began experimenting with different ways to get into the meditative state faster.

As a result, this page is a summary of the best ways I know to help you get into a good meditation state when you take time to sit on the meditation cushion (or wherever else you sit). If you’re interested in getting into a deep state fast, these are the “best practices” I know, especially when you’re short on time.

As a brief note today, I’ve been reading the Bhagavad Gita (translated by Jack Hawley) lately, and he shares this good line that relates to desire, attachment, and even addiction:

“Realizing the truth of your True Self
is your principal weapon for eradicating desire.”

My short interpretation of that is that our True Self is not our physical body, but something else that you might call awareness, consciousness, the subtle body, the soul, or the Atma — depending on your background — AND, it is possible through yoga, mindfulness, and meditation practice to get in touch with (feel/experience) your True Self. And then, once you realize who “you” really are, your attachments to the physical world will go away.

I used to have a friend who was an addict, and I know she was always looking for anything that would help, so I hope this quote can be helpful for others.

UPDATE 1: As a followup to my original post, in the book, I Am That, Nisargadatta Maharaj basically says the same thing (many times) as the quote I shared above.

UPDATE 2: Ram Dass offered a quote that’s in the same ballpark: “One way to get free of attachment is to cultivate the witness consciousness, to become a neutral observer of your own life.”

In 2024 I watched the very emotional Elton John “Tiny Dancer” music video, and afterwards I wanted to do some research on how the music video was created, the story behind it, and what its meaning is. To that end, here’s a summary of what I found out about the “Tiny Dancer” music video.

The story and meaning of the Tiny Dancer song

The short story behind the Tiny Dancer song goes like this: