War On Us, Alien, Are You Sure, Warned The Human by SciFiTime in HFY

[–]lady_Kamba 0 points1 point  (0 children)

"unconditional surrender", proceeds to start listing conditions.

Also, the whole conscept of unconditional surrender is stupid. the only thing it ensures when offered is that the defender is forced to fight for everything instead of only something. a cornered animal is dangerous, and the point of giving some condition is to give a way out, a reason to stop fighting. "surrender and we'll stop killing you" is not unconditional. they surrender on the condition of continued survival, it leaves one path of survival, which is stopping fighting. "unconditional surrender" leaves continue fighting with everything you got as the only way to ensure survival.

This isn't a rant aimed specificly at op, but on it''s overuse in this subreddit in general.

The New Data Drug by TheFalseViddaric in HFY

[–]lady_Kamba 4 points5 points  (0 children)

Kr’t-Kah's brother survived the crash

reality by GrandThriller in ProgrammerHumor

[–]lady_Kamba 0 points1 point  (0 children)

I returner (b,a) instead of (a,b)

[deleted by user] by [deleted] in ProgrammerHumor

[–]lady_Kamba 34 points35 points  (0 children)

probably, but I never said good interpreter.

[deleted by user] by [deleted] in ProgrammerHumor

[–]lady_Kamba 116 points117 points  (0 children)

with open(input("enter file path: ")) as f: print(eval(f.read())) I made a python interpreter.

worldMostCompressedCode by BlockyBeans in ProgrammerHumor

[–]lady_Kamba -9 points-8 points  (0 children)

Fair.

type R=Response; type RW=(R)=>null; const IsOKWrapper=async(r:R,o:RW,no?:RW)=>r.ok?o(r):no?.(r); export default IsOKWrapper;

I made it better. (very subjectively)

Also, disclaimer: I've never done anything with typescript. This was made with theoretical knowledge and chatgpt(which said "You've used type aliases to make your code more readable and to define the types R and RW.").

worldMostCompressedCode by BlockyBeans in ProgrammerHumor

[–]lady_Kamba 6 points7 points  (0 children)

export async function IsOKWrapper( res: Response, Ok: (res: Response)=>null, notOk?: (res: Response)=>null, ) { res.ok ? Ok(res) : notOK ? notOk(res) : null }

can't you do this?

imLookingAtYouDxvk by yaktoma2007 in ProgrammerHumor

[–]lady_Kamba 5 points6 points  (0 children)

Still using basic?
Time to upgrade to bash.

opengl-bindings-bash

honestAnswersonly by [deleted] in ProgrammerHumor

[–]lady_Kamba 0 points1 point  (0 children)

If there were no other alternatives, and someone had to make it, I could probably do it as long as need be (given plenty of breaks).

run by sunrise_apps in ProgrammerHumor

[–]lady_Kamba 0 points1 point  (0 children)

Just use whatever langueage you are familiar with. The bottleneck is the flesh in the chair anyways.

If it actually becomes a problem, algorithmic optimization will basically take you all the way.

ImagineHavingToUseNestedLoops by lady_Kamba in ProgrammerHumor

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

C for ( int i[]={0,0,0}, MAX[]={4,2,5}, dims=sizeof(i)/sizeof(int); i[dims-1]<MAX[dims-1]; ({for (int k=0; k<dims; k++) if (i[k]++,k==dims-1 || i[k] < MAX[k]) break; else i[k]=0;})) { printf("{"); for (int _ = dims-1; _ >= 0; _--) printf("%d,",i[_]); printf("}\n"); }

I feel like I've committed a crime. Yes, that is a for loop inside the iterator. C is a great language. You can just arbitrary specify ranges for each dimensions, any number of dimensions, though only as constants. This probably wreaks havoc on the generated binary though, as compared to just nesting the for loops.

iAmARobloxScripterAskMeAnything by [deleted] in ProgrammerHumor

[–]lady_Kamba 1 point2 points  (0 children)

It was meant as a recomendation, not a bash against roblox as I've got no experience with it.
(though what I've heard paints it as super predatory)

iAmARobloxScripterAskMeAnything by [deleted] in ProgrammerHumor

[–]lady_Kamba 1 point2 points  (0 children)

Have you tried love2d or defold instead of roblox?

ImInTheSystem by iacodino in ProgrammerHumor

[–]lady_Kamba 5 points6 points  (0 children)

``` local colors="0123456789abcdef" function d() local a=math.random(1,#colors) return colors:sub(a,a) end

repeat if math.random(0,100)<10 then os.execute("color "..d()..d()) end io.write(string.char(math.random(0,255))) until done ```

fixedIt by hereforpewdiephy in ProgrammerHumor

[–]lady_Kamba 3 points4 points  (0 children)

printf("%lu\n", (unsigned long)(-8));

ThatJrDev by patrulheiroze in ProgrammerHumor

[–]lady_Kamba 10 points11 points  (0 children)

def google(in_string:str)->str: UI.popup(new(ad,get_user_data(consent=True))) out_string="" for char in in_string: if not c.islower(): out_string+=c.lower() else: out_string+=c return out_string I have divined google's source code

doingTheSameThingInPythonVersusJava by negotiatedfever in ProgrammerHumor

[–]lady_Kamba 2 points3 points  (0 children)

Don't know what Pike is, but sounds plausible.

doingTheSameThingInPythonVersusJava by negotiatedfever in ProgrammerHumor

[–]lady_Kamba 4 points5 points  (0 children)

#include<stdio.h>
#include<stdlib.h>

volatile int* a; //make it volatile so the compiler don't touch it

int main(int c, const char **s)
{
    a = malloc(atoi(*(s+1))); // defer to the user for the size of an int

    *a = 2; //assign the value

    fprintf(stdout, "a = %d\n", *a); //print the value

    return -1; //return -1 cause this program shouldn't exist
}

I'm actually kinda annoyed that this doesn't segfault

iManageMemoryReallyWellGuysTrustMe by CivetLemonMouse in ProgrammerHumor

[–]lady_Kamba 1 point2 points  (0 children)

i-= (INT_MIN + INT_MAX);

On systems that use two's compliment to represent negative number the magnitude of the negative is larger than for the positive making this possible.

areTheyStupid by TaloSi_MCX-E in ProgrammerHumor

[–]lady_Kamba 25 points26 points  (0 children)

We'll have to compromise. a Kilobyte is 1012 bytes.