Avocadia

15th January 2019

🔖 Aztec Moral Philosophy

10th January 2019

🔖 the Origins of Opera and the Future of Programming

How the originators of opera might inform inform how we might work better in our own modern times.

🔖 Symmathecist (n) – Jessica Kerr

self culture work

4th January 2019

🔖 Being Careful About Your Time

🔖 Cate Huston on Management

Progress on my micro publishing setup - bookmarks are now being synced to Pinboard. Next step should be notes.

4th March 2018

2018-03-04

Mute

They’re saying Charlie Brooker has announced that all Black Mirror episodes take place in a shared world. That doesn’t annoy or frustrate me, I can’t quite get agitated about it. But it leaves me a fraction more exhausted. Fandom exhausts me with its neediness, like a dog constantly going back to the bowl between meals just in case something it missed materialises. So I could have done without the scene tying Mute to Moon, but all in all I recognise that it could have been much more contrived. Its pretty good but definitely flawed. Skarsgard is really good; Rudd was ok. I don’t know how I feel about a constant stream of all-male casts in movies revolving around the murdered woman. Whatever I feel, winking at the women-in-fridge trope was on the nose. And yeah, why the Moon connection? Did they not trust that Duncan Jones would have enough reputation to bring an audience? I preferred Moon but I think the critical reaction is harsh.

The Culture

Speaking of fandom, I don’t believe Amazon, a rapacious capitalist organisation set on exploiting every aspect of humanity and sucking the human community dry to get a few more dollars into the pockets of a oligarchic few


I don’t believe that kind of vampire squid can possibly produce an adaption of The Culture books that doesn’t end up being basically Star Trek,

So despite being leery of the news that , the vampire squid will be creating Star Trek by another name, I started reading the books again. I skipped Consider Phlebas but remembered why I liked Player of Games so much. I’d forgotten most of Use of Weapons, and I just stumbled across a detail in Excession I had never noticed before, so that’s nice.

My Teen Diary

Not quite my teen diary, but D had a joke about me finding and restoring the 2002-2006 version of this blog.

What I found was, hidden away in a folder, a zip pf the code from my blog engine. It was the first project of any size I created for myself. And the database is still siting out on my host, so I just took a snapshot and restored everything on my laptop. It was all broken, but getting it up and running again was a lot easier than I had anticipated - wasn’t the weekend long project I thought it would be, it was all over on Friday night.

Yeah, baby. Friday night spent fixing 16 year old PHP code to make it work in v7. Rock on đŸ€˜!

Anyway, not a single character of the content will see the light of day. The worst bit was being reminded what I thought of Mark Latham. Ugh!

Scratch

However, I have been writing things in PHP again. Partially because I am reacting to Contempt Culture but I was also intrigued by another blog post, Stop writing PHP like it’s 2009
 – Florian’s Blog. I can’t say that I am completely living up to that call to action - because I was also inspired by Gary Bernhardt to start writing a web framework from scratch. I was writing a simple reference site to test out the framework I created. I will still finish that, but I think I will try and re-build my old blog in this new framework. Because why not?

4th February 2018

Post for 2018-02-04

This would probably work better if I wrote daily. Probably beyond my limitations.

Altered Carbon

I am seven episodes into the show, so it’s clearly doing something right.

I really enjoyed the book. This is more or less the spirit of the book while not being a straight retread of the story. My favourite parts of the books were always the Quellisms, Falconer appeals to that part of me that is pretty sure I’m not a communist but is angry enough about our variably distributed crapsack world to idly dream about revolution. So I was happy they managed to get Quellcrist into the show.


North Sydney

I no longer work in North Sydney. The product I work on was sold to another company, and they moved the team into new office space. I’m not a fan of North Sydney. I believe I will be adding to my list of Jobs I Don’t Want “Anything north of the bridge.”

New laptops

Part of the move was replacing our aging (5ish years old) desktop computers with new laptops. While I was setting up the laptop, I was musing


New laptops for everyone in the team today. As I download and install all of the tools I use, I am wondering why software engineers expect employers to provide tools. Why don’t we have our own that meet our specific needs?

New Laptops

It’s a thought that makes more sense for freelancers, I expect, and particularly those in the open source space. For employees working with the dotnet stack, providing my own copies of something like Visual Studio would be a hell of cost.

I tried to work out what it would look like for my employer to just provide a pre-baked VM with the required tools, an I could just run that on my own laptop. That might work. EC2 instances with the toolset that the company needs to provide for me to do my job probably works out more costly than the laptops.

I stopped thinking about it when I realised there really isn’t a reason for me to even be using the costly full-on professional version of Visual Studio. The free version is actually all I really need.

Shhh, don’t tell the people shelling out thousands on me and my team.


(Why does my dog like to lick the soles of my feet? What’s in it for her?)

25th January 2018

A palette cleanser

Lots of my friends are trying to re-focus on blogging this year. Ok. One of my friends.

She says recommendations are an easy win. She has certainly done some of that. Recommended a game that came chillingly close to eating my life. Thanks for that, Kris.

One of the things I wanted to get out of last year was finishing things. One of those things was going to be a tool for writing, storing, and publishing my reactions (“review” seems like too strong a word for what I write) to things I read, watch, and listen to. It didn’t get finished, I kind of got sidetracked by also trying to build a web site framework, as a way of relearning PHP. If it had, it would have been the perfect tool for creating a blog post of recommendations.

On a side track, Gary Bernhardt did a live coding session on Twitch earlier this week, Build a web app and framework from scratch, and I have been inspired to take another run at that PHP framework again. I had to stop watching that video so that I didn’t just re-implement his own thing.

