Archive for the ‘Vendors’ Category

Finally Updating to AdoptOpenJDK for JDK 8 and JDK 11

Thursday, April 18th, 2019

java-logo-thumb.png

This morning I decided to really dig into the Homebrew support for AdoptOpenJDK - and while I was initially a little unsure of the AdoptOpenJDK group, after reading their web site, and digging into their Homebrew cask, I was convinced to give it a try. It will keep things moving with updates on the JDKs - delivering JDK 1.8.0r212 as of today, and that's what my biggest fear was. So let's get to it.

In order to get the very latest AdoptOpenJDK (11), it was as simple as:

  $ brew cask install adoptopenjdk

which resulted in my installation directory looking like:

  $ ls /Library/Java/JavaVirtualMachines/
  1.6.0_26-b03-383.jdk/    jdk1.7.0_45.jdk/         jdk1.8.0_144.jdk/
  adoptopenjdk-11.0.2.jdk/ jdk1.7.0_51.jdk/         jdk1.8.0_181.jdk/
  jdk-10.0.2.jdk/          jdk1.7.0_75.jdk/         jdk1.8.0_40.jdk/
  jdk1.7.0_13.jdk/         jdk1.8.0_131.jdk/        openjdk-11.0.2.jdk/

At this point, I could remove the openjdk-11.0.2.jdk/ install, as that's from Oracle, proper, and I really just want to let that go due to the licensing...

  $ brew cask uninstall java

and then re-select the correct JDK 11 with:

  $ setjdk 11; echo $JAVA_HOME
  /Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home

So it was installed properly, and picked up the new installation from AdoptOpenJDK. Good. Now in order to pick up the older versions, we can follow the instructions on the Homebrew cask:

  $ brew tap AdoptOpenJDK/openjdk
  $ brew cask install adoptopenjdk8

and after this, we have the following installed on my machine:

  $ ls
  1.6.0_26-b03-383.jdk/    jdk1.7.0_13.jdk/         jdk1.8.0_131.jdk/
  adoptopenjdk-11.0.2.jdk/ jdk1.7.0_45.jdk/         jdk1.8.0_144.jdk/
  adoptopenjdk-8.jdk/      jdk1.7.0_51.jdk/         jdk1.8.0_181.jdk/
  jdk-10.0.2.jdk/          jdk1.7.0_75.jdk/         jdk1.8.0_40.jdk/

and I have to admit, I'm a little concerned about the lack of a release number on the AdoptOpenJDK 8's directory - but maybe that will be handled a little differently as they version them. We will have to wait and see.

At this point, we can:

  $ setjdk 1.8; echo $JAVA_HOME
  /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
  $ java -version
  openjdk version "1.8.0_212"
  OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_212-b03)
  OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.212-b03, mixed mode)

To make sure that we don't cleanup the old versions with Homebrew, when I install a new one, I added the following to my ~/.bashrc:

  export HOMEBREW_NO_INSTALL_CLEANUP=1

Which Homebrew says will keep from doing the automatic cleanups on the installs.

To do a final check with the AdoptOpenJDK 1.8.0r212, I checked what Leiningen was saying:

  $ lein --version
  Leiningen 2.8.3 on Java 1.8.0_212 OpenJDK 64-Bit Server VM

At this point, I've got AdoptOpenJDK 1.8.0r212, and 11.0.2, and updating each is very simple with brew. I just need to:

  $ brew update
  $ brew cask upgrade adoptopenjdk
  $ brew cask upgrade adoptopenjdk8

and then when I want, I can clean up the older versions with:

  $ brew update
  $ brew cleanup adoptopenjdk
  $ brew cleanup adoptopenjdk8

This is so much cleaner, and I don't have to worry about the crazy licensing from Oracle. It's a lot nicer place to be.

Oracle Java JDK 8r211 Updates License

Wednesday, April 17th, 2019

java-logo-thumb.png

This morning I got an update notice on Java 8 on my machine - it was for JDK 8r211, and during the normal update process, the installer popped up a dialog box where it was very clear that the terms of the license for JDK 8r211 have changed.

