Thursday, December 12, 2013

Getting your Workers to Subsidize the Hiring Process

The thing about programs like HackReactor is that they are methods for the big tech companies to gain access to a kind of super-technician programmer.  There is a huge problem in finding and hiring competent programmers.  I've seen it myself.  There is typically no good way for a company to really know if a given candidate is really a capable programmer or not.  There's also a huge downside to hiring someone who then turns out to be not very good.  In fact people speak of "negative productivity" and it's a real phenomenon.

In order to combat this issue, and to take advantage of the folks who want to want to try to catch the brass ring (of a well-paying career in the software industry), they've come up with this idea of a programming "boot camp".  They basically get people to pay for their own probationary term and then filter them for those people who are likely to do well as junior "technician" developers.  The students are, in effect, subsidizing the hiring process.

In this case, the reason why HackReactor can boast of such high rates of their "post-grad" hiring is that they are very very careful up front about who they let in.  That "interview" process they talk about is designed to vet people based on how well they can pick up tech and software stuff.  It's openly acknowledged that there are people who "just get" computers and people who really struggle.  HackReactor are very careful about only accepting people who are already strongly biased toward being able to "hack it" (no pun intended) and then teaching exactly what they want them to know, so that they come out of the program already proven (to some degree) and trained.  Of course they get hired. :-)  That's what the program is really for: finding and supplying a work force.

I would recommend attempting the "interview" because you will learn a lot just from that, however, unless you are just wanting a job as a mid-level software technician the actual program would probably be a waste of your time and effort.

As a counter-example you could learn everything they are teaching from a community resource such as the Mozilla Developer Network.

Tuesday, November 26, 2013

Fostering Good Character

Given the advent of ultra-powerful technology (fusion power with nanotechnology) the crucial problem before us today is the fostering of good character.

Religious folk (the ones who are doing it right in my estimation) understand this as the continual obligation and joy of remembering God and living in a goodly fashion.  Atheists, agnostics, and non-religious but spiritual folk can understand that only wise and good people can be trusted with such tremendous physical power.

We must discover and use whatever means we can to foster good character and wisdom.

Monday, July 22, 2013

Oh Sailing

OooooOOOOOOooOOoOOAAAaaaah!  NOW I get it. Sailing.

The first passage I made on the Adios was from South Beach Harbor just south of the Bay Bridge in San Francisco to the Berkeley Marina in, you guessed it, Berkeley.

I wasn't sure of my sailing chops so I figured I would just motor over and I left the sail under wraps. At first I tried to go around the west side of Treasure Island but as I got closer to what they call "The Slot" (the way between Angel Island and Treasure Island which faces the Golden Gate directly and catches all the wind and current) the waves became just high enough to give me pause and I went back around the east side of the island.

After that it was fairly smooth sailing (I should say motoring) until I got out towards the Berkeley Marina and was approaching the ruins of the old Municipal Pier, which stretch west through the water off of the marina for a surprisingly long way.  I came out from the lee of Treasure Island and the waves picked up again. They were not a danger to the boat but they kept raising the stern high enough to bring the prop out of the water and cause the engine to rev uncomfortably.

I got in to the protection of the breakwater and things calmed down, but it left me with the jarring feeling that I might also have gotten into more than I could handle.

It turns out I was doing it wrong.

In fact, the trick to travelling in a sail boat is to sail it. Who knew?

The next passage I made was from Berkeley to the Emeryville Marina, just next door and within sight of each other.  Kids go sailing there in tiny little sailboats for fun and practice, so I figured it would be safe enough to try to actually sail there myself.

I readied the mainsail but left it furled because the wind was astern (coming from behind) and making it difficult to raise it in the berth.  I left the headsail down. One thing at a time.  (You don't have to have the headsail up to sail, it just helps you go faster.)

I cast off and used the motor to get out into the main open part of the marina then hoisted the sail, letting the motor push us very slowly into the wind and towards the main opening from the harbor into the bay.  With the sail up and ready I motored out from behind the breakwater and into the bay.  I went south through the gap at the end of the still-accessible part of the Berkeley Municipal Marina, which process they call "threading the needle", and switched off the motor.

Now I was sailing, and it all made sense.

You pay attention, then you think, then you set the sail and the maybe the tiller, and then...  then the very forces of Nature herself carry you and your boat gently along.  It's quiet, it's peaceful, it's transcendent.

It's sailing.

Sunday, July 14, 2013

Everything's Okay: DON'T PANIC!

As if living(-ish) on a sailboat and getting paid to work on robotics isn't cool enough, I am now learning Blender (the cool open-sourced 3D system) as part of my job. (I'm going to do mock ups of the robots using it!)

Now there's an interesting thing that my screwed up nervous system will do. All afternoon I have been on the edge of panic.  Weird, right?  I should be stoked.  I'm getting paid to learn Blender which is awesome and will enable me to do more awesome stuff, and this is totally okay.

