Weekly Head Voices #146: You too can learn Kung Fu.

This post covers the period Monday June 11 to Sunday June 17. Read it to become rich, yawn at Lisp and Emacs, yearn to run free on the wide open plains and to learn Kung Fu. Not ambitious at all.

Front door nearby De Waal Park, in Cape Town. Photo taken on Sunday by GOU#1, age 12.

Social Democracy FTW

It turns out that your chances of becoming rich are the greatest if you had the good fortune to have been born in one of the Nordic social democracies, such as Norway, Sweden or Denmark.

The US trails these countries, at position 13, in terms of per capita individuals with net worth over $30 million.

Being a proponent of social democracy as the most humane form of currently practical human government, and often infuriating conservatives   by pointing out that many crucial aspects of social democracies can be described as socialistic, I really enjoyed the linked TEDx talk by Norwegian Harald Eia.

This material will serve me well as the source of future mischief.

Paradigms of AI Programming in Common Lisp

I am currently working my way through “Paradigms of Artificial Intelligence Programming: Case Studies in Common Lisp”, Peter Norvig’s famous 1992 book an artificial intelligence. Although modern AI has been transformed almost unrecognisably since then (THANKS DEEP LEARNING! Norvig’s PAIP retrospective) the way in which Norvig uses Lisp to model and solve real-world problems is inspiring and quite foundational.

It’s not only that though.

My inconvenient but uncontrollable infatuation with Common Lisp also seems to be pulling the strings. I should study a real language which is not 60 years old, like Rust or something.

What attracts me about Common Lisp is the liberated and pragmatic way in which it enables one to mix functional, object-oriented and procedural programming, and, perhaps most importantly, how it was designed from the ground up for iterative and interactive programming.

Tweak the defun, eval the defun, watch the system adapt. This is what I always imagined programming would be like. Except for the Lisps, it really turned out perhaps a bit more boring than it really needs to be.

interleave-mode for working through PDF books

For the fellow Emacs users, I also wanted to mention the utility of interleave-mode for working through such a programming book, if you can find it in PDF format.

In my Emacs I have the PDF on the left, and my interleave-mode-linked orgfile on the right. On any page of the PDF I hit the i-button to add a note in the orgfile, where I can of course insert and execute live code snippets.

The sections in the orgfile remain linked to the correct pages of the PDF.

For programming books this is an amazing combination. For studying other books, having your orgfile notes linked will probably also be quite useful.

On the topic of note-taking: This past week, on Friday June 15 (I made a note of that), I was able to help a colleague solve a technical problem by searching for and retrieving an org-file note, including detailed configuration settings, that I made on May 13, 2014.

Ether as currency

Although I acquired a small amount of the Ether cryptocurrency for the first time in July of 2016, I’ve never had the opportunity to actually transact with it.

Up to now, it has functioned solely as a pretty volatile store of value.

On Saturday, I used some ether for the first time to straight-up buy something on the internet, which was a pretty exciting but in practice an uneventful procedure, fortunately.

The vendor used a payment processor which presented me with an address and corresponding QR code. I scanned the QR code with the relevant mobile app (Luno in this case), paid the requested amount, and waited for a few minutes for it to be multiply confirmed by the blockchain. The sending fee was about 0.04% of the transaction.

Barefoot-style running update

On Sunday I went for a long(ish) run, bringing my total on the Luna sandals to just over 200km.

My feet, ankles and calves are much stronger than they used to be, but the barefoot conversion is clearly still has some ways to go. I have to take at the very least two rest days (instead of one) between runs to give my feet some extra time to recover.

What I have recently started doing, is that instead of trying to micro-manage my form (put your foot down like this, bend your ankle like that, let your achilles tendon shoot back like this, and so on), I am following the advice of some new random person on reddit/r/BarefootRunning who gave the advice, often echoed elsewhere by barefoot-runners, to try and maintain a cadence (steps-per-minute) of at least 180.

That sounds pretty high for a normal person like me, but it turns out that when I do that, and I try at the same time to run as silently as possible (I often just APPEAR right beside someone, hehe), my legs and feet figure out their elastic bio-kinematics all by themselves.

As yet another random reddit expert (I wish I could find the post) quipped:

You can’t overthink proprioception.

(that’s a running nerd joke)

I know Kung Fu

Do you remember this scene from The Matrix (1999)?

