Fixing Hugo JSON-LD

Just after I fixed other problems, the latest Hugo static site generator broke my JSON-LD data. Here’s the code that worked before, and the output as of 0.58.3:

"@context": "https://schema.org/",
"url": "{{ .Site.Params.Logo | absURL }}"
==> "@context": "https://schema.org/",
==> "url": "https:\/\/rubenerd.com\/logo.png"

The first URL was fine, but the second was having its forward-slashes escaped for some reason. No combination of {{ safeURL }}, {{ printf }}, or even horrid brute-force {{ replace }} statements could rid me of them. I suspected it had something to do with the first URL being hardcoded, and the second being the output from a function… but why should that matter?

When I put the function in a separate part of the file, it didn’t inject the escapes. So I removed the quotes for gits and shiggles, and it works:

"url": {{ .Site.Params.Logo | absURL }}
==> "url": "https://rubenerd.com/logo.png"

So hardcoded URLs within quotes aren’t escaped, but any function that returns a URL within quotes is. When before they didn’t. Perhaps Hugo is detecting it’s in a JS code block, and helpfully adding quotes. But it breaks any behavior that relied on it not doing this before.

Hugo has been changing behavior like this a lot. Their release notes are usually pretty good at detailing changes, and they do point out it’s not at a point one release yet. But it’s lack of stability and backwards compatibility is beginning to wear thin.

I have been preparing a more permanent change that will address the core issue here though, but that’s for another Perlier or Rustier post.


Cisco’s internal network issues

I saw this Cisco tweet via Zack Whittaker on TechCrunch for TechCrunch:

We’re aware of some disruption to our IT systems and we’re working on restoring them as a top priority. Thank you for your patience as we resolve this.

Surprisingly, it only solicited a single tweet asking if they’d tried turning it off and on again. I’d never be caught repeating the same joke over and over again; as opposed to repeating the same joke but not over again? How would that work? I need to stop airing my internal monologue here. Except this isn’t a podcast episode, so it’s more like writing my internal monologue. Have you ever noticed monologue sounds similar to mongoose, until the part of the word where it doesn’t? Same thing with monospaced, an attribute for which this paragraph does not harbour. Can you harbour attributes? Would that only work if it were a boat?

I feel for people when this happens. It’s bad enough that their internal network went down, but now you have the added pressure from the public, journalists, and shareholders given you’re a network company.

There will be at least one sleepless night for some engineers. If you know them, maybe buy them a beer or a cup of tea.


iPhone typing accuracy declines

I’m back to the morning commute again in Sydney. The air is cool and crisp, the sky is a deep blue, I slept well, life is good. So what better thing to get into the swing of things than Back to Work:

Merlin: The iPhone and me [since 2008] had become pretty good friends at typing. Dan Benjamin, I don’t know what happened, but in the last three or four years one of us has lost it. I’m reluctant to blame it on the hardware or the phone software, but what I can tell you is things that are produced by me typing on an iPhone are not nearly as accurate or fast as they used to be.

Dan: Totally agree, and I don’t know what it is. 100% agree … I don’t know what’s dropped.

I’ve been using an iPhone as my primary portable device since the 3G, and I can confirm the same behavior. This confounds me for three reasons:

  1. Our phones are computationally faster than they were before, and algorithms must be more sophisticated. So theoretically, they should be quicker at predicting our text, and can be trained more effectively against our typing patterns.

  2. Our phones are larger in physical size and resolution, so we have more space to type than we did before. Aka, fewer typos from inadvertent or accidental presses of adjacent keys.

  3. We’ve been using these phones for a longer amount of time, so we should be more used to typing on them.

I’d wager this was introduced in my iPhone 8. The iPhone 6 I used before was the same physical dimensions, but I was more accurate. Then again, I was slower but far more accurate on my Palms than I ever was on an iPhone.

I think point three above comes closest to possibly explaining why. Apple may have improved the hardware and predictive software of their keyboards, but if its changed even 5% of how it works, existing users are thrown and the accuracy drops.

I’m in the same boat as Merlin, though I hadn’t recognised the behavior. I used to type tons of email on my phone, usually on my morning commute. I barely do it anymore, in part because I’ve been trying to strike a better home/work balance, but also because it crossed a frustration threshold recently. Unless something is critically urgent, I’d simply prefer to wait till I’m at a physical keyboard.

This is worthy of a much deeper discussion on the interaction between learned behaviour in humans, ergonomics, and machine affordances. Maybe our hardware is becoming too smart for its our own good, when the simpler system we had before worked better.


