tired: my regex is bad and I should feel bad
-
tired: my regex is bad and I should feel bad
wired: my regex is bad and whose fault is that huh, bitch.
#techPosting -
(with full apologies to @[email protected])
(but also regex is something I learn and forget every time I need it) -
@aud inspired: this regex is bad and I will make it much, much worse >:3
-
@[email protected] never saw a line of regex I couldn't fuck up real proper like
-
@aud come to the CFG dark side!
-
@[email protected] it's for a rust macro to see if a particular field is an
Option
and/or one of my custom structs blehhhhhhhhhhhhh -
@aud rust macros eh. well that's way further into the language than I will ever get probably
-
@[email protected] yeah... I really, really really hate it actually. It's technically preferable to writing thousands of lines of mostly-the-same boilerplate code
in the way that stepping on a larger piece of lego is nicer than stepping on a smaller one. -
@[email protected] https://codeberg.org/Astatide/satyr/src/commit/12087f70e3fa6b466aad365e5c224d04a9c452f8/crates/ap-inheritance/src/lib.rs#L274
it's basically the world's shittiest regex; I check a couple things to see if it's anOption
orOption<ObjectOrLink>
orOption<Object>
then spit out different bits of code depending on that (basically matching forSome
+Link
orObject
in theObjectOrLink
enum +Object
). This is my first pass on the macro that works; you'll notice allllll sorts of badness like repeatedly compiling the regex expressions inside a map loop, lots of duplicate endpoints (I wasn't strictly sure whether they were different or not when handling the variants), etc -
@aud oh wow codeberg looks really nice. huh maybe I should set up shop on there
-
Asta [AMP]replied to Andrew Helwer last edited by [email protected]
@[email protected] oh yeah, I dig it! Plus, while "AI" scrapers probably still hit it, at least I'm not directly feeding into CoPilot. That, and I'm not further ensconcing Microsoft's hegemony over open source.
-
d@nny "disc@" mc²replied to Asta [AMP] last edited by
@aud actually regex should be apologizing to you https://circumstances.run/@hipsterelectron/112951676507291814
-
Asta [AMP]replied to d@nny "disc@" mc² last edited by
@[email protected] IF I COULD LIKE THIS THRICE
I WOULD