Except my nervous system keeps trying to freak out and tell me that there's something really important that I'm forgetting that I need to do and I can't just sit here lighting up metaballs and rendering them all day! Dude, you have to get a job!

Whoa there neurotransmitters! Steady on, little glands! I've checked and re-checked and we're all okay.  There is, in fact, nothing I can think of that I should do today (it's Sunday afternoon) that I've left undone. Maybe call my mom. But it really is the order of the day to sit here and mess with Blender, and that will pay my bills.

Wow.  Just breath deeply. Everything's okay.

Wednesday, May 1, 2013

If you don't know what you're doing, stop doing it...

I just wrote this to a friend and it resonated with me enough to want to post it here:
Really the issue is not so much coding as "policy", i.e. figuring out
exactly what the client wants and typically educating them as
to how they can actually achieve it with computers.

I'm reluctant to work with people these days because no one seems to
want to know how things work, they just want to have you (me) "make
things go".  I just don't respect that anymore.

Despite being in a fairly desperate situation here I have been turning
down work rather than committing...
People are not getting it...

Thursday, April 18, 2013

There is a Universal Language

Over the last century a small group of researchers, working largely independently and in isolation, have discovered and refined an Universal Language.

This is a logic-symbolic notation, not a spoken language (i.e. not like Esperanto), that captures and expresses the essence of logical reasoning in a direct and unmistakable way.

The rules of logical reasoning (and Set Theory, etc.) expressed in the Universal Language admit of a decision procedure that is of unprecedented simplicity and power.

It is the alphabet of thought.

I'm still gathering threads and learning but I've compiled a few links and a bit of history:
  • C. S. Pierce, Existential Graphs, circa 1890
  • Spencer-Brown, "Laws of Form"
  • Bricken,
  • Shroup,
  • Burnett-Stuart,
For your sake and the sake of the children, go read this, and tell the people.

Friday, April 12, 2013

Everybody Knows

So it turns out everybody knows.  So why doesn't everybody know?

I was reading "Boundary Algebra: A Simple Notation for Boolean Algebra and the Truth Functors" Meguire 2007 last night and he lays it all out, better than I ever could.  He mentions the NOR-gate thing in a footnote.  Everybody knows.

So why doesn't everybody know?

If there is only one utterly simple and direct notation interpreted in a few straightforward ways that opens the door to Logic (all kinds including circuits) Set Theory, mathematics, every kind of structured thought that we've been separately developing, doesn't it make sense to say that there "is only one" notation?

Aren't the others historical artefacts of the journey, the life, of ideas that led us to the place where we could articulate the Laws of Form?

Why not rebuild the edifice on such a foundation?  I double-dog dare you.

Tuesday, April 9, 2013

The Egg of Ouroboros - TOC

I should be working, but...

The Egg of Ouroboros
A Notation for Tractable Reasoning

Table of Contents

0. Nonsensical Formalities

I. "Formal Nonsense"

  In the Land of Nomy

    The Guardians

    The Guardians Again

  In the Land of Nor


    More Circuits

    More Names



    Cybernetics [is Category Theory]

    Gödel Machines



Appendix A: A Universal Circuit?
Appendix B: Curious Musicians

References & Recommended Reading

Saturday, April 6, 2013

What is left to be done?

Really, what is left to be done?

For the prepared mind the LoF formalism is the last thought one needs to have.  It becomes evident that you could regenerate the Universe from any least part of it ("in a grain of sand" and all that.)  And it also becomes obvious that one has access to the entire structure and knowledge of all the Universe, and that this exact moment is itself encoded and necessitated by the structure of structure, one has only to "grok", there is nothing else.

For the unprepared mind all the mystic stuff is just so much annoying woolly-headed crack-pottery.

The only thing in this for such a one is the (secular, temporal) advantages for building computing machinery.  This is fun, but hardly useful.  (I am speaking from the point-of-view of the Mystic now, where all Human experience is always and only for the purpose of transcendence and our temporal motivations are all revealed as mistaken attempts to achieve transcendence.  From this point-of-view all our fancy toys are just more "maya", distracting illusion.)

There are tremendous powers and abilities that we can "unlock" with our machines, but a sort of safety-net seems to operate naturally where people who are emotionally and rationally unprepared for the implications of the work are simply unable to approach it.

How many minds could stare at a page of equations and recognize "the Destroyer of Worlds"?  If the atom bomb were a secret and somebody tried to tell you about it you'd think he was mad, no?  Even with the equations in hand it would be extremely challenging to realistically imagine the in-some-sense-obvious consequences.

I have access to a well-stocked electronics lab and I am sorely tempted to develop some new physical machines with unexpected properties to "force" the issue, but at the same time, my real interest is in helping people transcend, not in developing more distracting technology.

Honestly, I should go find a cave on the top of a mountain somewhere and just consider myself lucky that no-one is trying to nail me to anything.

Sunday, March 31, 2013

The Circle Computer

I was investigating G. Spencer-Brown's Laws of Form by implementing it in Python, and I found a very interesting interpretation in terms of the SK combinator calculus.

You can represent the "marks" of LoF as data-structures in Python composed entirely of tuples. For example:
  • A mark: ()
  • A mark next to a mark: (), ()
  • A mark within a mark: ((),)
  • and so on...

It is known that the propositional calculus can be represented by the "arithmetic of the mark". The two rules suffice:

((),) == nothing
() == (), ()

There are details, but essentially math and logic can be derived from the behaviour of "the mark".

After reading "Every Bit Counts" I spent some time trying to come up with an EBC coding for the circle language (Laws of Form expressed as tuples, See Burnett-Stuart's "The Markable Mark")

With a little skull-sweat I found the following encoding:

  1. For the empty state (no mark) write '0'.
  2. Start at the left, if you encounter a boundary (one "side" of a mark, or  the left, opening, parenthesis) write a '1'.
  3. Repeat for the contents of the mark, then the neighbors.

     _ = 0
    () = 100
(), () = 10100
 ((),) = 11000
and so on...

I recognized these numbers as the patterns of the language called 'Iota'.

Briefly, the SK combinators:

S = λx.λy.λz.xz(yz)
K = λx.λy.x

Or, in Python:

S = lambda x: lambda y: lambda z: x(z)(y(z))
K = lambda x: lambda y: x

can be used to define the combinator used to implement Iota:

i = λc.cSK


i = lambda c: c(S)(K)

And the bitstrings are decoded like so: if you encounter '0' return i, otherwise decode two terms and apply the first to the second.

In other words, the empty space, or '0', corresponds to i:

_ = 0 = i

and the mark () corresponds to i applied to itself:

() = 100 = i(i)

which is an Identity function I.

The S and K combinators can be "recovered" by application of i to itself like so (this is Python code, note that I am able to use 'is' instead of the weaker '==' operator. The i combinator is actually recovering the very same lambda functions used to create it.  Neat, eh?):

K is i(i(i(i))) is decode('1010100')
S is i(i(i(i(i)))) is decode('101010100')

Where decode is defined (in Python) as:

decode = lambda path: _decode(path)[0]

def _decode(path):
  bit, path = path[0], path[1:]
  if bit == '0':
    return i, path
  A, path = _decode(path)
  B, path = _decode(path)
  return A(B), path

(I should note that there is an interesting possibility of encoding the tuples two ways: contents before neighbors (depth-first) or neighbors before content (breadth-first). Here we look at the former.)

So, in "Laws of Form" K is ()()() and S is ()()()() and, amusingly, the identity function I is ().

The term '(())foo' applies the identity function to foo, which matches the behaviour of the (()) form in the Circle Arithmetic (()) == _ ("nothing".)

(())A =  i(i)(A) = I(A) = A

I just discovered this (that the Laws of Form have a direct mapping to the combinator calculus by means of λc.cSK) and I haven't found anyone else mentioning yet (although this article might, I haven't worked my way all the way through it yet.)

There are many interesting avenues to explore from here, and I personally am just beginning, but this seems like something worth reporting.

Saturday, March 16, 2013

Lord Kelvin's Thunderstorm

One of my very favorite mechanisms is the wonderful device of Lord Kelvin for separating electric charge. It is the second simplest electric generator (the simplest electric generator is the hydroelectrostatic generator described by Gurdjieff in "All and Everything" constructed in a cave in the middle of nowhere and otherwise unknown to science) and a cybernetic system to boot.

Lord Kelvin's Thunderstorm consist of a means for splitting a flow of water into two stream of droplets and arranging each stream so as to fall each into a separate bucket.

Conductors are lead from each bucket to the vicinity of the emitting nozzle of the opposite stream of droplets.

That is all.

Operation is simple:
  1. As the droplets flow they carry electric charge from the upper water to the separate buckets.
  2. There will be a tiny imbalance in the electrical charge of the two buckets.
  3. The conductor from one bucket will conduct the charge from that bucket to the nozzle feeding the opposite bucket, and vice-versa.
  4. This charge near the nozzle will attract the opposite charge in the nozzle, and thus in the droplets carrying charge to the bucket below it, and vice-versa.
  5. When these charged drops fall into the buckets they increase the charge in the buckets and the strength of the charge near the nozzles and thus the charge on the droplets that they then carry to the buckets.
A feedback loop is established that rapidly divides the charge on the water into positive and negative, uh, charge.

There are lots of videos on the Internet if you want to see this in action. It's pretty dramatic.

I wonder what would happen if you hooked up three dropper-and-bucket arrangements?  Wouldn't that be neat if there was some undiscovered "triune force"?

Thursday, March 14, 2013

The General Program, Part ()

A fellow named G. Spencer-Brown wrote a book called "The Laws of Form". In it he begins with the most fundamental, indeed metaphysical, logical "step" or "unit": the act of distinguishing ...

(Quite literally the first page of "Laws of Form" and the first verse of the "Tao Te Ching" are expressing the same thing.)

From there he goes on to derive all of logic and mathematics. He uses a simple formalism of "marks" that captures the behaviour of logic and equations.

Then, in "The Markable Mark", a fellow named G. Burnett-Stuart has created an interactive circle-based rendering of the "Logic of the "Mark" and illustrated the build up of higher-order systems of reasoning rigorously from that basis.

Check them out, they're very cool. (I'm working on a system that uses them as a basis for reasoning programs.)