Specifically, it stated that this JDK was only for non-commercial use, and if it was going to be used in a commercial environment, then a license would have to be obtained from Oracle.

This is the JDK 11 license, and why I went through the pain to get OpenJDK 11 on my laptop, because I just can't see even pretending to use a product that I know I won't ever use in production. Now, I have to stick with the version of JDK 8 I've got installed, because I don't see an easy path to get OpenJDK 8 from Homebrew. There's an old cask, but I don't know that it's any more current than what I have - and I don't know that I need anything more current.

Just seems so short-sighted by Oracle, but they see a revenue stream, and go after it.

Sublime Text 3.2 is Out

Wednesday, March 13th, 2019

Sublime Text 2

This morning I saw a tweet from @SublimeHQ saying that Sublime Text 3.2 was out, and the list of fixes and features was really quite nice. The git integration is very nice - you can now see the branch you're on in the status bar, and when you click that, it will bring up Sublime Merge. It's not bad... not sure how much I'll use that, but it's nice that they have it integrated, and can show the branch on the editor window.

They also added a lot of nice Mac features:

  • Mac: Added Mojave support
  • Mac: Add full support for macOS native tabs
  • Mac: Ensure context menus are shown without scrolling
  • Mac: Error message dialogs can now be closed with the escape key
  • Mac: Improved window placement
  • Mac: Improved resize performance

I wasn't really disappointed with the performance, but to see the support for native tabs and Mojave - it's just really nice.

They also updated the syntax highlighting for Clojure, D, Go, and Lua - and while I'm not a big fan of the others, the changes they made to Clojure really nice. I also noticed that they have done something with the rendering in the Clojure files - could all be part of the syntax highlighting, but I'll have to see what it turns out to be. Looks like they "thinned out" the strokes on the comments, but we'll see. In any case, it's a lot nicer now for most of the coding I do.

It's an exciting upgrade, and it makes my day a little brighter.

Securing Google and Restoring GTalk

Wednesday, February 20th, 2019

Adium.jpg

Yesterday, I lost access to my GMail and GTalk accounts on my laptop - and it was saying that the password was bad. The first was covered in this post, and this morning I attacked the second. Overnight, I was just hoping that it was a transient thing, and that Google would restore whatever it decided to turn off, but that was not to be.

Given that Adium is now limited to just GTalk and ICQ, there really wasn't a lot of reason for me to keep it running, if I couldn't fix this authentication issue. So... knowing that Google wanted me to secure my account - but doing that would kill the old scheme for Adium, I decided to go ahead with it, and if it didn't work, then I'd just shut down Adium, and have to live with the loss of communication to my friends.

Securing Google

Police.jpg

So the first thing I needed to do was to turn off the Insecure Access in Google. This is just saying the old, plaintext, username and password being passed to Google. This was the only way the old Adium worked, and so I had to leave it like this. But that's all changing.

Once that was turned off, I knew I wanted to use Authy for the Authentication App for Google because I didn't like the SMS codes, and Authy is just a nice tool for exactly this purpose without worrying if your SIM card has been cloned. So I turned that on, and typed in the first code, and we're good to go.

Finally, I needed to generate a single Application Password for Adium, and that was all done from the Security tab in the Google Account Settings. Not bad at all, they generate a 16-character code, and you then use it for that app. You only get to see it once, so make sure you type it in correctly, but you can always make another.

Testing Adium

Once I had the 16-character application password for Adium, I pulled it up, typed it in, and BAM! it worked. I could almost not believe it! This was exactly like the POP3 issue - I'm guessing Google just got tired of the less-secure methods, and just shut them off. Period. Now with the 2FA on my account, the Application Password is as secure as Google wants to make it. 16 characters is gonna be really hard to guess.

And as I was testing Adium... still a little giddy that this all worked, and I had also locked down my account, I got a notice from Mail.app that I needed to enter my password.

Ah... IMAP was not using the 2FA, and I needed to pull up the accounts in Mail.app, and go through that login once to get the login using 2FA, and to to trust this device. When that was done, email was back online, and GTalk was too.

What a heck of a morning! Very good news!

Google Shutting Down POP3 Access

Tuesday, February 19th, 2019

