Mark Grealish

the life and code of a crazy cat man


Eadaoin by the sea, November-December 2016

in family

All hail Queen Eadaoin of Dublin Bay and Galway Bay.

Eadaoin at Dun Laoghaire
Eadaoin at Salthill in Galway

Hacker Mark v2005

in me

Sure what else did you expect when I had a shit battlestation?

Edgy hacker pose at Prospect Hill, October 1 2005

Hackerstation v2005

in me

You can just feel the Linux dripping off those nicotine-stained walls. Yeah, fuck parents who smoke in their own home.

Grotty battlestation at Prospect Hill

Recursive hash operation in Ruby which fowards a block

in code

Recursive hash operations were annoying as heck to puzzle out because, you know, functions aren’t just functions in Ruby: You have functions and procs/lambdas, all of which have subtle differences. Like a regular function cannot be passed as a block.

Well, whatever, I had a problem where I had to walk, reject-from and then compact a bunch of deeply-nested YAML files. This worked:

refine Hash
  def recursive_reject(block = Proc.new)
    delete_if do |key, value|
      value.recursive_reject block if value.is_a? Hash
      block.call key, value
    end
  end
end

And behold:

hash.recursive_reject { |key, value| key == :ponies || value == 'sparkles' }

A post by Joe Yates gave me the insight to get this done.


Hello Newry, Goodbye Newry

in me

I came, I mailed, I left.

To paraphrase the problem: An Post will not accept any package with a battery or electronic device inside. No way, no how. Except when such a package comes in from outside the country, and then they’ll happily deliver it. But An Post still won’t accept such a package for delivery.

I arrive in Newry
I mail a package in Newry
I leave Newry

So Caira asked for a camera for Christmas. Caira runs a small YouTube channel. I think this is awesome, and I want to encourage Caira, so I bought her a knock-off GoPro camera.

Two weeks later with gifts wrapped, box packed and card signed, I discover An Post won’t touch the box, and more, they recommend that I go to Newry to ship it. That’s a huge slap in the face to consumers in this day and age. “We won’t take it, because that’s why.”

I want to give a big thank you to the postmaster and staff at the post office in Newry. They gave me every bit of help I needed to get Caira and Garrett’s presents checked and mailed. The postmaster told me that someone in the same conundrum comes up from the Republic at least once a week, so I wasn’t anything special. That was weirdly reassuring. On top of that, the package wasn’t in compliance with Royal Mail regulations, so they helped me to get it unpackaged, checked and repackaged in good order.

Three cheers for Royal Mail!


<3 Gentle Monday night cuddles with Cookie <3

in me

My kitty cat loves me so. :3

Cookie cuddles me <3