Thursday, February 21, 2013

No Computers, No Money, No Cars

In "the future" there are no computers, no money, and no cars.

I wrote that to stimulate ideas about what "post-Singularity" life might be like.  We have some ideas about "Singularity" life, here's one example: an "Open Source Film Project"called "Heart of the Sun". The essential silliness of so much of this sort of techno-fetish fantasy stems from the lack of examination and comprehension of what one's "self" is.

Without going too far into it our "self" is that awareness of being at the core of us. We are that awareness, and everything else are only contents of our awareness.

It is typical to identify with our bodies, our emotions, our beliefs, our values, etc., and say, "I am..." to these contents.  But it can be easily shown that all of these contents, while having a temporary contingent existence, are impermanent and subject to eventual change and destruction.

(To get ahead of myself for a moment, this gives us the ultimate counter to trans-humanist fantasies: "And then what?")

We are awareness. All other phenomenon are contents of our awareness, including the entire physical Universe.

Now it doesn't matter what the contents are. You can be a starving homeless wastrel or a transhuman superbeing frolicking in the corona of the Sun, but if you haven't pierced the essential blindness of your condition you are just as trapped no matter what.

There is a direction which no one can point to, that leads to the place beyond places.

To arrive there is to pass beyond death and life, to remember yourself and return home.

