July 2014
M T W T F S S
« Jun    
 123456
78910111213
14151617181920
21222324252627
28293031  

Categories

Archives

My New Ergodox

I’m writing this post using my new Ergodox keyboard, and having a hell of a time adapting to the lack of a slant between the rows of the keys! For example I continue to hit the “x” key when I intend to hit “k”. I have also re-positioned some of the control keys, such as backspace (which now gets hit by either pinky knuckle), control (which used to be mapped to caps-lock on a conventional keyboard), and enter. I also noticed that my thumb naturally rests between the [space] and F1 keys. Overall, my hands feel very splayed-out. Not just as a result of resting my thumb on a far-away [space] key, but also because the distance to keys has changed. The change in slant between rows has altered the positions of keys further away, such as the numbers and symbols.

Anyway, here are some pictures of the assembly process, which took all day, the final result, and the layout that I’ve programmed. Typing will definitely take some getting-used to, and the cherry mx-blue make very loud clicky sounds.

Assembled Ergodox

ergodox-assembled

Layer 0

Ergodox-layer-0

Layer 1

Ergodox-layer-1

Promised Properties


Three weeks ago I started a new project that uses nodejs and which forced me to learn some asynchronous programming. I couldn’t quite manage to adapt.

Because this was server code that ties together other web services and my own database, many of the helper functions ended up having multiple asychronous steps. The lack of return values strongly pressured me to nest long chains of anonymous functions. As if that wasn’t bad enough, they style also encouraged inlining the details of each step, which made identifying and factoring out common code, all the more difficult. Because of the nesting it was far easier to factor out steps near the end of the chain instead of those in the middle. Compared to conventional synchronous programming, this callback model felt like programming inside out. So I went looking for other options. I watched a video on promises, by the implementors of the Promises/A+ spec and q module.

They pointed out 3 important deficiencies of the async callback model, all of which were contributing to my difficulties:

  1. Syntactical nesting pyramid of doom.
  2. Lack of a callstack when reporting errors.
  3. Lack of return values, who would receive them without a callstack?

The convention synchronous programming model has three ways of returning results (return value, throw error, and side-effects), and the async callback model abandons the two most important ones! Thankfully, promises gave them back to me. I spent a day rewriting all the broken async callback code that I had written, and it’s taken about a week to really grow comfortable with the new style.

Yet, some conveniences are still lacking. The promise chain does not hold temporary values such analogous to having stack-local variables in a multi-step function. We currently achieve the same effect through closures in anonymous functions, as shown in an example at q’s github repo.

function authenticate() {
    return getUsername()
    .then(function (username) {
        return getUser(username);
    })
    // chained because we will not need the user name in the next event
    .then(function (user) {
        return getPassword(user)
        // nested because we need both user and password next
        .then(function (password) {
            if (user.passwordHash !== hash(password)) {
                throw new Error("Can't authenticate");
            }
        });
    });
}

But if promises promote code flattening as an strong benefit, then we ought to support something like stack storage. I propose the addition of two functions:

pput(name)
Take the return value of the current promise as a property with the given name on the current promise and return the current promise.
pget(name1, name2, …)
Retrieve the properties with the given names on the current promise and return them as an array-fulfilled promise, or a single value-fulfilled promise when only one name is given.

All the other promise functions (e.g. then) shall copy the defined properties along the chain. Using promise properties, we can flatten that example code.

function authenticate() {
    return getUsername()
      .then(getUser)
      .pput('user')
      .then(getPassword)
      .then(function (password) {
          // grab the user property from the promise
          if (this.user.passwordHash != hash(password)) {
              throw new Error("Can't authenticate");
          }
       });
}

Notice that inorder to provide both the attribute that was pput on the promise, I also had to change the target reference of the this pointer, so that it points to the promise rather than the global object. I am not sure whether others shall find making that change acceptable or not. If not we can modify the existing chain operations so that they pass the promise in explicitly. So the then function would become pthen. In that case the example would read something like the following.

function authenticate() {
    return getUsername()
      .then(getUser)
      .pput('user')
      .then(getPassword)
      .pthen(function (promise, password) {
          // grab the user property from the promise
          if (promise.user.passwordHash != hash(password)) {
              throw new Error("Can't authenticate");
          }
       });
}

If we want to keep ourselves restricted to only the proposed pput and pget, we’ll just have to do a little extra storage and retrieval work.

