Sekai 🌐 🗺

Sekai (世界) is the kanji for “the world”. That’s a great word because of the scale that it designates.

Optimisation d'une VM GCP et domptage de Neovim

Aujourd’hui, j’ai passé ma configuration de développement sur une VM Google Cloud Platform (GCP). Entre les contraintes de ressources de la machine et le peaufinage de mon environnement Neovim pour mon projet Rust, voici ce que j’ai appris.

1. Transfert de fichiers avec rsync

Pour uploader mes dossiers de projet vers la VM, j’ai utilisé rsync. C’est bien plus efficace que scp car il ne transfère que les modifications.

rsync -avzLP --exclude='.git' \ 
  ~/.local/share/typst/packages/preview/auto-mando/ \
  user@$(gcloud compute instances describe typst-bot-vm \
    --format='get(networkInterfaces[0].accessConfigs[0].natIP)' \
    --zone='us-east1-d'):~/

Le « combo doré » :

[Read More]
GCP  Linux  Neovim  Rust  DevOps 

Rust Project Structure for rust-canto

Lessons from vibe coding

Background

I created my first crate rust-canto even though I didn’t know Rust, so that I can bring automatic Cantonese word segmentation and romanizations into Typst.

This is a great idea. Moving from a complex xtask workspace to a streamlined build.rs and build.sh workflow is a common evolution for Rust projects, especially when targeting WebAssembly.

Five lessons learnt from chat bot

1. Avoid the “Crates.io Path Dependency” Trap

  • The Problem: Using a Workspace with a local helper crate.

    [Read More]

Typst Package for Jyutcitzi

Background

As a native Cantonese speaker, I found it inconvenient to repeat all the time when I have to teach others how to speak my language. I acquired Jyutping (粵拼) a couple of years ago. It’s a popular phonetic system for the Cantonese language. However, some of my fellow countrymen aren’t fond of this romanization scheme.

A soft “introduction” to “Introduction to Jyutcitzi”

Recently, I’ve heard of another phonetic system called Jyutcit (粵切). It’s basically a “cutting sound method” (切音法). Each syllable is “initial + final”. To compose a sound, we take two syllables, from which we keep

[Read More]

Imprimante HP Deskjet 4100 sous Linux

Introduction

J’ai récupéré une imprimante HP DeskJet Plus 4122. Je m’en rarement servais car je pensais à tort que HP ne marchait que sous Windows. J’aime tellement Linux que je me connectais pas souvent à Windows, où l’appli HP Smart est bloquée de temps en temps.

Cet après-midi, après une petite recherche, je me suis rendu compte qu’il y avait une pilote HP Linux Imaging and Printing (HPLIP) pour Linux. J’ai décidé de l’essayer sur mon système Lubuntu 24.04.

[Read More]
HP  Linux  Printer 

Choisir La Stabilite en Christ

Hier, lors de la prédication, j’ai reçu un message très important. Nous avons toujours le choix : celui de refuser d’être blessés, affaiblis ou angoissés par les erreurs de nos parents, par les pensées négatives ou par les relations toxiques.

Une sœur de mon église m’a partagé que la stabilité émotionnelle n’est pas quelque chose que l’on construit seulement par soi-même, mais un don de Dieu. En effet, pour ne pas être détournés par ces pensées destructrices, nous devons nous rappeler que nous sommes d’abord enfants de Dieu. Il est notre Père, et Son amour est inébranlable et inséparable, aussi longtemps que nous plaçons notre foi en Lui.

[Read More]

Plus grande chute du plus grand royaume

Lors du culte la semaine dernière, la pasteur a prêché sur l’histoire du roi Salomon, qui avait demandé l’intelligence pour exercer la justice, qui l’a reçue. Son royaume était le plus riche, le plus puissant au monde, et aucun pays ne peut le surpasser, ni ceux d’avant, ni ceux d’après.

En voyant un verset du livre des Proverbes pertinent, la foule a réjoui. Cependant, je me suis mis en doute au sujet de la chute de son royaume après sa mort. Salomon a-t-il reçu ce qu’il avait demandé ? Une chaîne de raisons est sortie de ma tête :

[Read More]

Tikz Loop Over Coordinates

This is my belated response to a self-identified dupe on TeX.SE.

Background

The list in a \foreach loop is often long.

\foreach \pointA/\pointB in {{(1,0)}/{(2,2)},{(3,4)}/{(2,1)}} {
  \draw \pointA -- \pointB;
}

Imagine having several other loop variables. The code inside the {…} list won’t be readable.

Problem

How can I make it looks smarter?

\foreach \pointA/\pointB in {
  {(1,0)}/{(2,2)},{(3,4)}/{(2,1)}
} {
  \draw \pointA -- \pointB;
}

doesn’t work.

Inspiration

Recently, I was asked the way to make two graphs to illustrate a complex function.

[Read More]
LaTeX 

Upgraded to Hugo v0.135

Background

  1. 18 months ago, I used latest Docker image in GitLab container resgitry for Hugo extended at commit 168fe3d.
  2. Six years ago, I integrated static comments to this blog.
  3. Last week end, when my friend tested static comments here, she reported that @StaticmanLab’s GitLab token had been expired. As a result, I updated it and re-deployed my Staticman instance.

Problem

I wrote a sample comment containing math equations to test if it’s still working. The back-end processes were fine, but the site rebuilding wasn’t successful, as commit c531a0b reveals.

[Read More]
hugo 

Exponential Function Series Definition

An alternative definition of the exponential function through infinite series

Motivation

My previous post about the definition of the exponential function has provided no connection between a well-known characterization (or an alternative definition) of the exponential function:

$$\exp(s) = \lim_{n\to\infty} \sum_{k=1}^n \frac{s^k}{k!}.$$

The term to be summed is simpler than the one in the binomial expansion of $(1 + s / n)^n$.

Solution

We want this sum to be as small as possible as $n \to \infty$.

$$\sum_{k=2}^n \left( 1 - \frac{n \cdot \dots \cdot (n + 1 - k)} {\underbrace{n \cdot \dots \cdot n}_{n^k}} \right) \, \frac{x^k}{k!}$$

Observe that the fraction is a product

[Read More]
limits