7 ms·
For the longest time I had ffmpeg in the same bucket as regex: "God I really need to learn this but I'm going to hate it so much." Then ChatGPT came along and s
by levocardia 2y ago
For the longest time I had ffmpeg in the same bucket as regex: "God I really need to learn this but I'm going to hate it so much." Then ChatGPT came along and solved both problems!
- hackingonempty 2y agoCSS has entered the ChatGPT.
- permo-w 2y agoI've been looking for a good guide on prompting LLMs for CSS. does anyone know of any?
- johnisgood 2y agoI have no set of rules when prompting LLMs for CSS, it does seem to work more or less for me though. What are your current issues or what limitations have you ran into?
- permo-w 2y agomainly with trying to impart a particular art style.
- kccqzy 2y agoMy rule for using LLMs is that anything that's one off is okay. Anything that's more permanent and committed to a repo needs a human review. I strongly suggest you have an understanding of the basics (at least the box model) so that you are competent at reviewing CSS code before using LLM for that.
- teaearlgraycold 2y agoGotta be honest, years of configuring automod on Reddit have honed me into a regex God.
- earnestinger 2y agoNot sure about ffmpeg, but you should definitely try memorising regexp. Casual Search&replace that becomes possible is worth it.
- sergiotapia 2y agoin 15 years it never sticks and by the time i need it again i've forgotten it! :D
- kevin_thibedeau 2y agoDon't learn the Perl influenced extensions. You just need POSIX EREs (and BREs for some older utilities) which are simple enough to keep in the head.
- ziml77 2y agoAnd with the POSIX EREs, everything except the syntax for character classes will carry over to other common Regex dialects.
- Over2Chars 2y agoI'll just leave this here "The Insanity Of Linux's Regular Expressions " https://www.youtube.com/watch?v=ys7yUyyQA-Y https://www.youtube.com/watch?v=ys7yUyyQA-Y
- earnestinger 2y agoMany loosely compatible (so, not compatible if we are strict..) implementations are a problem, but awareness and testing helps. All in all, my life would be miserable if I would not have regexp available in grep/sed/editor/ide/java/python, their usefulness trump any such inconveniences.
- zxvkhkxvdvbdxz 2y agoInteresting. Being able to use regexps for text processing through my career has probably saved me a few thousand hours of programming one-off solutions so far. It is one of those skills that really pays off to learn proper. And speaking of ffmpeg, or tooling in general, I tend to make notes. After a while you end up with a pretty decent curated reference.
- codetrotter 2y agoI use regexes a lot. The main thing that always trips me up is dealing with escaping, because different tools I use – vim, sed, rg, and so on – sometimes have different meanings for when to escape or not. In one tool you’ll use + to match one or more times, and \+ to mean literal plus sign. In another tool you’ll use \+ to match one or more time, and + to mean literal plus sign. In one tool you’ll use ( and ) to create a match group, and \( and \) to mean literal open and close parentheses. In another tool you’ll use \( and \) to create a match group, and ( and ) to mean literal open and close parentheses. This is basically the only problem I have when writing regexes, for the kinds of regexes I write. Also, one thing that’s not a problem per se but something that leads me to write my regexes with more characters than strictly necessary is that I rarely use shorthand for groups of characters. For example the tool might have a shorthand for digit but I always write [0-9] when I need to match a digit. Also probably because the shorthand might or might not be different for different tools. Regexes are also known to be “write once read never”, in that writing a regex is relatively easy, but revisiting a semi-complicated regex you or someone else wrote in the past takes a little bit of extra effort to figure out what it’s matching and what edits one should make to it. In this case, tools like https://regex101.com/ https://regex101.com/ or https://www.debuggex.com/ https://www.debuggex.com/ help a lot.
- nuancebydefault 2y agoThe problem with escaping (like with using quotes) is often that you need to know through how many parsers the string goes. The shell or editor, the language you are programming in and the regexp engine each time can strip off an escape character or a set of outer quotes. That and of course different dialects of regexp makes things complicated.
- shlomo_z 2y ago... Then ChatGPT came along and I had 3 problems! https://regex.info/blog/2006-09-15/247 https://regex.info/blog/2006-09-15/247
- jmb99 2y agoFor me, it wasn’t so much learning ffmpeg, as it was understanding containers/codecs/encoders/streams/etc. Learning all of the intricacies there made ffmpeg make a lot more sense.
- skydhash 2y agoAlmost no one cares to understand the domain of the tool anymore, they only want result and expect a simplified interface that already does the unique thing they want to do, but can’t accept that a power tool can only be used with training.