Dusting off those HIVE muscle memories

A contest entry followed by a couple of posts and what do you know, the old coding vibes are beginning to percolate to the surface once again. My last programming interest on HIVE was my exploration into base64 encoding and how that might be used to post images directly to the blockchain as opposed to AWS cloud servers as they are at present.

Python was my first choice of programming languages, yet my familiarity with the language is not very robust; so after some hitting of my head against the proverbial wall eventually my old tried and true language of Perl was used.

The first step was to take the image blunt.jpg and convert it to base64 encoding and then display that on a web page. Kind of a proof of concept.

blunt.jpg

  • blunt.jpg

It was decided to make the form entry page dynamic and generated from the script in question. This moved ahead well and soon there was a page being generated to test the encoding through.

image.png

The actual conversion took a bit longer yet finally that old dopamine rush was felt after about the 7th or 8th attempt.

image.png

With great suspense a jump was made to the terminal to place the base64 output into a text file and then run the command:

$base64 -d output.txt > blunt.jpg

Low and behold it was returned to graphics mode in all its glory.

blunt.jpg

The next step will be to have the base64 output posted to the blockchain instead of to the browser like this old test post. That's going to take some thought so as to make this a welcome utility and not an annoyance on the feeds. Perhaps a little community of its own would achieve that result.

The mods could be endless at that point. For example offering a means to sort through the images using tags. Maybe a dApp could be on the horizon.

More to come as more progress is made...


Peace Out

H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now
Logo
Center