Wednesday, 1 February 2023

ChatGPT

I thought I'd test of ChatGPT's capabilities by asking it to generate a short story based on my own input. I asked it to do the following:

Write a short story, about 500 words, about two friends meeting accidentally on a city street after not seeing each other for many years. The story should describe their reactions to their changed physical appearance and emotions associated with connecting again after such a long time.

Here is what it came up with:

As she walked down the busy city street, Maria couldn't help but feel a sense of nostalgia wash over her. She hadn't seen her old friend Jake in years, not since they graduated college and went their separate ways. Maria had always wondered what had become of Jake, and she couldn't believe her luck when she spotted him walking towards her from across the street.

At first, Maria wasn't sure it was him. The young man approaching her had a full beard and wore a suit, looking nothing like the scruffy, carefree college student she remembered. But as he got closer, Maria recognized the mischievous twinkle in his eye and the friendly smile that had always lit up his face.

"Jake!" Maria exclaimed, rushing towards him and throwing her arms around him in a hug.

Jake's eyes widened in surprise as he hugged Maria back. "Maria! I can't believe it's you! What are you doing here?"

Maria laughed and stepped back, taking a good look at Jake. "I could ask you the same thing! You look so different!"

Jake chuckled and ran a hand through his beard. "Well, a lot has changed since college. I got a job in finance and moved to the city. How about you?"

Maria told Jake about her job as a teacher and how she had married her high school sweetheart. As they caught up on all the years they had lost, Maria couldn't believe how much they had both changed. But as she looked at Jake, she realized that some things never change. He was still the same kind, compassionate person she had always known, and she was grateful to have reconnected with him.

As they parted ways, Jake promised to stay in touch and the two friends made plans to meet up again soon. As she walked away, Maria couldn't help but feel a warm glow in her heart. It was amazing how one chance encounter could bring old friends back together, and she couldn't wait to see what the future held for her and Jake.

This, I think, is rather impressive. Earlier, I had asked it "what is meant by a zero sum outcome?" and this was the response:

A zero sum outcome is a situation in which one person's gain is exactly balanced by the loss of another person. In other words, the total amount of resources available is fixed, and any gain by one person must be offset by an equal loss by another person.

For example, in a game of chess, each player starts with 16 pieces, and the total number of pieces does not change throughout the game. If one player captures one of the opponent's pieces, they have gained a piece, but the opponent has lost a piece. The total number of pieces remains the same, so the gain of one player is balanced by the loss of the other player.

In economic terms, a zero sum outcome is often used to describe situations in which the total wealth or resources available are fixed, and any gain by one person must be offset by a corresponding loss by another person. For example, if one person earns more money, they may have gained a larger share of the total wealth, but someone else must have lost a corresponding amount.

Overall, a zero sum outcome is a situation in which the total amount of resources remains constant, and any gain by one person must be balanced by an equal loss by another person.

Here's an interesting question that I put to it together with its quite reasonable response:

What do a black hole and a bottomless pit have in common?

A black hole and a bottomless pit both have the property of being extremely deep and seemingly without a bottom. They both also have a strong gravitational force that can draw objects towards them. However, there are some key differences between black holes and bottomless pits.

Black holes are regions in space where the gravitational force is so strong that nothing, not even light, can escape from them. They are formed when a massive star collapses at the end of its life, and they can have a wide range of masses, from a few times the mass of the Sun to millions or billions of times the mass of the Sun.

A bottomless pit, on the other hand, is a hypothetical concept often used in literature and folklore to describe an extremely deep hole or chasm that has no end. It is not a physical object that exists in the real world.

One other important difference between black holes and bottomless pits is that black holes have been extensively studied and their existence has been confirmed through scientific observations, while bottomless pits are purely fictional and do not actually exist. 

Here's another similar type of question along with the response:

What is the difference between an interdimensional portal and a wormhole?

An interdimensional portal is a hypothetical concept that refers to a hypothetical opening or gateway between different dimensions or universes. The idea of interdimensional portals is often used in science fiction and fantasy literature and media as a way to explain how characters can travel between different dimensions or universes.

A wormhole, on the other hand, is a hypothetical tunnel-like structure that could potentially connect two distant points in space-time. The concept of a wormhole is based on the idea that space-time is not a flat, two-dimensional surface, but rather a three-dimensional fabric that can be bent and stretched. According to this idea, it might be possible to create a shortcut through space-time by creating a tunnel-like structure, or wormhole, that would allow an object or a person to travel from one point in space to another point much more quickly than would be possible using normal means of travel.