Google Docs

Well... that was a heck of a realization! This morning, I notice that my Mail.app can't connect to GMail, and I wonder if it's something that is wrong with the account - or just Google. Oddly, Aduim also is not connecting to GTalk, and that's very strange. So I start digging into this.

I know that my password is valid. And I also know that I haven't had any Security Alerts from Google - so that's good. But still... both Gmail and GTalk are not allowing me to login.

I got caught up in a lot of other issues today, but got back to this, and on a lark, decided to look at the two Gmail entries in my Accounts for Mail.app - one was just for GMail, and the other was the more complete email/notes/contacts/calendar - and the latter had to be using IMAP, and I know the former was POP3. So let's disable POP3, and use the IMAP for mail.

Bingo!

It seems as though Google just shut off POP3 access. I looked at the settings, and it's still considered "on" in my GMail account settings, but that doesn't matter. I simply cannot connect to the POP3 site. OK... guess that's that.

At the same time, I'm wondering if the GTalk (XMPP) API is shut down as well? I'll give it a day, and then I'll have to accept that it's dead, and at that point, there's no need to have Adium running, as the only protocol it used anymore was GTalk, and with that gone, it's really pointless. Sad to see that happen. Very sad.

UPDATE: I downloaded Trillian from the App Store, and it doesn't connect to GTalk either. So this is not a single app or my credentials. This is just GTalk. We will have to see if it clears up tomorrow.

Moving to OpenJDK 11 – Kinda…

Monday, February 18th, 2019

java-logo-thumb.png

Well... today has been a very eventful day. I had noticed that Oracle dropped support for JDK 10, and mentioned it to some friends in Slack. I didn't know the details, so I decided to dig in and see if I could see anything on the net about it. I did. Lots. Changed my day.

Turns out, Oracle is changing it's licensing for JDK 11 - it's free for development and testing, but if you use it in production, it requires a license. A paid license. Yikes!

OpenJDK is also built by Oracle, and IBM, and RedHat - and it is Open Source - free for any use-case. So that's where people appear to be going. I can see that, but I've stayed away from OpenJDK because it's just the official JDK from Oracle. But now it seems Oracle is looking to cash in on the JDK, and this is just a lovely predicament.

But there is hope - kinda. Homebrew is supporting OpenJDK as a cask so that it can be versioned, and supported within the Homebrew ecosystem. That's good news. To install the latest, you simply need to:

  $ brew cask install java

and it will install it into:

  $ brew cask info java
  java: 11.0.2,9
  https://jdk.java.net/
  /usr/local/Caskroom/java/11.0.2,9 (64B)
  From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/java.rb
  ==> Name
  OpenJDK Java Development Kit
  ==> Artifacts
  jdk-11.0.2.jdk -> /Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk
  (Generic Artifact)

and the tools I built for switching JDK versions work just fine:

  $ setjdk 1.8; echo $JAVA_HOME
  /Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home
  $ setjdk 11; echo $JAVA_HOME
  /Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home

That's the good news. What isn't really good is that there is an issue with the Java Collections where the toArray method added an additional arity and that breaks Clojure - badly. So it really doesn't help to have the OpenJDK 11 on the box - as Clojure can't make use of it.

However, that's not all... it appears that when I upgraded Leiningen, I broke one of the really nice plugins that I like to use with it - Ultra. The error is nasty as well:

  $ lein clean
  $ lein deps
  $ lein repl
  [WARNING] No nREPL middleware descriptor in metadata of
    #'clojure.tools.nrepl.middleware.render-values/render-values,
    see nrepl.middleware/set-descriptor!
  [WARNING] No nREPL middleware descriptor in metadata of
    #'clojure.tools.nrepl.middleware.render-values/render-values,
    see nrepl.middleware/set-descriptor!
  nREPL server started on port 54967 on host 127.0.0.1 - nrepl://127.0.0.1:54967
  ERROR: Unhandled REPL handler exception processing message
    {:id ad3092dd-8491-4d60-a1a9-5092d4d090a9, :op clone}
    java.lang.IllegalArgumentException: No implementation of method:
    :send of protocol: #'nrepl.transport/Transport