That Fate/Grand Order fragment from 2004

I’ve been taking time during this travelling to write, explore, and perhaps catch up on Fate/Grand Order. I’m stoked to have Tohsaka Rin’s nostalgic uniform as a Mystic Code for many reasons, not least because I think I look rather fetching:

Screenshot showing my Master wearing Tohsaka Rin's uniform as a mystic code.

Yes I play as the female master, as previously mentioned. It still throws me sometimes when I read the story dialogue and I’m referred to as she and her. But I’ll take any compliments in my clearly brilliant abilities in any form they so wish to express.

Perhaps the biggest surprise from the most recent event was seeing Medusa wearing the uniform as a plot device. I appreciate they pay homage to the earlier Fate installments for their old school fans.

Medusa in the same uniform, sauing 'This is... well, this was nor part of the plan.

I feel that dialogue could describe 2019 so far.

Anime

#SG19 Singapore Botanic Garden coffee

Stereotypical view of my laptop and a cup of coffee, with the visitor centre for the Singapore Botanic Gardens in the background, with plenty of trees and scenic stuff.

You’ve all been very patient with my laptop coffee shop travels over the last few weeks, so as a reward consider this the last for this trip. I’m at one of my favourite places to work in the whole world: Case Verde in the Singapore Botanic Gardens. The sounds of the fountains and birds are rather lovely.

Clara and I will be heading back to Sydney in the next few days. It’s weird, I don’t feel like I’ve been on holiday; more like I just picked up life where I left off. Australia is nice, but at the risk of contradicting that Peter Allen song made famous by Qantas, it’s not home.

Travel

#SG19 Back to Sim Lim Square one last time

Just before Clara and I went up to Kuala Lumpur to explore Plaza Imbi—among other places!—we made one final trip to Sim Lim Square. I heard the rumors that the complex is being on block sold, so we took the chance to have a goodbye wander and take pictures. I’m sensing a trend here.

As I said on The Instagrams, I couldn’t tell you how much of my childhood was spent in this building when I was growing up here. But it would have easily been a few hours a week, if not more. As late as 2007 here I was blogging about going there.

View outside of Sim Lim Square.

Along with the late former Funan Centre, SLS was the place everyone in Singapore went to get computers and electronics. Before building PCs became the exclusive purview of gamers and enthusiasts; when it made financial sense to build your own machine rather than buy complete systems or expensive laptops; SLS was full of parts stores. In its heyday in the 1990s and early 2000s, I felt as though I was on the floor of the New York Stock exchange with the shouting, crowds, and laser-printed price lists.

In its less-reputable days, one could also find pirate software and movie stalls among the legitimate stores. I vividly remember on more than one occasion as a child wandering the centre with my dad, and hearing loud shouts about police coming. I’m not sure if they were tipped off, or they just had lookouts, but no sooner as they could shuffle all their customers out, the whole complex was ringing with the clattering of metal shutters being rolled down and locked. I was a relatively sheltered child, so at the time it startled me no end!

View inside Sim Lim Square, looking down from the top floor towards the concourse, with escalators.

I owe a lot to Sim Lim Square for my personal development and career. I got my first and only IT related retail job within its walls. I built my second, third, and fourth computer there. The machine I first installed a BSD operating system on came from there. At one point I was building computers for friends, then it expanded into me doing it for money for other expat parents. And whereas I hung out at Funan Center and bought most of the peripherals and monitors there, SLS was where everything else came from; to the point where several of the stall owners knew my name and could often predict what I was coming for.

But the writing was on the wall even by the time I came to Singapore in 2014. Cybermind and Skylet were long gone, along with the second hand computer store in one of the back corridors on level three where I used to talk to the auntie for hours. Some of the camera stores were still there, but had shrunk their footprints. At least Video-Pro was still around!

View of the Video-Pro store with price lists.

What was heartening was seeing a larger crowd and more open stores than there were last time; fewer people than the early 2000s, but a respectable crowd. I managed to find a replacement retractable Ethernet cable for my daily carry kit, and a few other bits and pieces. This is what SLS was great for; back in Australia I can buy the same parts online and wait two weeks for shipping, but it’s all right there. And I’ll miss that.

Maybe the block won’t be sold, and SLS will keep being the place people go to for parts in the future. Maybe it’ll have its soul gutted and replaced with superficial, authentically-agile space as what happened with Funan. But I wouldn’t be surprised to see a new building in its place next time we come up, complete with all the generic, cookie cutter stores that are everywhere else. But it’ll be hip, trendy, and modern!