The other day at the Old People Reunion, friend T. Monster, a highly capable pragmatist but also backyard theoretician, talked about how often it happened these days that you had to deal with some DIY issue, tapped or spoke the question into youtube, watched a video or two, and then fixed the issue like a pro.

This, along with my recent pseudo-expert repair of a number of stripped cabinet hinge screw holes with tooth picks and cold glue (this works, I kid you not), made me think that, although The Matrix version was perhaps far more spectacular, we in fact now find ourselves in a real, shared reality where a large subset of skills can be acquired a la carte.

Some may take longer than a few minutes, but it still is pretty amazing how far YouTube has managed to democratise so many different forms of modern Kung Fu.

 

 

Weekly Head Voices #144: Eternal learner.

Welcome back friends!

(Right after the nerd news, there’s running and backyard philosophy. You can start wherever you like.)

Nerd News

The Weekly Nerd News Network (WNNN) wanted to bring the following points under your attention:

  • Emacs 26.1, the first major release since September 2016, when 25.1 came out, happened on May 28. Although Emacs reached perfection (and sentience, some say) a few decades ago, this new version does include improvements such as native line numbering for the VIM refugees and buttery smooth scrolling on X11 (read the very entertaining story behind this).
  • PyTorch (my favourite deep learning tool by far) and Caffe are merging. This is amazing because while PyTorch is some of the most dynamic and flexible deep learning software you can pay with, Caffe runs on your telephone. You’ll be able to fine-tune your deep network on PyTorch, and then click a button (or type some obscure incantation, probably) to get that network in a highly efficient compiled form on any embedded device or scaled up to run on your cloud. Although apparently not possible, this really does feel like free lunch!

Reunion

In Weekly Non Nerd News (WNNN), an old friend came to visit all the way from Omaruru, an occasion which served as the happy excuse for a mini-reunion at my place.

It’s strange to think that some of the university stories we recounted are now more than 20 years ago.

In that time, humans go from birth to fully formed adult human beings with opinions, and relationships, and stories of their own.

Thank you Omaruru Friend for bringing us all back together again.

Running mouse

The flu and/or cold virus that managed to enter through the cracks left by my immune system being under pressure from above-mentioned celebrations caused a week-long period of man flu, a period that I was only able to conclude today with a lovely winter morning run.

As one does, I continued searching until I found evidence confirming my belief that running with some remaining flu symptoms would not be irresponsible.

What I found was even better than that!

A 2005 study titled Moderate exercise protects mice from death due to influenza virus, published in the journal Brain, Behaviour and Immunity, found that in mice that had just been infected with a real influenza (i.e. not man flu) virus, moderate exercise had an additional protective effect relative to no exercise or strenuous exercise mice. The PDF full-text can be found on the sci-hub website, or via their telegram bot (the bot is really convenient, you can find and read fulltexts on your phone!).

Thanks to the internet, and lab mice, I had confidence that I was probably not going to die due to my run.

Confirmation bias aside, or not, based on more reading it looks like moderate exercise is not the worst thing you can do during or after cold or flu. The secret is to keep it relaxed, and to keep a very close eye on your heart and your temperature.

Mastery

I finally finished reading the book Mastery by George Leonard, a recommendation by LS that I am grateful for.

It can get preachy at times, but the core message is really good, and especially timeous in this era of hyper distraction.

Below is Leonard’s message, sent at least once through the old washing machine that is my brain.

Learning is a lifelong process.

More specifically, the path to mastery of any worthwhile skill usually consists of short bursts of novelty exhilaration (you often start with one of these) followed by long and seemingly boring plateaux of never-ending practice with no kick.

No kick means that many learners decide to quit, and switch to something exciting, only to repeat their cycle of not-mastery there.

If you are able to make peace with the plateaux, and keep on trudging along, you are on the path to mastery.

In a decidedly Buddhist twist, being on the path to mastery means that you are in fact an eternal learner, and you will never become a master.

The author of the book is an Aikido sensei. I especially loved the story he told of the beginners and the senseis.

When beginners practise, they ask the sensei for a new move to practice every few minutes. They try to get through as many moves as possible during their 2 hour training session.

When senseis practise, they practise the same basic move over and over for many hours, losing themselves in the universe of that single apparently straight-forward form.

The Buddhist Twist

From the Wikipedia page on Buddhism:

