▲ 118 ▼ OpenAI's Codex app has 70% GPU usage while it is “thinking” due to tiny useless animation (github.com) submitted 1 month ago* by cypherpunks@lemmy.ml to c/programmerhumor@lemmy.ml 22 comments fedilink hide all child comments
[–] gedhrel@lemmy.world 4 points 1 month ago (1 child) What's wrong with y.*e.*s ? permalink fedilink source parent hideshow 1 child comment replies: [–] Zarobi@aussie.zone 6 points 1 month ago Nothing is wrong with that, but it will give you different output. I tend to like using capture groups just out of habit, it makes it more flexible and useful in future. Most of my co-workers hated Regex so I tried to make it easy for them. I also wanted the letters to be as close together as possible. In this example it doesn't matter, but in other texts it might. Yours will find the first y, then the furthest possible e, then the furthest possible s. So you might get output where there's a y on line 1 and the e s at the very end of the text. Nothing wrong with that, it's just not what I was envisioning. Also it's funnier in this context to have a complicated regex. permalink fedilink source parent
[–] Zarobi@aussie.zone 6 points 1 month ago Nothing is wrong with that, but it will give you different output. I tend to like using capture groups just out of habit, it makes it more flexible and useful in future. Most of my co-workers hated Regex so I tried to make it easy for them. I also wanted the letters to be as close together as possible. In this example it doesn't matter, but in other texts it might. Yours will find the first y, then the furthest possible e, then the furthest possible s. So you might get output where there's a y on line 1 and the e s at the very end of the text. Nothing wrong with that, it's just not what I was envisioning. Also it's funnier in this context to have a complicated regex. permalink fedilink source parent