Temurin 11 is on Homebrew

May 24th, 2022

Homebrew

This morning I decided to see if I could get the AdoptOpenJDK 11, now called Temurin 11, going on my M1Max MacBook Pro. In the past, they have had the AdoptOpenJDK 11 on Homebrew, but it was Intel, and I didn't want to bring in Rosetta 2 for any Clojure work, so I was willing to wait. I read on Twitter from the Eclipse Foundation that they had placed Java 11 and 8 for Apple Silicon on Homebrew, so why not?

It turns out, it's not bad at all:

  $ brew tap homebrew/cask-versions
  $ brea install --cask temurin11

and it's ready to go. Then I can use my setjdk function to switch between JDK 11 and 17 on my laptop, which is nice when there are some issues I've had to deal with in the past. Don't know when I'll need this again.

Sadly, the architecture for JDK 8 is still Intel:

  $ brew info temurin8
  temurin8: 8,332,09
  https://adoptium.net/
  Not installed
  From: https://github.com/Homebrew/homebrew-cask-versions/blob/HEAD/Casks/temurin8.rb
  ==> Name
  Eclipse Temurin 8
  ==> Description
  JDK from the Eclipse Foundation (Adoptium)
  ==> Artifacts
  OpenJDK8U-jdk_x64_mac_hotspot_8u332b09.pkg (Pkg)

that last line is the kicker: x64... so it goes. Still... I have JDK 11 for Apple Silicon now, that's good. 🙂

Play.js Updated to CodeSandbox

May 4th, 2022

PlayJs

I was doing a little Node/JS coding on play.js on my iPad Pro this week, and ran into a few issues that I wrote to the developers about. They weren't all that big a deal, save one:

  • Logging is iffy - using Node/Express, their default is the debug logging package, and yet you can't see any of the log messages in the console in the app.
  • Running nodemon doesn't reload on changes - it would be nice to have a way to auto-reload changes in the files - specifically because the editor is saving them.
  • Exceptions aren't logged - if there's an uncaught exception, it's not logged/printed in the console at all. Just silence.

And it's really the last one that's the kicker... no way to see if there has been any exceptions... that's something that would make it very hard to find errors in the code.

They wrote back that there would be updates that were coming soon that would fix most of these, and that I should sign up for the CodeSandbox Beta program and look for the updates. Well... this morning, I saw that they had an update, and changed the name of the app on iPadOS to CodeSandbox. So I fired it up to see how things had changed.

There were lots of changes, but the key problems I was having haven't changed, and they have really moved it away from what I liked about it, and towards another style, with different goals. It's OK... it's their app, but it's not the direction I was hoping they were going.

So... it looks like I'll have to wait a little longer to see what comes up as a development platform for the iPad...

Upgraded Postgres to 14.2 on Homebrew

April 20th, 2022

PostgreSQL.jpg

This morning I was looking into the Ubuntu 20.04 to 22.04 LTS upgrades, and decided that it was probably a good time to see about the latest version of Postgresql for my laptop. Thankfully, it's a minor version upgrade from 14.0 to 14.2, and this is something that Homebrew can do quite nicely:

  $ brew upgrade postgresql
  $ brew services restart postgresql

and then after all the downloading and installing, we have:

  $ psql --version
  psql (PostgreSQL) 14.2

Then we are good to go! 🙂

I haven't had a need to use the local Postgres server a lot in the last year or so - using a Google Cloud instance for a while, but it's nice to have all the client support, and to have something local as that's still the best insurance to off-the-grid development.

Minor Bug in VoodooPad 6 – Text Colors

March 21st, 2022

VoodooPad4.jpg

Ever since moving to my new M1Max MacBook Pro, and moving to Apple Silicon apps, I've had one bug in VoodooPad 6 that's a touch annoying. I mean it's not horrible, but it was something that I hoped would be fixed. So I decided to let them know about it.

With the pandemic, and VoodooPad now being owned by Primate Labs, they haven't had someone to do all the upgrades and improvements that they'd planned, and I understand that completely. Times are challenging for everyone, and they want to update the app, they just don't have the people to do it right now, so it has to wait a little.

Thankfully, they responded, and seem to know what the issue was - adding support for Dark Mode, which is kinda odd, but I guess I don't know any of the inner workings of the codebase, or how Dark Mode support is handled, so I'll have to just be patient, and wait for them to update the app as they have time.

But it would be really nice to be able to save text colors... 🙂

Another Pi Day!

March 14th, 2022

pi.jpg

It's another Pi Day! And that always brings back memories of when the kids were little and the teachers in their elementary school would have the kids bring in pies for snacks, and fun, and while it's certainly a geeky thing to do, I always enjoyed that the kids loved it. Get them interested in things like that early, and maybe it'll make school seem more interesting.

Nice Config Change for Sublime Text

February 10th, 2022

Sublime Text 2

This morning I did a little searching about how to disable any Auto-Complete in Sublime Text, as there are a lot of times that I really don't want to have any autocomplete happening, as it just gets in my way. So I was very happy to find that all I needed to do was to add:

  "auto_complete": false

to the Settings file, and that will turn it off.

Blissful silence. 🙂

Thankfully, Ctrl-Space will bring it back, and that's exactly the thing I was hoping to find. Then it's at my command, as opposed to simply appearing. Once again, less is more... coding is what I do, and I know what to type... so Sublime Text is again my favorite editor. Wonderful. 🙂

Enjoyed Digging Through PostGraphile Code

