Remember when Twitter inexplicably started hiding links to people’s blogs and refused to enter into any correspondence about it? mobile.twitter.com/MilesMcBa…

Your followers aren’t yours. This is their house. You just live here.

How I got utteranc.es working on my rmarkdown distill blog

What is utteranc.es?

I frist saw these on Nick Tierney’s site.

The premise: What if your blog comment threads were just GitHub issue threads on your blog source repo? What if they were syncronised between Github and the footer of the your blog posts? Neat idea hey? You keep control of your data (relatively speaking) and there’s one less site to data mine and track your readers - yes this is a thing in Disqus. Booouuurrrnnns.

How did I get it working?

I didn’t. I fought and fought for some hours with the grid CSS in the Distill template and no matter what I tried my comments iframe always had 0 height. Then I had a big whinge to my colleague Anthony North who defied the grid using a html include with a javascipt payload that injects the Utterances iframe into the end of the article. Very hacky and very cool.

Here’s the HTML file which shouldn’t be too difficult to adapt to your own distill site if you have one.

You need to refer to it in your _site.yaml like:

output:
  distill::distill_article:
    css: mmstyle.css
    includes:
      in_header: utterances.html

Recover is the apex R debugging method.

I just debugged a ‘non-numeric argument error’ being thrown by this beastie in under 5 minutes with #rstats’ options(error = recover).

A strength of recover over other methods for stuff like this is that all 4(!) loop indices will be set to the values they were on failure. Chef’s kiss

IMHO, contrary to Jenny Bryan’s ranking in her incredible object of type closure is not subsettable talk, this makes recover the apex R debugging method.

Error turned about to be from line 12 due to sticky sf geometry btw. 🥳

edit: I accidentally wrote recover = TRUE when I first posted this, a typo I often make due to wishful thinking perhaps.

Phwarh. Very tidy VSpaceCode. #rstats

I’m experimenting with using a micro blog syndicated to Twitter for my status type posts, part of my latest efforts to turn Twitter into a less noisy social network. micro.blog

Spacemacs for the rest of us

Despite the joy it brings me I’ve always balked at recommending Spacemacs + ESS as a dev environment for #rstats due to the brutal learning curve. However yesterday, thanks to Jack of Some’s Youtube channel, I discovered there is a reasonably faithful port of Spacemacs to VSCode. It’s called VSpaceCode and it’s completely compatible with the R extension!

I gave it a blast today and work and it screams on Windows compared to the Emacs version. The responsiveness just can’t be un-felt, and will definitely be addictive. There’s even a built in port of magit that was again super slick compared to the slowness of the Emacs native version.

Interestingly, I have noticed the situation is reversed on my personal laptop running linux, where there seem to be a few performance glitches in VSCode. There’s still no one editor to rule them all it seems - But it feels like a similar enough experience that I could be productive using the faster one on each platform. We’ll see as I rack up more time with VSpaceCode.