• 0 Posts
  • 125 Comments
Joined 2 years ago
cake
Cake day: December 31st, 2023

help-circle













  • The technology behind the registry is fine (which is what I think @VinesNFluff meant)

    But it’s execution in Windows was ass

    In theory, a configuration manager with DB-like abilities (to maintain relationships, schematic integrity, and to abstract the file storage details), isn’t a bad idea

    But the registry as it is today is pure pain




  • Lightfire228@pawb.socialtoProgrammer Humor@lemmy.mlCommit
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    5 months ago

    I mean, you just need to look at the conflicting files, fix up the code, then stage those changes and pop a new commit

    There’s no “special” merge conflict resolution commit “type”


    As for fixing the code itself, I usually look at what changed between both versions, and then re-author the code such that both changes make “sense”



  • that is a little more complicated

    p.communicate() will take a string (or bytes) and send it to the stdin of the process, then wait for p to finish execution

    there are ways to stream input into a running process (without waiting for the process to finish), but I don’t remember how off the top of my head

    
    from shutil import which
    from subprocess import Popen, PIPE, run
    from pathlib import Path
    
    LS   = which('ls')
    REV  = which('rev')
    
    ls   = run([LS, Path.home()], stdout=PIPE)
    
    p = Popen([REV], stdin=PIPE, stdout=PIPE)
    stdout, stderr = p.communicate(ls.stdout)
    
    print(stdout.decode('utf-8'))