Jerry's Blog  1.4.230
mi propio
Improbable Chess Graphics
html graphics without normal image rendering
Wed March 3 2021  7:31pmComputer

The highly unlikely chess scenario pictured has a couple of interesting aspects:


At first glance, black might seem to be winning. He has all 16 of his pieces (six are still in their original position), while white has lost four of his pawns and three of his power pieces, including the queen. But a closer look shows white to be in control. In fact, he can checkmate in one move (Rf8# 1-0). That is, if it's white's turn. A third look reveals a different twist: Black is so boxed in that, if it's his turn, he has no legal move, and the match ends in a stalemate.

Fine. A pretty cool, if improbable chess situation. But this blog article is categorized under 'Computer' for a different reason: The usual method for drawing the chess pieces would be to create 11 small image files for each of the chess pieces (white queen not needed here), then include them on the grid using the html <img> tag. Another method, not available on many browsers, would be to insert raw image data bits within html elements. In either case, a browser set to not display images would render no pieces on an empty chess board. Modern browsers could use the new html5 <canvas> element in conjunction with javascript, or SVG vector graphics. But such methods are even less widely available. I want my website to work on as wide a variety of browsers as possible, including old browsers, and browsers with image rendering turned off. I think the chess game pictured here should display correctly in any such browser.

For each chess piece, pixels and groups of pixels are individually drawn using html relative positioning of <div> elements whose background color is the color of the pixel(s). So, for example, the following draws 10 black pixels starting at the top of the container html element, 17 pixels from its left side:

<div style="position:relative; top:0px; left:17px; width:10px; height:1px; background:#000;"></div>

There are, of course, a great many such <div> tags for just a single chess piece image, and I certainly didn't type each one in manually, but used server-side php scripting to generate the html code for each chess piece. Can share this php code with anyone interested; just ask. You can also do 'View Source' in your browser to see the actual html code thus generated here.

Am not real sure what practical value lies in either the chess game or the non-standard method of rendering graphics. There may yet be a practical benefit to the latter. Meanwhile, my brain and possibly yours have been occupied with some harmless noodling.

Solar Panel
Harvesting the sun for my house
Sat January 30 2021  11:43amMisc.

solar panel

Have recently purchased and installed a solar panel with its various components. Not motivated primarily by ecological nor economic concerns. The grid for large areas of Nicaragua gets its power from a well engineered and environmentally friendly hydroelectric dam just north of Jinotega. My monthly light bill is typically between $U10 and 15 for around 80 to 100 kilowatt hours of energy consumption. But Disnorte is poorly administered and unreliable. Besides, I like the idea of being a bit more independent. Call it a learning experience, if nothing else, and a possible hedge against future needs.

batteries, inverter, etc.

This initial modest experiment isn't intended to make me energy independent. As a beginning, only one of the house's three circuits are solar powered: the most critical circuit containing both refrigerator and computer. The entire system consists of a 300 watt solar panel mounted in an open area on the roof, three 12 volt batteries for night time and other standby power, a 1200 watt inverter to convert the solar and battery DC current into 120 volt 60 Hz AC house current, a controller and cables to connect all these, all located indoors in a spare room, and a double throw knife switch (in a different room, not pictured) to switch the circuit back and forth between solar and Disnorte, if needed.

Speaking of learning experience, I've already learned that the inverter's internal circuitry is particularly sensitive to short circuits and reverse polarity (blush!) Am also still learning how the panel, controller, and inverter interact, and hope to perhaps take better advantage of the panel's full capacity. To that end, am supposing that the panel is most efficient when facing the sun more or less directly. The panel as pictured is mounted at an angle of 24.5° to the south of horizontal. For late January in Nicaragua, this is not too far from ideal, but that angle ought to vary from time to time for greater efficiency. You might be interested in a javascript routine that I wrote to help in this regard.

Perhaps more articles to report on any progess or regress.

rev. Fri Feb 12  8:31pm
Ode to Sudoku
Sudoku Analyzer development story
Tue November 24 2020  1:53pmSudoku

Sudoku is easy to understand: a 9x9 grid, 81 cells, in which every row, column, and 3x3 box must contain digits 1 through 9. Simple enough, but with enormous possibilities. If one were to write a little program to generate all possible 9x9 grids with all possible combinations of 9 digits in each of the 81 cells, it would have to generate 9^81 (9 to the 81st power) grids (that's a number with 78 digits). I did in fact write such a simple program over 15 years ago. But to complete the task within my lifetime, even on a powerful 5 gHz machine generating, (read article)

rev. Nov 24 2020  8:11pm
Version 3
Sudoku Analyzer v. 3.0 released
Wed October 7 2020  2:29pmSudoku

When you press the buttons 'Analyze', 'Hint', 'Peek', or 'Solve', the Sudoku Analyzer sends a small Ajax packet to the server. The 'X' in A.J.A.X. in this case stands for 'executable', a program that runs on the hosting server at as a native BSD excutable or binary. The binary performs the requested task and sends another small packet back to your computer to complete the Ajax transaction. This program is written in C and assembly, compiled on the server using gcc, for maximum execution speed. (Sudoku analysis would run way too slowly in a scripting language.) The original and core part of the program, written in assembly, solves the Sudoku by means of simple and fast (read article)

Successful Challenger
The first successful Sudoku Challenge respondent
Sun August 23 2020  10:09amSudoku

A few days ago, an astute visitor* to the CyberJerry Sudoku page successfully responded to the Sudoku Challenge, the first CyberJerry visitor to do so. He found the Sudoku grid pictured which the Analyzer couldn't solve, and told me (in Spanish) how to solve it:

este sudoku lo saque de la pagina de categoria sudoku extremo #717, y su analizar dice que no tiene una solución, sin embargo por metodo analitico encuentro que F6 = 4 debido al 4 de E3 y el 4 de G5, tambien encuentro que I9 = 5 debido al 5 de D8 y al 5 de H4, al colocar estos dos números, ahora si dice que tiene solución única lo anterior esta pasando
(read article)

rev. Aug 29 2020  8:31am
How a pilgrim Church might emerge
Wed August 5 2020  5:09pmFaith/Philosophy

It would be unreasonable and unjust to expect priests and bishops in 2020 to forsake their lifestyle and social status and become poor homeless pilgrims. Likewise, the vast majority of Catholic homes of today are incapable of becoming true domestic churches, with the husband assuming the role of pastor and priest. This will take time, probably several generations. But there are a few who could begin, and here's one way it could possibly play out:

A single bishop somewhere might request permission to form an ordinariate (see box). Or a priest could request to do so, and then request ordination as bishop, so as to be able to ordain men to the priesthood. The by-laws of this ordinariate (read article)

Amateur Priests
Dream of a Church without property
Thu July 30 2020  7:53pmFaith/Philosophy

There are Christian communities that have no denominational name, no church buildings, none of the usual ecclesial trappings. Their weekly home meetings are punctuated at intervals by pastoral visits from an elder or 'bishop'. The elder has a clearly defined territory within which he moves in circuit-rider fashion, preaching, teaching, counseling, and accepting such food and lodging as are offered him. He has no home of his own, and so is unmarried. He is allowed to own only what clothes, books and personal items he can carry in a single large suitcase.

Why shouldn't the Catholic norm be similar? The local group is the family; the husband and father being also an ordained Catholic (read article)

  1 comment
The day after tomorrow is the third day of the rest of your life.

3/3/21Improbable Chess Graphics
1/30/21Solar Panel 2
11/24/20Ode to Sudoku
10/7/20Version 3
8/23/20Successful Challenger 2
7/30/20Amateur Priests 1
7/23/20Doctrines, Canons, Buildings 1
7/6/204 Sudoku Challenges
6/19/20Unavoidable Rectangle
6/1/20Sudoku Challenge (2) 1
4/7/20Fear of Death 3
2/14/20Heads Up
1/11/20Billionth Birthsecond 1
12/31/19Versus-2 1
12/3/19Copyright/left 2
10/24/19DePyper 1
7/19/19Schizophrenia 4
7/11/19New Math 1
6/2/19Times and Seasons 4
11/29/18Data Security 1
10/2/18Until 7
9/15/18Empty Chair 11
8/28/18Riddle me this 6
8/1/18Sudoku Challenge Answered 3
7/4/18Unrest in Nicaragua 7
5/9/18Some Specifics
4/20/18Crisis of Authority 4
3/17/18Theocracy 2
3/1/18Self abnegation 1
12/14/17Sudoku Challenge
12/2/17Blog End
11/16/17Meta Blog 6
Copyright (c) 2017-2021 Gerald DePyper - Jinotega, Nicaragua, C.A.
rev. 2021.03.21