“Make today the most important day of the year, because tomorrow is not guaranteed.”
~ a quote from John Altobelli, who lost three-fifth’s of his immediate family in one day
“Make today the most important day of the year, because tomorrow is not guaranteed.”
~ a quote from John Altobelli, who lost three-fifth’s of his immediate family in one day
Hold me in your thoughts
Take me to your dreams
Touch me as I fall into view
When the winter comes
Keep the fires lit
And I’ll be right next to you
Shadows are fallin’ and I’m runnin’ out of breath
If I leave you it doesn’t mean I love you any less
Keep me in your heart for a while
~ Keep Me in Your Heart for a While, Warren Zevon (lyrics slightly rearranged)
I was surprised to see this Scala 3 compiler error just now:
Class differs only in case ... Such classes will
overwrite one another on case-insensitive filesystems
What happened was that I created this code:
trait Hello:
def greet = "hello"
trait Hi:
def greet = "hi"
class Greeter extends Hello, Hi:
override def greet = "I greet thee!"
@main def greeter =
val g = Greeter()
println(g.greet == "I greet thee!") // true
And apparently the Greeter
class and greeter
method collide with one another to create this compiler error message:
[error] -- Error: src/main/scala/traits/mixin_order/MixinOrder.scala:18:10
[error] 18 | class Greeter extends Hello, Hi:
[error] | ^
[error] | |class Greeter differs only in case from
|class greeter in package mixins.test1.
Such classes will overwrite one another on case-insensitive filesystems.
[error] one error found
I don’t know if this error will continue to stay like this in Scala 3, but that’s the way it works today.
This is a view of the mountains from my apartment in Palmer, Alaska, way back in 2011. Palmer is surrounded my mountains on three sides, and these are the mountains you see to the south.
I don’t remember where I saw this photo — it may have been the Fireside Books account on Twitter or Facebook — but it shows that they don’t worry about cleaning the snow off the streets too much in the winter in Alaska. This photo was taken about three blocks from my old apartment in Palmer, Alaska. (My apartment was one block down this road in the direction shown, and one or two blocks to the right.)
When I went to Texas A&M University, we discovered a restaurant just down the road in Bryan, Texas, called the “Chicken Oil Company.” Once there, we discovered that they made something called a “Deathburger,” known in this photo as the, “Hamburguesa de Muerte.”
I was just updating my Scala fold/reduce tutorial, and noticed that I start with this definition of a fold in computer programming from the excellent book, Learn You a Haskell for Great Good:
“Folds can be used to implement any function where you traverse a list once, element by element, and then return something based on that. Whenever you want to traverse a list to return something, chances are you want a fold. That’s why folds are, along with maps and filters, one of the most useful types of functions in functional programming.”
That’s a great definition because it includes (almost) everything, so I’ll add this:
If you’re interested in the definition of a fold in computer programming, I hope that’s helpful. See my fold/reduce tutorial for many more details.
Back in 2016 I posted this photo on Facebook with the caption, “The current minefield that may one day grow into a book.” Those notes eventually grew into Functional Programming, Simplified.
I haven’t watch all of this video yet, but from what I have seen, it appears that Steve Jobs secret passion was Japanese art.
As a brief note to self, I started looking into writing my own Scala testing framework, mostly because the main current frameworks are not currently available for Scala 3.0-M3. That led me to this Minitest blog post, the Minitest repository, and finally this sbt test-interface repository. It looks like if you want to write your own testing framework to work with sbt, that interface is what you need to implement.
I just tested Minitest with Scala 3, and it seems to work, so for now I’m not going any further. But I was happy to find that interface project, because I have often wondered what it would take to write a testing framework to work with sbt.
If you ever need to use the Scala 3 -source
option with scalac
or the SBT build.sbt file, the correct syntax is:
-source:3.1
It’s not clear from the scalac
help text how the -source
option should be used, and I just figured that out in my build.sbt file, which has these scalac
options:
scalacOptions ++= Seq( "-deprecation", // emit warning and location for usages of deprecated APIs "-explain", // explain errors in more detail "-explain-types", // explain type errors in more detail "-feature", // emit warning and location for usages of features that should be imported explicitly "-indent", // allow significant indentation. "-new-syntax", // require `then` and `do` in control expressions. "-print-lines", // show source code line numbers. "-unchecked", // enable additional warnings where generated code depends on assumptions "-Ykind-projector", // allow `*` as wildcard to be compatible with kind projector "-Xfatal-warnings", // fail the compilation if there are any warnings "-Xmigration", // warn about constructs whose behavior may have changed since version "-source:3.1" )
A moth is a mapmaking creature. When it flies into a candle it’s working from an erroneous map. Maybe the moth’s map says, “Mating opportunities here.”
A human is also a mapmaking creature. Everyone operates from a map, and the map is always getting out of date. Life, the territory described by the map, moves quickly. This means that the map drifts away from the territory, eventually becoming more of a historical artifact than a useful guide.
When there is a wide gap between the map and current world, the person who made the map feels discomfort.
For however long it worked, it was a nice map, and now it doesn’t work any more. In this situation, unlike moths, humans have two choices. One is the path of discovery, in which the map is abandoned or redrawn over and over again.
The other path is one in which the more doubts you have about a map, the more strongly you insist it’s accurate. This is the path that leads the moth into the flame. If you follow this path, you’re living by a fiction, an erroneous map ... essentially what you’re doing is building a prison cell of non-reality to live in, your own little Alcatraz.
It’s the job of the koan to take down your prison walls, to undermine your fictions. Then you might discover that you’re not really suffering from other people or from circumstances. You’re suffering from your maps, your fictions, the prison you yourself have created.
A quote from a book titled, Bring Me the Rhinoceros: And Other Zen Koans That Will Save Your Life, by John Tarrant
Back around 4:30am on January 13, 2014, I pulled into a rest area in Virginia after staying in Virginia Beach for a while (and experiencing a tornado warning there), and found this cat waiting for me.
It felt like we might have a tornado in Virginia Beach today, with that familiar and unusual low-pressure feeling. At one point it even looked like the ocean water was being pulled up into the sky.
~ January 11, 2014
As I walked into the Starbucks today here in Virginia Beach, an alarm went off on my phone saying there was a tornado warning. So I asked the three people working there, “Which is worse, a tornado warning or a watch? I can never remember which is which.”
So rather than google it, we talked about whether “watch” or “warning” implied more danger, then we talked about some other things while we watched stuff go flying down the street. Never did figure out which is worse, but eventually I got a coffee.
Later in the day as I was walking down a street I came across a gift shop that had been blown all over the place by the winds, and found this t-shirt amongst the ruins.
~ January 11, 2014
“One’s agony is assuaged to some extent even by speaking of it, but to whom shall I speak about it? For there is no one who will understand. The reality about the chord of love that binds you and me, dear, is known to my soul alone; and my soul ever abides with you. Know this to be the essence of my love.”
~ A god speaking about his love for a devotee in the Ramayana, as seen in the book, Miracle of Love
Back in 2013 I read the book Clean Code by Robert C. Martin, and in an effort to keep that book alive with me a little while longer, I decided to make my own “Cliffs Notes” version of the book on this page. One of my favorite notes from below is that a language named LOGO used the keyword to
in the same way that Scala uses def
, so a method named double
would be defined as to double...
instead of def double...
, which seems like it would help developers name methods better.
“Sometimes I think of Frank as the catcher in the rye, standing at the edge of the cliff, trying to save the world.”
~ Catherine talking about Frank, in Millennium
(Holden: “Anyway, I keep picturing all these little kids playing some game in this big field of rye and all. Thousands of little kids, and nobody’s around — nobody big, I mean — except me. And I’m standing on the edge of some crazy cliff. What I have to do, I have to catch everybody if they start to go over the cliff — I mean if they’re running and they don’t look where they’re going I have to come out from somewhere and catch them. That’s all I’d do all day. I’d just be the catcher in the rye and all. I know it’s crazy, but that’s the only thing I’d really like to be.”)
“I met a dolphin down there, and I swear to God that dolphin looked not at me, but into my soul, into my goddamn soul, and said, ‘I’m saving you Megan.’ Not with his mouth, but he said it — I’m assuming telepathically — we had a connection that I don’t even know if I can explain.”
~ from the movie Bridesmaids
These are some notes from the initial test of psilocybin (the chemical in magic mushrooms) on 200 people by Timothy Leary and Richard Alpert. I think I found this in a book by Ram Dass (nee Alpert). Note that you can get the same effects more safely from meditation.