The Four Truths express the basic orientation of Buddhism: we crave and cling to impermanent states and things, which is dukkha, “incapable of satisfying” and painful. This keeps us
caught in saṃsāra, the endless cycle of repeated rebirth, dukkha and dying again. But there is a way to liberation from this
endless cycle to the state of nirvana, namely following the Noble Eightfold Path.

… and then later:

…. and finally passing through the gate of wishlessness (apranihita) – realizing that nirvana is the state of not even wishing for nirvana.

I can work with this.

Readers, I wish you wishlessness!

Weekly Head Voices #143: The rider and the elephant.

Pretty autumn sunset. A few metres below, the ritual weekend-starting braai was picking up speed.

Welcome back kids!

Besides this post, which somehow turned out to be longer than I expected, my more nerdy alter ego also wrote a post titled Interactive programming with Fennel Lua Lisp, Emacs and Lisp Game Jam winner EXO_encounter 667.

#DeleteFacebook, part deux

In an unsurprising (to me) turn of events, the Cambridge Analytica scandal has not even caused a dent in Facebook usage.

#deletefacebook, also discussed in a previous edition of the WHV, never really happened.

To the contrary, it seems people even increased their usage, post-scandal. FB share price is back where it used to be, and as an interesting data point, Deutsche Bank reports that their FB-based advertising reach was unaffected by the removable of more than 500 million fake facebook accounts.

Should we deduce anything more from this than the usual 1. humans, even outraged ones, have really short memories and/or 2. most people don’t have the energy to resist, or the presence of mind to avoid, the deeply-seated social desires that are being exploited to varying degrees by the large social networks?

My personal strategy for a while now has been to make liberal use of the unfollow and the mute functions. It’s far from perfect, but with this it is possible to reduce drastically the stream of incoming information, and to make sure that what does come through has to do with friends that you have made the deliberate choice to connect with actively.

Shorter focus blocks work better