(And there ain't any damn computers, nor money, nor cars there!)

Tuesday, February 19, 2013


What do I mean by the term "trans-rational"?

We all know what "rationality" is, or think we do, but for concreteness here is the (current as of this writing) first paragraph from the Wikipedia article:
In philosophy, rationality is the characteristic of any action, belief, or desire, that makes their choice optimal under a set of constraints. It is a normative concept of reasoning in the sense that rational people should derive conclusions in a consistent way given the information at disposal. It refers to the conformity of one's beliefs with one's reasons to believe, or with one's actions with one's reasons for action. However, the term "rationality" tends to be used differently in different disciplines, including specialized discussions of economics, sociology, psychology, evolutionary biology and political science. A rational decision is one that is not just reasoned, but is also optimal for achieving a goal or solving a problem.

A little further on it mentions that the "idealized form of rationality is best exemplified by computers".

But what if your goal or problem is already solved? What is the rational course of action in the absence of unsolved problems?

Friday, February 15, 2013

Post-Singularity? Really?

Yes, post-Singularity. Let me explain. Look at the following graphs (from the Wikipedia.)
Look at these graphs. They are "bell curves".  Many kinds of properties of things occur in distributions that look like this when they are graphed like this.

The green line is an exponential curve. (Ignore the red and blue lines, they are just hanging out, they're not part of this story.)
Now look at these graphs.  They are called (sometimes) "S-curves" because they look a little bit like the letter "S".

So what is the point? Why am I showing these to you?

Okay, first the "Singularity", as it's called, is the idea that our technology will exponentially accelerate and result in super-intelligent beings and radical technological "powers" (like living forever with super-medicine, etc.)

Most people who think or talk about this act like it's following the green line in the middle graph: accelerating ever faster towards infinity.

The more intelligent or thoughtful realize that we are actually in an "S-Curve" sort of a situation.  Right now we are moving from one flat bit to the next flat bit, and we're in the exciting and scary up-and-down bit just at the moment.

Now the interesting thing that I'm trying to bring to your attention is that not everyone is going through the up-and-down bit at the same rate nor at exactly the same time.

Some are going faster than others. And some have started earlier than others.

And some have started earlier and gone faster and arrived in the new flat bit ahead of the crowd.

Look at the "bell curves" in the first graph.  Imagine that a curve represented whatever quality it is, brains or smarts or whatever you like, that causes a person to begin to accelerate up that steep bit of the other curve, the "S-curve".

It only makes sense that some lucky bastards would arrive before everybody else, right?

Worth Knowing

Thursday, February 14, 2013

Cybernetics is a Thing

There is a basic fundamental result in Cybernetics that holds that any self-regulating system must contain a model of itself.  We can examine this in the operation of so simple a self-regulating system as the common household thermostat.

A common design for thermostats is to have a mercury switch attached to a bi-metal ribbon coil.  The two different metals expand and contract with temperature changes to close and open the switch, which then activates or deactivates the heating system.  The coil is adjusted by turning the dial to set the desired temperature.

Now it should be obvious that the coil "measures" the ambient temperature, and can thus be considered an "internal" analog model of the "external" temperature.  (I put "external" in quotes because the entire thermostat is always at that temperature so it is not exactly external, is it?)

It should also be obvious that the angle of adjustment of the dial and the way that that affects the "set point" of the mercury switch is an analog model of the user's desired temperature.

So where is the internal model that Cybernetic theory predicts must exist? The thermostat must contain a model of itself in order to operate, so where is it?

There's a model of the current temperature, that's the current expansion/contraction ratio of the coil.

There's a model of the desired output temperature, that's the angle that the user sets on the dial. That modifies the relationship between the current temperature and the mercury switch which controls the heating system.

Where's the model of the thermostat itself? Switch plus dial plus coil, so simple, how can this system be modelling itself?

I'll give you a hint: I left out the heating system in the above.  The system is properly:
Room + Air + Heater + Thermostat
Here's another hint: Other than the temperature, the only aspect of the system that the thermostat really needs to model to model itself properly is how long it takes to heat up the room.

Figure it out yet?  Once the temperature of the room reaches the desired temperature the thermostat does not cut off immediately.  The heater runs a little while longer and heats the room a little bit past the desired temperature. You can easily adjust the amount of the delay (and in fact there is a little screw in there just for that purpose) but if it's set correctly you generally don't have to.

But how do you know what the "correct" setting for that delay is?  Well, it depends on how long it takes to heat up the room.

That delay is the self-model in the self-regulating system of "Room + Air + Heater + Thermostat"!

That delay prevents the heater from switching on and off too often, which prevents wasting energy and keeps the room at the desired temperature more efficiently.  If the system changes, say between summer and winter, you can adjust that delay (internal model) to re-optimize the efficiency of the heating system.

Isn't Cybernetics cool?

I surrender.

Well, that's it.  I surrender.  I've had enough and I'm throwing in the towel.

To be specific, I've been "working" freelance since quitting my job a few months ago, and it hasn't worked out.

I don't want a job. I've tried that and it's not for me. (In fact I was contacted by a recruiter a few weeks back who had my dream job if there was one and I realized I didn't want it.)  I also don't want to try to manage a freelance practice, I lack the social and organizational skills.  I thought about hiring a manager, like a musician or other performer, and that seemed like a good idea.  Unfortunately it is unlikely that such a person exists or that I could find them if they did.

I do still want to help people with programming, both by teaching it and, to a limited extent, writing software.  I just don't think I'm in a position to make anything happen.  I'm not apathetic just content.

I don't need anything. I have no children, and no wife or girlfriend. I'm capable of living in any major city with a clement climate without using money. (Go on and ask me how, I dare you. Warning: the answer is "I'm fucking magic.")

Really I can't tell you how tempted I am to go sit by the CalTrain Philz Coffee with a sign that says something like, "Any computer question answered, FREE!" and see what happens.

Sadly, I expect nothing would happen.  Mostly I'd be ignored, some people might venture quizzical or bewildered looks, and eventually the police would politely ask me to knock it off, or not. The officers I see frequenting that café seem pretty chill.

If you have a question about computers, post-Singularity life, or "Spiritual Matters" ("WhoooOOOOooooOO!") go ahead and ask me.

Other than that, live long and prosper!

Eternal Life is Living Love.
~Simon Peter Forman

@SimonForman on Twitter
Google+ Profile

Saturday, February 2, 2013

How to teach anyone to program using Xerblin

I have long maintained that anybody who can solve a sudoku puzzle is more than capable of learning to program.  The Xerblin system provides a programmable metaphor for normal people to enable them to use their computers to greatest effect.

If you go step-by-step, in the right order, it is very easy to teach the Xerblin metaphor to anyone in about a half an hour.  This gives them the ability to program the various versions (firmware, server, web page) as well as a solid foundation to learn more.

Stack of Plates

Everyone already knows what a stack is: you put down a plate, and then put another one on top of it, then another, and so on. When you need a plate you take one off the top of the stack ("TOS").

Dictionary of Words

Again, everybody knows what a dictionary is: it's a bunch of words and their definitions. In Xerblin the words are all commands that work on the stack at first, but the user can "inscribe" anything they like in the dictionary.

Put Numbers on the Stack, Be a Calculator

So put some numbers onto the stack and use the four math commands to do some simple math.  Everybody knows how a calculator works, so you explain this as "just another kind of calculator." If you're doing it right they'll be getting impatient with you for explaining such obvious stuff.

Put "Strings" of Text on the Stack

Most people won't have encountered the term "string" for a sequence of characters yet, so be careful to explain that before you use it.  I've hit that whirlpool a couple of times.
"What's a string?"

"You know what a turtle is?"


"Same thing."

I'm not the best and most highly focused teacher sometimes.

Anyhow, put some strings on the stack. Show how they are just data like the numbers.  Add a couple of strings together.  Multiply a string by an integer. Go nuts.

Now that you have established that you can have a string on the stack...

Lookup & Inscribe

Show how the strings-as-data become strings-as-names. This is the power of names and is the single fundamental phenomenon underlying all computation and, indeed, all thought. The fact that one piece of the universe can serve as a "name" for another piece of the universe is completely incontrovertible and yet totally inexplicable.

This sentence does not describe itself.

Naming enables programming.  When the folks can put named things into the dictionary and get them back out again the key is in the lock.

Put a Command on the Stack

Turn the key, unlock the door. By putting a command word (function) onto the stack using a string as the name, it becomes data and can be subjected to manipulation just like numbers and strings.

This is the very essence of programming: verb becomes noun, action becomes recipe, and we can reason about the static pattern we see.

Programming is the alphabet of thought.

sqr() = (dup(), mul())

There is no one-true-computer-language (except Lisp, heh) in the same way that there is no one-true-circle, or one-true-triangle. But this metaphor is both useful and as simple as I could make it, and I have already taught several people how it works.

Now that I have a proper format I am teaching people how to use it in earnest. I have a client who is producing SVG animations using it.  (I'll add links when he's ready to publicly show it off.)

I see a great potential for programmability to become commonplace. It would make developers' lives easier and free users from the tyranny of crappy interface design.

Thursday, January 31, 2013

Legos are my Poison

Legos are my poison of choice.  That LEGO Deathstar? Yeah, they've got my number.

For some it's model trains.

We tend to discount these activities because they are economically non-viable.  "Grown men playing with toys."

Well, are you in the manufacturing sector and not doing 3D printing and/or nanotech?  Go home, you are playing with toys. How about energy? Are you building a molten salt nuclear reactor? If not, you're just playing with toys. Are you in the health sector? Paying attention to Reiki? If you are not doing far out "energy healing" then you are just playing with toys.  Whatever those (as my mom calls them) "woo-woo" folks are doing there is something there. Let us do Science to It!

We are in that part of the S-curve that goes pretty much straight up and down and if you are not on the way up, brother you're going down.

If you are not preparing for a world of infinite energy and infinite malleability then you are, in effect, like a child playing with toys and refusing to deal with reality.  You should be feeling giddy or you're not doing it right.

Wednesday, January 16, 2013

new_group 2500 300 45 "x" make_effect trans

Every once in a while I write some code that is so cool it makes me ecstatic.
new_group 2500 300 45 "x" make_effect trans
I'm working on a single-page HTML document that implements a kind of theatrical stage using SVG and D3.js with my Xerblin user interface metaphor.

Last night I got it to a stable point where my task shifted from creating the internal structure to "sculpting" a set of commands that will make it easy to create animations.

I started with a simple command word new_group that creates a new SVG "group" element (this is a kind of invisible container, like a HTML div element) inside a D3 selection and puts it on the stack.  In order to see it I made it also automatically create a green rectangle in the group.

The idea is that you create a new group and add visible SVG elements to it to create "characters" or "props" for animation.

I'll write some words to do that later, but for now I have created a command word set_attr that takes three things from the stack: a D3 selection, an attribute name, and a value, and it sets the attribute on the selection.

This lets you directly and immediately modify all the SVG attributes of an element (or set of elements) including position and transforms!

I also created a make_effect command word that takes just an attribute name and value from the stack and returns a function that can be used to modify attributes as part of a D3 transition.

To provide D3 transitions (awesome animations!) I made a trans command word that takes a D3 selection, a delay value, duration value, and an effect function (as created by the make_effect command word) and applies the effect to the selection with the given delay and duration.

So, breaking it down:

This creates a new group with a green rectangle in it to make it visible. It will be put on the stack.

2500 300
This puts two integers onto the stack. These will be our duration and delay values in milliseconds.

45 "x" make_effect
These three commands first put 45 and the string "x" onto the stack, and then the make_effect word turns them into an "effect function".  At this point the stack has the group/selection on it, followed by the duration and delay, then the effect function.

Then the call to trans applies the effect to the group with the given duration and delay.

If you go to the demo page and put that command into the text entry and press "run" you should see a green rectangle appear and move to the left. Wow, right?  I know!


I forgot to include information on the command system "Xerblin" itself.

This is an old project of mine that defines a really simple but complete programmable command system.

The original project page has some basic description:

I've merged the Xerblin user interface into my educational Pigeon Computer project, and the manual for that has more info:

On the live page you'll see:

  • "Hi There!"
  • The SVG window, about 3X wider than high.
  • Buttons for each of the command words in the dictionary.  (If you "inscribe" new words in the dictionary they automatically get a button here.)
  • A long text entry for "command line" interaction. (Don't hit enter, there's a bug that I'm about to fix that makes the page reload! D'oh!)
  • Two sets of three buttons that provide "meta" commands, interface commands that aren't in the dictionary.

I should write up the meta-controls but for now just put this in the text entry and click "run" button:

new_group 2500 300 45 "x" make_effect trans

You should see a green rectangle appear and immediately animate moving to the left.


Just as a hint:  already with this interface and these controls you can create as many of these "groups" (visually represented by the green rectangle outlines) and animate them (including scale and rotation!!) and attach the animations to new buttons/words in the dictionary.

Not bad, eh?

Tuesday, January 15, 2013

Single-page Xerblin with D3.js

I spent a few hours today porting my "xerblin" user interface metaphor to Javascript.

I've been developing a d3.js-powered page to experiment with dynamic visualizations.  Once I had a fun demo going it seemed obvious to use it to wrap the xerblin system (I'd been planning to do something like this for years and years.  I created a 3D system in Tkinter to support it but never got enough traction with it until now.)

