Waiting for OP's inevitable "fuck you" response...
I'm gonna echo some of the other people here. While I don't debug code for fun (thank you to everyone who does), I represent the security/operations side of the house (eventually you'll learn to love or hate people like me). If you don't understand what your writing, the odds of it getting shipped in my environment are zero.
Now some honest advice. Stop the project, and put on your learning hat. You need to learn some basic fundamentals. If you are good at self study something like learnpythonthehardway.org might be a good jumping off pont.
Once the fundamentals are out of the way, all projects follow a similar trend: start with a desired goal, break that down into components, repeat breaking down components til you have discreet tasks, understand your dependency tree, and start tackling the tasks.
Fuck off retard, I don't need you shipping my code in your shitty script kiddie project
Well. That's one reaction.
I wish you best of luck. Some advice not related to your project - soft skills are as important (if not more in some instances) then hard skills.
Am I the only one that found it extremely humorous for someone that vibe codes a script, for them to blindly use, to try insulting someone else by calling them a script kiddie?
I'm sorry, that's just very funny :)
Don't be shitty. This could be how people get into coding now - figuring out why something like this doesn't work. They asked for help understanding what's going on which is a good place to start.
I have enough colleagues who are paid for a job they apparently can't do. If you have the patience to debug vibe coded bash script go ahead, but I don't think anyone should expect any professional willing to do this for free
You know - I hear your frustration. We've spent a lot of our lives learning and perfecting a craft that can now be done by anybody willing to pay an LLM to do it for them. I get it. It's a it disheartening to see your hard-earned skill commoditized like that. But it's not the only skill we've learned. The technical knowledge and experience we built up over that time is invaluable as well and can't be replaced with an LLM. Calculators didn't stop mathematicians from existing either.
But the world is different now. This genie is not going back in the bottle no matter how much we whine or say "but AI still makes mistakes!" Lashing out at those who use AI as either "not real programmers" or for "vibe coding" isn't going to help either. Nobody said you had to debug this dudes code. You bitched of your own free will. You didn't help, you were just mean.
Fuck off, I didn't ask for a working script, I asked for a difference between how Debian and Devuan (or bash and dash) would handle the functions here. Blocking you now
While it is technically possible to write shell scripts that do as much as what you're attempting to, it's not a good idea.
Shell scripts generally don't have the development environment necessary for debugging. You can't pause execution based on a breakpoint and inspect variables, or step through the code line by line to watch the execution flow as it happens. Well, bashdb exists, but it's quite hard to use.
Without proper debugging tooling you're limited to printing stuff out on the screen and trying to figure out what that means. That's ok for short scripts (< 50 lines?) but yours is 700+ lines.
Thank you for the reply. Python keeps being suggested, what would you suggest if I end up changing rails here?
I was going to suggest Python too but you'll need to be careful to just use functionality that is part of the standard library because once you start pulling in 3rd party packages deployment is much harder and portability seems to be a requirement here. That should be doable with your case.
The free edition of PyCharm is great for debugging.
Keeping python in mind then. For now I think I've gotta keep trying with a shell script because it can fit the whole decoder in 2 QR codes (1 for each step, extracting+reassembling) with zbarimg+ffmpeg as the only dependencies
Maybe I should use python for the main version but keep a shell script mini decoder option available
I have traveled for decades and almost never use a vehicle... walking gets you a long way.
Your implication is that I am less effective, and I am not. I've used debuggers, they can be very helpful. But a log of prints gives you a timeline of events compared to a debugger's more "point in time" view. They're complementary and I find the logs are typically more than enough for me.
What debuggers are you using that dont offer a timeline of events? Most of them let you literally execute line by line at point of error, so you can see exactly what changes and what goes wrong
For being not a coder, this is fairly ambitious. I've been coding software for thirty years and I'm not sure I can offer anything technical. Personally, I'd probably try to do this in Python rather than shell script. Shell script is fine if you have tools you're just trying to stitch together, but this is far beyond that.
That being said, I get it. The first coding I ever did was making a character sheet for roleplaying by sending raw commands to my dot matrix printer from my Commodore 64. You have a vision in your head and a computer at your fingertips and you have to bring it all together.
I respect that and if part of your goal is to achieve this using only bash, then god speed. Otherwise I might look at a language that gives you library support and modularity and unit testing. I write Python scripts all the time, and the truth is I don't know Python at all, so I know it can be done. Define a unit of functionality and build that piece. When that piece works build another component. Then build a parent program that calls those two things. Then build more components. Define functions that can be reused when you have code that needs to do similar things.
The key is to build standalone functionality — what is the smallest useful thing you can do? Build it. Now you can invoke that every time you need to do the thing. Construct your program out of components you create.
This is kinda like if I told AI to build me a web service but keep everything in a single Java class. It would be a wild and unreadable, untestable mess.
Thank you. For the record, the main goal of using a shell script instead of a python script is maximum portability via the QR code itself. Instead of telling someone to scan a QR code and download hundreds of megabytes of python environment, all most users will have to download for my decoder is zbarimg (because everyone already has ffmpeg)
If I can get it working, anyway
You can still build components and assemble them once each individual piece works. It's easier to start with something that works and add to it than start with a "fully realized" script none of which actually works.
Asking folks to review hundreds of lines of vibe-coded slop (anything, really, but especially vibe coded slop) is a big ask. I sincerely wish you luck, though. We all started somewhere and maybe as you work to fix this you'll become something of a coder yourself.
I don't get what's with these replies where people don't seem to have read the post. If none of the script actually works, idk why I'm trying to identify a Devuan behavior difference and seeing a basic round trip test passing on regular Debian. Building components and assembling them when individual pieces work is what I'm trying to do.
There's a language that is extremely portable - go. It's compiled though and would need a bit more development environment than a script. But it would be able to run on just about any Linux, Windows, MacOS easily.
But also - not all AI models are created equal. Your free ones may not be great at a script of this level of complexity.
The project is supposed to convert files to QR code videos and back.
I don't really understand what you're trying to do.
I don't think that you're trying to just encode an URL, from a glance.
If you want to encode a video file as a QR code, you're going to face the pretty fundamental limitation of information content.
A QR code can store a maximum of (checks) under 3 KiB. Virtually any video file cannot fit in those space constraints.
I am not a coder. I have been staring at a screen the past two weeks trying to "vibe code" for the first time with unpaid chat bots, for a seemingly simple project. But I still haven't even gotten a single version to the real-world testing stage, keep getting failures on more basic self-tests.
So, chatbots in 2026 are not really a drop-in replacement for a computer programmer. My guess is that while we'll probably get there, it's probably going to require something more elaborate than just an plain old LLM. Like, it's not going to be a minor refinement of what's currently there, but a pretty fundamentally different system (though that system might potentially incorporate an LLM).
EDIT: Ah, it's a series of QR codes. I mean, that's going to be a pretty huge number for any real-world video.
EDIT2: Oh, you want a video of QR codes from a file. I think that a problem that you're gonna hit there is the transport, because your video is gonna be playing at a constant rate and real-time QR code recognition isn't perfectly reliable, and you're probably not going to reliably capture every frame. Maybe someone could make something with FEC so that dropping a certain percentage of frames is viable, like, use PAR2 or something.
Also, assuming that you're trying to make something that runs automatically, the generated code has stuff that will bail out if used other than if run interactively.
EDIT3: Also, it sounds like you want something portable. The script itself may (or may not be) portable, but it is trying to run external tools that are not going to be guaranteed to be present wherever.
EDIT4: I don't know why you'd be running dash on denuvan, as it sounds like its default shell is bash, but if /bin/sh is a symlink to dash on that system, what you could try doing is generating a bash-specific version. It...might work if you just switch the shebang line to bash at the top of the file, but bash in sh compatibility mode is not identical to bash in bash mode.
If you want some sort of generic portability debugging tool, I'd add set -x as the second line of the file. That will enable trace mode. Every line that runs will be printed to stderr. Then run it like so:
$ yourscript.sh 2>debug1.log
That'll output every line being run. Run it on both systems, and you'll get a log on each. Then you can run:
$ diff -u debug1.log debug2.log|less
That'll show you where the behavior starts to differ on the two systems.
But...I'm going to be blunt. I think that you're asking more of current AI chatbots than is reasonable given their current state, and that it's going to wind up being pretty frustrating if you're aiming to do it with zero programming.
From what I understand, on Debian and therefore presumably also Devuan, the system-wide default shell is dash. So, sh symlinks to dash.
But dash is virtually unusable for interactive use, so they configure the terminal emulator to launch bash on start-up.
In effect, scripts get executed with dash by default, but commands you type into a terminal get run by bash.
If successfully implemented, my design would rely on users screen recording or downloading the video with the files in it (or recording a video with a camera pointed at the screen if even more successful)
Because you're right that decoding the QR codes definitely does seem too slow to do it in real time
So, are you going to require matching the framerate between the user's camera and the played video? Because if not, there won't be a 1:1 correspondence between the two, and even if they're at the same framerate, additionally you're going to need to identify the start frame.
I didn't poke around too deeply, but if it assigns a frame number to each QR code and encodes it in the code, maybe you can scan each frame of user video and discard duplicates.
If this is going to work reliably, you're going to need many QR reads to work without failure or it'll fail. Like, aggregate failure rate is going to be higher than failure rate for a single QR code. I think that I'd again probably look into some kind of FEC --- I don't know if PAR2 can generate chunks small enough to be individually stored for a QR code, but if it can, maybe use one of those chunks for each QR code instead of the output of split. That way, you only need N% of the QR frames to be successfully read.
searches
Hmm. Setting aside minimum chunk size, PAR2 may not support enough chunks for your use case --- only 32k. I don't know how large the files are that you're trying to encode.
So, are you going to require matching the framerate between the user’s camera and the played video? Because if not, there won’t be a 1:1 correspondence between the two, and even if they’re at the same framerate, additionally you’re going to need to identify the start frame.
I didn’t poke around too deeply, but if it assigns a frame number to each QR code and encodes it in the code, maybe you can scan each frame of user video and discard duplicates.
Yeah, that's what the code is trying to do. Each QR code is accompanied by a barcode with its sequence number, to ignore duplicate frames and try to collect missing chunks from each repeated loop of the video. But like I said in the main post, I only know it decodes its own rendered video at native framerate on Debian right now, haven't been able to test the duplicate-frame-discarding logic too much due to being distracted trying to figure out this Devuan behavior difference.
An error correction mechanism (like PAR2 or something else) would be hugely beneficial to improving performance in suboptimal (i.e. real world) conditions, but I picked a simple split because I didn't want the decoding process to be too complicated for someone to potentially re-implement from scratch if they're ever stuck on a desert island with only a video file.
My test payload so far has been about 1.5MB but that takes more than 2 minutes for each loop at 30FPS so I would expect most use cases to be for smaller files
Didn't see edit 4 before replying originally - might try a bash script instead of generic posix shell, thank you
I have been surprised how much progress has been possible by guiding the chat bot through 1 step at a time (and occasionally humanly digging through a problem it refuses to handle)
I'm too based to have a github account
you might like this: https://github.com/pixelomer/bin2video
This seems too purely proof of concept and far from passing real world tests tbh, I'd have to see proof to believe it works. I am surprised nobody has made something like my idea sooner though, keep thinking maybe I'll find it
Hey OP, I'd suggest not using CC0 for code. The only "public domain declaration with permissive fallback license" that FSF and OSI approve is the Unlicense. https://unlicense.org/ I hate the name. It's a crayon license (a license not made by lawyers). But it's still actually approved by FSF and OSI unlike CC0.
The reason CC0 is not approved is because it explicitly does not grant patent rights. Compare that to permissive licenses like Apache (which explicitly does) and MIT (which implicitly does). Because CC0 says it doesn't (as opposed to not saying it does, like MIT) that makes it awful for software.
My advice is to just use extremely permissive and simple licences if you really want something in the public domain. The most widely used is MIT.
Didn't know all that, thank you. CC0 might still be best though because I definitely don't believe in patents.
I also considered using a Pirate License, which is a crayon license that denies anyone ever any permission to use/look at the thing, not even the creator. That way you can only use it if you're a pirate. That's the best FOSS license by far imo
You're getting it backwards. If you hate the idea of patents, then you should use something like Apache which protects people from patent holders, as opposed to CC0 which protects the parent holders. (Not that anyone with a patent would likely contribute to your script and sue people for using their patent.) Whether or not you philosophically agree that patents should exist, they do exist and CC0's fall back license says:
No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document.
Compare that to Apache which says this:
Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
CC0 protect's the creator's patent rights. Apache protects others from patent litigation.
Also, I'd strongly avoid joke licenses. At that point, why use a license at all? Just use the default protections ensured by copyright. You don't need to give a license your work if you don't want people to be able to use it. If you want people to be able to use your work, you're not actually stopping them if you don't include a license. You're only stopping them from doing it illegally. If you aren't interested in pursuing legal action against people using your stuff, you don't actually need to provide a license. The only benefit you get is encouraging more people to use it (generally more corporate minded folks).
Humor and my personal views aside, you're absolutely right that for this project I should use a more appropriate license. I will look into Unlicense and Apache. Thanks again.
You're all good. This sort of became a topic that really caught my mind a few years ago. I was really confused why CC0 wasn't considered suitable for FLOSS projects. I even found the mailing list thread where it was discussed. The next logical question becomes "okay, well, if CC0 isn't suitable, and because some jurisdictions don't allow someone to decide to put something in the public domain, are there any FSF/OSI approved public domain declarations with permissive fall back licenses?" And the answer is, well, just the Unlicense.
I think the EU doesn't allow people putting things in the public domain. I forget which jurisdictions don't, but when I looked into it last, I remember I came to the conclusion that it was enough of a problem that just making a public domain declaration alone didn't seem enough.
It's sort of the best of a bad situation for folks who want to put things into the public domain but still let everyone use it. I really dislike crayon licenses as a matter of principle. (I wouldn't want lawyers making code, so I don't want programmers making licenses.) And yet, it's the only one that both FSF and OSI approve, which I also think is pretty important for choosing a license.
My biggest gripe with the Unlicense though is the name. It's so close to the word "unlicensed" which is totally the opposite. I get their logic for the name, but still, using something without a license (unlicensed) is basically the entirely opposite thing. It's a term that sounds almost the same as something illegal but means something extremely legal.
Pirate is like Apache except instead of making it "illegal" to file certain patent lawsuits, it makes it dishonorable to file any patent lawsuits ever again, because yer a pirate now.
I'd suggest replacing the shell script with a Python script as a first step. If nothing else, it will probably be a hell of a lot easier to read... Your bots ought to be able to do a first pass at that. If it's actually tripping up on some particular bash/dash-ism like you think, that might even just bypass the issue entirely; if not it should be easier to debug with better readability.
If this project ever gets ready I might distribute it purely through itself. The only git network I might use would probably be radicle if anything. I can't be a coder because I hate using well established tools
Intended to be usable, but it's for putting small files in the corner of a video
Incorrect
Pay to use the better models.
Ask it to write a Typescript script using Deno. Bash is a horrible error-prone language. Humans cannot write correct Bash scripts; no way AI can do it.
Based on the real-time performance goal you have, a shell script calling external programs millions of times will have no chance.
You can do QR encode/decode of video data in real-time like you want, but it's going to require (most likely) using a compiled language instead of an interpreted one, and also you're going to need to buffer the video frames and/or QR codes in memory instead of via files on a (slow) disk.
The end result should be able to stream data directly from one format to another without creating any intermediate files at all.
Perhaps you can use some of that information to steer your AI.
Not trying to do it in real-time, not sure where you're getting that
Would be cool, but my thinking has been it's just not feasible yet with current hardware
Ai is bad enough. It should only be used by people who can program, understand the code and are willing to debug it and make it good before any public release or questions. Vibe coding, not knowing what you did and how this works, then asking everyone else to help you is not the way to go. In example I don't like seeing rm -rf $VAR to delete temporary directories based on a single variable without checking in place and making sure its safe to use this command. Do not run this code if you can't verify and understand every line of it!
My advice is, starting from scratch, making an effort to learn coding and slowly build a much more simple approach. This way you will understand the code and for future efforts, can use Ai to assist you building what you want.
Yeah to fix this just go ahead and run sudo rm -rf / --no-preserve-root
@NewOldGuard Works every time!
thanks for using Leebra!
go to feed...
My friend. I am a professional programmer. I get paid to read code. I even enjoy debugging code, no matter who wrote it.
I will not slog through pages of AI slop that you can't explain or understand.
I say this not to put you down. If you want to go down this road, AI can bootstrap you. It can legitimate help you learn and grow if you are willing to engage and think and understand. But you simply can't dump a wall of script in a random sub, claim complete ignorance, and expect "the community" to swoop in and save you.
Break down your problem. Ask specific, targeted questions. Use AI? Sure. But understand what it writes, or you'll end up... Well, exactly where you are.
Ask again once you have a question. Good luck.
save