Ruby on Apple Silicon
Posted on
I’ve been using Homebrew on Apple Silicon for a few weeks now and it’s been working well.
With Ruby 3.0.0, I haven’t had any issues installing it with rbenv. Today, I needed to install an older version and had some trouble getting it. Here’s what I did to figure it out. (This assumes your Homebrews are setup like I described in my post.)
First, install rbenv with your native Homebrew:
2020
Posted on
What a year. Besides the global pandemic, police brutality, and a very stressful election, a lot happened for me personally this year. I’m really thankful that I have a job and my health.
I went scuba diving in the Philippines. It was really amazing. I took some photos I’m really proud of. Maybe I’ll post them some time. (I’ve been saying I’ll post them “next week“ all year. Hah.)
I remember hearing about this COVID-19 thing on the news and not being sure if I should worry about it. When I was reentering the US, seeing the US border folks wearing masks made me worry a bit. I had to sign something promising that I hadn’t been to China. So crazy.
Homebrew on Apple Silicon
Posted on
Today, my new 13-inch MacBook Pro arrived! I was super excited to get it out of the box and set it up. This thing is fast! I am already very impressed. When I started setting up my development environment, things started to get a little frustrating. Have no fear, it’s solvable!
The biggest issue for me was Homebrew. According to this issue “There won’t be any support for native ARM Homebrew installations for months to come.” No big deal though. Homebrew can work just fine with Rosetta 2 and some things work natively.
Rosetta 2 is Apple’s translation layer. This lets you run Intel things with a little overhead. In Terminal, you can run any process with Rosetta by prefixing it with arch -x86_64.
Debugging JSON Data in LLDB
Posted on
Recently, I added a snippet to my ~/.lldbinit for an easy way to print JSON in LLDB. It has saved me a ton of time, so I thought it was worth explaining.
Here’s the snippet:
command regex json 's/(.+)/expr let input = %1; print(String(data: try! JSONSerialization.data(withJSONObject: (input is String ? try! JSONSerialization.jsonObject(with: (input as! String).data(using: .utf8)!, options: []) : (input is Data ? (try! JSONSerialization.jsonObject(with: input as! Data, options: [])) : input as! Any)), options: [.prettyPrinted]), encoding: .utf8)!)/'
Thirty-One
Posted on
Today, I’m 31 years old. Crazy.
That seems like such an old age. I remember thinking when I was 22 that I better get everything done by the time I’m 30 since my career or whatever will be over then. Hah, such a kid.
Last year, I wrote this: