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

I just needed to add a manifest file to a Java JAR file, and this command worked for me:

As shown in the image, I was just reminded that you can run javap inside the Scala REPL. The REPL help command shows some other things you can do:

You can run the `javap` command inside the Scala REPL

If you’re ever working on a really small Scala project — something that contains only a few source code files — and don’t want to use SBT to create a JAR file, you can do it yourself manually. Let’s look at a quick example. Note that the commands below work on Mac and Linux systems, and should work on Windows with minor changes.

AsciiDoc FAQ: What is the AsciiDoc image syntax?

The AsciiDoc image syntax looks like this:

image:images/hello.png["Put the HTML ALT text here"]

This example assumes that you have a file named hello.png in a subdirectory named images. Here’s a more complete example that also shows an AsciiDoc image with a title/caption and HTML image “ALT” text:

[[unique_image_id]]
.Put the title/caption text here
image::images/hello.png["Put the ALT text here"]

I suspect that how the caption and ALT text is rendered will depend on your tools/toolchain, but this is the way I use it.

In this video Martin Odersky shares an analogy of using a stapler when you need a stapler (not a power tool). He highly recommends reading Li Haoyi’s article, Principle of Least Power.

Principle of Least Power (Scala)

When, by meditation, we withdraw the restless thoughts ...

When, by meditation, we withdraw the restless thoughts ...

When I lived in Palmer, Alaska I used to write my bicycle quite a bit, and I came across several different churches. This is a photo of the Missionary Baptist church in Palmer.

Missionary Baptist church, Palmer, Alaska

Wake up! Life is transient. That’s a good message right there.

The image shown is of the Tassajara Zen Center in California. I couldn’t find the source of this image when I first posted it here — I found it on Pinterest without any attribution — but it looks like this might be the original source.

An image from the Tassajara Zen Center

As a brief update, surgical procedure #1 of July, 2020 will be taking place this Wednesday (the 15th), so you may not hear from me for a few days.

This is a simulated oil painting I created from a photo I took in Alaska. I don’t remember the exact location, but it’s on the road to Talkeetna, probably between Willow and Talkeetna.

The road to Talkeetna, Alaska (oil painting from photo)

I was just doing some work on my One Man’s Alaska website, and noticed that hundreds of people every month visit my page about Zeus over there. He was a very special dog, and I’m glad if more people can learn about him, and the effect that an animal can have on a person’s life.

Zeus

In 1971 — years before Jaws and Close Encounters — Steven Spielberg directed the first episode of the Columbo tv series. In 1974 they paid this little homage to him: Stephen Spelberg, “boy genius.” Here’s a link to that Columbo episode. I assume that Marshall Cahill in that episode is a not-so-subtle reference to a John Wayne movie from the previous year.

Steven Spielberg (Spelberg) and Columbo

The Buddha Board is a nice gift idea for the Zen person in your life. You paint on it with water, the painting appears, and then disappears as it dries, helping to demonstrate the Zen/Buddhist concept of impermanence, among other things.

Buddha Board, gift for the Zen friend

Sadly, cases of COVID-19 are sharply on the rise in Colorado. I know that MANY people at my apartment complex don’t wear masks as they walk around, swim in the pool, and exercise, so this isn’t a huge surprise.

Up to date data about COVID-19 in Colorado can be found at this page.

COVID-19 are sharply on the rise in Colorado

In this article I’ll take a look at creating Scala 3 inline methods.

Background

First, from the Scala documentation: “inline is a new soft modifier that guarantees that a definition will be inlined at the point of use.” This is different than the Scala 2 inline annotation, which notes, “An annotation for methods that the optimizer should inline ... If inlining is not possible, for example because the method is not final, an optimizer warning will be issued.”

As I’m packing to move soon, this photo shows ~1/2 of my medical records/bills, primarily from 2013-17. I hope you never have a health problem like what I went through, but an important “lesson learned” is that there are specialists and then there are specialists.

The short story goes like this: My PCP sent me to an endocrinologist who ran a bunch of blood tests and three MRIs (including one MRI just four days after an angiogram, and walking immediately after an angiogram hurts like a son of a gun), looking for a rare and potentially tumor (a paraganglioma or pheochromocytoma, which have a 10% mortality rate).

What four years of medical bills looks like

I was laying in bed last night, and knew I was close to falling asleep. Then I realized I could hear myself snoring. “How strange,” I thought, “my head is snoring, but I’m right here.” Then I realized that “I” was actually centered in my chest, and I couldn’t feel my head.

I was laying on my left side in bed, and had my left arm and hand folded up against my chest. I realized I could move my arm and my legs, but I had no connection to my head. As I did this I heard the head snore again. I couldn’t hear it through my ears, but I could hear it. So then I waited and listened, and I realized the time in between snores was very long, maybe somewhere in the 10-20 second time range.

I did some things in Alaska before where I used yoga techniques to very slowly fall asleep, and I was able to stay awake while my sense of hearing and sense of touch went away, but I’ve never had part of my body fall asleep while the rest of it was awake. How strange, indeed.

Coming from a family of lucid dreamers and sleepwalkers, this is funny.

Dick Van Dyke Show: Stacey sleepwalking

With the exception of our first dog, my wife and I always had Siberian Huskies. I can tell you firsthand that they like bones, big bones.

A Siberian Husky and a large bone