Tag: Mac

A Month with Mac Pro

I’ve now enjoyed my Mac Pro for over a month. Why did I decide on that computer, and how is it working out?

iMac

My late-2014 5K iMac was five years old: it still worked, but was increasingly limiting. The internal 500 GB SSD was too small, and even with the external 1 TB SSD I kept bumping into limits, wasting time cleaning out cruft. Ports were another issue: no USB-C ports, not enough ports in general, and I have yet to find a 100% reliable USB hub. The retina screen is still perfect, and my wife will likely get many more years out of this computer, but as a daily developer workhorse, it was getting long in the tooth.

I was sorely tempted to upgrade to an iMac Pro two years ago. However, while the current iMac Pro might be a great choice for many developers, for me it had a few drawbacks:

  • GPU not upgradable: I’d have to decide up front how much to invest in this rapidly evolving technology.
  • No way to drive the non-XDR 6K monitor that Apple is surely going to release any year now.
  • Ports not future proof: Thunderbolt 3 / USB-C will remain relevant for many years to come, but new standards will surely emerge in the next decade.

My apps

I’m a developer, not a video professional, so the case for a Mac Pro is not as clear-cut. My main work right now is on the all-new version of SmartGo, about 70k lines of Swift and growing. The shipping version of SmartGo for Windows is 166k lines of C++; SmartGo Kifu is a mix of C++, Objective-C, and Swift. So while there are other tasks that benefit from a multi-core CPU (e.g. running Go or Othello simulations overnight, or converting 140 Go books to ePub), speeding up Xcode builds is the main benefit.

Modern Go programs are based on neural nets, which benefit a lot from a powerful GPU. However, my current development focus is on user interface, not on stronger play, so with GPUs still improving rapidly, I want to delay investment in a powerful GPU until I really need it.

Specs

Basically, I maxed out SSD and CPU (within halfway reasonable budget constraints), and plan to upgrade memory and GPU as needed.

  • 3.2 GHz 16-core Xeon W, turbo boost to 4.4 GHz: Slightly slower than the 12-core, but turbo-boost speed is the same.
  • 48 GB RAM DDR4 ECC at 2933 MHz: I figured this would be plenty for a while, and so far memory has not been an issue.
  • 4 TB SSD: I don’t want to keep bumping against that limit.
  • Base GPU: More than powerful enough for what I need now.

In addition, the expandability of the Mac Pro may lead me to:

  • Add more ports: If I need more USB ports, or some other port comes along that is helpful, I can just add a card for that.
  • Add internal SSD: I currently have a 2 TB SSD hanging off the internal USB port (for nightly backups); when I need more, I can add a PCI card with extra SSD storage.
  • If/when Apple switches to ARM, it’s conceivable that Apple would create a card with an ARM processor for the Mac Pro.
  • The unknown: Having PCI Express card slots available keeps options open for the future.

I expect the Mac Pro to be reliable for many years, and if something goes wrong, it will be easier to repair than a computer crammed behind a large screen.

Monitor

I’m used to dual monitors: a 4K monitor next to the 5K iMac (a Dell P2415Q 24-inch 4K monitor, which is surprisingly good). I’d love a 6K monitor, but the 6K Pro XDR is not for me. The iMac is overdue for an SSD-only update and visual refresh, and at that point it would make a lot of sense to also release standalone screens in the same form factor. However, Apple’s timing is famously unpredictable, so I decided to go with the LG 5K for now to avoid being dependent on Apple’s plans. If they do release a 6K monitor for mere mortals, I’d be happy to replace the 4K by a 6K screen.

Performance

For developers, staying in the zone is crucial, and being able to reduce the build-run-debug cycle has really helped. Compared to my old iMac, build and run speed has improved by a factor of 2 to 3, and build times have become much more predictable. For my 70k lines of Swift, launching on an iOS device (connected by USB) after a small change takes 6-7 seconds, and a full build takes less than 30 seconds, more than good enough. I feel like I’ve gotten a lot more done this last month than in prior months.

Price

