Latest post
I am using #Thunar as my #filemanager and #Ghostty as my #terminal. One thing that bugs me is that clicking "open terminal here" in Thunar opens Ghostty in the default working directory instead. I just fixed this today by changing the command to `TERM_PROGRAM=dumb exo-open --working-directory %f --launch TerminalEmulator`, i.e., adding an environment variable `TERM_PROGRAM`. The value does not matter, but it has to have some value for exo-open to work. No idea why.
follow me on Mastodon
Articles
-
The concentration change of gas in reversible reactions
A reversible elementary reaction takes place inside a closed, highly thermally conductive container of constant volume, whose reactants are all gases. Given the reaction equations and the reaction rate constants, a natural question to ask is how the concentration of each gas changes w.r.t. time. In this article, I will answer this question by proposing a general approach to solve it. -
Snippet: O, ’tis too true!
O, ’tis too true! -
The structure of a basic RM game
In this article, I present minimal examples of a RM game. They only illustrate the basic concepts of how a RM game is structured and what is the running logic of it. -
The frequency assignment of musical notes
This article explores the concept which I call the frequency assignment, which is a mapping from (the set of notes) to (the set of frequencies). Concepts such as octaves, intervals, and equal temperaments are introduced. -
Normal vectors of a scalar field
This article gives the formula for the normal vectors of a surface defined by a scalar field on . The normal vector of the graph of the function at is . This also provides us a way to recover a scalar field from the normal vectors of its graph: normalizing the vectors so that the last component is , and then integrate the rest components. -
It is Feb 29 today!
It is Feb 29 today. The date appears once for as long as 4 years! -
Monkey-patching graciously
Monkey-patching is a powerful tool in programming. In this article, I used techniques of Ruby metaprogramming to define a series of methods def_after,def_before, etc. to help monkey-patching. They look graciously in that we can use it to shorten the codes for monkey-patching (avoiding aliasing and repeating codes). -
Amazing Siteleaf
I have been using Siteleaf to manage my blog. It is just convenient and amazing. -
Hyperellipsoids in barycentric coordinates
In this article, I introduce the barycentric coordinates: it is an elegant way to represent geometric shapes related to a simplex. By using it, given a simplex, we can construct a hyperellipsoid with the properties: its surface passes every vertex of the simplex, and its tangent hyperplane at each vertex is parallel to the hyperplane containing all other vertices. -
Use complex numbers as canonical variables
In this article, I try exploring an idea: using complex numbers to combine pairs of canonical variables into complex variables: . It turns out that we can write canonical equations , Poisson brackets
, and canonical transformations
in these complex numbers. Finally, I show two examples of using them in real problems: a free particle, and a harmonic oscillator.
subscribe via Atom