tag:blogger.com,1999:blog-64315272024-03-14T09:16:37.137+00:00non-random notesthings i see happening in my village, 24 time zones wide...Arthurhttp://www.blogger.com/profile/07467853070371188335noreply@blogger.comBlogger271125tag:blogger.com,1999:blog-6431527.post-26175920351727928592023-06-11T21:28:00.001+00:002023-06-11T21:28:07.240+00:00Okay.. Setting up MFA<div>(2FA is just MFA where "multiple" == "two")</div><div><br /></div><div>Have you got your FaceBook page up?</div><div><br /></div><div>1. Click on your profile picture -- top right in English, North America. A menu will drop down.</div><div><br /></div><div>2. You'll want to click on "Settings & Privacy" with an angle bracket to the right. Clicking it will produce another menu.</div><div><br /></div><div>3. You'll want to click "Settings" and that will lead to a page titled "Your Facebook Information". If you haven't been here for awhile, you may get a pop-up window telling you that account security management has been moved to a Meta page.</div><div><br /></div><div>4. On the left, of "Your Facebook information", under "Settings" there's a "Meta Account Center" (mis-spelled because of course this is an American page, not a Canadian one -- it's called "Centre" up here) an item called "Password and security". Click on that.</div><div><br /></div><div>5. Annoyingly, the result will look like you're Starting All Over Again...<sigh></div><div><br /></div><div>6. And again, on the left, there'll be a "Password and security" item. Click it. (Didn't I click that already?)</div><div><br /></div><div>7. And now, on the right there's a Two-factor authentication item. Click on that. With Meta, you may need to choose between a Facebook and an Instagram account. (Remember. Computers are stupid. They're the idiots here, not you)</div><div><br /></div><div>8. If you don't already have it set up, Meta will probably ask you to do 2FA through SMS messages (text) on a cell phone first. Go ahead and follow the steps.</div><div><br /></div><div>Choose a cellphone that you have exclusive use of, if you can. If you can't, I hope it's held by someone you can trust. Enter the cellphone and when you get the text message, enter the number in the browser.</div><div><br /></div><div>9. Then go back into the 2FA selection and choose the app.</div><div><br /></div><div>10. Fire up the app on your phone and choose "Scan a QR Code".</div><div><br /></div><div>11. Back on the computer, when Meta gives you a QR code, scan it with your phone and a 6-digit number will start being generated on your phone (whenever you need it).</div><div><br /></div><div>12. Enter the "current number" (you'll have a minute after the next time it changes) in the field on the web site.</div><div><br /></div><div>13. Then, make sure Meta wants to use the app, not SMS to your phone going forward.</div><div><br /></div><div>There. You're done. There were more steps there than I thought there would be (or in all honesty, more than I think there should have been) but it wasn't that hard, right?</div><div><br /></div><div>Can you do the same thing in gmail? It'll start with the "Gear" icon and choosing "See all Settings" but I'll leave the rest for you to discover and feel accomplished for yourself.</div><div><br /></div><div>And now it'll be just that little bit harder for someone to take over your account. You won't be able to prevent someone from choosing a name like yours on Twitter or Facebook, but your. own. account. is just that much safer than it was.</div><div><br /></div><div>One last thing. Can you pay it forward? Maybe you know an elder or other person with practical challenges who could be helped with this?</div><div><br /></div><div>But now this is out there and maybe when someone else does the google search, they'll find my explanation, and maybe it'll help in a more generic way than any one web site's explanation. 🧵4/4</div><div><br /></div><div>(click older to get parts 1 to 3)</div><a href=""></a>
<blockquote>
</blockquote>Arthurhttp://www.blogger.com/profile/07467853070371188335noreply@blogger.com0tag:blogger.com,1999:blog-6431527.post-32500555033864432612023-06-11T21:27:00.004+00:002023-06-16T05:19:44.449+00:00One more thing first...<div>Every online tool you use does MFA slightly differently -- that's the first <i>bad news</i>. It means I can't say "just do this", "just do that" and it'll explain for all times.</div><div><br /></div><div>But it's not that bad. For one thing, the mechanisms are all pretty similar. Once you know one, you'll have a hint when you get to the other ones. That's <b>good news</b>.</div><div><br /></div><div>Even better... as multiple services consolidate -- something I'm not <b>really</b> happy about but there are upsides -- there's a certain uniformity the services gain so that if you know how to do it in one service by, say, Meta, you'll know how to do it in another of their offerings. That's even <b>better news</b>.</div><div><br /></div><div>And yet... online services are constantly looking for ways to "improve" their web pages, not realizing that change is a downgrade by default -- until we find the new places things have been stuck -- and that can be <i>bad news</i>.</div><div><br /></div><div>All that is to preface my instructions and justify their sketchiness. What I'm describing is Summer 2023 on Facebook, on a desktop. There's a difference here between my preference and my wife's. She does <b>everything</b> on her phone. I do <b>everything</b> on a laptop/desktop. I view things on a phone but most of what I do is on a desktop.</div><div><br /></div><div>You can do all these things on a phone, too, but maybe the first time you'll want to do this on a computer? If you have one, great.</div><div><br /></div><div>If you don't, maybe your public library is a good option? Ask them before you try, "How sure you are that my credentials are safe if I enter them on those computers?" Librarians are cool and if you press a bit (respectfully, remember) and there is a problem, they'll crack and may suggest a better local option.</div><div><br /></div><div>If they're firm that there's no problem, there's no problem, at least not in most western countries. Remember, these are the people who resist book bans. Let me say it again in my best Henry Winkler voice: Librarians are Cool! 👍 (Leather jacket extra, motorbike? I prefer my pedals)</div><div><br /></div><div>When it comes to doing MFA, you'll find it easier to do on a desktop regardless. We did one MFA for my wife on her phone and switching from one app to another was a bit tricky. It was possible but took a few tries. We did the next one on a laptop and it was a lot easier, switching from one device to another instead of switching from one app on the phone to another.</div><div><br /></div><div>Have you got your FaceBook page up? Bring it up and click newer. 🧵3/4</div><div><br /></div><div>(click older to get parts 1 and 2)</div><a href=""></a>
<blockquote>
</blockquote>Arthurhttp://www.blogger.com/profile/07467853070371188335noreply@blogger.com0tag:blogger.com,1999:blog-6431527.post-16547336156482913022023-06-11T21:27:00.001+00:002023-06-11T21:27:39.499+00:00What is MFA?<div>Wait a sec. What on earth is MFA? That's short for Multi-Factor Authentication and the quick answer is the entrance to <a href="https://www.youtube.com/watch?v=ueFvLFrRnwY" rel="nofollow" target="_blank">Edna Mode's design studio</a>.</div><div><br /></div><div>Did you see? Watch it again. How many factors did Edna verify against? Watch it again and watch for these points:</div><div><ol><li>0'04": she entered a password</li><li>0'06": she offered a handprint</li><li>0'08": she offered a retinal scan</li><li>0'10": she offered a voice sample</li><li>0'14": she acknowledged Helen (Elastigirl) Parr's presence</li></ol><div><div>That's. Too. Many. Factors. for you but it demonstrates the point, right? Especially when you remember that once she's in the door, into her studio, MFA never bothers her again.</div><div><br /></div><div>For you, when you first log into your social media with MFA on your phone or your computer, you'll have to enter one more thing. Once you're there, you'll probably have to log out in order to be challenged by it again. The other time would be when you change your password. Do you change your password now and then? My employer makes me change certain passwords regularly. Personal accounts tend not to insist on it but, if you can come up with a way to NEVER forget your new password, you may want to change passwords periodically.</div><div><br /></div><div>Oh, and yeah... <b>you're not using the same password for all of your social media</b>, are you? You are? Well, there's a reason to do some password changing right away after all then. It's obvious, right? If you use the same password everywhere, an attacker who cracks your password in one place gets an <i>entré</i> to <b>all</b> your accounts, right?</div><div><br /></div><div>If you want the background, if enough people want a background, I'll try to add that later.</div><div><br /></div><div>Otherwise, why not arm yourself now? Click newer to find out how. 🧵2/4</div></div></div><div><br /></div><div>(click older to get part 1)</div><a href=""></a>
<blockquote>
</blockquote>Arthurhttp://www.blogger.com/profile/07467853070371188335noreply@blogger.com0tag:blogger.com,1999:blog-6431527.post-29292808851348115452023-06-11T21:26:00.006+00:002023-06-11T21:26:59.533+00:00Help! My Account Has Been Hacked!<div style="text-align: left;"><i style="font-size: small;">Many too many have stood where you stand.</i></div><div><span style="font-size: x-small;"><i>Too many more will stand here too.</i></span></div><div><span style="font-size: x-small;"><i>I hear your account's been hacked,</i></span></div><div><span style="font-size: x-small;"><i>you've had to change your name</i></span></div><div><span style="font-size: x-small;"><i>Build your contact lists again. (with apologies to Genesis - <a href="https://www.youtube.com/watch?v=9PjXnYaLvM0" rel="nofollow" target="_blank">Many Too Many, 1978</a>)</i></span></div><div><br /></div><div><div>This hasn't happened to me --- yet. But I've been doing something I thought everyone knew about and I think it's helped prevent it. And yet, when my wife mentioned the lengths a friend of hers had to go to, in order to move heaven and earth to convince some social media site that, yes, yes! I really am that person! someone stole my account and I want it back! I turned to her and said, "Did she have MFA?"</div><div><br /></div><div>She said, "I don't think so. How do I do that, anyway?" And I realized that I'd probably let her down on this one.</div><div><br /></div><div>"Wait a sec," I said, "You have MFA don't you?" I'm geeky enough, we've been together long enough that she knows what MFA is, but she hadn't figured out how to do it for herself. Other things got in the way before now, but today, those were put aside for about 30 minutes and I made sure she had MFA on all her accounts and understood how to use it.</div><div><br /></div><div>It's not hard and all of you, my neighbours, deserve to have the same protection for yourselves (and it's REALLY not that hard to do).</div><div><br /></div><div>There's a community I'm a part of, attached to a weekly <a href="https://www.youtube.com/@thefive-8" rel="nofollow" target="_blank">youtube rant</a> with graphics, song parodies, guests, open source intelligence deep dives (you know who you are) -- you can't "just believe" everything they say (there are a couple of points on which I disagree with them or at least have my strong doubts) but they're a tribe I don't mind hanging with (<a href="https://twitter.com/the_five8" rel="nofollow" target="_blank">@the_five8</a>) though I'm pretty stodgy in a bunch of ways compared to them. Recently, several of them have changed their names several times, so it's made me wonder if either:</div><div><ol style="text-align: left;"><li>this MFA thing isn't as effective as I thought (and I've been lucky) OR</li><li>this MFA thing isn't as widespread as I thought</li></ol></div><div><div>Adding MFA to ALL your account is, like, so 90s or 00s, you know? Oh. You don't? Oh yeah. I'm a geek, a nerd. Worn with pride but sometimes I miss the implications.</div><div><br /></div></div><div>Some of the OSInt people on the Five 8 have really angered a few people. One of them (not one of the hacking victims) has had to leave home, never to return until the local powers that be are no longer mobsters who'll cause injury or death if a return is ever attempted. No. I'm not joking. The situation's broad strokes are a matter of public record in credible press reports and <a href="https://gregolear.substack.com/p/jersey-off-shore" rel="nofollow" target="_blank">other places</a>.</div><div><br /></div><div>Anyways... another one said, when I poked at the MFA subject, that they had no younger relatives to appeal to for help setting up MFA, so I decided to write this -- a blog thread, if you will. <i>Oh Arthur, that is just so 90s.... and you do threads on twitter! not on a blog...</i> (I don't care. I'll do it this way anyway).</div><div><br /></div></div><div>So, what is MFA? click newer to find out. 🧵1/4</div><a href=""></a>
<blockquote>
</blockquote>Arthurhttp://www.blogger.com/profile/07467853070371188335noreply@blogger.com0tag:blogger.com,1999:blog-6431527.post-56755018598818507302023-05-02T04:09:00.000+00:002023-05-06T20:33:20.207+00:00CMAKE and Windows Executables<div dir="ltr"><div class="gmail_default" style="font-family: arial, helvetica, sans-serif;">Make no mistake about it. I <b>LOVE</b> <a href="https://cmake.org/">cmake</a>. CMake, <a href="https://git-scm.com/">git</a> and <a href="https://en.cppreference.com/w/">post-2011 C++</a> reinvigorated my love for what I do and confirmed for me that whatever development I do, I want it to be in C++, extra marks for cross-platform, and can we be <a href="https://en.wikipedia.org/wiki/Test-driven_development">test-driven</a> please? I'm doing all that on my <a href="https://github.com/ANSAKsoftware/ansak-string">own</a> <a href="https://github.com/ANSAKsoftware/ansak-lib">stuff</a>, which has slowed to a crawl for a variety of reasons these days.</div><div class="gmail_default" style="font-family: arial, helvetica, sans-serif;"><br /></div><div class="gmail_default" style="font-family: arial, helvetica, sans-serif;">But this week, I bumped into a wrinkle. I needed to deploy an extension .DLL (it's called a .so in Linux, .dylib on macOS) with an <a href="https://nsis.sourceforge.io/">installer</a>, and it was working just fine... until I tried to test it on Windows 11, in which case my extension DLL just plain failed to load.</div><div class="gmail_default" style="font-family: arial, helvetica, sans-serif;"><br /></div><div class="gmail_default"><span face="arial,helvetica,sans-serif">I speculated about what new thing on Windows 11 might be causing my problem. Was it some "property" -- no fiddling with </span><font face="monospace">icacls</font><font face="arial, helvetica, sans-serif"> that I could do seemed to fix it. Overnight that night, I woke up thinking, "no, it's not that, it's something about the code underneath." What? I though? Like C++ and depending on the STL? So I implemented my way around that (which was fun), ran it as a test DLL and everything seemed to work. I put it the result into the build system and the DLL from there wouldn't load any more than my first attempt. Poring over the compile commands, between the Visual Studio-produced build properties and those generated from CMake exposed some odd differences but nothing that looked dispositive.</font></div><div class="gmail_default" style="font-family: arial, helvetica, sans-serif;"><br /></div><div class="gmail_default"><span face="arial,helvetica,sans-serif">The link switches, though, that was another question entirely. The CMake-generated version was showing </span><font face="monospace">/SUBSYSTEM:CONSOLE</font><font face="arial, helvetica, sans-serif"> in the link parameters; the Visual Studio created one was showing </font><font face="monospace">/SUBSYSTEM:WINDOWS</font><font face="arial, helvetica, sans-serif">. Google did NOT lead me to where I wanted to go easily. Instead, I found stale articles from 2008 (with no answer) and conflicting advice on StackOverflow. A co-worker pointed to an article that said to specify something in the </font><font face="monospace">add_executable</font><font face="arial, helvetica, sans-serif"> command inside CMake. Only... I was writing a DLL (</font><font face="monospace">add_library</font><font face="arial, sans-serif">) </font><font face="arial, helvetica, sans-serif">and there wasn't the same option there. I did find <b>one</b> article that suggested a way to do it: the resulting DLL did indeed work on Windows 11, but it struck me as clunky, so I pushed a little harder on it and produced a one-line solution.</font></div><div class="gmail_default" style="font-family: arial, helvetica, sans-serif;"><br /></div><div class="gmail_default" style="font-family: arial, helvetica, sans-serif;">So, just to make sure I wasn't swallowing a horse unnecessarily (the STL free code that I wrote when I thought that was the problem?), I tried the same solution on my original code -- and it worked! So I had fallen prey to two sets of red herrings, not just one.</div><div class="gmail_default" style="font-family: arial, helvetica, sans-serif;"><br /></div><div class="gmail_default"><span face="arial,helvetica,sans-serif">And so. I present here a formula, in one place, for forcing any EXE or DLL to be compiled for </span><font face="monospace">/SUBSYSTEM:WINDOWS</font><font face="arial, helvetica, sans-serif">, because sometimes that's just what you gotta have.</font></div><div class="gmail_default" style="font-family: arial, helvetica, sans-serif;"><br /></div><div class="gmail_default"><span face="arial,helvetica,sans-serif">For an executable, add "</span><font face="monospace">WIN32</font><font face="arial, helvetica, sans-serif">" to the add_executable command where you create your target, as:</font></div><div class="gmail_default" style="font-family: arial, helvetica, sans-serif;"><br /></div><div class="gmail_default"><font face="monospace">add_executable(${target_} WIN32 .... )</font></div><div class="gmail_default" style="font-family: arial, helvetica, sans-serif;"><br /></div><div class="gmail_default" style="font-family: arial, helvetica, sans-serif;">For a Dynamic Link Library, add the line</div><div class="gmail_default" style="font-family: arial, helvetica, sans-serif;"><br /></div><div class="gmail_default"><font face="monospace">set_target_properties( ${target_} PROPERTIES LINK_FLAGS "/SUBSYSTEM:WINDOWS")</font></div><div class="gmail_default" style="font-family: arial, helvetica, sans-serif;"><br /></div><div class="gmail_default" style="font-family: arial, helvetica, sans-serif;">You may also find this useful -- to prevent your DLL from reaching out and including other DLLs on systems where they aren't already installed:</div><div class="gmail_default" style="font-family: arial, helvetica, sans-serif;"><br /></div><div class="gmail_default"><font face="monospace">set_property(TARGET ${target_} MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")</font></div><div class="gmail_default" style="font-family: arial, helvetica, sans-serif;"><br /></div><div class="gmail_default" style="font-family: arial, helvetica, sans-serif;">Simple solution and now, hopefully, it'll be easier for me (a) to remember it or if not (b) to find it when I need it again... okay google?</div></div> Arthurhttp://www.blogger.com/profile/07467853070371188335noreply@blogger.com0tag:blogger.com,1999:blog-6431527.post-80371237905847084052022-04-22T13:49:00.003+00:002022-04-22T14:41:50.018+00:00ansak-string, ansak-lib and packaging sqlite<div class="gmail_default" style="background-color: white;"><div class="gmail_default"><span face="Arial, Helvetica, sans-serif" style="color: #222222;"><span style="caret-color: rgb(34, 34, 34);">Six years ago, I went for a holiday with my wife, just the two of us -- pretty much the first such holiday (measured in weeks, not week-ends) we had taken since our first child was born. It wasn't off to some sun-soaked beach -- we've never been that kind of couple -- but we had a wonderful time, camping (not glamping), hotelling, time-share-condo-ing, eating out etc. Along with spending time together, we each did some of "our own" things, too, together in silent (or not so silent) companionship and not. I spent a bunch of time reading, some time biking and some time writing software. Like I do for work. Only this time, it was for me. I joked to myself that I was prepping for a "retirement project" and maybe I was. We'll have to see how that turns out but for the moment, I had a lot of fun.</span></span></div><div class="gmail_default"><span face="Arial, Helvetica, sans-serif" style="color: #222222;"><span style="caret-color: rgb(34, 34, 34);"><br /></span></span></div><div class="gmail_default"><span face="Arial, Helvetica, sans-serif" style="color: #222222;"><span style="caret-color: rgb(34, 34, 34);">When I got back, in talking about it with a colleague, I immediately got side-tracked: his response regarding one part (a simple API for re-encoding strings between wide and narrow) was, "Oh! we need that. Can you package it?" So, I made some modifications to the repository, and to the <a href="http://www.cmake.org">CMake</a> script to enable that -- a lot of it was sequestering away everything but the <a href="https://github.com/ANSAKsoftware/ansak-string">string library</a> so that all they got was what they really wanted. And so I discovered, that even for my own software, if you're not careful, a long line of "yaks" will show up in need of "<a href="https://en.wiktionary.org/wiki/yak_shaving">shaving</a>". It took over some of my free time for awhile but I was able to deliver something they could use, and then nothing more came of it. Some work-churning that followed diverted me still further and it took awhile to get back to it. But this month, I think the yak-shaving has come to something of an end.</span></span></div><div class="gmail_default"><span face="Arial, Helvetica, sans-serif" style="color: #222222;"><span style="caret-color: rgb(34, 34, 34);"><br /></span></span></div><div class="gmail_default"><span face="Arial, Helvetica, sans-serif" style="color: #222222;"><span style="caret-color: rgb(34, 34, 34);">I could spend some time describing the different yaks, but I want to point out a yak-razor-forge that I designed for myself, that took care of a bunch of them, and could be useful to others. About six months ago, I asked my brother (a network tech, not a developer) to try my stuff out. His first response was, "why can't I <span style="font-family: courier;">./configure</span>, <span style="font-family: courier;">make</span>, and <span style="font-family: courier;">make install</span> it?"</span></span></div><div class="gmail_default"><span face="Arial, Helvetica, sans-serif" style="color: #222222;"><span style="caret-color: rgb(34, 34, 34);"><br /></span></span></div><div class="gmail_default"><span face="Arial, Helvetica, sans-serif" style="color: #222222;"><span style="caret-color: rgb(34, 34, 34);">That "ancient" paradigm of "download -- <span style="font-family: courier;">./configure</span> -- <span style="font-family: courier;">make</span> -- <span style="font-family: courier;">make install</span>" has served open source projects well for deployment, at least for the consumers of the tarballs constructed to be deployed that way. For producers, especially those of us who came to it later in the game, the <span style="font-family: courier;">autoconf</span> and <span style="font-family: courier;">automake</span> tools that support it are bewildering. Learning to use them well, and then using them repeatedly for oneself can be daunting. And then, it's not even much good on a non-Cygwin, non-msys2 Windows environment. But the paradigm, for the end user at least, is wonderful.</span></span></div><div class="gmail_default"><span face="Arial, Helvetica, sans-serif" style="color: #222222;"><span style="caret-color: rgb(34, 34, 34);"><br /></span></span></div><div class="gmail_default"><span face="Arial, Helvetica, sans-serif" style="color: #222222;"><span style="caret-color: rgb(34, 34, 34);">The kind of code I was writing was platform-independent <span style="font-family: courier;">C++11</span> (and I'm loving the continuing updates) with few package dependencies on other things, so a full autoconf/automake approach was wrong-headed anyway. Yet, for deployment on Linux, MacOS, Cygwin and msys2, the result of such an approach made a lot of sense, even if one arrived at it by other means. So I wrote my own minimal configure script that determines the platform, chooses a few defaults for things and then writes them into a file that the <span style="font-family: courier;">Makefile</span> includes.</span></span></div><div class="gmail_default"><span face="Arial, Helvetica, sans-serif" style="color: #222222;"><span style="caret-color: rgb(34, 34, 34);"><br /></span></span></div><div class="gmail_default"><span face="Arial, Helvetica, sans-serif" style="color: #222222;"><span style="caret-color: rgb(34, 34, 34);">The <span style="font-family: courier;">Makefile</span> is very simple, mostly a <span style="font-family: courier;">cmake</span> dispatcher, as that was one of my early choices. By the way, if I am missing out on a better cross-platform meta-build system, somebody please tell me? So far <span style="font-family: courier;">cmake</span> is making my life very easy and making me feel smarter than I really am every time I poke at it.</span></span></div><div class="gmail_default"><span face="Arial, Helvetica, sans-serif" style="color: #222222;"><span style="caret-color: rgb(34, 34, 34);"><br /></span></span></div><div class="gmail_default"><span face="Arial, Helvetica, sans-serif" style="color: #222222;"><span style="caret-color: rgb(34, 34, 34);">But on Windows, not even a marginally good GNU <span style="font-family: courier;">make</span> is available by default, or where it is, it doesn't interoperate well with other parts of Windows, to my knowledge. As for the end result, there really isn't a "standard place" to put 3rd party headers and libraries -- at least to my knowledge and in wide-spread use. So, I decided to use a default prefix (and allow it to be over-ridden) of <span style="font-family: courier;">C:\ProgramData</span> -- it seemed an easy call to me, and I have seen some feints in that direction. Sub-directories from there of <span style="font-family: courier;">include\</span>, <span style="font-family: courier;">lib\</span> and <span style="font-family: courier;">bin\</span> seemed logical, too. And as for a "<span style="font-family: courier;">make</span>" stand-in, remembering Dave Beazley's "<a href="https://www.youtube.com/watch?v=RZ4Sn-Y7AP8">Discovering Python</a>" video, the choice there was obvious, too: python. I did give PowerShell a shot on the way there but at the end of the day? No comparison.</span></span></div><div class="gmail_default"><span face="Arial, Helvetica, sans-serif" style="color: #222222;"><span style="caret-color: rgb(34, 34, 34);"><br /></span></span></div><div class="gmail_default"><span face="Arial, Helvetica, sans-serif" style="color: #222222;"><span style="caret-color: rgb(34, 34, 34);">Once I'd decided to use python, the choice between python 2 and python 3 was also obvious (for feature-set if not for the Jan 2020 sunset of python 2) but how to make sure of that? And how to run things as, "download -- <span style="font-family: courier;">.\configure</span> -- <span style="font-family: courier;">make</span> -- <span style="font-family: courier;">make install</span>"? So I wrote a <span style="font-family: courier;">configure.cmd</span> that looks for python, makes sure it's python 3 (in a python-version-independent way) and calls <span style="font-family: courier;">configure.py</span>. Before that script completes, it writes a <span style="font-family: courier;">make.cmd</span> file that uses the python 3 that was found for </span></span><span style="caret-color: rgb(34, 34, 34); color: #222222; font-family: courier;">configure.py</span><span style="color: #222222;"><span style="caret-color: rgb(34, 34, 34);"> to run a </span></span><span style="caret-color: rgb(34, 34, 34); color: #222222; font-family: courier;">make.py</span><span style="color: #222222;"><span style="caret-color: rgb(34, 34, 34);">. That script imports the </span></span><span style="caret-color: rgb(34, 34, 34); color: #222222; font-family: courier;">configvars</span><span style="color: #222222;"><span style="caret-color: rgb(34, 34, 34);"> just produced to influence how it should do what it wants to do -- in the same way as the <span style="font-family: courier;">Makefile</span> does.</span></span></div><div class="gmail_default"><span face="Arial, Helvetica, sans-serif" style="color: #222222;"><span style="caret-color: rgb(34, 34, 34);"><br /></span></span></div><div class="gmail_default"><span face="Arial, Helvetica, sans-serif" style="color: #222222;"><span style="caret-color: rgb(34, 34, 34);">On the non-Windows side, by this time, with help from a <a href="https://www.linkedin.com/in/asfuller/">good friend</a>, I had been using <span style="font-family: courier;">CPack</span> inside <span style="font-family: courier;">cmake</span> to produce tarballs, RPMs, Debian packages and arch ZST files. <span style="font-family: courier;">CPack</span> will also produce NSIS installers automatically, but it struck me that they were aimed at applications, not libraries (and so far, I'm writing libraries). So I wrote my own NSIS installer scripts, too. <span style="font-family: courier;">make package</span> on Windows produces one of those.</span></span></div><div class="gmail_default"><span face="Arial, Helvetica, sans-serif" style="color: #222222;"><span style="caret-color: rgb(34, 34, 34);"><br /></span></span></div><div class="gmail_default"><span face="Arial, Helvetica, sans-serif" style="color: #222222;"><span style="caret-color: rgb(34, 34, 34);">After completing the work for <a href="https://github.com/ANSAKsoftware/ansak-string">ansak-string</a>, I extended it to <a href="https://github.com/ANSAKsoftware/ansak-lib">ansak-lib</a> as well. When I got around to doing the Windows work I ran into another dependency issue. I intend to use sqlite3 (props to <a href="https://www.hwaci.com/drh/">D. Richard Hipp</a> for this excellent resource) for my back-end storage and I have some C++ classes wrapping it. Checking for SQLite3's existence at build time is too late. Downloading and "installing it" to where I want it during configure for ansak-lib wasn't hard manually, but the more I tried to accomplish it automatically, the messier it looked. I hit on a cleaner solution, alongside ansak-string (the original shave-off I did for my mates at work) ansak-lib (includes the sqlite3 C++ classes). I produced a <a href="https://github.com/ANSAKsoftware/sqlite_msvc_packager">sqlite_msvc_packager</a> that uses the same "download -- <span style="font-family: courier;">.\configure</span> -- <span style="font-family: courier;">make</span> -- <span style="font-family: courier;">make install</span>" cycle.</span></span></div><div class="gmail_default"><span face="Arial, Helvetica, sans-serif" style="color: #222222;"><span style="caret-color: rgb(34, 34, 34);"><br /></span></span></div><div class="gmail_default"><span face="Arial, Helvetica, sans-serif" style="color: #222222;"><span style="caret-color: rgb(34, 34, 34);">So there it is: a packaging solution for Sqlite3 and a couple of libraries you might find useful (especially <a href="https://github.com/ANSAKsoftware/ansak-lib/blob/master/interface/file_of_lines.hxx#L70">this means</a> of reading files of lines of text -- any width, any ordering -- as though they were lines of UTF-8 text). But even more useful, perhaps is the meta-facility I developed and described above: a flexible way of deploying libraries, either directly (<span style="font-family: courier;">make install</span>) or through install sets -- and Python3 helped me bring it all to Windows, too.</span></span></div></div><a href=""></a>
<blockquote>
</blockquote>Arthurhttp://www.blogger.com/profile/07467853070371188335noreply@blogger.com0tag:blogger.com,1999:blog-6431527.post-53349431185595583222021-04-05T00:59:00.001+00:002021-04-05T00:59:25.498+00:00It's time to turn away from the "Masters" this year<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_default"><div class="gmail_default"><font face="arial, helvetica, sans-serif">I appeal to all (Canadian sports fans) who think that voting should be easy for all citizens of all backgrounds, ethnicities, identities and back-stories, of all countries, everywhere... Please follow my example and post something like this to: <a href="https://www.tsn.ca/help/contact-us">https://www.tsn.ca/help/contact-us</a> form (Click through. I promise it Just Works™)</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">In solidarity with Georgia (US)'s newly re-suppressed voters, I appeal to your network to black out Masters coverage this year. Remembering the history of the Confederacy, the resonance of "Masters" where slaves once worked around it, where the first re-suppression legislation (of over 300 pieces in over 40 states) was passed, the optics are horrible and as a voice against suppression of freedom, for conscience' sake, TSN should black it out this year.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">There's a 500 character limit so this doesn't say everything I would want, but it'll be enough to get the message across. </font><span style="font-family:arial,helvetica,sans-serif">Will you join me? (like the 50 people a day coming in singing Alice's Restaurant) Can we effect this change? I've gotten four "likes" so far on FaceBook but I'll bet that hasn't resulted in more than maybe one or two further posts to TSN.</span></div><div class="gmail_default"><span style="font-family:arial,helvetica,sans-serif"><br></span></div><div class="gmail_default"><span style="font-family:arial,helvetica,sans-serif">It's incomprehensible to us as Canadians that any political party would EVER want to keep anyone from voting, but that's what this bill in Georgia was written to do. The governor took it inside a private office with six or eight white men and a cameraman to sign it. He sat at one end of a table with these guys in masks staring him down, beneath a picture of an antebellum plantation.</span></div><div class="gmail_default"><span style="font-family:arial,helvetica,sans-serif"><br></span></div><div class="gmail_default"><span style="font-family:arial,helvetica,sans-serif">Meanwhile, a black woman member of the lower house in Georgia knocked politely but firmly on the door calling for the signature to be done in public. It went down like this:</span></div><div class="gmail_default"><span style="font-family:arial,helvetica,sans-serif"><br></span></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><b>Assemblywoman</b>: Knock! Knock!</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><b>Georgia Capitol Police</b>: You're under arrest.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">And she was arrested and dragged out, charged with felony obstruction and disrupting assembly business. Think of an opposition MP / MLA / MPP / MNA from YOUR province being dragged away by the cops-on-duty from the Governor General or Lieutenant Governor's residence and charged with similar "crimes". If you don't feel outraged, I question if you understand what representative, responsible government, democratically elected means, or if you believe in it at all.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Three time zones, the whole continental US and an international border away, there isn't much I can do about this, but I can't become comfortably numb about this, and neither should anyone with democratic scruples of good conscience.</font></div><div class="gmail_default"><br></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">So, I'm not asking for money. I'm only asking that you click <a href="https://www.tsn.ca/help/contact-us">here</a> and copy-paste the 2nd paragraph of this blog post and hit send. I won't encourage you to do it multiple times, but maybe this is a time to relinquish default Canadian "politeness". Their phone number is 1-833-TSN-HELP or 1-833-876-4357. For me, maybe it's time to try to figure out this Twitter thing and send a haiku to @TSNGolf.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">I AM going to cc this to <a href="mailto:audience.relations@bellmedia.ca">audience.relations@bellmedia.ca</a>, too.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Here's hoping that, it's still true that... you can get anything you want at Alice's Restaurant ... even without 8x10 colour glossy pictures ... This is the colour I've found to try to start a small change. The crayons are free. If I toss you one, will you catch it and add your scribbling to it?</font></div></div></div></div></div></div> Arthurhttp://www.blogger.com/profile/07467853070371188335noreply@blogger.com0tag:blogger.com,1999:blog-6431527.post-90690458662658968352020-10-22T14:04:00.002+00:002020-10-22T14:04:43.239+00:00Strong Encryption with Backdoors: An Oxymoron for AuthoritariansWhat follows is a model letter for Canadian citizens to send to the Honourable Bill Blair, your MP and the Prime Minister:<a href=""></a><blockquote>
</blockquote><div><br /></div><div><div>Dear Sir:</div><div><br /></div><div>Regarding Strong Encryption with Backdoors</div><div><br /></div><div>Once again, a push has been put out there for the development of strong encryption with backdoors, and to our collective national shame, you have signed it.</div><div><br /></div><div>Do you understand how moronic that makes you appear? You just asked for something more impossible than rain falling from a blue sky, than deriving significant heat from a full moon, than wanting (with conscious reference to 1984) 2 plus 2 to equal 5.</div><div><br /></div><div>The math. does. not. support. the concept of Strong Encryption with Backdoors. One of the words, "Strong" or "Backdoors" must be removed from the phrase for it to refer to something real. I and others more competent than me have repeatedly told this and previous governments, yet the request keeps coming back. And every time it does, the governments that request it make themselves look foolish and naïve -- or worse. We elect you to be wise and informed, competent and, where your competence does not extend, humble enough to ask for wisdom from those who have such competence. So requesting this again (and again, and again) is undermining the faith of Canadian citizens in the competence and capability of our government. Do you need me to outline how this undermines our faith in democratically elected government? Not that we would turn toward autocracy but that we would give up and dis-engage, which in the longer term would result in the same thing.</div><div><br /></div><div>Please, I urge you, to retract your signature from the recent "International Statement: End-To-End Encryption and Public Safety" published at</div><div><br /></div><div>https://www.justice.gov/opa/pr/international-statement-end-end-encryption-and-public-safety</div><div><br /></div><div>The presence of your signature there is a signal to all and sundry of your incompetence to speak about encryption at all and it shames all Canadians whether they understand the issues or not.</div><div><br /></div><div>Only governments aspiring to totalitarian powers would insist on this kind of a policy after being informed by mathematicians and cryptographers of its impossibility. I want to believe that my government's security apparatus does not aspire to totalitarian powers. Please restore my faith on both issues (competence and trustworthiness) that this is the case and rescind your signature.</div><div><br /></div><div>Sincerely,</div></div><div><br /></div><div>make use of it as you will...</div>Arthurhttp://www.blogger.com/profile/07467853070371188335noreply@blogger.com0tag:blogger.com,1999:blog-6431527.post-1558555444251525082020-09-11T12:50:00.001+00:002020-09-11T12:50:52.507+00:00Snap BC election right now? A real leader would say "no"<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><div class="gmail_default">Posted to FaceBook, by me, via <a href="https://www.bcgreens.ca/tell_horgan_no_snap_election" target="_blank">greenparty.ca</a>:</div><div class="gmail_default"><br></div><div class="gmail_default" style="font-family:Arial,Helvetica,sans-serif"><div class="gmail_default"><font face="arial, helvetica, sans-serif">It's Mr. Horgan's option. That's the way parliamentary democracy works.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">But this is not the time. Despite the foolish result FPTP delivered in the last election, it's been reasonably stable and is only preventing things widely opposed by most of the voters from occurring. Maybe FPTP would deliver a majority to Mr. Horgan if he were to call an election, but maybe it wouldn't.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Run out your term, Mr. Horgan. Introduce sensible electoral reform, like my own "<a href="https://ansak.blogspot.com/2017/06/comparing-bc-election-2017-with.html" target="_blank">Regionalized Proportionality</a>", so that future governments look more like the will of the people, where politicians MUST collaborate, co-operate, and submit to mutual accountability -- rather than the Manichean roulette wheel which is the only kind of electoral world that I have ever known in BC.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Then and only then call an election. That's what a real leader would do.</font></div></div></div></div></div> Arthurhttp://www.blogger.com/profile/07467853070371188335noreply@blogger.com0tag:blogger.com,1999:blog-6431527.post-44113626898843060472020-06-29T13:14:00.001+00:002020-06-29T13:14:50.675+00:00Can Justin be anti-Racist?<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><div class="gmail_default">This morning, I sent the following to my Liberal member of parliament. Do you know who your MP is? Are they also a member of the same party? Maybe this is a letter you can forward to them.</div><div class="gmail_default"><br></div><div class="gmail_default">E-mail from constituents matter. Many e-mails from many constituents matter more. Many thoughtful e-mails (I tried to be so) even when forwarded with few edits matter still more. We. can. influence. That's what responsible citizenship is about. Look up your Liberal MP's e-mail address at <a href="http://parl.gc.ca">parl.gc.ca</a> and fire it off, too, okay?</div><div class="gmail_default"><br></div><div class="gmail_default">Hi <name of your Liberal MP></div><div class="gmail_default"><br></div><div class="gmail_default"><I'm quoting something someone posted on FB but I feel strongly this way, too.> <For what it's worth, my status with regard to First Nations Membership is ... ></div><div class="gmail_default"><br></div><div class="gmail_default">I'm calling on your leader, our Prime Minister, to repudiate, disavow and do actual things to reverse the policy embodied in something his father said.<br></div><div class="gmail_default"><br></div><div class="gmail_default">Recently, someone posted on Facebook one of those annoying graphics-with-texts in them. I call them annoying because it means you can't copy/paste the text somewhere else in order to interact with it. But that's okay. I'll type it in here.</div><div class="gmail_default"><br></div><div class="gmail_default">The. Rt. Hon. Pierre Elliott Trudeau said, "If you no longer speak your language and no longer practice your culture, then you have no right to demand aboriginal rights from us, because you are assimilated with the ruling power."</div><div class="gmail_default"><br></div><div class="gmail_default">The graphic has a split face, on the right is Pierre Trudeau's face, on the left, his son, Justin's.</div><div class="gmail_default"><br></div><div class="gmail_default">This would be a good moment for our current prime minister to quote his father explicitly, to disavow and apologize for the statement -- not just as a statement of his father but as of one made by his predecessor in the office he holds -- and pledge now, and act promptly to undo the structures established by the cabinet department whose animus (despite its several-times renaming, rebranding) has often been that echoed by the one time Deputy Minister, Duncan Campbell Scott: "I want to get rid of the Indian problem ... Our object is to continue until there is not a single Indian in Canada who has not been absorbed into the body politic and there is no Indian question and no Indian Department." Even if that kind of policy was meant kindly (I'll allow that he may have thought it was so far as he was concerned, but I'm inclined to doubt it, and it hasn't worked out that way, ever), it's racist and offensive and a piece of our past that must be actively turned away from if only to lend a shred of credibility (and a very tiny shred at that) to our self-congratulation in looking across the border to the south (and their looking across the border to us), to say that on race we're at least not as messed up as they are.</div><div class="gmail_default"><br></div><div class="gmail_default">For starters piles of First Nations communities have not had clean water much longer than Flint, Michigan has suffered under that lash.</div><div style="font-family:Arial,Helvetica,sans-serif"><br></div><div style="font-family:Arial,Helvetica,sans-serif"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">"Not a racist" was never good enough, and now we all know why. It's time for even the Canadian Government to start turning towards striving to become anti-racist.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Sincerely,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><your name></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Are you going to?</div></div></div></div></div> Arthurhttp://www.blogger.com/profile/07467853070371188335noreply@blogger.com0tag:blogger.com,1999:blog-6431527.post-75317697329449361582020-06-05T00:53:00.000+00:002020-06-05T03:41:56.224+00:00Peter MacKay wants my vote, eh?<div dir="ltr">
<div dir="ltr">
<div class="gmail_default">
<div class="gmail_default">
<span style="font-family: "arial" , "helvetica" , sans-serif;">My Facebook feed has been lit up recently with ads from Peter MacKay. It's been a long time since I voted Conservative but I thought, "okay, I'll tell you what it would take to get my vote". So I went to his <a href="https://www.petermackay.ca/">web-site</a></span><span style="font-family: "arial" , "helvetica" , sans-serif;">, to the contact page, and asked him some questions. With the current unrest to the south -- and the prissy-pure reputation we're enjoying now (falsely), you know where I started, don't you? And then I got going.</span></div>
<div class="gmail_default">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div class="gmail_default">
<span style="font-family: "arial" , "helvetica" , sans-serif;">At the bottom, I promised to post it here, and to post any something-deeper-than-press-release response I get from his people.</span></div>
<div class="gmail_default">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div class="gmail_default">
<span style="font-family: "arial" , "helvetica" , sans-serif;">So, Peter...</span></div>
<div class="gmail_default">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div class="gmail_default">
<span style="font-family: "arial" , "helvetica" , sans-serif;">How serious an anti-racist are you? Do you pledge to bring clean water to the numerous reservation-Flints across Canada regardless of cost? Do you pledge to correct the historic rates of over-incarceration of non-white and/or indigenous folks? (those, for starters; what about these other issues...)</span></div>
<div class="gmail_default">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div class="gmail_default">
<span style="font-family: "arial" , "helvetica" , sans-serif;">Will you bring back the progressive taxation system that Brian Mulroney dismantled, so that adequate social programs can be fully funded without question? Will you remove contribution limits from payroll deductions to CPP/QPP and EI and keep those funds within those systems? (only the first reliable way to fund the kind of retirement that my parents' generation could count on and that is fundamentally threatened for me and for my kids. If you do that, don't stop there, but that's a good first step.)</span></div>
<div class="gmail_default">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div class="gmail_default">
<span style="font-family: "arial" , "helvetica" , sans-serif;">Will you amend the Canada Health Act to compel the provinces to include basic vision and dental care in all their provincial plans? ("basic" here includes checkups, cleanings, fillings, root canals and caps -- together with public-health accountability so that those costs don't go crazy - braces maybe, too, where the current state is beyond a certain point)</span></div>
<div class="gmail_default">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div class="gmail_default">
<span style="font-family: "arial" , "helvetica" , sans-serif;">Will you increase Canada's commitment to combat global warming by bringing in even more aggressive measures than the carbon tax, by slashing subsidies to Big Oil and instead fund fusion, solar, wind and non-weaponizable fission (LFTR, for instance) sources of energy? Will you compel oil companies and their successors to clean up their garbage, their leftover wells that they have abandoned with no budget in place for their decommissioning?</span></div>
<div class="gmail_default">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div class="gmail_default">
<span style="font-family: "arial" , "helvetica" , sans-serif;">Will you help Alberta manage the political pain of finally adopting a provincial sales tax so that their budget is not so dependent on oil revenues and/or return the revenues unconstitutionally seized from them through the National Energy Program (while also, still, slashing the subsidies given to the oil companies as suggested above)?</span></div>
<div class="gmail_default">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div class="gmail_default">
<span style="font-family: "arial" , "helvetica" , sans-serif;">Will you actively close down and mandate the clean up of non-closed-system salmon farming on the west coast?</span></div>
<div class="gmail_default">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div class="gmail_default">
<span style="font-family: "arial" , "helvetica" , sans-serif;">Will you bring in real electoral reform, at the least bringing proportional representation blocks to individual large metro areas (i.e. all metro areas larger in population than Calgary or so) whose fragmentation into small ridings means that many voices (like mine) are never, ever heard at the ballot box? Failing that, will you at least bring back public funding of elections based on popular vote that Your Predecessor, Mr. Harper removed from me (stealing the last echoes of my voice)?</span></div>
<div class="gmail_default">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div class="gmail_default">
<span style="font-family: "arial" , "helvetica" , sans-serif;">I thought not. I guess you know whether you can count on my vote then.</span></div>
<div class="gmail_default">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div class="gmail_default">
<span style="font-family: "arial" , "helvetica" , sans-serif;">Go ahead, Peter, surprise me. I know the bigots whose votes you need in order to get nominated won't go along with these ideas but if I don't Say All the Things! nobody will ever hear them.</span></div>
</div>
</div>
</div>
Arthurhttp://www.blogger.com/profile/07467853070371188335noreply@blogger.com0tag:blogger.com,1999:blog-6431527.post-32749106806781691682020-05-03T17:58:00.000+00:002020-05-03T18:52:31.227+00:00I was looking for a way to express the following C-language macro, as found in a <span CLASS="code" style="font-family: monospace">#ifdef __USE_GNU</span> section of <span CLASS="code" style="font-family: monospace">#include <unistd.h></span> in modern C++
<pre>
# define TEMP_FAILURE_RETRY(expression) \
(__extension__ \
({ long int __result; \
do __result = (long int) (expression); \
while (__result == -1L && errno == EINTR); \
__result; }))
#endif
</pre>
and it wasn't exactly easy to find the pieces to get that done by googling (Nor was it particularly easy to get blogger to display this article correctly!). I did eventually find it and present it here for reference by my future-self, in a template function I called uninterrupted. Instead of
<pre>
return TEMP_FAILURE_RETRY(read(sockFd, buf, len, flags));
</pre>
you would write
<pre>
return uninterrupted(read, sockFd, buf, len, flags);
</pre>
The glue that gets it done looks like this:
<pre>
template< class F, class... Args >
inline auto uninterrupted(F&& f, Args&&...args) ->
decltype(std::forward<F>(f)(std::forward<Args>(args)...))
{
decltype(std::forward<F>(f)(std::forward<Args>(args)...)) rc;
do
{
rc = std::forward<F>(f)(std::forward<Args>(args)...);
}
while(rc == static_cast<decltype(rc)>(-1) && errno == EINTR);
return rc;
}
</pre>
It's type-safe. It's easy to use. It's concise. And a modern compiler will optimize it down to assembler that's as tight or more so, as what C could produce with the macro that inspired it. And you don't have to worry about getting all the trailing back-slashes right when you write it!
<p>If that's "too geeky for you", fine... just keep moving.Arthurhttp://www.blogger.com/profile/07467853070371188335noreply@blogger.com0tag:blogger.com,1999:blog-6431527.post-7438969206910325662020-04-11T05:48:00.000+00:002020-04-11T05:51:29.677+00:00They still serve who only...<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><span style="font-family:Arial,Helvetica,sans-serif">Once upon a time, John Milton wrote a sonnet.</span></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><span style="font-family:Arial,Helvetica,sans-serif"><br></span></div>When I consider how my light is spent<div>Ere half my days in this dark world and wide,</div><div>And that one talent which is death to hide</div><div>Lodg'd with me useless, though my soul more bent</div><div>To serve therewith my Maker, and present</div><div>My true account, lest he returning chide;</div><div>"Doth God exact day-labour, light denied?"</div><div>I fondly ask. But Patience to prevent</div><div>That murmur, soon replies: "God doth not need</div><div>Either man's work or his own gifts; who best</div><div><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"></span>Bear his mild yoke, they serve him best. His state</div><div>Is kingly. Thousands at his bidding speed</div><div>And post o'er land and ocean without rest:</div><div>They also serve who only stand and wait."</div><div><br>This month, I wrote a "parody" if you will but an appreciative one, that attempted to honour in the remembrance, in the<span class="gmail_default" style="font-family:arial,helvetica,sans-serif"> </span>transposition from his circumstances to my own. I share the result with you here:</div><div><br>When I consider how my days are spent,</div><div>My troubles not like Milton's hamp'ring scourge,</div><div>To be effective in my Master's work</div><div>Has ever been my strongest deepest urge.<br><br></div><div>Yet my commitments mitigate against</div><div>Fulfillment (on the surface) of my calls</div><div>And trivialities extend to fill</div><div>My times -- this my own "ash heap" me appalls.</div><div><br>No more than in the blinded poet's day</div><div>Does Papa dole rewards out from effect.</div><div>His plans rest not on this or that task done.</div><div>His goal, it seems: our natures to perfect.<br><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><span style="font-family:Arial,Helvetica,sans-serif"><br></span></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><span style="font-family:Arial,Helvetica,sans-serif">Will my life's fruit show earlier or late?</span></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><span style="font-family:Arial,Helvetica,sans-serif">Still even they serve now who stand and wait.</span></div></div></div> Arthurhttp://www.blogger.com/profile/07467853070371188335noreply@blogger.com0tag:blogger.com,1999:blog-6431527.post-35713075345242979502020-03-28T22:43:00.000+00:002020-03-28T22:46:00.931+00:00Yo Wash Yo Hands...<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><p style="margin:0px 0px 6px;font-family:Helvetica,Arial,sans-serif;color:rgb(29,33,41);font-size:14px">Yesterday, at the end of a news broadcast, the announcer gave the following PSA, which I found moving, so I share it with you all. The "wash our hands of all this" was an acknowledgment that much of what had been reported involved different people in painful situations:</p><p style="margin:6px 0px;font-family:Helvetica,Arial,sans-serif;color:rgb(29,33,41);font-size:14px">"And this word of advice in protecting the whole community:</p><p style="margin:6px 0px;font-family:Helvetica,Arial,sans-serif;color:rgb(29,33,41);font-size:14px">"It is so critical that in order not to wash our hands of all of this we simply wash our hands.</p><p style="margin:6px 0px;font-family:Helvetica,Arial,sans-serif;color:rgb(29,33,41);font-size:14px">"When you see somebody, and you're afraid to step away 'cause you don't want them to feel like you are afraid of them, don't think of them as the vector of disease. Think of yourself as possibly one who could infect others, because we can't know at this point.</p><p style="margin:6px 0px;font-family:Helvetica,Arial,sans-serif;color:rgb(29,33,41);font-size:14px">"Step away.<br>Be at a safe distance to make the whole community safe.</p><p style="margin:6px 0px;font-family:Helvetica,Arial,sans-serif;color:rgb(29,33,41);font-size:14px">"And when you wash your hands, to understand why this is so important: it's just simple water and soap -- I know for many it is not even possible to get that water -- but if you have access and soap, soap is critical.</p><p style="margin:6px 0px;font-family:Helvetica,Arial,sans-serif;color:rgb(29,33,41);font-size:14px">"It is the most important weapon because the corona virus, corona is the crown on the virus which is a lipid, and the soap cuts through that.</p><p style="margin:6px 0px;font-family:Helvetica,Arial,sans-serif;color:rgb(29,33,41);font-size:14px">"Wash your hands for at least 20 seconds.</p><p style="margin:6px 0px;font-family:Helvetica,Arial,sans-serif;color:rgb(29,33,41);font-size:14px">"You know how you see doctors on TV shows washing their hands and then putting their arms up? This is the way to do it.</p><p style="margin:6px 0px;font-family:Helvetica,Arial,sans-serif;color:rgb(29,33,41);font-size:14px">"You sing happy birthday twice if you want to but you've gotta scrub those hands.<br>You've gotta interlace your fingers and scrub.<br>Scrub your fingertips, you know that touches, oh, everything from buttons to elevator buttons, everything else.<br>Wash the back and the front of your hands.</p><p style="margin:6px 0px;font-family:Helvetica,Arial,sans-serif;color:rgb(29,33,41);font-size:14px">"You're doing it for yourself.<br>You're doing it for your family.<br>You're doing it for the whole community<br>to stop community spread.<br>We have to keep each other safe in this very dire time of this pandemic."</p><p style="margin:6px 0px 0px;display:inline;font-family:Helvetica,Arial,sans-serif;color:rgb(29,33,41);font-size:14px">(me back again): so go on you all, pretend to be doctors and yo wash yo hands!</p></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><p style="margin:6px 0px 0px;display:inline;font-family:Helvetica,Arial,sans-serif;color:rgb(29,33,41);font-size:14px">(shout out to Group 1 Crew for the noise in my head around the title, lifted from their "Clap Ya Hands")</p></div></div> Arthurhttp://www.blogger.com/profile/07467853070371188335noreply@blogger.com0tag:blogger.com,1999:blog-6431527.post-91399005386825564302020-03-26T12:38:00.000+00:002020-03-26T12:40:54.260+00:00The Bill of Goods<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><div class="gmail-adM" style="font-family:Arial,Helvetica,sans-serif"><div class="gmail-im" style=""><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><span style="font-family:Arial,Helvetica,sans-serif"><font color="#000000">mostly written by my brother, Ray Klassen at </font></span><a href="http://thepilgrimagecontinues.blogspot.com/" target="_blank" style="color:rgb(80,0,80);font-family:Arial,Helvetica,sans-serif">thepilgrimagecontinues.blogspot.com</a><font color="#000000"><span style="font-family:Arial,Helvetica,sans-serif">. A few additional points of my own added.)</span><br></font></div></div></div><div class="gmail_quote" style="font-family:Arial,Helvetica,sans-serif"><div dir="ltr"><div class="gmail-adM"><div class="gmail-adm" style="margin:5px 0px"></div><div class="gmail-im" style=""><font color="#000000"><br>In the 80's most of us Christians were duped by the political puppets of the aspiring super-rich who sold us a bill of goods as part of a covert class war that they have ultimately won. Amazingly this bill of goods is still out there being touted by any number of people who after all these years, still see each entry on this intellectual invoice as obvious and axiomatic, standing by the same liars who promoted it in the first place. I say 'liars' because there is ample evidence that many of these talking points were known to be false by the people that originated them. That we bought into their ideas amounts to a swindle and a con game, and makes one wonder when reparations will be possible. It's been on my mind recently to itemize these ideas and provide some refutation of each. I recognize that my refutation will not be enough for many to simply about face on any of them as each are exploiting a deeply ingrained part of our cultural outlook, such that when what relate what I have now found to be true, many will simply read, and angrily dismiss. But that is the way of such things. So here, in not any particular order, the conservative bill of goods:<br><br>1. <b><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"></span>Small government is better than big government.</b> Not true. We need adequate government. When reducing government in size is an end in itself, regulatory measures are put at risk. These regulatory measures, ideally, are there largely to limit the ability of corporate interests to endanger the public in any number of ways. These are not "job killing regulations". They are "life-and-health saving regulations." An undersized government lacks the appropriate power to inspect and enforce regulations. Frustration over weak, bad, or even nonsensical regulations (government is a human institution) is not a justification for wantonly slashing government size. Achieving an under-regulated, under-enforced "small government" can only advantage the rich and give them a free hand to increase their advantage.<br><br>2. <b><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"></span>Government salaries as well funded support for the less able constitutes waste.</b> Related to point one in that the focus is misdirected onto the money that it takes to fund even adequate government and likewise not true. Government waste as a whipping boy is a huge talking point of those who wish us to vote in such a way as to limit their tax bill. As long as we are focused on that, we remain unaware of the obscene amount of wealth that is being removed to stay into the bank accounts of those who have promoting this. Even worse is the vilifying of the needy, who need the support of government to live, judging them by a standard which requires them to pull themselves up by their own bootstraps. "if only they would just get a job," or some such. Exploitation of this natural judgmentalism in our culture is par for the course. But there is again ample evidence that when support is made available, that many of the less fortunate are able to get far enough ahead as to be self-sufficient. But even if they are not, as humans and citizens of our country it's right to always give them that chance.<br><br>3. <b><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"></span>Tax cuts are good for everybody.</b> (related lies: trickle down economics, "rising tide lifts all boats") Manifestly not true. Tax cuts are a measure that only marginally benefits the low and middle wage earner and egregiously over-benefits the top earning brackets. What tax cuts do is produce a downward spiral supported by points one and two whereby government is now underfunded and we demand that it become leaner and certainly meaner. People that were supported in some way lose their support because that is now labelled 'waste.' This deplorable state is even legitimized with a semi-virtuous sounding name, that is, austerity. But austerity is really not the enforced necessary poverty it appears to be. What it is is when those who are advantaged by wealth are allowed to increase their advantage utilizing government, which should have been in place to defend us against them but has now become their weapon.<br><br>4. <b><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"></span>Labour unions are evil, are all about greed, etc. etc.</b> Very wrong. Most of the labour laws that benefit us today, limiting work weeks to ensure that families can have a life together outside drudgery, adequate wages, extended health plans come to us via union bargaining and since they came to us, have been steadily chiselled away again by big business. Parallel to that has been a successful propaganda campaign to vilify the unions and tar them with any number of charges. Okay. its a fact is that the unions haven't been pure. Organized crime has had its grubby paws on some unions. But the current wage differential between labourer and brass is yet another indication that the class war being waged by the super-rich against the rest of us is going very well for them. We would be wise not to invoke Paul's advice to slaves (a gross misapplication) or other authoritarian claptrap when a union votes to strike. After the current covid-19 crisis is over, I guarantee the nurses will want a better deal, for instance and they will deserve it.<br><br>5. <b><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"></span>Free enterprise.</b> Yes. Just the phrase itself is questionable. Money is based on, wait for it, money. This is something that we've learning about as society recently. It's called privilege. If you start with any sort of advantage you can increase your advantage. If you start with a disadvantage, you will likely not transcend it but probably end with a greater disadvantage. The ableist myth propagated by the idea of Free Enterprise is that anyone, through hard work and God-given smarts, can start any business and get ahead. I think it's an example of the true Scotsman fallacy (look it up) because as soon as you would limit that 'anyone' and demonstrate that many cannot and have indeed failed utterly, the proponent will, by circular reasoning claim that they simply didn't work hard enough. And while Christians argue amongst themselves in this manner, Big Enterprise happily continues to tell its success stories in this rubric pointing to themselves as proof that "free" enterprise works. But until the government levels the playing field through progressive taxation, redistributing the advantage, we would be wiser to refer to this idea rather as privileged enterprise.<br><br>6. <b><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"></span>We must enshrine Christian morality in law.</b> Here's the one where the super-rich (such a moral group) lead us along by the nose. They know our hot-button issues -- our nostalgia for the way things were when "evils" by the score were invisible because they were underground. Drugs, abortion, Feminism, LGBT, etc.: The super-rich know that if they can get us riled up about these issues, we are distracted from their depredations.They know that if they can package up promises to bring back the past along with all of their other dastardly schemes, we'll vote for them. Secondly each of these categories represent people whom the donor class want to silence. The war on drugs for example is evidentially a creation of the Nixon Republicans to silence the hippy and black left. Outlawing abortion does nothing to help children live. The evidence is out there. Countries with liberal abortion laws have fewer abortions because co-incidentally they also have in place what actually helps children live, which is social support for the mothers of said children. But that eats into the profits treasured by the super rich. In the case of LGBT, it's not so much a political silencing but more of a divide and conquer tactic. While we waste our time wishing that this segment didn't exist thinking 'if only we could ban them through legislation,' we are distracted from finding the real culprit.<br><br>7. <b><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"></span>Capitalism is Christian.</b> False. No governmental system is Christian. But capitalism more than any system has few friends in the pages of scripture. Where do I start? Try the book of James. Condemns in no uncertain terms the oppression of the rich and the obsequious toadying of the rich by the church. Look at the Jubilee economic system (maybe never really tried -- we don't know) presented in Leviticus. Every fifty years, a reset. A limiting, balancing factor par excellence. Look at all the prophet's words against oppression by the rich on the poor. Oh, but you say, that's not against capitalism, that's against oppression by the wealthy. Let's have a wake up call, if you please. Wealth is oppression. If I have, it means that someone else doesn't have. If I have more, then someone else has less. Sounds terrible, but this thing has a scale. Here in the middle class, the oppression factor is maybe not as egregious. But when we realize that half of the world's wealth is owned by 1% of its population, the oppression is extreme.<span class="gmail_default" style="font-family:arial,helvetica,sans-serif"></span></font></div></div><div><div><div class="gmail-adM"><div class="gmail-adm" style="margin:5px 0px"></div><div class="gmail-im" style=""><div style="font-family:arial,helvetica,sans-serif"></div><font color="#000000"><br></font><div style="font-family:arial,helvetica,sans-serif"><span style="font-family:Arial,Helvetica,sans-serif"><font color="#000000">The wealth gained this way represents legalized tax evasion. Legalized through swindling the Christian white middle class vote through this bill of goods in the 1980's. We voted this way (tax cuts!) thinking it would do us good. but little gain has come our way and our ranks, which should have been swelled by many others entering the middle class as wages went up instead of down have been depleted and we are losing power to what are now not merely the wealthy but oligarchs, people who can and do outright buy political power to ever increase their hold on society. Democracy is dying. The legalized tax evasion has other dimensions too. The rich have access to tools the poor do not. Holding companies, offshore accounts, stocks, etc. etc. represent an upward spiral accessed through privilege. It's a thing crying out for a societal limiting factor. (something Judeo-Christian maybe, like the Jubilee year?) But no, we've eviscerated government so that they haven't the resources to control this. Maybe it's time to wake up.</font></span></div><div style="font-family:arial,helvetica,sans-serif"><span style="font-family:Arial,Helvetica,sans-serif"><font color="#000000"><br></font></span></div></div></div><div style="font-family:arial,helvetica,sans-serif"><div class="gmail-adM"><div class="gmail-adm" style="margin:5px 0px"></div><div class="gmail-im" style=""><font color="#000000"><span class="gmail_default"></span></font><div><div><font color="#000000">Thus far my brother. I added a few more articles of my own.</font></div><div><font color="#000000"><br></font><div><span style="font-family:Arial,Helvetica,sans-serif"><font color="#000000">8. <b>The best way to run a health care system is at a profit.</b> Yeah right. Just ask New York and California how constant cost-cutting is benefiting them today. An empty bed may not be a source of revenue, but it's a source of resiliency, something that a health care system needs at times like these. And for Canadians yearning for a private system, if the public system isn't working well enough, the answer isn't a private system, it's more funding -- with oversight, of course! to prevent waste and boon-doggling -- for the public system. And that funding needs to be generous enough to support something like the potential maximum need, even if you need to raise taxes on the richest to support it.</font></span></div><font color="#000000"><br></font><div><font color="#000000"><span style="font-family:Arial,Helvetica,sans-serif">9: <b>The right to keep and arm bears</b> (not that one, nitwit, the other one: <b>The right to keep and bear arms</b>). "Clocks don't bring tomorrow, knives don't bring good news" as a Canadian singer once wrote, and a gun in the home is a bigger threat to its inhabitants than it is to any miscreant that might come around to bother you.</span> Only someone with lawless intentions needs a machine gun, a semi-automatic or large clips.</font></div></div></div><div><font color="#000000"><br></font></div></div></div><div><div class="gmail_default"><font color="#000000">And I can only echo and magnify the call to wake up. The current system is messed up in so many ways and we are complicit in the damage that has been done. Accepting these as <i>a priori</i> truths, never to be questioned has brought us to this pass and it's time to question all of them because all of them are lies; and lies or not, they are at odds with what it means to be a Christian in a society where the citizens are responsible to take part in government, the responsibility that falls to us with those freedoms that we love to be thankful for.</font></div></div></div></div></div></div></div></div></div> Arthurhttp://www.blogger.com/profile/07467853070371188335noreply@blogger.com0tag:blogger.com,1999:blog-6431527.post-19419167220979362332018-09-06T05:47:00.001+00:002018-09-06T05:47:51.897+00:00Write your representative: "5 Eyes Demanding Law Enforcement Backdoors"<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">In response to stories like <a href="https://www.newsweek.com/five-eyes-pledge-force-encryption-backdoors-warn-privacy-not-absolute-1101837">this</a>, it's time to get out your pen and write your various legislators again. I present to you a sample:</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">-----</div><div class="gmail_default"><div class="gmail_default"><font face="arial, helvetica, sans-serif">Periodically this kind of demand comes up and it makes us look like utter idiots. It would be wise if someone told them to stop asking for it -- or just admit that they want to subject us all to totalitarian levels of surveillance. Points follow:</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><ol><li>Strong crypto is essential for the economy we have now. Restricting crypto out of the market would destroy much business economic activity and almost all consumer economic activity.<br></li><li>Strong crypto with backdoors is weak crypto, even if the backdoor is a mechanism "known" only to the good guys.<br></li><ul><li>If the backdoor exists, authorities under tight oversight can generally be trusted (because verified) not to use it except through lawful means BUT<br></li><li>if the backdoor exists, bad actors can 100% be trusted to pour large amounts of time, energy, money into breaking the lock. At its most insidious, all this requires is one corruptible person in the chain of responsibility for the back-doors. At its most clever, all protocols can be broken if you try hard enough. Compromising all consumer and business economic activity is just too attractive a prize for full effort not to be exerted.<br></li></ul><li>There does not exist a means to provide both strong crypto (vital to our economy) and the backdoors that our security services (and others) are demanding. The math doesn't allow it. So every time they ask for it, we all look like idiots.<br></li></ol></div><div class="gmail_default"><span style="font-family:arial,helvetica,sans-serif">This question is closed and it might be cost-effective for the government to retain some cryptography professors and researchers to remind the ignorant of these facts. It does NOTHING for the public weal or the security of the nation for the authorities to keep asking for things so impossible, only Alice's Red Queen and the ignorant masses can believe in them.</span><br></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Sincerely,...</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">-----</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Give it a try! Maybe they'll listen this time. In Canada, visit <a href="http://parl.gc.ca">http://parl.gc.ca</a> to find your MP. In the US, <a href="http://senate.gov">senate.gov</a> and <a href="http://congress.gov">congress.gov</a>. In the UK, <a href="http://www.parliament.uk">www.parliament.uk</a>. In Australia, <a href="http://aph.gov.au">aph.gov.au</a>. In New Zealand, <a href="http://www.parliament.nz">www.parliament.nz</a> -- stamp out the crazy wherever you find it!</font></div></div></div></div></div></div></div> Arthurhttp://www.blogger.com/profile/07467853070371188335noreply@blogger.com0tag:blogger.com,1999:blog-6431527.post-82619006153374296452018-06-08T16:35:00.001+00:002018-06-08T16:35:41.338+00:00Ordinary BCers, the pipeline and the NDP<div dir="ltr"><div class="gmail_default" style="font-size:12px;text-decoration-style:initial;text-decoration-color:initial;font-family:arial,helvetica,sans-serif">Someone said something on Facebook and it set me off on a subject of note. It started when one guy said, "We must get different news in Ontario" and then someone else said that the minority NDP provincial government was popular only with the protesters. And something snapped. This is what popped out:</div><div class="gmail_default" style="font-size:12px;text-decoration-style:initial;text-decoration-color:initial;font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-size:12px;text-decoration-style:initial;text-decoration-color:initial"><div class="gmail_default"><font face="arial, helvetica, sans-serif">No, it's not just "with the protesters". There are a lot of people who've never held up a placard who are 100% against this pipeline. Pipelines are safer than trains and trucks, yes, but EVERY single joint in a pipeline represents a non-zero source of risk, most of those joints are going to be in horribly inaccessible places that are also upstream to most of us. The resulting coastal tanker traffic would go up from 40 per year to 1 or 2 every day, and if only one of those tankers ever spill, several 10s of thousands of people's livelihoods (vs. the 10s of long-term jobs the pipeline might supply) based on the relatively (very, VERY relatively) pristine state of our coastal waters would be seriously compromised.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Support for the pipeline in BC is not overwhelming. Opposition to it isn't either but the opposition has more to lose than the support has to gain from it being built so, they're a bit more passionate about it than the supporters. So, a lot of us are pretty happy with what Horgan is doing even if, like me, we've never voted for the NDP.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">If you'd like barges of dil-bit going through your favourite holiday lakes, up and down your scenic rivers' rapids, then yeah, you can tell us tree-huggers what to do with Alberta's pipeline. But it's possible to be sane and to oppose the building of this pipeline vehemently. I am thankful for what Horgan is doing, what our First Nations neighbours are doing and I am appalled at the bad-husbandry that led to the extraction of this only slightly flowable tar from the sands of Northern Alberta in the first place. And the best spin I can put on Trudeau buying the pipeline is to prevent the collapse of trade relations with His Frogness to the south because of our rational opposition to this long-term source of poison and disaster that big oil has been trying to foist on us.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Still, it's pretty amusing watching the NDP try to retain a national identity between Singh, Horgan and Notley. But to finish it all, I'm sure the pipeline will be built. I'm sure it will cause at least one disaster (Exxon Valdes has NOT been cleaned up successfully to this day) and I'm sure that the people who benefit most from it having been built will bear the smallest amount of the cost of the overall problem. It's stupid, but it's happened before. It'll happen again, all from a mis-translation to "fill the earth and subdue it" of our original mandate. Shame on us all, myself included.</font></div></div><div class="m_-4303296065024434490gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><font face="courier new, monospace"></font><br></div></div> </div> Arthurhttp://www.blogger.com/profile/07467853070371188335noreply@blogger.com0tag:blogger.com,1999:blog-6431527.post-31757700791600627502017-06-16T15:40:00.001+00:002017-06-16T15:40:43.965+00:00Comparing BC Election 2017 with Regionalized Proportionality, part 1<div dir="ltr"><div class="gmail_default"><div class="gmail_default"><font face="arial, helvetica, sans-serif">I came up with an answer of how Regionalized Proportionality, as I envisioned it, might change our electoral result. The spreadsheet will follow, as promised, after a few more tweaks, but this is a comparison of</font></div><div class="gmail_default"><ul><li>the actual result of our election as is (FPTP)<br></li><li>what it might look like if the Province's votes were counted to a single list across the board<br></li><li>what it might look like with Regionalized Proportionality</li></ul></div><div class="gmail_default"><font face="monospace, monospace" size="1"> Actual Result Province Wide Proportional Regionalized Proportionality</font></div><div class="gmail_default"><font face="monospace, monospace" size="1">Liberals: 44 36 42</font></div><div class="gmail_default"><font face="monospace, monospace" size="1">NDP: 41 35 35</font></div><div class="gmail_default"><font face="monospace, monospace" size="1">Green: 3 16 10</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">So, the end result, either of province wide proportional representation, or of Regionalized Proportionality would probably mean that Ms. Clark would follow the same course of action as she has so far, but holding a gun to the heads of her caucus to prevent any from standing as Speaker wouldn't give her the opportunity of (legally, yes; morally, no) slow-marching us to another $44M election this year.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">But I write this before pushing my spreadsheet up in order to make a few interpretive comments on my experiment.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><b>For one thing</b>, I was shocked at how much more population there was in Metro Vancouver than the rest of the province. Until you see "42 of 87" staring you in the face, you don't realize what's happened. Until you see that "55 of 87" members come from largely urban areas (Metro Vancovuer, Capital and Fraser Valley Regional Districts) of the province, you don't realize the cause of feelings of isolation and neglect the rural areas of the province feel -- something easily attested anecdotally if you have any contacts in Clinton or Valemount -- or even larger towns like Prince George or Quesnel.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><b>For another</b>, one thing that slowed me in my tracks were allegations from various places of undue influence by the Liberals on the latest realignment of districts which prevented seats being lost by the rural areas to the urban areas. Some blamed the NDP loss on that detail, and it's possible -- even likely, if you understand how power tends to be good at maintaining itself -- that the measures taken during that process by the Liberals were calculated to retain power rather than allowing a purely just process to run its course. Someone used the word gerrymandering and suddenly many were using it. In my opinion, this was completely, utterly, annoyingly inappropriate. We haven't had a case of outright gerrymandering in BC since the retraction of "Gracie's Finger", named after the inimitable Ms. McCarthy who was so prominent in BC politics during my teen years.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">I was reminded in those pieces of people blaming Ms. Clinton's loss of the 2016 election on Comey, Wikileaks, Benghazi, the E-mail-server vs. others of her own allies admitting that she wasn't a really great campaigner. Locally, blaming "gerrymandering" seemed to me to ignore that fact that there were many little places around the province to which Mr. Horgan didn't go; that perhaps he tailored his messages to appeal to urban as opposed to rural voters; that he left a few rural long-standing NDP members to twist in the wind on their own -- and they went down to defeat without commensurate gains in other parts of the same regions. Perhaps, when it comes down to it, the NDP didn't do so well because he wasn't such a good campaigner either.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">The allegation of influence on the redstricting slowed me down because I had noticed that the rural areas were slightly over-represented, but I hadn't come up with some of the numbers that were being bandied about on that front, like 25% too many rural ridings, a number which would raise some alarm, and I wondered if I should go back and analyse those parts more closely. I had seen individual ridings being 5% under-populated -- and maybe that's where these numbers were coming from.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">It shook me, too, because Ms. Clark's "directions" to Elections BC flew in the face of something that has been a point of pride for me in comparing a Westminster system to our southern cousins: that re-alignment of districts is largely apolitical since Elections BC is responsible to the Speaker and through the Speaker to the Crown and not to the Premier. Perhaps I've been mistaken on this point -- still we don't have anything like that "Hall of Shame" that can be constructed from the various district maps drawn by party-dominated committees.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">In the end, I decided that re-examining this question was for a later date -- but by then I had dithered much longer about the results of my study than I ever intended to.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><b>For a third point</b>, while I consider Ms. Clark's charge to her caucus not to stand as Speaker for an NDP-Green coalition highly un-neighbourly and un-Canadian, I also bemoaned the instability of such a thin minority government -- EITHER WAY!! The level of rhetoric against minority governments in Canada is pretty astonishing because given the concentration of power in the Premier's or Prime Minister's Office since the days of Trudeau (P.E.T., not his son) majority governments are term-by-term dictatorships.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">I believe that minority governments can be the best results, if only the players see their first task to be governing well, rather than maneuvering matters so that the government falls at the peak of their own popularity -- this is what seems to have played out in the Pearson-Thompson and Pearson-Douglas mandates, federally. Many of the opponents of reform and proportionality of any kind utterly ignore these historical facts, and as it stands today, a straight proportional result would give either a Liberal-Green or an NDP-Green co-mandate a lot more stability than what's been delivered by First Past the Post. Perhaps, in a world where most elections will result in minorities, penalizing all parties financially for allowing a government to fall before the four-year mandate would influence their behaviour in such a case? But perhaps if the parties understand that EVERY election will result in minorities, such a penalty might be unnecessary.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Finally, one other cause of my dithering was that I realized that there was a limit to how deeply "Regionalized Proportionality" could be applied without introducing fuzziness of its own -- but this piece is long enough already and I'll address this in the next one, in which I will also release the spreadsheet. It shouldn't take too much more time.</font></div></div> </div> Arthurhttp://www.blogger.com/profile/07467853070371188335noreply@blogger.com0tag:blogger.com,1999:blog-6431527.post-44059551087834980752017-05-10T13:29:00.000+00:002017-05-10T13:30:19.824+00:00BC Election Result -- 43-41-3<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Wow. Who saw that coming?</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Before last night I started working on the "party lists" and got some for Fraser Valley, and then much of Vancouver but it became ponderous and, I felt, somewhat pointless, because in reality, this sort of thing should be handled completely differently. I could share them here but it wouldn't add to the discussion really, except to point out that in a consolidated riding, "Independent" candidates are far less meaningful even than they are now.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">But last night, when things still looked like ending 42-42-3, I took a look at my consolidated Okanagan riding, Kelowna + Penticton, and decided that collapsing four seats is too few. I ran the same numbers adding Vernon-Monashee and decided even five was too few. I'll present the full data set some time soon but I think, for myself, that any grouping for proportionality's sake, of less than six seats is probably too few. The result would be as arbitrary in its way as the current First-Past-the-Post results look now. It also led me to feel that it would be best to use Metro Vancouver as a single riding. If it turns out (as it may) that even Fraser Valley (six members) and Victoria (seven members) contain too few seats so that the result is too coarse to feel fair, splitting Metro Vancouver into three ridings, (18, 13 and 10 members) would do more harm than good.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Maybe it means, too, that the right way to run this is to consolidate even some of the intermediately-populous ridings together. Does a Thompson-Okanagan riding (10 members: Kelowna's 3, Penticton, Vernon-Monashee, Boundary-Similkameen, Fraser-Nicola, Kamloops' two ridings and Shuswap) make more sense? More data to run! Yum Yum.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Only let's do this on evidence. I understand (from interviews last night) that "Proportional Representation" and "Campaign Finance" are the bedrock issues that the Green's will want as conditions of co-operation. I would be flattered if my mutterings-in-a-corner contributed anything helpful to that discussion.</div> </div> Arthurhttp://www.blogger.com/profile/07467853070371188335noreply@blogger.com0tag:blogger.com,1999:blog-6431527.post-58356575224371491422017-04-19T13:23:00.001+00:002017-04-19T13:24:13.328+00:00One more thing to do before the election...<div dir="ltr">
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
I woke up this morning realizing that there's one more thing I could do before the election comes around, and that would be to generate theoretical lists for my consolidated ridings.</div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
<br /></div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
I'm no party hack. I'm not on the inside of any process, so I don't know how any of the three (and more, really) parties would rank their various candidates in a given region for a list. I'm not sure what I'll do to make up for this lack of knowledge. I think, for starters, I'll rank people who have ever been elected Provincially, Federally, Municipally, in that order, ahead of others -- and current incumbents at the head of each sub-list. After that, I'll just try to be sensible. I know it won't resemble what the parties would actually do particularly closely but I'm just one guy (not quite the unshaven guy in his parents' basement -- although I have a beard, and the part of the house where I'm typing is on a cement pad, but I'm the parent in this house) not the scores or hundreds that I would hope each party would consult (their members, their executives) in generating this kind of list.</div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
<br /></div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
I don't know if I'll have the time to complete these list before the election but I'll start with the Fraser Valley, where I lived all my adult life until 6 years ago, and then Metro Vancouver where I live now, so that if I run out of time, I'll at least have finished one set of lists and I'll have looked at the places I know better, first. I've never lived in Victoria, nor in the Okanagan. Maybe someone who does / has could have a look at those two areas and let me know? The comments need moderation and I may not be <i>instanter </i>at approving them but they would be a way of getting back to me.</div>
</div>
Arthurhttp://www.blogger.com/profile/07467853070371188335noreply@blogger.com0tag:blogger.com,1999:blog-6431527.post-85601746453996844492017-04-19T04:50:00.001+00:002017-04-19T04:54:03.148+00:00All Candidates Meeting -- Coquitlam-Burke Mountain<div dir="ltr">
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
I just attended the all-candidates meeting in Coquitlam for the Provincial Election, in the riding of Coquitlam-Burke Mountain.</div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
<br /></div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
It's good we have the freedom to hold these things. And I'm grateful, really I am to the Real Estate Board and the Chamber of Commerce for setting it up. I even appreciate the attempt, through social media to get the pulse on the issues by asking for social media votes on the questions. You can still see the leftovers by looking at <a href="https://www.sli.do/">https://www.sli.do/</a> and entering ACD1. I don't know how long they'll be up there but as of this writing you can see the flavour and distribution of the questions that were asked from the list that's there. The ones that were asked were removed from the slido web site (as opposed to being marked "done" -- "feature request!" shouts my inner geek) so you can't see them at all.</div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
<br /></div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
But my Most Important Issue, electoral reform didn't come up. Oh well. It did get a few up-votes. I get it. "Meta-issues" don't bleed, so they don't lead, and as meta-issues go, this is both really, really important and really, really wonky. I get it. Maybe electoral reform is on a fringe, but if it is, I'd like to think it's a sound-mind fringe, not the lunatic variety.</div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
<br /></div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
As I promised from the (6 links in the next six words!) <a href="https://ansak.blogspot.ca/2017/01/electoral-reform-in-bc.html">beginning</a>, <a href="https://ansak.blogspot.ca/2017/01/electoral-reform-in-bc-regional.html">right</a> <a href="https://ansak.blogspot.ca/2017/01/electoral-reform-in-bc-regional_30.html">through</a> <a href="https://ansak.blogspot.ca/2017/02/electoral-reform-in-bc-regional.html">to</a> <a href="https://ansak.blogspot.ca/2017/02/electoral-reform-in-bc-regional_23.html">the</a> <a href="https://ansak.blogspot.ca/2017/02/electoral-reform-in-bc-regional_90.html">end</a> of my series looking at how Regionalized Proportionality would work out in BC, I <b>will</b> analyse the results of our provincial election to see what kind of a legislature we could have had. So stay tuned...</div>
</div>
Arthurhttp://www.blogger.com/profile/07467853070371188335noreply@blogger.com0tag:blogger.com,1999:blog-6431527.post-1170100118433459692017-03-17T14:11:00.000+00:002017-03-17T14:13:20.919+00:00The Hon. Ron McKinnon (my MP) sets up a council for Seniors Issues<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><div class="gmail_default" style="color:rgb(0,0,0);font-size:12.8px">I excerpt here, the bulk of a note I sent to my MP in response to <a href="http://rmckinnon.liberal.ca/news-nouvelles/ron-mckinnon-launches-the-constituency-seniors-advisory-council/">this announcement</a>, commending him for <span style="font-size:12.8px">taking an interest in what is often a very vulnerable community, and yet...</span></div><div class="gmail_default" style="color:rgb(0,0,0);font-size:12.8px"><br></div><div class="gmail_default" style="color:rgb(0,0,0);font-size:12.8px">Speaking as someone just behind the bulk of the Baby Boomers as they've progressed through each demographic ahead of me (my birth year in the not-so-late 60s marks me as a "trailing edge boomer")...</div><div class="gmail_default" style="color:rgb(0,0,0);font-size:12.8px"><br></div><div class="gmail_default" style="color:rgb(0,0,0);font-size:12.8px">It strikes me that the best way to guarantee that things will be okay for <b>me</b> when I get to be in that demographic, would be to turn back the clock on some of the pension off-loading that was done as a result of the governments that the current seniors voted in time after time.</div><div class="gmail_default" style="color:rgb(0,0,0);font-size:12.8px"><br></div><div class="gmail_default" style="color:rgb(0,0,0);font-size:12.8px">The whole transition away from defined-benefit pensions to RRSPs was a great social injustice. Individuals are not set up to absorb risk well and I am looking at my impending retirement with a mixture of grim determination and thankfulness that my trade does not depend on a hale constitution but only on the retention of a sharp mind which, so far, has shown no sign of beginning to ebb. <a href="https://ca.linkedin.com/in/ansak" target="_blank">I write software</a>.</div><div class="gmail_default" style="color:rgb(0,0,0);font-size:12.8px"><br></div><div class="gmail_default" style="color:rgb(0,0,0);font-size:12.8px">It strikes me, further, that an annual limit on CPP contributions benefits the rich only and I would ask that this limit be removed, at least insofar as the contributions are concerned. Given that all CPP contributions are currently tax free, it would be wise to retain the limit there: to make CPP contributions up to the current limit tax free (as now) but not those above and beyond that point. This should prevent any impact on general revenue that my proposal would otherwise have.</div><div class="gmail_default" style="color:rgb(0,0,0);font-size:12.8px"><br></div><div class="gmail_default" style="color:rgb(0,0,0);font-size:12.8px">Further, I believe it is moral and desirable to make all personal capital gains subject to a small CPP-contribution sur-tax as well. I am, <span style="font-size:12.8px">in a very small way,</span><span style="font-size:12.8px"> borrowing from </span><a href="https://en.wikipedia.org/wiki/Capital_in_the_Twenty-First_Century" style="font-size:12.8px">Piketty</a><span style="font-size:12.8px"> here, in his proposal to fund re-equalization across all of society. I'm not proposing that this sur-tax be very big. Something along the lines of 0.2% of the Capital Gains Tax already being charged would be small enough not to be odious to the individual, but potentially effective enough to make sure there'll be some CPP there for me (and my generation) to collect. This will be something we'll be thankful for in our turn, when we finally realize that we haven't been such financial wizards as we were told we could be, with a mechanism (RRSPs) that was originally crafted, in the days of highly progressive income tax (before the days of Reagan, Thatcher, Murdoch and Mulroney), to tax executive bonus schemes more gently and over the longer term. Of course, the returns of the markets of those days have gone away and it's not clear that they're ever coming back.</span></div><div class="gmail_default" style="color:rgb(0,0,0);font-size:12.8px"><br></div><div class="gmail_default" style="color:rgb(0,0,0);font-size:12.8px">I admit that I may be able to retire comfortably on the proceeds of down-sizing my dwelling at some point -- but then again, maybe not. And what about my kids? This is a proposal for the long term, not just for me in a case where BC Real Estate suddenly becomes far less desirable than it currently is.</div><div class="gmail_default" style="color:rgb(0,0,0);font-size:12.8px"><br></div><div class="gmail_default" style="color:rgb(0,0,0);font-size:12.8px">Expanding the CPP contribution base like that would be an action that I would support whole-heartedly, so that I might even vote Liberal next time. As it stands now, though, an announcement like yours strikes me, emotionally, like pandering to a large group of people other than me who have already benefited greatly from a certain set of one-time economic conditions and poisoned the well even for the long tail (me) of their own demographic. I don't begrudge them the support you are giving them as they have entered the "other" (besides infancy and early childhood) "most-vulnerable" time of their lives and desperately need more support. I just wonder if anything can be done so that something is there for me, not to mention the next generations, when we all get to be that age.</div><div class="gmail_default" style="color:rgb(0,0,0);font-size:12.8px"><br></div><div class="gmail_default" style="color:rgb(0,0,0);font-size:12.8px">Sincerely, etc. etc.</div><div class="gmail_default" style="color:rgb(0,0,0);font-size:12.8px"><br></div><div class="gmail_default" style="color:rgb(0,0,0);font-size:12.8px">Perhaps some of you want to propose similar things to your Liberal member of parliament? A simple idea coming from several directions has a better chance of succeeding than a single voice, no? To quote an <a href="https://en.wikiquote.org/wiki/Oliver_Wendell_Holmes_Jr.">elder statesman</a> from the history of the current "anti-tax" political party from our large boisterous <a href="https://en.wikipedia.org/wiki/United_States">neighbour</a>: "Taxes are the price we pay for a civilized society."</div></div> </div> Arthurhttp://www.blogger.com/profile/07467853070371188335noreply@blogger.com0tag:blogger.com,1999:blog-6431527.post-75095487334975540852017-03-01T15:00:00.000+00:002017-03-01T15:25:30.096+00:00The starter git project? Just a starter<div dir="ltr">
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><a href="https://ansak.blogspot.ca/2017/02/that-starter-git-project-dont-stop-there.html">Yesterday</a> I mentioned that my <a href="https://ansak.blogspot.ca/2016/12/fwd-10-steps-to-empty-starter-project.html">git starter project</a> had a significant gap (and closed it there) and a problem. I had noticed the <b>gap</b> before I posted the original, but I didn't notice the <b>problem</b> until, as I wrote yesterday, I tried to use the original for something else.</span></div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
<div style="font-family: arial, helvetica, sans-serif;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">The <b>problem</b> was that the starter wasn't well laid out for further development. It showed how to bring the different pieces together in one place but not how one <b>should</b> lay things out for longer term ease of use. I considered laying down steps to change the project, but if a patch is a picture of a change to source code, and if a picture is worth a thousand words, then if you download <a href="http://www3.telus.net/ansak/git-starter-patch.diff">this patch</a> and execute the following commands, you'll see what I mean. (I'm assuming you saved the patch in your current working directory, </span>beside the starter project)</div>
<div style="font-family: arial, helvetica, sans-serif;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<span style="font-family: "courier new" , "courier" , monospace;">========================================================================================</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">cd starter</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">git apply ../git-starter-patch.diff</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">========================================================================================</span><br />
<div style="font-family: arial, helvetica, sans-serif;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="font-family: arial, helvetica, sans-serif;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">The result shows far more eloquently than I can briefly describe what needed to be done. Your final tool will need to use the code that you want to write and test -- but so will the tests! Putting the code next to the tool would make bringing your "test-me" code into a test as well as into the final tool awkward. After this patch, when you want to bring your library into the main tool, you can add a line to the top level </span><span style="font-family: "courier new" , "courier" , monospace;">CMakeLists.txt</span><span style="font-family: "arial" , "helvetica" , sans-serif;"> file, just after the "add_executable" line, to bring the library in there, too, thus:</span></div>
<div style="font-family: arial, helvetica, sans-serif;">
<br /></div>
<span style="font-family: "courier new" , "courier" , monospace;">target_link_libraries( starter math-primitives )</span><br />
<div style="font-family: arial, helvetica, sans-serif;">
<br /></div>
<div style="font-family: arial, helvetica, sans-serif;">
Then, everything will be compiled exactly once, available for linking in each different context (currently only two, but it could grow). Oh, and by the way, the test in the patch fails; so don't commit it yet!</div>
</div>
</div>
Arthurhttp://www.blogger.com/profile/07467853070371188335noreply@blogger.com0tag:blogger.com,1999:blog-6431527.post-62466227808335403462017-02-28T04:17:00.001+00:002017-02-28T05:00:36.962+00:00That starter git project? Don't stop there...<div dir="ltr">
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">Two-and-a-half months ago, I posted a <a href="https://ansak.blogspot.ca/2016/12/fwd-10-steps-to-empty-starter-project.html" target="_blank">10-step git starter</a>. And I felt good, like I had probably made someone's life a little easier.</span></div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">I also used it within a matter of weeks for the beginning of a "Coding Dojo"-ish project that my sons (one in the industry already, one about to graduate from <a href="http://www.sfu.ca/" target="_blank">SFU</a> in Computer Science, one just in his first year) and I are working on together. Early on in that process, I saw a <b>significant problem</b> with the starter. There was also a <b>significant gap</b> in the how-to-use-this example script. Let me fill in that gap first, and then, later I'll show how to fix the problem.</span></div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">The <b>gap</b> came in two parts as a result of running the example at home, where all the development boxen run Linux (<a href="https://www.archlinux.org/" target="_blank">arch</a>, and <a href="https://getfedora.org/" target="_blank">fedora</a> -- what a lot of typo-squats there are on fedora, though!). The first part of the gap came in the way I used re-directed cat to create the starting versions of all the files -- something that using <a href="http://www.cygwin.com/" target="_blank">Cygwin</a> would have fixed easily enough. But the second problem, the real one, came up in the block after the 10 steps.</span></div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div class="gmail_default">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">On Linux, I could use the default "</span><span style="font-family: monospace , monospace;">Unix Makefiles</span><span style="font-family: "arial" , "helvetica" , sans-serif;">" generator without specifying it at all. Under Cygwin, perhaps that would work as well, but for native Windows builds, especially where the system has several versions of Developer Studio installed (as my Windows development boxes at work often have), you'll want to choose a specific version under which to create solution files.</span></span></div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div class="gmail_default">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">But wait, you say, I thought <a href="https://cmake.org/" target="_blank">CMake</a> was a build system!? Well it is, but not quite. Strictly speaking, it's more a meta-build system. You specify what's required to build what you want in </span><span style="font-family: monospace , monospace;">CMakeLists.txt</span><span style="font-family: "arial" , "helvetica" , sans-serif;"> files, but then CMake generates build scripts according to the set of compilers you have on the system. It made the most sense for the project CMake was originally written to support, and given the differences in available functionality on the different platforms, with the different tool chains, it's probably the best choice. The compiler vendors know best what their build system wants. CMake knows how to build build scripts for the build systems listed <a href="https://cmake.org/cmake/help/v3.1/manual/cmake-generators.7.html">here</a>. I say call it a win and move on.</span></span></div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div class="gmail_default">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">If you're building on Windows, and you're using Developer Studio 2013, and you've got both CMake and Developer Studio location on the </span><span style="font-family: monospace , monospace;">PATH</span><span style="font-family: "arial" , "helvetica" , sans-serif;"> you would follow step 10 with...</span></span></div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
<br /></div>
<div class="gmail_default">
<div class="gmail_default" style="color: black; font-size: 12.8px;">
<span style="font-family: "courier new" , "courier" , monospace;">------------------------------<wbr></wbr>------------------------------<wbr></wbr>----------------------------</span></div>
<div class="gmail_default" style="color: black; font-size: 12.8px;">
<span style="font-family: "courier new" , "courier" , monospace;">mkdir build</span></div>
<div class="gmail_default" style="color: black; font-size: 12.8px;">
<span style="font-family: "courier new" , "courier" , monospace;">cd build</span></div>
<div class="gmail_default">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: black; font-size: 12.8px;">cmake -G "</span><span style="color: black; font-family: monospace , monospace;"><span style="font-size: 12.8px;">Visual Studio 12 2013</span></span><span style="color: black; font-size: 12.8px;">" ..</span></span></div>
<div class="gmail_default">
<span style="color: black; font-family: "courier new" , "courier" , monospace; font-size: 12.8px;">msbuild starter.sln /p:Configuration=Release</span></div>
<div class="gmail_default" style="color: black; font-size: 12.8px;">
<span style="font-family: "courier new" , "courier" , monospace;">------------------------------<wbr></wbr>------------------------------<wbr></wbr>----------------------------</span></div>
</div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
<br /></div>
<div class="gmail_default">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">I'll verify this when I have an in-house Windows development system up and running, but even if I've messed that up, you should be able to open a "</span><span style="font-family: monospace , monospace;">.sln</span><span style="font-family: "arial" , "helvetica" , sans-serif;">" file from within the build sub-directory in Developer Studio and build and debug everything from there. Once a release version has been built, you should be able to run the resulting command line "tool" and starting "test", from within the build directory as</span></span></div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
<br /></div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
<div class="gmail_default" style="color: black; font-size: 12.8px;">
<span style="font-family: "courier new" , "courier" , monospace;">------------------------------<wbr></wbr>------------------------------<wbr></wbr>----------------------------</span></div>
<div class="gmail_default" style="color: black; font-size: 12.8px;">
<span style="font-family: "courier new" , "courier" , monospace;">.\Release\starter.exe</span></div>
<div class="gmail_default" style="color: black; font-size: 12.8px;">
<span style="font-family: "courier new" , "courier" , monospace;">.\test\Release\testStarter.exe</span></div>
<div class="gmail_default" style="color: black; font-size: 12.8px;">
<span style="font-family: "courier new" , "courier" , monospace;">------------------------------<wbr></wbr>------------------------------<wbr></wbr>----------------------------</span></div>
</div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
<br /></div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">And you'll be able to run the resulting test with <span style="font-family: monospace , monospace;">ctest</span><span style="font-family: "arial" , "helvetica" , sans-serif;">, thus:</span></span></div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
<br /></div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
<div class="gmail_default" style="color: black; font-size: 12.8px;">
<span style="font-family: "courier new" , "courier" , monospace;">------------------------------<wbr></wbr>------------------------------<wbr></wbr>----------------------------</span></div>
<div class="gmail_default" style="color: black; font-size: 12.8px;">
<span style="font-family: "courier new" , "courier" , monospace;">ctest -C Release .</span></div>
<div class="gmail_default" style="color: black; font-size: 12.8px;">
<span style="font-family: "courier new" , "courier" , monospace;">------------------------------<wbr></wbr>------------------------------<wbr></wbr>----------------------------</span></div>
</div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
<br /></div>
<div class="gmail_default">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">The <b>problem</b>, which I'll address in another installment lies in where the </span><span style="font-family: monospace , monospace;">test</span><span style="font-family: "arial" , "helvetica" , sans-serif;"> directory is in the example vs. where better practice might put it. Don't worry. Git and your favourite text editor will make this easy, too.</span></span></div>
</div>
Arthurhttp://www.blogger.com/profile/07467853070371188335noreply@blogger.com0tag:blogger.com,1999:blog-6431527.post-4680426109417003042017-02-23T19:47:00.000+00:002017-02-24T14:47:27.689+00:00Electoral Reform in BC - Regional Districts and Provincial Electoral Districts, the Lower Mainland<div dir="ltr">
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
(the elephant in the legislature)</div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
<br /></div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
And so we come to the last installment -- and definitely the most complicated at the "electoral district" end of things, referring, as always, <span style="color: rgb(0 , 0 , 0); font-size: 12.8px;">to BC's </span><a href="http://maps.gov.bc.ca/ess/hm/ge2017/" style="font-size: 12.8px;" target="_blank">Electoral Map</a><span style="color: rgb(0 , 0 , 0); font-size: 12.8px;"> and the </span><a href="http://www.bcstats.gov.bc.ca/statisticsbysubject/geography/referencemaps/rds.aspx" style="font-size: 12.8px;" target="_blank">Regional District Map</a><span style="color: rgb(0 , 0 , 0); font-size: 12.8px;">.</span></div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
<span style="color: rgb(0 , 0 , 0); font-size: 12.8px;"><br /></span></div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
When mapping ridings to the Fraser Valley Regional District, some of its area is lost to West Vancouver-Sea to Sky (see below) and some to Fraser-Nicola (as described <a href="https://ansak.blogspot.ca/2017/02/electoral-reform-in-bc-regional.html">earlier</a>) but it also takes in some of Metro-Vancouver's territory in filling up Abbotsford South and Abbotsford West. I have lived for significant parts of my life on the western parts of those two ridings and the aggregation isn't entirely crazy. Purists will wonder what South Otter has in common with the village of Arnold (extreme ends of Abbotsford South) but these are all rural and semi-rural areas that look to urban Abbotsford as their centre of gravity. This preference exists to some extent, even in the west, where being "in Langley" might be thought to attract attention toward that urban centre. Maple Ridge-Mission, too, takes in part of Metro-Vancouver for the Maple Ridge end of its area, but since I am sketching things, not painting them per-pixel, I will accept the current boundaries as the source for my experiment.</div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
<br /></div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
I propose a new "Fraser Valley" seat consolidated from the new Chilliwack-Kent, Chilliwack, Abbotsford-Mission, Maple Ridge-Mission, Abbotsford-South and Abbotsford-West ridings. It would send six members proportionately chosen to the Legislature, representing about 46,300 people per member, slightly over-represented, but not by as much as many of the really rural areas of BC.</div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
<br /></div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
Before proposing my final new seat, a word about West Vancouver-Sea to Sky. This riding is unique in the whole province. At the south end, it is comprised of the farthest west portions of West Vancouver, up through Howe Sound to Squamish and Whistler, on to Pemberton, Birken, D'Arcy and Mount Currie. In short it is dominated geographically by the Squamish-Lillooet Regional District but in serious danger of being dominated in regard to population by the part of Metro Vancouver that is included at the south end. Recognizing the hazard in doing so, I am going to include this riding in my Metro-Vancouver model if only because population does swamp geography. Yet if I'm wrong about the actual population counts, what little I know, guess or have been able to sniff out about people from Lions Bay to Whistler, is that this area is functioning more and more as a bedroom community and/or playground for Metro-Vancouver-centred folk, so this distortion shouldn't be enough to invalidate the results of my sketch.</div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
<br /></div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
My last proposal will be slightly controversial so I will be making a follow-on promise. Finally then...</div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
<br /></div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
I propose a new "Metro Vancouver" seat consolidated from the 42 ridings bounded by the Straight of Georgia to the southwest, and on land inclusively by Langley East, Maple Ridge-Pitt Meadows and West Vancovuer-Sea to Sky. This seat would send 42 members proportionately selected based on a single ballot cast in that greater area. Each member would represent about 56,000 people, being under-represented by about 10%.</div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
<br /></div>
<div class="gmail_default" style="font-family: arial,helvetica,sans-serif;">
That will be the biggest part of my experiment but I submit that some sub-divisions may be appropriate. One such scheme might be in three parts:</div>
<div class="gmail_default">
<ul style="font-family: arial,helvetica,sans-serif;">
<li>a Vancouver-Sea to Mountains riding composed of Vancouver, Richmond and the North/West Van region, (18 members)</li>
<li>a North Fraser-Suburbs riding comprising Burnaby, New Westminster, Tri-Cities and Maple Ridge-Pitt Meadows (10 members) (maybe even leaving Maple Ridge-Pitt Meadows out on its own?)</li>
<li>a South Fraser riding containing everything from Delta to Langley (13 members)</li>
</ul>
<span style="font-family: "arial" , "helvetica" , sans-serif;">In the tradition of <a href="https://www.amazon.com/Capital-Twenty-First-Century-Thomas-Piketty/dp/1491591617">Thomas Piketty</a> (who put all the data for "Capital" up on the web for others to examine), after the election is done and I've totted up my results, I will release the spreadsheet that I use for Metro-Vancouver with some sort keys in place to enable others to fiddle around and examine things further but I wouldn't recommend smaller divisions than this trio because it would tend to leave otherwise urban areas out of the anti-fragmentation effect that I look to find in Regionalized Proporitionality.</span></div>
<div class="gmail_default">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div class="gmail_default">
<span style="font-family: "arial" , "helvetica" , sans-serif;">So, enough of this until May! If anyone from any other province in Canada wants to try to do something like this for their own piece of the Home and Native Land, please let me know on one of the Facebook posts and maybe we can compare notes later.</span></div>
<div class="gmail_default">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div class="gmail_default">
<span style="font-family: "arial" , "helvetica" , sans-serif;">And I must get back to some matters of more immediate urgency that interrupted the gradual flow of this presentation when I first conceived of it.</span></div>
</div>
Arthurhttp://www.blogger.com/profile/07467853070371188335noreply@blogger.com0