Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

About

Hi There! I am a CS undergraduate student at an obscure university in a remote area. I am interested in Rust and Desktop Linux.

How to find me

My Laptop

arch

Some of my attempts

Friends

DN42 Peering

Global Information

KeyValue
ASNAS4242421421
MNTNERVERTIN-MNT
IPv4172.20.28.128/27
IPv6fddd:d3be:7f00::/48

Node Information

North America

KeyValue
LocationOVH, Quebec, Canada
Public Hostnamedn42-ca-qbc1.notalium.co
Public IPv415.235.34.18
Public IPv6-
DN42 IPv4172.20.28.129
DN42 IPv6-
Tunnel TypesWireGuard
BGP SoftwareBird2
WireGuard public key

Peering with me

TODO

07.03 Virtual Memory Note

Question

Given a 2-level paged virtual memory model

PD IndexPT IndexOffset
10 bits10 bits12 bits

Also,

PD Entry SizePT Entry Size
4 bytes4 bytes

Consider a process P:

Start Virtual AddressStart Physical Address
0x12340000H0x98760000H

A page fault occurs when the process P accesses the virtual address (VA) 0x12345678H. The operating system dynamically allocates physical page frames for the corresponding page directory entry and page table entry as follows:

  • The page directory base address is read from CR3 to calculate the physical address of the page directory entry for this access, and a new page is allocated for this entry to serve as a page table.

  • The physical page frame number of the new page table page is set to 0xABCDEH.

  • In the new page table, the physical page frame number 0x19810H is allocated for the virtual page number.

Answer the following questions:

  • For the given VA, find the:

    • a. Page Directory Index (PD Index)

    • b. Page Table Index (PT Index)

    • c. Offset within the page

  • Find the physical address of the Page Directory Entry (PDE PA) for this access.

  • Find the base physical address of the page table (PT Base PA) and the physical address of the Page Table Entry (PTE PA) for this access.

  • Find the final physical address (PA) that is accessed within the page.

Answer

  1. For VA 0x12345678H:

    We got 0001 0010 0011 0100 0101 0110 0111 1000 in binary.

    • a. PD Index: 00 0100 1000 == 0x048H
    • b. PT Index: 11 0100 0101 == 0x345H
    • c. Offset: 0110 0111 1000 == 0x678H
  2. PDE PA:

    0x98600000H + 0x048H * 4 == 0x98600120H

  3. PT Base PA:

    0xABCDEH << 12 == 0xABCDE000H

    PTE PA:

    0xABCDE000H + 0x345H * 4 == 0xABCDE480H

  4. Final PA

    0x19810H << 12 + 0x678H == 0x19810678H

06.30 Tomorin - Telegram Userbot

GitHub: tsukinaha/tomorin

I have recently written a Telegram userbot by gramme.rs, it has serval features:

  • exec shell command <,/,/./。> <command>

  • repeat message: reply to a message with +

  • eval Rust code: use

    r#
    <code>
    

    for example:

    r#
    struct Foo {
        bar: i32,
    }
    
    size_of::<Foo>()
    

    this will return 4 in the chat.

To use it

git clone https://www.github.com/tsukinaha/tomorin
cd tomorin
cargo build --release

Now you can run it with ./target/release/tomorin.
At the first run, it will generate a config.kdl file, you need to fill it in your details.
Run it again, and follow the instructions (maybe verification code or 2FA).

06.29 PJSK Cursors

打包了 https://colorfulstage.com/media/download/, 效果如右图 Cursor
一共 6 个主题,每个主题含有动态静态两套。

PKGBUILD 在这里

如果你不是 Arch Linux 用户,可以在同仓库内找到 pjsk-cursor.sh, 运行它并将 package 目录下的文件复制到你的系统的光标目录下。

06.29 Hello World!

博客的又一次转生。

现在这东西是使用 mdBook 生成的静态网站,我把它部署在了 GitHub Pages 上。
有一说一翻来覆去还是静态好用。

tsukimi

GitHub: tsukinaha/Tsukimi
A simple third-party Jellyfin client for Linux.

Telegram Commit Activity Top Language Github License Linux CI Flathub Version Wiki

Alt

About

A simple third-party Jellyfin client written in GTK4-RS, uses MPV as the video player, and GStreamer as the music player.

It’s also partially compatible with Emby.
All of basic functions and most of admin functions are supported.

You can play music and albums, as well as videos with more advanced settings.

Screenshots

Installation

Download Tsukimi on Flathub

Native Packages

Packaging status

Arch Linux

# AUR release (https://aur.archlinux.org/packages/tsukimi-bin)
paru -S tsukimi-bin

# AUR latest commit (https://aur.archlinux.org/packages/tsukimi-git)
paru -S tsukimi-git

# archlinuxcn repo https://github.com/archlinuxcn/repo/blob/master/archlinuxcn/tsukimi-git/PKGBUILD
sudo pacman -Syu tsukimi-git

AOSC OS

sudo oma install tsukimi

Gentoo Linux

sudo eselect repository enable gentoo-zh
sudo emerge --sync gentoo-zh
sudo emerge --ask media-video/tsukimi

Nix

tsukimi is available in nixpkgs since 24.11.

Source code

Build on Linux

MPV Config

MPV-manual#files

Contributing

Translations

If you'd like to help translating Tsukimi into your language, please head over to Weblate.

翻译状态

Disclaimer

The developers of this application does not have any affiliation with the content providers available.

License

tsukimi is licensed under the GPLv3 license.

Thanks to open-source projects like GNOME Music, Fractal, and Clapper—we referenced a lot from them during development, and everyone who contributed code or translations!

Credits

Fonts used in screenshots: LXGW WenKai Screen
Anime in screenshots: Fate/Zero