function authenticate() {
    return getUsername()
      .then(getUser)
      .pput('user')
      .then(getPassword)
      .pput('password')
      .pget('user', 'password')
      .spread(function (user, password) {
          // grab the user property from the promise
          if (obj.user.passwordHash != hash(obj.password)) {
              throw new Error("Can't authenticate");
          }
       });
}

OpenHardware Keyboarding

Looks like some individuals have had nearly the same thoughts as I have on the state of keyboards. The progress looks good.

Key64 has some good prototype hardware. The keyboard is short on keys and compensates by having layers bound to modifier keys, which appear mostly on the thumbs! Recall that I wanted to make the thumbs work harder in my post on the configurable keybord.
key64

 

Another fellow has taken inspiration from Key64 to create Ergodox. His site contains PCB and 3D printing files so I could theoretically create a keyboard myself.

ErgoDox_001

 

Finally, KeMice has an indiegogo campaign to create a lightweight, portable split keyboard with the right side acting as the mouse. If only they’d gotten the layer feature via meta-keys, I’d be contributing.
KeMice

Notes: International Students for Liberty Conference, Matt Zwolinski, How to Talk About Liberty Without Sounding Like a Jerk

Matt runs the Bleeding Heart Libertarians blog. He started off with An Argument:

premise: Libertarianism is True
observation: most people don’t belive that.
conclude: They are either wrong and evil, or they have never heard of it.
given people have heard of it.
conclude: Most people are wrong. They either don’t know (stupid) or don’t care (evil).
therefore: We don’t have to listen to them.

But it pays off (socially) to listen to those that disagree with you. Disagreement is reasonable and we still desire to reach the truth.
– empirical issues are complex and difficult (ex: minimum wage law, or ObamaCare)
– beliefs subject to psychological bias in analysis (ex: motivated reasoning, non-objectivity)
– moral values are plural and conflicting

Language of Politics, Jonathan Haidt’s Moral Foundations.
People have different weights on the following spectra:
1. Care/Harm
2. Fairness/Cheating
3. Liberty/Oppression
4. Loyalty/Betrayal
6. Sanctity/Degradation
– liberals value 1,2,3 highly
– conservatives use all 6, but differ in nuances (ex: fairness in outcome vs effort). 4,5,6 can override 1,2,3.
– libertarians focus almost exclusively on 3 [Understanding Libertarian Morality: The Psychological Dispositions of Self-Identified Libertarians]. So they have THE TRUTH, and NEVER have to worry about moral conflict. They ask “who owns the trolley?”, and bring out the property rights. To others this looks like they’ve lost focus (not everything is a nail) or an appreciation of life’s complexity.

Arnold Kling’s The Three Languages of Politics.
1. Oppressor/Oppressed (the liberal’s focus)
2. Barbarism/Civilization (the conservative’s focus)
3. Coercion/Freedom (the libertarian’s focus)

To persuade others, libertarians need to be multi-lingual.
- A person doesn’t communicate well if they only speak in their own language. Others won’t hear you, you won’t hear them. “seek first to understand, then to be understood”.
- If only see coercion/liberty then you will fail to appreciate other moral values. Oppression, fairness, care, loyalty aren’t mistakes. They aren’t reducible to the ONE TRUE VALUE (coercion). “There are no solutions, only trade-offs”

Consider the sweatshop debate.
Libertarian: It’s OK as long as it’s not coercive.
Option 1: Government determination of wages/safety is coercive.
Option 2: Government interference will harm those it tries to help.
The second option is more persuasive. Also more philosophically sound. It’s far from obvious that coercion is absolutely bad. How confident is the libertarian that “coercion == bad” is correct, and their debate opponent is mistaken?

Lessons:
1. It’s complicated. Be forgiving.
2. Conversation is not conversion (that takes many conversations over time).
3. Look for areas of common ground, and build on them. Find areas with lots of overlap. (good heuristic).

Notes: International Students for Liberty Conference, David Friedman, Problem of National Defense

Defense without Government
—————

- government bad at doing things, esp complex things (ex: legal systems)
am willing to accept government solution when alternative is worse
- court and police aren’t complicated enough to require government
- define National Defense as invasion defense from a neighbor nation
- define Public Good as that where the producer cannot control who gets it (ex: radio broadcast)
often economical to privately produce when combined with public bad (ex: advertisement)
– can’t guarantee that a free market produces it
– but must propose a funding model. imperfect, but better than government

