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

“Goddamnit!”

Every so often a woman in a lucid dream this morning yelled out like that, so after the fourth or fifth time I had to ask her about it. “Why do you keep saying that?,” I asked.

“Gets your attention, doesn’t it?”

“Yeah, I guess so.”

“There you have it.”

“There I have what?”

“Your ego is writing checks your body can’t cash.”

~ from the movie, Top Gun

As a brief note today, here’s some skeleton code for a ZIO (ZIO 2) application that needs to run forever. It (a) does what it needs to do, then (b) sleeps for a minute, and then (c) goes back to Step A, doing whatever it needs to do, forever.

I wanted to share this code because I think it’s probably a very common pattern and need in the ZIO world — writing an application that needs to run forever, on a schedule.

Also note that the code is written using Scala 3, but the syntax can be changed to use Scala 2, if you need to. I also added a layer/ZLayer to the code to make it a little more “real world.”

All that being said, here’s the ZIO “run forever” code:

If you’re ever interested in meditation, I promise that if you work hard enough, you can achieve this kind of intensity, where you feel like Eleven in Stranger Things. I’m fortunate that it happens to me from time to time now.

As Ramana Maharshi said, “Proper meditation is so intense it doesn’t even allow thinking, ‘I am meditating.’”

Meditate like Eleven giving her all

This page contains a list of my favorite mindfulness quotes. Most of these are short, concise quotes that help bring me back to the present moment, and work well with my “Just Be” mobile app.

Update: I have replaced my Just Be application — which was written for Android only — with a new application I call Back To Now, which runs on both Android and iOS.

Background: Just Be

Just Be was a mobile mindfulness app that I created for Android users. This is what the reminders/notifications look like when you receive them on an Android phone or tablet:

Just Be, a mindfulness reminders app

Dear diary,

Annihilation of the ego continues to make progress, at least during sleeping hours. In recent nights I’ve gained awareness during the dream state to find “myself” as animals, women, and other men.

Last night I gained awareness as an older black man, talking to other black men about some of the discrimination and injustices we’ve gone through in our lives. We can laugh a little amongst ourselves about them now, but I could feel that under the laughter there’s also a deep sadness and pain.

Lately each nightly occurrence ends the same way: Eventually there’s a realization that “I” am supposed to be “Al,” and that realization startles me, pulls me from the scene, and wakes me.

Yours truly,
The Hopefully-Disappearing Self

P.S. — I don’t know if it’s more correct to say “black man,” “African-American,” or something else. To be clear, if it wasn’t important to the story I would not mention it at all.

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.)

I rarely listen to music from this century, but in late 2020 I became a fan of Let Me Love You Like a Woman, by Lana Del Rey.

Really, I don’t think I liked a new song from 2013 to 2020, and then in December, 2020, I had my radio on an “alternative music” station, and this song came on and it was like time just stopped.

The tv series Becker was one of my favorites back in the day, and I always wondered why it wasn’t available on DVD. I just looked, and it’s now available at Amazon (#ad), just released in 2018.

A favorite episode that helped me snap out of a personal funk was when Becker finally got to be with his long-lost love — a woman he pined for for many years. When he finally had a chance to reunite with her it turned out she was out-of-control-wild, crazy, ran up his credit card bill, and then took off.

In its own way, that episode helped me get over someone I had felt the same way about. It was like seeing a comedic version of your own life that turned out to be a great “slap in the face” moment for me.

(Some time after I wrote that last paragraph, I was able to spend more time with the woman I had those feelings for, and while it wasn’t quite that comedic, our time together helped me realize that this woman wasn’t the perfect human being I thought she was. She was still great, but with human flaws, just like the rest of us.)

Becker TV series now on DVD

“On one occasion of my own practice, nearing deep samadhi, I happened to notice that the stage of my mind was quietly turning and a new scene was appearing. In this new scene no wandering thought popped up its head; there was absolute stillness and silence, as if one had landed on the Moon.”

~ Zen Training (#ad)

“I am in the world, but not concerned with the world. I am going through the marketplace, but not as a purchaser.”

~ Ram Dass, quoting Maharaji, quoting Kabir, in Miracle of Love (#ad), one of his best books

“You got the gift, but it looks like you’re waiting for something ... your next life, maybe.”

~ The Matrix (#ad)

You got the gift, but it looks like you’re waiting for something ...

“I’m tired, boss ... Mostly I’m tired of people being ugly to each other. I’m tired of all the pain I feel and hear in the world every day. There’s too much of it. It’s like pieces of glass in my head all the time. Can you understand?”

~ John Coffey, The Green Mile (#ad)

I’m tired, boss ... John Coffey, The Green Mile

I really like the following quotes about keeping your mind on God all the time, from the book, The Gospel of Shri Anandamayi Ma (#ad).”

In particular, one thing I like about her approach as compared to something like Zen is that she spells out exactly how one should practice, so there is no guesswork about how to keep your mind during the day. (Zen people tend to tell you something once, and then leave you on your own.)

Anandamayi Ma quotes on service

Here are some of her quotes from the first one-third of her book that I really like:

“While performing a service, think that whatever you are doing is for God only. You are not serving a man or a creature, but God himself.”

Across the street was a beautiful, old church. I wanted to see what it looked like inside, so I crossed the street, but as I approached the church there was a commotion to my left, so I walked over to see what was happening.

Some people needed some assistance, and I thought it would be an easy TK thing to do, so I started to help them. But it was much, much harder to do than I expected, so I started to put all of my effort into it. I couldn’t do what I wanted, but instead of giving up, I kept pushing harder and harder. As I did this, the song, Sanctify Yourself, by Simple Minds, began playing.

As I tried harder, a man’s voice began talking in my left ear. He was whispering some of the lyrics from this song, and the harder I tried, the louder he spoke. I kept trying harder and harder until I eventually became like Eleven in the last episode of Stranger Things, putting my entire being into the effort. In the end, there was no “me,” only the desire to help:

A unique feature of this story is that I didn’t know what the word sanctify meant until I woke up and looked it up...

It’s cool to see that Virginia Schick (Ginny) is/was such a great teacher, in Colorado. And an artist. She was very nice in high school, while I was more of a jerk myself.

(I wasn’t a jerk intentionally. In retrospect it all had a lot to do with my family situation, and wanting to get out of Illinois as fast as possible. I also did not communicate well with anyone, and I regret that as well.)

A funny thing is that I lived in the Boulder, Broomfield, and Longmont, Colorado area for almost 15 years myself.

I don’t put too many photos of myself out here, but this is me escaping from the hospital one day, after the ninth time I went unconscious, if I remember right.

Alvin Alexander, Colorado

A very long time ago when my wife and I were going through a difficult patch, I met a woman who I fell deeply in love with, and Next Time I Fall In Love, by Peter Cetera and Amy Grant became a bit of a theme song.

I’ve been seeing a therapist for the last several years. With all that I’ve been going through, it’s been nice to have someone to talk to.

When I got to her office last night there was nobody else there, so we just sat in the lobby and started talking. But after a while some other people came in, so we had to move.

When we got up to move I used telekinesis to move some of the chairs and our things. “How .. how .. how are you doing that?”, she stammered.

“Well, I guess I think about the objects, and then I guess it’s a bit like a tractor beam, and well, I move them to where I want them.” Nobody had ever asked me that before, so my answer wasn’t very well thought out.

Anyway, she said I’m doing fine, but she took a couple of pills herself.

#dream