a blog about research, art and life 💋

Sleepingbot

Sleepingbot

Meet my new PR Sleepingbot, an intelligent assistant that answers questions about all my historical blogposts. Its high-level architecture is: ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │ Hugo Blog │────▶│ Railway API │────▶│ Anthropic API │ │ (GitHub Pages) │ │ (server.py) │ │ (Claude) │ └─────────────────┘ └─────────────────┘ └─────────────────┘ 1. Two-Stage (Retrieval-Augmented Generation) RAG Chatbot Stage 1: Send all post titles to Claude → “Which posts are relevant to this question?” Stage 2: Send full content of relevant posts + question → Get answer This is smarter than simple keyword search, and cheaper than sending all posts every time. ...

January 25, 2026

The Thaïs Méditation (Massenet)

The Thaïs Méditation was originally an Entr’acte from the opera Thaïs by Jules Massenet. The opera itself is set in Roman-era Egypt and centers on a monk named Athanaël who tries to convert the courtesan Thaïs to Christianity. The Méditation occurs in Act II between two scenes, at a moment when Thaïs is wrestling with her worldly life and the possibility of spiritual change. It was originally for orchestra plus solo violin. The piece has long line melody that pierce through your heart. ...

January 24, 2026

Vivaldi's Winter, II Largo

Today Chicago is 3 degrees warmer than the North Pole… Preposterous (In Celsiu) A warm winter Largo for my fellow in the cold:

January 23, 2026

Edward Elgar's Salut d'amour

As the title suggests, this short and sweet piece is a love song: Elgar finished the piece in July 1888, when he was romantically involved with Caroline Alice Roberts, and he called it “Liebesgruss” (‘Love’s Greeting’) because of Miss Roberts’ fluency in German. On their engagement she had already presented him with a poem “The Wind at Dawn” which he set to music and, when he returned home to London on 22 September from a holiday at the house of his friend Dr. Charles Buck in Settle, he gave her Salut d’Amour as an engagement present. (Wikipedia) ...

January 22, 2026

Html Music Player

Sometimes I embed music playing links onto my website. The workflow is as follows: Create assets/css/extended/custom.css and paste: /* Apple Music Embed */ .music-embed { max-width: 660px; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); } .music-embed iframe { display: block; width: 100%; border: none; } /* Alignment */ .music-embed.left { margin-right: auto; } .music-embed.center { margin-left: auto; margin-right: auto; } .music-embed.right { margin-left: auto; } /* Width modifiers */ .music-embed.small { max-width: 400px; } .music-embed.full { max-width: 100%; } I am ok with directly writing html code in markdown files (if you prefer another layer of abstraction, you can create an .html file in layouts so that embedding is more straightforward) ...

January 21, 2026

Mean Reversion (a concept that's been abusively used)

Mean reversion is a property some models have and some data exhibits. It’s not a law. It’s a useful lens but requires specifying the mechanism and checking whether it actually holds. So let’s check the conditions. In our Macroeconomics with Heterogeneous Households class, for the continuous-time model of an individual household with (Poisson) income shock, consumption follows the following dynamic: Courtsey to Professor Kaplan’s Course material… If you’re interested in more about the math/model. ...

January 20, 2026

The Grand Budapest Hotel (and Behind the Scenes)

The Grand Budapest Hotel (2014) written and directed by Wes Anderson was inspired by Zweig’s Die Welt von Gestern. It’s the pinnacle of color grading and metaphors. The film got 9 academy award nominations and won 4. The movie’s intrinsic core is quite obvious. To be frank, i think his world had vanished long before he even entered it. but i will say, he certainly sustained the illusion with a marvelous grace. ...

January 19, 2026

Tchaikovsky Violin Concerto (Op.35) and the love story behind it

Tchaikovsky only wrote one violin concerto. There’s an interesting love story behind it. Tchaikovsky fled to a resort by the Lake Geneva to escape from his unfortunate marriage. His composition pupil, the violinist Iosif Kotek joined him… Another source of anxiety was Kotek, who joined Tchaikovsky’s party later. Writing to Anatoly on 6/18 March, Tchaikovsky implicitly compared the young violinist’s financial dependence on him and others to his own dependence on Mrs. von Meck. “In my heart of hearts I am not exactly angry at him, yet I find it somehow unpleasant that he is growing accustomed to living on other people’s money,” he wrote. “But I shall never dare articulate this to him.” At the same time, Tchaikovsky found himself moved by Kotek’s love for him and valued immensely “his kind heart, his simplicity and naïveté.” The result was yet another little drama: conflicting feelings on Tchaikovsky’s part, Kotek’s realization that his teacher’s affection is “no longer as before,” and, in turn, Tchaikovsky’s annoyance at them both. “I cannot tell him the whole truth,” he explained to Anatoly, “nor do I wish to upset him. In short, there are moments when I am angry at myself and angry at him and the result of all this has been the sulks.” In the next breath, however, he sought to reassure his brother, apparently with sincerity. “But do not pay attention to this, and do not think that he is a burden to me. In the first place, I enjoy making music with him; in the second, he is essential for my violin concerto; in the third, I love him very, very much. He has the kindest and most tender of hearts, and his character is extremely comforting and pleasant.” ...

January 18, 2026

Inequality in Neoclassical Growth Model with Capitalist and Workers under Balanced Growth

This is a problem from Theory of Income II problem sets. Courtesy to Elle Edmonds who worked out this problem with great clarity. All the contributions are hers and mistakes are mine. Inequality in the Neoclassical Growth Model For standard NGM: given CRS technology $F(K_t, X_t L_t)$ with capital accumulation $\dot{K}_t = I_t - \delta K_t$ and TFP growth $\dot{X}_t/X_t = g > 0$. Agents: Measure $\pi_c$ of capitalists: endowed with $k_0$, no labor, rent capital competitively Measure $\pi_w$ of workers: no initial wealth, each supplies $1/\pi_w$ units of labor inelastically Preferences: Both types maximize $\int_0^\infty e^{-\rho t} \ln C_{it}, dt$, $ i \in {c, w}$. ...

January 17, 2026

Objective Utility, Subjective Utility, and Combined

The Price Theory II class crashed through these three topics within three 80minutes lectures (spoiler alert: we are also going to finish Arrow’ Impossibility Theorem for voting in one). Though the logic sequence goes vNM -> Savage -> Anscombe-Aumann. vNM and anscombe-aumann’s space of alternative has good topological structure, so the intuition is easier. But Savage’s version is discrete hence makes it complicated. Von Neumann–Morgenstern utility theorem Wikipedia Page Savage’s subjective expected utility model Wikipedia Page ...

January 16, 2026