The command it created looks correct, but is subtly wrong.
$3isn’t the “length” of each segment, it’s the template for the output file.$2is in fact the (approximate) length of each segment in seconds, not the “N” value as the function name suggests. Also, you probably want to setreset_timestampsso the timing information is correct.The command it created looks correct, but is subtly wrong. $3 isn’t the “length” of each segment, it’s the template for the output file. $2 is in fact the (approximate) length of each segment in seconds, not the “N” value as the function name suggests. Also, you probably want to set reset_timestamps so the timing information is correct.
this is another way to write code without having any idea what you’re doing. just post it on lemmy world as a meme, copypaste a comment that makes the code better along with the original code into the AI agent
Sounds like a good way to remove the French language pack from your system. :P
oh yeah, THAT line…trust me i know a MUCH more damaging one liner than the “remove french” one. it send an email from you to the secret service
How about one that can damage your speakers and your ears, without root access?
ls -R / | aplayHaven’t checked my low level sound drivers in a long time - I’m using pipewire and wireplumber to control it all. Is ALSA still there at the bottom/as a dependency? Arch btw.
Probably not in most systems but mine still has it. Slackware btw.
so that reads out every single filepath on your computer at max volume? yeah, no thanks
It doesn’t read it out.
It just feeds the characters directly into your sound driver as raw data, which will play it as a cacophony of noise at max volume, with no regard for your speakers’ frequency limitations.How would I play it at 25% volume? I am inclined to try.
holy shit…goddammit now the intrusive thoughts are gonna make me do it, lmao
I’d be very surprised if that was able to damage your speakers. If it could, then so could any sound you play. It would have to be an exceptionally bad design if playing a youtube video could destroy your speakers.
No it interprets the list of filenames as raw sound data which basically makes random noise maybe with a few bleeps when there are patterns
I’m into this genre.
just post it on lemmy world as a meme, copypaste a comment that makes the code better along with the original code into the AI agent
I’m curious if you succeeded with this approach here - have you gotten your LLM to produce a bash function which you can use without needing to understand how to specify an ffmpeg filename pattern yet?
btw, if want to try learning the old-fashioned way, have a look at
man ffmpeg-formatswhere you can find perhaps-useful information like this:segment, stream_segment, ssegment Basic stream segmenter. This muxer outputs streams to a number of separate files of nearly fixed duration. Output filename pattern can be set in a fashion similar to image2, or by using a "strftime" template if the strftime option is enabled. "stream_segment" is a variant of the muxer used to write to streaming output formats, i.e. which do not require global headers, and is recommended for outputting e.g. to MPEG transport stream segments. "ssegment" is a shorter alias for "stream_segment". Every segment starts with a keyframe of the selected reference stream, which is set through the reference_stream option. Note that if you want accurate splitting for a video file, you need to make the input key frames correspond to the exact splitting times expected by the segmenter, or the segment muxer will start the new segment with the key frame found next after the specified start time. The segment muxer works best with a single constant frame rate video. Optionally it can generate a list of the created segments, by setting the option segment_list. The list type is specified by the segment_list_type option. The entry filenames in the segment list are set by default to the basename of the corresponding segment files. See also the hls muxer, which provides a more specific implementation for HLS segmentation. Options The segment muxer supports the following options: [...]From the
image2section, here is how the filename pattern works:sequence Select a sequence pattern type, used to specify a sequence of files indexed by sequential numbers. A sequence pattern may contain the string "%d" or "%0Nd", which specifies the position of the characters representing a sequential number in each filename matched by the pattern. If the form "%d0Nd" is used, the string representing the number in each filename is 0-padded and N is the total number of 0-padded digits representing the number. The literal character '%' can be specified in the pattern with the string "%%". If the sequence pattern contains "%d" or "%0Nd", the first filename of the file list specified by the pattern must contain a number inclusively contained between start_number and start_number+start_number_range-1, and all the following numbers must be sequential. For example the pattern "img-%03d.bmp" will match a sequence of filenames of the form img-001.bmp, img-002.bmp, ..., img-010.bmp, etc.; the pattern "i%%m%%g-%d.jpg" will match a sequence of filenames of the form i%m%g-1.jpg, i%m%g-2.jpg, ..., i%m%g-10.jpg, etc.And btw, the
ffmpeg-formatsmanual does also include examples:Examples • Remux the content of file in.mkv to a list of segments out-000.nut, out-001.nut, etc., and write the list of generated segments to out.list: ffmpeg -i in.mkv -codec hevc -flags +cgop -g 60 -map 0 -f segment -segment_list out.list out%03d.nut • Segment input and set output format options for the output segments: ffmpeg -i in.mkv -f segment -segment_time 10 -segment_format_options movflags=+faststart out%03d.mp4 • Segment the input file according to the split points specified by the segment_times option: ffmpeg -i in.mkv -codec copy -map 0 -f segment -segment_list out.csv -segment_times 1,2,3,5,8,13,21 out%03d.nut • Use the ffmpeg force_key_frames option to force key frames in the input at the specified location, together with the segment option segment_time_delta to account for possible roundings operated when setting key frame times. ffmpeg -i in.mkv -force_key_frames 1,2,3,5,8,13,21 -codec:v mpeg4 -codec:a pcm_s16le -map 0 \ -f segment -segment_list out.csv -segment_times 1,2,3,5,8,13,21 -segment_time_delta 0.05 out%03d.nut In order to force key frames on the input file, transcoding is required. • Segment the input file by splitting the input file according to the frame numbers sequence specified with the segment_frames option: ffmpeg -i in.mkv -codec copy -map 0 -f segment -segment_list out.csv -segment_frames 100,200,300,500,800 out%03d.nut • Convert the in.mkv to TS segments using the "libx264" and "aac" encoders: ffmpeg -i in.mkv -map 0 -codec:v libx264 -codec:a aac -f ssegment -segment_list out.list out%03d.ts • Segment the input file, and create an M3U8 live playlist (can be used as live HLS source): ffmpeg -re -i in.mkv -codec copy -map 0 -f segment -segment_list playlist.m3u8 \ -segment_list_flags +live -segment_time 10 out%03d.mkvIt is actually possible to figure out how to do this and many other ffmpeg tasks even without internet access :)
i really need to spend more time reading the
mans and less time asking the bot. themans are guaranteed to be right, but with the bot, who the fuck knowsAnd with a command like ffmpeg a wrong bot command might just as well overwrite your source file.
how do you know this off-hand? ffmpeg always felt like the most incantationest of all incantations to me
also, upvoted for good feedback
I actually just Googled (well, Kagi’d) it, and found the article that the AI presumably hallucinated this command from.
10 minutes later…
divideMp4IntoNSegmentsOfLengthTButPleaseDoItCorrectlyThisTimePrettyPrettyPleaseJesusFuckWhyAreYouSoFuckingStupid(){ }lmao…if it doesn’t work just add a comment that makes it as explicit as possible
So like
# Stupid shitty piece of fucking useless waste of compute resources! Do your fucking damn job, you useless clanker! divideMp4IntoNSegmentsOfLengthT() { }Explicit enough?
i think the AI is programmed to tolerate your insults. don’t want an agent that refuses to work with you because it’s robotriggered
Shall we ask it to write functional regex too while we’re at it?
for regex i just use regex playground. but the few times i’ve asked the bot for a regex it got it right…mostly. so yeah, it’s not the only source you want to use
My experience has been that more complex cases it simply cannot manage. It’ll swear blind that it’s got it right and the result will be super specific to the example provided. If I knew what the strings would be exactly, in advance, I wouldn’t be writing regex 😂
i’ve seen how ridiculously complicated and unreadable regex can get. i’ve never asked it to make a regex like that, i’ve only had it do simpler ones like “match every word boundary that starts with some character” or whatever
If it can only handle tasks I can do myself it’s not very useful.
well you’re supposed to use it do do things you don’t know how to do. that’s what i do. it’s just that there’s all kinds of shit i don’t know how to do that other people know how to do, and the agent is trained on all that, so it’s helpful (for me, at least)
I’m pretty sure the awful formatting of the comment is here to trigger us.
Anyway, merge request rejected for that alone.
lmao
yeah i just realized i shoulda highlighted it and pressed cmd+/
I mean, literally anything is possible if your codenase is fundamentally broken.
How can a function like this exist without parameters for N and T?
it’s a shell function. the code should work for bash or zsh. with those, it doesn’t look like there are any parameters in function definitons, but there are.
What’s so special about that? It’s basically just googling, but it takes a second instead of an hour. With the added downside that you don’t learn a thing, so you’ll never be able to do it without AI.
whether you learn something new or not it’s up to you, not the ai
likewise, you can copy and paste from SO and learn nothing
exactly. ppl are like “AI can’t teach you anything” and i’m like “well if you make zero effort to learn, you won’t learn from humans either”
See, a teacher will give you a task to solve, preferably on your own, to teach you a thing. They won’t give you a task and the solution so you can look at the solution and go “ah, yes, I understand”.
A good teacher will do that. And even the best teacher can’t force you to learn if you don’t want to. LLMs can be a powerful tool for learning if you’re sufficiently motivated.
We’re obviously talking about ideal situations because it is impossible in a normal conversation to acknowledge every single aberration. Regardless, if you learn by looking at the solution and going “i understand”, you’re doing yourself a disservice.
are you aware that there is more than one way to learn something
Sure. Most people learn best using variations on task solving.
“claude, what is ‘using variations on task solving’”
Well? What’s it saying?
here’s a trick: treat the ai like a rubber duck. dig deeper with places like devdocs.io and you find you’ll be learning …
you don’t learn a thing
are you aware that you can use the AI to explain the code it wrote for you?
The comment suggests that that is not the case here.
>highlight code
>copy paste code into AI agent
>add “?”
so simple even you can do it, lmaoooo
Except you are not getting an explanation. Sheesh, do we really need to go all over the “token prediction machine is unable to understand” iteration, again?
except you ARE getting an explanation. it doesn’t matter that the AI doesn’t know what it’s doing. do YOU know what you’re doing? do you have any idea how your brain puts words together to form phrases and sentences? of course you don’t
Lol. Once again: I am not getting an explanation, see hallucinated functions and packages (that never happened, right?)
I know what I am doing, which is exactly why I get paid for my code.
And we know a lot more about how we think than you imagine, lol. Like, humans do not think in words. But you did not know that, did you?
based on your complaints about LLMs, it sounds like you’ve just convinced yourself that anything you code is better than what an LLM would do. you sound like a major narcissist, and i’m going to run my mental health diagnosis bot on your publicly available comment history.
So you have no evidence or anything else of substance to prove that your statements are true. Have a good day
i’m replying from my inbox so i don’t kn ow what you’re talking about
Don’t bother, it’s like the flat earthers all over again.
Knowing how to write code has only ever been half (or less) of the job. A real programmer solves problems with code, especially problems that aren’t like any they’ve seen before. Someone who can write code but can’t solve problems or can only ‘solve’ problems they’ve seen before is just a code monkey. AI can regurgitate code it’s seen before (that is, code it was trained on) and it can do some problem solving but it falls on its face quickly if you ask it to do anything complex (at least for my metric of what is complex).
i want to be clear that AI can’t do your entire job for you, and if you start pushing vibe coded shit to prod, you should start looking for a new job. still, AI is ridiculously useful- maybe not for you, but i’m an amateur with major gaps in my coding knowledge, so AI is incredibly useful for folks like me. of course if i actually get paid to do this shit, every line i write will have to be my own.
As a dev that recently transitioned from a decade of sys admin experience, to two years of ServiceNow admin/developer/et all, to now full stack development, I have found AI useful for somethings. I asked it how to do a thing, and it regurgitated a bunch of code that didn’t do what I was looking for, however, it did give me a framework for what files I needed to modify. I then put nose to the grindstone and write all of the rest of the code myself, researching the docs when needed, and I got it done.
For me, if I use AI to assist in something code, I always type everything out myself whether it’s right or not, because like taking notes, typing it out does help learn what I’m doing, not just finding a solution and running with it. I’ve disabled most of the auto complete copilot garbage in Visual Studio because it would generate huge blocks of code that may or may not be correct, and the accept button is the tab key, which I use frequently. I still have some degree of auto complete for single lines, but that’s it.
My advice would be to use AI as a prompt to get ideas or steer direction, but if you want to get better at coding and problem solving, I would suggest trying to find solutions yourself because digging through docs will be far more beneficial to your growth. AI does a good job of helping fill the gaps in packages or frameworks when your ignorant to all of the functions and stuff, but striving to understand them instead of relying on unreliable tools will make you a much better developer long term
AI is an extremely useful tool. I’m on the other end of the career track, but it seems to be that it’s almost like having a personal tutor. And as with any other teacher, if you use it as an aid to figure things out yourself I imagine it would help immensely, but at the same time if you use it as a crutch to do your work for you, you skills will be as weak as someone who cheats off their friends in school. I attribute a large part of my skills to spending lots of time reading other people’s code and understanding why they wrote it the way they did (usually because some library didn’t do what I wanted so I figured out how to beat it into submission out of pure stubbornness). If you use the AI as an aid and spend the time to really understand the code it’s producing (and the flaws in that code), I think you’ll build up your skills well.
My rant about code monkeys was inspired by people I’ve interviewed and worked with who had to be told exactly how to solve a problem since they apparently had zero problem solving skill themselves. The “programming is just writing code” attitude drives me up the fucking wall and “LLMs are going to make programmers obsolete” is just the latest iteration of that bullshit.
if i use AI to help me make a full stack app, for example, the learning experience wouldn’t nearly be as good as if i did it all on my own. but when i try to do everything by myself, i get lost and confused as fuck and eventually just abandon it out of frustration and move on to something else. i don’t get paid to do this so i have the luxury of just abandoning shit that gets too frustrating
You always need to read what the machine generated for you; the machine can only write code for you, not understand code for you. Here, the biggest issue is that
copymight not work if the input and output containers are different, if the input has multiple framerates or audio tracks, etc.if that happens- or, in general, whenever the code doesn’t get you what you want- you just copypaste the terminal output back into the AI agent. i know from a good deal of experience that vibe debugging is 100% brainless, and you could train a high schooler to do it
New account QT?
my old account was way too schizo for my liking. i just didn’t want to be reminded of the posts i made
Why am I getting the word “prototype”? The spirits are saying “prototype”. That mean anything to you?
i’ve never heard voices in my head, but there have been several times where i’ve thought in other people’s voices. i’ve never thought in my own voice. i’m schizoaffective so that’s probably why.
over the years i have throught in the following people’s voices:
-
stephen hawking
-
pete davidson
-
robert evans
-
dan carlin
these days it is 100% trevor moore (RIP). whenever i imagine myself doing something i see trevor doing it.
Schizoaffective? More like schizoeffective, live your best life, king.
-











