A Stark Beauty

Taos Junction"It has a stark beauty all its own. It's like much of the high desert of the United States."
— Neil Armstrong

When I first looked down on the Taos Junction bridge from the top of the Picuris trail, I thought of Neil Armstrong's description of the lunar landscape. Little did I know that Apollo astronauts had trained just a few feet away.

Read more…

Adding Swift to an Obj-C Project

You have an Objective-C Xcode project, and you want to add Swift code to it for the first time.

  • What do you need to do so it doesn't segfault when you launch?
  • What do you need to do so your Objective-C code can call your Swift code, and vice versa?

These notes apply to Xcode 8, and they assume an Xcode project named Project Foo. Names of build settings, etc., may change from one Xcode release to the next.

Read more…

Not Just Clogged Pipes

Coronary Artery Disease as Clogged Pipes


Although the image of coronary arteries as kitchen pipes clogged with fat is simple, familiar, and evocative, it is also wrong.

most cardiac events occur at lesions that appeared mild on previous angiography

These plaques contain a lipid-rich core covered by a thin fibromatous cap. Inflammatory cells (eg, macrophages and mast cells) within the plaque may become activated by microbes, autoantigens, or inflammatory molecules (activated plaque model). The activated cells secrete cytokines and proteases that weaken the fibrous cap, causing it to erode or rupture.

Before rupture, these plaques often do not limit flow and may be invisible to angiography and stress tests.

Anecdote: My dad had ​a stress test and angiography in early 2003. It showed him to have low risk for heart attack. Less than 8 months later Dad had a heart attack, with a subsequent quintuple bypass and a stent.

in the setting of myocardial infarction, the model of an obstructed pipe is accurate, and interventions aimed at eliminating the thrombus, either thrombolytics or angioplasty, can be lifesaving. But for patients with stable disease, local interventions can only relieve symptoms; they cannot prevent future myocardial infarctions.

Although atheromatous plaques contain lipids, they are not composed of fat directly from the diet. Low-density lipoprotein is produced primarily in the liver...

growth within the vessel walls is accommodated by outward enlargement of the vessel. In that case, large plaques may not encroach on the lumen and are therefore hidden from angiography.

High-density lipoprotein removes low-density lipoprotein from peripheral tissues through reverse cholesterol transport to the liver and may have antiinflammatory properties

Although saturated fat increases low-density lipoprotein cholesterol, it also increases high-density lipoprotein, so the net effect on cardiac risk is neutral.

More recent observational studies do not support the use of low-fat diets. ​ low-fat diets had adverse effects on high-density lipoprotein cholesterol. But for patients with elevated low-density lipoprotein, they have tightened restrictions on saturated fats and now recommend that consumption not exceed 7% of total calories.

in many products, fat is simply replaced by sugar. More recently, the AHA recommended that people limit their intake of sugar, which now appears to contribute to obesity, hypertension, and subsequently coronary heart disease.

Useful Python Modules

My top 5 ‘new’ Python modules of 2015 « Robin's Blog


This module is so simple but so useful – it makes it stupidly easy to display progress bars for loops in your code.


[...] to use it within the Jupyter Notebook just make sure that the map object (map_1 in the example above) is by itself on the final line in a cell, and the notebook will work its magic and display it inline…perfect!

​ Many thanks to Robin Wilson for the summaries. It will be fun to try folium, especially.

iosnoop no longer works on OS X 10.11 El Capitan

[Note: This all started because some process – I'm still not sure which – is chewing on my hard drive for minutes at a time. This behavior started when I updated to OS X 10.11.1. Given the duration, it seems unlikely to be a simple re-indexing by mdsworkers.]

I recently tried using iosnoop to find out which processes were chewing on my Fusion drive with enough vigor to make the hard drive audible. Instead of a running log of events, I got this:

That's not right.

I filed a radar with Apple. The response was unsatisfying, as it effectively means iosnoop is no longer usable:

This issue behaves as intended based on the following: Some significant portions of dtrace are not compatible with System Integrity Protection. Unfortunately, the iosnoop script contains probes that are not compatible, and thus cannot run.

The iosnoop(1m) man page says nothing about this. At the least this is a documentation failure on Apple's part.


Twitter turned up a workaround/solution:

@sevanjaniyan To reenable dtrace reboot to recovery, open terminal. csrutil disable; csrutil enable --without dtrace

Unfortunately this isn't working on my late 2009 iMac. As I understand it the problem is that, when I installed an SSD and configured a Fusion Drive last year, I didn't put the recovery HD outside the fusion drive. So I have some storage reconfiguration to do.