In my eternal and sometimes decidedly Sysiphean quest for more and better work focus, I recently started using Focus App (see Pro Tip #2 in WHV #126).

In short, when you activate the app’s focus mode, it kills off and then blocks anything that is remotely fun or even slightly distracting on your computer. This includes websites and applications.

In the beginning, I was enjoying longer (1 to 2 hour) focus blocks.

However, more recently I started noticing a certain recalcitrance in my focus-starting hand.

Especially late in the afternoons (prefrontal cortex GONE by then, remember?) the knowledge of that mega-block of mental exertion would result in highly undesirable procrastinatory behaviour. (Big words for “oh, I can probably fit in one more /r/emacs post!”)

Anyways, it turns out there’s another really good reason that pomodori are only 25 minutes long.

It’s much easier to start a 25 minute block of no-fun-focus, and then get stuck in the zone, than it is to start what your brain expects to be a multi-hour block of mental exertion.

Friend PK introduced me to the tiny rider trying to control the giant elephant as a metaphor for the conscious and unconscious mind (this is from the book The Happiness Hypothesis). The shorter focus block idea seems like it could be filed away under “tricks to control your stubborn elephant”.

The evolving soul of Emacs

I came across this really interesting piece by Richard Stallman about the origin of Emacs, one of my favourite and probably most-used technical artifacts. It’s the multi-tool of computer software.

But, along the way, I wrote a text editor, Emacs. The interesting idea about Emacs was that it had a programming language, and the user’s editing commands would be written in that interpreted programming language, so that you could load new commands into your editor while you were editing. You could edit the programs you were using and then go on editing with them. So, we had a system that was useful for things other than programming, and yet you could program it while you were using it. I don’t know if it was the first one of those, but it certainly was the first editor like that.

When an experienced user interacts with Emacs, they change it, and it changes them.

The opposite of instant gratification

On Friday I started on a slightly longer than usual run.

It usually takes a kilometre or two before all of my running subsystems come on line, and I find my rhythm.

Not this time.

The acclimatisation discomfort in my ankles and calves didn’t fade away as it usually does. My breathing and running cadence stubbornly refused to lock on to their usual correct settings.

My legs felt tired.

It really felt like I was not supposed to be running at all, but I pressed on because at that point there was not much else I could do.

At the turn-around point (the bridge at the entrance to Vergelegen, with beautiful trees all around) I decided to try out some youtube advice from the evening before and do a few deep squats to freshen up my legs.

I started running back on legs and calves and feet which suddenly felt like they had all been replaced with brand-new rested versions of their 2-minute-ago return-to-manufacturer selves.

The rest of the run was of the floating over the ground how-is-this-possible my-smile-might-break-my-head variety.

Super strange.

I don’t think the squats did it. That was just a sort of thought-process punctuation which somehow distracted the mind-elephant for long enough to get me running again.

Anyways, as I was floating home, I could not help but see the whole occurrence as a fairly physical but in this case fortunately quite compact reminder that some of the most worthwhile experiences simply require perseverance with initially no gratification in sight.

Life is a marathon

… so sleep well, eat as healthily as you can, exercise, and try not to stress too much.

We’re in this for the long haul.

Weekly Head Voices #138: Born to run.

I am currently in a place with no to extremely little internet. Just getting the photo above uploaded was an adventure.

I briefly debated breaking my current WHV posting streak due to exceptional circumstances, but decided against it, at least for now.

Anyways, I might have no internet, but the scenery here is phenomenal.

(It later turned out that just getting this blog post uploaded on Sunday evening was not going to happen.)

Sometimes focus falls and slips into Emacs

During the past week I had a fairly difficult technical puzzle to deal with. It’s one of those puzzles that can only be solved with multiple days of research and concerted focus.

It’s funny how my mind manages to sort of slip away when faced with these sorts of puzzles where the solution, if it even exists (this is probably the main reason for the continual slippage), seems to be weeks away, instead of a few hours or days.

It’s like a usually sharp(ish) knife which simply refuses to bite into the thing that I so desperately want to cut with it.

In my specific case, especially later in the afternoons when prefrontal cortex is long-gone, mindlessly drinking its beer while staring into space somewhere, or even later in the evenings when everyone else is also drinking beer while staring into space, I wake up to find myself working on some obscure Emacs hack.

This week, primary thought slippage resulted in:

  • Hooking up my emacs, via helm-for-files with mdfind (the command-line interface to spotlight) on macOS and the tracker file indexer on Linux. This means that with a simple press of the C-x c o keys, I can instantly open any file in Emacs which is already open somewhere, which I’ve recently worked on, whose filename faintly resembles what I’m typing, whose contents (or tags) faintly resembles what I’m typing, no matter where that file is hiding in the hundreds of gigabytes on my SSD.
  • My efforts getting the above working for Linux are now part of helm, via the wonderful system of github pull requests.
  • Setting up Emacs dired to do rsync-based network copying in the background, which culminated in a github contribution which will hopefully also find its way into the main repository soon. (I do most of my serious file management in Emacs dired. You should try it.)

The Running People

I finally bought Born to Run by Christopher McDougall.

In between travelling and other activities, I was not able put this book down.

As I was reading the final pages on Sunday morning, I had trouble keeping my eyes dry. I had connected with the story and all of its nested stories on so many levels.

One strand of the story makes the case that humans, or more specifically homo sapiens, had evolved to run its prey down on the savannah.

We are able to cool ourselves down during running thanks to being mostly hairless and sweaty, whereas an antelope is not able to pant while galloping, and has no choice but to stop.

So the trick is simple: We can run fast enough to keep a galloping antelope in sight. Eventually it will lose the battle, overheat and collapse.

This is what homo sapiens did for millions of years for food. Homo neanderthalensis, our intelligent and stronger competition who used to dominate during colder times, had no chance.

McDougall connects with a number of scientists and sports trainers to flesh out this part of the story. Below is an interesting (and related) video about Prof Daniel Liebermann and his work on the evolutionary biology and biomechanics of barefoot running:

(Being internet-deprived, I’m not currently able to find one of the cited Nature papers discussing other elements of our biology underlining our running heritage. Remind me in the comments so I can update this later.)

Another strand of the story is about the Tarahumara of Mexico, also
known as Rarámuri
, or The Running People, a legendary tribe of natural super athletes who are masters of avoiding other humans (due to past persecution and other shenanigans) and of running 30 miles in the mountains, in sandals.

Even more intriguing than their home-made sandals, is that they run throughout their healthy lives with joy and exuberance.

The final strand I want to mention here, is McDougall’s personal journey from injury-prone runner all the way to finally taking part in the very first edition of a gruelling 50 mile trail race (the centre-piece of the story I would argue), together with the world’s best ultra marathoners and the Taramuhara in the Copper Canyons of Mexico.

For a large part of this journey, he and a number of other key actors are propelled along by Caballo Blanco, the White Horse, a supernaturally gifted runner who lived off the land in the Copper Canyons, and one of the few foreigners who seemed to be completely accepted by the Taramuhara.

Caballo is the one who managed to bring together, for the first time, the Taramuhara and the best ultra-marathoners in the small town of Urque for this humanity-affirming 50 mile trail run. He did so from his stone hut in the middle of nowhere, from where he would have to run for 30 miles to the closest settlement that had a telephone line that he could use.

Often that line was down.

Caballo passed away in 2012, shortly after the first Copper Canyon race. Shortly after, the race was officially dubbed the Ultramaraton Caballo Blanco.

Right after I put the book down, I put on my shoes and went for a run
up the mountain-side and in the valley over here. On the balls of my feet as they landed right under me, really small steps, straight back, trying my best to float over the earth, just like the running people in the book.

I could not help but smile for most of the way.

 

Weekly Head Voices #132: Potato deadline.

Fragment of potato skin, taken with phone camera through GOU#2’s microscope at 100x.

We have a serious deadline coming up on Tuesday, so I’m going to make these few WHV minutes count.

BULLET LIST TO THE RESCUE!

  • Day zero has again been postponed, this time to June 4. We continue with our water saving efforts.
  • That unexpected side-project I mentioned in last week’s post did end up going live that very night. Armed with the Django Rest Framework and plenty of battle scars, it took about 17 hours from idea to fully deployed REST API, a large part of which was debugging the paper’s math and spreadsheets.
    • Django might be a slow runner relative to some of the other kids on the block (go with any of its web frameworks, nginx with openresty (lua right in your web server!), even apistar with uvicorn), but the completeness and maturity of Django and its ginormous ecosystem are hard to beat when it comes to development velocity.
  • There’s a whole blog on the nature of note-taking. I arrived there via interleave and org-noter, both emacs packages for keeping text (orgmode) notes synchronised with PDFs, both found via irreal, a great Emacs blog.
  • In the extra lessons I have with GOU#1, we studied electrical current from basic (atomic) principles. As I was getting all excited about the outer electrons being passed on from copper atom to copper atom (Khan Academy and I tag team these lessons), GOU#1 had to laugh at the goose flesh on my arms.
    • The Khan Academy lecture seemed to imply that Benjamin Franklin started us down the not-quite-correct path of conventional current (from positive to negative), whereas the electrons being passed on imply current flow from negative to positive, aka electron current. However, this physics StackOverflow answer more completely explains that current is defined as the flow of electric charge, with electron flow being one example, and hence both directions are correct.
  • To be honest, I became ever so slightly irritated with an episode of one of my favourite podcasts, CPPCast, as the guest said “like” so often that I had trouble following what he was actually like trying to say. This like led me to using Google’s machine-learning-based speech to text API one night to like transcribe the audio of the podcast to speech so that I could like count the number of like utterances. There were not as many as I thought, but still a whole lot. If you’re curious as to the stats, I wrote everything up in this nerdy vxlabs blog post.
    • On the topic of note-taking: Because I make lab notes of everything in my Emacs, including late night speech recognition experiments, publishing a blog post is a question of some copy pasting, and then telling Emacs to publish to the blog.
  • On Thursday, some dudes came to my house and, after somehow switching seamlessly from pick-axe to optic fibre splicer and back several times, left me with this (and more):
Two fibre strands into my house. They tell me one is for backup.
  • These are strange Gibson-esque times when there’s now permanently a laser transmitting all of these packets to you via the network of glass strands encircling the Earth, whilst many of us are still struggling to grasp the difference between fact and fiction.
    • “The future is already here — it’s just not very evenly distributed”, William Gibson, probably ’93.
  • We have a new president: President Cyril Ramaphosa! He was Mandela’s choice to become president of this country, but it was Thabo’s turn, and then things went pear-shaped with Zuma. Years later, the situation is quite dire, but so far there are many indications that Ramaphosa has the makings of a great leader (I have become convinced that we humans, all of us, need great leaders to advance as humanity; I hope to write a post about that some day). After Friday’s state of the nation (SONA) address by present Ramaphosa, I, along with many fellow South Africans, are hopeful for our future.

Ok peeps, have a wonderful week! I’ll see you NEXT TIME!