Debugging: don't just fix the bug!

Fix the design problem that caused the bug in the first place.

Of course, sometimes, it is merely a typo: you wrote "X" when you meant "Y". But more often, the bug is just a symptom: some part of your code is badly designed or too hard to understand, and that is why the bug occurred. Every bug should be looked upon as an opportunity for improving your design.




Rationalist, maxims and rules

A person engaged in practical action who recognizes that what is required for success is practical wisdom (phronesis) will recognize that the "guidelines" for such action are maxims, and not rigid rules. Thus, when in the space of a few lines in Romans, he finds Paul saying both:

"the just shall live by faith";

AND

"But glory, honour, and peace, to every man that worketh good..."

He will recognize these as maxims, one stressing the importance of faith, the other of doing good.

But if one is of a rationalist bent, these will look like rules, and for Paul to "make sense" one of them is going to have to essentially blot out the other.

And thus folks, we give you the Protestant Reformation.

"The true maxims of golfing or of poetry increase our insight into golfing or poetry and may even give valuable guidance to golfers and poets; but these maxims would instantly condemn themselves to absurdity if they tried to replace the golfer's skill or the poets art. Maxims cannot be understood, still less applied by anyone not already possessing a good practical knowledge of the art. They derive their interest from our appreciation of the art and cannot themselves either replace or establish that appreciation." -- Michael Polanyi, Personal Knowledge, p. 31

The progressive left's multi-culturalism

The government of Malaysia apparently asked Disney to cut a few minutes from Beauty and the Beast, minutes that the government deemed to be promoting homosexuality.

So, of course, Disney, promoters of "multi-culturalism," respected the local culture of Malaysia -- after all, they weren't asking for Disney to insert a segment condemning homosexual behavior! -- and cut those few minutes, right? We have to respect the values of other cultures, and never "imperialistically" assume that our culture is right, and the culture of the other is wrong, hey?

Of course they didn't cut that segment! They flat out refused. The "multi-culturalism" of the progressive left is entirely a weapon to wield against traditional Western culture. Whenever some other culture's values differ from progressive ideology, that other culture must be chastised, boycotted, re-educated, or even, if they won't submit, bombed.

Genghis Khan was way more "multi-cultural" than leftist progressives.

Getting your pseudo-code straight

Having just graded 109 two-page pseudo-code answers, I am keenly aware that students have real problems keeping straight what variables hold what type of data. The problem was to augment a red-black tree keyed on date with an energy total, and then to walk the tree to determine an energy usage between two dates. I saw lots of code doing things like:

node.left += energy
node.key = energy
T.root = total

All three of those lines of code would destroy the red-black tree by wiping out one of its structural components with auxilliary data.

It occurred to me that it might be a good idea to have students begin their work by listing each variable they will be dealing with, and what sort of thing it will hold. Then, whenever they are about to assign to it, they can check back to the "pseudo-declarations."

But I haven't seen this taught. Is anyone familiar with a place where this is recommended?

More AWKwardness

For Emu86, we had documentation in two places: the source code, and a help file. We needed to get this DRY, and fast!

So, we needed a documentation extraction and web page generating system. First I added tags to the source code documentation, like this. See lines 23-36.

Then I wrote this program to pull out the tags and everything in between. A single line of code!

Then we read the "tagged-text-only" files and turn those into HTML with this program. The last two items could have been a single program, but why clutter up that elegant first program with HTML tagging specific to this project? The program to extract tagged text could be useful in many, many projects: Best to make it standalone, and combine it in a pipeline with other programs.

Finally, we use our existing include facility to pull the HTML descriptions of the instructions into our help file.

How "We" Gain from Free Trade

Don Boudreaux recently wrote, about our persistent trade deficits::

"And being a net recipient of capital is not only not necessarily a bad thing for Americans, but is likely a good thing."

What Don means is that for every 100 factory workers who lose their $50,000 / year jobs, one CEO will get a $10 million bonus: net gain!

And when was the last time stinkin’ factory workers funded an all-expenses-paid trip to a libertarian convention at a tropical resort?!

Warning of the dangers of K2

There are now ads up all around NYC proclaiming:

K2: 0% marijuana, 100% dangerous.

Certainly, the dangers of K2 should not be underestimated! See, for instance:

"K2 is known as the Savage Mountain due to the extreme difficulty of ascent. It has the second-highest fatality rate among the eight thousanders. With around 300 successful summits and 77 fatalities, about one person dies on the mountain for every four who summit."



That for sure counts as 100% dangerous! But was there really anyone out there who thought that it was made of marijuana?! Does that thing look like it is made of marijuana?

Moronic scammers

I received an email rom some Internet scammers today telling me, "You Apple account has been de-activated."

Of course, they wanted me to "login" to their fake Apple website to re-activate the account.

BUT... they sent the email telling me my Apple account has been de-activated...

To my Apple account!

Thank God so many of these fraudsters are so stupid, or even more people would be victimized by them.



Nature documentaries can't be trusted

I have been watching "India: natures wonderland."

