awa

Do Androids Dream of Electric Sheep?

There was a snarky comment recently wondering what language I dream in.

Not so snarky, actually.

If you were to ask my lady what language I dream in, she would be likely to answer, “I don’t know, but he types on my back in his sleep.”

Yes, I program in my sleep. I code while in the shower. I solve problems, regardless of what I’m doing.

I started programming experience with “procedural programming”. That is to say, a series of procedures that call each other and return results.

As part of that training, I quickly realized that any problem in programming could be broken into smaller and smaller “functions” or “procedures” until you were at the single machine instruction level.

For me, programming is broken into developing a series of black boxes that are connected to produce results.

If you look at a problem, “I want to layout a line of text on a screen with word wrapping”, it can be broken into smaller questions.

“I want to know the number of characters that will fit on the remainder of this line.” When black boxing, you put a function or procedure in place and assume it works. It doesn’t matter if it does or not. You can even fake it. Instead of actually doing a calculation, it can just return a constant.

Now that I’ve made this “magic” black box, I use it to solve the harder problem. Once that is solved, I can address the black box and make it work correctly.

I combine this with what I call “railroad structuring”.

Suppose that the final step in a black box is to draw a text on the screen. You are given a data structure that contains strings of text with markup. The data structure imparts formatting on the text as well.

You could write code that looks at the data structure and “does the right thing”. You would then end up with dozens of pieces of code, all that are supposed to do “the right thing”. Needless to say, this is seldom the case, at least a few of those places will do the wrong thing. And if you fix it in one place, you have to fix it in all other places.

So I create the end game, “draw the string ‘text’ at ‘position’ using ‘formatting'”. The rest of the code works to create “text”, “position” and “formatting”.

if the original text had markup in it, then that little section would modify text and create formatting to match the requirements of the markup. After that is done, we have ‘text’, ‘position’ and ‘formatting’. At each step, the result is always ‘text’, ‘position’ and ‘formatting’.

So, when somebody asks, “What language do you dream in?” The answer is, “my programming language.”

Because all computer languages look the same to me, but for syntax, it doesn’t matter. I always know what I want the language to do. I might have to look up the syntax for a particular thing, but that’s never an issue.

As an example:

for i in range(0,9):
print(i)

and


for (i=0; i<10; i++) {
fprintf("%d", i);
}

Do the same thing, I think. Because ‘range()’ is python and I’m never sure about it, I’ll look it up to find out if it gives me 0 through 8 or 0 through 9.

Still, the logic is the same and correct for me.

Tuesday tunes

I grew up listening to my parents’ music. I later started listening to WCMS 99.9FM. “Almost Perfect Radio” Their original was “Western and Country Music Station”.

Most of the music my parents owned had been transferred to reel-to-reel tape. This is actually a real problem. There were a couple of “albums” that I wish I knew the names of.

When I went to University, I was exposed to different music. Mostly because, being a collage town, they had no country music radio station. If I would rather not listen to the latest pop music, I had to find my own.

Then a fantastic thing happened, CD’s. Because the CD was not harmed when played, the CD emporium would let you listen to a CD before you purchased it. And boy did I listen to a lot. I purchased even more.

When I divorced my first wife, that CD collection was a sticking point. I ripped all of those CDs. All 500+ of them.

And then google ate it. GRRRRR

Not having the CDs in front of me, I’ve had to remember albums I used to listen to. The other night I listened to the London stage recording of ‘Cats’. Why? Because it was one of those albums I used to own.

So here is a song from a group I use to listen to:

Threat Assessment

Saturday was my monthly outing to interact with people. Always a stressful thing for me.

Part of that stress was aggravated because I couldn’t find the holster for my preferred firearm for “polite company that isn’t Gun People.” Which meant that I was carrying a 1911 instead of a Sig. That Sig is so small it doesn’t print at all.

So I’m speaking with some friends, but move on to introduce myself to the man my wife is talking to. He introduces himself and I do a threat assessment.

Not enough information.

He appears to be from the Middle East and talks with an accent that matches. threat += 1

We banter about not having met before. He claims to have been going to these events for multiple years. This is the first time I’ve seen him. threat += 2.

When I ask about his accent, he tells me he is Egyptian. threat += 0

