Previous Up No next

Diary, November 2024



Sun Mon Tue Wed Thu Fri Sat
                      1   2
  3   4   5   6   7   8   9
 10  11  12  13  14  15  16
 17  18  19  20  21  22  23
 24  25  26  27  28  29  30

Friday, November 1, 2024

63 years

I was born on Wednesday, November 1, 1961 at 9:45 in the morning (CET). That means that today, I will be 63 years according to the calendar and 23011 days old. But how old am I really? The tropical year, the time that it takes for the seasons to return, is said to be 365 days, 5 hours, 48 minutes, and 45.19 seconds. Yesterday, around 15:56:26 in the afternoon, it was 63 tropical years since I was born. But the tropical year is shorter than the sidereal year, the time taken by the Earth to orbit the Sun once with respect to the fixed stars, namely 365 days, 6 hours, 9 minutes, and 9.76 seconds. That means that, today at 13:22:14 it will be 63 sidereal years after I was born. The average anomalistic year, the time taken for the Earth to complete one revolution with respect to its apsides, is 365 days, 6 hours, 13 minutes, and 52.6 seconds. That means that, today around 18:19:13 it will be 63 average anomalistic years since I was born.

Double declaration?

I have been using the C progamming language (and later C++) for more than 34 years, but today I wrote something, I cannot remember having written before and it looks like a 'double' declaration of a variable:
extern int counter;
int counter = 0;
I am big fan of encapsulation and I like clean include files that hide implementation details that are not necessary for the users of the functions given in the header file. The implementation for a certain header file depended on a global counter that I did not want to include in the header file itself, but it needed to be incremented somewhere else and initialized to zero. So, I wrote in that other location, the main file (containing the main function):
extern int counter = 0;
And this resulted in a compile error, because you are not allowed to initialize a variable that is declared extern. Next, I changed the line into:
int counter = 0;
Now, I got a linking error saying that the other external definition (in the C file implementing the header file that relied on the counter variable) was not defined anywhere. This is because although it is defined in the main file, it was not defined as extern and thus not visible on the outside and thus becoming invisible for the linker that combines all the separately compiled C programs into one executable. It dawned on me that if I would have placed the extern declaration in the header file, it would have worked because then during the compilation of both C programs it would have been defined as extern and in the main program I still would have been able to initialize it. Although it is not common to see a 'double' declaration in a C file, like the above, and even looks a bit confusing, it is actually somthing that is done all the time, because the C preprocessor put both declarations into the intermediate file that is compiled by the actual compiler.


Saturday, November 2, 2024

Colourful harvest

We got a rather colourful harvest from Herenboeren Usselere Es and I took a picture of a part of the harvest.

In this picture there are: a small puprple cauliflower, a romanesco broccoli, a fennel, two red cabbages, a green and a orange pumpkin, and a leaf of curly kale.


Tuesday, November 5, 2024

Book

At 18:40, I bought the book Prospects 2021: Mondriaan Fonds toont talent edited by Mirjam Beerman, written in Dutch, and published by Het Mondriaan Fonds in June 2021 from thrift store Het Goed for € 1.00. Before I there, I went to thrift store Rataplan. Although it seems they have more books there, I get the impression that they sell less books. These trift stores are for profit shops.


Thursday, November 7, 2024

Cubes from Sheet: 11 by 11

I have this feeling that there are solutions for all cubes from a sheet problems, where at least one piece can be placed into, exists where at most twelve squares are unused for cubes. In the past weeke, I have been searching for counter examples. The program that I used, took a long time to find a solution with less than thirtheen unused squares for a square of eleven by eleven squares. Yesterday, I modified my Exact Cover program to also support positions with multiple vectors. This is a generalization of the Exact Cover problem. The multiple positions are needed to restrict the number of unused squares to an exact number. When I tried this program on the elven by elven square with seven unused squares, it found some solutions within half an hour. The first solution it found was represented as (on a single line):

