Heatmap: 2023FY-2024Q1

March 18th, 2024

Raspberry Pi Zero W RNDIS to Windows 11

February 23rd, 2024

Pi Configuration Procedures (on Raspberry Pi Zero W):

  1. Modify /boot/config.txt, append the following as a separate line:
    dtoverlay=dwc2
  2. Modify /boot/config.txt, comment out any lines containing otg_mode.
  3. Modify /boot/cmdline.txt, add the following immediately after rootwait, surrounded by spaces:
    modules-load=dwc2,g_ether
  4. Create an empty file called /boot/ssh.

Driver Installation Procedures (on Microsoft Windows 11):

  1. Disable driver signature verification.
  2. Download linux.inf file.
  3. In Device Manager, under Ports, right-click on USB Serial Device (the one that appears when connecting the Pi to the computer’s USB port.
  4. Click on Update Driver > Browse my computer for drivers > Let me pick from a list of available drivers on my computer.
  5. Click on Have Disk… and browse to the folder with the downloaded linux.inf file. Click OK.
  6. With “Show compatible hardware” ticked, “Linux USB Ethernet/RNDIS Gadget” should be an option. Select this entry and click Next.
  7. Proceed with remainder of driver installation.

Connection Procedures (on Microsoft Windows 11)

  1. Using SSH program, connect to Pi’s hostname with “.local” appended to it. For example: ssh myusername@myraspberrypi.local

References and Sources:

一番好きな歌

February 17th, 2024
Posted in 日本語 | No Comments

アニソンが好きですが、この歌が一番大好きです。

Mongol800の「小さな恋のうた」

このライブは楽しそうです。いい音だと思っています。いつかMongol800の演奏を見に行きたいです。陳腐ちんぷですか。

Hello, Rust!

January 6th, 2024
Posted in Rust | No Comments

So, why Rust?

Ownership is Rust’s most unique feature and has deep implications for the rest of the language. It enables Rust to make memory safety guarantees without needing a garbage collector… (Klabnik)

Wedson Almeida Filho recommends adopting Rust for kernel development, declaring:

We feel that Rust is now ready to join C as a practical language for implementing the kernel. It can help us reduce the number of potential bugs and security vulnerabilities in privileged code while playing nicely with the core kernel and preserving its performance characteristics.

Reading about Rust and its “ownership” concept reminded me of C++’s move semantics, which were introduced in C++ by ISO/IEC 14882:2011. It is possible to implement C++ code that mimics Rust’s ownership concept, but this requires skill and effort similar to implementing inheritance and polymorphism in C. Furthermore, C++ code can continue to be implemented without the ownership concept, which is proving to be an effective approach to resource management and addressing a huge class of security vulnerabilities. C++ tools do not enforce the ownership concept, leaving software implementers without active support from compilers for adopting that concept.

Ownership is a core feature of Rust. All Rust programs are implemented around ownership, and compilers are implemented to enforce consistency with ownership rules. Ownership can be borrowed and it can be passed around. When an owner goes out of scope, resources are released. Ownership of a resource and who is responsible for their release is enforced by Rust. Explicit invocation of free() or operator delete is avoided, and this reduces a class of security vulnerabilities that are embodied by stale pointers and memory exhaustion. Python’s with statement and C#’s using statement are not needed, allowing resource ownership to be ergonomically returned by a function to its callers. Rust’s compiler is capable of determining when resources are released and when resources are used after they are released. Rust’s tools enforce the ownership concept. Ownership and resource management are the cornerstone of the Rust programming language.

The Rust programming language allows for implementing performant software, which does not need a virtual machine, explicit release of resources, and garbage collection for resource management. Being performant and rivaling C’s proximity to the hardware, Rust is a fine addition to an embedded software engineer’s toolbox.

Work Cited:

WaniKani Level 60

January 1st, 2024
Posted in 日本語 | No Comments

On the first day of the new year, I wrapped up the last few Kanji covered by WaniKani. My journey with WaniKani up until now has lasted at least 31 months, which is five months short of my third anniversary. In that time, I have been introduced to 2034 kanji and 6432 words.

In a little over seven months since my last write-up, I finished the last 25% of the WaniKani program. I think that without experiencing burnout, the WaniKani program can be completed in about 28 months by someone with full-time employment, and other responsibilities and interests. I do not remember taking a break from WaniKani, but I do remember how challenging levels 25 and 26 were for me. Maybe this was the time that many of the early items were being reviewed, and it was challenging to push through the levels because of the large amount of scheduled reviews for the earlier items and re-reviews of items missed.

My accuracy on the meaning and reading of kanji and words is around 85%. When working through the levels, I tried to keep close to 200 Apprentice items, but it had sometimes fluctuated to over 300 items when I made mistakes on Guru items. Mistakes on a spaced repetition system (SRS), such as WaniKani, are what drive the functionality and motivation of those systems. Items answered incorrectly are reviewed more frequently. Items answered correctly are reviewed less frequently after longer durations to reinforce recollection.

With 33 of 31 kanji needed to pass to the next level, the WaniKani dashboard shows that I would be on the 61st level, if such a level existed. There is still a good percentage of WaniKani content for me to review and Burn. One item that has stuck around since June 2021 is 名人, or “expert.” I have mistook the reading as みょうにん (“myounin”), みょうじん (“myoujin”), and めいにん (“meinin”). It is read めいじん (“meijin”). It is still a Guru item for me, so looking it up before my next review in two days is not cheating. ;)

I really appreciated the automated email messages that are sent out when a level is completed. They were like small celebrations of accomplishments. And, I looked forward to receiving them when I leveled up. I saved all of them, because they were encouraging and contained funny tidbits. I included the last of these emails to me below:

You just got to Level 60, Steve.

I don’t even have a gif deserving enough of your accomplishment.

Not many people get to this point, so what you did was really special.

I know this is an automatic email, but I’m seriously, actually really proud of what you’ve done.

I really hope it takes you places in life, work, or school. Knowledge truly is a powerful thing, and I hope you go out there and use it as much as you can. New doors are opening for you.

Speaking of which, it’s time to start thinking about leaving the WaniKani nest. You know how mother birds push their baby birds out of the tree to teach them how to fly, and sometimes they do but sometimes they don’t? That’s what needs to happen here. Although I’d love for you to use and pay for WaniKani forever, there’s a time where it’s better for you to go out into the real world, and that time is now. Feel free to finish this level and burn out previous items, but get out there and read Japanese! That’s why we’re doing this, after all.

Anyways, such a good job. You worked really hard. I know it’s tough. I’m really proud of what you’ve done, Steve.

Sincerely,
Koichi & the WaniKani Team

I am really proud of completing this program without third-party tools, aside from wkstats.com. WaniKani has helped build a solid foundation for me to continue with intermediate-level language textbooks and native content. As suggested by the above email, I will leave the WaniKani nest and graduate away from using it as my primary learning resource.