[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: 1763111039865690.png (136 KB, 700x260)
136 KB PNG
If AI has one blessing, it's not having to understand FUCKING REGEX anymore.
>>
regex is the dumbest shit ever imagined
>not turing complete
>human writable but not human readable
>impossible to debug - either you wrote it correctly the first time or you have to start over
>used inappropriately everywhere to parse things it shouldn't be used for, leading to countless bugs that can't be fixed
>>
>*
the only regex I know. is it over for me?
>>
oh yeah forgot the best flaw
>can't match an empty string
>>
>>109802169
>can't match an empty string
a* matches zero or more a
>>
>>109802111
Ironically Claude forgets to use the Perl Regex mode of grep and thus misses multi-line strings in code.
>>
>>109802111
(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])
>>
>>109802111
everyone always memes on regex, but once you learn it, it's actually really simple and incredibly easy to use (not to mention absurdly useful)
what made it click for me was literally physically drawing it out as a finite state machine during the final exam of my compilers course
it was a do or die moment, and the pressure really baked it in for me, i guess
>>
>>109802193
doesn't work on an empty string
if you want a pattern that matches an empty string, you can't do it, even though it should be trivial
>>
>>109802290
yes yes we all get the point of it, but it's the worst possible way to do it
it's also incredibly slow
>>
>>109802289
does this make mustard gas?
>>
>>109802289
/@/ and sending a verification email works better
>>
>>109802290
>was literally physically drawing it out as a finite state machine
ok
>>
>>109802146
>not human readable
/x modifier in perl is great for longer regexes, you can break it up into several lines and add comments.
>>
>>109802111
>not having to understand FUCKING REGEX
Brainlet.

Also:
>"Some people, when confronted with a problem, think 'I know, I'll use regular expressions.' Now they have two problems."
>>
>>109802169
>match an empty string
^$
>>
>>109802427
nerve gas
>>
>>109802111
Skill issue
>>
>>109802111
yep but a lot of people get upset regex knowledge is totally worthless now
>>
>>109802111
AI is fucking amazing.
>Make my own music and songs with Ace Step
>My own chatbots with Ollama
>Make and manipulate my own images and deep fakes with ConfyUI
>My own TTS model
And thats just me, let's see what other benefits we get
>Destroying faggot "artists" forcing them to get a real job
>Destroying faggot CoDeRz forcing them to get real jobs
>Pissing off libs
Yesh, AI is based as fuck.
>>
>>109802619
nope
>>
>>109802735
Sounds like a problem between you and whatever package you picked.
>>
>>109802111
regex is fun
>>
>>109802111
Regex is not particularly difficult to understand, you just haven't tried properly. You instead look things up ad hoc. This is like trying to learn to drive a car by looking on stack overflow every time you find a new way to wreck.
>>
>>109802111
I just use regexr to figure out what passes and what doesn't
it's really not that difficult to build or decode a regex with a cheat sheet and a live test bed
>>
>>109802735
Retard
>>
>>109802169
so what is your exact spec, since i assume you'll reject the obvious answer,
^\"\"$
for obtuse reasons
>>
>>109802111
What a fucking slop regex
Why would you allow any special character in the username other than "." by default? Why would you allow _ in the domain? Why would you not lowercase the whole thing? Why would you allow clusters of special characters?
This is a clusterfuck.
>>
>>109803108
in what possible world would that match an empty string?

>>109803055
maybe but it still doesn't match an empty string

unironically C is better for string pattern matching than regex
>faster
>can parse anything
>can be made readable
>filters out idiots by making their software crash or get corrupted
>>
>>109803227
>in what possible world would that match an empty string?
is an empty string not: ""
If not, define it
>>
I enjoy creating regexes.
Seems like a skill issue.
>>
>>109803234
no that's not an empty string, that would be two double quotes, which is not an empty string
>>
>>109803273
Okay, could you define an empty string then?
>>
File: 1764063014560574.png (28 KB, 565x795)
28 KB PNG
>>109802619
>>109803227
It literally matches an empty string doe, the fuck are you on niga
>>
the ONE advantage of regex
this is the ONLY thing it is good for
you can include a regex compiler in your program, so that the user can change the pattern at runtime

it would be hard to do that with C

the other advantage is job security - they can't fire you if you are the only one who understands your 2000 character pattern specific to some business requirement - oh but now they can because an LLM will rewrite it with some probability of not fucking up too badly
>>
>>109802111
get your regex license first, mate
>>
>>109802290
Kinda, but reading some undocumented regex and reconstructing what it's actually trying to do is like reading some random assembly instructions.
The issue with regexes is that it really encourages "being clever", and "being clever" is not something you want your colleagues to be in your code base because being clear is always better.
>>
>>109802111
You can easily understand it. In fact, your image explains it, what's so hard about it?
>>
>>109803273
11/10 literally made me wheeze for almost a minute
>>
>>109802111
you need regex to write deterministic evals,
>>
>>109803343
>being clear is always better

Depends on what you have to sacrifice.
>>
>>109803807
No I need AI to write regex to write deterministic evals
>>
>>109802146
>used inappropriately everywhere to parse things it shouldn't be used for, leading to countless bugs that can't be fixed
Blame UNIX weenies. Lispchads have ascended beyond the need for base text.
>>
>>109802728
You didn't make or create anything, you fucking nigger. Prompting is not creating, you fucking faggot. You outsourced process of creation to other entity, you delusional nigger!
>>
File: 1769657525413807.png (56 KB, 1595x535)
56 KB PNG
>>109802289
>>
>>109803891
Boohoo
>>
>>109802728
I get the hate for artist but I never understand why people on 4chan fetishize real jobs like normies when not even a few years ago having a job was something you got made fun off.
>>
>>109803918
nigger
>>
>>109802146
>not turing complete
Why would you want it to be turing complete?
>human writable but not human readable
Maybe for you
>used inappropriately everywhere to parse things it shouldn't be used for, leading to countless bugs that can't be fixed
Not the fault of regex
>>
>>109802169
Do you mean that ONLY matches an empty string, with no newlines or anything? You could try using ^\z instead of ^$ perhaps but it depends on what language and if using multi-line or not
>>
>>109803937
CoDeRz are lazy, arrogant, incompetent, faggots.
>Release software 6 months late
>Full of missing dependencies
>Full of broken APIs
>Completely unoptimized
>Security so bad even Zoomer Aiden the script kiddy could hack it
>I MUST INSERT MUH GENDER IDENTITY HERE
>That'll be $100 plus tip, faggot
In 2026
>Develop your own version in a matter of a couple of days instead of months
>Optimized to your liking
>More secure
>Less to no bugs or issues
>That'll be $0, faggot
It's be one thing if modern software weren't piled of complete shit, but here we are
>>
File: CF-k9JAUEAAhvqg.jpg (32 KB, 530x492)
32 KB JPG
>>109802728
This. I saw too many
>one day in life of a software engineer at $FAANG_COMPANY
with
>11:00 - get up
>11:10 - drive his porshe to the office
>11:30 - daily standup
>12:00 - lunch break
>13:00-15:00 - working
>16:00 - workday over, walking the dog / afterwork or whatever socialnigger activity
>a shot of a monthly payment: 30k$
>without a degree
>with 1 YoE
SWEnigs can go die in hell. You had it too good for too long.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.