S0_1_2_13_14_15|S3_4_5_16_17_18|S6_7_8_19_20_21|e9|e10|E11_12_23_24_25_36|E22_33_34_35_46_47|W44_45_56_57_68_69|W55_66_67_78_79_90|E77_88_89_100_111_112|e99|e110|D31_32_40_41_42_52|e30|W43_53_54_63_64_74|W65_75_76_85_86_96|E87_97_98_108_118_119|e109|e120|A28_29_38_39_50_61|Z26_27_37_48_58_59|S51_62_72_73_83_94|S49_60_70_71_81_92|K80_91_101_102_103_113|A82_93_104_105_114_115|A84_95_106_107_116_117|

This evening, I checked this solution and made the following drawing of it:

    +--+--+--+--+--+--+--+--+--+--+--+
    |        |        |        |##|##|
    +--+--+  +--+--+  +--+--+  +--+--+
    |     |        |        |        |
    +--+  +--+--+--+--+--+--+--+--+--+
    |  |        |     |     |##|     |
    +  +--+--+  +  +--+  +--+--+  +--+
    |        |  |  |     |        |  |
    +--+--+  +--+  +--+  +--+  +--+  +
    |     |     |  |  |  |  |  |     |
    +--+  +--+--+  +  +  +  +--+  +--+
    |  |     |     |  |  |  |     |  |
    +  +--+  +--+--+  +--+  +  +--+  +
    |     |     |     |     |  |     |
    +--+  +--+--+  +--+  +--+--+  +--+
    |  |     |  |  |  |  |  |     |  |
    +  +--+  +  +  +  +  +  +  +--+  +
    |     |  |  |  |  |  |  |  |     |
    +--+  +--+  +--+  +--+  +--+  +--+
    |##|  |        |     |     |  |##|
    +--+  +--+  +--+  +--+  +--+  +--+
    |##|     |  |     |     |     |##|
    +--+--+--+--+--+--+--+--+--+--+--+

I plan to refactor the code of my Exact Cover program such that it can be more easily be called from the program finding solutions for the Cubes from Sheet problems.


Saturday, November 9, 2024

Bonnefanten Museum

Conny and I visited the Bonnefanten Museum in Maastricht. We first went to see the exhibition Maintaining Its Spirit: Collection Marlies & Jo Eyck at Bonnefanten. I found the following works noteworthy to mention:

From the exhibition Stanley Donwood and Thom Yorke: Maps of the New World I liked:

From the exhibition Małgorzata Mirga-Tas: This is not the end of the road, a solo exhibition with works by Małgorzata Mirga-Tas, I found the following works to be noteworthy:

From the exhbition Dream On, I found the following works noteworthy:

From the exhibition Collection Neutelings, I found the following painting noteworthy:

From the exhibition Truly Wicked: The Seven Deadly Sins visualised, I found the following works noteworthy (I was getting a bit tired and filled with images):

Furthermore, we walked through Studio Rossi with design of the museum building and walked around The Shooting at Watou by Folkert de Jong.

Maastricht

After we visited the museum, we walked through Maastricht taking some pictures. We brought a short visit to the bookshop Boekhandel Dominicanen, which I visited before on Sunday, July 21, 2019. It was already dark, but we took some pictures from the Sint Servaasbrug (a bridge over the Meuse river) before went to the Indonesian restaurant KapuláGa were we had the Kakanda rice table, which existsed of yellow yice, daging balado, rendang, smoor, ayam pedas, ayam opor, sate ayam, sambal goreng udang, tempe, poached egg, sayur lodeh, seasonal vegetables, gado gado, atjar, seroendeng, roedjak. We had some strawberry ice as an desert. We were very satisfied with the dinner.


Sunday, November 10, 2024

Wijlre

On the way Wijlre Conny and I stopped at the Netherlands American Cemetery and Memorial located in the village of Margraten and waled around the cemetery. We thought about the many soldiers that died during the liberation of Europe from the German occupation and how this relates to the current war in the east of Europe. We did like the design of the chapel with the window on the side.

