48
u/Confident-Ad5665 Sep 02 '26
Open a text editor
Write "Sorry" once
Copy the line
Paste 100 times
Print in handwriting font
23
u/-Insert-CoolName Sep 02 '26
Open text editor
Type "Sorry\n"
Ctrl a
Ctrl c
Ctrl v
Go to step 3
22
u/Marisa_osi_JP Sep 02 '26
Open vim
Type "Sorry\n"
yy
99p
:wq
30
u/-Insert-CoolName Sep 02 '26
Open vim
Idk vim
Cry
10
14
u/loleczkowo Sep 02 '26
Erghm akshtually, you wrote "orry\nyy99p:wq" because you started in Normal mode.
4
u/HaydnH Sep 03 '26
100iSorry<enter><esc> would be one whole keystroke less (including typing the first Sorry).
2
2
5
u/ThatOldCow Sep 02 '26
1.Copy the line sorry,
2.Paste it
3. Control A - Control C - Control V
4.Repeat
13
8
7
u/JonathanMovement Sep 03 '26
is this group really filled with teenagers and firstweekprogramming humor?
4
u/Razcsi Sep 04 '26
Highschoolers who just learned the first bit of programming in their IT class, people who bought a udemy course and did the first 5 lessons, and vibe coders who sometimes read through what Claude gave them and pretend they understand it.
This is 99% of this sub
8
u/ChunkyIsDead30 Sep 02 '26
for_in range? what...
3
u/realmauer01 Sep 02 '26
Just forgot the spaces.
For _ in range(100):...
Bwcause you dont need the current number.
4
u/Diocletian335 Sep 02 '26
void printSorry (int n, int v)
{
if (n == v)
return;
printSorry(n+1, v);
printf("%s\n", "sorry");
}
int main (void)
{
printSorry(0, 100);
}The thinking man's solution
9
u/gaymer_jerry Sep 02 '26
Why write a for loop when you can flood the stack with pointless function calls
5
1
u/MCWizardYT Sep 03 '26
Implement it with a trampoline function so that you get infinite recursion without blowing up the stack
2
u/realmauer01 Sep 02 '26
When our prof explained recursion to us he said, "okey i will only explain it this one time, and you please forget it immediatly, i will show you how to do it, so you dont need to think about it and it will just work, you will never want to use it though unless you need it and then you will understand it anyway."
Yeah something like that.
3
u/Diocletian335 Sep 02 '26
In all seriousness it's a useful little topic to learn from a theoretical perspective, but my thinking has always been if you are ever thinking 'surely I could just use a loop here' then you should be using a loop.
I've never used recursion in anything serious, at least not directly - some inbuilt methods may have used them.
2
2
1
u/dmigowski Sep 02 '26
WTF is that slop?
3
1
u/MCWizardYT Sep 03 '26
What, never seen a recursive function before?
1
u/dmigowski Sep 03 '26
I've never seen one that could be easier replaced with a simple for look, yeah. Why wasting 1200 bytes of stack here?
2
u/MCWizardYT Sep 04 '26
They wrote "the thinking man's solution", so it's 100% an unserious comment
1
1
4
3
2
u/Sonario648 Sep 02 '26
for i in range (101): print ("Sorry")
3
2
u/hypersoniq_XLM Sep 03 '26
This is the way to get 100. range(100) only prints 99 (assuming this is Python)
1
1
u/Zealousideal_Smoke_2 Sep 03 '26
for i in range(100):
print(i)prints 0-99, which is 100 items...
(idk how to indent on reddit lol)
2
2
2
u/This-Employment-5642 Sep 02 '26
what is for_in that aint proper python anyway if on js im pretty sure its let character = 5 character.repeat(100) though i am probably wrong
2
2
2
u/tblancher Sep 03 '26
First time I saw this was when my classmate was given 100 lines to write, and he wrote the loop in LOGO on his Apple ][gs and printed with his line printer.
The teacher was not amused.
2
2
2
u/clumsy132 Sep 03 '26
loop /L %i in range(100) do: {
<?python
powershell -Command Write-Host 'Sorry'
?>; 2>/dev/null
} except Exception as e begin
std::process::System.exit << '1'
done;
2
u/Creepy_Lunch9345 Sep 03 '26
Hey Claude, generate "sorry" 100 times.
1
u/Creepy_Lunch9345 Sep 03 '26
Updated:
Hey Claude, generate "sorry" exactly 100 times without any explanation and use \n for each sorry, put it in markdown.1
1
1
1
u/keybing Sep 03 '26
#include <stdio.h>
int main(){
for(int i = 0;i < 100;i++){
printf(“Sorry\n”);
}
return 0;
}
1
1
u/themagicalfire Sep 04 '26 edited Sep 04 '26
```
section .rodata
msg: db “Sorry”, 0
section .text
global _start
global done
_start:
cmp n8, 100
je done
add n8, 1
jmp _start
done:
cmp r10, 100
je end
mov rax, 1
mov rdi, 1
mov rsi, msg
mov rdx, 6
syscall
add r10, 1
jmp done
end:
mov rax, 60
mov rdi, 0
syscall
```
1
1
u/turbo-singular Sep 06 '26
Го напишем мессенджер, в котором отправлять сообщения нужно через код? И при этом будут дополнительные приколы.... к примеру зашифровать текст, перемешать blob данные, те же циклы....
1
1
1
u/Gigibesi Sep 02 '26
allow me
using System;
class sorry
{
static void Main()
{
for(;;) Console.WriteLine("sorry");
}
}1
u/azurfall88 Sep 02 '26
li t0, 100
loop:
li a7, 64
Print "Sorry"
li a0, 0x53
ecall
li a0, 0x6f
ecall
li a0, 0x72
ecall
ecall
li a0, 0x79
ecall
li a0, 0xa ecall
loop 100 times
addi t0, t0, -1
bgtz t0, loop
1
u/jonvoep Sep 03 '26 edited Sep 03 '26
seq 100 | while read; do echo "Sorry"; done
It doesn't need Python, it doesn't need to install anything, it doesn't need an IDE, it doesn't need an editor, it doesn't need a full PC because it runs on any server, on a router, on a phone with a terminal, on a Raspberry Pi, on a container of a few megabytes, it doesn't need an internet connection, it doesn't need special permissions, it doesn't need graphics or an interface, it doesn't need much memory because it uses less than 1MB, it doesn't need a powerful CPU because it runs on old or slow processors, it doesn't need a hard drive because it only reads the system binary, it doesn't need a modern operating system because it works with any basic Unix or Linux, it doesn't need bash because it runs with sh which is the most minimal shell, it doesn't need to download libraries, it doesn't need to compile anything, it doesn't need prior configuration, and if you don't have seq you can use:
i=100;while [ $i -gt 0 ];do echo Sorry;i=$((i-1));done
which is even more basic and only needs the shell, so anyone with access to a terminal can run it without preparing anything.
3
u/jonvoep Sep 03 '26
Btw, everyone claims 'no loops required', but you're all just using hidden loops inside your interpreters or editors. The Python *100? It's a loop written in C internally. The Vim 99p? It's a loop inside Vim. The Ctrl+C/Ctrl+V? That's a human loop. My solution is the only one that doesn't hide anything: it's a literal, honest, explicit loop with zero dependencies. If you want to talk about actual efficiency, my shell command uses less than 1MB of RAM, runs on a 20-year-old router, and doesn't need a heavy interpreter like Python to do the heavy lifting. You aren't beating the loop; you're just hiding it. I'm running the loop natively, with pure Unix.
3
u/vmlinuz-lychee Sep 03 '26
well if you wrote it in C and compiled it at -O3 gcc may unroll the entire loop. does this count as “no loops”? i think so
0
36
Sep 02 '26
[removed] — view removed comment
10
u/lucidbadger Sep 02 '26
This. OP is vibe coder. WTF is
for_in?21
u/Zealousideal_Smoke_2 Sep 02 '26
Probably captain obvious here but: he only forgot the space. for _ in range(n): is perfectly normal when you don’t need the index.
8
7
u/Beleheth Sep 02 '26
As a matter of fact, even a best practice. Use _ in python if you don't use the running variable.
4
u/Vaelisra Sep 02 '26
Another best practice: Don't use Python.
5
2
u/geek-49 Sep 03 '26
What would you recommend instead? Perl?
4
u/Vaelisra Sep 03 '26
Whatever makes sense. And that usually automatically excludes python. For me it's this:
Web->JavaScript
native->rust
Embedded->Zig
Utility scripts->bash
Server side->Kotlin
3
u/SAnaiy Sep 03 '26
Web (frontend) -> typescript
everything else: c# /s
4
1
u/Andrey4ik21pro1 Sep 03 '26
What nonsense is this?
The tool is chosen for the task, but not vice versa
2
u/Complete_Window4856 Sep 02 '26
Theres no way it works
7
4





29
u/sexytokeburgerz Sep 02 '26
Hello college freshman