Dutch / Nederlands
Site map

I write, therefore I am

With this variation on a famous statement by the philosopher Descartes, I would like to express that the act of writing about what happens in my life is important to me.

Friday, September 6, 2024

Amsterdam

On the way to Amsterdam, I first visted Utrecht where I went to bookshop Steven Sterk and Aleph books. In Amsterdam, I took the Metro line M52 to Rokin and walked to bookshop Scheltema. The section with ramsj books has moved to a different location on the top floor and has been reorganized, which felt like an improvement. I few floors lower, I found the book Strange Code: Esoteric Languages That Make Programming Fun Again by Ronald T. Kneusel and when I paged through the Chapter 10, which about Brainfuck, I found my name printed on page 293 with a link to my pages about it. Next, I paid a short visited to bookshop De Slegte, walked over the open air bookmarket on Het Spui, and visited the American Book Center. From there I walked to Galerie Ron Mandos to see the exhibition Best of Graduates 2024. I found the works of the following graduates noteworthy in the order I saw them:

Next, I walked to gallery andriesse & eyck to see the exhibition Colour Changes in Two and Three Dimensions 1979-2014 with works by Peter Struycken. Besides Peter Struycken, I talked with several people who I already knew. I also met with the artist Wilfried Lansink.


Thursday, September 5, 2024

Chestnut and musterd seeds

At 12:19, Conny gave my a large chestnut she just found on the street. This evening, I went to Herenboeren Usserler Es to help, with about twenty other members, to harvest the musterd seeds. We had to strip the pods with the seeds from the leaves and break open the pods. We used some sieves to seperate the seeds from the pods and bits of branches. The result needed more processing. We guessed that we had harvest about 4 kilo of musterd seeds. We were also allowed to get ourselves some buckwheat plants. They did not contain much seeds and might need some more time before they are to be harvest.


Wednesday, September 4, 2024

Hokuyo URG-04LX-UGO01 lidar