January 10th, 2022

TypeScript

Over the weekend, I had a problem with a project at work that was using PostGraphile and I was having an issue with the Postgres URL that I was feeding to the configuration of PostGraphile:

    postgraphile(
      process.env.PLATTER_POSTGRES_URL,
      'public',
      {
        watchPg: false,
        graphiql: true,
        enhanceGraphiql: true,
        graphqlRoute: '/graphql/v2',
        graphiqlRoute: '/graphiql/v2',
        eventStreamRoute: '/graphql/v2/stream',
        appendPlugins: [
          require('@graphile-contrib/pg-simplify-inflector'),
          require('postgraphile/plugins').TagsFilePlugin,
        ]
      }
    )

The process.env.PLATTER_POSTGRES_URL was generated by a call to the Platter service, and it turned out to be cached, and stale, and as the source is Let's Encrypt, it needs to be updated monthly. The cache had been running for more than a month, and that left an old, expired, certificate for the site, in memory.

It was easy enough to have them restart the cache, getting to that point... well... 🙂 that was a little more involved. The first issue was that with PostGraphile, used as a Library, had the feature that if it could not generate the initial schema for the GraphQL engine, it would exit the process, and effectively crash the service.

I wanted to protect the service, so the first order of business was to update the way I was using PostGraphile to allow me to capture the failure, and just disable the GraphQL engine until we could get this problem figured out. Thankfully, that was as easy as adding a function to the retryOnInitFail option:

    postgraphile(
      process.env.PLATTER_POSTGRES_URL,
      'public',
      {
        watchPg: false,
        graphiql: true,
        enhanceGraphiql: true,
        graphqlRoute: '/graphql/v2',
        graphiqlRoute: '/graphiql/v2',
        eventStreamRoute: '/graphql/v2/stream',
        appendPlugins: [
          require('@graphile-contrib/pg-simplify-inflector'),
          require('postgraphile/plugins').TagsFilePlugin,
        ],
        retryOnInitFail: (err, att) => {
          log.error(`[PostGraphQL] Error on initialization: '${err}' with ${att}
                     attempts. Bailing out on PostGraphQL.`)
          return false
        }
      }
    )

At this point, we had time to figure out what the issue was. I was going to dig into the PostGraphile code, and Alex, at Platter, was going to look at it from his end. Which brings me to the point... the PostGraphile TypeScript code is very nice. Yes, there are a lot of packages/modules, and the organization is clean, but I'd have done it the same way - easy separation of responsibilities. The code is exceptionally clean... well considered and implemented. The more I dug into it, the more impressed I was with it as a project.

I thought it might be an issue with their code - an asset they are loading that has an expired certificate, so I filed that on GitHub, and had a wonderful exchange with the maintainer of the project. As I dug in more, and worked to repeat the issue on a much more limited basis, the back and forth with the maintainer was very helpful... just exactly what you'd hope to encounter - but often don't.

It was the most unexpected, wonderful, experience I'd had in months. It renewed my faith in Open Source again. 🙂

Happy Birthday to Me!

December 31st, 2021

Cake.jpg

Another year has passed, and another birthday arrives. As time passes, it's interesting that my birthday and the end of the year coincide, a time to think about the end of both, and the start of new things. It's been a year of ups and downs, the second year of the pandemic, and in many cases, so little has changed. In other ways, so much has changed.

A friend asked me to think about writing down how change happens from the inside, versus what's visible from the outside, and I mentioned that I thought it would be a very short story:

  • Don't let yesterday ruin your today
  • Don't hold today hostage for the promise of tomorrow
  • Focus on just this moment, it's all we have, and it is more than enough.
  • Do your best, all the time, and whatever happens - you know you couldn't have done more

This is what I've distilled my recovery down to... it's not a lot of big changes, in fact, it's not any really big changes at all. It's the almost imperceptible layering of millions of little things, that when viewed, occasionally, from the outside - appear as changes, but at the time they happen, it's really just sticking to one of the four tenets.

Every day is exactly the same... and I am blessed. 🙂

Merry Christmas!

December 25th, 2021

Christmas Tree

It's another Christmas, and things have started out quietly... I was able to finish Advent of Code today - all 25 Days in 25 days. It's an unusually warm Christmas - so no snow, but that's not really unusual, but the temps being as warm as they are is a little odd. Still... the temps will fall, and the snow will come, and it'll be time to shovel snow, but for now it's just like an extended Fall.

The Christmas Music has been great this year, and I've enjoyed some really good Christmas Movies. I wrote a Christmas Letter yesterday and sent it to extended family, and it seemed to be appreciated. I like catching folks up with a little humor. 🙂

Life goes on.

The iPad Pro Really is Something

December 22nd, 2021

IPadPro

I have been using the iPad Pro for two generations now, and my current model is the M1 iPad Pro, and during the pandemic, it has really proven to be a great Zoom, Meet, etc. box. It has a nice camera, and with Front and Center in iPadOS, it really makes it easy to have a good presentation, or meeting. But it's really so much more.

With the GitHub app, I can get PR notifications, review them, and merge them. With the GitHub Workflow Actions, we have continuous deployment, and that is really quite amazing to me. Of course there are the shells to boxes, and that is great, but even offline, there is so much to like about this machine.

It's rugged - compared to my MacBook Pro, and the screen is a lot easier to clean. I'm not saying my MacBook Pro isn't nice... it's just that in some respects, the iPad Pro is nicer.

What a really amazing device. 🙂