- founders of the constitution had a good idea with 2nd amendment, mentions militia
– prob1: Oliver Cromwell proved that a small professional army beats larger unorganized amateur army
– prob2: A large professional army can perform a coup de etat
– soln: combine a small professional army with a large unorganized militia
– we can take that solution and modernize it

- Rudyard Kipling: anarchist poem, story Army of a Dream
– piggy-back off national pastime, popular sport that include mock wargames
– result: everyone is trained in combat as a side-effect
– it’s social and voluntary
– ex: David himself participates in the Society of Historical Anachronism
– modernize: paintball, already proven popular and profitable
can be encouraged with nationalistic pride

- now we have a large body of amateurs, only need the small cadre of professionals
– what about the PR advantage of an Apr 15th parade where
Apple, Google, etc. fly drones/jets in shape of logo or do acrobatics

- Some stories that David won’t write http://www.daviddfriedman.com/Miscellaneous/story_ideas.htm
– in battle of govt vs. market, david’s trying to find atypical alternatives: cultural, open source
– problem with funding the small professional cadre
– possible solution: taxicabs have 1$billion non-repeat customers
– can encourage cultural factors: war bonds, weapons donation
– example: Larry Niven, Oath of Fealty, the private organization that plays the role of government will receive some nationalistic loyalty
– example: Cloak of Anarchy (it’s actually an anti-anarchy story)
– example: The Ungoverned, Vernor Vinge, assumes state is poorer and backwards compared to anarchy
Mexico (invader) doesn’t think to go around when someone defends
Mexico: What slime you are to use nukes against us!
Private Security: What do you mean us? He’s not a customer of ours!
– No current wealthy developed country is worth invading
– if rich, no profit in it
– if poor, can’t afford to

- Moral arguments are inadequately convincing
– Hume’s ought from is problem
– don’t have to win, the range of differences is not all that much
– often can’t agree on hypotheticals anyway
– ex: Orwell’s review of Hayek and Road to Serfdom and Zilliakis The Mirror of the Past
he misunderstand market power
– David’s chosen consequentialism because the economics and reason easier to explain

- What about the warlord problem
– the accumulated wealth of the richest family (Walton’s) could pay for only a couple days of today’s government

- David would advocate gradual change, to establish alternatives (ex: voucher education)
- Anarchy doesn’t require uniform culture
– donations for common defense can come in many forms: spying, information, reporting, bonds, equipment
– Cadre is interacting with the culture
– conferences on the latest weapons tech, training classes, etc..
– might be able to use gift economics (ex: open source)
– businesses employs basic research scientist as a cultural resource (informant)
– status motivation
- Mechanism of outrage is not all that good
– ex: in South Africa, Americans never upset about Black on Black Nigerian Civil War
- Future Imperfect,
– we are really rich today, even the undeveloped is 10x more wealthy than historical norm

References:
– Future Imperfect
– Orwell’s critique of Road to Serfdom
– Cloak of Anarchy
– The Ungoverned
– Oath of Fealty

The Chording Keyboard

In the past I wanted to have a keyboard, split between both hands, with keys in rows shaped according to how my fingers are able to move. It seems that, as far as recording human speech is concerned, syllable-based chording keyboards, as used by stenographers, are more efficient. I’m not fully convinced that it would work for programming, because of the dependence on individual characters. However, I do lament that the experiment wasn’t performed. Looper OS points out the beginnings of that experiment in Englebart’s Violin.

motd_ui

First trip to Nicaragua

Due to unreasonably heavy traffic in Los Angeles (before the sun came up!) and a slow, cautious driver (my mother), we arrived at the airport after the designated check-in cutoff. I blame the government for subsidizing the car culture and for erecting a “security” barrier. So, upon arrival to the byzantine LAX, we immediately had to queue into a short line of 7 people that took an hour of wait before we could re-book another flight at exorbitant price. Of course, the new schedule meant that we would have an overnight layover at Miami. I found the new schedule especially frustrating, because our previous flight from Miami to Nicaragua left only 20 minutes after our new flight landed. But 20 minutes is not enough time to pick up a checked bag from the carousel, which lies outside the “security” barrier, and re-enter the airport. As we exited our plane, I chatted on the phone with another member of the party, as they boarded the originally scheduled flight to Nicaragua. We were both in the airport, only a couple terminals distant, and yet government made us impossibly far apart! For its security barrier cost more than the 7 minutes it would have taken to walk between terminals, incurring an overnight layover in Miami.