In today's segment, some annoying mountain dude has been banging on about the Himalayas. Well, at least the mountain scenery has been pleasant.

But then he brought me to a halt: the Himalayas are growing, he noted. (True.) "It's only a few inches a year, but it has been going on for millions of years."

This made my inner engineer get out my calculator. How many is "a few"? Let's say three. And how many "millions of years"? He had mentioned that the Himalayas or 40 million years old a bit earlier… Let's say half that time, just to see where we get.

3 * 20,000,000 = 60,000,000 inches of growth

60,000,000 / 12 inches per foot = 5,000,000 feet of growth

So, the average mountain in the Himalayas is around 5 million feet tall. No wonder people need to carry oxygen when going up Everest!

Apparently the Himalayas are currently growing at a rate of 2 to 3 inches per year. But obviously, that rate hasn't been kept up for even 1 million years, let alone "millions."

Down with the (male) hornbills!


I was watching a show on Indian wildlife, and they went into a segment on the hornbill, which is a pretty trippy looking bird, as you can see above. Imagine my shock and horror when I learned that the female hornbill is sealed inside the nest to incubate and care for her chicks!*

What, the female isn't just as good as any male at going out to get food? She doesn't want opportunities out in the world, just like the male has? He's probably out becoming CEO of some big hornbill corporation, while she's stuck at home with a bunch of cawing brats. How dare they!

I'd say this species needs a good old American bombing campaign, starting today, until these lady hornbills are liberated from their prisons!

* Yes, I realize that she seals herself inside the nest. But certainly, that is just because she has adopted the patriarchical mindset of her oppressors.

Impeach Trump?

I'm all in favor: the charge is treason against the crown, and the result of the trial will be to place my rightful ruler, Elizabeth II, on the throne.


Not understanding the pigeonhole principle

The basketball announcer on CBS just said:

"Gonzaga had seven different players lead the team in scoring in different games this season. They went 28 games before the same person led them in scoring for a second time."



And the top post for the month is...

British analysis?

This is what you people have been waiting for me to write about... the limits of analytical philosophy?!

Well, let me get busy!

(At least this has beaten out Bob's dumbass post about inconvenience, which had been the top post for a decade. And it's not really Bob's post that is dumb, but the fact that it sat atop the most-viewed-post list for a decade.)

Ideologues like to help their opponents "become extinct"

Vladimir Lenin promised to purge "the Russian land of all kinds of harmful insects."

Ideologies survive by demonizing and de-humanizing their opponents: the world would be, should be paradise, and if it is not, then it must be the fault of monstrously evil people standing in the way of the ideologue's vision.

Here is a nice modern example, from just down the street:


This is from the window of a neighborhood real estate agent who is so insanely anti-Trump that he devotes 80% of his window space to denouncing Trump and 20% to selling real estate. The crowd of people the photo depicts don't look like a pleasant bunch, but it is clear from the context that they are supposed to represent typical Trump voters. This lovely humanitarian is anxiously awaiting the day when 40% of his fellow countrymen "become extinct," since they are, not people, but "trolls" and "afflictions."

Having turned his opponents into sub-humans, you can bet that this great progressive, were he given complete power, would happily hasten their extinction, just as his buddies in ideological demonization, like Stalin, Hitler, Mao, and Pol Pot, did when they were given the chance.

Ideology: The Great Enemy


I am far from alone in this analysis:

Macbeth’s self-justifications were feeble—and his conscience devoured him. Yes, even Iago was a little lamb, too. The imagination and the spiritual strength of Shakespeare’s villains stopped short at a dozen corpses.

Because they had no ideology.

Ideology—that is what gives villainy its long-sought justification and gives the villain the necessary steadfastness and determination…

Thanks to ideology, the twentieth century was fated to experience villainy on a scale calculated in the millions. -- Aleksandr Solzhenitsyn, The Gulag Archipelago
*****
In ideologies there is not Jesus: in this tenderness, his love, his meekness. And ideologies are rigid, always... And when the Christian becomes a disciple of an ideology, he has lost the faith: he is no longer a disciple of Jesus, he is a disciple of this attitude of thought. -- Pope Francis

Well, glad that's settled!

I received an email today, inviting me to join a Blockchain meetup group, because:

"By properly leveraging blockchain technology we can solve the world's most pressing problems."

These clowns are like Charlie Brown, and the latest tech fad promising utopia is like Lucy with her football.


Stupid video tics

I call these "tics" because they are most often used with no apparent artistic purpose, but merely because everyone else is doing them:

1) Spinning the camera around and around the scene. (This one actually makes me physically ill.)

2) Jump cuts when obviously there was no actual jump in what the person was saying.

3) Juxtaposing the beginning of the sound from the coming scene with the visuals of the ending scene. (Curiousity: I have never seen this done the other way around!)

Each of these techniques could be used for an artistic purpose. For instance, number one could signify that a situation is spinning out of control, number two might be used to convey a character's sense of discontinuity in his life, and number three could express the idea that somehow the dialogue being spoken led directly into or foreshadowed the new scene.

