|
Alternatively, you could write a fairly simple script in bash/perl/python to iterate over all the files in the target directory, using tar's append option to add a file one at a time until the tar file exceeds the defined maximum size, t which point you start a new tar archive. Depending on how strict you need to be about the tar size, you could set the size limit conservative so the resultant tar is always likely to be below your hard limit, or when the tar exceeds the limit delete the last file added, and start the new tar with that file.
|
# ? Mar 10, 2022 18:44 |
|
|
# ? Jun 8, 2024 20:46 |
|
All good, I really appreciate the additional advice. The fs and contents of this artifact are something I thankfully have control over, and these will ultimately still be used as a batch together so I’m ok with the underlying risks. The tool seems to have generated exactly what I need so I’ll pin this one for now
|
# ? Mar 10, 2022 19:01 |
|
I've got a bunch of audio files which I'd like to trim the first 18 seconds and last 36 seconds from. I'm using: code:
|
# ? Mar 10, 2022 19:56 |
|
Script it, using ffprobe to get the duration in seconds prior to using ffmpeg to trim?
|
# ? Mar 10, 2022 20:04 |
|
Pablo Bluth posted:Script it, using ffprobe to get the duration in seconds prior to using ffmpeg to trim? Yeah I figured that's my next step. I'm not 100% comfortable with bash scripting but I can work it out. I just wanted to check I'm not missing a simple flag to make it a one-line command, .
|
# ? Mar 10, 2022 20:13 |
|
Tea Bone posted:Yeah I figured that's my next step. I'm not 100% comfortable with bash scripting but I can work it out. I just wanted to check I'm not missing a simple flag to make it a one-line command, .
|
# ? Mar 10, 2022 20:15 |
|
Pablo Bluth posted:Comedy option: trim start, use a filter to reverse the audio, trim the start, reverse the audio back to the correct direction. I'm ashamed to admit I actually started down that path before posting here and realising there had to be a better way! Anyway, it looks like sox does the trick nicely, for some reason I just got hung up thinking ffmpeg had to be the answer.
|
# ? Mar 10, 2022 20:25 |
|
Pablo Bluth posted:Comedy option: trim start, use a filter to reverse the audio, trim the start, reverse the audio back to the correct direction. this is the only correct answer
|
# ? Mar 10, 2022 20:57 |
|
Are Nvidia drivers really that bad in Linux? I use wayland and do some occasional gaming in Linux, but mostly code and internet. I have a separate windows partition for actual gaming that I use occasionally & AMD drivers are such crap (in windows) that I almost want to try my luck with Nvidia.
|
# ? Mar 10, 2022 23:18 |
|
Nvidia works but you'll be behind the times when it comes to features and stuff is generally more broken. If you game mostly on windows it doesn't really matter.
|
# ? Mar 10, 2022 23:30 |
|
some kinda jackal posted:I have a really weird problem I'm trying to solve with hopefully built in tools.. This would be a good whiteboard question to interview programmers
|
# ? Mar 11, 2022 00:43 |
|
a dingus posted:Are Nvidia drivers really that bad in Linux? I use wayland and do some occasional gaming in Linux, but mostly code and internet. I have a separate windows partition for actual gaming that I use occasionally & AMD drivers are such crap (in windows) that I almost want to try my luck with Nvidia. There was a period a bunch of years ago that for a few months the nvidia drivers on linux had issues. Other than that, I've been using nvidia drivers (the proprietary ones) on linux for 20 years now and they've been top notch always. However, they dragged their heels on wayland support. The latest versions are really good though (510.54). Wayland works flawlessly in Gnome on nvidia, it's not quite there in KDE, but still usable. Therefore I'm right now on Xorg since gently caress gnome, even though wayland scaling for 4k is a lot better than X11. Windows games, those that work, work fine. I play Diablo and WoW and a smattering of other smaller games and they work fine. The main issue with nvidia drivers is when the kernel gets an update they need to be recompiled. If you have it setup correctly, such as having them registered with dkms or akmod so that they recompile on new kernels, usually you're set. Sometimes though, these automatic kernel modules systems fail and you can be left with a black screen when trying to boot it. Sometimes, their drivers do not compile on new-enough kernels, so that can be a pita to fix, but if they're pulled in from packages there are usually no issues. Nvidia drivers are "bad" because they're not open source and therefore nobody can fix them if something goes wrong. Their lag on supporting the needed libraries for Wayland was again a sticky point. For Nvidia these things don't matter though, since fixing them didn't make them any more money therefore were never a priority. They make their money from Hollywood, who are running server rendering farms on Linux/FreeBSD therefore those needs were prioritized. And with Optimus ... they really gave the finger to linux, though from what I've heard it's usable nowadays just fine. But the drivers themselves are (and always were) above AMDs in terms of quality, stability and performance.
|
# ? Mar 11, 2022 01:04 |
|
Bob Morales posted:This would be a good whiteboard question to interview programmers Doing it optimally is some sort of variation over the knapsack problem and thus NP-complete, I think? On the other hand, finding a simple good-enough solution sounds like a fertile field.
|
# ? Mar 11, 2022 01:34 |
|
Computer viking posted:Doing it optimally is some sort of variation over the knapsack problem and thus NP-complete, I think?
|
# ? Mar 11, 2022 01:49 |
|
Volguus posted:Nvidia stuff Thanks dude! And everyone else as well. If I get the opportunity to grab a newer Nvidia card I may jump on it.
|
# ? Mar 11, 2022 02:45 |
|
Computer viking posted:Doing it optimally is some sort of variation over the knapsack problem and thus NP-complete, I think? Yea. I just want to hear some dumb answers and see some embarrassingly bad code for the take home assignment
|
# ? Mar 11, 2022 02:50 |
|
oh well now I feel like I have to write an awful implementation of this
|
# ? Mar 11, 2022 20:46 |
|
Volguus posted:But the drivers themselves are (and always were) above AMDs in terms of quality, stability and performance. This is utter horse poo poo nvidia drivers have been utterly terrible for the past several years, even on windows. They've significantly dropped in quality from the halcyon days.
|
# ? Mar 11, 2022 21:03 |
|
Mr. Crow posted:This is utter horse poo poo nvidia drivers have been utterly terrible for the past several years, even on windows. That has not been my experience at all. It's true, it's only anecdotal since I don't have the desire, time and money (and frankly I don't really care) to fund a scientific study on how horseshit they are now compared with <x> years ago, but, for me, they have been getting better and better. On linux, as that's all I can speak about. If you do have data from such a study, by all means, share it with the class. It won't make me buy an AMD card anytime soon, but it may convince others.
|
# ? Mar 11, 2022 21:26 |
|
some kinda jackal posted:oh well now I feel like I have to write an awful implementation of this I have several quarter-baked ideas and I'm halfway tempted to create a data set from my fileserver and see how they work out. e: code:
It's my windows Documents directory, instead - faster to scan through and large enough. Copy here. Computer viking fucked around with this message at 22:07 on Mar 11, 2022 |
# ? Mar 11, 2022 21:27 |
|
Volguus posted:That has not been my experience at all. It's true, it's only anecdotal since I don't have the desire, time and money (and frankly I don't really care) to fund a scientific study on how horseshit they are now compared with <x> years ago, but, for me, they have been getting better and better. On linux, as that's all I can speak about. the in-kernel-tree drivers is what has convinced me my next video card will probably be AMD
|
# ? Mar 11, 2022 22:37 |
|
RFC2324 posted:the in-kernel-tree drivers is what has convinced me my next video card will probably be AMD That's true, that's absolutely the major advantage for AMD. No more akmod/dkms shenanigans. For me that's not an issue (plus I need CUDA), but I can understand those for which it is.
|
# ? Mar 11, 2022 22:42 |
|
Volguus posted:That's true, that's absolutely the major advantage for AMD. No more akmod/dkms shenanigans. For me that's not an issue (plus I need CUDA), but I can understand those for which it is. I use opensuse tumbleweed, so its not an issue of dkms shennanigans, its that they don't release the drat driver updates at the same cadence as kernel updates, so everytime a kernel update comes out it break video for a week or two. new kernel updates come out quite frequently in a rolling release
|
# ? Mar 11, 2022 23:27 |
|
Computer viking posted:Yeah that'll do nicely. I mean, I love R. Well, I wouldn't say "love"--we have a complicated relationship.
|
# ? Mar 12, 2022 15:03 |
|
I'm writing an http server. Should I log incoming requests to stdout or stderr?
|
# ? Mar 12, 2022 16:28 |
You should log to syslog and let it decide what to do about it using the severity, tag and facility control syslog has. I assume you're writing a httpd as a learning exercise?
|
|
# ? Mar 12, 2022 16:43 |
|
BlankSystemDaemon posted:You should log to syslog and let it decide what to do about it using the severity, tag and facility control syslog has. This. Log to the unified logger. Also, don't use log4j, tia
|
# ? Mar 12, 2022 16:59 |
|
cum jabbar posted:I'm writing an http server. Should I log incoming requests to stdout or stderr? For portability you could consider using syslog(3) instead, but that's not as convenient if your primary use is running the server in the foreground. Jourmald also vacuums up syslog(3) so it would be functionally equivalent, particularly if you include <> levels in your messages.
|
# ? Mar 12, 2022 17:00 |
|
cum jabbar posted:I'm writing an http server. Should I log incoming requests to stdout or stderr? You're own log file in some nonstandard location
|
# ? Mar 12, 2022 17:14 |
|
Log the text represented as graphics to giant .BMP files in a hidden subfolder of the user's home folder, with a name that is entirely unrelated to the name of your httpd.
|
# ? Mar 12, 2022 17:17 |
|
Bob Morales posted:You're own log file in some nonstandard location /Var/opt/obscura/files/data/logs
|
# ? Mar 12, 2022 17:18 |
|
Bob Morales posted:You're own log file in some nonstandard location As is industry standard. Alternatively just shoot it into the void. I have found no log at all very compelling to troubleshoot.
|
# ? Mar 12, 2022 17:19 |
|
Volguus posted:
No they are "bad" because they are bad. I don't give a crap about 'open source vs propriety' I'll use whatever works better. Ive had both cards over the years and it used to be that Nvidia was bad but atleast performed ok while AMD were bad and performed like trash. But since AMD threw everything out and started fresh its been much better, slowly catching up to the point now where the linux drivers out perform the windows ones in some games. With my 1070 it was a constant hassle of fighting the drivers at every turn, wayland performing like dog poo poo and having to manually fix so many games. Now I'm on a 5700XT, everything just works, even better it works best with the built in kernel mesa drivers, I don't have to do anything. I'm not gonna defend AMD on windows, their drivers still suck over there but if you are Linux only then I see no reason to even consider an nvidia card as it stands. Mega Comrade fucked around with this message at 18:01 on Mar 12, 2022 |
# ? Mar 12, 2022 17:32 |
|
cum jabbar posted:I'm writing an http server. Should I log incoming requests to stdout or stderr? log to stdout, run your app in a container and let god sort it out
|
# ? Mar 12, 2022 17:56 |
|
Volguus posted:That has not been my experience at all. It's true, it's only anecdotal since I don't have the desire, time and money (and frankly I don't really care) to fund a scientific study on how horseshit they are now compared with <x> years ago, but, for me, they have been getting better and better. On linux, as that's all I can speak about. I mean my experiences are also anecdotal; I find it highly unlikely anyone had done a video driver stability study or how you would even do one, there's so many moving parts... But the gist I've seen and personally experienced is that people are increasingly annoyed with nvidia driver quality. I was trying to find a video I thought GN or LTT or Hardware Unboxed or one of the big tech channels did on geforce experience but either I'm imagining it or I can't find it, its a trifecta of buzz words pulling up a lot of garbage in search. Certainly though if your gaming on linux and is the way to go, I've never heard someone say they're happy with the nvidia linux experience.
|
# ? Mar 12, 2022 19:54 |
KozmoNaut posted:Log the text represented as graphics to giant .BMP files in a hidden subfolder of the user's home folder, with a name that is entirely unrelated to the name of your httpd.
|
|
# ? Mar 12, 2022 20:52 |
|
I started dualbooting arch a few days ago with a 3080 as windows was really starting to irritate, here are some first impressions of nvidia on linux: I wanted to try a tiling window manager and figured wayland was the way to go as it's the future. Sway looked like the most popular and well developed wm on wayland so I picked that. I had to type '--unsupported-gpu' to launch it (used to be called '--i-will-not-buy-an-nvidia-graphics-card-in-the-future' or something). When I launched it I had no mouse cursor. I may have messed up some config with this as from a cursory web search not many people have had this problem outside of a vm and I don't have much linux experience but that's not the point - I'm not sure how common refusal to support proprietary drivers is in the freedom end of the linux community or if it's more specifically because of the gbm support in this case. Either way I'm using X11 for now. sometimes my monitor wouldn't reconnect after sleep, I think I've fixed it now by editing some 'nvsleep.sh' file using instructions on linux mint forums, so I don't think it's an error on my part for this one. Possibly could have opened a terminal blind and reconnected it but I hadn't even heard of xrandr at that point so I had to cycle the power, which was quite annoying. no hardware accelerated web browsing for modern nvidia apparently? the best solution for watching youtube videos on linux with nvidia seems to be 'use mpv'. Perhaps being forced to use something like mps is healthier than being exposed to youtube proper but hardware acceleration feels like something that should just be a standard feature these days. Overall it feels like nvidia and at least some portion of the community does not care about the linux desktop user experience for those with nvidia hardware. As I don't really play games now anyway it would be nice for my 3080 to at least pull it's weight a little bit day to day by performing basic tasks like drawing the mouse cursor and decoding videos. If I was in the market for a new card I think I would go for AMD unless I had a good reason to use cuda. Unrelated, I'm probably missing something obvious but I made a user systemd timer to change my wallpaper every so often. I'm not at the machine right now so I don't have the exact command but it was something like ExecStart=/usr/bin/feh --bg-max --randomize ~/.wallpaper/* straight from the examples. the exact same command works fine in the terminal but the log shows errors from feh that ~/.wallpaper/* does not exist and no usable images found. Using ~/.wallpaper/ works fine in both. how is the systemd --user service running commands differently than me pasting it in the terminal and how would this lead to feh itself seeming to interpret the path differently?
|
# ? Mar 12, 2022 21:53 |
|
Crack posted:Unrelated, I'm probably missing something obvious but I made a user systemd timer to change my wallpaper every so often. I'm not at the machine right now so I don't have the exact command but it was something like ExecStart=/usr/bin/feh --bg-max --randomize ~/.wallpaper/* straight from the examples. the exact same command works fine in the terminal but the log shows errors from feh that ~/.wallpaper/* does not exist and no usable images found. Using ~/.wallpaper/ works fine in both. how is the systemd --user service running commands differently than me pasting it in the terminal and how would this lead to feh itself seeming to interpret the path differently? Wildcard expansion is done by the shell, not the command itself, and systemd isn't a shell and doesn't do that kind of expansion.
|
# ? Mar 12, 2022 22:05 |
|
Specifically read the specifiers section in the man page https://www.freedesktop.org/software/systemd/man/systemd.unit.html "%h" is how you reference the home directory.
|
# ? Mar 12, 2022 22:13 |
|
|
# ? Jun 8, 2024 20:46 |
|
Mr. Crow posted:Specifically read the specifiers section in the man page https://www.freedesktop.org/software/systemd/man/systemd.unit.html I'm not at my desktop right now and just copied the example as it's basically what I used but I did specify the whole path in my service. These specifiers look very handy for future reference to save from having to do that though. pseudorandom name posted:Wildcard expansion is done by the shell, not the command itself, and systemd isn't a shell and doesn't do that kind of expansion. I'd assumed that the path was being sent to feh as-is, and feh was doing the expansion ( althoughI didn't know it was called wildcard expansion). Seems a little pointless in this example given an apparent equivalent result with the wildcard omitted. systemd timers were sold to me as direct replacement for cron which apparently does use a shell (and also handles ~) by the arch wiki, so I figured it would handle commands similarly. Guess I still have a lot to learn.
|
# ? Mar 12, 2022 23:45 |