I suppose we’ll always have Den Den Town and Akihabara.

Travel

#KL19 A Berjaya Times Square Starbucks lounge

I’m more of a Coffee Bean and Tea Leaf guy, but I always loved coming to the Starbucks in Berjaya Times Square, this massive shopping centre in Kuala Lumpur that among other attractions sports an indoor roller coaster. The shopping centre, not the Starbucks.

But the lack of a roller coaster doesn’t detract from the majesty of this place. It’s one of the only split-level Starbucks outlets I’ve ever been to, with a second floor seating area that puts some airport lounges I’ve been in to shame. The lighting is subtle, the seats are comfortable, and you feel like you’re walking up Titanic’s grand staircase to get to it.

Coming back here now after a decade, it’s now a Starbucks Reserve outlet, so it’s even more plush. The nitro coldbrew coffee is decently satisfying in a Guinness way, but the mistake coffee hipsters make is thinking Starbucks is a coffee shop; it’s a lounge and relaxing respite from the bustle and heat that you rent by buying coffee. And this is one of the better ones in Kuala Lumpur.

I wish I made notes of where earlier Rubenerd blog posts were written from; I’m sure many of the posts from 2007 were from this one spot. As were many of my earliest FreeBSD VMs, but that’s for another post.

Travel

A terrifying Fate/Grand Order Parvati smile

I’ve had some time to catch up on Fate/Grand Order on coaches and trains over the last couple of days; not much blogging, but we’ll get back to that. Her innocently scary respose to Mashu’s question made me chuckle.

Parvati: Compared to what happens when I'm REALLY angry, that was just the tip of the iceberg.
Mashu: Um, are you trying to say that your REAL anger is even more intense than what we just saw?
Parvati: GRIN!

Anime

#KL19 Iomega in 2019 Plaza Imbi

Kuala Lumpur has surprised me; in the intervening decade since we lived here it’s developed a lot. It has a couple new MRT lines, there are many more buildings dotting the landscape I didn’t recognise, and mobile internet blackspots are gone.

And then Clara and I went to Plaza Imbi, and reality set in a bit. It used to be KL’s answer to Funan Centre and Sim Lim Square in Singapore, where you’d buy and discuss computer parts, and could lose a day just wandering all the interesting electronics stores. I remember coming up here from Singapore with my dad during the Malaysian Grand Prix, and exploring the stores. It was a father-son bonding thing I appreciated back then, and remember fondly now.

The intervening decade hasn’t been kind to it. The façade is falling off, the centre is grimy and dark, half the shops are boarded up and gone, and the escalators don’t even run. Of the few remaining shops, most are second-hand stores selling badly worn laptops. I feel for the shopkeepers desperate to reel me in to get any sale at all, but it’s not an environment I enjoyed.

As an Iomega nostalgia aficionado though, I was delighted to still see those Jaz and Zip drop-tile ceiling adverts still there after all these years. They used to light up; no longer. Which is Plaza Imbi in a nutshell now.

I lamented the fact Funan Centre was gutted and refurbished into something unrecognisable, and Sim Lim Square was being sold and demolished soon. But now I’m realising perhaps those outcomes are better than seeing them decay. If I had tons of money, I’d clean up places like this and run them like cooperatives, where all the shop owners inherit a piece of the place, or only pay rent to cover costs. That way we keep some of these pockets of independent retail in a sea of generic, homogeneous buildings selling the same stuff.

But maybe that’s why I’m not a property developer!

Travel

#KL19 Seeing Kuala Lumpur from Menara KL

Before the Petronas Twin Towers, the tallest building in KL was the 421 metre Menara KL (KL Tower). I went there as a kid back in 1997, but a lot had changed since, and Clara and I have since developed a touristy obsession with observation decks.

The remaining yearly haze from the Indonesian forest fires was still lingering in the sky a bit, which you can tell from the photos. But otherwise the view was amazing. This was the view of KLCC from the open-air Sky Deck:

There’s a tiny cafe on the top floor, with what’s probably the most expensive coffee we’ve ever bought! But the view was worth it, just as it was back in Hong Kong.

You can get a few different shuttle buses up there, but Clara and I walked down Jalan P Ramlee from KLCC, then up Jalan Puncak. It was maybe half an hour or so, then maybe fifteen minutes to get back to the monorail line to head to Lot 10 and Berjaya Times Square where I’m typing this now!

Travel