Random Math

16 processes running at once, all scrolling fast enough to refresh every screen every frame.

I was telling the kids how fast computers are, and to demonstrate I wrote this Python program to do simple multiplication, division, addition, and subtraction.

from random import random as rand
from random import choice
def randmath():
	ops = {'+': 31, '-': 32, '*': 16, '/': 32}
	operator = choice([i for i in ops.keys()])
	scope = 1 << ops[operator]
	num1 = int(rand()*scope)
	num2 = int(rand()*scope)
	mathstring = "{} {} {}".format(num1, operator, num2)
	result = eval( mathstring )
	print(mathstring , "=", result)
	
while True: randmath()

Since that scrolls by so quickly, you may want to try this version, which pauses two seconds between calculations.

from random import random as rand
from random import choice
from time import sleep
def randmath():
	ops = {'+': 31, '-': 32, '*': 16, '/': 32}
	operator = choice([i for i in ops.keys()])
	scope = 1 << ops[operator]
	num1 = int(rand()*scope)
	num2 = int(rand()*scope)
	mathstring = "{} {} {}".format(num1, operator, num2)
	result = eval( mathstring )
	print(mathstring , "=", result)
	
while True:
        randmath()
        sleep(2)
Twenty throttled math programs all running at once, with the CPU hovering around 3-10%

To get them all nicely tiled like that, right-click on the taskbar and select “Show windows stacked”

Posted in Articles | Tagged | Leave a comment

Vacation Trials

We took a family vacation 2017-05-27 thru 2017-06-29, swinging around the western third of the USA. I was working remote during the entire trip, which set the stress levels a bit high just off the bat. The whole family came along, which at the time was five children, the oldest of which was seven. So that was a bit stressful as well.

The first leg of the trip was the drive out to Tucson. It went well all the way through the desert, though the AC switched to heat when we were going up hills, but on our arrival in Tucson the air conditioning inexplicably ceased to function all together. I poked around to see if maybe a cable was loose or something, but was unable to revive it. We figured we would get it fixed a few days later when we spent a week in Colorado Springs.

But once we got the car into the shop in Colorado Springs, the shop kept having delays. First it was disassembly, then it was parts, then the parts were the wrong parts, then the new parts wouldn’t go back together correctly. The short of it was that we were stuck without a vehicle for three days at the campsite with spotty wifi and unreliable cell service. The day before we needed to leave we finally got the car back with the AC fixed (though it still switched to heat going uphill).

The next two weeks were pretty uneventful, other than needing to replace one of the headlights. We stopped by our rental house to bring home some of the things we had put in storage, so we wanted to get a trailer, but for that we needed a trailer hitch. So the day before we planned to drive home, we took the van down to the U-Haul. While I was The guy who installed the hitch bar put it in too far back, so the spare tire wouldn’t fit properly, but we didn’t have time to worry about that because the van also just wouldn’t start. I walked back and forth between the U-Haul and our house several times, and at one point I left my phone charging in the lobby. When I got back my phone had been stolen. A guy who worked at the oil change place helped us diagnose the problem, and we had the van towed to the local dealership. I walked to the friend’s house where we were staying and I had reached my limit. I wept in my wife’s lap.

So we were stuck again. We asked our parish priest and our parents for prayers, but there was nothing else to be done. I spent the day at the dealership, and five days later we had the van back. The delay had thrown off our plans, and we rushed to get the trailer hooked up, packed, and the family back on the road.

About half way back, we got a flat tire. That only took about a half hour to put on the spare, and then another hour or so to get a couple new tires put on.

At the time, it felt like everything was going wrong. Looking back, well, it could have gone better, but we overcame it, and God knew we could, so it’s something of a compliment I suppose.

Posted in Articles | Leave a comment

Fragments of the Hero’s Journey

After listening to quite a few Jordan B. Peterson lectures – perhaps a few too many if that is possible – I clambered up into my tree fort – though tree seat might be a better description – and wrote down this idea. Tragedy, comedy, and horror are all fragments of the Hero’s Journey. I didn’t even write it down like that. Instead I drew a picture.

Continue reading
Posted in Articles | Tagged , | 1 Comment

Novena to Saint Cajetan for the Unemployed and Underemployed

Introductory prayer for every day:

(Begin with the sign of the cross)
Omnipotent and everlasting God, You wanted St. Cajetan to trust in your Providence and despise earthly things and You enriched him with abundant spiritual goods, grant that those who implore the graces of your Divine Providence are aided in their necessities by St. Cajetan’s intercession. We ask this through our Lord Jesus Christ. Amen.

Continue reading
Posted in Other | Tagged | Leave a comment

Thaw Among Frozen Stones

Chill air, with a hint of perfume, and the dawn widening.

