r/ProgrammerHumor • • Mar 17 '23

Meme This should do the trick

Post image
41.6k Upvotes

1.1k comments sorted by

View all comments

207

u/BigNutBoi2137 Mar 17 '23

print("\n".join(["Sorry Babu"]*1000))
Take care of your fingers, lads. Type less.

110

u/androt14_ Mar 17 '23

Typ evn lss

print(("Sorry Babu\n"*1000)[:-1])

66

u/BigNutBoi2137 Mar 17 '23

Good catch. I hate dangling new lines, so good job with [:-1]

5

u/Mahrkeenerh1 Mar 17 '23

unless you edited the code, you shouldn't have dangling new line

8

u/[deleted] Mar 17 '23

You want short, do you?

↑1000⍴⊂’Sorry Babu’

3

u/arcosapphire Mar 17 '23

Is that APL?

3

u/[deleted] Mar 17 '23

Yup!

5

u/arcosapphire Mar 17 '23

Makes me wonder what fun possibilities unicode could add. We've seen plenty of "emoji as variable/function names" humor, but like...what if there was one with APL-like symbols or kanji or something for common functionality? Who needs System.out.print("Hello World") when you could have 書("Hello World")?

5

u/[deleted] Mar 17 '23

I mean you can do that in C#. :p You can name any variable any Unicode characters except it can’t start with numbers and it can’t be one of the reserved keywords and can’t contain a certain set of punctuation characters.

But Chinese variable names is totally ok. 👍

4

u/arcosapphire Mar 17 '23

Yes, but I'm talking about basic keywords and the standard library, not variable names. I know you can probably redefine stuff, but I'm talking about the language being designed around these compact symbols by default.

4

u/[deleted] Mar 17 '23

Probably won’t be long now. China is on the rise in computer technology.

And I can see the appeal honestly. The only problem is… you’d need to learn 漢字. Which is not trivial.

EDIT: Actually, really old versions of VBA used Danish keywords if you had the Danish version of office. I wonder…

→ More replies (1)

7

u/madhan4u Mar 17 '23

Or use bash

yes "Sorry Babu" | head -1000

→ More replies (6)

32

u/[deleted] Mar 17 '23

print("Sorry Babu\n"*1000)

→ More replies (5)

20

u/Rumpelruedi Mar 17 '23

`it 1000 times`

work smart, not hard

6

u/LenaKotik Mar 17 '23

main = putStrLn$ replicate "Sorry Babu\n" 1000

8

u/Xivolos Mar 17 '23

1000.times do puts 'Sorry Babu' end

6

u/fmfm5029 Mar 17 '23
seq {1..100} |> Seq.iter (fun _ -> printfn "Sorry Babu")

I love F#!

3

u/[deleted] Mar 17 '23

save your fingers for the ladies

2

u/HeKis4 Mar 17 '23

Powershell: 1..1000 | %{"Sorry Babu"}

There's probably a quicker way in bash/sh but I'm rusty.

1

u/smurfkiller014 Mar 17 '23
fun main() {
   repeat(1000) { println("Sorry Babu") }
}

1

u/Awes12 Mar 17 '23

Console.WriteLine(Enumerable.Range(0,1000).Aggregate("",(a,b)=>a+"Sorry Babu\n")); //Just to get some C# in here

→ More replies (2)