Random references
FFI
Interface that allows code written in one language to call code written in another language
It sits between a program and a library, and handles, at runtime, the differences in ABI and marshalling of data between function calls
Audio
- Miniaudio
- DirectSound (Windows API)
- Game Audio Learning Resources
- Audio
- Audio API Quick Start Guide
- How Sounds Get Into Games - Fundamentals Of Game Audio Implementation
CLI
Remember to turn the term into a raw term
man cfmakeraw
Modify output style with CSI commands, ie:
CSI_CLEAR_ALL "\x1B[0J"
CSI_HIDE_CURSOR "\x1B[?25l"
CSI_SHOW_CURSOR "\x1B[?25h"
CSI_MOVE_TO_TOP_LEFT "\x1B[H"
Some UI Characters:
// ======================= //
// ┌─┬─┐ ╔═╦═╗
// ├─┼─┤ ╠═╬═╣
// │ │ │ ║ ║ ║
// └─┴─┘ ╚═╩═╝
// Reference: https://www.unicode.org/charts/PDF/U2500.pdf
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
// U+250x ─ ━ │ ┃ ┄ ┅ ┆ ┇ ┈ ┉ ┊ ┋ ┌ ┍ ┎ ┏
// U+251x ┐ ┑ ┒ ┓ └ ┕ ┖ ┗ ┘ ┙ ┚ ┛ ├ ┝ ┞ ┟
// U+252x ┠ ┡ ┢ ┣ ┤ ┥ ┦ ┧ ┨ ┩ ┪ ┫ ┬ ┭ ┮ ┯
// U+253x ┰ ┱ ┲ ┳ ┴ ┵ ┶ ┷ ┸ ┹ ┺ ┻ ┼ ┽ ┾ ┿
// U+254x ╀ ╁ ╂ ╃ ╄ ╅ ╆ ╇ ╈ ╉ ╊ ╋ ╌ ╍ ╎ ╏
// U+255x ═ ║ ╒ ╓ ╔ ╕ ╖ ╗ ╘ ╙ ╚ ╛ ╜ ╝ ╞ ╟
// U+256x ╠ ╡ ╢ ╣ ╤ ╥ ╦ ╧ ╨ ╩ ╪ ╫ ╬ ╭ ╮ ╯
// U+257x ╰ ╱ ╲ ╳ ╴ ╵ ╶ ╷ ╸ ╹ ╺ ╻ ╼ ╽ ╾ ╿
// ======================= //
Latency
Latency Numbers Programmer Should Know
- 1-10 ns : L1 and L2 Cache
- 100-1000 ns : System call
- 10-100 µs : 1MB sequential read.
- 100-1000 µs : SSD Write. Intrazone (within AZ) network round trip.
- 1-10 ms : Interzone (AZ to AZ) round trip
- 100-1000 ms : TLS Handshake
- 1 s : 1GB Transfer interzone
Virtualization
Base components
- KVM. Kernel module that handles CPU and memory communication
- qemu. Emulation hardware components such as disk, network, usb, etc. It can emulate cpu, but most likely it will delegate it to the KVM
- libvirt. High level api to manage virtualization components
Clients using libvirt
- virsh: CLI that communicates with libvirt
- virt-manager: GUI alternative to virsh
- virt-install
- virt-viewer
Linux Hypervisor Setup (libvirt/qemu/kvm)
Vim tricks
Manipulate a file in binary
:%!xxd
// to revert
:%!xxd -r