Personal Understanding of Rust Ownership

Stack and Heap The first thing to understand about ownership is to know about the stack and heap memory. This concept will be quite easy if you have learned C or C++, since they are almost the same. Stack Memory If you simply declare a variable in a function, then it will live in the stack. For example, the code below declares some such variables: fn main() { let a = 1; let y = plus_one(a); } fn plus_one(x: i32) -> i32 { x + 1 } The variables a, x, and y are all allocated and deallocated automatically, just like C/C++ compiler. ...

2025-06-25 · 5 min · 1030 words · ssdxx

Apple Intelligence Network Troubleshooting

Recently I’ve set up the Apple Intelligence, but I can’t log in to my ChatGPT account. The main reason for the problem is the special network environment in the Chinese mainland. It can be solved by adding the following domain to the proxy rules: apple-relay.cloudflare.com apple-relay.apple.com

2025-06-18 · 1 min · 46 words · ssdxx

Esp32 Flash Troubleshooting

When I wanted to flash a firmware into the ESP32, I got the error as below: A fatal error occurred: Failed to write to target RAM (result was 01070000: Operation timed out) After some searching, I found that I missed a USB driver. The driver can be downloaded at https://www.wch.cn/downloads/CH34XSER_MAC_ZIP.html

2025-06-13 · 1 min · 50 words · ssdxx

Using Anki to learn English from TV series

Recently I wanted to watch the TV series Friends, and it suddenly occurred to me that it’s a good chance to learn English. So I found some tools to assist me. This article is a recording of the ways I build up the learning workflow (using Anki, MPV, mpvacious, and Yomitan). Preparation Installing Anki and the add-on Anki is a very powerful tool that can help remember things, you can download the installer here. ...

2025-03-13 · 2 min · 360 words · ssdxx