Modern C for C++ Peeps
date: 2022-01-12 · Tags: #clang, #good-readingC++ is not a superset of C, vice versa, (modern) C is definitely not a subset of C++.
Rain's Rust CLI recommendations
date: 2022-01-23 · Tags: #rust, #cliPrefer to use clap
with the derive
feature. Try argh
, pico-args
for
smaller bundle size.
Useful Tool: command-to-found.com
date: 2022-01-22 · Tags: #cli, #toolsFinally I found this helper to locate detailed package when you got "command not found" in shell TAT
Useful Tool: RegexLearn
date: 2022-01-21 · Tags: #regexAwesome project to let you learn regex with interactive practices without pains !!!
软件工程是个面包机
date: 2022-01-12 · Tags: #insight, #good-reading, #career, #dev, #chineseStrongly recommended reading: Learn what does industry actually mean?
Remix vs Next.js
date: 2022-01-11 · Tags: #front-end, #good-reading, #webHow new framework desigh its features to compare old brother?
- Ergonic
- Use native web feature (SWR)
What I'm interested is the idea "work before Javascript"
What other things except of speed?
Unbuffered I/O Can Make Your Rust Programs Much Slower
date: 2022-01-07 · Tags: #rust, #til, #python, #dev- Use
strace
andperf
to count how many syscalls were invoked. - Yeah, Rust actually supports file I/O without buffer. It's may more simple in some situtations
Conclusion
In this post1, we saw that:
- System calls in Linux are slower than regular functions
- Issuing too many syscalls can have very negative effects on run-time performance
- By using
BufReader
andBufWriter
, we can amortize the cost of syscalls- Even experienced programmers can miss these issues
- We can use
strace
andawk
to find if and where unbuffered I/O happens in our programs
Footnotes
Best practices for writing code comments
date: 2022-01-04 · Tags: #til, #insight, #devGood rules for writting comments