But nine times out of ten, or probably more, they are instead employed simply because that is what everyone else putting out films and videos is doing.

Feyerabend's Philosophy of Nature

My review is now essentially complete, and is online here.

Worst Apple voice recognition mistake yet?

I just tried to dictate the word "notion" on my Mac, and found 'knowshon' put in my document instead.

Apparently there is some football player named 'Knowshon.' Fair enough.

But how in the world is that a more likely interpretation of what I spoke than 'notion'?

The Supernatural

"The second point [Eliade gets wrong] is that the gods are designated as 'supernatural Beings.' That, of course, is impermissible. The term supernatural, as opposed to an natural, is Scholastic terminology very commonly used by Thomas Aquinas. From Scholasticism, as part of dogma, it entered into the dogmatism of the Enlightenment in the 18th-century." -- Eric Voegelin, "The Drama of Humanity"

I swear I had not read this before making a similar point myself a couple of months ago.

Why We Tolerate Murphy Around Here

"Absolutely, the non-brightness of the people who might read you is a fact you have to face." -- Eric Voegelin

Ideologies as dream worlds

I recall, at a progressive college, seeing a poster in the hallway proclaiming: "My only handicap is in your mind."

The image accompanying the slogan showed a man in a wheelchair, with no legs.

I don't know what happened to his legs. He may have lost them in an act of extreme heroism, e.g., saving Iraqi children from a landmine. He might deserve medals, and parades, and cash compensation.

But I know for sure he has a handicap that is not in my mind: he has no legs.

He can't walk. He can't run. He can't go for a hike. To get around, he has to use a wheelchair. That is why, in the photo, he is in a wheelchair.

These handicaps do not make him less of a person, in the important, spiritual sense, than me or you. But they are real, and not just in anyone else's head.

Ideologies are attempts to substitute dreamworlds for reality. In the ideological dreamworld of "anti-ableism," it is invidious "discrimination" to blame "the impairments themselves for the problems experienced by the people who have them." (The ideologue's own language is at war with itself here: if the "impairments" are not causing any problems, then why is he calling them "impairments"?!)

Thus, in this dreamworld, the only difficulty in not having legs is the "marginalization" by "ableists" of the person who does not have legs. All of the problems of the blind stem, not from the fact they can't see, but from the bad attitudes of the "ableists."

Life presents us all with difficulties. ("We all have our crosses to bear.") Ideological dreamworlds convince those they ensnare that difficulty is not inherent in life, but is caused entirely by evil "them" who are oppressing the ensnared. If only "they" can be eliminated, earth will be a paradise.

And if they gain power, ideologues eagerly start eliminating "them," whether "they" are the capitalists, the Kulaks, the Jews, the intellectuals, etc.


Private crimes and public crimes in Athens

In classical Athens, crimes fell into one of two categories. There were private crimes such as theft, assault, and murder. Charges for these crimes could only be brought by the victim, although, in the case of murder, obviously this would have to include the victim's family.

Then there were public crimes, which were considered to harm the state as a whole. Any citizen could prosecute one of these crimes. In this category were included treason, extortion of state funds, and... adultery!

Someone who committed adultery in Athens at this time certainly might have tried to hide the fact, by, say, denying they had done so. But if accused, one thing they never would have done would be to tell the accuser "It's none of your business."

That answer would have made as little sense to a contemporary Athenian as it would today to tell the police, about the shooting victim lying on your living room rug, "It's none of your business."

The mysteries of our devices

For instance, my phone: One day, if it was plugged in in my car, and I turn the car on, it started announcing how many minutes I was from home. This happens every time I turn the car on for several months.

Then one day, it stopped doing that, and has never done it again. I have no idea what started it going like this, and no idea what made it stop.



New paper for distribution, on distribution

My latest, co-authored with Texas Tech economists Alexander Salter.

An ideology is a shelter

"We're sick and tired of your ism-schism game..." -- The Prophet*

I continually try to refine and clarify my thoughts about ideology, since the dominance of ideology in public life is the great problems of our age.

We have two complementary definitions of ideology we can work with:

1) Eric Voegelin characterizes ideologies as attempts to substitute a secondary, "dream reality," for our primary experience of confronting a mysterious universe which we did not ourselves create. (As The Poet* puts it: "Let it be known / there is a fountain / that was not made / by the hands of man.")

2) Michael Oakeshott's characterization of ideology is as a category error, where the ideologue attempts to use a theory to handle an aspect of life that can only be handled by paractical knowledge. I believe that in Oakeshott on Rome and America, I was the first person to note the connection between Oakeshott's essays on rationalism and the Aristotelian distinction between theoria and phronesis, although, as always, I credit Noel O'Sullivan, my editor at Imprint Academic and a brilliant academic in his own right, for cluing me in to this connection.

These two characterizations of ideology are complementary because the secondary reality in Voegelin's defintion can not be anything other than a theory (making Voegelin's definition compatible with Oakeshott's), while at the same time it is clear that an attempt to substitute a theory for practical engagement with the world is an effort to evade confronting primary reality (making Oakehsott's definition compatible with Voegelin's.)

