4 ms·
Let me give you an example. I need to write a cron expression like once in couple years. So, I don't have working memory of it. So, to write it, I need to 1.
by galkk 3y ago
Let me give you an example.
I need to write a cron expression like once in couple years. So, I don't have working memory of it. So, to write it, I need to
1. Google "cron run something periodically".
2. Filter spam such as geeksforgeeks and irrelevant stackoverflows
3. Find either good enough approximation
4. If didn't work, go to cron man and start reading it. Example that I look for is 3rd from below in examples table https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cro...
OR
I can go to chatgpt/copilot and directly ask what I need
"Tell me a cron expression to run command on each third Monday of a month and explain it"
and it will give me good enough approximation right from the start. I won't need to fight popups that will shame me for using adblockers, I won't need to go through tons of spam. I will get much better headstart, that will save my time and energy.
- morelisp 3y ago> Tell me a cron expression to run command on each third Monday of a month An LLM is probably the only thing which could tell you this.
- ravenstine 3y agoI gotta say, LLMs are an epic solution to things like cron expressions, regexes, and date-time formatting templates.
- morelisp 3y agoYes, I'm sure in 2-3 years I'll be finding plenty of regexes analogous to that cron expression, like one matching balanced parentheses.
- deleted 3y ago[deleted]
- satvikpendem 3y agoWhy would only an LLM be able to tell you this?
- morelisp 3y agoBecause it needs to be hallucinated.
- satvikpendem 3y agoI don't understand, a Stack Overflow post could tell you the same thing as the LLM. Or are you just being sarcastic? Recent LLMs are fine in terms of smaller things like cron or regex, I use them daily, but yes, for larger pieces of code, they're more likely to be incorrect.
- morelisp 3y agoI mean yes an SO answer could also be wrong, or you could ask a human pathological liar, but these are much less likely to begin with, and it's far less likely they could "explain" their answer convincingly. > Recent LLMs are fine in terms of smaller things like cron This is obviously false given the contents of this thread. Indeed, SO (well, SU) got this right: https://superuser.com/questions/428807/run-a-cron-job-on-the-first-monday-of-every-month https://superuser.com/questions/428807/run-a-cron-job-on-the... And crontab(5) explicitly calls out why this is impossible: Note: The day of a command's execution can be specified by two fields — day of month, and day of week. If both fields are restricted (ie, aren't *), the command will be run when either field matches
- satvikpendem 3y ago> This is obviously false given the contents of this thread. Not in my experience. GPT4 works a lot better than previous LLMs. Have you used GPT4 yet? Typically in my experience people who talk about LLMs not being that useful (or "pathological liars") have not used them recently, or at all. So, I mean, not a useful opinion worth considering then.
- fmorel 3y agoBut can you trust that the expression it generated is accurate and it's not lying to you? I'd rather use something like https://crontab.guru/ https://crontab.guru/ to verify my syntax, thus I have it bookmarked for the 1-2 times a year it comes up.
- galkk 3y agoAs I said - it gives me very good initial approximation, so I can go to docs with an example that I'm trying to figure.
- aeturnum 3y agoThis is absolutely what I imagine using Copilot for and also exactly why I don't understand the rapturous praise for increasing productivity. I have no doubt it will speed up the tasks I only need to do once or twice a year. I look forward to it! But until then where are these productivity gains people are talking about?
- satvikpendem 3y agoI'm working on a product and a lot of the code was written by ChatGPT, to be honest. It sped up my work by 3x, and I could ask it very specific questions about the code as well, including giving me multiple ways to optimize it. If you're working with specific libraries and languages, it can work great.
- cuu508 3y ago> "Tell me a cron expression to run command on each third Monday of a month and explain it" ChatGPT responds: > 0 0 0 ? * MON#3 * Regarding MON#3, it explains: "Day of the week (MON#3): This is the crucial part of the expression. We use MON to specify that we want the command to run on a Monday. Then we append #3 to indicate that we want the third occurrence of Monday. This ensures that the command will run on the third Monday of the month." It does not mention though, even with the smallest hint, that standard cron does not support this syntax. Or a 7-field syntax. (By "standard cron" I mean Vixie cron derivatives like the one that ships with Debian) The correct answer in this case would have been: "This is not possible with standard cron syntax alone. You can either use a different cron implementation that supports MON#3, or schedule for every Monday, but then in your script check if it's the third Monday."