At first I had a simple Flask server that responded to commands, updated a xerblin interpreter, and sent back a representation which was then rendered client-side with SVG.

I spent a bunch of time playing with different ideas for permitting the server-side xerblin interpreter to specify client-side dynamic visualizations.  At some point it just seemed like it would be simpler and much cooler to port the xerblin core to JS and just have a self-contained page.

This means that you can go to the demo and "save page as..." to your desktop and play with it locally! You don't even have to check out a copy from github or anything.

This is inspired by the TiddlyWiki project which is a self-contained single-page HTML and JS wiki document.  I love it.

TiddlyWiki has the ability to save copies of itself to your file system (if you permit it) and it will automatically save backup copies.  It should be fairly easy to let the stand-alone D3+Xerblin demo save itself (with your current state aptly serialized!)  It might also be interesting to save state in a cookie.

Does it Do Anything?

So really you should read the source (and modify it!) but I'll write up a simple tour soon!

Keep in mind that there aren't really any commands for anything other than the xerblin "not-quite-language" itself yet, as this is very much a work in progress and fresh out of the oven.

Monday, January 14, 2013

Riches and Roses

I'm at the point now with the user interface I'm working on (playing with!) where I am confronted with an embarrassment of riches in terms of wonderful design choices.

I'm finding the separation of (graphical, dynamic) user interface from the underlying virtual machine (the xerblin not-quite-language runtime) to be extremely useful and gratifying.