Yes, it was a very expensive machine, but I do expect to get at least 7 to 8 years out of it. (I got 7 good years out of my 2006 Mac Pro.) The 6% cash back when buying with the Apple Card before December 31 helped; also, if you’re in the market for a Mac Pro, make sure you talk to the business rep at your local Apple Store to see if you can get a discount.

Summary

A month in, the Mac Pro has been everything it was supposed to be: fast, reliable, silent, unflappable. It looks gorgeous, but I hardly even notice it – it just sits quietly below my desk helping me focus on my work.

Using Strong Go Programs on Macintosh

SmartGo for Mac is not playing strongly, as computer play is using my own pre-AlphaGo engine. However, like SmartGo for Windows, you can use GTP (Go Text Protocol) to connect to strong engines to play against.

The most recent version of SmartGo for Macintosh (0.8.18) includes some improvements in how it handles GTP engines. It’s not perfect, there’s much more to be done, but hopefully it will tide you over while I keep my focus on the new SmartGo for iOS.

The first step is downloading and installing the computer go engines you want to connect to. Here are three I’ve tested with SmartGo for Mac, from easy to hard to install. All assume that you’re somewhat comfortable using the Terminal app; check out this iMore guide if you’re new to the command line.

Pachi

The easiest way to install Pachi on the Mac is using Homebrew (which you probably have to install first). Follow these instructions:

https://brewinstall.org/Install-pachi-on-Mac-with-Brew/

Leela Zero

Find Leela Zero on Github, scroll down to I just want to play with Leela Zero right now, and follow the Homebrew instructions. You’ll also have to download a file with network weights; the link is in that same section.

KataGo

Installing KataGo is more complicated, as you have to compile it yourself. Follow the instructions for Linux at https://github.com/lightvector/KataGo.

smartgo-mac-gtp-preferences

Setting Parameters

Once you’ve installed an engine, you need to add it to SmartGo. Choose SmartGo > Preferences in the menu and click on GTP. Then click on the + icon and navigate to the executable of the engine you want to add. SmartGo uses the engine name to guess reasonable parameters, then tries to run the engine to get its name and version. If you see a green checkmark with the name and version, you’re all set. Otherwise, edit the parameters sent to the GTP engine (the third column in the table). The following basic settings work for my setup:

Leela Zero: -g –playouts 1000 –noponder -w /usr/local/Cellar/leela-zero/0.17/best-network/40b_257a_64k_q

KataGo: gtp -model /Users/anders/work/katago/cpp/models/model.txt.gz -config /Users/anders/work/katago/cpp/configs/gtp_example.cfg

Leela Zero and KataGo take a while to initialize, so even just getting name and version initially can take a minute, and SmartGo may time out. If it does, just try starting a game against the engine anyway (File > New Game, specify the engine in the dropdown for Black or White), and see if it works.

I hope these instructions get you pointed in the right direction. I’m sorry none of this is as easy as it should be.

WWDC 2019

I’ve been experiencing WWDC from home, watching videos, reading documentation, and experimenting with the new APIs. The changes introduced this year are very exciting – Apple is firing on all cylinders. Here are my main takeaways.

Mac Pro

My iMac is 4.5 years old, and I’m looking for a replacement I can keep for many years and expand as needed. The new Mac Pro is perfect. Except for price. Once available, I’ll have to evaluate whether a Mac Pro makes sense, or whether an iMac Pro (now looking much cheaper!) will work just as well for development.

The Pro Display XDR is gorgeous, but way overkill for what I need. I think chances are that the iMac is due for a design refresh soon, and at that point, I would expect Apple to release matching standalone monitors. While hoping and waiting for that, I can get a second Dell P2415Q 24” monitor (just $353 instead of $6000) to tide me over if I go with the Mac Pro.

UIKit on Mac

With Catalyst (a.k.a. Marzipan), Apple allows iPad apps to run on the Mac. I’ve already used it to run my new work-in-progress iOS SmartGo app on the Mac, and so far it looks like a good path forward. I hope to end up with a Mac version of SmartGo that is more capable and more complete than the current one, and that will be easy to keep up-to-date with the iOS version.