I am trying to get some data from a URG-04LX-UG01, which is a URG-04LX Scanning Laser Range Finder (Speccification that has a mirco-USB port. The scan area is a 240° semicircle with a maximum radius of 4 meter. The pitch angle is 0.36° and the sensor outputs the distance measured at 683 different angles. The laser beam diameter is less than 1 cm at 1 meter distance. I read that the angular resolution is configurable by the host. URG Series: Communication Protocol Specification.

After the usual trouble, I managed to build the hokuyoaist_example program from the gbiggs/HokuyoAIST github repository. For this you first need to install Doxygen, Sphinx, the Sphinx Breathe plugin and Flexiport: Flexible communication library. Note that the later needs to be installed (with make install) before running cmake for HokuyoAIST. When I run the program, without any arguments, it does return a lot of messages, including error messages, but I do not see anything that looks like data. On linux you can also just simply connect to it with minicom using the following command:

minicom -D /dev/ttyACM0 -b 19200
You can use the keystroke sequence 'Ctrl-A z u' to add a carriage return after each life-feed as the sensor will only return line-feed characters. Now you can enter command such as 'VV', 'PP', 'II' and 'GD0100020002' (followed by an enter) to retrieve information or data from the device. I looked into the code and I discovered a bug in the method hokuyoaist::ScanData::as_string where an unsigned integer was initialized with -1. When I changed that to 0, the program does show data. If you are given it clustring value (with the '-c' command line option) the range should be a multiple of this, otherwise an error is reported.

Tombstone diagram experiment

Today, I have been experimenting with visualizing Live-bootstrap using tombstone diagrams (or T-diagrams) where each T-shaped diagram represents on process that is executed. Below the result of this experiment, which only rather incomplete and not well aligned. It is incomplete because it only gives the initial thirdteen processes. Also I still have to add connect lines. I am thinking about calculate all the coordinates based on the positions of the elements based on the widths of the texts. I also have to think about how to list the input files. Some of processes have multiple input files, which can be a mixture of files produced by other steps and given input files. Some input files are used as input for multiple processes. The grey boxes are used to visualize the execution of processes by other process. Dragging and zooming with the mouse can be used to view the whole diagram.

This text is displayed if your browser does not support HTML5 Canvas.


Tuesday, September 3, 2024

Link

Monday, September 2, 2024

I²C for BadgerOS (Part 3)

From studying all the files, yesterday and the day before, I am still puzzled with some things. I went back to the Hackerhotel 2024 CH32V003 firmware repository and noticed that the function I2C1_EV_IRQHandler in the i2c_slave.h is nowhere called in the code. I presume that it is called from 'hidden' part of the firmware that is provided as a binary. I wanted to know if multiple I2C_STAR1_ values can be set. The code suggest that it might be the case, using multiple parallel if-statements and the bitwise-and operator. When I googled for I2C1_EV_IRQHandler, I found that it is also used in code to program microcontrollers from STMicroelectronics. There the use of chained if-else-statements seems to suggest to always at most one flag is set. (This is not particular good code design, to use bit-flags for excluding values. Maybe designed with the idea of that in the future they might occur at the same time.) So, if I understand it correctly there are two types of interactions on the I²C bus: On the I²C bus both operations start with a byte specifying the identifier of the slave peripheral and a bit-flag specifying whether it is a write or a read operation. (This is for the 7-bit address mode. For the 10-bit address mode, two bytes are used.)

The code of the function i2c_master_cmd_begin_static is not so easy to understand. One reason that is that it not only called from the function i2c_master_cmd_begin but also from the function i2c_isr_handler_default, which is the interupt handler that is called when reading, when the command is longer than the size of the FIFO hardware buffers, and/or when other events occur. The function starts with some code for dealing with a read command. The low-level function i2c_ll_read_rxfifo is used to read information from the FIFO read buffer that is filled during receiving the data over the I²C bus. For the ESP32C6 this is done by reading from a certain memory location that maps on a hardware register and which, I presume, also removes the value from the buffer. In the while-loop, the commands are processed, calling the function i2c_ll_write_cmd_reg to tell the hardware about the function to perform.

Is there anything to improve on this implementation? I wonder if instead of using a linked list for storing information about the command, where the elements are allocated one-by-one, it would be possible to use an array that is allocated on the stack or as a global variable. It states that the function i2c_master_cmd_begin only return after all the commands have been sent out (or when the specified time-out period is reached). I also guess, that when this needs to be implemented in BadgerOS, that some of the primitives, such as the locking and the event queues, that are used, need to be replaced by equivalent primitives in the kernel of BadgerOS. As the I²C bus is usually used to read out input and output devices on the badge, that the code to access those devices will need to be implemented as a service running within the kernel and that the process (that has the 'focus') will have access to those through a system call implemented by the kernel. When that is the case, the code cannot be 'blocking' in anyway and probably has to run in parallel with other code that communicates with peripheral, such as for example, WIFI. I do not have a clear picture how that should be implemented.

29.5° Celsius

The temperature at Twenthe Airport has gone up to 29.5° Celsius, which breaks the previous record of 29.2° on this date in 1991.

Link


Sunday, September 1, 2024

I²C for BadgerOS (Part 2)

Yesterday, I wrote the first part of I²C for BadgerOS. Today, I continue a bit further in understanding how it works. The functions called in the file managed_i2c.c are found in the file i2c.c of the Espressif IoT Development Framework. The functions i2c_write_reg and i2c_read_req, each build a list of 'commands' which are then executed by calling the function i2c_master_cmd_begin. This function also calls the function i2c_master_cmd_begin_static for sending the commands to the hardware calling various i2c_ll_ functions, which are platform specific. For the ESP32-C6 these are found in the file hal/esp32c6/include/hal/i2c_ll.h. The letters hal stands for hardware abstraction layer. I guess that the letters ll stand for low-level.


Saturday, August 31, 2024

Tiny chestnut

This afternoon, while walking around the neighbourhood, Conny gave me a tiny chestnut she had found on the road.

I²C for BadgerOS

I²C is a serial communication bus that is often used for allowing microcontrollers to communicated one or more peripherals. The bus makes use of two active wires and a ground wire. One active wire is used for data communication and the other for a clock signal. Usually the microcontroller acts as a master, generating the clock signal, and the peripherals acts as slaves. BadgerOS is an operating system being developed by Badge.Team for the various badge that are developed for various hacker camps and conferences, such as WHY2025 that will be held next year August. I have recently joined the Badge.Team and am going to look into the support for I²C in BadgerOS.

The Hackerhotel 2024 badge uses I²C in the communication between the ESP32-C6 microcontroller and the CH32V003 peripheral that is used to read out the five switches and control the LEDs. The code for the firmware can be found in the Hackerhotel 2024 CH32V003 firmware repository. I have studied the code in this repository. Some details about the protocol that is being used for the communication (over the I²C bus) for communication with the microcontroller is found in the function I2C1_EV_IRQHandler in the i2c_slave.h file. The firmware for the microcontroller, an ESP32-C6, of the Hackerhotel 2024 badge can be found in the repository hackerhotel-2024-firmware-esp32c6 repository. In the function coprocessor_intr_task a call of the function i2c_read_req is used to retrieve the states of the five buttons. The first arguments specifies the number of the bus (needed in case the microcontroller has multiple I²C communication busses). The second argument specifies the unique identification of the slave peripheral, which is hexadecimal 42, refering to The Answer to the Ultimate Question of Life, the Universe, and Everything is 42. The third argument is the register number that should be read. The fourth argument is a pointer to the byte array where the data should be stored and the last arguments is the size of that are and the number of registers that should be read. The function is defined in the file managed_i2c.c, which contains some more i2c_read and i2c_write functions. Only one of the write functions, the function i2c_write_reg is called in the code. One such place is the in the function bsp_set_leds in the file bsp.c. The functions in the file managed_i2c.c are implemented with Espressif library for I²C.


Friday, August 30, 2024

Nedko Solakov: Leftovers

Since last Tuesday, I have been reading in the exhibition catalogue Nedko Solakov: LEFTOVERS that I bought May 1, which is about a collection of unsold pieces from the private galleries Nedko Solakov work with. I initially bought the book because it has lots of numbers and letters on the cover. Now I understand that these are just consecutive ranges of numbers with some letter attachted, where the letters refer to earlier exhibitions from which the works were leftover, e.g., not sold. I read most of the introductions to the various exhibitions. Some pages contain reproductions of pencil written remarks by Solakov. This is a bit similar to how at one exhibition at Módulo Centro Difusor de Arte he made drawings and writings on the walls of the exhibition rooms got more attention that the works at display. Several collectors bought piece of plaster with those drawings and writings.


Wednesday, August 28, 2024

Drents Museum

Conny and I went to Drents Museum. We first visited the exhibitions Dacia - Empire of gold and silver, which shows more than fifthy gold and silver treasures and many more small rings and coins from Dacia from the stone age (3rd century AD) till about the roman conquest in 106 AD. After this we visited the exhibition: Figures of speech with the following sculptures:

Next we saw the exhibition Christine and Janus van Zeegen: Innovators in thread and paint. I found the following works noteworhty:

In the enterance hall, where there is also bookshop, there was a memorial of Matthijs Röling who died on July 10 with four of his works:


Monday, August 26, 2024

Programming language design

In the past week, I continued working on the stack based language as part of the attempt to replace the MES-compiler of live-bootstrap. I have worked on translating the C preprocessor (written in C++) to a program in the stack language. I made some improvements to the stack language to make the programs look more similar to the program in C++. I discovered that bugs are easily introduced when doing the manual translation and that debugging those bugs is not easy. I use objdump to disassemble the code, compare this with the file produced by the compiler for the stack-based language to match this to the program. I have thought about a program to optimize this process, but so far did not do any work on that. I did think about the language design. For example, in most language when a variable is used in an expression, it is interpretted as taking the contents of that variable and not the memory address of where the variable is located in memory. The C programming language has an operator, a single ampersant ('&'), to indicate that the address of a variable should be used. In the stack language, it is the opposite, you have to explicitly use an operator, the question mark, to retrieve the contents of the variable, instead of using the address. Note that in a language like C when a variable is mentioned as a target for an assignment (on the right-hand side) the address of that variable is to be used as the target for the assignment, not its contents. So, if in the stack language, I would want to avoid the very frequent use of the retrieve operator, the compiler would have to perform some analyses about what comes next. And I would like to keep the compiler as simple as possible. This having to make every operation explicit also makes you even more realize what is going on under the hood. Another thing that I have been thinking about is the constants that are defined for accessing fields/members of a record ('struct' in C). These constants are specific for a certain struct type, but because the constants are global, this means that a prefix is needed in case several records have the same field names, which could be placed at a different offset from the start of the record. The stack language now has, because it is rather simple, certain limits that make it impossible to define 'local' constants for this. I did think about some ways to improve on this, without making the implementation a lot more complex. I have not made any changes with respect to this. While tranalating the C++ program to the stack language, I realized that I could try to automate it and realized that the stack language would be a good target language. This made me decide to switch to developing the preprocessor again.


Wednesday, August 21, 2024

Link


Monday, August 19, 2024

'hello world!'

I have been working on a compiler for a small stack based language for the purpose of writing a compiler to replace the MES-compiler of live-bootstrap. This compiler is based on the suggested solution I proposed a week ago. This evening, I succeeded in compiling the program below that prints the text 'hello world!'. The language uses a Reverse Polish Notation for expressions. It allows the definition of functions (with the keyword func), has loops (with the keyword loop and ways to escape it with the keyword break and repeat it at any point with the keyword continue), a choice statement (with the keywords then and else), and definition of local variables (with the keyword var). The program below defines the function fhputs to print a string. The function makes uses of the build-in function sys_fputc that prints a single character to a give destination specified with an integer. In this case the integer '1' is used to reference the standard output. A function is called with '()'. The value that the function sys_fputc returns needs to be deposed with using pop. The program contains the function main, which is the main function that is called when executing the program. It simply call the function fhputs

func fhputs
{
    var s s =
    loop
    {
        s ? ?1 0 == then { break }
        s ? ?1 1 sys_fputc () pop
        s ? 1 + s =
    }
    ret
}

func main
{
    "hello world!" fhputs ()
    ret
}

The compiler is a single pass compiler with minimal storage. It keeps a stack oriented symbol table and a stack for the statement nesting. There is an almost one to one translation to 'machine code' in the format that is excepted by the M1 compiler of stage0-posix that is part of live-bootstrap. The language and the compiler are rather primitive and do not prevent many kinds of errors. The first version of the compiler, which is very much work-in-progress and contains some known bugs, can be found in the commit 590e5315. This commit contains the batch-file build_stack_hello that contains all the calls to compile the hello.sl program and to run it. A number of intermediate files are produced including the file hellosl.txt that is produced by calling objdump.

I am still thinking about how to continue from this point. One thing would be to write the compiler in the language itself. I think this is possible, but I think I first want to develop the C++ version further, before I start doing this.


Saturday, August 17, 2024

Yellow from Bloemendaal

In the harvest from Herenboeren Usseler Es we were given two large paksoi and also two heads (large and small) of "Bloemendaalse Gele" (which translates to "Yellow from Bloemendaal"), an old variety that is somewhere between pointed cabbage and savoy cabbage. It is quite possible that some of my ancestors, who were vegetable growers, also grew it and possibly even cultivated it. In addition (depending on personal choices where possible) I came home with: a spaghetti squash, seven red onions, two leeks, two gherkins, one cucumber, three courgettes, a fennel, a broccoli and two heads of lettuce (with red edge). From the things we were allowed to harvest ourself from the beds, I took some basil and some rocket. We were also asked to help harvest potatoes, but that did not happen. The ground was too wet. I heard someone say that 2 cm of rain fell last night. That could well be because I heard it rain last night.

Meesterwerken

This afternoon, I visited the exhibition 'Meesterwerken' at Fotogalerie Objektief with photographs from ten students from the photographers course at the secondary vocational education instituion 'ROC van Twente'. I liked the photographs by the following students:


Thursday, August 15, 2024

Links


Tuesday, August 13, 2024

Kraftwerk: Future Music from Germany

I finished reading the book Kraftwerk: Future Music from Germany by Uwe Schütte that I started reading on June 28 while traveling in the train. I bought the book earlier this year on January 19. The book is about the German electronic music band Kraftwerk. I had somehow hoped that the book would tell something about the equipment that they had used, but there was little information about it. It was primarily about the cultural context in which the band operated and the impact it had. I only knew about Kraftwerk for some of the hits they had in the seventies and the eighties. It was interesting to read what happened with the band in the following years and also understand something about the cultural context of the band.

33.6° Celsius

The temperature at Twenthe Airport has gone up to 33.6° Celsius, which breaks the previous record of 32.7° on this date in 1953. Today, the humidity was rather high. It is long ago that I have felt such a combination of high temperature and high humidity. For dinner, we had curly kail hotchpotch with spice mixture, gherkins and sausage, which is a typical winter dish, but we had gotten some more curly kail in the harvest last Saturday. At the start of the evening, there were was thunder storms around us, causing the temperature between 19:20 and 20:00 to drop about ten degrees. We did just a little rain. At 20:25, we saw a small, but rather bright segment of a rainbow. Below a picture, I took of this small fragment


Monday, August 12, 2024

Two stack implementation

I have been thinking about a two stack implementation of the stack language I was talking about last Friday. The idea is to use the 'normal' stack for stack oriented operations and have another stack for storing local variables and the return address. On the i386 the normal stack is stored in the esp register and has dedicated instruction, push and pop, to work with this stack. To prevent a lot of push followed by a pop the eax register will be used to store the top element of the stack. Furthermore, the idea is to store the local variables on another stack and use the ebp (Base Pointer) stack for this. It is important to note that the call instruction pushes the contents of the eip (Instruction Pointer) on the stack and that the ret (return) instruction jumps to the address stored on the stack. As this interfers with the idea that the stack only contains values to operate on, the address could be stored on the second stack. Before calling a function, the ebp register has to be incremented with the current number of bytes that have been used for local variables and the return address and afterwards it needs to be decremented with the same value. The code for calling a function (using the GNU Assembler syntax), where the start address is stored in the eax register and n stands for the size used for the second stack, then becomes:

    add ebp, n
    call [aex]
    sub ebp, n
Now, at the start of the function being called, the return address is stored at the first location of the second stack, using the instructions:
    pop eax
    mov [ebp], eax
    pop eax
Where the second pop instruction is used to pop the address of the function that was called. The instructione to exit a function and continue the execution of the previous function now becomes:
    mov ebx, [ebp]
    push ebx
    ret
This might look rather a lot of instructions, but actually it is not so much more than tradition method for implementing function calls.


Friday, August 9, 2024

A stack-oriented language

Since the last time, I reported about M2-Mesoplanet, I did find the bug that I was struggling with, but soon, I encountered another bug. Then I spend some time working on the cubes from sheet problem. In the past days, I spend some time looking at the first stage, stage0-posix, of live-bootstrap with respect to the four supported CPU. I did write a shell script, run_chroot_AMD64, to execute the AMD64 variant and analysed the the strace output. Yesterday, I spend some time reading the code of cc_x86.M1 and taking notes. I also started thinking about a minimal language that can be easily compiled to the M1 format. I was thinking about a stack-oriented language. I had to think about the thesis Lawine, an experiment in language en machine design by Sjoerd Doaitse Swierstra in which a machine design with multiple stacks is described. I was thinking about a design with three stacks: The normal stack used for function calls, a stack for values that are being processed and/or passed to function calls, and a stack with values of local variables defined in the functions. In the machine code generated when compiling C these stacks are intermixed, which requires some additional administration and taking care that they are not mixed up. This approach is actually one of the reasons for allowing execution through buffer overflows. This stack-oriented language will be a similar to Forth but with local variables making programming easier. I am not sure yet, whether it will also incorporate structured control statements for choice and loops. I think, I will first try to write C++ program to compile the input to a file in the M1 format, and if that works out, see if I can implement it in the language itself.


Wednesday, August 7, 2024

Arabic Typography: History and Practice

I finished reading the book Arabic Typography: History and Practice with Titus Nemeth as editor and author, which I started reading on April 26 after I received it on April 4. I already wrote something about reading this book on May 6. I did enjoy reading the book. It is a bit more about typography than about Arabic typeface design, as I had hoped. I do like the typography of the book with it use of yellow. I think that at the start of the book in an introduction, there should have been some pointer to advice people who are not yet familiar with Arabic script to first read the last chapter of the book titled: Foundations of Arabic typography. I did know that Arabic letters have different forms depending whether they appear at the start, the end, or in the middle of a word or when they appear isolated. But I did not know that the character bā' (ب) when followed by other letters, may assume up to 24 different initial forms as shown in figure 5 op page 322. This shows some of the complexities of the Arabic script. I also understand from this chapter that the software support for Arabic typography is still rather limited. One of the reasons is that text justification for Arabic text uses different techniques that even depend on the type that is being used. A lot is probably related to the fact that Arabic has a much richer history with respect to calligraphy than the Latin script. I also get the impression that the Arabic script has been used for very different languages with local traditions. Some of the chapters of the book are rather academic in the sense that they are the product of academic research into historic developments. Definitely interesting to read.


Tuesday, August 6, 2024

Link


Monday, August 5, 2024

Preventing care fraud

Today, the Dutch investigative journalism organization 'Follow the Money' reported (Article in Dutch) that in the Netherlands the fraud with healthcare money is about 10 billion per year. The article reports that the main perpetrators use front men to stay out of the picture themselves. The front men go to the Chamber of Commerce and start a new healthcare company without any problem, which then starts to invoice. I presume that these invoices contain fake data for care that never has been delivered. I do think, using digital certificates, and maybe some app, it is possible to prevent these fake invoices. I think it is possible to create an app for a smart phone with GPS and NFC to verify that at a certain time an ID-card has been scanned at a certain location. The Dutch company Inverdi has developed the ReadID ME app with which it is possible to verify a chipped identity document. The company TrueScreen has developed technology to certify a GPS location with time, I presume. I am really surpised that this kind of technology has not already been implemented and/or enforced by out government. I think that one of the biggest problems is that the national government itself does not have ICT specialist who could support the government with implementing these kind of anti-fraud measurements. In the past decades a lot of essential ICT knowledge has been outsourced to companies under the guise of privatization. I think it is okay of companies are used to implement and service ICT systems. But the specification and risk assement should be done by independent specialist working for the government. For example, recently it was discovered that more and more government organization were outsourcing ICT to cloud based solution owned by foreign countries, not realizing that cloud services by US companies, no matter where they are located, still fall under US laws, and give the US government full access to the stored data in case it wants to. It seemed that those Dutch government organization were not aware of the implications of this and that they might even violated national and European laws with respect to privacy and security legalislation.

Improving on using tiles

In the past days, I have been working on improving the program for the cubes from a sheet problem that is based on using tiles. The program was generating lots of encodings between columns that never occured in some sequence from wall to wall. The idea is to find a simple way to rule out those encodings. Each encoding between two columns of tiles consist of encodings for connecting two tiles at each height. The idea is to look at the two of those encoding directly above each other and see if there is a continuation for them. For that I took some code from the bricks.cpp program I posted on July 7. This resulted in the program CubesFromSheet3.cpp This did result in some improvement, however it did not get me much further. Calculating all results for a height of seven tiles, took some considerable time. In the table below for each height it gives: the number of different encodings between the columns, the number of different columns that are possible and the number of encodings that actually occure in some sequence from wall to wall.

2      11       17     11
3      66      158     53
4     473     1561    357
5    3194    14704   2193
6   21603   138949  13889
7  145910  1311680  87361


Thursday, August 1, 2024

Exhibitions

In the afternoon, I went into the city. At Concordia, I saw some exhibitions. I went there to see the exibition Triangle in Square by Wineke Gartz. She creates site-specific installations. I found it quite interesting how she transformed the second floor of the building using some projectors and clothes hanging from the ceiling together with some other attributes. Downstairs, I discovered that I only saw part of the exhibition Kunstblikken when I went to see it on July 17. At that time, I only visited the room in the front and did not realize that the exhibition on the rest of the floor. On the ground floor there were also some 'tree houses' constructed by Tessa Hendriks with the help of Yonatan, Nakom, Humd and Fnot.

Link


Wednesday, July 31, 2024

Using tiles

Since Sunday, I worked on a program based on tiles for the cubes from a sheet problem. The idea is to use one tile for each square on the sheet that is used for a side of a cube. It took me some time to figure out the right encoding for the sides of the tiles and some time to generate all possible tiles correctly. The program CubesFromSheet2.cpp generates a set of 140 tiles and with these generate sequences of columns of a given height. The number of possible encoding and the number of possible columns of tiles grows rather quick (as was to be expected). The number of possible encodings that can occur in a sequence from a wall to a wall is much lower. In the table below for each height it gives: the number of different encodings between the columns, the number of different columns that are possible and the number of encodings that actually occure in some sequence from wall to wall.

2      34      46     11
3     269     471     53
4    2148    4946    357
5   17170   51680   2193
6  137179  540345  13889

There might be a way to only generate only the encodings that can occur in sequences from wall to wall. But even those numbers might be growing to quickly to be usefull for finding more solutions.


Tuesday, July 30, 2024

Link


Monday, July 29, 2024

Link


Saturday, July 27, 2024

Cubes from a sheet

In the past week, I have been working on a program for calculating the number of cubes that can be made out of a rectangle sheet for certain dimensions. There are eleven ways to flatten a cube. I mentioned this already on Sunday, July 7 when discussing the number of ways a cuboid with all different dimensions can be flattened. I started thinking about the maximum number of unit cubes one could unflatten from a rectangle sheet of size n and m where n and m are whole numbers. There is a maximum number of cubes based on the fact that a unit cube covers six unit squares. For given n and m the number can never be larger than n×m/6 (rounded down). It is also clear that the number is at least as large as for the maximum numbers for each possible the rectangle can be divided into two smaller rectangles. Looking at the results, it looks like that area not covered is at most twelve. It can be proven for when one side is at most seven. The way this can be shown is that an existing solution can be extended with some flattenings that fit nicely together. There are three of these for which it is the case as is illustrated below:

   +--+--+--+--+--+--+
   |        |        |
   +-----+  +--+--+  +--+--+        +--+--+--+--+--+--+
         |        |        |        |  |     |  |     |
         +--+--+--+--+--+--+        +  +--+  +  +--+  +
                                    |     |  |     |  |
      +--+--+--+--+                 +--+  +  +--+  +  +--+
      |     |     |                    |  |     |  |     |
      +--+  +--+  +--+                 +  +--+  +  +--+  +
         |     |     |                 |     |  |     |  |
         +--+  +--+  +--+              +-----+--+--+--+--+
            |     |     |
            +--+--+--+--+

For two of them, the repeat width is three and for one of them it is two. In case the occur together (stacked on top of each other), this leads to a repeat width of six with two copies of the ones that are three wide and three copies of the one that is two wide. Note that the one on the right can occur in two different ways when taking one flattening from the left and place it on the other side. It is possible that there are other patterns with a combination of flattenings that can be combined in a similar repeating pattern. The program produces two output files: CubesFromSheet.txt and CubesFromSheetResults.txt. The first file contains solutions like
Search all folds for 5, 8
8,5: 5(6 +5)
+--+--+--+--+--+--+--+--+
$        |        |## ##|
+--+--+  +--+--+  +--+--+
|     $        |        |
+--+  +--+--+--+--+--+--+
|  |        $     |## ##|
+  +--+--+  +--+  +--+  +
|        |  |##$     |##|
+--+--+  +--+  +--+  +--+
|## ##|     |## ##$     |
+--+--+--+--+--+--+--+--+
Which gives a solution for placing five cube flattenings in a eight by five rectangle. The dollar characters also show line along which the pattern can be extended, making it wider in steps of six and adding five more flattenings. The other file contains a table of all the maximum values found so far or based on combinations of rectangles. It also contains a list of all the values and how they were calculated.

Link


Friday, July 26, 2024

Links


Monday, July 22, 2024

High water levels

During our walk we saw that there were high water levels in a canal called Usserlerstroom, higher than we ever remembered seeing. We decided to follow the canal, that about a year ago, had almost dried up, and at one stretch had to make a detour because the bank of the canal was flooded. Below a picture illustrating the speed at which the water flowed. The primary reason for the high water level is that yesterday he had about 7 cm of rain in our area and across the border in Germany. This cause flooding in several places including on the A1 motorway near the border crossing. Several cars got stuck on the motorway. The Usselerstoom runs from the brook called Hegebeek to upper section in Enschede of the Twentekanaal. It was constructed to feed the canal because it is nine meters higher than the next section. The lock in Hengelo, with a drop of nine meters, requires 15,120 m³ water each time it is used. For that reason there is also a pumping station besides the lock.


Saturday, July 20, 2024

Nine ergodic literatue book

I watched the video you've never seen books like these before! (9 ergodic literature books) by Melanie. In the comments it lists the nine books with only links to Amazon. Below the books are mentioned with some more informative links. Four of these books, I already mentioned on May 12. Ergodic literature is a term coined by Espen J. Aarseth in his 1997 book Cybertext - Perspectives on Ergodic Literature.

Purple cauliflower

The past week I regularly ate the fruits of the Japanese wineberry that grows in our backyard. That plant, like so many other plants in our backyard, just appeared one day. It was only today that we found out that it is a Japanese wineberry.

Today I also picked up the harvest of this week from Herenboeren Usseler Es. It was mainly leeks and onions (red and yellow) that we got. But also: a purple cauliflower, a gherkin, a (very nice) zucchini, spring onion and a large head of lettuce with reddish tops. (Last Tuesday evening I was still busy removing the weeds from the bed from which the lettuce was harvested.) Also harvested some coriander and rocket in the field. The rocket started having flowers. For dinner, Conny stir-fried the purple cauliflower with some union and leek.


Wednesday, July 17, 2024

Links


Monday, July 15, 2024

Links


Saturday, July 13, 2024

Side notes

In a book you can have footnotes at the bottom of the page, but when you want to convert a book to a webpage you can convert these to side notes. I found several solutions presented on the page Sidenotes In Web Design, but I did not find a solution after my liking. I was more thinking about a solution where the column with the side notes would be moving more dynamically when you were scrolling the main text. I spend some time implementing a solution, which can be found at this page, which uses some random text generated with the Random Text Generator. It also uses a little bit of JavaScript that scans the contents of the page for certain identifiers (in id elements attributes) for it operation.


Friday, July 12, 2024

AKI Finals again

This afternoon, I went to see the AKI Finals exhibition for a second time. The second time you always notice things you had not noticed before. Below a list of the students whose work I found noteworthy to mention for this second visit, in the order, I encountered them.

M2-Mesoplanet

In the past weeks, I have been trying to implement a C preprocessor using iterators that can be compiled with the M2-Mesoplanet compiler of Live-bootstrap. I first made a (partial) implementation that compiled with the gcc compiler. Because M2-Mesoplanet does not have a cast operator (because it does no checks of assignments between different types), you have to give it some options to surpress errors. It still produces a lot warnings. Next, I tried to compile it with M2-Mesoplanet. I found some bug/limitations. Such as that in 'case' statements defines are not expanded. So, I replaced those with if statements because in expressions they are expanded. Also assigning string contents to an element of an array of pointers to character, does not work. It looks like the pointer is truncated to a byte. So, I had to replace such a table to a bunch of if-statements. But then it produced a strange runtime error, a 'Segmentation fault', at a location that already had visited several times before. I tried the i386 Emulator and (after I made some small changes) produced the exact same error at the same location using the command:
../Emulator/Emulator -gen 1 -trace ./ tcc_cc
This shows that the runtime error is due to a return address (on the stack) being overwritten with an incorrect value. I have not yet figured out the cause of this. I did commit the current state to MES-replacement repository. This could be related to another limitation (bug) of M2-Mesoplanet. I have been wondering if I should maybe work on improving M2-Mesoplanet before I continue working on the preprocessor.


Monday, July 8, 2024

Displaying brick flattenings

I wrote some code to visualize all 54 brick (with ratios 20 : 10 : 5) flattening, which I calculated yesterday.

This text is displayed if your browser does not support HTML5 Canvas.

Curly kale

We had curly kale because we got it last Saturday from the harvest of Herenboeren Usseler Es. It is a bit of a strange time to have curly kale because it is still considered as a winter vegetable. Unlike the winter kale leaves, the young summer leaves are tender and can be eaten raw. However, some people say that it tastes best when it had been frosted and they just put it in the freezer. They say it is also easier to process it when it is frozen. Yesterday, I already used a bit in a curry dish. Today we used the rest. Conny added some of a herb mix that she usually uses. We at it as a hotchpotch with pieces of fried pork. Conny also served it with sausage with cloves.


Sunday, July 7, 2024

Introduction

Diaries
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
2024
2023
2022
-- contact --

Family

Frans
Conny
Annabel
Andy
Li-Xia
Others
Pictures

Collecting

Books
Maps
Bookshelves
Art works
Computers
Cameras
Trips
Flights
Weddings
Funerals
Reading
Movies
Useless lists

Hacking

My life as a hacker
Signature programs
Software enginering
The Art of Programming
HTML to LaTeX
JavaScript
eXtreme Programming
Programs
Pluim

Puzzles

Hamilton cycles
cutting sticks
Califlower fractal
more...


SARS-CoV-2

Tracking
Trends
Prediction
nextstrain.org/ncov



Email

The email address below, may only be used for private communications. This email address may not be put on any mailing list. I do not want to receive emails with advertisements of any kind. My email address is:

Privacy statement

This is a static website with no contact form and no way to add comments. It has no advertisements and no trackers. It does not use cookies. I am not using any method to analyse traffic to this website nor keeping any logs. I am not collecting personal data besides what is published on this website. If you want me to remove any personal data (including your name or link to your website), please contact me by above email address and I will make all effort to remove the data as soon as possible. I am private person and this website does not serve any economic purpose. All cost for maintenance are paid by myself. I do not receive any payments. The website is ad-free and does not have sponsored links.

Site statistics

If I did not count wrong, this site consists of 1063 HTML-files with a total size of 38,927,589 characters, having 82,429 internal links and 17,765 external links to (more than) 5,228 websites. (At least 797 of the external links are broken.) Furthermore, it contains 244 C/C++ program files with a total size of 5,822,172 characters, 11 MySample scripts with a total size of 85,207 characters, 3 PASCAL program files with a total size of 35,259 characters. and 2 Python program files with a total size of 3,764 characters. There are 70 text files with a total size of 753,471 characters. With respect to images, this site containts 1352 JPEG images (total size 61,834,825 bytes), 146 GIF images (total size 3,765,046 bytes), 95 PNG images (total size 2,302,310 bytes), and 2 BMP images (total size 3,727 bytes). With respect to sounds, it contains 14 WAV files with a total size of 389,002 bytes and 2 MP3 files with a total size of 8,717,982 bytes. It also contains 43 PostScript files (total size 308,387 bytes), 2 LaTeX files (total size 132,020 characters), 14 PDF files (total size 16,211,832 characters), 22 zip files (total size 2,487,335 bytes), 3 gzipped tar files (total size 52,345 bytes), 45 SGF files with a total size of 85,019 bytes, 168 KML files with a total size of 6,481,055 bytes, 1 bundle files with a total size of 99,918 bytes, and 2 EXE files with a total size of 38,340 bytes. It also uses 19 JavaScript files with a total size of 1,258,617 bytes, This leads to a total size of 153,168,930 bytes.

Copyright

Creative Commons License

I, Frans hold the copyrights of this and all other pages on this website. For this website a Creative Commons License is applicable. You may not use this work for commercial purposes. I consider all computer programs to be copyrighted by me under the GNU General Public License, unless stated explicitly otherwise. All quotes (text and program fragments) from other sources are excluded from this, and should be considered as copyrighted by their authors.