abcd-minded bash functions

Lately, I have been thinking deeply about blockchain. I have determined that we are doing this all wrong. It seems to me that the following four functions which I tweeted out are a blockchain. WordPress seems to have trouble with some of the letters and symbols that I used, but all four are visible on twitter.  In order to generate these, I used the terminal on my Macintosh laptop and vi (my favorite editor). Starting with å (Opt-a), I have each function as its own block. The triangle (opt-j) function is called at the end of each function and writes it to a local file which is hashed by the sum command into a filename. The next function will error out if that file is not present. Once all four files are on your computer, you can simply run each function in order: opt-a, opt-b, opt-c, opt-c. You will then see a mysterious gibberish language that any Joyce Scholar should love to unravel. This can also be seen (in these examples) by simply reading the functions below.
I think this represents a new approach to converging language and code and can be actually more accessible and definately more fun that traditional coding.More importantly, I do believe that I have created a blockchain that is both secure and accessible. So the act of trying to figure this out and creating your own additional or alternate functions would be worth the effort. This system has no specific backend, but could easily be dovetailed into another system. For example, I made sure that each function was under 240 characters and posted each individually into twitter. I challenge you guys to tweet back to me with your own versions at:j0hnrigler. I also challenge you to pick up a copy of Finnegans Wake and begin to explore its secrets yourself, and maybe even try to unravel what I am saying about the world around me. Have fun.

Underpinnings of a Secular, yet Religious Cryptocurrency

In the first season of the TV show “Silicon Valley”, we met a character named Peter Gregory who is a venture capitalist able to generate millions by speculating on the relationship between cicadas and sesame seeds.  Peter Gregory is widely considered to be based on either Paul Graham, Peter Thiel, or both.  Both of these real life venture capitalists speak in quite unique ways that at first seem a bit confusing.  And interestingly enough  both Thiel and Graham promote two very similar lines of thought:

What idea do you hold that you hesitant to share with your peers? – Graham

Tell me something that is true that very few people agree with you on. – Thiel

They posit, that it is these ideas that can at times be the most fruitful, important, and that we all keep such things tucked away in our heads for far too long.

Well I am going to risk telling my idea here for all to read, because while it is a bit risky, if you example the video below, I think you will find that it makes sense.

I don’t particularly believe in any supernatural thing, yet I believe that religion is important, complicated, and wildly misunderstood.  It is inextricably linked to our culture, true life experience, or gestalt.  I believe this so strongly that I promote a secular view of religion.

Let me explain in more detail.  I was raised in a family that attended church each week and overall I greatly gained from the experience.  However, when I reflect back on my childhood, I remember adults describing magical things to me.  I never believed these things and didn’t perceive that they believed them either, even though that it what they claimed.  It was as if I was being taught some sort of strange lesson about everyone together pretending to believe things that no reasonable person would ever believe.  Had I learned this lesson better and internalized it, no doubt my life would have been a bit easier and would probably be measurably happier and healthier.

The church I was taken to was part of what is commonly called Mainline Christianity, specifically PCUSA.  This church once was very different, more Calvinistic, but by the time I came around, it had been transformed into something quite secular.  I remember as a child watching a television show with my father where Adam (and maybe Eve) simply rose up from a sandy beach and started walking around.  I asked my father (who was himself a good preacher’s son) how this could be.  He simply told me that it was a story, that it was symbolic.  It seemed nice and so I never gave it another thought.

The church was good for me because I was socially awkward at school and the social setting was good for me.  I preferred to be around adults because they made more sense than the other children.  Looking back as an adult, I now see that the church was far from perfect, but at the time it was very nice.

When I got older and went to college, I did not attend church, but did study the sociology of religion and even researched the relationship between the Catholic Church and a community of Creoles in a small town near my University.  By this time, I was on my own and simply went on to experience the world as what I now call a ‘secular person’.  I learned about other religions in college and especially liked Taoism, which is often not called a religion at all, but rather a way of life, or of perceiving the world.

Years later, as I revisited some of these experiences with my family, it became clear that my experience was much what they had hoped it would be and was similar to that of my siblings and their friends.  In other words, thought I had attended and enjoyed church, it was very much a secular experience all along.

