srxl

fox on the internet

23 / none gender with left girl / straya mate

shitposting and weirdo computer nerd stuff, but mostly shitpostiing


ℹ️ This user can say it.
⚠️ This user will never forget this place.

last.fm recently played for srxl_


webbed site
srxl.me/
website league
@ruby@isincredibly.gay (instance: https://posting.isincredibly.gay/)
is it over?
no
when will it be over?
when we let ourselves forget
i don't want to forget.
i will never forget
are you still here?
always
will you leave?
never
i loved this place.
and i loved you too
goodbye.
and hello, to our new homes

posts from @srxl tagged #programming

also: #software development, #coding

That whole John Donne quote — “No man is an island” — is especially true when we’re talking about tech, because when you scratch beneath the surface, every system that looks like it’s independent is actually heavily, heavily dependent on services and software provided by a very small number of companies, many of whom are not particularly good.

This is as much a cultural failing as it is a technological one, the result of management geared toward value extraction — building systems that build monopolies by attaching themselves to other monopolies.

Every single major tech organization should see today as a wakeup call — a time to reevaluate the fundamental infrastructure behind every single tech stack.

What I fear is that they’ll simply see it as someone else’s problem - which is exactly how we got here in the first place.



emacs is my canvas, typescript is my paintbrush, and npm is where i source my pigments. every line of code i write is a reflection of my mind's state at the time i write it - who am i writing for? what am i trying to achieve? do i value performance above all else, or am i content to leverage slower abstractions to make my work more legible? legible to who? how have i modeled the problem in my mind? is my documentation formal and legible, or am i getting pissed off at my tools and inserting snarky comments here and there?

software development is an artform, a creative process. there is beauty to be found in code if you are willing to look beyond the utilitarian, strict engineering mindset that is the default for many.



Given the following C++ (not C!) input file:

#include <stdio.h>

int main() {
    while (1);
}

void oopsies() {
    printf("tee hee fucky wucky :3");
}

Compiling this with clang 13 or newer, with -O1 or higher, results in the output:

> ./compiled
tee hee fucky wucky :3

Godbolt reveals the following output:

main:                                   # @main
oopsies():                            # @oopsies()
        push    rax
        mov     edi, offset .L.str
        xor     eax, eax
        call    printf
        pop     rax
        ret
.L.str:
        .asciz  "tee hee fucky wucky :3"

which is uhhhhh Yeah Thats Not Right

what i think is happening:

  • clang sees infinite loop and goes "ah cool, i don't need to insert a ret here since this wont terminate
  • clang also decides to optimize out the infinite loop for Some Fucking Reason
  • as a result, we're left with a completely empty main with no ret

is there like some undefined behaviour Spooky Activity going on here? why is it Do That? and why only for c++ and not c, where it correctly keeps the infinite loop?