Prev | Contents | Next

  1. https://beej.us/guide/bgc/↩︎

  2. https://en.wikipedia.org/wiki/ANSI_C↩︎

  3. https://en.wikipedia.org/wiki/POSIX↩︎

  4. https://visualstudio.microsoft.com/vs/community/↩︎

  5. https://docs.microsoft.com/en-us/windows/wsl/install-win10↩︎

  6. https://developer.apple.com/xcode/↩︎

  7. https://beej.us/guide/bgclr/↩︎

  8. https://en.cppreference.com/↩︎

  9. https://groups.google.com/g/comp.lang.c↩︎

  10. https://www.reddit.com/r/C_Programming/↩︎

  11. This doesn’t change the type of x in other contexts—it’s just in this one usage in this expression.↩︎

  12. Note that this implication only for main(), and not for any other functions.↩︎

  13. https://en.wikipedia.org/wiki/Complex_conjugate↩︎

  14. https://en.wikipedia.org/wiki/Riemann_sphere↩︎

  15. Really it’s just required to be a modifiable lvalue, so not necessarily a variable. But you can treat it as such.↩︎

  16. https://man.archlinux.org/man/errno.3.en↩︎

  17. https://docs.microsoft.com/en-us/cpp/c-runtime-library/errno-constants?view=msvc-160↩︎

  18. https://en.wikipedia.org/wiki/Subnormal_number↩︎

  19. The minimum value of an unsigned char is 0. Same fo an unsigned short and unsigned long. Or any unsigned type, for that matter.↩︎

  20. https://en.wikipedia.org/wiki/Two%27s_complement↩︎

  21. Remember that char is just a byte-sized integer.↩︎

  22. Though the system defines MATH_ERRNO as 1 and MATH_ERREXCEPT as 2, it’s best to always use their symbolic names. Just in case.↩︎

  23. https://en.wikipedia.org/wiki/Denormal_number↩︎

  24. This is on my system. Some systems will have different points at which numbers become subnormal, or they might not support subnormal values at all.↩︎

  25. https://en.wikipedia.org/wiki/E_(mathematical_constant)↩︎

  26. https://en.wikipedia.org/wiki/Denormal_number↩︎

  27. https://en.wikipedia.org/wiki/Pythagorean_theorem↩︎

  28. https://en.wikipedia.org/wiki/Error_function↩︎

  29. https://en.wikipedia.org/wiki/Error_function↩︎

  30. https://en.wikipedia.org/wiki/Gamma_function↩︎

  31. https://en.wikipedia.org/wiki/Gamma_function↩︎

  32. https://en.cppreference.com/w/c/numeric/math/remquo↩︎

  33. https://en.cppreference.com/w/c/numeric/math/remquo↩︎

  34. A quiet NaN is one that doesn’t raise any exceptions.↩︎

  35. https://man.archlinux.org/man/sigaction.2.en↩︎

  36. As if might be sent from Unix’s kill command.]↩︎

  37. https://en.wikipedia.org/wiki/Data_structure_alignment↩︎

  38. Maybe it depends on the run-time environment and can’t be known at compile-time.↩︎

  39. https://en.cppreference.com/w/cpp/atomic/ATOMIC_VAR_INIT↩︎

  40. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1138r0.pdf↩︎

  41. This effectively does the same thing, but it’s clearly not atomic.↩︎

  42. The spec says, “This spurious failure enables implementation of compare-and-exchange on a broader class of machines, e.g. load-locked store-conditional machines.” And adds, “When a compare-and-exchange is in a loop, the weak version will yield better performance on some platforms. When a weak compare-and-exchange would require a loop and a strong one would not, the strong one is preferable.”↩︎

  43. Don’t use this unless you know what you’re doing—use the thread mutex functionality instead. It’ll let your blocked thread sleep and stop chewing up CPU.↩︎

  44. Don’t use this unless you know what you’re doing—use the thread mutex functionality instead. It’ll let your blocked thread sleep and stop chewing up CPU.↩︎

  45. https://en.wikipedia.org/wiki/Data_structure_alignment↩︎

  46. https://man.archlinux.org/man/unlinkat.2.en#DESCRIPTION↩︎

  47. https://man.archlinux.org/man/mkstemp.3.en↩︎

  48. https://nee.lv/2021/02/28/How-I-cut-GTA-Online-loading-times-by-70/↩︎

  49. https://stackoverflow.com/questions/17017331/c99-vscanf-for-dummies/17018046#17018046↩︎

  50. http://man.cat-v.org/unix-1st/3/atof↩︎

  51. http://man.cat-v.org/unix-1st/3/atoi↩︎

  52. https://en.wikipedia.org/wiki/Radix↩︎

  53. https://stackoverflow.com/questions/10984974/why-do-people-say-there-is-modulo-bias-when-using-a-random-number-generator↩︎

  54. https://mumble.net/~campbell/2014/04/28/uniform-random-float↩︎

  55. https://www.gnu.org/software/gsl/doc/html/rng.html↩︎

  56. Minecraft enthusiasts might recall that when generating a new world, they were given the option to enter a random number seed. That single value is used to generate that entire random world. And if your friend starts a world with the same seed you did, they’ll get the same world you did.↩︎

  57. https://en.wikipedia.org/wiki/Unix_time↩︎

  58. The C spec doesn’t say exactly what time(NULL) will return, but the POSIX spec does! And virtually everyone returns exactly that: the number of seconds since epoch.↩︎

  59. https://en.wikipedia.org/wiki/Data_structure_alignment↩︎

  60. “Try to imagine all life as you know it stopping instantaneously and every molecule in your body exploding at the speed of light.” —Egon Spengler↩︎

  61. https://en.wikipedia.org/wiki/Core_dump↩︎

  62. quick_exit() differs from exit() in that open files might not be flushed and temporary files might not be removed.↩︎

  63. “In-place” meaning that the original array will hold the results; no new array is allocated.↩︎

  64. It always returns the number of bytes the transformed string took, but in this case because s1 was NULL, it doesn’t actually write a transformed string.↩︎

  65. Which you should because of spurious wakeups.↩︎

  66. Well, as at least as many things as you have free cores. Your OS will schedule them as it can.↩︎

  67. For example, if a destructor caused more variables to be set.↩︎

  68. Unix-like systems have a sleep() syscall that sleeps for an integer number of seconds. But thrd_sleep() is likely more portable and gives subsecond resolution, besides!↩︎

  69. When you say GMT, unless you’re talking specifically about the time zone and not the time, you probably mean “UTC”.↩︎

  70. The spec doesn’t actually say “clock ticks”, but I… am.↩︎

  71. Unless you’re on a POSIX system where time_t is definitely an integer, in which case you can subtract. But you should still use difftime() for maximum portability.↩︎

  72. https://man.archlinux.org/man/timegm.3.en↩︎

  73. https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/mkgmtime-mkgmtime32-mkgmtime64?view=msvc-160↩︎

  74. https://en.wikipedia.org/wiki/Unix_time↩︎

  75. https://en.wikipedia.org/wiki/ISO_week_date↩︎

  76. https://en.wikipedia.org/wiki/Symbols_for_Legacy_Computing↩︎

  77. https://stackoverflow.com/questions/17017331/c99-vscanf-for-dummies/17018046#17018046↩︎

  78. This is a variable, not a macro, so if you use it to define an array, it’ll be a variable-length array.↩︎


Prev | Contents | Next