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

About half an hour ago I was a passenger in a car in Poland. I was debating with the driver about what to do, because we had already checked out of our hotel, but we were running late, and we had planned on getting to another country. Because we were so late and things were unfamiliar, I was saying that we should go back to the hotel. I think we were in Krakow and talking about where to go next, but maybe going to Krakow was part of the plan.

In front of us there was a car, and then another vehicle that looked like a dump truck. Suddenly the truck exploded. It was a huge explosion that obliterated the truck. Inside the car, my ears were ringing.

Here’s a brief Scala ZIO HTTP “Hello, world” example from that repository, followed by a description of the code and “key points” to know about the example:

import zio.*
import zio.http.*

object HelloWorld extends ZIOAppDefault:

    // responds with plain text
    val homeRoute =
        Method.GET / Root -> handler(Response.text("Hello, World!"))

    // responds with JSON
    val jsonRoute =
        Method.GET / "json" -> handler(Response.json("""{"greetings": "Hello World!"}"""))

    // create HTTP route
    val app = Routes(homeRoute, jsonRoute)

    // run it like any simple app
    override val run = Server.serve(app)
                             .provide(Server.default)

October 26, 2019, in a meditative state:

As I return from the blackness of meditation, I see a very old man with long white hair and long white beard sitting in front of me. He’s wearing a full-body length white garment that I would call a dress if a woman was wearing it. (The garment has another name that I don’t know.)

He’s seated in a full-lotus position, with his eyes closed. I admire his posture, with one foot on each thigh, one hand resting on the other in a mudra in his lap, his shoulders back, and his chin tucked.

Not knowing what to do of whether he even speaks English, I whisper, “Hello.”

His eyes open gently, and he looks at me with a small, pleasant smile. “Welcome,” he replies.

In 2024, assuming that you’re using (a) a modern macOS version and (b) a modern Java version, and (c) you want to bundle a Java/JAR file as a Mac/macOS application, then (d) you’ll want to use the Java jpackage command to bundle your Java/Scala/Kotlin/JVM application into something that works like a native application. Here’s a quick example that works with the following assumptions:

This is a photo I took of the entrance to El Santuario de Chimayo in New Mexico. My notes say that the church was opened in 1816.

The entrance to El Sanctuario de Chimayo

Mindfulness/meditation FAQ: What are the reasons, purposes, or motivations to practice mindfulness and meditation?

The motivations to meditate

I just took a little time to share some old notes from my meditation practice about “The purpose of mindfulness.” (This is also stated in other ways, like “Why bother being mindful?”, or, “What are the motivations for practicing mindfulness and meditation?”)

In the following sections I describe the purposes and motivations for practicing both mindfulness and meditation.

Before getting into my notes, I don’t know how many people know Ram Dass or have read his writings, but I updated the first motivation here based on his work, because if you really get into mindfulness and meditation, what he states is the end goal.

I have no idea if mindfulness meditation helps with ADHD, but I just thought about that when I read this:

“Researchers report that mindfulness meditation reduced chaotic activity in the brain and the heart ... ‘Activities of the brain and heart became more coordinated during MBSR training,’ reported the authors. ‘Mindfulness training may increase the entrainment between mind and body.’”

“If we do not practice mindfulness while carrying a bucket of water, it is a waste of time to seclude ourselves in a monastery.” ~ Thich Nhat Hanh

Thich Nhat Hanh: If we do not practice mindfulness while carrying a bucket of water...

October, 2024: Multiple media outlets are reporting that Donald Trump’s plans will bankrupt Social Security in six years and lead to cuts in social security benefits.

Reports: Donald Trump’s plans will bankrupt Social Security

October, 2024: After Donald Trump recently stated that he hated to pay overtime and would try not pay it, almost every union in the United States has come out in support of the Kamala Harris and Tim Walz.

This includes the UAW, AFL-CIO, IAM Union, IATSE, American Federation of Teachers, National Education Association, United Steelworkers, the Teamsters Union in many states, the Machinists Union, the AFSCME, and many more. I’d link to them all, but the page where I found this image shows many of the unions that suppported Harris BEFORE Trump said he hated overtime pay.

Almost every union in the United States supports Kamala Harris

As I read this NY Times article about What ‘The Apprentice’ Gets Exactly Right About Trump, these lines from Donald Trump’s “The Art of the Deal” ghostwriter really stick out:

“The first lesson is that a lack of conscience can be a huge advantage when it comes to accruing power, attention and wealth in a society where most other human beings abide by a social contract. The second lesson is that nothing we get for ourselves from the outside world can ever adequately substitute for what we’re missing on the inside.”

This is a short collection of quotes from Rumi:

My religion is love.
Love is the bridge between you and everything.
Let the beauty of what you love be what you do.
Be a witness, not a judge.
You have to keep breaking your heart until it opens.
I am not this hair, I am not this skin, I am the soul that lives within.
Wear gratitude like a cloak and it will feed every corner of your life.
Past and future veil God from our sight; burn up both of them with fire.

Here are some Northern Lights, as seenin Louisville, Kentucky, in October, 2024.

Northern Lights, Louisville, Kentucky, October, 2024

If you’re interested in mindfulness and meditation, this scene from “Star Wars: Rogue One” demonstrates mantra meditation at its best: Belief, total commitment and single-mindedness, and practice in action.

A few related quotes:

“You must concentrate upon and consecrate yourself wholly to each day, as though a fire were raging in your hair.”
~ Zen Master Taisen Deshimaru

Star Wars: Rogue One: Demonstrating mantra meditation at its best

A “Love” sign you might find at a rest area somewhere in Virginia.

Love (a Virginia rest area sign)

“Swami Vivekananda says that if you have ever felt the urge to stretch out your arms in trying to embrace the universe, you have felt the truth. Not one atom in this universe, not one insect, not one life here is different from you. It is you yourself. It is one life and one consciousness. It is a joy, an enormous creativity of the consciousness which shines in all these ways. When you experience the universe, you are tasting yourself!”

~ Swami Sarvapriyananda, Dissolve into Infinity

“Just as water wears away stone over time, daily practice thins the veil of illusion.”

~ Ram Dass, in Polishing The Mirror

The sign for the 'Free Store' in Talkeetna, Alaska.

Sign for the 'Free Store' in Talkeetna, Alaska