Yung-Hsiang

@costxdown

"Knowledge isn't free. You have to pay attention." - Richard P. Feynman

Joined on Oct 21, 2021

  • <LINK> 簡述 CPU 執行指令會依序經過三種主要階段,獲取 (fetch)、解碼 (decode)、與執行 (execute)。因此,instrcution cycle 又被稱為 fetch-decode-execute cycle 或 fetch-execute cycle。從電腦開機 (boot-up) 到關閉的期間,CPU 遵守由三種階段構成的循環週期。 現代複雜處理器並不會等待整個週期完成後再執行下一條指令,通常會使用 CPU pipeline 加速指令執行。 Role of components 其中一個特殊的 register ,稱作 PC (program counter),在讀取指令時會經常用到。PC 會保存下一個要執行的 指令的記憶體位置。
     Like  Bookmark
  • quick guide press key i. then you can using arrow key to move cursor, backspace for delete, and enter for change line. when you done, press key esc (escape), and type :w for file saving typing :q to quit editor, or you can type :wq for file saving and quit editor. :q! is stand for force quit. mode swtich digraph { node[shape=box]
     Like  Bookmark
  • 前言 如果只是使用者,基本上可以不用自己從 source code 編譯,透過作業系統的軟體套件管理工具,就可從預設的安裝源下載 llvm, clang, clang-format, clangd 等工具。不過如想跟到最新版的 llvm toolchain 就需要自己設定 llvm 安裝源。 :::info 作業系統以及對應的軟體套件管理系統 OS Package Manager
     Like  Bookmark
  • 不想麻煩的可以直接看這篇:How to install Clang 17 or 16 in Ubuntu 22.04 | 20.04 Install LLVM project from source code 步驟 提供我的安裝環境: OS: Ubuntu 22.04.3 LTS x86_64 Host: Predator PH317-52 V1.26 Kernel: 6.2.0-37-generic
     Like  Bookmark
  • 著重於想法,而非語法 前言 有些人會把語言分門別類,物件導向的歸一邊,而非物件導向的歸一邊,像 java 是基於 class base,而 python, javascript 是基於 prototype,C++ 則是 Meta programming(因為 template)。並非沒有了語法支援便無法體現物件導向的精神,萬語皆有 OOP 。 實作 在 C 裡實作一個偽物件導向的語法,讓 C 看起來具備物件導向的繼承功能(實際上就是 struct 裡塞 struct) header file : psdooc.h #define noargs void *_noargs
     Like  Bookmark
  • 題目連結 α - 1 簡短複習 AVL Tree, RB Tree 先來觀察節點結構與指標操作 struct st_node { short hint; struct st_node *parent;
     Like  Bookmark