June 13, 2018

I built a little blockchain-in-a-browser in ClojureScript to help understand the underlying algorithms.

You can simulate a network of peers by opening multiple browser tabs. Each peer can mine blocks and make transactions independently and the resulting blockchain will resolve conflicts correctly across all tabs.

A blockchain works by laying down a chain of blocks of transaction data.

Bitcoin whitepaper SPV

Each block in the chain contains a cryptographic hash with two important properties:

  • It proves a link to the previous block.
  • It proves that difficult computational work has been done.

The proof-of-work is accomplished by iteratively updating a nonce until a low-probability hash is discovered.

These two properties mean a blockchain is digital amber.

Insect embedded in amber

If somebody wants to modify a transaction deep inside the amber it would be very difficult because they would have to re-create every layer of the blockchain by doing as much work as the original process required.

In my browser blockchain the hashing is implemented like this:

(hash-object [timestamp transactions previous-hash nonce])

As you can see the previous block's hash is included in the current block.

The hashing is performed iteratively in a loop until a hash with at least one byte of leading zeroes is found:

(loop [c 0]
  (let [candidate-block (make-block (now) transactions previous-hash new-index (make-nonce))]
    (if (not= (aget (candidate-block :hash) 0) 0)
      (recur (inc c))
      candidate-block)))

May 9, 2018

Mountain with space ship

letters.png

helmet.jpg

eyes.png

Romanesque arial

ship-and-planet.jpg

Hillside, tree, and spacecraft

computer-tunnel.jpg

Airballoon over a valley

April 14, 2018

DSC_1197.JPG

I'm playing a show tonight at the local science education centre, Scitech, for their adult event, After Dark.

I'll play live electronic music using some Gameboy, Commodore 64, and Raspberry Pi gear and algorave Pd patches. I'll also give a little talk about the tech and how it works.

Scitech, After Dark

March 1, 2018

plastimake-models.jpg

A couple of years ago my friend Joe recommended this stuff called Plastimake to me.

It is a hard plastic which goes soft and malleable at around 60 degrees celcius. You drop some in boiling water until it goes clear and soft and then you can mold it into whatever shape you want. It cools and hardens again quickly in whatever shape you have molded it into. You can re-heat it to soften and re-use it again.

Scout and I have used it several times to hand craft little figures for play. I've also used it around the home and when prototyping things as it's a very quick way to get a hard plastic into exactly the shape you want.

Here's their video which is clear and honest:

Feb. 16, 2018

A list of real questions that could be answered by teensy little technology nuggets.

Raspberry Pi with Waveshare Rpi Hat

  • In which physical folder is my child's birth certificate?
  • What items of mine are not here?
  • How much hand soap refill is left in my bathroom cupboard?
  • What is the smallest storage space in which I can fit all of my furniture?
  • Which items that I own do I never use?
  • At what time of day do I interact with different items I own?
  • What is the total weight of my filing cabinet and work desk?
  • I need a new one of these, pull up the page where I purchased it in my browser.
  • This thing does not belong to my grandmother. Who did she borrow it from before she died?
  • List the items in my craft box which have "needle" in the name.
  • How much television are my kids watching and what percentage are educational shows?
  • Are there any NE5532s in my tool box?
  • Graph my family's diet composition. How much of it is fresh food?
  • Place a grocery order under $50 for the items I most commonly use that I will soon run out of.
  • Search all of the physical books in my personal library for the following phrase.
  • Are my running shoes in this house or the holiday house?
  • We are leaving this hotel. Have we packed everything?
  • Where have I put my phone and keys?

Generic USB Sound Device

Most of these question could be answered without an internet connection. "Of Things" sounds kind of weird by itself though.

"Internet connected lightbulb" does not provide a use-case that anybody wants or needs.

The things should be telling us their data. They should not be telling corporations our data.

What you want is dumb little things that do one thing well. Good traditional design plus CPU, I/O, and memory.

Things that talk straight to us [and nobody else] with IR, sound, light, QR code, and raw radio.

Is there a word for "Internet of Things" objects which don't have an internet connection?

Maybe "ov things" lol.

"Neat little ov thing you got there friend."