I say something to like, “Oh, I thought you were from the Middle East.”

“No, I’m from Egypt. Egypt is not part of the Middle East.” threat += 1

He then explains to me that Egypt is part of Northern Africa, not the Middle East. Ok. This is a true statement. I’ll accept this on face value for now. He is attempting to distance his country from the Middle East. threat -= 2

He then tells me that the Middle East consists of the following countries: Palestine, Israel, Lebanon, Syria, Turkey, Iraq, Iran, Saudi Arabia, Qatar, UAE, Yemen, and Oman. Basically, everything west of the Red Sea but nothing on the continent of Africa. threat += 5

There is no country of “Palestine”.

We are in polite company, I’m not interested in him anymore. The threat level has hit 7.

He had not done anything to suggest ill intent on his part. But the entire conversation left me feeling uncomfortable.

The numbers I’m using are made up. They are in this article for illustrative purposes only.

A different example of a threat assessment: Older adult male, white, heavy smoker, day labor/handy man. The threat assessment was so high that he was never and would never be invited into my home. The sort of person who if I were to sell him a firearm, I would do it through an FFL, regardless of what he said about his background.

A different example, a number of dark skin females wearing head coverings. No increase in threat level. An angry black man with a skull cap comes out and starts speaking in angry tones to the women. Threat assessment goes high enough that I reposition myself and make sure he is under observation at all times. Verified egress path.

We all do threat assessments. If you can’t do a good assessment rapidly and then trust yourself you need to practice more.

The thing to note that more people have been injured or killed trying to avoid offending people than have been from avoiding people and situations that raise that threat assessment.

This has been a difficult article. None of us want to be racists. We would rather not judge people by the color of their skin or the culture they come from. We would rather not appear to be the sort of people who do judge people by their outward appearance.

But we are judged by what we look like. We do judge people by what they look like. When people see me, they will make assumptions about my past. Typically, they are mistaken. Some of that is because of how I present. I have three favorite hats I wear. A woodland camo Boonie Hat. A military issue watch cap.

And a black and white knit cap made from the yarn I spun from raw wool. My wife dyed the wool before I spun it. I had a friend make the cap.

If I’m wearing any of them, people assume. That’s fine with me. The only issue is when somebody thanks me for my service and I have to say, “I didn’t serve.”

Are you part of that paranoid group, like I am? Do you walk into a place and immediately find all the exits? Even exits that are not assessable to the public? Do you look for the seat where you can watch the people and there are few or no people behind you? Do you give every person who enters the once over?

Do you blade yourself to keep your firearm that much further from “them?”

Or is that just my paranoia?

Text, History, and Tradition. Really?

The other day I was reading Bruen, again. I was looking up that standard mantra, “When the plain text of the Second Amendment is implicated, the burden shifts to the state or prove a history and tradition of regulation.”

That is not what Bruen says.

Today, we decline to adopt that two-part approach. In keeping with Heller, we hold that when the Second Amendment’s plain text covers an individual’s conduct, the Constitution presumptively protects that conduct. To justify its regulation, the government may not simply posit that the regulation promotes an important interest. Rather, the government must demonstrate that the regulation is consistent with this Nation’s historical tradition of firearm regulation. Only if a firearm regulation is consistent with this Nation’s historical tradition may a court conclude that the individual’s conduct falls outside the Second Amendment’s “unqualified command.” Konigsberg v. State Bar of Cal., 366 U. S. 36, 50, n. 10 (1961).
New York State Rifle & Pistol Assn., Inc. V. Bruen, 142 S.Ct. 2111, 8 (U.S. 2022)

The state must prove the regulation is consistent with this Nation’s historical tradition of firearm regulation.

Not “this nation’s history and tradition,” but “this Nation’s historical tradition.”

Those are two different things. I might be able to prove a tradition of disarming people as they enter the church. But if there is no historical regulation, that tradition is meaningless in support of a modern infringement.

In the same way, I might be able to show that there was a historical regulation that banned guns in schools. If it is not also a tradition, then it doesn’t meet muster.

Notice that it also says this Nation’s historical tradition of firearm regulation. I don’t know how well it would work in court, but this seems to say that bans on other types of arms are not meaningful in a modern Second Amendment Challenge.

