Profile cover photo
Profile photo
James Jones
188 followers
188 followers
About
Communities and Collections
View all
Posts

Post has attachment
If you were around back in the days before the Wintel Evil Empire, you'll remember the BASIC interpreters that were typically put in ROM on every personal computer. With design, data structures, and algorithms heavily constrained by RAM limitations, they were enough for writing small programs, but made writing anything of significance sheer hell, forcing the programmer to destroy legibility and maintainability to minimize the consequences of the interpreter's design.

(I was exposed to such BASICs, but had the good fortune to discover OS-9 and BASIC09, the latter a far superior and more efficient BASIC system.)

Why bring up that? Well, something I learned about Python reminded me just a little of the bad old days of what Kemeny and Kurtz called "street BASIC". Python is far superior to the obscenity of street BASICs (which in a bizarre twist, some people are nostalgic for or even advocate as a first language), but the feature I found out about is one that bypasses some interpreter overhead.

Apparently you can add members to an instance of a class at runtime, just by referring to one that isn't in the constructor, and therefore each instantiation of a class gets its own dictionary for looking up members in addition to one for the class as a whole. Apparently people actually use this capability, so it's considered a feature... but it comes at a cost in time and memory.

So... if you aren't going to randomly add (or delete!) members from a class, you can insert the following in its constructor:

_slots_ = # tuple listing the member names as string constants

Nice to know, but ack... it is error-prone, because the member names have to appear both in this tuple and where the constructor sets each member. As I'm told they say in Minnesota, "You know, a lotta guys would make _slots_ the default and have the interpreter notice the field names where they're set, so that you have to ask for the current default (which can be done without having to name all the members)."

More info on _slots_ at the link.
Add a comment...

My admiration of Google's search algorithms is up another notch or two.

Today we bought some pumpkin soup (which had the amazing property of not tasting like much of anything; OTOH, I bet if I got someone to bake a pumpkin pie without the dreaded "pumpkin spice", it would be flavorless too) and found some thin baked goods--imagine circular waffle cone material made far too thin to actually use as a cone. It had some Italian-looking name that the far more familiar "pizza" refused to let in to longer-term memory.

Evening passes as does supper, and Billie asks what their name is--we had a few as part of dessert. I couldn't think of it... but I had only to type this string at Google:

starts with p, like thin flat waffle cones

and the very first result was for the item in question, pizzelle.

If there's a way to type an actual regex at Google and have it used for search, I am not aware of it, so for the heck of it I tried "starts with p", something that Joe Average might type. Actually, it was a WAG at something the search engine might use. "thin" and "waffle" I could see helping the search, but the rest? I'm impressed.
Add a comment...

Wow. I got on G+ and didn't see a mass of spammed links to porn on technical communities--but it's rather depressing that that should be a noteworthy event.
Add a comment...

Post has attachment
Add a comment...

Post has attachment
I forget who pointed out the tendency people have to point out the extensive errors in reporting on a field they're familiar with, but think that they do OK on all that other stuff.

I'm reminded of it by the sheer utter wrongness of the title of this, from CNN:
Add a comment...

Post has attachment
I keep reading claims that Microsoft has changed its ways...
Add a comment...

Post has attachment
Add a comment...

Seriously perturbed with the MeWe Android app. I've done about everything in its settings to stop it from playing a sound when something happens in a group I'm in... and it keeps making noise regardless.
Add a comment...

Post has attachment
Well, there's still almost a year left, so...

Give a listen to Bloodywood. Indian folk music meets metal, and the result is, IMHO, mighty fine. I especially like their latest video; it's an original, and something I greatly appreciate finding.

https://www.youtube.com/watch?v=6uJoN_I9ebQ&t=288s
Add a comment...

As you know, or likely will know before day's end, Google has decided to turn Google+ into an enterprise-only service, and G+ for the rest of us will come down by the end of August 2019.

I'm sorry to hear that. The Circles notion struck me as elegant, and for a long time the riff-raff seemed to stay away, unlike some other social media. Now, alas, various technical communities are carpet bombed with links to porn videos, and stray users who seem to only post images of themselves scantily clad follow me for no apparent reason. (Perhaps a few decades ago I wouldn't be as bothered by the latter.)

So, I'll be more seriously using Mastodon (i.e. really starting to use it) and posting how to reach me there and elsewhere periodically between now and next August.
Add a comment...
Wait while more posts are being loaded