Chinese New Year and new laptop
This was a disastrous week. Firstly, internet network cable broken. Secondly, my laptop went wild. Internet network cable broken, I still can online through mobile hotspot. But my laptop, it was catastrophic problem. Because I have a lot of valuable data, and I have to work.
Chinese proverb, 旧的不去,新的不来, but it was damn pressure. Because the old laptop had unpredictable behaviour. The problem was that, the keyboard will trigger some keys unintentionally, especially Alt key. I thought it was software problem, but until I reboot, and saw the GRUB menu cursor moving by itself. Damn! This means, (i) I am not able to work, (ii) I have to spend money to buy new laptop, and (iii) I need to get my data out.
Godot and C#
In my previous post, I wrote about my hobby project with Godot.
Limitations of GDScript
But I personally feel that, Godot script, namely GDScript, is not my favourite. Though GDScript is good enough to do anything, it is not what I like. Firstly, it is Python-like language. In my opinion, using indentation as scope is annoying, because I cannot auto-indent using Emacs. Due to my first programming language is C, and heavy use on JavaScript, braces (curly brackets {}) are easier to read.
Best web application framework I like
So far, in my opinion, Ruby on Rails is the best web application framework that I have used. Compared to others, it is very complete (by installing extra gems) and mature, provides everything that I need.
Version manager
There are two version managers: rvm and rbenv. I prefer rvm. It allows to work on different projects with different Ruby versions. Node has similar manager, nvm. Python has similar feature, but acts differently, using venv or virtualenv. In Python, we need to install the specific version, and create the environment by specifying our Python version. Contrarily, rvm or nvm will download and build the corresponding version.
LightDM background image
Recently my old laptop, due to some unknown configuration, it shows a background image in the LightDM login. It is annoying, and it is user specific. Meaning, if I choose another user, the background image will be changed to black background.
Searched for the solution on Internet, most of links are about gsettings, or edit the image in /etc/lightdm/lightdm.conf. But none of the related to my issue.
Finally, I found the solution. The problem is not LightDM itself, but related to AccountsService.
Patch Wine and supports both 64-bit and 32-bit
We can build Wine that supports both 64-bit and 32-bit.
The below shows the example that involves patch of a specific Wine version. Sometimes official or latest Wine just doesn’t work. And the patches can be found in the bug report attachment.
Download a patch from Wine bug report, and download the source code. Extract the source
tar xJf wine-4.2.tar.xz
patch -u -p1 < ../swshader_ivb.patch
To build Wine that can work on both 64-bit and 32-bit, we can follow this.
NVIDIA with Nouveau and Wine
I updated my old laptop HP Pavilion dv3 (2238tx) recently, which was bought in year 2010, installed with Arch Linux.
Because of Linux kernel version, the NVIDIA driver is not officially supported by Arch Linux (detail).
There are two options to resolve this: install (i) Nouveau or (ii) NVIDIA driver from AUR. The former is open source, the latter is closed source from NVIDIA official site. Furthermore, using the latter theoretically allows the usage of CUDA, which is important if I am using it to do some neural networks training.
Godot and hobby project
Game engine
Previously I found a game engine LOVE (Lua language). Then I planned to learn about it. But then I read about Godot, which uses GDScript with similar syntax like Python. So, I choose Godot over LOVE because I have better experience in Python.
I planned to work on edutainment project since long time ago. Since I have extra time recently, so I invested little time on my hobby project. Using Godot, I revived my old project.
Vivo Y17 and Wunderlist
Recently changed to new phone Vivo Y17. Installed all the apps needed. Then I discovered an issue with Wunderlist.
Wunderlist widget keep showing “loading”, and I cannot change the list to be viewed.
The reminder doesn’t show notification in time.
Then I tried to migrate Wunderlist to Microsoft To-Do, and it has same issue as well.
Searching the solution and I finally get this page.
To summarise the solution, go to Settings > Permission Management > Autostart, then enable Wunderlist or Microsoft To-Do.
Chinese (and CJK) fonts
I am using Arch Linux, and recently I found that my fonts are little different after upgrade.
In DBeaver, the monospace font shows this:

This causes the monospace doesn’t follow the same width. And I found that, the default “Monospace” doesn’t use DejaVu Sans Mono anymore after the recent upgrade.
After looking some solutions, I tried edit ~/.conf/fontconfig/fonts.conf according to this this one.
[code lang=text] monospace DejaVu Sans Mono [/code]
Script to notify myself
Sharing a simple script I recently used. Because recent development, I need to run a build command which needs about 2-3 minutes. I run it in the background so that I can continue my other work.
But switching the window in order to check whether the build is completed, it is frustrating. To make it easy, I wrote the following script,
[code lang=bash] #!/bin/bash
notify-send -t 1500 -i applications-utilities “$@” aplay /usr/share/orage/sounds/Knock.wav &> /dev/null [/code]