It is only is the last decade or so that I have come to fully understand that this is not the typical American religious experience and perhaps my experience was one of a certain time and place that was vanishing even as I was wandering away from it to experience other things.  I had always had an aversion to the evangelical versions of Christianity that I was exposed to, but I simply chose to avoid these, as they seemed preposterous.

After watching a number of Netflix DVDs about atheism, I decided to formally tell the world that I was in fact, an atheist.  This was greeting almost no fanfare from those around me, with the exception of some heavy religious inlaws whose opinions I had already discounted. Here is a video that I watching and feeling good about because a well-spoken adult was finally confirming what I had imagined all along:

I also became involved with a Unitarian Universalist Church, which was quite accommodating to atheists and even allowed atheistic clergy.  As an outspoken atheist, I would begin to argue with Christians from time-to-time,  but I eventually outgrew this phase.  Now I generally tell people that if they have a special question about how I could be an atheist, that they could simply google the question, perhaps with the word ‘science’ added, and whatever answer they get would probably be close enough.  I take no joy in winning such arguments these days.

It is difficult for me to understand how common or uncommon my experience has been.  My atheist friends have never heard of such thing, but I really think that most people like me simply can’t be bothered to register an opinion on the matter (and may in fact be wise in that way).  Demographically, I am solidly a ‘None’ as well as an atheist and this is why I have become really interested in the term ‘secular’ and often identify myself as such.  This is only after making sure that everyone understands that I am not trying to be vague about my lack of belief in the supernatural for social gain or stability (again, honesty before wisdom).

“Nones” on the Rise

Being in information technology and having studied humanities and the philosophy of religion also informs how I see these ideas.  It is why I am a secular blockchain/cryptocurrency evangelist.  I believe that we should start allowing some organizations to claim church-hood along with existing religious organizations.  I see great benefit in using a common opened ledger.  Actually, I don’t see any organization stopping this behavior.  New ideas seem strange, but once implemented, often then seem perfectly reasonable.  The trick is to understand how to make this jump.  In this case, I am interested in promoting first the idea that secular religion can be dignified and implemented rather than 501c3 charitable organizations.  I see no law or tradition that restricts this, it is simply a matter of making claims of a generic secular religiosity.

But maybe I am getting ahead of myself.  I don’t claim that my own sort of religious ideas are about nothing, but I am not sure that it must be about anything in particular.  My ideas about religion are based on what I see around me.  Large and well-organized denominations spread out into residential areas and serve communities as people can conveniently fit attendance into their life.  The churches are a confluence of a denominational agenda which target certain geographical areas and the people that can make the church a part of their lives.  Historically religion has of course been very different, at times compulsory, manipulative and destructive.  Most people that I know in the atheist community, and much of liberal religion spend a considerable amount of time and energy on the healing process of past religious abuse.  I count myself so lucky to not need such things , but also end up with a very abstract, legalistic, and bare-bones interpretation of what religion could be.  I see religion as the institution of last resort which can give a group of average people an edge.  Religion has also been historically a way for politics and the wealthy to at the very least communicate and direct the populace.  Of course, too often and in extreme cases, again religion can be a source of great manipulation.  I believe that non-supernatural religion, however, can be transparent and transformational in a way that can be quite helpful at this time.  I believe, in a sense, that a Jubilee can be triggered, with all levels of wealth participating.

Charles Taylor has been involved in politics,  economics, and philosophy. In his ponderous tome “A Secular Age” he promotes a worldview were I see myself right alongside people who call themselves traditionally religious.  Although he doesn’t mention it in the speech below, his “Immanent Frame” offers more than enough intellectual fire-power to fill in the blanks needed anchor a universal, indisputable sort of secular religious currency.  This works for both the religious and the secular and allows us a common order, a shared record, and even a common way to respond to a national crisis in a fast and indisputable way.

And if you still are curious about how these puzzle pieces fit together, I strongly recommend getting a copy of “Gardens of Democracy”.  Taylor’s arguments very much remind me of a “Garden Brain” where society is to be tended to grow in a healthy and prosperous way:

So finally, I would like to discuss blockchain technologies.  Bitcoin is the first most obvious implementation of this technology and is now known for how its value goes and down in wild swings.  For me, however, the most important thing about bitcoin is that anyone in the world can look at its shared ledger.  Bitcoin accounts and wallets are expressed as numbers rather than names, but once a name is disclosed, then all of the transactions can be seen.  The ledger is stored in a way that is indisputable on a distributed network of computers.  All of the computers must agree and if any computer tries to change the ledger, it will be immediately ejected from the system.  A system knows as the Byzantine Generals uses codes and mathematical puzzles to pull this off.  For me, this is more than enough of a system upon which to build a secular (or supernatural if desired) system which would allow for efficient propagation of the benefits of religion.  Some of the primary benefits of this system is that church leaders and or board members are considered clergy and are therefore allowed tax exempt parsonage stipends as well as tax exempt love gifts.

Here is an example of a view into one of these ledgers, this transaction is for 2 bitcoins:

A group of five people could easily create a special sort of mark into the ledger by passing a very small amount of coin or token to each other.  This could be done with any currency.  If they make a complete loop where all five pass the currency to each other within a few minutes, then that loop could be seen on the register.  By formally connecting one of their ids into an agent such as myself who would then report to the IRS as a religious denomination of X blockchain religion, they would be essentially making what could be construed as a legally binding claim of religious practice.  Five people wouldn’t transfer coin to each other in this way in this sort of loop on accident, repeatedly, while connecting to special accounts.  If a group meets once a month and does this action for each meeting, then they would be acting in a way which would signal the IRS or any one else concerned of their intention.  This is how I propose to form blockchain religion.  The currency then could be used to make exemption religious payments and would thus begin to create standards for such behavior.  The net result would be that this behavior is either accepted and exemption would be greatly expanded, or religious exemptions would be reformed wholesale and benefit would be shifted to charitable organizations.  In either way, an inequality would be remedied.  I will close with a video of the FBI discussing blockchain, so that one could imagine how the technology could be seamlessly integrated into an official reporting system:

Thoughts about DevOps

I have had quite a few DevOps interviews lately, and it is just about to come off of my resume completely. I think that I genuinely confuse people, because I have a security patent from IBM, I seem to make little dashboard widgets, I talk in very abstract ways about agile thinking (functional scripting no less) but have not been a paid ‘developer’, but rather an Operations Person. Actually making code run consistently and streamlining processes, migrating from one solutions to the next, and then downloading, installing, and supporting all the fancy packages that you guys need has just always seemed more important to me. When I first started at IBM, there was so much work to do that was fulfilling that didn’t necessarily involve writing code.

I bring your legacy solutions directly to the door of Amazon and roll forward with a reasonable plan to get your entire infrastructure ported over to it, shut down your servers and pack them up to ship away, but I am not a developer. I am IT infrastructure, and if your team if of a certain size, then you really need a couple of guys like me. I live in the shell and code or learn new stuff like docker or aws because I enjoy it, but I really think that your dream Linux Admin/DBA/aws/Java coder is much rarer than you might imagine.

So maybe there are two very different sorts of DevOps people that need to be working together, like we always have.

Exploring BlueMix

I just got a trial BlueMix account from IBM.  I will begin to play with it.  I like to map out such efforts in a special shell solution which I call sbshell.  Generally, I iterate between the shell and editor to begin to create a functional library.  In many cases, shell will not be part of the final solution, but it gives me a good place to start and allows me to quickly turn incidents and problems into working prototypes.


john@purple:/var/www/html$ sb.init
Reload web...
Reload site5...
Reload web...
Reload svg...
> bluemix  

This creates an initial set of bash library files named ‘bluemix’, the first is local to my user, and the second is global. Both libraries are sourced into the environment after each save. I will then create a bluemix function that will run successfully, but will just ssh into my remote instance by default. In it I will store everything that I know about bluemix and begin to add functionality. It is like a scratchpad that becomes a launchpad.


-() { return; }
---() { return; }