Because the Flask server does not reload the Python interpreter state when I change a template file I can adjust the SVG rendering code and refresh the browser to see the same state rendered with the new code!

Right now I have come to the point where I am creating dictionaries (in xerblin these are sorted binary trees made of tuples, too much to get into here, persistent data structures) to represent SVG elements, as one possibility for "internal" authoring.

Because the dictionaries arrive from the server as JSON arrays, and because the display code is already written to recursively display array contents, the  contents of the dictionaries are already automatically rendered.

Only it doesn't look great.

The array code was written (last night, at 2am) to display linear stacks, but the dictionaries are binary trees, so they sort of pile onto themselves when rendered.

It makes for lovely fractal patterns that are really beautiful to look at, but they could be more useful...

Now I can leave a dictionary on the stack and edit the rendering code to try out different tweaks for displaying arrays, and when I refresh the page I'll see the same dictionary rendered with the new code I just tweaked.

"Roses, just roses..."

Finally Beautiful Web Xerblin

I am working on a D3.js-powered "web console" of sorts for the xerblin user interface.

It's a simple Flask server that wraps a xerblin world and provides a single AJAX call the runs a command on the server and returns a (JSON-encoded) copy of the xerblin state.

The Flask server also serves a web page that includes an SVG display and controls.  You can execute commands through the AJAX call and the returned state is automatically rendered in the SVG using D3.

