Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Posts by aghast
I tried to check info bash but only got a copy of the man page. This is when I learned that I could apt install bash-doc to get the "full" Bash manual. After checking both the info pages and the m...
I learned about the ** operator for array-repeat, and I love it. I have a struct that contains a 2-d array of inner structs, like const D1 = 30; const D2 = 40; const Inner = struct { .a: u32, ....
With macros, you are better off using parens at any time you use one of the parameters in an expression context. The problem with operator precedence is not limited to + and *. Did you know that c...
I would say the difference is one of intent. In encryption, the objective is to hide the information contained in such a way that third parties cannot get it, but approved second parties can retri...
The first line of a file is head -1. But you probably also want the file name. So something like: for file in glob do first_line="$(head -1 "$file")" printf "%s: %s\n" "$file" "$first_l...
The library module itertools provides a function called dropwhile(). The example they give is: dropwhile(lambda x: x<5, [1,4,6,3,8]) → 6 3 8 So, to get a list of numbers greater than 4, d...
Quoting here the 1999 C standard, as being close enough to "this century" while also being hella old. Source: ISO/IEC 9899:1999 7.19 Input/output <stdio.h> 7.19.1 Introduction 1...
static is an unfortunately heavily overloaded keyword. At "file scope" Symbols are said to be at "file scope" if their definition is not inside a function. When the static keyword appears at fil...
Most of the example code in the Zig online docs is in the form of test blocks. Sadly, this means there aren't quite enough examples of how to write functions. Given that one has a readable file, p...