But what do I mean when I say, "An ideology is a shelter"? Voegelin notes that ideologies arise in the wake of the destruction of traditional cultures. Traditional cultures differ from ideologies in that, while they are a way of viewing reality, they are not theories. (Of course, a traditional culture may contain some theories, but it itself isn't one, unlike, say, Marxism.) We eat meat with our fork (or with our hands) because that's the way things are done, not because of some high theory about how meat ought to be eaten. And people living within a traditional culture are comfortable, because that is the way life is.  (As Clifford Gertz points out, for the residents of Java, to be civilized was simply to be Javanese.) A traditional culture provides a shelter, within which one can live one's life in the comfort of knowing it fits into a pattern of birth, life, death, and renewal.

But in the wake of the destruction of traditional cultures, most often by invasion, people are left wihout the shelter  that traditional ways of living provided. And of course, a new tradition cannot be created "on the fly," so the most plausible substitutes for a tradtion that has been destroyed are theories. Thus we see, in the wake of Alexander's destruction of the traditional cultures of Greece, Egypt, and Persia, the rise of Stoicism, Epicureanism, materialism, Manichaeism, the cult of Sol Invictus, and so on.

Similarly, in the wake of the Protestant Reformation's destruction of the cultural unity of Western Christiandom, we get the rise of fundamentalist Christianity, Deism, materialism, idealism, Marxism, feminism, progressivism, libertarianism, and so on.

As Voegelin noted, after Hitler and Stalin, there is really no moral excuse for anyone being an ideologue. Nevertheless, many of our fellow citizens are ideologues, and it behooves us to understand why that is so. And the reason is, as one of our blog commentors kindly pointed out, that an ideology provides the ideologue with a "framework."

The loss of a traditional culture is profoundly unsettling. It leaves people empty, alienated, and confused. An ideology offers a shelter from this storm: people are filled with the mission of the ideology ("Overthrow the capitalists!"), they bond with their fellow ideologues ("Greeting, comrade!"), and are given books filled with easy answers to hard questions. So it is understandable, even if unfortunate, that so many wander into the ideological shelters.


* I follow Aquinas here, who used "The Philosopher" to refer to Aristotle, and "The Interpreter" to designate Averroes. An interesting sidenote here: The Poet was introduced to LSD by the CIA's MKUltra program, the existence of which was, for many years, denigrated as a crazy "conspiracy theory."

Thoughts on a morning walk

I am heading to the car at present
The results may not be pleasant
But should you bring me a pheasant
I believe I can spare the peasant

The materiallists' phony demand for evidence

Let's say "anti-materialists" point to EPR effects to try to demonstrate that materialism is an incomplete description of reality: E, P, and R devised their thought experiment precisely to show that the Copenhagen interpretation of Quantum Mechanics is unsatisfactory, because it implies that "spooky action at a distance" exists, contradicting materialism (as it was then formulated). But when experiments seem to show that there is "spooky action at a distance," then materialists simply say, "OK, well then that is part of material reality as well."

In other words, materialism is a completely non-falsifiable thesis, since:

1) To defease non-materialist ideas, materialists say, "Well, show me how (God / angels / spirits /
the soul / etc. ) can show up in an empirical, measurable way." (We won't go into the matter of whether that is a good test for truth or not: let's just accept the materialists's challenge for argument's sake.)

2) But, once some phenomenon is actually confirmed to exist by measurement, however contradictory its existence was to an earlier version of "materialism," it will simply be claimed that "the material" includes this new, unprecedented phenomenon as well.

Therefore, this demand for "evidence" is phony. Materialism is not a "philosophical position" (in fact, as philosophy is "experience without reservation or arrest," all "positions" are not philosophical!), but an ideology.

(And, by the way, this is why some of my students are wrong to worry about "whether idealism is true": to try to declare some particular philosophical system as "true" is to create an arrest in experience!)




A Python-and-Awk-Based Web Site Generator

I realize I am starting to build one. Here is the latest bit of machinery: this awk script takes a list of major sections and chapter-level sections, and:

1) Generates an HTML file for each chapter... if that file does not already exist. (Well, here we actually generate "PTML" files, since we have a HTML pre-processor built to include code from file1 in "PTML" file2.) It uses a previously created Python script to put the chapter name in each generated HTML file. element and the <h1> element.</p> <p> <br></p> <p> 2) Writes out a menu file to access the chapter HTML files, which we use our pre-processor to include into index.html.</p> <p> <br></p> <p> <br></p> <table class="highlight tab-size js-file-line-container" data-tab-size="8" style="box-sizing: border-box; border-spacing: 0px; border-collapse: collapse; tab-size: 8; color: rgb(36, 41, 46); font-family: -apple-system, system-ui, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 14px; orphans: 2; widows: 2; background-color: rgb(255, 255, 255);"><tbody style="box-sizing: border-box;"> <tr style="box-sizing: border-box;"><td id="LC1" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"><span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);">#!/usr/bin/awk -f</span></td></tr> <tr style="box-sizing: border-box;"><td id="L2" class="blob-num js-line-number" data-line-number="2" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC2" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> </td></tr> <tr style="box-sizing: border-box;"><td id="L3" class="blob-num js-line-number" data-line-number="3" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC3" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"><span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);"># This program generates the chapter files for DAA.</span></td></tr> <tr style="box-sizing: border-box;"><td id="L4" class="blob-num js-line-number" data-line-number="4" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC4" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"><span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);"># It reads stdin for the chapter names.</span></td></tr> <tr style="box-sizing: border-box;"><td id="L5" class="blob-num js-line-number" data-line-number="5" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC5" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> </td></tr> <tr style="box-sizing: border-box;"><td id="L6" class="blob-num js-line-number" data-line-number="6" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC6" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"><span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">BEGIN</span> {</td></tr> <tr style="box-sizing: border-box;"><td id="L7" class="blob-num js-line-number" data-line-number="7" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC7" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> indent1 <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> <span class="pl-s" style="box-sizing: border-box; color: rgb(24, 54, 145);"><span class="pl-pds" style="box-sizing: border-box;">"</span> <span class="pl-pds" style="box-sizing: border-box;">"</span></span></td></tr> <tr style="box-sizing: border-box;"><td id="L8" class="blob-num js-line-number" data-line-number="8" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC8" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> indent2 <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> indent1 indent1</td></tr> <tr style="box-sizing: border-box;"><td id="L9" class="blob-num js-line-number" data-line-number="9" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC9" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> indent3 <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> indent2 indent1</td></tr> <tr style="box-sizing: border-box;"><td id="L10" class="blob-num js-line-number" data-line-number="10" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC10" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> indent4 <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> indent2 indent2</td></tr> <tr style="box-sizing: border-box;"><td id="L11" class="blob-num js-line-number" data-line-number="11" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC11" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> menu <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> <span class="pl-s" style="box-sizing: border-box; color: rgb(24, 54, 145);"><span class="pl-pds" style="box-sizing: border-box;">"</span>chap_menu.txt<span class="pl-pds" style="box-sizing: border-box;">"</span></span></td></tr> <tr style="box-sizing: border-box;"><td id="L12" class="blob-num js-line-number" data-line-number="12" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC12" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> templ <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> <span class="pl-s" style="box-sizing: border-box; color: rgb(24, 54, 145);"><span class="pl-pds" style="box-sizing: border-box;">"</span>ChapTemplate.txt<span class="pl-pds" style="box-sizing: border-box;">"</span></span></td></tr> <tr style="box-sizing: border-box;"><td id="L13" class="blob-num js-line-number" data-line-number="13" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC13" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> daa <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> <span class="pl-s" style="box-sizing: border-box; color: rgb(24, 54, 145);"><span class="pl-pds" style="box-sizing: border-box;">"</span>Design and Analyis of Algorithms: <span class="pl-pds" style="box-sizing: border-box;">"</span></span></td></tr> <tr style="box-sizing: border-box;"><td id="L14" class="blob-num js-line-number" data-line-number="14" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC14" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> create_pg <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> <span class="pl-s" style="box-sizing: border-box; color: rgb(24, 54, 145);"><span class="pl-pds" style="box-sizing: border-box;">"</span>../utils/create_page.py<span class="pl-pds" style="box-sizing: border-box;">"</span></span></td></tr> <tr style="box-sizing: border-box;"><td id="L15" class="blob-num js-line-number" data-line-number="15" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC15" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> </td></tr> <tr style="box-sizing: border-box;"><td id="L16" class="blob-num js-line-number" data-line-number="16" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC16" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">print</span> <span class="pl-s" style="box-sizing: border-box; color: rgb(24, 54, 145);"><span class="pl-pds" style="box-sizing: border-box;">"</span><span class="pl-pds" style="box-sizing: border-box;">"</span></span> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">></span> menu <span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);"># because we don't want a cumulative menu for each run!</span></td></tr> <tr style="box-sizing: border-box;"><td id="L17" class="blob-num js-line-number" data-line-number="17" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC17" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;">}</td></tr> <tr style="box-sizing: border-box;"><td id="L18" class="blob-num js-line-number" data-line-number="18" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC18" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> </td></tr> <tr style="box-sizing: border-box;"><td id="L19" class="blob-num js-line-number" data-line-number="19" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC19" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;">/<span class="pl-sr" style="box-sizing: border-box; color: rgb(24, 54, 145);"><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">^</span><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">$</span></span>/ { } <span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);"># blank lines allowed</span></td></tr> <tr style="box-sizing: border-box;"><td id="L20" class="blob-num js-line-number" data-line-number="20" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC20" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> </td></tr> <tr style="box-sizing: border-box;"><td id="L21" class="blob-num js-line-number" data-line-number="21" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC21" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;">/<span class="pl-sr" style="box-sizing: border-box; color: rgb(24, 54, 145);"><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">^</span><span class="pl-cce" style="box-sizing: border-box; color: rgb(99, 163, 92); font-weight: bold;">\;</span></span>/ { } <span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);"># allows comments in the chapter file</span></td></tr> <tr style="box-sizing: border-box;"><td id="L22" class="blob-num js-line-number" data-line-number="22" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC22" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> </td></tr> <tr style="box-sizing: border-box;"><td id="L23" class="blob-num js-line-number" data-line-number="23" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC23" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;">/<span class="pl-sr" style="box-sizing: border-box; color: rgb(24, 54, 145);"><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">^</span>[<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">IVXCM</span>]</span>/ { <span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);"># a major section name</span></td></tr> <tr style="box-sizing: border-box;"><td id="L24" class="blob-num js-line-number" data-line-number="24" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC24" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> sect_nm <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> split_on_caps(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">$2</span>)</td></tr> <tr style="box-sizing: border-box;"><td id="L25" class="blob-num js-line-number" data-line-number="25" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC25" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">print</span> indent2 <span class="pl-s" style="box-sizing: border-box; color: rgb(24, 54, 145);"><span class="pl-pds" style="box-sizing: border-box;">"</span><h2> <span class="pl-pds" style="box-sizing: border-box;">"</span></span> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">>></span> menu</td></tr> <tr style="box-sizing: border-box;"><td id="L26" class="blob-num js-line-number" data-line-number="26" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC26" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">print</span> indent3 <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">$1</span> <span class="pl-s" style="box-sizing: border-box; color: rgb(24, 54, 145);"><span class="pl-pds" style="box-sizing: border-box;">"</span>. <span class="pl-pds" style="box-sizing: border-box;">"</span></span> sect_nm <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">>></span> menu</td></tr> <tr style="box-sizing: border-box;"><td id="L27" class="blob-num js-line-number" data-line-number="27" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC27" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">print</span> indent2 <span class="pl-s" style="box-sizing: border-box; color: rgb(24, 54, 145);"><span class="pl-pds" style="box-sizing: border-box;">"</span></h2> <span class="pl-pds" style="box-sizing: border-box;">"</span></span> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">>></span> menu</td></tr> <tr style="box-sizing: border-box;"><td id="L28" class="blob-num js-line-number" data-line-number="28" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC28" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;">}</td></tr> <tr style="box-sizing: border-box;"><td id="L29" class="blob-num js-line-number" data-line-number="29" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC29" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> </td></tr> <tr style="box-sizing: border-box;"><td id="L30" class="blob-num js-line-number" data-line-number="30" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC30" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;">/<span class="pl-sr" style="box-sizing: border-box; color: rgb(24, 54, 145);"><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">^</span>[<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">0</span>-<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">9</span>]</span>/ { <span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);"># this is a chapter name</span></td></tr> <tr style="box-sizing: border-box;"><td id="L31" class="blob-num js-line-number" data-line-number="31" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC31" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> chap_file <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">$2</span> <span class="pl-s" style="box-sizing: border-box; color: rgb(24, 54, 145);"><span class="pl-pds" style="box-sizing: border-box;">"</span>.ptml<span class="pl-pds" style="box-sizing: border-box;">"</span></span> <span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);"># we process ptml files into html</span></td></tr> <tr style="box-sizing: border-box;"><td id="L32" class="blob-num js-line-number" data-line-number="32" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC32" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> chap_html <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">$2</span> <span class="pl-s" style="box-sizing: border-box; color: rgb(24, 54, 145);"><span class="pl-pds" style="box-sizing: border-box;">"</span>.html<span class="pl-pds" style="box-sizing: border-box;">"</span></span> <span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);"># we process ptml files into html</span></td></tr> <tr style="box-sizing: border-box;"><td id="L33" class="blob-num js-line-number" data-line-number="33" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC33" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> chap_nm <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> split_on_caps(<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">$2</span>)</td></tr> <tr style="box-sizing: border-box;"><td id="L34" class="blob-num js-line-number" data-line-number="34" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC34" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">if</span> (<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">system</span>( <span class="pl-s" style="box-sizing: border-box; color: rgb(24, 54, 145);"><span class="pl-pds" style="box-sizing: border-box;">"</span>[ -f <span class="pl-pds" style="box-sizing: border-box;">"</span></span> chap_file <span class="pl-s" style="box-sizing: border-box; color: rgb(24, 54, 145);"><span class="pl-pds" style="box-sizing: border-box;">"</span> ] <span class="pl-pds" style="box-sizing: border-box;">"</span></span>) <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">==</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">0</span>)</td></tr> <tr style="box-sizing: border-box;"><td id="L35" class="blob-num js-line-number" data-line-number="35" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC35" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">print</span> chap_file <span class="pl-s" style="box-sizing: border-box; color: rgb(24, 54, 145);"><span class="pl-pds" style="box-sizing: border-box;">"</span> already exists.<span class="pl-pds" style="box-sizing: border-box;">"</span></span></td></tr> <tr style="box-sizing: border-box;"><td id="L36" class="blob-num js-line-number" data-line-number="36" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC36" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">else</span> </td></tr> <tr style="box-sizing: border-box;"><td id="L37" class="blob-num js-line-number" data-line-number="37" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC37" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">system</span>(<span class="pl-s" style="box-sizing: border-box; color: rgb(24, 54, 145);"><span class="pl-pds" style="box-sizing: border-box;">"</span>touch <span class="pl-pds" style="box-sizing: border-box;">"</span></span> chap_html)</td></tr> <tr style="box-sizing: border-box;"><td id="L38" class="blob-num js-line-number" data-line-number="38" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC38" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">system</span>(create_pg <span class="pl-s" style="box-sizing: border-box; color: rgb(24, 54, 145);"><span class="pl-pds" style="box-sizing: border-box;">"</span> <<span class="pl-pds" style="box-sizing: border-box;">"</span></span> templ <span class="pl-s" style="box-sizing: border-box; color: rgb(24, 54, 145);"><span class="pl-pds" style="box-sizing: border-box;">"</span> ><span class="pl-pds" style="box-sizing: border-box;">"</span></span> chap_file <span class="pl-s" style="box-sizing: border-box; color: rgb(24, 54, 145);"><span class="pl-pds" style="box-sizing: border-box;">"</span> <span class="pl-cce" style="box-sizing: border-box;">\"</span><span class="pl-pds" style="box-sizing: border-box;">"</span></span> daa chap_nm <span class="pl-s" style="box-sizing: border-box; color: rgb(24, 54, 145);"><span class="pl-pds" style="box-sizing: border-box;">"</span><span class="pl-cce" style="box-sizing: border-box;">\"</span><span class="pl-pds" style="box-sizing: border-box;">"</span></span>)</td></tr> <tr style="box-sizing: border-box;"><td id="L39" class="blob-num js-line-number" data-line-number="39" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC39" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">print</span> indent3 <span class="pl-s" style="box-sizing: border-box; color: rgb(24, 54, 145);"><span class="pl-pds" style="box-sizing: border-box;">"</span><h3> <span class="pl-pds" style="box-sizing: border-box;">"</span></span> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">>></span> menu</td></tr> <tr style="box-sizing: border-box;"><td id="L40" class="blob-num js-line-number" data-line-number="40" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC40" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">print</span> indent4 <span class="pl-s" style="box-sizing: border-box; color: rgb(24, 54, 145);"><span class="pl-pds" style="box-sizing: border-box;">"</span><a href=<span class="pl-cce" style="box-sizing: border-box;">\"</span><span class="pl-pds" style="box-sizing: border-box;">"</span></span> chap_html <span class="pl-s" style="box-sizing: border-box; color: rgb(24, 54, 145);"><span class="pl-pds" style="box-sizing: border-box;">"</span><span class="pl-cce" style="box-sizing: border-box;">\"</span>><span class="pl-pds" style="box-sizing: border-box;">"</span></span> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">>></span> menu</td></tr> <tr style="box-sizing: border-box;"><td id="L41" class="blob-num js-line-number" data-line-number="41" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC41" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">print</span> indent4 <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">$1</span> <span class="pl-s" style="box-sizing: border-box; color: rgb(24, 54, 145);"><span class="pl-pds" style="box-sizing: border-box;">"</span>. <span class="pl-pds" style="box-sizing: border-box;">"</span></span> chap_nm <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">>></span> menu</td></tr> <tr style="box-sizing: border-box;"><td id="L42" class="blob-num js-line-number" data-line-number="42" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC42" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">print</span> indent4 <span class="pl-s" style="box-sizing: border-box; color: rgb(24, 54, 145);"><span class="pl-pds" style="box-sizing: border-box;">"</span></a><span class="pl-pds" style="box-sizing: border-box;">"</span></span> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">>></span> menu</td></tr> <tr style="box-sizing: border-box;"><td id="L43" class="blob-num js-line-number" data-line-number="43" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC43" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">print</span> indent3 <span class="pl-s" style="box-sizing: border-box; color: rgb(24, 54, 145);"><span class="pl-pds" style="box-sizing: border-box;">"</span></h3> <span class="pl-pds" style="box-sizing: border-box;">"</span></span> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">>></span> menu</td></tr> <tr style="box-sizing: border-box;"><td id="L44" class="blob-num js-line-number" data-line-number="44" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC44" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;">}</td></tr> <tr style="box-sizing: border-box;"><td id="L45" class="blob-num js-line-number" data-line-number="45" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC45" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> </td></tr> <tr style="box-sizing: border-box;"><td id="L46" class="blob-num js-line-number" data-line-number="46" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC46" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">function</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">split_on_caps</span>(<span class="pl-smi" style="box-sizing: border-box; color: rgb(51, 51, 51);">s</span>) {</td></tr> <tr style="box-sizing: border-box;"><td id="L47" class="blob-num js-line-number" data-line-number="47" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC47" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> split_str <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> <span class="pl-s" style="box-sizing: border-box; color: rgb(24, 54, 145);"><span class="pl-pds" style="box-sizing: border-box;">"</span><span class="pl-pds" style="box-sizing: border-box;">"</span></span></td></tr> <tr style="box-sizing: border-box;"><td id="L48" class="blob-num js-line-number" data-line-number="48" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC48" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">split</span>(s, chars, <span class="pl-s" style="box-sizing: border-box; color: rgb(24, 54, 145);"><span class="pl-pds" style="box-sizing: border-box;">"</span><span class="pl-pds" style="box-sizing: border-box;">"</span></span>)</td></tr> <tr style="box-sizing: border-box;"><td id="L49" class="blob-num js-line-number" data-line-number="49" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC49" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">for</span>(i <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">0</span>; i <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);"><</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">length</span>(chars); i<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">++</span>)</td></tr> <tr style="box-sizing: border-box;"><td id="L50" class="blob-num js-line-number" data-line-number="50" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC50" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> {</td></tr> <tr style="box-sizing: border-box;"><td id="L51" class="blob-num js-line-number" data-line-number="51" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC51" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> <span class="pl-c" style="box-sizing: border-box; color: rgb(150, 152, 150);"># i > 0: no need to introduce space at start of string!</span></td></tr> <tr style="box-sizing: border-box;"><td id="L52" class="blob-num js-line-number" data-line-number="52" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC52" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">if</span>((i <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">></span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">0</span>) <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">&&</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">match</span>(chars<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">[</span>i<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">]</span>, /<span class="pl-sr" style="box-sizing: border-box; color: rgb(24, 54, 145);">[<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">A</span>-<span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">Z</span>]</span>/))</td></tr> <tr style="box-sizing: border-box;"><td id="L53" class="blob-num js-line-number" data-line-number="53" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC53" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> split_str <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> split_str <span class="pl-s" style="box-sizing: border-box; color: rgb(24, 54, 145);"><span class="pl-pds" style="box-sizing: border-box;">"</span> <span class="pl-pds" style="box-sizing: border-box;">"</span></span></td></tr> <tr style="box-sizing: border-box;"><td id="L54" class="blob-num js-line-number" data-line-number="54" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC54" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> split_str <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> split_str chars<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">[</span>i<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">]</span></td></tr> <tr style="box-sizing: border-box;"><td id="L55" class="blob-num js-line-number" data-line-number="55" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC55" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> }</td></tr> <tr style="box-sizing: border-box;"><td id="L56" class="blob-num js-line-number" data-line-number="56" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC56" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">return</span> split_str</td></tr> <tr style="box-sizing: border-box;"><td id="L57" class="blob-num js-line-number" data-line-number="57" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; user-select: none;"></td><td id="LC57" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;">}</td></tr> </tbody></table> </div>

