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

If you’re ever interested in meditation, I promise that if you work hard enough, you can achieve this kind of intensity. 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

A monk was anxious to learn Zen and said, “I have been newly initiated into the Brotherhood. Will you be gracious enough to show me the Way?”

The Master said, “Do you hear the murmuring sound of the mountain stream?”

The monk said, “Yes, I do.”

The Master said, “Here is the entrance.”

~~~

“Listening intently” is a simple, fun meditation practice. Just sit, relax, and listen to your environment like a dog, cat — or a squirrel in the wild, where your life depends on your listening. At work I used to have fun by listening to as many conversations as I could simultaneously.

Do you hear the murmuring sound of the mountain stream?

In mindfulness meditation, “Stagnation is guaranteed if you cling to pleasant sensations.”

~ Daniel Ingram

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

~ Ramana Maharshi

November 3, 2020

Dear diary,

I got pretty sick this afternoon. That’s always been one thing about this body, if you push it, it will push back. Some of it may be mast cell related, some of it may be kidney related (some of my kidney numbers are not good currently).

Ended up sleeping from noon until 5pm. I have the heat turned up now, drinking warm fluids, and wearing a heavy shirt. When I laid down earlier I started having chest pain, so I took some Benadryl and that eventually went away, but then I slept.

In case these two examples disappear from the ZIO JDBC repository, I have made a copy of them here.

(I say that because earlier this week (late October, 2024) I was told the the ZIO JDBC library is no longer maintained, and then I was also told that they just found a new maintainer.)

That being said, here are the ZIO-JDBC examples. This first one is called Basic.scala:

“Hello Peter, this is me ... your father ... Walter Bishop.” (From one of my favorite tv series)

Hello Peter, this is me ... your father ... Walter Bishop.

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

As a quick note today, here’s a list of my currently-free books and online video courses about the Scala programming language and functional programming (as of October, 2024):

Free books and online video courses from Alvin Alexander

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