bluemix() {

--- bluemix
  - Image ID:c3432649-385b-4b7a-909d-80ba79d5e84b
  - flavor ID:1
ssh linux1@

The build just finished a new instance that I created, so I grabbed a bit of information that might be useful later and set up my ssh keys.

john@purple:~/.ssh$ bluemix
Last login: Wed Jul 19 14:48:00 2017 from
Welcome to LinuxONE Community Cloud!

This server is for authorized users only. All activity is logged and monitored. 
Individuals using this server must abide to the Terms and Conditions listed here: 
Your access will be revoked for any non-compliance.
[linux1@bleugren ~]$ 

So now I have a pretty basic Jailshell to begin working from and some rough documentation of what I did. If come back and structure the
lines that start with ‘-‘ a bit better, then I can overload the – function to act in certain ways, the following line could be caused to execute a curl against the api, if I were to be allowed access to imageId. What is nice is that I don’t have to fully define that functionality right now.

- bluemix.imageId c3432649-385b-4b7a-909d-80ba79d5e84b

This way of thinking and coding is to supplement work in other languages, such as Nodejs or python and make Enterprise level connections which can be, for instance, scripted in conjunction with an ansible hostlist.

Enterprise DevOps (like System Administration) is often done it tiny burst between meetings or incidents, and I may work on something one day and not look at it again for two weeks.  These conventions may seem trivial, but over time I am able to keep track of many different projects.

[ note: I recommend getting a free trial of bluemix, it was easy to configure and get to a point where docker was installed and available. ]


Functional Scripting tricks

As I code and work more and more in this field of Information Technology that is now begin called DevOps, I begin to develop certain tricks that I form into a style.

Here are a few to play with:

- () { return; }

Now you can use the ‘-‘ at the beginning of a line as way
to leave comments. You should probably use this for structured comments that you might want to grab via reflection.

color() {
# The next line is functionally a comment too.
- alp color white red green blue
# If you overload the '-' function, then
# the color comment will become a function call
 if [ -n $1 ]; then
     case $1 in
       white)  FG='00m' ;;
       red)    FG='31m' ;;
       green)  FG='32m' ;; 
       blue)   FG='34m' ;;
      printf "\033[$FG";

You can experiment around with what symbols you can overload in this way. So far, I found:

, . - + @

In what my structured comment line, I begin with the word ‘alp’. I will now define what ‘alp’ does.

# alp creates a function for each option defined
alp ()
- alp $1 $2
echo "$1.$2() { $1 $2; }" > $T
source $T
rm $T
alp color red
alp color blue
alp color white
alp color green

Now you have four new functions, one for each color.

declare -f ()
    color red

So this is how I play with bash. It is very similar to how one might approach golang, python, or other functional languages.

Dealing with the “Silicon Valley” tabs versus spaces argument

The whole issue, of tabs versus spaces, which was dealt with on “Silicon Valley” last week, is easily resolved. No need to lose your super-genius girlfriend. In the show, she is shown hitting the space bar over and over when she could just hit tab a few times.

Of course the issue is that tabs can be interpreted visually in very different ways. Microsoft Word seems to want you to reset your tab stops for each line, or some other foolishness that I can’t quite wrap my brain around.

The answer is that you can use whatever you want, and can use .vimrc to change tabs to spaces if necessary. Since I am not working on the Linux Kernel, and often work with YAML, I have expandtab and tabstop set to 2. This allows me to nest loops with 2 spaces and never create a YAML file with tabs (which throws an error).

set tabstop=2 softtabstop=0 expandtab shiftwidth=2
— from .vimrc

Realtime OOP PHP SVG coding

Today I am devoted a bit of time to object oriented laser cutter controls. Although the 3d printer is wildly useful, I find that the things that I can create with it are simply too small and too fragile. The laser cutter, on the other hand, allows me to create large and stable objects. By creating jigsaw pieces, large boxes can be made. The pathing is tricky because the width of the laser must to taken into account. Each segment must be moved slightly in various directions in order to create a tight fit.


Above is the finished product, ready to go to the Dallas Makerspace for test cutting.  I will only cut the green line, because it takes into account the width of the laser.  Below is a screen capture which shows how I work.  I run with a 5 second page refresh so that I can keep my fingers working on the code instead of mousing over to my browser.  Below is a snipped from the heat of the battle.  I just hardcoded in my path, as you see that I wasn’t quite finished defining my polygon below.   Next I will need a better separation of data and code, but I had to just get a prototype up and running first.  This way I know what is possible and reasonable and can now refactor in more flexibility.

Screenshot from 2016-05-30 11:13:12


Now I see the next calculation that I need to make. The male and female pieces fit snugly together, but now I need to adjust the side lengths and how deep the joining sections go. One problem solved, and on to the next.