Autumn in Canada: NAPLPS

NAPLPS rendered in PP3

My OpenProcessing demo “autumn in canada”, redone as a NAPLPS playback file. Yes, it would have been nice to have outlined leaves, but I’ve only got four colours to play with that are vaguely autumnal in NAPLPS’s limited 2-bit RGB.

Played back via dosbox and PP3, with help from John Durno‘s very useful Displaying NAPLPS Graphics on a Modern Computer: Technical Note.

This file only displays 64 leaves, as more leaves caused the emulated Commodore 64 NAPLPS viewer I was running to crash.

Autumn in Canada: PicoMite version

more leaves

So I ported autumn in canada from OpenProcessing to PicoMite BASIC on the Raspberry Pi Pico:

a small black screen images with text in the centre: autumn in canada scruss, 2021-11 just watch ...
no leaves
a small black screen images with text in the centre: autumn in canada scruss, 2021-11 just watch ... with one red and one orange maple leaf sitting on top of it
a couple of leaves
a small black screen images with text in the centre: autumn in canada scruss, 2021-11 just watch ... with four red/yellow/orange maple leaves sitting on top of it
more leaves
a small black screen images with text in the centre: autumn in canada scruss, 2021-11 just watch ... with sixteen simulated fallen maple leaves mostly covering it
plenty of leaves
a small black screen image completely covered with many simulated fallen maple leaves
far too many leaves

The biggest thing that tripped me up was that PicoMite BASIC starts arrays at 0. OPTION BASE 1 fixes that oversight. It would have been nice to have OpenProcessing’s HSV colour space, and an editor that could handle lines longer than 80 characters that didn’t threaten to bomb out if you hit the End key, but it’ll serve.

Source below:

' autumn in canada
' scruss, 2021-11
' a take on my https://openprocessing.org/sketch/995420 for picomite

OPTION base 1
RANDOMIZE TIMER
' *** initialize polar coords of leaf polygon and colour array
DIM leaf_rad(24), leaf_ang(24), px%(24), py%(24)
FOR i=1 TO 24
    READ leaf_rad(i)
NEXT i
FOR i=1 TO 24
    READ x
    leaf_ang(i)=RAD(x)
NEXT i

DIM integer c%(8)
FOR i=1 TO 8
    READ r%, g%, b%
    c%(i)=RGB(r%,g%,b%)
NEXT i

' *** set up some limits
min_scale%=INT(MIN(MM.HRES, MM.VRES)/8)
max_scale%=INT(MIN(MM.HRES, MM.VRES)/6)
min_angle=-30
max_angle=30
min_x%=min_scale%
min_y%=min_x%
max_x%=MM.HRES - min_x%
max_y%=MM.VRES - min_y%

CLS
TEXT MM.HRES/2, INT(MM.VRES/3), "autumn in canada", "CM"
TEXT MM.HRES/2, INT(MM.VRES/2), "scruss, 2021-11", "CM"
TEXT MM.HRES/2, INT(2*MM.VRES/3), "just watch ...", "CM"

kt%=0
DO
    cx% = min_x% + INT(RND * (max_x% - min_x%))
    cy% = min_y% + INT(RND * (max_y% - min_y%))
    angle = min_angle + RND * (max_angle - min_angle)
    sc% = min_scale% + INT(RND * (max_scale% - min_scale%))
    col% = 1 + INT(RND * 7)
    leaf cx%, cy%, sc%, angle, c%(7), c%(col%)
    kt% = kt% + 1
LOOP UNTIL kt% >= 1024

END

SUB leaf x%, y%, scale%, angle, outline%, fill%
    FOR i=1 TO 24
        px%(i) = INT(x% + scale% * leaf_rad(i) * COS(RAD(angle)+leaf_ang(i)))
        py%(i) = INT(y% - scale% * leaf_rad(i) * SIN(RAD(angle)+leaf_ang(i)))
    NEXT i
    POLYGON 24, px%(), py%(), outline%, fill%
END SUB

