Problem with !data_structures
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearFO
    fool
    34m ago 100%

    It's a programming.dev-specific problem.

    but I believe in our volunteerist leaders. Even so...

    1
  • How do you solve/deal with procrastination?
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearFO
    fool
    1h ago 100%

    Not to be a downer but was this written by ChatGPT?

    It's clearly poetry with a rhyme scheme but most poets don't waste words. This feels like it wastes words


    Edit: lemme make a human poem

    Procrastination:
    Let me finish this haiku
    Sometime later

    1
  • What is an extremely wholesome fact that could help brighten someone's day?
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearFO
    fool
    1w ago 100%

    Maybe not specifically, but I had to double-take and reread it, and it got a laugh out of me. Could indirectly cause a wholesome moment if you tell something like that to someone like me.

    Just a thought <3

    7
  • linuxmemes
    linuxmemes fool 3w ago 94%
    kdesu
    115
    11
    https://emojicombos.com/cat-kaomoji

    This site is so cool! ```python />  フ |  _ _| /` ミ_xノ /     | /  ヽ   ノ │  | | | / ̄|   | | | ( ̄ ヽ__ヽ_)__) \二) ``` But how do people make these? I searched online and the best I could find were small Japanese communities still using MS Gothic (which is metrically incompatible with Arial/more-used fonts) and halfhearted JPG-to-ASCII-bitmap converters. Further, how do people manage these? I'd imagine an emoji search, but these millionfold emoticons don't have names; and the other alternatives are "I've got a meme for that ***scrolls down infinite camera roll***" or searching them up every time. ⠀/\\_/\\ (˶ᵔ ᵕ ᵔ˶) thanks lol / >🌷<\~⁠♡

    44
    10
    547
    68

    I saw a post recently about someone setting up parental controls -- screentime, blocked sites, etc. -- and it made me wonder. In my childhood, my free time was very flexible. Within this low-pressure flexibility I was naturally curious, in all directions -- that meant both watching brainteaser videos, _and_ watching Gmod brainrot. I had little exposure to video games other than Minecraft which ran poorly on my machine, so I tended to surf Flash games and YouTube. Strikingly, while watching a brainteaser video, tiny me had a thought: > I'm glad my dad doesn't make me watch educational videos like the other kids in school have to. For some reason, I wanted to remember that to "remember what my thought process was as a child" so that memory has stuck with me. Onto the meat: if I had had a capped screentime, like a timer I could see, and knew that I was being watched in some way, *I'd feel pressure.* For example, > 10 minutes left. Oh no. I didn't have fun yet. I didn't have fun yet!! > Oh no, I'm gonna get in so much trouble for watching another YTP... and maybe that pressure wouldn't have made me into an independent, curious kid, to the person I am now. Maybe it would've made me fearful or suspicious instead. I was suspicious once, when one of my parents said "I can see what you browse from the other room" -- so I ran the scientific method to verify if they were. (I wrote "HI MOM" on Paint, and tested if her expression changed.) So what about now? Were we too free, and now it's our job to tighten the next generation? I said "butthead" often. I loved asdfmovie, but my parents probably wouldn't have. I watched SpingeBill YTPs (at least it's not corporatized YouTube Kids). Or differently: do we watch our kids _without them knowing_? Write a keylogger? Or just take router logs? Do we prosecute them like some sort of panopticon, for their own good? Or do we completely forgo this? Take an [Adventure Playground](https://www.nytimes.com/2019/05/10/well/family/adventure-playgrounds-junk-playgrounds.html) approach? Of course, I don't expect a one-size-fits-all answer. Where do you stand, and why?

    79
    51

    Git cheat sheets are a dime-a-dozen but I think this one is awfully concise for its scope. - Visually covers branching (WITH the commands -- rebasing the current branch can be confusing for the unfamiliar) - Covers reflog - Literally almost identical to how I use git (most sheets are either Too Much or Too Little)

    569
    58

    What was your last RTFM adventure? Tinker this, read that, make something smoother! Or explodier. As for me, I wanted to see how many videos I could run at once. (Answer: 60 frames per second or 60 frames per second?) With my sights on GPUizing some ethically sourced motion pictures, I [RTFW](https://wiki.archlinux.org/title/Hardware_video_acceleration), [graphed](https://wiki.archlinux.org/title/Hardware_video_acceleration#Verification), and slapped on [environment variables](https://wiki.archlinux.org/title/Hardware_video_acceleration#Configuring_VA-API) and [flags](https://wiki.archlinux.org/title/Hardware_video_acceleration#Application_support) like Lego bricks. I got the Intel VAAPI thingamabob to jaunt by (and found that it *butterized* my mpv videos) ```bash $ pacman -S blahblahblahblahblahtfm $ mpv --show-profile=fast Profile fast: scale=bilinear dscale=bilinear dither=no correct-downscaling=no linear-downscaling=no sigmoid-upscaling=no hdr-compute-peak=no allow-delayed-peak-detect=yes $ mpv --hwdec=auto --profile=fast graphwar-god-4KEDIT.mp4 # fucking silk ``` But there was no pleasure without pain: Mr. Maxwell F. N. 940MX (the N stands for Nvidia) played hooky. So I employed the [longest](https://wiki.archlinux.org/title/Hardware_video_acceleration#Translation_layers) [envvars](https://github.com/elFarto/nvidia-vaapi-driver?tab=readme-ov-file#upstream-regressions) [ever](https://forums.developer.nvidia.com/t/if-you-have-a-problem-please-read-this-first/27131/2) ```bash $ NVD_LOG=1 VDPAU_TRACE=2 VDPAU_NVIDIA_DEBUG=3 NVD_BACKEND=direct NVD_GPU=nvidia LIBVA_DRIVER_NAME=nvidia VDPAU_DRIVER=nvidia prime-run vdpauinfo GPU at BusId 0x1 doesn't have a supported video decoder Error creating VDPAU device: 1 # stfu ``` to try translating Nvidia VDPAU to VAAPI -- of course, here I realized I rtfmed backwards and should've tried to use *just* VDPAU instead. So I did. Juice was still not acquired. Finally, after a voracious DuckDuckGoing (quacking?), I was then blessed with the freeing knowledge that even though [post-Kepler is *supposed* to support H264](https://forums.developer.nvidia.com/t/cant-get-to-work-vdpau-on-optimus-notebook-but-everything-else-works-fine/35938/21?page=2), [Nvidia is full of lies](https://forums.developer.nvidia.com/t/cant-get-to-work-vdpau-on-optimus-notebook-but-everything-else-works-fine/35938/21?page=2)... ```plaintext ______ < fudj > ------ \ ‘^----^‘ \ (◕(‘人‘)◕) ( 8 ) ô ( 8 )_______( ) ( 8 8 ) (_________________) || || (|| (|| ``` and then right before posting this, **gut feeling**: I can't read. ``` $ lspci | grep -i nvidia ... NVIDIA Corporation GM108M [GeForce 940MX] (rev a2) # ArchWiki says that GM108 isn't supported. # Facepalm ``` SO. What was your last RTFM adventure?

    76
    34

    I have a little helper command in `~/.zshrc` called `stfu`. ``` stfu() { if [ -z "$1" ]; then echo "Usage: stfu <program> [arguments...]" return 1 fi nohup "$@" &>/dev/null & disown } complete -W "$(ls /usr/bin)" stfu ``` `stfu` will run some other command but also detach it from the terminal and make any output shut up. I use it for things such as starting a browser from the terminal without worrying about `CTRL+Z`, `bg`, and `disown`. ``` $ stfu firefox -safe-mode # Will not output stuff to the terminal, and # I can close the terminal too. ``` Here’s my issue: **On the second argument and above, when I hit tab, how do I let autocomplete suggest me the arguments and command line switches for the command I’m passing in?** e.g. `stfu ls -<tab>` should show me whatever ls’s completion function is, rather than listing every `/usr/bin` command again. ``` # Intended completion $ stfu cat -<TAB> -e -- equivalent to -vE --help -- display help and exit --number -n -- number all output lines --number-nonblank -b -- number nonempty output lines, overrides -n --show-all -A -- equivalent to -vET --show-ends -E -- display $ at end of each line --show-nonprinting -v -- use ^ and M- notation, except for LFD and TAB --show-tabs -T -- display TAB characters as ^I --squeeze-blank -s -- suppress repeated empty output lines -t -- equivalent to -vT -u -- ignored # Actual completion $ stfu cat <tab> ...a list of all /usr/bin commands $ stfu cat -<tab> ...nothing, since no /usr/bin commands start with - ``` (repost, prev was removed) # EDIT: Solved. I needed to set the `curcontext` to the second word. Below is my (iffily annotated) zsh implementation, enjoy >:) ``` stfu() { if [ -z "$1" ]; then echo "Usage: stfu <program> [arguments...]" return 1 fi nohup "$@" &>/dev/null & disown } #complete -W "$(ls /usr/bin)" stfu _stfu() { # Curcontext looks like this: # $ stfu <tab> # :complete:stfu: local curcontext="$curcontext" #typeset -A opt_args # idk what this does, i removed it _arguments \ '1: :_command_names -e' \ '*::args:->args' case $state in args) # idk where CURRENT came from if (( CURRENT > 1 )); then # $words is magic that splits up the "words" in a shell command. # 1. stfu # 2. yourSubCommand # 3. argument 1 to that subcommand local cmd=${words[2]} # We update the autocompletion curcontext to # pay attention to your subcommand instead curcontext="$cmd" # Call completion function _normal fi ;; esac } compdef _stfu stfu ``` Deduced via [docs (look for The Dispatcher)](https://zsh.sourceforge.io/Guide/zshguide06.html#681), [this dude's docs](https://willpittman.net:8080/index.php?title=Zsh_completion_arguments), [stackoverflow](https://stackoverflow.com/questions/63552610/view-value-of-variables-in-a-completion-function) and overreliance on ChatGPT. # EDIT: Best solution (Andy) ``` stfu() { if [ -z "$1" ]; then echo "Usage: stfu <program> [arguments...]" return 1 fi nohup "$@" &>/dev/null & disown } _stfu () { # shift autocomplete to right shift words (( CURRENT-=1 )) _normal } compdef _stfu stfu ```

    60
    9