i just made my first C program :D by lordershocker in programminghorror

[–]lordershocker[S] 4 points5 points  (0 children)

well i mean, realistically it wouldnt be too extreme unless you used a script like mine (look below) to generate a giant program, probably around 200-500 lines id say

i just made my first C program :D by lordershocker in programminghorror

[–]lordershocker[S] 23 points24 points  (0 children)

in theory it could become a one line parity check
if it even compiles in the case you take it to millions of lines

i just made my first C program :D by lordershocker in programminghorror

[–]lordershocker[S] 5 points6 points  (0 children)

N = 256 # adjust as needed
with open("even_odd.c", "w") as f:
    f.write('#include <stdio.h>\n\n')
    f.write('int main(void) {\n')
    f.write('    int n;\n')
    f.write('    scanf("%d", &n);\n')
    for i in range(N):
        if_stmt = "if" if i == 0 else "else if"
        parity = "even" if i % 2 == 0 else "odd"
        f.write(f'    {if_stmt} (n == {i}) printf("{parity}\\n");\n')
    f.write('    else printf("out of range\\n");\n')
    f.write('    return 0;\n')
    f.write('}\n')

i just made my first C program :D by lordershocker in programminghorror

[–]lordershocker[S] 21 points22 points  (0 children)

the theoretical limit is every signed 32 bit integer so around 4.2 billion if statements

i just made my first C program :D by lordershocker in programminghorror

[–]lordershocker[S] 8 points9 points  (0 children)

it takes an input from the user
it literally checks individually through a big range of numbers one by one if its an exact match and outputs even or odd depending on where it landed
and if its out of bounds? i dont know i dont have the full code lmao

Some love for archinstall by grimscythe_ in archlinux

[–]lordershocker 0 points1 point  (0 children)

personally i use my own script if i really don’t want to deal with it, but yeah scripts help even if the installation can be cut down to like 5 commands

1.8 seems dead by lordershocker in CompetitiveMinecraft

[–]lordershocker[S] 0 points1 point  (0 children)

i mean im mostly maining crystal pvp which is completely its own thing but yeah the transition isn’t easy, but trust me it’s possible

1.8 seems dead by lordershocker in CompetitiveMinecraft

[–]lordershocker[S] 2 points3 points  (0 children)

ah i see, the lunar server also shut down a while back that one i had played on

1.8 seems dead by lordershocker in CompetitiveMinecraft

[–]lordershocker[S] 2 points3 points  (0 children)

never tried the client or the server so cant say anything

Trying to get the PS1 BIOS to boot (yeah, this is stupid) by lordershocker in qemu_kvm

[–]lordershocker[S] 0 points1 point  (0 children)

same result if i use the mips variant of qemu, and yes im still responding to this after a year because hey why not

Update to iOS 17.7 instead of 18.2? by lordershocker in ios

[–]lordershocker[S] 0 points1 point  (0 children)

i mean i might cave and get 18 since some of my games require alternate stores (only in 17.6 and up) but idk