Git Forensics

Earlier today I was helping a coworker with a question about data related to block messages on mobile, like this: Lol. pic.twitter.com/2ebvab83f3 — Katherine Maher (@krmaher) October 20, 2018 I did not anticipate my investigation to become what I might best describe as “git forensics”. First, let’s introduce our dramatis personae: MobileFrontend When you browse the mobile (“m.” subdomain) version of Wikipedia in a browser, what you see rendered is largely due to the MobileFrontend extension for MediaWiki (the software that powers Wikipedia, Wikimedia Commons, and Wikimedia projects).

Using R to help my wife manage Sims screenshots

I grew up with The Sims and remember spending what is probably hundreds of hours of my childhood with that game, so it was a special feeling to share that with my wife and introduce her to The Sims 3 a few years ago. Coming from Animal Crossing: Happy Home Designer, the expanded toolset for interior design (AND addition of architecture tools) hooked her, but she wasn’t that into the non-building part of playing The Sims.

Replacing the knitr engine for Stan

2020-08-03 UPDATE: Good news! A version of this engine is now included in versions 0.1.1 and later of {CmdStanR}. Use cmdstanr::register_knitr_engine() at the top of the R Markdown document to register it as the engine for stan chunks. See the vignette R Markdown CmdStan Engine for examples. Shoutout to the maintainers Jonah Gabry & Rok Češnovar for a super positive code review experience with the pull request for this. I originally dabbled with custom {knitr} engine creation last month, when I made {dotnet} which enables R Markdown users to write chunks with C# and F# programs in them.

Introducing ‘dotnet’ knitr engine for C# & F# chunks in R Markdown

I had a thought “wouldn’t it be cool to do a blog post about Bayesian inference with Infer.NET?” and then a follow-up thought “wouldn’t it be even cooler to have the probabilistic programs as R Markdown chunks that would be actually built/compiled and then run/executed just like Python and Julia chunks would be?” And that’s how I ended up spending an evening learning how to make custom language engines for {knitr} and making one for C# and F# languages.

Strings in R 4.x vs 3.x (and earlier)

Among the several user-facing changes listed in R 4.0.0’s release notes was this point: There is a new syntax for specifying raw character constants similar to the one used in C++: r"(…)" with … any character sequence not containing the sequence )". This makes it easier to write strings that contain backslashes or both single and double quotes. For more details see ?Quotes. To get a better sense of this (wonderful) feature addition, I thought it’d be useful to see some before/after examples.