--- tags: DYKC, CLANG, C LANGUAGE --- # 「[你所不知道的 C 語言](https://hackmd.io/@sysprog/c-prog/)」講座的許願池 :::info 請協助列入您想知道的 C 語言程式設計議題,儘量描述並強調工程上的考量,最好附上參考資料 (超連結、論文,和參考書目等等)。我們將會斟酌安排對應的講座。 -- [jserv](https://github.com/jserv) ::: ## 許願池 - [ ] [jserv](https://github.com/jserv) * <s>C11 [Atomics](http://en.cppreference.com/w/c/atomic)</s> * <s>C11 [Thread support library](http://en.cppreference.com/w/c/thread)</s> > 詳見 [並行和多執行緒程式設計](https://hackmd.io/@sysprog/concurrency) 系列講座 * <s>Bitwise operation (從數值系統分離)</s> > 已於 [bitwise 操作](/@sysprog/c-bitwise) 探討 * [memory leak & 透過工具來分析偵測](http://www.computerworld.com/article/3003957/linux/review-5-memory-debuggers-for-linux-coding.html) * 數值運算: [Fast Logarithm Estimation](https://www.facebook.com/notes/champ-yen/fast-logarithm-estimation-an-implementation-case-study/1223383301021899) * [C 語言常見誤解](https://zh.wikibooks.org/wiki/C_%E8%AA%9E%E8%A8%80%E5%B8%B8%E8%A6%8B%E8%AA%A4%E8%A7%A3) - [ ] Felix (dryman) * 如何運用 [autotools](http://www.sourceware.org/autobook/) 撰寫 C library * 使用 [IACA](https://software.intel.com/en-us/articles/intel-architecture-code-analyzer) 來分析高性能程式 * <s>Linker 的功用,還有可以調整的參數。(我只知道 stack 起始位置和大小是從 linker 設定的</s> > 詳見 [連結器和執行檔資訊](https://hackmd.io/@sysprog/c-linker-loader) 和 [動態連結器篇](https://hackmd.io/@sysprog/c-dynamic-linkage) * C 如何實作 python 等更高階語言的各種巫術 - [ ] Yoga * 自訂 [linker script](http://wen00072-blog.logdown.com/posts/246068-study-on-the-linker-script-0-table-of-contents) * <s>Macro 的奇技淫巧,例如 kernel 中的[container_of](http://lxr.free-electrons.com/source/include/linux/kernel.h#L840)和 [list_for_each_entry](http://lxr.free-electrons.com/source/include/linux/list.h#L446)等等</s>。以及 macro 和 static inline 的差別與使用時機。 > 已於 [linked list 和非連續記憶體](https://hackmd.io/@sysprog/c-linked-list) 探討 * <s>struct 結構中的對齊問題,如何才能讓所佔空間最小。</s> > 已於 [記憶體管理、對齊及硬體特性](https://hackmd.io/@sysprog/c-memory) 探討 * Vim 針對C語言環境的配置。 - [ ] gnitnaw * <s>Multithreading programming: 如何避免 race condition</s> > 詳見 [並行和多執行緒程式設計](https://hackmd.io/@sysprog/concurrency) 系列講座 - [ ] wheatdog * 對於 singer header file library (例如比較知名的 [stb](https://github.com/nothings/stb)) 的想法:效能上 * 對於 [Data-Oriented Programming](https://www.youtube.com/watch?v=rX0ItVEVjHc) 的想法 - [ ] [林博仁](mailto:Buo.Ren.Lin@gmail.com) * 正確的軟體自來源碼建構與安裝的概念 拋磚引玉:[循序漸進於 Ubuntu 16.04 上建構 Poedit](https://hackmd.io/lu2BMaEKT5-T8C5nfxuhkw#%E8%BB%9F%E9%AB%94%E5%AE%89%E8%A3%9D%E7%9A%84%E5%9F%BA%E6%9C%AC%E6%A6%82%E5%BF%B5Software-Installation-Basics) - [ ] Roman * <s>Docker 是如何在 Linux user space 中建立虛擬化容器映像的</s> > 預計在 Linux 核心設計講座探討 Docker 依賴的 namespace 機制 * Char, String, 多國語言處理 - [ ] [NisusTim](mailto:nisustim@gmail.com) * 嵌入式 C 語言的測試 (針對硬體相關的 driver) 參考資訊: [How we implemented TDD in Embedded C & C++](https://hiddeninplainsight.co.uk/wp-content/uploads/2016/09/How-we-implemented-TDD-in-Embedded-C-C-Byran-Wills-Heath.pdf) - [ ] ahbei * <s>coroutine 架構在真實世界的實作技巧、真實應用。例如在 C 語言下的泛型、多型實踐,如何用來實作一個有限狀態機,處理 I/O 通訊時如何維持真 - coroutine 的實踐 ...。參考資訊:[jserv 的部落格](http://blog.linux.org.tw/~jserv/archives/001848.html)</s> > 已於 [goto 和流程控制篇](https://hackmd.io/@sysprog/c-control-flow) 探討 coroutine,未來會在 [並行和多執行緒程式設計](https://hackmd.io/@sysprog/concurrency) 系列講座中強化 - [ ] [Blues](mailto:mykor.tw@gmail.com) * CMake 介紹 * C 語言常用 debug 工具介紹 (e.g., gdb, valgrind...) * C 語言 coding 安全性 (e.g., resource leak ...) - [ ] [ztex](liulyuch@amazon.com) * SMT solver 在 compiler, interpreter 的應用 * [Z3 Theorem Prover](https://en.wikipedia.org/wiki/Z3_Theorem_Prover) * [llvm: Verifying Optimizations using SMT Solvers](https://llvm.org/devmtg/2013-11/slides/Lopes-SMT.pdf) * [LLBMC: Bounded Model Checking of C and C++ Programs Using a Compiler IR](https://link.springer.com/chapter/10.1007/978-3-642-27705-4_12) * [Programming Z3](https://theory.stanford.edu/~nikolaj/programmingz3.html#sec-solver-interfacing) * [ESBMC-Solidity: An SMT-Based Model Checker for Solidity Smart Contracts](https://arxiv.org/pdf/2111.13117.pdf) > 應用: Solidity 是乙太坊(Ethereum) 基金會推出的語言,利用 z3 等 SMT-Based Model Checker 來檢查合約 * Linux kernel 中的 VMs 們, 會不會利用類似的機制來對 bytecode 做安全性檢查? > [eBPF verifier](https://ish-ar.io/ebpf-dive-into-the-verifier/) * GNU toolchain 等是否有類似機制在 compile time 做安全性檢查 - [ ] lambert wu 希望探討函式呼叫篇提到的安全篇,以及指標篇(下)談到的多國語言篇 - [ ] [Ca Chen](https://github.com/birdca) - hashtable 能有效找查資料,而在 C++ 裡也增加了 [unordered_set](https://en.cppreference.com/w/cpp/container/unordered_set) & [unordered_map](https://en.cppreference.com/w/cpp/container/unordered_map)。想知道 C 語言中如何在大量資料裡進行快速查表?或 C 語言偏好使用者自己動作做? > Leetcode 增加 [hthash](https://github.com/troydhanson/uthash) 讓 C 語言使用者能直接使用 hthash 因此好奇上面的問題。 - [ ] khienh - 希望探討C語言怎麼實作GUI - [ ] idoleat - 希望可以探討 C ABI 以及 FFI,他們是如何成為廣泛使用的 interoperate 界面的