Fortunately our compatriot travelers were kind enough to stay in a hotel in Managua and wait for us to arrive around lunchtime the next day. My broken schedule notwithstanding, the others were also tired of dealing with the hassle of airport travel, and simply didn’t wish to follow that up with a long drive through the countryside at night. Not to mention that the furniture at our final destination, the Cacao Farm and Eco-Resort, had not yet been fully assembled.

When we arrived in Managua, a guy with our names on a card met us after disembarking the plane, he took our bags to be screened while we waited in nice chairs and had sandwiches and water with our fellow travelers that arrived the day before. Compared to the horror of customs screening when entering the USSA (as a citizen no less!) makes my home country feel uncivilized, paranoid, and backwards. In Managua, I felt like a guest rather than national chattel.

The car trip to the Cacao Farm and Eco-Resort had many rural sights: cows, chickens, pigs (all pretty scrawny by hormone-pumped USSA standards). Folks by the roadside holding up carcasses for sale to the cars passing by. The road had light, and highly diverse traffic, including buses, motorbikes, bicycles, rickshaws, and pedestrians. The green countryside featured rolling hills, blue skies, a large lake. Combined with the temperature in the 80s and high humidity, I felt a glowing, restful, and scenic warmth. Again, in stark contrast to bland concrete, oppressive traffic, noisy bustling of cities the USSA. In Nicaragua, road travel does not induce any feelings of rage.

After about 2.5hrs of driving along the countryside and dodging some obstacles (road rules are widely ignored and not strictly enforced) we arrived at the Farm. A crew of hardworking, and sweaty, lads were busy laying the brick walls of the new shower and toilet facilities. I later found out that our Farm’s construction work had saved the organizer and members in his team from toiling in a minerals mine, and they were quite happy to have the more pleasant labor of erecting small buildings in the open air of the jungle. I noticed that their daily labor acts as a continuous gym exercise, unlike the pale, flabby bodies of desk workers in the First (worst?) World.

That evening a shipment of 500 Cacao plants arrived and we assisted in their unloading through the heavy smell of fertilizer. We failed the race with diminishing natural light, but re-discovered the efficiency of bucket brigade in loading and unloading of crates and wheel barrows. Not having a kitchen of our own, we then re-convened at the neighbors for a meal of rice, beans, tortillas, and salad after a short break once we finished the labor. The bug population loves incandescent lighting and I found a black scorpion in the outhouse.

Throughout the trip weather was quite warm, but not overly hot (unless you happened to be exercising) with high humidity. I found the conditions during the day to be quite enjoyable because the moisture kept the dust down, alleviating my allergies. At night, however, it was a bit too cool for my tastes, and required a light blanket, which felt a little damp.

We took a sweaty excursion around the property in the company of a plantation expert, who pointed out what good soil we had, areas of drainage vs pooling water, the need for shady areas so that young Cacao plants have a chance to develop, etc. The resort has a nice, smallish mountain which possesses a fantastic view and would make an excellent place for a coffee shop or vacation house. There is also a stream burbling through which is already dammed in one place, with plans to provide for water storage that can be used later during the dry season.

The Farm also has a rooster, which crowed all night, and a cow that shat all over the front porch, creating a big mess. Animals do not make very good neighbors and so they shall be taken out to pasture and prevented from entering the resort with a barbed wire fence. The land for the resort contained too much wild brush for me to judge a good place for my plot of land. I decided that I’d feel much more drawing lines when given an overhead picture (akin to plane or satellite). Much to my reassurance, others felt that purchasing a quadcopter to obtain photos of the property would assist both sales and surveying. The resort does not yet have internet access, though Claro provides 2g along the main road. I’ve recently been researching the equipment necessary to provide wifi routing in the main plaza. I think a functional (though low-capacity) ~$300 router could be installed with a day’s labor, and $30 recurring service expense spread across 3 semi-permanent residents and 8 irregular visitors.

The travel back destroyed, the serenity I felt during the visit. Security entering the USSA was a huge hassle, and blatantly ineffective. For example, my mother had with her both a carry-on and a purse. The carry-on contained an unopened, still sealed, bottle of water. You know, the kind that they sell after passing through the hassle point. The bottle was so dangerous it threatened the entire country, and our security official literally tossed it a few feet into a regular trash can. When waiting at the terminal, my mother then found an opened, half-drunk bottle of water in her purse, that passed through the same checkpoint undiscovered! Queuing through the system of lines stressed my need for efficiency, the paperwork felt stupid and pointless, the questions hectored my patience, and the unwarranted invasions made me feel victimized. As a traveler, and chattel of the USSA, I don’t feel any safer for the pretense of security. I feel robbed and extorted, my right to free movement violated.

