Fun PresentationFramework side-effect of bad equality

I looked into a pretty fun bug a few days ago. The symptom: a WPF DataGrid populated with an ICollectionView was seeing inconsistent row copy behaviour. You would select a row by clicking on it and press Ctrl+C, but instead of copying the row you selected it would copy the row your cursor was hovering over. When I hooked up to various clipboard copy events the data looked about the item being copied looked correct - we were copying the correct (selected by clicking) item.

Continue Reading »

A first stab at gene expression

In the last post I talked a bit about how I might approach expressing genes in SnailLife Go, and how this worked in the PHP prototype of the simulation. I gave a rough example of how I’m thinking of handling gene expression - via “expresser” interfaces that organs are to implement. I got as far as having my outer shell organ implement SizeA1Expresser, but nothing actually happened yet. Something happens now.

Continue Reading »

Brainstorming the SnailLife gene system

In the original PHP prototype of SnailLife there exists a very rudimentary genetics system. Snails had what I called “visual traits” and “functional traits”. Visual traits had genes associated with them. The genes were all stored in the snail’s table and each gene had two “alleles”. During breeding I’d make virtual Punnett Squares of sorts to pass on genes from parents to offspring. But the system was inflexible - each allele for each gene and each gene type were hard coded in the snails table.

Continue Reading »

Building a snail one organ at a time

I think enough of the SnailLife Go infrastructure is ready now for me to start digging into the snail itself. In the PHP draft of SnailLife, I started with a basic concept of a snail “Here’s a snail. All it has is a name, size, and speed” and then made it more and more complex. By the end I had a model that had organs, genes, a reproductive system, macro/micro nutrient requirements, locomotion, a brain with memories, mood, etc.

Continue Reading »

Are YOU experiencing shady output from your Go debugger? Try these things!

A couple of days ago I noticed some unreliable output when stepping through the SnailLife server. I use GoLand and Delve debugger, but in the course of looking into this I picked up some tips from trial and error plus from some very helpful people which I think might be useful regardless of the debugger you use. First, the repro. Fedora 28 Go version 1.11 rc1 Delve version 1.

Continue Reading »

Roee: Self Modifying Go Simulation Experiment - Part 2

<– PART ONE Overview ORM Intentionaliser aggregationObserver aggregationReifier aggregationModifier The new type Qualifier Recompiling and restarting Visualizing the results Conclusion Overview In Part 1 we talked about the general setup of the world/grid and what the Agent and Instructions metamodels do. We left off at the part where the grid sends a copy of itself to whatever observer channels it has (currently just the aggregationObserver).

Continue Reading »

Roee: Self Modifying Go Simulation Experiment - Part 1

Intro ORM Intentionaliser Questions Self-modifying simulation in Go? What are we bootstrapping? Vague definitions and bad practices The world Instructions Running the World PART TWO –> Intro I took up a small pet project over summer that I called Roee. It was very loosely based on a paper I’d read by Susan Stepney and Tim Hoverd, Reflecting on Open Ended Evolution. I also had the opportunity to hear Susan Stepney talk about this paper in person at ECAL 2017 (but didn’t actually go back to read it until this June).

Continue Reading »

Answering questions or helping other people seems to be a good way for me to learn more about a language. I’ve been trying to be more active on the Go forums for this reason, answering questions as they pop up (especially focusing on the ones that may not have gotten much attention). Even a very simple question can get you to go down a rabbit hole and learn more as you’re formulating an explanation as part of the answer.

Quick and Dirty Function Timing in Go

When I want to do some rough timing comparisons or get a quick idea of what part of Thing X is taking so long I sometimes just time a few functions. I used to do this by getting st := time.Now() at the beginning of the function and then time.Since(st) at the end. It recently hit me that the same thing could be achieved with less duplication and messiness to clean up (when removing the timings) with something like this:

Continue Reading »

When you’re helping coordinate a workflow switch between half a dozen different studios, making sure all tools support new workflow, and shipping at the same time:

gif of puzzle pieces coming together