Anyway.

I can’t do a full on media diet post like Kottke. I never did write down most of what I thought about the thing I was consuming. Maybe a lot of it just ended up making no real impression on me. Like, Game of Thrones and The Magicians show. They’re ok in the moment, but they’re pretty and empty. About the only albums I really remember were from Halsey, Lorde, and Cherry Glazer. Surely there were more albums I listened to and cared about , even if only in the moment?

I apparently didn’t read much either if you go off Goodreads; pretty sure I didn’t even rate let alone review about half a dozen books. Latest entries in Laundry Files series, The Expanse, and from Max Gladstone were welcome. I really need to re-read the last. I also need to re read Total Propaganda: Basic Marxist Brainwashing for the Angry and the Young by Helen Razer because I just didn’t grasp finer points. October: The Story of the Russian Revolution by China MiĂ©ville was great. Pretty sure I’m not a proper communist but quite certain I’m not even a little bit here for late stage capitalism.

I enjoyed the hell out of two shows, The Americans and Halt and Catch Fire. The slower season of The Americans wasn’t too popular, but I thought it was fantastic. It could go a few ways in the final season and I’m hoping for something blemish, because apparently that’s my thing. It can’t be completely my thing though because Donna and Cameron becoming friends again was the Best Thing of 2017 and made me cry.

9th December 2016

Random Mrandelbot

Cover of Oh! Pascal! Turbo Pascal 6.0, by Doug Cooper

The text book for my CS101 class at the University of Queensland (1). Within this textbook was a problem set that started with rendering the Mandelbrot set, and then delved into Julia Set variants, and assorted fripperies hanging off the sides. It probably wasn’t the first time I had encountered the Mandelbrot Set render - that would have been a science show on Chaos Theory, of all things - but it stuck with me for years. Every now and then I would go back and build something to render it.

I mean, it’s not like it is a particularly difficult algorithm.

@randommandelbot is a twitter bot I wrote in early 2016. The bot randomly generates a rendering of the Mandelbrot set. A centre point on the real and imaginary axis is generated and a zoom level. If the result passes a rudimentary boringness filter, it is added to a queue and eventually tweeted. Most do not pass the boringness filter. They are zooms into a zone with no variation, either in the main bulbs or out near the edges of the set. The best images are found very close to the event horizon. So how to find them?

I took a really naive approach at first with a crude histogram. I had a tool that scanned the entire image and summed the total red, green, and blue values for each pixel, clumped into 16 rows. It was kind of effective although albeit allowing some very marginal renders through.

A very boring render of the mandelbrot set

Because while to me it is boring, to my crude filter it is good enough.

Output of a histogram of the previous image

I then moved onto using the identify -verbose tool that comes with imagemagick which seemed like it would be a better choice. Why wouldn’t it be, it wasn’t a crude tool I smashed out like a Stone Adze (2) However it turned out it would let have let that smoggy sunset image pass as well. And it got much worse when I started playing with random gradients.

Another boring render of the Mandelbrot set, looks like TV static

Clearly I need a better approach. Too many false positives getting through. So wasteful as well. Only 5% of the renders actually pass the test, so to ensure I can keep to the schedule I have to be attempting a render every minute. That also requires me to keep the bounds of the randomisation at a fairly low zoom level or I risk too many deep zooms deep in the black hole or too far out.

Finding the edges?

I had been considering some sort of ray casting solution to find edges of the Mandelbrot set. Cast rays from a random spot on the edge until they either strike the edge of the image or they strike the Mandelbrot set. Then I went to my thinking room (the shower) and my brain laughed at me, called me an idiot and said “Why not something like a Flood fill algorithm to find all of the edges.”” Using this I should be able to find the entire edge in any image I have and then randomly pick one of those edge points

  1. Generate a plot in memory
  2. Find a spot in the plot that is not part of the Mandelbrot set and then recursively visit the neighbouring pixels. If that pixel has already been visited, exhaust that particular search and continue. If the pixel found is part of the Mandelbrot set then record it, but also exhaust immediately.
  3. When all threads exhaust, you’re left with a record of all the points in the plot that are the edge of the mandelbrot set. Randomly pick one of those recorded points and a random increase in zoom.
  4. Iterate until the entire image is the Mandelbrot set, or none of it is. I don’t think it is possible to do the later and I am unsure of the former, although I have some renders that are a distinction without a difference.

In practice what I am doing now is actually just doing 20 plots with randomised increases in zoom (x2-6), and discarding anything with a zoom less than x50. I can do this three times a day and end up with about as many images than I need to post every 30 minutes, based on a rule of thumb of 16 images per run being at greater than x50 zoom. Which I am sure you will agree is much better than running it 1440 times a day.

The real benefit is the imagery produced by being able to zoom so much further into the set. In practical terms most images produced by the previous method were at 1 to three orders of magnitude of zoom. Anything greater than that required the centre point to very close to the edge of the set which was unlikely. Now I get images like this.

Mandelbrot set render, centred at 4.010655E-01 -3.261615E-01i, at zoom 10000 Mandelbrot set render, centred at 4.010655E-01 -3.261615E-01i, at zoom 1000000 1000000 Mandelbrot set render, centred at -6.01590531831553421e-01 + 4.25746251751493388e-01i at zoom 51306602770.68678

Source


1) I’ve become a little obsessed with taking a look at this book again. So much so I am paying money (~$16) to get it via an interlibrary loan. From the University of the South Pacific. In Fiji.

2) Seriously though, go watch that. That guy is something else.

<< prev | next >>