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

I’ve written a variety of small Scala apps that take advantage of the “text to speech” capabilities on Mac OS X (Sarah, Wikipedia Page Reader), and a few days ago I started thinking about consolidating these by creating a Mac “text-to-speech service.” I initially created that as an Akka server (here on Github), then thought to make it a little more generic as a REST web service.

[toc hidden:1]

A friend sent me this link on some new Statcast features coming to MLB.tv. Those are cool, and I love the RPM numbers for the pitchers, but an MLB.tv feature I really want is to be able to go to a specific game and say, “Show me all of Kris Bryant’s at-bats for this game, with a minimum delay time between each pitch.” One thing about baseball, you have to wait 30-45 seconds (or more) between pitches, and when you just want to see how a guy did on a certain day, it would be nice to see each pitch with only ~5 seconds delay when reviewing ABs like this.

As a quick note, I just found this getUrlInputStream method in an old Scala project. It needs to be updated and cleaned-up, but if you are looking for some code to get you started with opening a URL as an InputStream in Scala, this may be helpful:

Java Jar file FAQ: Is there an easy way to delete a file from a Jar file?

Yes. Because a Jar file is just a Zip file, you can use the zip command to remove a file from a Jar file, like this:

zip -d MyApp.jar fileToDelete.foo

Of course the file to delete can be any sort of file. I just went through this process where I had to delete a configuration file, and my command looked like this:

This Haskell.org page has a nice list of Haskell tutorials and documentation.

I was looking for a programming language called Unison, and found this quote by Fred Brooks (he of The Mythical Man-Month). The image comes from this page.

When I get away from programming for a little while I often write some example code to get my brain warmed up again. So last night I was reading the Real World Haskell book and came across this myDrop example, which is an implementation of a Haskell drop function:

As I keep trying to learn more about functional programming (FP), I keep going back to old Haskell books, like Real World Haskell, where this image comes from. Every time I try to learn more about Haskell my brain gets stuck not on FP, but on a couple of pieces of Haskell’s syntax. For instance, I don’t like the way function parameters are passed to functions, as shown in the top of this image. I much prefer the Java/Scala approach of compare(2, 3).

Last night I saw on the bottom of this image that this situation gets a little better (for me) when you nest several function calls together. The syntax at the bottom of the page looks more like Lisp, which is more readable for my brain.

(FWIW, I don’t call this a “rant” or “flame” about another language. I don’t like a few parts of Haskell’s syntax in the same way that I don’t like putting $ characters in front of variable names in other languages. It’s just an observation of what I don’t like about a language.)

MLB ballplayers/phenoms Kris Bryant and Bryce Harper played against each other for the first time on Memorial Day, 2015. They first played against each other in Las Vegas when Bryant was nine years old and Harper was seven. (Photo from espn.com.)

Gemma Correll is one of my favorite artists/illustrators/cartoonists, and her book, The Worrier's Guide to Life, looks great.

This is a photo of the celebration after the end of the 2015 Bolder Boulder Run, in Boulder, Colorado. Photo from this Instagram page.

Typesafe is in the process of changing their corporate name, open source style. You can read about it here.

If you haven’t read the Akka five-year time anniversary timeline, it’s a fun look back at recent history.

This photo is from an ESPN Magazine article about the Cubs and Red Sox stockpiling position players. The article ends with this quote: “Boston’s lineup is a joke,” a rival general manager told me, meaning that as a compliment, “and if you were picking a team to win multiple World Series in the immediate future, you’d pick the Cubs. They can be that good.”

FYI: The Latitude 62 in Talkeetna, Alaska is hiring. Hmm, I worked as a bartender during my college years... :)

I’ve been working on creating an Android football game lately. It still needs a lot of work, but this is what it looks like at the moment. The UI needs a lot of work, and I need to add more plays, but the basic functionality is there.