rants and shitposting
Content warning: strong language and strong opinions.I’m not here to convince you of my strong opinions. You may say that’s totally my “skill issue” or personal biased taste; but rants are rants – they are subjective. Like there is no shame for a linux beginner to complain about the plethora of inconsistent GNUism.
- Declare an array of type
T
and lengthn
- text editors edits text
- CMake - it’s like learning another exotic language
- FOSS vs proprietary
- AI generated banner image
- Namespaces, please don’t omit them…
- XyzSky and Xyzreads, history just repeats
- Can you tell me how?
- C++ compiler (GNU) error messages are trash.
#
Declare an array of type T
and length n
- C
T name[n]
- Rust
let name:[T;n]
- Go
var name[n]T
- Zig
var name: [n]T
- Hare
let name: [n]T
- Java
T[] name = new T[n]
# text editors edits text
repeat after me: T-E-X-T editor! What’s the fucking point of pulling out a CNC machine and call it “a better knife”?
vi is a text editor, neovim is a text editor, lunar/astro/nvchad/* is not a fucking text editor. Just be honest with yourself. When you want a debugger, a languague server, a treesitter, a VCS integration, a rocket launcher … in your workflow, say it out loud that you want an IDE (just because you control the “I” of the “IDE” doesn’t change what it is.)
There is no elitism in this rant: I use whatever get things done. The point is, arguing about the “the best text editor for programming” is just pointless.
# CMake - it’s like learning another exotic language
like, wtf?
target_compile_options(tutorial_compiler_flags INTERFACE
"$<${gcc_like_cxx}:$<BUILD_INTERFACE:-Wall;-Wextra;-Wshadow;-Wformat=2;-Wunused>>"
"$<${msvc_cxx}:$<BUILD_INTERFACE:-W3>>"
)
# FOSS vs proprietary
- FOSS: it’s unfunded voluntary works and we can’t care too much to improve “non-critical” stuffs like UI/UX
- Proprietary: we are subject to capitals so we will spend xyz human-hours to deliberately fuck it up
Please donate to FOSS.
>  
# AI generated banner image
Just came across this article on fediverse. https://embeddedor.com/blog/2024/09/28/one-simple-and-rewarding-way-to-contribute-to-the-linux-kernel-fix-coverity-issues/
NOTE: this is not a comment on the cited article itself. I’m only talking about the way it uses a AI generated Tux banner image.
Like, wtf is this banner image… I get it that you want a copyright-free image as a banner… fair, I’m not gonna debate whether you need a banner in the first place1 but here I have a better solution:
Instead of serving the static image on your server, you simply embed the origin prompt as an HTML extension:
<ai>
<description> This is an alt text </description>
<prompt> Cartoon style, linux Tux, terminals, code, programming </prompt>
<model> Waifi-diffusion </model>
</ai>
For those who are interested, they can use a browser plugin to feed the prompt to a online model and embed the generated image in place.
# Namespaces, please don’t omit them…
Generally speaking I like the idea of namespaces, the absense of which can be a real pain C’s ass when you have a larger codebase. That said:
|
|
When I see this while reading a unfamiliar codebase, my blood pressure raises. For me especially:
- I normally don’t use IDEs (or by extension, LSPs)2 so I can’t just see the definition of a function/variable just by clicking them.
- Instead I would grep for filenames and strings.
For the sake of line width, use
shorter alias!!!;
The notation of using namespace xyz;
is an obfuscation.
# XyzSky and Xyzreads, history just repeats
And again, and again, you are fed up with some SNS’s bullshit and decide to move to another. Yet you are moving from one tech-giant spyware to another tech-giant spyware.
There is no self autonomy in XyzSky or Xyzreads, it’s just another centralized capitalist shitdump that pretends “federation / self-host / opensource” or whatever. THEY DON’T GIVE A FUCK ABOUT NOTHING BUT YOUR DATA.
# Can you tell me how?
it’s quite often that I want abc features from a software I use; while I search the issues I find a “feature requrest” issue where others asked for exactly the same thing, and that issue is closed as “complete”, and the maintainer says this is resolved/added in newer versions. And? How the heck do I use it then? I know this may be a quirk that may not deserve much documentation. But you fixed it, how do I use it???? And often I have to read through the commit and read the code to understand what steps are needed to enable that feature.
It would be absolutly charming if, after completing a feature request, or resolving an issue, you kindaly leave a comment in the thread like:
“now you can use it by <insert instructions>”
# C++ compiler (GNU) error messages are trash.
Don’t tell me it’s a skill issue. The error message often reveals nothing about the error itself, but the consequence caused by the error. Like what, I have to reverse engineer the result into the cause? What do I need you for then??
gcc is pretty much the same but C is a much simpler language and in most cases I know what I’m doing and I know what’s going wrong.
-
I reserve my opinion that banner image is 99% of the time POINTLESS, if not a total waste of resources. ↩︎
-
Even with a language server, it often can’t correctly handle library functions well; Worse if you have compile time generated headers etc., e.g. protobuf, or AspectC++. But that’s another topic. ↩︎