Polyglot developer, geometric tessellation fan, ambient DJ.
Whenever, as is the usual course of events during the day, I push to a remote git repo with git push origin master
, I have this annoying habit of singing the words to this song that I heard in my collection ages ago:
“Original master: him dead!”
It’s from a collection of West African funk, a quite groovy song, of which they were virtually the only lyrics.
Eventually, my coworkers, er, noticed this habit of mine, responding with:
“What the hell is that? That thing you keep saying.”
To which I then immediately responded:
“it’s a song, let me play it for you, it’s called… ummm… hang on, I’ll look for it… ummm… I don’t know what it’s called. Or who it’s by. Or what album it’s from. I know it's from a compilation of West African funk…”
Cue rolling eyes, and mutterings of “of course it is…”.
And things stayed in that nebulous state of affairs, with the added surreallity of everyone else that works with git in my office singing the same thing each push, despite none of us having the slightest clue what it was.
Until yesterday, when pure luck and random-play caused it to pop up! Yay.
It’s called:
“Natural Points”, by Smahila & the SBs, on the album “The Danque!!!”
2011-10-22 18:47 by David Parry
I was chatting with Tony from work the other day about the Buddhist idea of Right Speech, which is one of the items in the Noble Eightfold Path. It turned out I could only remember 2 of the 4 requirements, so I had to look them up:
Right speech is the first principle of ethical conduct in the eightfold path. Ethical conduct is viewed as a guideline to moral discipline, which supports the other principles of the path. This aspect is not self-sufficient, however, essential, because mental purification can only be achieved through the cultivation of ethical conduct. The importance of speech in the context of Buddhist ethics is obvious: words can break or save lives, make enemies or friends, start war or create peace.
Buddha explained right speech as follows:
Positively phrased, this means to tell the truth, to speak friendly, warm, and gently and to talk only when necessary.
So, in summary:
October 14 2011, 9:40 PM by David Parry
Because I always forget this, I’m putting it here:
UPDATE persons
SET
address='Nissestien 67', city='Sandnes'
WHERE
last_name='Tjessem' AND first_name='Jakob'
October 4 2011, 11:10 PM by David Parr
I think I’ll keep adding to this. They seem like good principles.
November 1 2011, 10:27 PM by David Parry
January 11 2012, 3:02 PM by David Parry
This is the notes from a talk I gave at #rorosyd on the 10th of January 2012.
The demo code is available at: [https://github.com/suranyami/socket_demo][]
There is a great list of currently implemented protocols at https://github.com/eventmachine/eventmachine/wiki/Protocol-Implementations which includes:
require 'eventmachine'
class Echo < EM::Connection
def receive_data(data)
send_data(data)
end
end
EM.run do
EM.start_server(“0.0.0.0”, 10000, Echo)
end
require 'eventmachine'
require 'em-websocket'
conf = {:host => “0.0.0.0”, :port => 8080}
EM.run {
EventMachine::WebSocket.start(conf) do |ws|
ws.onopen {ws.send "Hello Client"}
ws.onclose { puts "Connection closed" }
ws.onmessage {|msg| ws.send "Echo: #{msg}"}
end }
So, I wanted something to demo that wasn’t trying to do to much but demonstrated the real-time nature of WebSockets, so I built this little socket_demo site:
Useless, but non-trivial!
EM-Websocket Server:
class Demo constructor: –>
if WebSocket?
window.socket = new WebSocket("ws://192.168.1.3:7070")
else
window.socket = new MozWebSocket("ws://192.168.1.3:7070")
CoffeeScript:
window.socket.onopen = –>
window.socket.send JSON.stringify({kind: “register”})
EM-Websocket Server:
socket.onmessage do |msg|
puts "Server Received #{msg}"
id = @sockets[socket][“id”]
incoming = ActiveSupport::JSON.decode(msg)
case incoming[“kind”]
when "register"
socket.send(register_message(id).to_json)
broadcast(id)
else
## Send “add” event to everyone
EM-Websocket Server:
def send_to_all(message) @sockets.each do |destination|`
destination.send(message.to_json)
end
CoffeeScript:
```coffeescript
window.socket.onmessage = (mess) –>
data = jQuery.parseJSON(mess.data)
switch data[“kind”]
when "add"
window.add_player data["id"], data["color"]
$(“#red”).click (e) => window.socket.send JSON.stringify {kind: “update”, color: “red”}
$(“#green”).click (e) => window.socket.send JSON.stringify {kind: “update”, color: “green”}
socket.onmessage do |msg|
id = @sockets[socket][“id”] incoming = ActiveSupport::JSON.decode(msg)
case incoming[“kind”]
when “register”
socket.send(register_message(id).to_json)
broadcast(id)
else
if incoming["color"]
color = incoming["color"]
message = {"kind" => "update", "id" => id, "color" => color}
@sockets[socket]["color"] = color
send_to_all(message)
end
end
end
Then I gave a live demo where I used my laptop as an unsecured base station, and people connected to it with their iPhones and started clicking on the red/green buttons:
wifi: suranyami (no password) url: test.local:4567
em-spec https://github.com/joshbuddy/em-spec
This demo code viewable here: [https://github.com/suranyami/socket_demo][]
September 11th, 2013 2:19pm
I was into disassembling old TVs for electronic parts in high school. One day I bought a huge old 1950s unit (broken) at a flea market for $1. It had a 1 Farad capacitor in it about the size of a tin of peaches. Our school library had recently been re-carpeted with nylon carpet that generated epic levels of static charge on cold, dry days. So I used to scuff my feet around the library holding onto one of the terminals of this giant capacitor, then approach a victim and give them my “Star Wars Emporer” electric shock treatment.
A few years ago a colleague did some quick arithmetic and suggested that I may well have been approaching an amount of current that could have caused heart failure. Woops.
So, today is day 2 of me making music with my groovy little setup consisting of:
My soundcloud account here: https://soundcloud.com/suranyami
Using mono mini-jack cables, connect the following:
Even though the gate-out to gate-out thing is the only known (and not officially recommended) way to trigger the Werkstatt, it only really works when you also hold a key down on the Moog.
The first problem I encountered was synchronization. I recorded a bassline, but then tried to add a drum track to it. Since the analog synth had nothing to do with Logic, everything was out of sync.
Because I’m using the Korg SQ-1, though, the solution is remarkably simple:
Now the sequencer is in-sync with Logic. Yay!
Next challenge: the SQ-1 has an in-built MIDI-to-CV/Gate capability. Use that for fun & profit!
I have not felt so much fun, expansive possibilities with a piece of hardware in decades. I distinctly remember the times I was blown away by what we can achieve with electronics:
When Stephen Smith and I convinced the University of Queensland Psychology Department to let us use their Fairlight CMI in 1982 to make some pretty cheesey pop songs, whenever they weren’t using it.
When I played with an Apple Lisa for the first time. I went to print something and it said “Is the cable connected?” This was completely new & revolutionary.
Using MacPaint/MacDraw/Adobe Illustrator/Adobe Photoshop/Pagemaker for the first time.
When Stephen Smith & I used to play with electronic instruments in the 80’s, it was a labour of love. We made drums out of bits of old rubber stretched over wooden frames, with crappy dismantled earphones as input devices, processed by Schmidt triggers that we got as free samples by pretending we were an electronics OEM called “DaveTronics Pty Ltd” despite being 14 years old. The great thing about this was working out how much can go wrong just making some noise.
I loved that time. But I love being able to twiddle with sound in the ways I always imagined I could.
I remember having a very heated argument with Stephen because my favourite setting on the Roland SH-101 was “Attack: 0, Decay: 0.001”. It was a great little CLICK sound. What could that click sound have become with a cheap hi-res audio interface, crazy-ass effects, and plugging it into a wicked, patchable analog synth? We may now know.
PS: Stephen Smith, please talk to me! I know it’s hard, but I think I’m your oldest friend and I miss you. PPS: Stephen & I are on speaking terms, nothing bad has happened, it’s just he’s a bit hard to get hold of
January 2nd, 2016 10:28pm
We were inside a Matrix-like simulation of reality.
Our goal was to explore a new planet and colonise it. The new world was arcane and beautiful in its oddities, lakes of flying fish, tall spires where huge elephantine pterodactyles nested.
Soon after arrival, we laid plans, and began construction of towns, cities, farms, houses.
As we began working, there appeared a group of aliens, different from the native fauna. Their actions seemed to be undoing some (but not all) of the actions we were taking.
Then a crop of obstructions and annoyances started swirling around us. Landscapes transformed, people would break out in hives and spots, swarms of bees would obstruct our paths.
Some sought to lash out at the newcomers and attack them. This caused their actions to become increasingly strange, and the obstructions become more and more horrific. Living explosions, blood & gore, violence. The more we resisted the newcomers, the more awful and incomprehensible the entire situation became.
But, noticed a few, the situation was not universal. There were some interactions with the newcomers where their actions ran harmoniously with ours, and the obstructions were curiously absent.
Through careful analysis and experimentation, some principles and practices were discovered that showed us how to live harmoniously with the newcomers. Some even discovered that not only could they survive, it was possible to flourish and even soar.
With peace returning, we were able to spend time closely studying the new creatures and their curiously symbiotic relationship to ourselves.
Time and attention revealed that the others where our own actions, manifested as a physical entity. Their actions were the new version of ourselves following our actions, and the obstructions were the consequences of our actions.
July 29th, 2014 8:44am
Never start a project involving legacy code that has already been estimated & scoped by someone other than myself.
October 21st, 2015 10:56am