' radii
DATA 0.536, 0.744, 0.608, 0.850, 0.719
DATA 0.836, 0.565, 0.589, 0.211, 0.660, 0.515
DATA 0.801, 0.515, 0.660, 0.211, 0.589, 0.565
DATA 0.836, 0.719, 0.850, 0.608, 0.744, 0.536, 1.000
' angles
DATA 270.000, 307.249, 312.110, 353.267, 356.540
DATA 16.530, 18.774, 33.215, 3.497, 60.659, 72.514
DATA 90.000, 107.486, 119.341, 176.503, 146.785, 161.226
DATA 163.470, 183.460, 186.733, 227.890, 232.751, 270.000, 270.000
' leaf colours
DATA 255,0,0, 255,36,0, 255,72,0, 255,109,0
DATA 255,145,0, 255,182,0, 255,218,0, 255,255,0

You could probably use AUTOSAVE and paste the text into the PicoMite REPL. I used an ILI9341 SPI TFT LCD Touch Panel with my Raspberry Pi Pico along with some rather messy breadboard wiring.

Fun fact: the maple leaf polygon points are derived from the official definition of the flag of Canada.

CMHC model house designs, 1947–1978

Almost any part of suburban Toronto brings a sameness of houses. Many neighbourhoods were built as a block, in the same year, in the same style. In order to encourage solid and financially-sound building design, the government agency Canada Mortgage and Housing Corporation (initially Central Mortgage and Housing Corporation; but always CMHC) sponsored house design competitions and paid architects a royalty for use of their designs in return for making the plans available inexpensively to all.

(I should note that that “available … to all” came with a fairly heavy dose of colonialism. As with credit to Francophone Canadians in the 19th century, mortgage finance was denied to First Nations people in Canada until very recently. Just part of the conciliation we have to do before there’s a hope of useful reconciliation.)

So many suburban neighbourhoods come straight out of the CMHC catalogues. CMHC houses are featured in Douglas Coupland’s Souvenir of Canada. They’re not part of the the whole “majestic” Canada thing, but they are as Canadian as _____.

I came across a tweet the other day about the CMHC catalogues:

I went to the site and there were loads of catalogues there, all languishing unbrowsably in boring old FTP folders. So I decided to put up all the CMHC Small House designs that I could find on archive.org. Here’s a sampler from each of the decades that are available:

Plan 47-10: 700 sq ft. (1947)
Bungalows and split-level houses: designs 112 and 132 (1954)
Modèle 762 Architecte: JOHN BIRD, Westmount, Qué.    Il s’agit ici d’une grande maison en brique sur bois, à mi-étages, à  trois chambres. Le garage est au niveau du sol, et sept marches  conduisent à la porte avant. Le living-room est à l'avant de la maison.  Derrière celui-ci et sept marches plus bas, sont situées la salle familiale  et la cuisine. Les chambres sont à huit marches au-dessus du niveau  du living-room. Le plafond du living-room est à la même hauteur que  le plafond des chambres. Il y a une salle de toilette en bas, près de  Pentrée latérale. Le sous-sol qui contient le chauffage et l’entreposage,  est situé sous le living-room seulement. La meilleure orientation    serait de placer le côté gauche face au nord.
Modèle 762 — Architecte: JOHN BIRD, Westmount, Qué. (1965)
Design 1.09M: 97.7 m² (1977)

So many houses. So many neighbourhoods. So many families. So many stories.

These are all of the CMHC design catalogues that I put up on Internet Archive:

  1. 67 Homes for Canadians (1947)
  2. Small House Designs: Bungalows (1949)
  3. Small House Designs: 1½-storey (1949)
  4. Small House Designs: 2-storey (1949)
  5. Small House Designs: Bungalows (1950)
  6. Small House Designs: 1½-storey (1950)
  7. Small House Designs: 2-storey (1950)
  8. Modèles de Maisons: Région de Québec (1950)
  9. West Coast House Designs (c.1950)
  10. Small House Designs: Bungalows (1952)
  11. Small House Designs: 1½-storey (1952)
  12. Small House Designs: 2-storey (1952)
  13. DND Small House Designs (1954)
  14. Small House Designs: Bungalows and split-level houses (1954)
  15. Small House Designs: Two-storey and 1½ storey houses (1954)
  16. Modèles de Maisons: Région de Québec (1954)
  17. Small House Designs (1957)
  18. Modèles de Petites Maisons (1957)
  19. Small House Designs (1958)
  20. Small House Designs – Supplement (1958)
  21. Modèles de Petites Maisons (1958)
  22. Mod̬les de Petites Maisons РSuppl̩ment (1958)
  23. Small House Designs (1962)
  24. Small House Designs (1965)
  25. Small House Designs Supplement (1965)
  26. Modèles de Petites Maisons (1965)
  27. House Designs / Modèles de Maisons (1968)
  28. House Designs / Modèles de Maisons (1968; Supplement 1)
  29. House Designs / Modèles de Maisons (1968; Supplement 2)
  30. House Designs / Modèles de Maisons (1971)
  31. House Designs / Modèles de Maisons (1972)
  32. House Designs / Modèles de Maisons (1974)
  33. A Selection of Small House Designs (1976)
  34. Modest House Designs 1977
  35. Modest House Designs 1977 (Metric edition)