2) Generates a menu file linking to the existing or just-generated HTML chapter pages, which our HTML pre-processor can include in index.html.

UPDATE: Thanks to Ken B. for noting that something weird happened with the first publication of this post.

When you discover your anti-virus software...

is itself a virus!

My MacKeeper subscription expired. I actually attempted to renew it, but my credit card company decided that my attempt was a fraudulent charge. (And good for them, it turns out!)

Ever since then, MacKeeper pops up a dialog box at inconvenient times urging me to renew my subscription. This is just the sort of behavior I would expect from a virus residing on my computer.

The Conference Spammers Are Really Going Overboard

I just got invited to give a "keynote" speech in China at the 2017...

Orthopedic Conference!

I'm sure delivering this "keynote" speech would set me back a few hundred quid.

But really... their spam algorithm couldn't narrow down the field of possible victims any better than this?! I'm not even sure what "Orthopedic" means, and I'm a possible keynote speaker at this conference?!

Cooking the food in front of you

An idea I picked up from sitting in on Nassim Nicholas Taleb's classes is that of "cooking the food in front of you, instead of showing you the prepared dish." He uses this phrase when he is going to do some Mathematica programming right there, live, in front of the class.

This type of teaching inspired me to write a Python harness for comparing different hash functions in front of my class. I don't think any of them had ever seen an instructor do this before. And I am pretty sure they gained from seeing it.

It's not as anxiety-free (for the lecturer) as "showing them the prepared dish," but I think the students learn more from this form of presentation.

I know, it's only AWKward, but I like it...


A nice little Awk program that generates git directories per language based on the contents of two files:

BEGIN {
    file="langs.txt"; 
    while((getline < file ) > 0 ) { 
        langs[$1] = 1  # record each language
    }   
}

/^$/ { }     # blank lines allowed

/^\;/ { }    # allows comments in the chapter file

/^[IVXCM]/ { } # skip the major section names

/^[0-9]/ {
    print $2
    for( lang in langs ) { 
        new_dir = lang "/" $2
        if (system( "[ -d " new_dir " ] ") == 0)
            print new_dir " already exists."
        else {
            print "We are going to add " new_dir
            if (system( "mkdir " new_dir) == 0) {
                system( "touch " new_dir "/README")
                system( "git add " new_dir "/README")    
            }   
        }   
    }   

}