this post was submitted on 01 Feb 2025
22 points (61.5% liked)

Ask Lemmy

34978 readers
1730 users here now

A Fediverse community for open-ended, thought provoking questions


Rules: (interactive)


1) Be nice and; have funDoxxing, trolling, sealioning, racism, and toxicity are not welcomed in AskLemmy. Remember what your mother said: if you can't say something nice, don't say anything at all. In addition, the site-wide Lemmy.world terms of service also apply here. Please familiarize yourself with them


2) All posts must end with a '?'This is sort of like Jeopardy. Please phrase all post titles in the form of a proper question ending with ?


3) No spamPlease do not flood the community with nonsense. Actual suspected spammers will be banned on site. No astroturfing.


4) NSFW is okay, within reasonJust remember to tag posts with either a content warning or a [NSFW] tag. Overtly sexual posts are not allowed, please direct them to either !asklemmyafterdark@lemmy.world or !asklemmynsfw@lemmynsfw.com. NSFW comments should be restricted to posts tagged [NSFW].


5) This is not a support community.
It is not a place for 'how do I?', type questions. If you have any questions regarding the site itself or would like to report a community, please direct them to Lemmy.world Support or email info@lemmy.world. For other questions check our partnered communities list, or use the search function.


6) No US Politics.
Please don't post about current US Politics. If you need to do this, try !politicaldiscussion@lemmy.world or !askusa@discuss.online


Reminder: The terms of service apply here too.

Partnered Communities:

Tech Support

No Stupid Questions

You Should Know

Reddit

Jokes

Ask Ouija


Logo design credit goes to: tubbadu


founded 2 years ago
MODERATORS
 

I have tried, unsuccessfully, to get various AI models to create a script that will curl or wget the latest Ubuntu LTS desktop torrent, even should that LTS version update in the future (beyond 24.01.1 LTS). The purpose is that I would like to seed whatever the latest LTS torrent is and I don't want to have to keep checking the Ubuntu page for updates, I want it automatic. I know that LTS is slow to change versions but I am annoyed that AI can't just write a decent script for this.

I also have downloaded rtorrent as a command line and will deal with how to make sure the latest LTS is used, as opposed to the prior one, with a different script later, but that's not what I'm trying to now.

I am not asking for a human to create this script for me. I am asking why AI models keep getting this so wrong. I've tried ChatGPT 4o, I've tried DeepSeek, I've tried other localized models, Reasoning Models. They all fail. And when I execute their code, and I get errors and show it to the models, they still fail, many times in a row. I want to ask Lemmy if getting an answer is theoretically possible with the right prompt or if AI just sucks at coding.

This shouldn't be too hard to do. At https://www.releases.ubuntu.com/, they list the releases. When curling the webpage, there's a list of the releases with version numbers some with LTS. New versions are always larger numbers. At https://ubuntu.com/download/alternative-downloads, they list the torrents. Also, all release torrents for desktop are in the format https://www.releases.ubuntu.com/XX.XX/desktop.torrent. I've tried to teach these models this shit and to just create a script for me, holy shit it's been annoying. The models are incredibly stupid with scripting.

I'm not a computer programmer or developer and am picking up more coding here and there just because I want to do certain things in linux. But I just don't understand why this is so difficult.

So my question is, is there ANY prompt for ANY model that will output successful code for this seemingly easy task, or is AI still too stupid to do this?

top 50 comments
sorted by: hot top controversial new old
[–] over_clox@lemmy.world 23 points 8 months ago (4 children)

It took me more time to read this thread than it did for me to learn the basics of Bash scripting.

Do like we did back in the day, RTFM

load more comments (4 replies)
[–] original_reader@lemm.ee 11 points 8 months ago (1 children)

Probably a stupid comment, but still: if you're a coder, you might be quicker just writing such a script yourself. Just fetch the links, slice them up, sort them by version and wget the one with the highest number.

If you're not a coder, maybe someone here can help out?

