Asymptomatic

There must be intelligent life down here

About the Site

Hi! I'm Owen Winkler, and I write this drivel. This blog is about my own life and my random observations thereof. Sometimes I write about technical stuff here, but mostly that's at RedAlt. Please enjoy, or if not, click on my ads. Either is fine with me.

April 11, 2020 12:00am

New Theme

Well, the new theme is not done yet, but it’s up.

When I updated the site to remove Phoenix and use only Plug and Cowboy, I inadvertently broke the pagination. When I started fixing this problem, I noticed that I was calling a function with three parameters, but the first parameter contained the value of the third. I was essentially doing this:

render(conn, foo, conn.assigns)

This was not ideal because of the way Elixir pipes the first parameter around. I could pipe a lot of stuff into the first parameter, but if I changed anything in the assigns map, it wouldn’t carry into the call when I used it independently.

So I changed all that.

The side effect of that is that all of my templates were calling an older version of this function that didn’t pass Conn around, and it made the old templates break. I changed them in the active version of my theme, but of course, that’s the new theme, not the one used on the site.

So when I deployed the updated core software, the theme had bugs due to this incompatibility. The lazy fix was just to throw the in-progress theme up. And so there you have it.