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

Sunrise at Virginia Beach, April 9, 2017. No filters have been applied, this is what it looked like. :)

Ocean sunrise

Sled dogs, from the start of the 2011 Iditarod, on the lake in Willow, Alaska. (I took this photo that day.)

Sled dogs, from the 2011 Iditarod, Willow, Alaska

Always trust pure functions, they cannot lie. :)

I was going to add this to my free Thinking With Types booklet, but alas, it did not make the cut.

Always trust pure functions, they cannot lie

I’m pleased to report that Learn Functional Programming The Fast Way! was recently rated as a #1 best-selling computer programming and functional programming book. You can’t ask for much more than being a best-selling book in the entire computer programming category. :)

Best-selling computer programming and functional programming book

Despite the whole Santa Fe bedbug experience at the Sage Hotel, I still love Santa Fe, and the best restaurant I know there on an “average American income budget” is the Plaza Cafe in the downtown plaza area.

“Be a loner. That gives you time to wonder, to search for the truth. Have holy curiosity. Make your life worth living.” ~ Albert Einstein

When I think about words like “time to wonder” and “have holy curiosity,” what comes to mind is that when you have an abusive parent, they basically smack the “wonder” and “curiosity” out of you. I remember thinking that I never felt free until I moved very far away from my family, and then felt much more free once my abuser was no longer on Earth.

I know, kind of a morbid thought, but I do believe that abusers — at least temporarily — beat the wonder and curiosity out of kids. (And that’s true whether your abuser is physical, verbal, or both.)

“Samsara is not a wheel — it’s a drunken party in a casino. Our job is to sober up, find the exit, and out!”

When I’m not writing about Scala and functional programming, I’m often meditating and/or practicing yoga. The following content is something I wrote about silence in meditation back in 2018.

Fake Absolute Silence

These days in meditation I spend a lot of time in a place I call “Fake Absolute Silence.” In this state you might be fooled into thinking that you’re in the real state of Absolute Silence, but that’s part of the problem — you’re still thinking. Things are definitely quiet in this state; there aren’t many thoughts, and your concentration is focused on your breathing without distraction. However, I find that I’m still very aware of my body and outside noises. But despite that, it’s generally a mentally quiet place.

At one point in the movie, Conspiracy Theory, Mel Gibson’s character tries to tell Julia Roberts that he loves her, and starts speaking the lyrics to the Sting song, “Every Little Thing She Does Is Magic,” starting with, “I resolved to call you up a thousand times a day...”

Conspiracy Theory: I resolve to call her up a thousand times a day

A couple of stray Zen thoughts this morning:

If you’re interested in Zen koans, sometimes you need to know the back story of a koan to even have a chance at understanding it. For instance, there’s a koan about a cat that died, and when a monk hears about it, without saying anything, he puts his sandals on his head and walks away. I never understood that (intellectually) until I read that it was a custom at that time to walk with your sandals on your head during a funeral procession.

Another thing to know about koans is that when they say someone was enlightened, there are different forms of enlightenment. For example, one form of enlightenment is an initial enlightenment, and another is the big kahuna.

As I note in How to use fold on a Scala Option, if you’re using Scala and need to create a None of a specific data type, either of these two approaches will solve the problem:

val none = Option.empty[Int]    // Option[Int]
val none: Option[Int] = None    // Option[Int]

Both of those approaches create the None with the type Option[Int], as shown in the Scala REPL:

scala> val none = Option.empty[Int]
val none: Option[Int] = None

scala> val none: Option[Int] = None
val none: Option[Int] = None

As a brief note, I’m a big fan of the message at the end of the Monk movie. I don’t want to give any of that away, so I’ll leave it at that. (This is a little faux painting I created from that ending.)

The message at the end of the Monk movie

After reading this tweet, I wanted to take more of a formal look at monads in functional programming. So after some research on my own, I asked ChatGPT to summarize the work of Eugenio Moggi on monads, and got the following information, which I have edited slightly.

Eugenio Moggi’s work on monads in computer programming, particularly in his 1989 paper titled “Notions of Computations and Monads (PDF),” introduced a foundational concept that has had a profound impact on functional programming and the handling of computational effects.

Here is a summarized overview of his work:

I don’t know if this is a Mast Cell Activation Syndrome (MCAS) thing or something else, but I just ran across this picture of how my arm reacted to a clear plastic bandage that was on my arm You can read more about it in my Diverticulitis - symptoms, testing, and treatment story if you’re interested.

The thing about this is that it was before I was diagnosed with mast cell disease. If it happened now I’d just think, “Oh well, another weird MCAS reaction,” but back then I had no idea what was going on.

A reaction to a bandage (MCAS, mast cell disease)

I’m a big fan of Shinzen Young and his teaching. At this point in this video, he talks about how we might think we’re going closer to The Source, but you may really be on a detour.

And then in this video he talks about three key moments related to his becoming enlightened. I love that he is willing to speak the truth of his experience, like this: “Suddenly, for no reason, I dropped in Equanimity, big time.” He mentions that his pain level was exactly the same, but the suffering dramatically reduces.

He then said, “A few years later he was asking, ‘Who am I’, and I looked at my boundaries, and they vanished. And they never came back, and I was never the same. (later) It never went away, ever. ”

Finally, I wrote about Shinzen Young’s description of enlightenment.

“Hard times are the sandpaper of our incarnation. They shape us.”

~ Ram Dass

Here’s a view of a highway sunset in Colorado from September, 2023. This was either on I-70 West, or more likely on the E-470 tollway.

A highway in Colorado from September, 2023

Per Snopes, one day after the school shooting in Perry, Iowa, Donald Trump said, “It’s horrible, but we have to get over it.

In other news, The Guardian reports that the cost of sugar has surged to its highest level since 2011 because of global warming, including a dry spell in India and the drought in Thailand.

January, 2020: The one good thing about the chest pain due to pericarditis is that I’ve never meditated as hard and consistently as I am right now.

The one good thing about chest pain

On December 23, 2019, after spending a couple of days in the hospital, I had a heart procedure. That’s not something you forget, especially two days before Christmas.