Idea: e-ink Poster

I’ve noticed that many companies are paying an enormous expense to have animated advertisements. They pay for huge billboard-sized signs bright enough to be seen during daylight. Previously, the hardware for this kind of thing was only affordable by sports arenas, which made money back on the investment with advertising to the captive game audience. But, it’s not just billboards, as restaurants now also put their menu up on large flat-screen televisions, despite the fact that the menu really doesn’t change very often. I guess they see the recurring cost of electricity for both the monitor and computer that drives them as less than reprinting of the menus.

Wouldn’t it be better to have a large e-ink display? They don’t require much power, don’t need to be lit, and most ads still don’t animate very much. Just put some image file on a usbstick, plug it into the e-ink poster, and run for a month or so on batteries (or solar power). Seems like this is far less costly, I’d expect the market to explode once someone manufactures such a poster.

Some Interesting Titles

I’m moving, and have decided to toss a number of printed papers. I record them here, in the insignificant chance that I might return to the topics covered.

Religious Experience

In a piece titled Islam and the Misuses of Ecstasy, Sam Harris takes issue with some atheists about their distance regarding the motivations of religious believers. I, unfortunately, share the perspective that Harris critiques.

I once ran into the anthropologist Scott Atran after he had delivered one of his preening and delusional lectures on the origins of jihadist terrorism. According to Atran, people who decapitate journalists, filmmakers, and aid workers to cries of “Alahu akbar!” or blow themselves up in crowds of innocents are led to misbehave this way not because of their deeply held beliefs about jihad and martyrdom but because of their experience of male bonding in soccer clubs and barbershops. (Really.) So I asked Atran directly:

“Are you saying that no Muslim suicide bomber has ever blown himself up with the expectation of getting into Paradise?”

“Yes,” he said, “that’s what I’m saying. No one believes in Paradise.”
At a moment like this, it is impossible to know whether one is in the presence of mental illness or a terminal case of intellectual dishonesty. Atran’s belief—apparently shared by many people—is so at odds with what can be reasonably understood from the statements and actions of jihadists that it admits of no response. The notion that no one believes in Paradise is far crazier than a belief in Paradise.

In his practiced, careful, methodical, and eloquent monologue he proceeds to cite and reference many examples of religious practice, specifically Islamic practices, that touch deeply the human psyche and elicit emotional response. As a subjectivist seeking internal wisdom, Harris has himself explored this aspect of human psychology, and definitely speaks as a first-hand qualified source.

I don’t know what Harris would think of me. For, when I watch the videos that he describes as beautiful and captivating, I feel annoyed at singing and music in the call to prayer, find the popular Nusrat Fateh Ali Khan just plain silly, and experience a revulsion at the coordinated motion of the crowds. No wonder I’m not religious, I don’t live in the same world of experience.

Instead my emotions are muted, and I like to believe they are firmly tempered by logical understanding. In reality, my ego plain refuses to let go and abandon me to a mob trance. Perhaps this is the case also with academicians like Atran, who overwhelmingly reside in the INTJ category of Myers Briggs. Yes, it’s illogical to assume that everyone subjectively experiences the world in the same way. Yet shortcut reasoning has us use our own personal experience as proxy for others. So we erroneously conclude that “No one believes in Paradise.”

My brain is likely abnormal in some way such that I don’t experience Harris’ evidence as beautiful, but rather the opposite: participation would be a direct threat to my ego-valued independence. I know I’m not the only one. How frightened the mob of normals must feel to encounter such an alien in the midst.

Finally, Harris drives home his point: Islam takes these emotional triggers and couples them with a message of hate for the unbeliever. This strategy (an evolutionary adaptation of the religious meme) is the most frightening thing I have ever seen. Harris is right to counsel the world of Islams inherent dangers. For, it is inevitable that this tool of mass hypnosis will fall into a trajectory that compels violence, destabilizing the World.

As an aside: I also take Harris’ observation to indicate that to the degree that a political/social organization framework needs independence of thought and action to function properly it will experience failures when actually used. For psychological techniques that religion uses show that the vast majority of people are herding creatures.