SwiftUI

SwiftUI was an amazing surprise, the culmination of years of work behind the scenes at Apple. It makes me very happy that I bet on Swift several years ago, first creating SmartOthello to learn Swift, and now rewriting SmartGo in Swift. I’ve been watching the SwiftUI videos and experimenting with it, and it’s a real game changer: with minimal code, it provides more of the features users expect, and a more native experience on the Mac, all while reducing errors, providing instant previews, and making development more fun. It’s win – win – win.

This WWDC really knocked it out of the park. I’m very excited – so much to learn. Thank you, Apple.

SmartGo for Macintosh

It’s been a long road. But today you can download an early beta version of SmartGo for Macintosh.

I know a lot of you doubted this day would ever come. I’ve been promising a Mac version since practically forever, and it kept not happening. Sorry about that. Some history is in order.

Smart Go Board for the Macintosh was released in 1987, with frequent updates until I joined Microsoft in 1991, where I worked on PowerPoint until 1999. SmartGo for Windows was released in 2002; Windows Vista finally pushed me over the edge and I switched back to the Mac in 2007.

So in early 2008 I had made good progress on the Mac version, but was running into issues with the cross-platform approach I had started with (using wxWidgets). When Apple announced the iPhone SDK, it seemed like a great way to gain experience with Objective-C development before getting back to building a fully native Mac version. I knew I wanted thousands of pro games in my pocket, and figured other Go players would too; I had no clue it was going to take off as it did.

So in 2009 I added computer play, and more games, and then had some time to work on the Mac version again. And what does Apple do in 2010? They announce the iPad. SmartGo Kifu was born, available on day one. A big success, but that first iPad version demanded a lot of rethinking and refinement.

The iPad also inspired a new way to visualize annotated games: book view. That gave me this crazy idea of putting Go books on the iPad. Basically, I wanted to read “Invincible” on the iPad; I had no clue that a few years later I would end up with a new file format and 100 Go books. (And no time to work on the Mac version.)

Turned out it made sense to split off Go Books for the Mac as a separate app, and that actually shipped a few months ago. Which finally left some time to make significant progress on SmartGo for Macintosh.

So is the Mac version done yet? No. But it has gotten to the point where it’s useful to me. Getting it to a 1.0 release will take time, as there are many big and lots of small issues to work on, and I still need to keep updating the iOS versions as well as Go Books. Meanwhile, I want to give you the opportunity to use what I have so far.

As promised, the Mac version is free if you already own the Windows version. The two platforms are bundled: buy one, get both. So if you’re already using SmartGo for Windows, and now have access to a Mac, just download the Mac version and start using it. (If your email has changed, let me know.) If you’re new to SmartGo, take the 15-day free trial for a spin.

The Mac version inherits the GoGoD game collection and the problem collection from SmartGo for Windows and SmartGo Kifu. It inherits the tree view and joseki matching from SmartGo Kifu. It adds built-in access to Kogo’s Joseki Dictionary. However, there are still significant holes; for example, there’s not even a way to edit game info yet. Over time, those holes will be filled, and more of the advanced functions from the Windows version will make their way to the Mac. (Some, like playing on IGS, will remain Windows-only.)

It’s still a long road ahead. But now you can join me for the rest of the journey.

Another Step for Go Books

You can now buy Go books and read them on your Mac; another step towards making Go Books available on multiple platforms (an Android version is in development). However, the corresponding iOS app has not been released yet, so books you’ve bought on your iPad won’t show up on your Mac yet. Click here for more details.

I’m still working to get all the publishers onboard with selling books outside of the iOS app; I’m still waiting for final approval from Kiseido, Yutopian, and Good Move Press. Until then, those books will only be available on iOS.

As always, please let me know if you run into any questions or issues.

Update 2014-11-19: Kiseido has agreed to extend digital books beyond iOS.

Update 2014-12-21: Good Move Press is in, so you can now buy the five books in the Learn to Play Go series for the Mac.

Update 2014-12-30: Add Yutopian, which means all books are now available on the Mac.