In that light, diffused from pearly clouds and still blushing at the stretching sun, a wave or two of illumination washes over the field far below.

Up between the stones and boulders they come, red, and white, and gold, and palest lavender, flowers in bursting columns and rafts so dense they might support the glaciers, which still hang, like clouds themselves, high on the valley walls.

A bubbling rivulet of crystal water leaps from stone to stone, and the green buttresses of the blooms drink it up, and nearly glow themselves as decked with dew like jewels, they fling back quivering light to bolster the brightening day.

Narrated animation here: https://www.youtube.com/watch?v=Rgt87gdjCcM

Posted in Other | Tagged | 1 Comment

Chronicles of Everfall – Shadow of the Conqueror: Review and Feedback

This is a detailed review, response, and rebuttal of the fantasy book “Chronicles of Everfall – Shadow of the Conqueror” By Shad M. Brooks, abbreviated occasionally as SotC in this essay.

It’s quite interesting to hear Shad describe himself as being good at writing dialogue, but “no poet.” an evaluation I found apt. My strengths lie, if anything, reversed. I relish the well-turned phrase, and so found much of the prose clunky and dull. I likewise find crafting convincing dialogue challenging, so the conversations were quite inspirational for me. Shad seems to know where he needs improvement, so I hope the details below will be taken as encouragement to continue refining his craft.

Continue reading
Posted in Articles | Tagged | 2 Comments

Writing Exercise

Ooh. Who’s that?
That doesn’t look fun. We’re friends right? We’re all staying here. We’re just hangin.
No, they want a fight. I can take ’em. Let’s go!
But it’s so uncomfortable out there. Don’t you want to be here where it’s warm and we don’t have to fight to breathe?
No, I’m going out there! I want to!
We could be here, together. We’re both changing so much. If we leave, we’ll both die.
I can change everything out there. I can change them! I will.
We order you to stay. We have the authority. We made you.
We have to go. I have to grow. I will survive, for long enough. I’m leaving. Goodbye, for now.

Posted in Short Stories | 1 Comment

Open Wide Our Hearts: Thoughts

Below are some of my thoughts on the pastoral letter against racism “Open Wide Our Hearts” found here: http://www.usccb.org/issues-and-action/human-life-and-dignity/racism/upload/open-wide-our-hearts.pdf
While reading the letter is not necessary to understand my comments, I recommend at least skimming it for context. In overview:

  • I support the substance of the letter in so far as it calls us to recognize the common dignity of all humanity before God.
  • I oppose the letter where it draws more from the tainted wells of identity politics and non-normalized statistics than it does from the Holy Scriptures.

The first oddity is the definition of Racism as “Racism arises when-either consciously or unconsciously-a person holds that his or her own race or ethnicity is superior, and therefore judges persons of other races or ethnicities as inferior and unworthy of equal regard.” and then quickly declares “Racist acts are sinful because they violate justice.” I agree with this statement, but would agree even more if the words “his or her own” were replaced with “one particular”. Sadly, this will cause problems later on in the letter.

Continue reading
Posted in Articles | Tagged , | Leave a comment

Arguments for Tyranny

I’ve already made several forays into the realm of the nature of proper governance. Here’s the most extensive of them:

https://docs.google.com/document/d/19rbQXwCG7az5DCV4Gc6YpIm-Vk1ZuunlRor0_407Gy8/edit?usp=sharing

Which was itself heavily informed by the writings of one Frederic Bastiat, some of which passages I have commented on here:

http://blog.hawkbats.com/index.php?s=bastiat

But in this article, I’d like to explore a few unusual arguments, take them to their extremes, and hopefully gain a better understanding of the nature of political power. Because political power is an evergreen source of contention, mainly because it is all about contention. Politics is about who should be on our side whom we should always defend and opportunistically admire, and who should be on the other team whom we should always despise and opportunistically destroy.

Continue reading
Posted in Articles | Tagged | 1 Comment

Critical Damage and Random Numbers

So I was thinking about critical hits, where some attacks do much more damage than others. Normally, this is just a 2x or 3x bonus. But what if you wanted occasional 30 or 200 times the damage? And what if you wanted to use this system for more than just damage? City sizes and skill checks and so forth. The random number generator would need to be on a continuous scale, instead of occasional discrete bonuses.

And more importantly, how would you balance this? It wouldn’t be fair if critical attacks greatly boosted DPS. Or if skill checks that were bursty gave an advantage.

So, basically, I wanted a random number generator with a consistent average value, and a variable range, without going negative. For simplicity, I used an exponential system. So, if the variance is 2, you can get numbers anywhere between 1/2 (0.5) and 2, with an average of 1. Or, if the variance is 471, you’ll get values between 1/471 (0.0021231…) and 471, but the average value will still be 1.

Continue reading
Posted in Articles, Other | Tagged , | Leave a comment