and if I removed Ultra from my ~/.lein/profiles.clj then everything worked fine again. But this was with Leiningen 2.9.0 - and that was an issue. In fact, it was an issue that's already been reported to Ultra. I added my notes, as the suggestion didn't work for me.

So now I'm left with downgrading Leiningen to get Clojure working again. This is not as easy as I'd hoped, but it's what needs to be done. First, get into where the Homebrew formulae are stored, :

  $ cd $(brew --prefix)/Homebrew/Library/Taps/homebrew/homebrew-core/Formula
  $ git log --follow leiningen.rb
  commit 2be19f3787d811247095e704765fc33a8815d639
  Author: BrewTestBot <homebrew-test-bot@lists.sfconservancy.org>
  Date:   Tue Feb 12 13:07:29 2019 +0000
 
      leiningen: update 2.9.0 bottle.
 
  commit 9ca7899818eb02cc8252d47cc32b5a42554a7655
  Author: Rahul De <rahul080327@gmail.com>
  Date:   Tue Feb 12 10:43:59 2019 +0100
 
      leiningen 2.9.0
 
      Closes #36927.
 
      Signed-off-by: Chongyu Zhu <i@lembacon.com>
 
  commit fd1c0ba8f162a3c41debef6143dca8ba19227f90
  Author: BrewTestBot <homebrew-test-bot@lists.sfconservancy.org>
  Date:   Sat Dec 15 10:45:41 2018 +0000
 
      leiningen: update 2.8.3 bottle.
 
  commit 40553be0b01710db9e16cff978f593b83ecdfe3b
  Author: Rahul De <rahul080327@gmail.com>
  Date:   Sat Dec 15 11:27:08 2018 +0100
 
      Leiningen 2.8.3
 
      Closes #35151.

at this point we heed the git SHA for the version we want to move to. In the case of Leiningen, the SHA for 2.8.3 is fd1c0ba8f162a3c41debef6143dca8ba19227f90 and the SHA for 2.7.1 is cdddd1094b26d0092e0030051dac97a286bb3fc4. I started with 2.8.3, and that didn't work, so I had to go back to 2.7.1. This is a big difference.

Then make a branch for that version, and reinstall Leininden from the Ruby file:

  $ git checkout -b leiningen-2.8.3 fd1c0ba8
  $ brew reinstall ./leiningen.rb
  $ brew switch leiningen 2.8.3
  $ git checkout master

for 2.8.3 and, for 2.7.1:

  $ git checkout -b leiningen-2.7.1 cdddd109
  $ brew reinstall ./leiningen.rb
  $ brew switch leiningen 2.7.1
  $ git checkout master

At this point, we can see that both versions are installed:

  $ brew info leiningen
  leiningen: stable 2.7.1 (bottled), HEAD
  Build tool for Clojure
  https://github.com/technomancy/leiningen
  /usr/local/Cellar/leiningen/2.7.1 (9 files, 14.7MB) *
    Poured from bottle on 2019-02-18 at 13:29:34
  /usr/local/Cellar/leiningen/2.8.3 (9 files, 13MB)
    Poured from bottle on 2019-02-18 at 13:22:14

Now it's possible to run Leiningen and Ultra - again. It has to be JDK 8, and Leiningen 2.7.1... but until Ultra is fixed for the change in Leiningen, this is as far as I can go.

What was even more annoying was that my new work laptop has a very recent version of Homebrew on it, and the git repo has been trimmed, and so there is no git SHAs for the previous versions. However, with tar and copying the tarball over, I was able to get the 2.7.1 and 2.8.3 versions there, and things are now working OK.

Wow! What a mess to get back to where I thought I started the day!

Oracle Drops JDK 10

Thursday, February 14th, 2019

java-logo-thumb.png

I've been rebuilding a new MacBook Pro laptop from work because the security tools we use at The Shop don't allow Migration Assistant to work - which is sad, because it works so well under normal circumstances, but water under the bridge, and I have to reinstall a lot of things on the box - as if from scratch.

