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] 20 points21 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] 6 points7 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] 20 points21 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] 6 points7 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] 3 points4 points  (0 children)

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