They’re all downloaded from CMHC’s FTP site (ftp://ftp.cmhc-schl.gc.ca/chic-ccdh/HousePlans/). A dedicated urban architecture archivist could have a field day there.

CMHC link via Elie Bourget – thanks!

The Real Change that Canadians* want

We’ve just had an election in Canada. You probably didn’t know.

The (now) majority Liberal Party of Canada ran a set of 106 issues pages, and their stance on each. Visitors could vote on how they felt on these issues. The overall results aren’t tabulated there yet, so I took the liberty of scraping the data (harder than it looked) and ranked it.

Here are the top ten issues from the website, ranked by popularity:

  1. Marijuana
  2. Guns
  3. Electoral reform
  4. International students and temporary residents
  5. Middle class tax cut
  6. Helping families
  7. Ending unfair tax breaks
  8. Canada Post
  9. Science and scientists
  10. Post-secondary education

I have no idea how objective this information is. I suspect some attempts were made to game the system, looking at the vote counts for the top two.

Here’s the data: liberaldotca-realchange-poll-data-2015-10-20-183923. All the columns after Five Stars were derived by me.

I’m very disappointed that the issue of Missing and murdered Indigenous women and girls wasn’t even in the top twenty. C’mon Canada; for once, don’t let me down.

*: english-speaking Canadians who visited» Real Change and voted on issues there before 2015-10-20 18:39:23 EDT, that is.

Power, at what price?

It’s the Canadian Electricity Association’s Electricity in Ontario week. Can’t you feel it in the air?  A brochure, snappily titled “ELECTRICITY ARE WE GETTING VALUE FOR THE MONEY WE PAY?” [pdf] was in my dead tree media stack this morning. I think it’s trying to say our power is too cheap, as in this graph yoinked from the text:

powerforthefuture_graphBut as ever, hand-picked statistics only tell half the story. Digging into the IEA Key World Energy Statistics handbooks for 2011 and 2012, the data look something more like this:

Country

2010 Domestic Electricity Price / USD/kWh

2010 Annual Electricity Consumption per capita / kWh

Annual Cost per capita

Denmark

$0.356

6,329

$2,255

Japan

$0.232

8,399

$1,950

United Kingdom

$0.199

5,741

$1,142

France

$0.157

7,756

$1,216

United States

$0.116

13,361

$1,547

Canada

$0.095

15,145

$1,431

Mexico

$0.089

2,085

$185

 

So really, because Canadians use such an obscene amount of energy per capita (srsly; we should be ashamed of ourselves), the graph should look more like this:

realchartSo we’re not actually that inexpensive; solidly mid-range. Since our electricity price per kWh is so low, if we spent a little money on energy conservation, we could have really cheap power for everyone.

ICQuestionBank2csv

ICQuestionBank2csv: A tool to extract both the Basic and Advanced Amateur Radio Examination guides from Industry Canada’s rather annoying two-column PDFs. Written for IC’s 2014-02 database updates.

See: Amateur Radio Exam Generator.

Written by Stewart C. Russell (aka scruss) / VA3PID – 2014-03-07.

Requirements

  • Perl, with Text::CSV_XS
  • xpdf tools
  • Bash
  • wget

Usage

Run either basic2csv.sh or advanced2csv.sh to download the source PDF and extract the data.

Licence

WTFPL (srsly).

Canadian Wheat Boards: #1 & #2

Canadian Wheat Board #1

Canadian Wheat Board #2

— Organic Canadian wheat on red cedar, beeswax encaustic; 72 × 182 mm.

In the Synthetic History of Canada, there was no symbol more evocative of hearth and home than the wheat board. Reconstructed here by the artist in the traditional materials of cedar [strength], wheat [abundance] and beeswax [cohesion], the wheat board is a forgotten part of Canadian lore. Its rediscovery as a domestic art form brings new hope of a progressive national identity.

Ten years in Canada

A decade ago today, Catherine and I landed in our adopted home. There was snow on the ground. Late in the day, we checked into the Holiday Inn at Martin Grove and Dixon. We hadn’t brought clothes for snow.

The next day we went to stay at the meeting house. The day after I braved slush and the Warden bus for a job interview at Warden and Alden in Markham. There were still farms at Warden and Steeles.

Until we moved in here in late June, we house sat, couch-surfed, whatever you want to call it. We relied so much upon the kindness of then-strangers. So thank you to: Don and all the Bowyers, Jane Orion, Brett & Nancy, Lynn & Tam, Brydon & René; to Les for the first job at Gandalf, to Dave and the TREC crew for being there at the start of a new industry.

I didn’t blog back then, kept no journal, and took few photographs. The first few years were tough — early 2003 might be a special low point, with a bitter winter, a dreadful job and a flooded basement. Every tiny detail of the immigration process seemed so important at the time, but now barely registers. Getting a SIN card up on St Clair? Biggest deal ever, then.

So, thanks to everyone, here’s home now. I think it was the right move.

Only in Canada …

Pink Snow in June
Pink Snow in June

A pile of candy-coloured snow on a hot day in June is no surprise to many Canadians. The photo location may help those outside the country, though it helps to know what a “community recreation centre” is.

 

emusic canada changes its pricing

What with the sad loss of Wild East Compact Sounds this summer, my sources of music are now limited. eMusic, bless ’em, have been my source of indie stuff since about 2003. They were cheap, had a fixed price per download, and carried a raft of indie stuff and no major label tat.

Not much longer; got this in my inbox:

So, yeah, the full announcement: major label content, minimum 49¢/track, and variable pricing. Exactly all the reasons I wouldn’t want to use them. Good call, eMusic, for a battered-about subscriber since 2003.

I was initially confused by the pricing. I pay 36¢/track, so I couldn’t see how their promise that “your monthly payments will not change and you will still be able to download the same number of tracks available today, if not more, depending upon your current plan“. Then I see their new menu:

So basically they’re crediting me with a fake $4.48 a month (oh wait; “30 days”, not a month; they so want you to forget to download stuff by making the cycle date change) so I can still get my 35 downloads. Since they hint that there will now be variable pricing, I’ll bet the new stuff will be >49¢, so I really won’t be able to download as many per month after all.

They’re saying that the new pricing will allow them to do a bunch of fun stuff:

We’re also committed to making eMusic a better member experience. We recently rolled out improvements to Browse and Search pages. And we’re hard at work on a host of new features and enhancements including a music locker, which should allow you to stream your music collection from any desktop or mobile device. In addition, improvements to eMusic’s social features, to better connect you with our editors, other members, artists, labels and your friends, are also in the works. We’ve sketched out an ambitious slate, and it will take a little while to get there. We hope you’ll continue on the journey with us.

I don’t want all that social fluff. The MP3s work just fine on any mobile device, so streaming them just adds more crud. I want fixed price downloads, not some half-assed music locker. Where, oh where is Frank Hecker and swindleeeee when you need them?

… we stand in line for thee

A little bit of silliness for Thanksgiving:

This took almost no time to put together. The “speaker” is a Tim Hortons cup with a cheap piezo glued to the base. What makes the Arduino sing is the Tone Library running its RTTTL demo sketch, with the anthem itself pasted in from a rather old Nokia Ringtones library.

Update: Here’s the code, such as it is. It’s just the Tone/examples/RTTTL code with the tune data pasted in. I’d been programming Arduino for about a year, so that was a semi-major achievement for me:

It’s nice to revisit old code and find it was written by a friend, Brett Hagman of Rogue Robotics.