Because of Clojure, one of the things I have to make sure to install is the latest JDK. Actually, I need to install all the latest JDKs - 1.8, 9, 10, and 11. And then I have a simple little tool for changing the JDK version that I want to be using. Simple. Easy.

When I last went to upgrade the versions of the JDKs, I found that Oracle has dropped support for JDK 9. I had heard a lot of talk about how JDK 9 wasn't really doing well because of some of the design decisions... and so this wasn't really a surprise, but it was unexpected to see that Oracle had pulled it from the Downloads. But OK... they didn't want people using it, so they pulled it.

Today, I saw that Oracle had pulled JDK 10 as well. Now that was a bit of a surprise. I know that it wasn't as popular with the Clojure community as JDK 1.8, but to see a second abandoned JDK version... well... that's a heck of a realization from Oracle. It's not good... it's causing us too much to support it... drop it.

So I have JDK 1.8 and 11 on the new laptop, even though on my personal machine I still have the last available JDK 10. But at some point, that will have to be thinned out because it just won't be supported. Wild.

Hats off to the JDK 1.8 guys - You've made a heck of a product.

Interesting Breakdown of Heroku’s 2019 Plans

Wednesday, February 6th, 2019

Heroku

I saw this on Twitter this morning:

Adam McCrea - @adamlogic: I see a lot of confusion around @heroku's free dynos, so I wrote up a guide. Let me know if you find this helpful, and please share!

https://railsautoscale.com/heroku-free-dynos

and I have to say, it's packed with a lot of really useful information about the free, hobby, and paid dynes and database plans. What I really liked was that the alternatives, and work-arounds that he presented makes it clear there are some decent alternatives to the Heroku plans, but that Heroku is still in a good place.

I still want to put some Clojure service up on Heroku someday... I just need to know what the app is, and maybe it's tied into a macOS or iOS app as well. Who knows... but I really like to see someone look into the good, and the not-so-great parts of a service provider - just to keep them honest.

AWS Adds ARM Instances to EC2

Wednesday, November 28th, 2018

Amazon EC2 Hosting

I was surprised to read that at it's yearly conference, Amazon announced that you can now spin up EC2 instances based on their custom ARM CPU. This isn't a complete surprise - face it, Apple is close to launching ARM-based laptops and desktops. It's been batted about in the press for a while, and based on the old quad-fat binaries, the technology is there, and Apple certainly has all the experience to get macOS up and running on ARM.

This isn't necessarily the cheapest EC2 instances - for the a1.medium, a 1 CPU, 2 GiB RAM instance, is $0.0255/hr which rolls up to $233.38/yr for the instance. And the t3.nano starts at $0.0052/hr, but what's most interesting is that AWS did the math, and decided that building their own CPU - and then, of course, their own machines, was the cost-effective way to go. Amazing.

I have to believe that Intel is missing out - or maybe they will be tied to the x86 chipset and ride that for all it's worth. Who knows... but it seems like something they are missing out on. And how long can it be before we see laptops and desktops based on ARM? Not long.

Shopping on Jet

Thursday, November 15th, 2018

Jet

Today I was looking for my favorite mustard - French's Plain Yellow Spicy Mustard - online because I really do like it, and my local Jewel stores have stopped selling it. I'm not a fan of Amazon's treatment of it's employees, so I have not really become an Amazon shopper. Sure, I've bought a few things in the past, but it's not a company I want to support - but I don't judge people that use it all the time, because this is my choice, and not theirs.

So I found that Jet has my mustard, and I was quite excited. It wasn't Amazon, and the web site looked nice, and it seemed like a decent place. So I ordered the mustard, and downloaded the iPhone app, and felt pretty good about myself.

And then a friend told me that Walmart owned Jet.

Shucks.

I'm not a fan of Walmart, either. But I guess in the grand scheme of things, I can tolerate Walmart a little more than Amazon, and so I'll keep my order for the mustard. But I sure wish there were a way to support a non-mega-company, and get the few things I'd like to have. I was happy with Jewel, but they stopped carrying it. So I have to deal with one of these mega-corporations. And if that's the choice I have, I'll stick with Jet because they were once an independent company, and Walmart is a little less distasteful than Amazon.

But I wish there were another option.