An interesting way to leak memory with Go slices

Today I was watching Prashant Varanasi's Go release party talk Analyzing production using Flamegraphs , and starting ataround 28 minutes in the talk he covered an interesting and trickymemory leak involving slices. For my own edification, I'm going towrite down a version of the memory leak here and describe why ithappens.

To start with, the rule of memory leaks in garbage collected languageslike Go is that you leak memory by retaining unexpected referencesto things . The garbage collector will find and free things foryou


JavaScript as the extension language of the future

One of the things I've been noticing as I vaguely and casually keepup with technology news is that JavaScript seems to be showing upmore and more as an extension language, especially in heavy-usageenvironments. The most recent example is Cloudflare Workers , butthere are plenty of other places that support it, such as AWSLambda .One of the reasons for picking JavaScript here is adequatelysummarized by Cloudflare:

After looking at many possibilities, we settled on the most ubiquitouslanguage on the web today: JavaScript.


Thinking about whether I'll upgrade my next PC partway through its life

There are some people who routinely upgrade PC components throughthe life of their (desktop) machine, changing out CPUs, memory,graphics cards, and close to every component (sometimes even themotherboard). I've never been one of those people; for variousreasons my PCs have been essentially static once I bought them. I'm in the process of planning a new home and work PC, and this time around I'mconsidering deliberately planning for some degree of a midway upgrade.Given that I


I'm trying out smooth scrolling in my browsers

When I started out using web browsers, there was no such thing asbrowser smooth scrolling; graphics performance was sufficientlypoor that the idea would have been absurd. When you tapped thespacebar, the browser page jumped, and that was that. When graphicssped up and browsers started taking advantage of it, not only wasI very used to my jump scrolling but I was running on Linux (andon old hardware), so the smooth scrolling I got did not exactlyfeel very nice to me. The upshot was


Spam issues need to be considered from the start

A number of Google's issues from the spammer I talked aboutyesterday come down to issuesof product design, where Google's design decisions opened them upto being used by a spammer. I considered these issues mistakes,because they fundamentally enable spammers, but I suspect thatGoogle would say that they are not, and any spam problems they causeshould get cleaned up by Google's overall anti-spam and systemsthat watch for warning signs and take action. Well, we've alreadyseen how that


Google is objectively running a spammer mailing list service

If you are a mailing list service provider, there are a number ofthings that you need to do, things that fall under not so much bestpractices as self defense. My little list is:

  • You shouldn't allow random people you don't know and haven't carefullyauthenticated to set up mailing lists that you'll send out for them.
  • If you do let such people set up mailing lists, you should requirethat all email addresses added to them be explicitly confirmed withthe usual two step

My new worry about Firefox 56 and the addons that I care about

In light of Firefox 57 and the state of old addons , where my old addons don't work in FirefoxNightly (or didn't half a month ago), my plan is to use Firefox 56for as long as possible. By 'as long as possible', I mean wellbeyond when Firefox 56 is officially supported; I hope to keep usingit until it actively breaks or is too alarmingly insecure for me.Using an actual released version of Firefox instead of a developmentversion is


Some thoughts on having both Python 2 and 3 programs

Earlier, I wrote about my qualms about using Python 3 in (work)projects in light of the extra burden it mightput on my co-workers if they had to work on the code. One possibleanswer here is that it's possible both to use Python 3 features inPython 2 and to write code that naturally runs unmodified under bothversions (as I did without explicitly trying to). This is true, butthere's a catch and that catch matters in this situation.

The compatibility between


My experience with using Fedora 26's standard font rendering (and fonts)

A bit over a month ago I wrote about my font rendering dilemmain Fedora 26 , where my fontconfig user tweaksbasically stopped working and I considered switching to the standardFreeType rendering rather than try to fix them. Leah Neukirchen solved one side of the dilemma for meon the spot in the comments, by telling me how to force FreeTypeto revert to my Fedora 25 rendering, but in the end I decided tostay with the standard system rendering as an experiment. At thispoint I consider the results of


The origin of POSIX as I learned the story (or mythology)

I recently wound up rereading JeremyAllison's A Tale of Two Standards (via Everything you never wanted to know about file locking ), which tells an origin storyfor the POSIX standard for Unix where it was driven by ISVs wanting a common 'Unix' API that they could write their productsto so they'd be portable across all the various Unix versions. It'squite likely that this origin story is accurate, and certainly thedivergence in Unixes irritated ISVs (and everyone else) at the time.