Hello! My name is 蔡醒诗 or Xing Shi Cai in English.
(See here if you want to know how to say my name.)
Welcome to my new home on the Internet! (Here is my old home.)
Random some scribbles. Hope they will be helpful for someone.
LLM and Tang Ying
For some random reason, I decided to test whether ChatGPT and Claude could write poems in an ancient Chinese style. So, I sent Claude 18 poems by Tang Yin (唐寅, 6 March 1470 – 7 January 1524) and asked it to compose three new ones in Tang’s style. The initial results were impressive but sounded a bit modern, so I asked ChatGPT to revise them. Afterward, I gave them back to Claude, asking it to change any words that sounded modern. Below are four poems: one by Tang Yin and three by AI. If you can guess which is which without Googling, I would say you are an expert in ancient Chinese poetry.
...
Using Claude to Visualize Algorithms
I have been trying to use the Large Language Model (LLM) Claude to generate artifacts (apps written in JavaScript and HTML) to visualize algorithms for my COMPSCI 308 course. It works amazingly well. If I had to write them myself, it would have taken hours. It also has the added benefit that I can run them in a browser on my iPad, which I use for teaching. Previously the only way I found to run code on iPad is to use Wolfram Player, which is quite buggy. ...
Testing using LLM to do automatic line breaks
I have a habit of manually inserting line breaks when I write.
Usually, I do this at punctuation marks.
When that’s not possible, I try to break at logical points.
Since I am experimenting with what LLMs can do, I thought this could be a good test.
I tried many models using the same system prompt:
Please: - Adjust line breaks so that lines are neither too short nor too long. - Make sure each line has no more than 90 characters. - Preferably, add line breaks after punctuation marks such as periods or commas. - Always start a new line for a new sentence, i.e., after a period that ends a sentence. - If it's not possible to break lines at punctuation marks, break at logical points to maintain readability. - Preserve the original text structure but make the line breaks more readable. - Do not alter the content of the text, only adjust formatting with line breaks. - Return only the text with improved line breaks. Example: Original: The quick brown fox jumps over the lazy dog. The dog, being lazy, does not respond. The journey took about thirty minutes and covered more than five kilometers without stopping. Corrected: The quick brown fox jumps over the lazy dog. The dog, being lazy, does not respond. The journey took about thirty minutes and covered more than five kilometers without stopping. Note that I only tested each model once, so this is not scientific research.
...
No More Plastic: A Journey Towards Sustainability
On April 21, 2024, I organized a book club to discuss the book No. More. Plastic. by Martin Dorey. To prepare for the event, I spent quite some time drafting a slide deck. Now I have translated the slides into Chinese. You can download the slides here:
English Version Chinese Version Summary of My Slides A Book Recommendation Martin Dorey, an author, surfer, swimmer, cyclist, and environmentalist, wrote the book “No More Plastic.” He was inspired to take action after discovering an area knee-deep in plastic bottles during his move to a quiet beach in 2009. His book aims to raise awareness about the plastic pollution crisis.
...
Books That Got Me Interested in Math
I always feel that I became a mathematician accidentally. But in retrospect, since I was a kid, I did read serial books about mathematics and mathematicians and has always been drawn to a career and life in mathematics. Below are the books which ignore my interest.
Nature’s Numbers: The Unreal Reality Of Mathematics Nature’s Numbers
This book by Ian Stewart has some interesting facts about the nature of mathematics. It has been decades since I read it, but I still remember that I was awe-filled when I learned form the book that Fibonacci sequences appear the arrangement of a pine cone.
...
How to Be a (Happy) Vegan in China
I’ve been a vegan for over three years, and I’ve lived in Kunshan, Jiangsu, China, for the past two years. Adopting a vegan lifestyle is no trivial feat anywhere in the world, but it feels even more challenging here compared to Sweden, where I used to reside. Here’s what I’ve learned about being a vegan in China.
Finding Vegan Food in Restaurants Recommended Restaurants Restaurants that I recommend (see details below) include —
...
What Stoicism can learn from Buddhism?
Having recently read through Robert Wright’s book ‘Why Buddhism is True,’ I was impressed by Buddhism’s intricate comprehension of human psychology. While the book doesn’t directly set Buddhism against Stoicism, my previous exposure to Stoic made me see how the two philosophies could complement each other.
Stoicism, particularly its modern interpretations, claims that achieving eudaimonia - the good life - implies “living according to one’s nature.” Stoics define our nature as being “social and rational.” This, in my perspective, is more readily comprehensible than the similar but more intricate concept nirvana presented in Buddhism.
...
Vegan Mapo Tofu: A Swedish-Chinese Recipe
While living in Sweden, a friend asked me, “Do you know if this recipe is authentic? I found it on the Internet, and I’m not sure if it’s reliable.” She likely assumed a Chinese person would know more about Chinese cooking than random food bloggers on the Internet. But I playfully replied with feigned seriousness, “Where do you think I learned to cook?” “From the Internet? 😲” “Of course!”
It was a joke, but it was also the truth. I barely cooked when I lived in China. It was only when I started studying in Canada that I had to cook for myself. So, most of the recipes I know, Chinese or otherwise, I learned from the Internet.
...
Stein's Method
I recently give two seminars for DKU’s Discrete Math Seminar on Stein’s method. Here are my slides for the 1st talk and the 2nd talk.
A Book About Difficult Parents
The Sixth Tone is an English news website covering stories in China. A DKU (Duke Kunshan University) student just won a writing contest organized by them with an essay titled Moxa, Receipt, Money, and Generations. It is a candid and touching account on how her father’s obsession with moxa damaged their family.
This makes me think that perhaps many of our students also similar family issues. If you are in such a situation, reading the memoir The Glass Castle by Jeannette Walls might be helpful.
...