This appears to be a one-way ratchet. We can use the Second Amendment to protect all arms. The state can only use firearm regulations to justify their modern infringements.

So lock it in, When the Second Amendment’s plain text covers an individual’s conduct, the Constitution presumptively protects that conduct. And, The state must prove that their modern infringement is consistent with this Nation’s historical tradition of firearm regulations.

Nothing from before this Nation counts. Nothing from a different nation counts. It must be part of this Nation’s historical tradition of firearm regulations.

supported by the historical tradition of prohibitingDistrict of Columbia v. Heller, 467 U.S. 837, 627 (2008),

H/t to Mark Smith for pushing me to write about this.

Nerd Babble

TL;DR; How to solve problems that should already have been solved vs. reinventing the wheel.

I have been programming in Python for a few years now. I like the amazing libraries it has, plus the power of the language. I dislike that it has weak typing.

In the languages I’ve used in the past, you declare a variable before you use it.

int integerVar;
double floatingPointVar;

Python doesn’t do it that way.

integerVar = 5
floatingPointVar = 5.0

The issue is that you can assign 3.1415 to integerVar and python will let you do that. I’ve recently learned about “TypedDict” which gives me structures and a package called “trycast”. I finally have the types of data structures I want from more structured languages, in python.

Add to that my discovery of the Language Server Protocol, which has turned Emacs into an IDE and interactive debugger, and my life is much, much better.

All of this was just a side project on top of what I was really doing, writing a tool to help teach English as a Second Language, or ESL.

The first day I did this, I had my e-reader program running. I had Google dictionary available. I had to open a Google meet, then share different screens, as needed, to show the different parts.

I had a markdown editor open to have words that I planned to pre teach. It was painful. Switching from one student to another was a good 5 minutes. Prep time was 30 minutes per 30-minute session.

The cure was clear, write my own tool to perform what I required. The framework I chose to use was Qt6. It has Python libraries, I was already using it for other tools. It should all just work.

First, I had to learn the format of EPub. From there I needed to import the book and prepare it to present. I decided to use a QTextEdit. This worked ok. It was nothing more than a weak version of the E-Reader I had been using.

What made it powerful, was that I could select a word in the QTextEdit. With the click of a button, pull up a definition.

I used the request package for my networking.

Over the following weeks, the tool got better and better. Combined with PipeWire and Open Broadcast Studio, I had a pretty clean interface. I could select a word, click the “define” button, the tool would check to see if we already had the definition, if not, it would fetch the definition from a remote server. It would then format everything and put it into its own QTextEdit and display the results.

My students liked it.

The problems started when I decided I wanted to be able to play a pronunciation. This required learning how to create a virtual microphone. Learning how to use the QMediaPlayer. Learning how to direct sound from my tool to the virtual microphone. Making sure that the patch was correctly created to send all the audio to the correct places.

I got that working.

Did you know that some words have multiple pronunciations? I did. I didn’t code for it. This is no real issue, I just need to connect a click on a button in the QTextEdit and when the signal is received, play the sound.

Do you know what you can’t put in a QTextEdit? That’s right, a button.

The QTextBrowser gives me clickable links, but those are not generating the types of signals I was looking for. Worse, I can’t use the CSS to format my text the way I want to.

There was only one thing to do. Roll my own. I needed to create my own wheel. I had to reinvent my own text browser widget.

Which took me to learning how to do low-level graphics in Qt.

As I dug through this mess, I found that built in tools that “just worked”. Which lead me to discovering I didn’t need my own settings/preferences system. Qt has QSettings which does everything I need plus more. That’s a win. I haven’t switched to it yet, but I will.

Having found QSettings, it occurred to me that Qt might have networking tools. I was just about to implement a caching system when that networking might be a part of QT struck me. Turns out that not only does Qt have a networking implementation, it has a caching networking implementation.

At the same time all of this is happening, I’ve gotten an API key from Merriam-Webster. I now have access to better dictionary information. And the data payload is entirely different. It is very complex. Three weeks of coding, and I’m at the 90% state.

This brings me back to “This must be a solved problem.” What is that problem? Drawing text that wraps.

Consider a logical line of text, 200 characters long. If your display is 80 characters wide, it will display 80 characters, 80 characters, 40 characters.

