writing some code to read data into a dataclass object from a database, which sounds easy, but past me wrote the code that writes this data into the database in the first place

and past me was an ARSEHOLE.

listen sometimes I love that my background is in physics/astrophysics/research because I am an Extremely Good Problem Solver because of it, I'm used to not knowing how to do something and I am good at finding out how

but wow, I really could have done with some formal education in software development before I started developing software!

oh god I think I need regex for this, I'm going to cry
@astronomerritt what's the problem that needs regex to deserialize some data?
@astronomerritt I am assuming python because dataclasses, so I am assuming its something like "the data in the database doesn't look like the data I want to exist in the dataclass"
@astronomerritt almost always you can cheat in the sql side too (that's what I do) or make an adapter class
@cursedsql Hmm. Actually, I bet I can do some of this on the SQL side. Good thought. Thanks!
@astronomerritt my favorite troubleshooting is just redefining the problem until you dont have a problem anymore
@astronomerritt also worst case https://regex101.com/ always helps me out
regex101: build, test, and debug regex

Regular expression tester with syntax highlighting, explanation, cheat sheet for PHP/PCRE, Python, GO, JavaScript, Java, C#/.NET, Rust.

regex101
@cursedsql haha holy shit, this is much better than the generators I was using! this actually just helped me debug an expression that wasn't behaving how I expected. thank you so much!
@astronomerritt the autodidacts gotta stick together

@cursedsql yep! the problem is also partially "I built this database like an arsehole" and "I named these columns like an UTTER arsehole"

at some point I will fix these problems but for now I just need to get something working 😅

@astronomerritt The proper use of regex often requires at least one mind-altering substance
@simonbp unless my ADHD meds count I may be out of luck on this one, I am comprehending the cursed punctuation shaker stone-cold sober and I don't like it
@astronomerritt chat GPT is quite good at writing regex and other horrible fiddly bits of code for tasks that are conceptually simple but require reading obscure MAN pages from the 80’s.
@astronomerritt I had to write most of my regex pre chatbots, so can also recommend regex101 but why not offload the misery.
@DrChris I personally avoid ChatGPT for ethical reasons! I actually had a lot of fun with regex101 in the end, I prefer to understand exactly what I'm doing and it made it very easy to do that 😅
@astronomerritt Ah, regex. The thing I learn occasionally to solve exactly one problem per year and forget immediately afterwards, ad infinitum
@mdc This is my experience with regex exactly.
@astronomerritt the first time I met regex I thought, that’s cool, a little gnarly, i’ll figure it out after a bit. that was like 40 years ago.

@adardis 😆😆 see, now I feel normal, I've only been at it a couple of years.

My partner used to be in process automation and they are still terrifyingly fluent in regex. Streams of punctuation flowing from their fingers. It's not natural.

@astronomerritt
When they get around to censoring computer languages I hope they begin and end with regex.

My favourite language is Rebol, which, despite being mostly abandoned is still usable and doesn't need regex because it has 'parse', which is a sub-language that makes sense...

https://www.rebol.com/docs/core23/rebolcore-15.html

Chapter 15 - Parsing

@BLatro This is interesting. It's very clean and readable.

@astronomerritt
It's a lovely language, but came with an old-fashioned business model just as the world was moving to open-sourced languages.

Download the 'View' version of it if you want a play with it. That'll give you graphics as well...
https://www.rebol.com/download-view.html

Download REBOL/View

@astronomerritt
Rebol Hello Worlds:
Text version...

>> print "Hello World"
Hello World

Graphical version. This opens a little window with "Hello World" in it...

>> view layout [text "Hello World"]

@BLatro That's interesting too - I came into astronomy just as everyone started abandoning IDL (expensive licenses) for Python.

I'll try to remember to check it out! It does seem to have a lovely clear syntax.

@astronomerritt
Those who liked it really, really liked it! And there's quite a few who've tried to make new versions of it, with 'Red' being the most visible...
https://www.red-lang.org/
They've been at it for over a decade and still not reached v1.0 yet. I use it for what Rebol doesn't support.
Red Programming Language

@astronomerritt oh there are probably preexisting warez out therez but you’d need about a dozen kidneys to buy it

@MishaVanMollusq unfortunately I only have two, and I'm fairly sure I need to hang on to at least one...

it's the time commitment more than anything, if I had time I could probably find some way to skill up a bit but unfortunately I don't 😆