load more comments (1 replies)
[–] AstridWipenaugh@lemmy.world 8 points 8 months ago (3 children)

AI certainly can do it. But here's the thing with generative AI: the answer is only as good as the question you ask. If you don't know exactly what to ask for and which details are important, the AI doesn't know what you meant to ask and can't infer that. AI usually does not pick up implied context that an experienced person would. A person would be able to make an educated guess about what you actually meant and answer that question.

As someone with 20 years of programming experience, I would recommend against using AI to learn to program. You're asking something that doesn't actually know how to program to show you how to do it. From my experience with coworkers using AI, it doesn't improve their work; it simply accelerates the rate at which they can produce low quality work.

Once you're more skilled than the AI, you can use it to speed up menial tasks, like generating boilerplate and stubbing things out. It absolutely will be wrong in some ways, and you need to be able to tell when it's wrong and know how to fix it.

load more comments (3 replies)
[–] a@91268476.xyz 7 points 8 months ago (3 children)

@secretlyaddictedtolinux@lemmy.world I bet there is a RSS feed for Ubuntu releases. Instead of using AI to get the link you would need to read consume the feed.

[–] MajorHavoc@programming.dev 1 points 8 months ago* (last edited 8 months ago)

This is a great point. There's (maybe)more chance on an AI spitting out a successful RSS parser than a successful curl script.

Though if I was going to place my bet, I bet there's too much diversity in the training data of both use cases to eat a useful result from current generation AI.

I've had particularly bad luck coaxing Parsers out of AI, and I've really tried, because I hate writing Parsers. It's almost like writing a valid parser is a huge pain in the ass. Heh.

load more comments (2 replies)
[–] Thcdenton@lemmy.world 7 points 8 months ago (6 children)

Dude just stitch stack overflow answers together like the rest of us

load more comments (6 replies)
[–] edb_fyr@lemmy.world 6 points 8 months ago (2 children)

In my experience, Chat GPT is much better at the general programming patterns and concepts than specific API implementations. Especially less commonly used ones, where it often gives a solution that only looks reasonable but uses the totally wrong methods. I guess it's similar with scraping the HTML of the Ubuntu releases page to get the latest torrent. It doesn't know the exact HTML layout, so it guesses what is a likely one, even though it is wrong.

load more comments (2 replies)
[–] Vytle@lemmy.world 5 points 8 months ago (1 children)

S4:e6: "Bender Should Not Be Allowed on TV"

load more comments (1 replies)
[–] Kolanaki@pawb.social 4 points 8 months ago

Just write it yourself 🤦‍♂️

[–] Toes@ani.social 4 points 8 months ago (1 children)
load more comments (1 replies)
[–] SpikesOtherDog@ani.social 4 points 8 months ago (14 children)

The AI will provide methods you could try, but ultimately a human will need to review and edit the code.

load more comments (14 replies)
[–] Cocodapuf@lemmy.world 4 points 8 months ago

Isn't this something you use rss for?

[–] hendrik@palaver.p3x.de 3 points 8 months ago* (last edited 8 months ago) (7 children)

You are a powerful terminal assistant. You will answer in the most helpful possible way and provide the user with Linux bash commands to accomplish their tasks. Use Google and internet search to fetch all necessary information. Always format your answer in markdown format.

User question: How do I download the latest Ubuntu ISO torrent? Make sure it's the latest version from ubuntu.com Make sure to also include the curl or wget command to download the torrent file itself.

load more comments (7 replies)
[–] 4oreman@lemy.lol 2 points 8 months ago (3 children)
load more comments (3 replies)
[–] OmegaLemmy@discuss.online 1 points 8 months ago (1 children)

Find a decent torrent searching tool, ask the ai to search for it, have it create a filter using whatever, whether it be grep or regex, to check and compare the dates

If you're gonna do this, have something with chain of thought

load more comments (1 replies)
load more comments
view more: next ›