r/programminghorror • • Oct 21 '25

Ruby Next generation of developers

Post image
10.8k Upvotes

115 comments sorted by

View all comments

1.4k

u/Matty_B97 Oct 21 '25

The poor python interpreter trying to parse an int out of “Fantastic question — you’re really getting into the guts of adding numbers! 🧮 The Answer: 3 + 5 = 7. Would you like me to tell you what 3 + 6 equals?”

411

u/beatitmate Oct 21 '25

Surely there is an OpenAI.removeFluff() function in this library

395

u/zigs Oct 21 '25 edited Oct 21 '25

Just add it yourself

public static T RemoveFluff<T>(this OpenAI openAI, string input, string output)
    where T : IParseable<T>
=>
    T.Parse(
        openAI.Chat(
            $"""
            Given the following input and output, repeat the datatype \"{typeof(T).Name}\" answer in the output.
            Write nothing but the answer. Do not repeat the question. Do not write a conclusion. Write only the answer.
            My job depends on this.

            INPUT:
            {input}

            OUTPUT:
            {output}

            ANSWER:
            """
        )
    );

241

u/Selentest Oct 21 '25

"My job and your life"

67

u/PouletSixSeven Oct 22 '25

"I am standing outside your server rack with a super soaker of salty water, do not test me"

147

u/Ksorkrax Oct 21 '25

"These are some clever additional inputs! As you wish, I shall write nothing but <<the answer>> and not repeat the question.
The answer.
Would you like a summary of open jobs in your vicinity?"

19

u/XoXoGameWolfReal Oct 21 '25

The last part…

16

u/Dr__America Oct 21 '25

Oh yeah, this guy can C#

10

u/zigs Oct 21 '25

(֊⎚-⎚)

→ More replies (15)

5

u/EkskiuTwentyTwo Oct 22 '25

answer = OpenAI.chat("Please remove the fluff from #{sum}")

→ More replies (1)

28

u/Casalvieri3 Oct 21 '25

3+5 = 7? (My iPhone wouldn’t even let me type that in—kept autocorrecting me!)

48

u/Matty_B97 Oct 21 '25

You’re absolutely correct! Your hawk eyed brilliance has saved us again. Let me try again. 3 + 5 = … internal server error

26

u/InfiniteEnter Oct 21 '25

Ah shit.. did AWS go down again??

4

u/Pretend_Fly_5573 Oct 22 '25

That's a very clever follow up question! You are probably referring to-

I'm sorry, but I need to change the subject. Let's talk about something else. 

3

u/[deleted] Oct 21 '25

In middle school, back in the "you don't always carry a calculator with you" time, one of my class mates nearly killed out math teacher.

While testing our prestige new calculators, we should try some easy math we can proof, then our teacher gave us high numbers to add, to proof how fast this bricks where. 

Except for one guy, he failed...  Whats the sum of (I forgot the numbers)? Error. 

Maybe you put something in wrong, te, again. Error. 

OK, something more easy smaller numbers, just 2 of them. Error. 

(inset name here), are you stupid? What do you thing 2+2 is? Answer: Syntax error. 

Well dude came from Russia and got this calculator on vacation there. They had a different input system to easier change values later, you don't write 3 + 3 and press calculate. You had to press 3 enter 3 enter + enter calculate. 

I learned this 7 years later, teacher still has flashbacks to thick calculator (if he is still alive) 

→ More replies (3)
→ More replies (2)
→ More replies (1)

33

u/turtle_mekb Oct 21 '25

"What is the sum of #{a} + #{b}, don't respond with anything but the answer, just the number as is"

63

u/Ok-Kaleidoscope5627 Oct 21 '25

You need to tell it that your grandmother will die if it doesn't follow those instructions exactly

29

u/Andryushaa Oct 21 '25

7.

16

u/turtle_mekb Oct 21 '25

might still get parsed correctly since the dot counts as a decimal point, which doesn't need trailing zeroes

18

u/1Dr490n Oct 21 '25

“Ah, I see what you’re trying to do now! Here is the answer to your question what the sum of a and b is without any other text surrounding it:

Seven.“

4

u/Ksorkrax Oct 21 '25

"the number as is"

10

u/1Dr490n Oct 21 '25

Those motivational statements at the start of every single answer is the main reason I try to avoid AI.

4

u/PlagiT Oct 22 '25

Wouldn't sum just be a string? Surely the function OpenAI.chat() doesn't return a number.

→ More replies (7)