This would look bad. What you want to do is to find the first logical word break before the 81st character and break the line there. This is what your text editor does. This is what your browser is doing right now. Unless I type a very long word, your browser is moving to the next line between words.

Yes, QT has an option for doing exactly that type of word wrap. It looks great. It is precisely what I want to see.

It works perfectly until I need to start that logical line at someplace apart from the first character of the line.

Consider this text: specifically : the procedure of submitting a statement to such conditions or operations as will lead to its proof or disproof or to its acceptance or rejection.

This bit of text has three separate parts. The first part is in italics, the next is bold, and the rest is in standard text.

It is that long bit of text that I want to wrap. The issue is that the text exists within two different bounding boxes.

The first box exists from : to the edge of the window. The second bounding box exists from below the first line of text and spans from the left indent to the right edge of the window.

Qt either doesn’t have that option, or I have not found it.

So the next thing that could happen is for the code to provide me a way of determining where Qt is braking words. If I know that, then I can break the text into two parts and make this all work.

3 steps forward, 2 steps back.

Friday Feedback

It has been a busy week for me. I’m still reading legal filings, but it is harder and harder to write about them.

The state says the same thing, over and over again. The courts keep looking for ways to avoid doing the right thing.

It reminds me so much of the aftermath of Heller.

I do remember freedom week in D.C. For about a week, I had a permit to carry in D.C. If you had a CCW or lived in a constitutional carry state, you could legally carry a concealed firearm in D.C.

A week later, that was gone.

It looks like the rogue courts have just about settled on how they are going to avoid obeying the Supreme Court.

At the same time, we are seeing more and more lawfare. Different entities suing people involved with the firearm industry to force them out of the business.

At the same time, the ATF is attempting to shut down private sales of firearms.

They just issued their final ruling on Thursday. Under the new ruling, just about anybody that transfers a firearm can be required to get an FFL or to go through an FFL.

We are getting closer to getting the next case before the Supreme Court. That is our only hope of bringing these rogue courts into line.

A reader passed this on:

It might be worth the read.  I found myself distracted by the content.

The comments are open, do you have anything you think we should read or which would be good for GFZ?

Nguyen v. Bonta, state tap dance

Legal Case Analysis
(1250 words)


This is another example of the state twisting and bending to have a small chance of winning.

Given that the appeal is to the Ninth Circuit, they will get the stay they are requesting.

In 1999, California passed a “one gun per month” or OGM law. It is actually difficult to track because it has automatic expirations built in. Each time it is reinstated, it gets worse.

The current incarnation hinders the purchasing of any firearm, completed frames or receivers, or firearm precursor parts.

In other words, this law could limit you to just one chunk-o-aluminum per month.

This was challenged before Bruen. The Heller, McDonald, Caetano, Bruen and other Second Amendment cases decided by the Supreme Court required no discovery and no experts. This is because the question is all legal.

The courts are the experts. The lawyers bring the arguments, the courts follow the law.

If a court tells you that it is qualified to do historical analysis of “the historical tradition of gun regulation” they are admitting they are incompetent.

The job of a lawyer or judge is to know the law. If a court rules on anything, they have examined a historical tradition. This is their job.

On March 11, 2024, the district court issued an order denying the state’s request for summary judgement and granting the plaintiff’s (good guys) motion.

The Attorney General satisfies that standard. The proposed course of conduct here—purchasing more than one firearm from a licensed firearms dealer within a thirty-day period—does not prevent individuals from “keep[ing]” or “bear[ing]” arms and thus does not fall within the scope of the Second Amendment. The OGM law is the exact type of “condition[] and qualification[] on the commercial sale of firearms” that the Supreme Court has endorsed as “presumptively lawful.” Heller, 554 U.S. at 626-627, 627 n.26; see also Bruen, 597 U.S. at 81 (Kavanaugh, J., concurring). And even if this Court were to assume that the OGM law implicates rights protected by the plain text of the Second Amendment, the law is consistent with our Nation’s historical tradition of firearm regulation. At a minimum, this case raises serious and substantial legal questions justifying a stay. And the equitable considerations overwhelmingly favor preserving the status quo during this appeal. California residents will remain able to purchase any number of firearms so long as they comply with the 30-day waiting period, and an unlimited quantity of ammunition. But without a stay, individuals prohibited from possessing firearms will gain a new avenue of obtaining firearms in California— before this Court has had a chance to resolve the questions presented by the State’s appeal.
New York State Rifle & Pistol Assn., Inc. V. Bruen, 142 S.Ct. 2111, 8 (U.S. 2022)