That's essentially what you're seeing in the screenshot above.

Myriad details

  • It will be very easy to include the git-based permanent history store from the Pigeon User Interface in the Flask server to provide persistent history across sessions.
  • The server is designed to be run locally on a per-user basis and there is currently no support for hosted multi-user set-ups.  This could be done but it's not something I'm interested in personally.  (I think the biggest challenge would be setting up resource quotas.)
  • You can certainly run the Flask server and xerblin instance on one machine and the browser and "thick client" on another machine.  In the near future the web page and server may act as a front-end to Pigeon Computer machines (small micro-controllers running the xerblin-like Pigeon Firmware) but that would require more support from the firmware or something.
  • The internals of drawing the xerblin stack with set of recursive D3.js funcs have some gnarly and interesting stuff.  It works but I think I'm doing strange things in a few places.
  • In order to give you a dynamic sense of the history of your interaction the SVG rendering keeps the previous stack displays visible in the window but it moves them aside, scales them down, rotates them a little, and finally makes them partially transparent.  The net effect is like a fractal, depending on what you're doing, of course.
  • It should be fairly easy to provide a REST API that permits viewing and returning to earlier versions of your xerblin state.  I have high hopes for rendering things like this with the SVG and D3.js capabilities.
  • Next on the list, though, is some sort of generic way to build SVG data structures using the xerblin interface itself, as well as D3.js transitions and such, and then rendering those in the SVG window.  This will let you create whatever visual user interface elements you like.  I want to create sort of a Squeak-light, if you will.