Close to noon, we arrived at Kasteel Wijlre Estate for the exhibition Maintaining Its Spirit: Collection Marlies & Jo Eyck. I found the following works noteworthy:

We also saw the exhibition Growing Poetics by Thierry Oussou. We in particular liked the La Poessie in one of the rooms in the attic that he had filled with branches he found on the estate.

On the way home we stopt at the McDonalds in Drosten were we ordered two McPlant meals consisting of a plant based burger with french fries and a cola. This is at least the third time I visited this McDonalds. I visited it on Saturday, September 22, 2018 with Andy and on Friday, July 29, 2010 with Li-Xia.


Thursday, November 14, 2024

Exhibitions

After work, I went into the city where I visited the exhibitions at Concordia. I saw the following exhibitions:


Friday, November 15, 2024

Book

At 17:05:15, I bought the book HETHE BESTE VAN OF WIM T. SCHIPPERS written by Harry Ruhé in Dutch and English, and published by Centraal Museum in 1997, ISBN:9789073285446, from bookshop Broekhuis for € 45.00. This is a bilingual edition where the Dutch text is printed in red and the English text in green on top of each other. To read the text a transparent green and red sheet is provided in the front of the book that you have to put over the text. This book is the catalogue of an exhibition of the same name.


Saturday, November 16, 2024

Harvest

Below a picture of the harvest (except for the 2 kilogram potatoes) that we received this morning from Herenboeren Usseler Es. (What you receive depends on how many 'mouths' you are paying for and personsl choices you make.)

The picture shows:

In the evening, I made some stamppot with the lacinato kale, two small red unions, a yellow bell pepper and some sauerkraut bacon. Conny made a salad with the outer leaves of the two red chicories.


Sunday, November 17, 2024

Cooperative, polling operating system

I have been thinking about a tiny cooperative and polling real-time operating system that works with static, single instance tasks. ESP-IDF is based on FreeTROS, a real-time operating system for embedded devives. Although FreeTROS is called real-time, it has some dynamic behaviour due to dynamic memory allocation and interrupts. Nowadays, many peripherals are connected through serial communication busses, such as SPI, I2C, and I2S, where there are often multiple slave peripherals are connected on a bus. These peripherals often have complex operating modes that can be adjusted through control registers, and possibly also complex behaviour patterns. This has an impact on the real-time behaviour of microcontrollers that communicate with these peripherals. If you do not want to use interrupts, it means you have to use polling to see if an interaction with a peripheral has completed. If you develop an application that interacts with several peripherals, it is logical to have some kind of layering in more device oriented tasks, coordinating tasks, and more high-level tasks. If you do not use operating system like functions like queues, this results in tasks polling the completing of lower-level tasks. To avoid excessive polling, which takes a lot of resources, I have been thinking about a number of queue based approaches to avoid polling. Tasks often make use of finite-state machines, which are usually implemented with case-statements. If these are not compiled to branch tables they performance is lineair to the number of cases. To work around this, one could use functions for each of the states and cause the right function to be called for each state. This does match with the idea of tasks. I have started writing some code as an experiment: TinyCoPoOS.c. I also have been thinking about program generating the code for all the functions given a tasks declaration.

Planting fruit trees

In the afternoon, I helped a bit with the planting of fruit trees at Herenboeren Usseler Es. When I arrived the others just were taking a break, because some of them already started at nine in the morning. I mostly dug holes at the places where a tree had to be planted. Twice we had some rain. The first time with some hail and at 14:30, there was a rainbow. I am looking forwards how the trees are going to grow in the coming years.


Tuesday, November 19, 2024

Wet snow

This afternoon, for some hourse there was wet snow falling from the sky. While it was snowing, some of it stayed on the grass a bit Still would not count this as snow. During the period it snowed, the temperature dropped to almost zero degrees Celcius.


Wednesday, November 20, 2024

Snow

This afternoon, it snowed again and this time stayed on the grass and on cars. I estimate that at least 1cm of snow fell. The snow that stayed did not melt away in the evening, like it did yesterday.


This months interesting links


Home | October 2024