The right of the people to keep and bear arms shall not be infringed.

To INFRI’NGE

  1. To violate; to break laws or contracts.
  2. To destroy; to hinder.
District of Columbia v. Heller, 467 U.S. 837, 627 (2008)

Emphasis added.

The concept of ancillary right is well established. The case most commonly cited is Missing citations for VGKA24MW. To bear arms, I need to be able to keep them. In order to “keep” arms, I need to be able to acquire them.

If my ability to acquire arms is hindered, such as an arbitrary limit on the number of purchases, then my right to keep and bear arms has been infringed.

This satisfies the plain text of the Second Amendment.

The Supreme Court has stated that once the conduct implicates the plain text of the Second Amendment, that conduct is presumptively protected.

Notice that word, “presumptively”. The state argues that just because the conduct is presumptively protected does not mean that their infringement is unconstitutional. They can present arguments that might overcome that presumption.

Just like a person charged with a crime is presumed innocent until proven guilty, the law is presumed unconstitutional until the state proves it is constitutional.

The burden rests fully on the state to provide that proof.

While the state is arguing that things that are “presumed” are not actually, they are arguing that a bit of dicta in Heller fully protects their infringing regulation. “Presumptively lawful” means that it is presumed. It is still open to challenge, and when it is challenged, the state has the burden to prove a historical tradition of firearms regulation.

The state resorts to redefining words, First, the OGM law does not implicate conduct protected by the Second Amendment’s plain text because it does not prevent law-abiding citizens from keeping or bearing arms for self-defense.Missing citations for 5HVFFPF8

If the regulation infringes, then it implicates the Second Amendment. The regulation does not need to prevent, it merely needs to hinder. If the person is a part of The People, then they are protected. They do not need to be in the subclass of “law-abiding” nor “citizen”. Remember, there are many aliens that are here legally who are part of the national community.

Finally, the right is to keep and bear arms, not to keep and bear arms for self-defense.

While the Heller opinion does reference self-defense, it does not restrict the meaning of the Second Amendment.

Some wishful thinking by the state:

The district court concluded the OGM law implicates protected conduct because the Second Amendment is not “limited to possession and acquisition of a single firearm, or that the acquisition of additional firearms is inherently subject to additional limitations.” Order 15. This misconstrues the scope of the OGM law. The law does not impose any numerical limit on the number of firearms that California residents may acquire and possess. In other words, the OGM law does not prevent any individual from keeping and bearing arms, and therefore does not implicate the plain text of the Second Amendment.
Missing citations for 5HVFFPF8
When I use a word,’ Humpty Dumpty said in rather a scornful tone, ‘it means just what I choose it to mean — neither more nor less.’

’The question is,’ said Alice, ‘whether you can make words mean so many different things.’

’The question is,’ said Humpty Dumpty, ‘which is to be master — that’s all.”
Missing citations for MUA4SWX7

Infringe means to destroy or to hinder. Not “prevent”.

Which brings us back to “presumptively lawful regulatory measure”. This is dicta. Anybody reading this passage honestly understands that the Supreme Court is saying that they have not looked at the question of the constitutionality of commercial sale of arms. For the moment, in that particular case, they are going to presume it is lawful.

This means that it is open to being challenged.

If it is challenged, then the challengers (plaintiffs) have the burden to prove that the plain text of the Second Amendment is implicated.

Is their conduct hindered? Yes. Does their conduct have anything to do with keeping or bearing arms or the ancillary actions associated with keeping or bearing arms? Yes. Then the burden shifts to the state to prove this Nation’s historical tradition of firearm regulation that matches.

That is what Bruen said, that’s what Heller said.

Bibliography

District of Columbia v. Heller, 467 U.S. 837 (2008)
New York State Rifle & Pistol Assn., Inc. V. Bruen, 142 S.Ct. 2111 (U.S. 2022)