While both interdimensional portals and wormholes are hypothetical concepts, wormholes are considered to be a more scientifically credible idea than interdimensional portals, as they are based on established principles of physics, such as the idea of space-time being a three-dimensional fabric. However, it is important to note that the existence of wormholes has not yet been conclusively proven, and they remain a subject of theoretical study in physics.

The level of English is excellent and the explanations clear and concise. ChatGPT will readily provide references for further study.

Could you provide some references that might help with additional investigation of interdimensional portals and wormholes?

Certainly! Here are a few references that might be helpful for further investigation of interdimensional portals and wormholes:For information on interdimensional portals, you might want to check out the following resources:

The Wikipedia page on interdimensional portals (https://en.wikipedia.org/wiki/Interdimensional_portal) provides an overview of the concept of interdimensional portals and how they have been used in science fiction and fantasy literature and media.

The TV Tropes page on interdimensional portals (https://tvtropes.org/pmwiki/pmwiki.php/Main/InterdimensionalPortal) provides examples of interdimensional portals in various media, including literature, television, and film.

The SF Encyclopedia entry on interdimensional portals (http://www.sf-encyclopedia.com/entry/interdimensional_portal) provides a more detailed look at the concept of interdimensional portals and how they have been used in science fiction.For information on wormholes, you might want to check out the following resources:

The Wikipedia page on wormholes (https://en.wikipedia.org/wiki/Wormhole) provides a detailed description of the concept of wormholes, including the history of the idea, the theoretical basis for their existence, and the current state of research on this topic.

The Physics Classroom (https://www.physicsclassroom.com/class/relativity/Lesson-4/Wormholes) provides a more in-depth look at the physics of wormholes and how they might potentially be used for space travel.

The British Society for the Philosophy of Science's page on wormholes (https://www.bsps.org.uk/resources/wormholes.html) provides a philosophical perspective on the concept of wormholes and the implications of their potential existence.

I hope these resources are helpful! If you have any further questions, don't hesitate to ask.

Friday, 18 November 2022

Laptop Connectivity Problems

A problem that I encounter almost daily on my 2013 MacBook Pro is a connectivity issue. Whether I'm connected wirelessly or wired via an Ethernet cable from a repeater, I lose the connection and am repeatedly prompted for the password to the WiFi network if I'm connected wirelessly. After a short while the problem goes away and all is well. The problem is annoying but doesn't seriously trouble me.

Nonetheless, I'd like to get to the bottom of it and there are plenty of requests on Internet forums from Linux Mint users for solutions to exactly this problem. The fact that it doesn't make any difference whether I'm connected via WiFi or cable rules out the WiFi hardware driver as the problem. Neither does it matter whether I'm connected to the WiFi repeater or the WiFi router.

The Internet router that I'm using is an ancient one and only operates on the 2.4 Ghz frequency with no support for 5 Ghz or any other frequencies! I don't use Bluetooth on this laptop so I've just now turned it off and I'll see if that makes any difference. It shouldn't but who knows. It's worth a try. Overall, I should be happy that things are working as well as they are given the antiquity of the technology that I'm using.

The operating system that I'm using is Linux Mint 20.3 Cinnamon with the Cinnamon version being 5.2.7. This means that the system is up-to-date. My WiFi adapter is shown in Figure 1.


Figure 1

I'd like to say that things worked flawlessly when I had Mac OS X installed on this laptop but that wasn't the case. Right from the beginning I had IP conflict alerts whenever connected to a repeater. I first encountered the issue when I stayed at a hotel in Singapore that was clearly using a repeater. In my own bedroom, where the WiFi signal was weak, I encountered the same problem when I installed a repeater. I solved the problem by connecting an Ethernet cable from the repeater to my laptop.

Thursday, 3 November 2022

Thoughts on Backing Up My Calibre Library

I thought it was time to back up my Calibre library that now is 39.8 GB in size and so I dusted off my trusty 128 GB SanDisk and thrust it into the USB 3.0 port on my old 2013 MacBook Pro. From previous experience I knew that this would be a slow process but today I got to thinking about how slow. Figure 1 shows the situation.

Figure 1

The USB 3.0 ports on the MacBook Pro can transfer data at the rate of up to 5Gbps. Now that's 5 gigabits per second. There are 8 bits in a byte and 1024 x 1024 bytes in a megabyte (MB) so that translates to a transfer speed of up to 640 MB/s.  For my file transfers I'm achieving a rate of around 4 MB/s which is 160 times slower than the maximum possible! This seems impossibly slow.

However, if we look online we find the following (see Figure 2):

Figure 2

Even SanDisk only claims a speed of up to 100 MB/s for this particular device and  presumably this is for reading of data and not writing. Furthermore, the thumb drive spends more time checking that writing and so if there are many small files (and I am transferring 34,646 of them), the transfer time will be very much longer than if I were transferring a single 39.8 MB file.

On this particular site, it's claimed that 3.0 USB has a 10~20 MB/s write speed and if that's the case then the 4 MB/s for my worst case scenario (thousands of small files) is not unreasonable. Overall it's not a problem for me because I'm in no hurry and I only carry out the backup every couple of months or so.

I'm also merging the latest library with the older one and this probably adds to the checking time as the new folder (every book has its own folder) has to be compared to the older one. It would probably be quicker just to delete the old library and simply copy the new one across.

An alternative approach would be to make a note of any new books added and then drop their folders into the library backup from time to time. On reflection this makes the most sense and the update would then be almost instantaneous given the small file sizes involved. The current library on my MacBook's SSD and the library backup on my SanDisk will be identical once the transfer is complete. This would be a good time to implement such a scheme. I'll test it out and report back.

Even if I don't make a formal note of my added books, it's easy to identify them by looking at the current library (arranged in chronological order) and noting the dates of books that are newer than the time of my last backup. This could be painful if I let too much time elapse before checking because I will have to locate each book's folder in the database and then copy and paste it across. For a few books it's no problem.

ADDENDUM: November 4th 2020

I've tested the folder copying update method out and it works fine. Quick and painless. Definitely the way to go in future. I downloaded Walter Rodney's "How Europe Underdeveloped Africa" after a recommendation by Jeremy Corbyn shown in this tweet.

The classic work of political, economic, and historical analysis, powerfully introduced by Angela DavisIn his short life, the Guyanese intellectual Walter Rodney emerged as one of the leading thinkers and activists of the anticolonial revolution, leading movements in North America, South America, the African continent, and the Caribbean. In each locale, Rodney found himself a lightning rod for working class Black Power. His deportation catalyzed 20th century Jamaica's most significant rebellion, the 1968 Rodney riots, and his scholarship trained a generation how to think politics at an international scale. In 1980, shortly after founding of the Working People's Alliance in Guyana, the 38-year-old Rodney would be assassinated. In his magnum opus, How Europe Underdeveloped Africa, Rodney incisively argues that grasping "the great divergence" between the west and the rest can only be explained as the exploitation of the latter by the former. This meticulously researched analysis of the abiding repercussions of European colonialism on the continent of Africa has not only informed decades of scholarship and activism, it remains an indispensable study for grasping global inequality today.

Sunday, 30 October 2022

Translating Figurative Language

Lately, in an effort to improve my Indonesian, I've resorted to the use of a notebook again. I decided to start with tools because I've been using them a fair bit lately. Here is what I came up with:


The more modalities that are used for vocabulary the better of course. Listening to the language using electronic devices, writing down vocabulary in a physical notebook, typing words and phrases into a computer, face-to-face interaction with a native speaker ... it all helps. The list of words above are very concrete but also very useful as most of my interactions are not of a philosophical nature!


Concrete words like "spanner" can be used figuratively in English but phrases like "throw a spanner in the works" need to be translated into Indonesian with caution. Consider the sentence: We were ready to start the project when the bank threw a spanner in the works by denying the loan. Google Translate renders this literally as: 
Kami siap untuk memulai proyek ketika bank melemparkan kunci pas dalam pekerjaan dengan menolak pinjaman

This translation really doesn't make any sense to a native speaker with little knowledge of English. A phrase in Indonesian that comes far closer is karena air setitik gula sebelanga rusak. This means literally that "a drop of water can ruin the sugar in a pan" when cooking but figuratively it means a little, seemingly inconsequential thing, can ruin a consequential undertaking. This was proposed to me by a native Indonesian speaker. It does not carry the exact same meaning as the English expression involving the spanner.


This is the problem when translating figurative language and clearly AI, as exemplified by Google Translate, struggles with it. Let's use the service to translate another phrase containing a word from the above list: thick as a brick. The translation is again literal: 
setebal batu bata whereas it really means "stupid".  An Indonesian would be baffled by such a phrase and so another fail. A similar phrase in Indonesian might be kepala udang that should translate as "a stupid person" and not "a shrimp head".

I imagine AI will rise to the challenge. It can't be too difficult to include stock phrases like "thick as a brick" in a database and to use their meanings as a first choice in preference to the meanings obtained by breaking such phrases down into individual words and then translating them. We await improvements but in the meantime it's best to avoid figurative language when trying to communicate across language barriers. 

If someone is stupid then simply say so and don't say to a non-native speaker that "he's thick as a brick". If someone or something has thrown a spanner in the works then simply say so more directly as the language in the following graphic illustrates.


Thus "
he did something that prevented the plan from succeeding" could be rendered dia melakukan sesuatu yang mencegah rencananya untuk berhasil.

Thursday, 20 October 2022

Google Docs: Lesson Learned

I had a text document on Google Docs that had swelled over the years to 422 pages with numerous diagrams and my Pi 400 with its meagre 4GB of RAM would struggle to open it. Similarly my poor old 2013 MacBook Pro with 8GB of RAM would also have trouble. I finally decided that it was time to break it up into a series of smaller files. This was easier by the fact that I had already organised the content into alphabetical order. It was a simple matter of assigning the content under each letter to a new file. The original document just served as a master index to link to these new files. Figure 1 shows what it looks like now.


Figure 1: part of the opening page

Some of the files are still over 80 pages but the loading is now much faster. There seems to be a critical size for files and that, once reached, the loading time significantly increases. Figure 2 shows what the opening page of the P file looks like.


Figure 2: opening page of P document

The number of pages of the original document grew over a period of more than seven years and the lesson learned for me is that, if you're going to create something that will grow slowly but continually, make use of multiple, linked documents and don't go for the monolithic single document. It took me a good few hours to effect the changeover and the process was quite tedious and repetitive.

It's not that my Internet is too slow. Figure 3 shows the result of the speed test that I just ran.


Figure 3

I just think that there's something about Google Docs that causes it to not cope well with documents that have hundreds of pages and numerous graphics.

Wednesday, 12 October 2022

The End of Mobi

I received this interesting email from Amazon the other day after I'd sent an ebook, in mobi format, to my Kindle via email. Here was the content:

Dear Kindle Customer,

Thank you for using the Send to Kindle service to send personal documents to your Kindle library. We noticed that the following document(s), sent by you at 07:50 AM on Monday, October 10, 2022 GMT are in MOBI (.mobi, .azw) formats: froudes-history.mobi.

We wanted to let you know that starting August 2022, you’ll no longer be able to send MOBI (.mobi, .azw) files to your Kindle library. Any MOBI files already in your library will not be affected by this change. MOBI is an older file format and won’t support the newest Kindle features for documents. Any existing MOBI files you want to read with our most up-to-date features for documents will need to be re-sent in a compatible format.

Compatible formats now include EPUB (.epub), which you can send to your library using your Send to Kindle email address. We’ll also be adding EPUB support to the free Kindle app for iOS and Android devices and the Send to Kindle desktop app for PC and Mac.      

 If you have any questions, please visit our help page or contact our Customer Service team.      

 Regards,

Amazon Kindle Support


This is the 6th generation Paperwhite Kindle that I'm using

Well it's long past August 2022 but I seemed to succeed nonetheless. Mind you the mobi version I sent proved virtually unreadable with all sorts of bizarre artefacts and so I had to resend it in PDF format.  This Wikipedia article explains what's going on:

Kindle File Format is a proprietary e-book file format created by Amazon.com that can be downloaded and read on devices like smartphones, tablets, computers, or e-readers that have Amazon's Kindle app. E-book files in the Kindle File Format originally had the filename extension .azw; version 8 (KF8) introduced HTML5 & CSS3 features and have the .azw3 extension, and version 10 introduced a new typesetting and layout engine featuring hyphens, kerning, & ligatures and have the .kfx extension.

History

Kindle devices and apps are designed to use Amazon's e-book formats: AZW that is based on Mobipocket; in fourth generation and later Kindles, AZW3, also called KF8; and in seventh generation and later Kindles, KFX. Kindles now support the EPUB file format used by many other e-book readers. Similar to EPUB, Amazon's file formats are intended for reflowable, richly formatted e-book content and support DRM restrictions, but unlike EPUB, they are proprietary formats. AZW files debuted with the first Amazon Kindle in 2007.

Software such as the free and open source Calibre, Amazon's KindleGen, and the email based Send-to-Kindle service are available to convert e-books into supported Kindle file formats. Kindle devices can also display some generic document formats such as plain text (TXT) and Portable Document Format (PDF) files; however, reflowing is not supported for these file types.

In late 2011, the Kindle Fire introduced "Kindle Format 8" (KF8), also known as AZW3 file format. AZW3 supports a subset of HTML5 and CSS3 features,while acting as a container for a backwards-compatible MOBI content document.

In August 2015, all the Kindle e-readers released within the previous two years were updated with a new typesetting and layout engine that adds hyphens, kerning and ligatures to the text; e-books that support this engine require the use of the "Kindle Format 10" (KFX) file format.[8] E-books that support the enhanced typesetting format are indicated in the e-book's description on its product page.

In 2017, Amazon released Kindle Create, a tool that can convert Microsoft Word files to Kindle file format.

In 2022, while the Send-to-Kindle service only supported the original .mobi/.azw ebook formats (along with some other non-ebook file formats),[10] Amazon announced removing this support in favor of .epub which will be converted to Amazon's KF8 (.azw3) from late-2022.

In light of this news, I've just sent a epub file to my Kindle via Amazon's email service. I grabbed the book off the Internet Archive. It's titled "English Biography" by Waldo Hilary Dunn, 1882-1969, and was published in 1916. It might be interesting but the point is to check that Amazon will convert the epub format into a Kindle readable format. The result was disappointing:

Dear Kindle Customer,

The following document, sent by you at 11:56 AM on Tuesday, October 11, 2022 GMT, could not be delivered to the address you specified: englishbiography.epub

Send to Kindle supports the following document formats:

Adobe PDF (.pdf)

Microsoft Word (.doc, .docx)

Rich Text Format (.rtf)

HTML (.htm, .html)

Text (.txt) documents

Archived documents (zip , x-zip) and compressed archived documents

MOBI (.azw, .mobi) (will not support the most up-to-date Kindle features for documents)

JPEG (.jpg), GIF (.gif), Bitmap (.bmp), and PNG (.png) images .

Additionally, Send to Kindle emails now supports EPUB (.epub). Later this year, we’ll also be adding EPUB support to the free Kindle app for iOS and Android devices and the Send to Kindle desktop app for PC and Mac.

If the format of the document that failed is supported (listed above), please ensure the document is not password protected or encrypted, and try sending it again.

You can learn more about sending personal documents to your Kindle in our product info pages: https://www.amazon.com/sendtokindle

If you would like immediate assistance, please contact customer support at +1-866-321-8851 (US customers) or +1-206-266-0927 (International customers).

Yours sincerely,

Amazon Kindle Support

The letter doesn't make much sense. The mobi format is still supported whereas, in practice, the epub format is not. Hmmm. Things seem to be in a state of transition at the moment and maybe there will some sort of resolution later in the year.

Friday, 7 October 2022

Old Webcam Finds New Life

I have my  Raspberry Pi 400 connected to an old Samsung monitor but up until now I haven't had a webcam attached to it. However, I found an old Logitech webcam that I once used with my a Toshiba Satellite laptop that I bought in 2006. Amazingly this expensive and ultimately disappointing machine didn't have a webcam which is why I purchased the Logitech accessory in October of 2007. I bought the laptop in mid-2006 and had been using a UMax webcam prior to this. Here is a short YouTube video that I made at the time announcing my purchase.


After I started using Mac laptops in 2011, there was no need for the Logitech webcam and so it was left in a drawer in my study. However, today I dusted it off and plugged it into my Pi 400. After installing Cheese, I took this 640 x 480 photo:


Well, it does the job with a decidedly retro flair. Who would have thought that I'd be using this old webcam again a full 15 years later! Not that I have much use for it as I don't use Zoom or other such software but at least it's there if I need it.