Sunday, January 13, 2013

Web as Theater

Screenshot of a D3.js demo
The most cutting edge human-interface design is so far out there most people can't even conceive of it.  (TODO: mention Ted Nelson!)

The ultra-violet end of the spectrum has to do with treating the computer as theater (and if you think Pixar et. al. are doing what I'm talking about, no, not that, something else.)

This is a wee demo I've started to play around with user-interface theatre.  It's meant to be fairly self-explanatory. "Discoverable".  Have fun.

Thursday, January 3, 2013


You are in the future, and wish to travel to the beach. The beach is far, far enough that today you would have to take a car. Here is how it is in the future:

You step outside and begin to walk.  The transport appears in front of you at a comfortable distance. It is a large sphere nearly the size of a house. There is very little sound and no wind.  The mechanism of the transport moves the air around the body of the vehicle in such a way as to prevent turbulence.

The doorway of the transport dilates and you continue your comfortable pace into the interior, which is simply a short path leading to the doorway at the rear of the transport.

You enter, the door closes, and the transport moves to the beach. It travels at a terrific velocity and can accelerate and decelerate extremely rapidly but these forces are not felt by you at all as you continue along the path within the vehicle.

The rear door dilates and you continue on towards the nearby beach.  The transport leaves to serve another user.

The entire trip within the transport lasted less than five seconds and throughout your journey to the distant beach you were simply strolling without breaking stride the entire time from your front door to the breakers.

Wednesday, January 2, 2013

My Life as a D&D Character

I don't normally dwell on my own past.  In fact, most days I would be hard pressed to tell you what I was doing just a few days ago, except in a general way, and it would be the skull-sweat work of several minutes to try to reconstruct it from what dim memories I might dredge up.

I'm simply not that interesting to myself.  It's not that I lack self-regard, quite the opposite in a certain operational sense.  However, mine is a life of ideas and grand visions, and the day-to-day nitty-gritty of living it out just doesn't register much.

I collect, even hoard, ideas.  A friend who was into astrology once told me that this was because I was a Taurus with Mercury conjunct the Sun in the sign, or first house, or something, and that the typical Taurus tendency to collect material things therefore accrued in me to concepts instead.  It seemed apt.

Anyhow, be that as it may, from time to time I do become interested in myself as myself (rather than as instrument or way to get from here to there) and tonight is one of those introspective nights.

I'm not an astrologer. I know enough astronomy to know that astrologers, whatever they are doing, are not actually talking about the real sky. And I know enough astrologers to know that what they are doing (some of them) is not nothing.  (Too bad they are such headstrong jerks about not taking themselves seriously the right way: do science to it sillies!)

The best astrologer I ever met could tell you things about yourself from reading your chart that would just blow your mind.  This was with a "cold" start, walk in off the street, give her your birth-data and WHAM! Get ready to grow or freak out!  Strange thing was, her chart program had been set to the wrong timezone when she first set it up so all of the charts she ever ran with it were "wrong". Go figure.


What I have been in the past is an avid AD&D player (usually as DM but also as a player.)  I understand that the WotC people have acquired the system from ye olde TSR and have not completely wrecked it, is that right?

Whatever.  Read Gygax and be knowledgeable.  The old DM's guide was a freaking education in itself.  There is all kinds of stuff in there: the old flower language for instance.

So, I've been thinking about myself and how I would describe myself as an AD&D character.  Sort of an autobiographical sketch in RPG space. Without further ado...

I started out thinking about my alignment in AD&D terms.  Just to refresh your memory the alignment system was a simple two-axis grid with Good-Neutral-Evil as one axis and Lawful-Neutral-Chaotic as the other.

Angels and Devils would be archetypal Lawful-Good and Lawful-Evil, respectively. (Devils are evil but they will keep a contract or bargain.)

Good and evil, and neutral, are pretty easy to understand. Lawful referred to the tendency to obey laws and keep one's word, while Chaotic characters were unreliable or unpredictable.

Okay, so, when I first stared out, as a wee little kid, I was lawful-good. By the time I got to high-school with the trauma of childhood I had become chaotic-evil. Then during high school I finally found some cool friends and started smoking marijuana and that really helped me cope, and I swung to chaotic-good.

Finally, after much work on myself and twenty years down the line, I'm back to lawful-good. Whew!  But it is a much higher-order ("wiser" is the word I'd like to use here but that would be pretty pretentious, wouldn't it?) form of lawful-good than when I was a young child.

I don't know why exactly but it feels kinda good to map this out this way.