• 0 Posts
  • 378 Comments
Joined 2 years ago
cake
Cake day: August 6th, 2023

help-circle
  • bastion@feddit.nltoSelfhosted@lemmy.worldWhere do I even start?
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    3 hours ago

    KDE connect and/or Synching/Syncthing-fork.

    I don’t think you’re ready for self-hosting, but getting these installed and sorted out will help you move along that path, plus it will meet your needs in the mean time.

    Bit, as others have suggested, get familiar with networking a bit.

    You might want to get a raspberry pi or cheap SBC with a good amount of memory and disk space, and fuck around for a bit, trying some things.




  • I think people naturally extend their unresolved issues and the concomitant behaviors into the macro scale, and that it is precisely by resolving the personal issues on a smaller scale that you gain greater power over your own life. As you do, your methods and behaviors spread, because people learn well by example, particularly when that example “wins” and comes from a natural place of acceptance.

    As people resolve their piece of the pie, they run into others who have, likewise, resolved their piece of the pie. …and, together, they do greater things, because they are capable of it, not tangled an a huge ball of personal issues, and why not too something or contribute to something you want to see done in the world?

    The massive issues we have a a society are precisely because we have too much emotionally charged information, and haven’t processed that information - and because the blind spots you have in your own personal life and with your own personal issues become your cultures, your nation’s, and the world’s problems as you gain power.

    Sorting through your issues, and resolving your blind spots means your power increases. And, as you do, then the scope of what you, personally can change grows - in part, because you are also more effective at working with others and rejecting (or similarly handling) problematic authority as you do.


  • The basic question is: Where does the motivation of your reaction (or action) come from?

    If you have an emotional goal to prevent the thing from having existed, you are doomed from the start.

    If you have accepted fully that it is the way it is, and that what you need to do is add a valid response to the situation, rather than preventing the existence of the situation, you’re probably on the right track.

    That is, you can’t block a punch, or respond in kind, if you haven’t accepted that you’re in a fight. Instead, you’ll just have your ass handed to you.

    When people say “how could this happen?!” they aren’t usually asking questions at all, even if it’s a situation they would benefit well from asking questions in. They usually mean “this shouldn’t have happened.” …and, they are wrong.

    It’s not that it should happen, or shouldn’t happen. Those are irrelevant. It’s that it’s happening (or happened), and the probability of naturally generating a valid response increases massively once you accept that.

    Once you accept the situation fully, you’ll be able to look at it clearly, and have a greater chance of recognizing it, and recognizing it before others even realize that it’s happening - or, before others realize they are telegraphing their actions before they strike. As such, you have a better capacity to respond appropriately.

    The largest problem humans have, in my opinion, is fighting ghosts and impossible battles - which leaves them open to being taken advantage of or repeating painful cycles. Radical acceptance addresses some of that, if treated as a means to think clearly, rather than as a religion to adhere to.










  • Succinctness, mainly. but honestly, that succinctness call can also be mostly acquired using sh.py, which is what I normally use if I’m using python as a sort of shell scripting - mostly because sh.py is a very minimal requirement, whereas Xonsh has quite a few dependencies.

    addendum: I’d say, if you’re already using Xonsh, and aren’t really looking to share your script with anyone other than Xonsh users or your own systems, you’d probably like to use .xsh scripts. But if you’re looking to share your script, use sh.py.




  • It’s a superset of python, so valid python should run fine. Imports into your shell are doable, too – for example, I import path.Path in my xonshrc, so it’s always available when I hit the shell. I don’t often have to use Path, because regular shell commands are often more straightforward. But when I do, it’s nice to have it already loaded. Granted, that could get kooky, depending on what you import and execute.

    You can associate/shebang Xonsh with .xsh files, or run “xonsh foo.xsh” - and that works like “bash foo.sh” would, except using xonsh syntax, of course.

    It’s not Bash compatible - copypasta of scripts may not work out. But it’s a good shell with some typical shell semantics.

    there are some great plugins, too - like autovox, which allows you to create python venvs associated with specific subfolders. so, cd myproject does the equivalent of cd myproject; . path/to/venv/bin/activate.

    overall, there definitely is some jank, but it’s a great tool and I love it.


  • I like nushell, but I love xonsh. Xonsh is the bastard love child of Python and Bash.

    it can be thought of as:

    • try this statement in Python
    • if there’s an exception, try it in bash.

    Now, that’s not a very accurate description, because the reality is more nuanced, but it allows for things like:

    for file in !(find | grep -i '[.]mp3^'):
        file = Path(file.strip())
        if file != Path('.') and file != file.with_suffix('.mp3'):
        mv @(file) @(file.with_suffix('.mp3'))
    

    Now, there are things in there I wouldn’t bother with normally - like, rather than using mv, I’d just use file.rename(), but the snippet shows a couple of the tools for interaction between xonsh and sh.

    • !(foo) - if writing python, execute foo, and return lines
    • @(foo) - if writing sh, substitute with the value of the foo variable.

    But, either a line is treated in a pyhony way, or in a shelly way - and if a line is shelly, you can reference Python variables or expressions via @(), and if it’s Pythony, you can execute shell code with !() or $(), returning the lines or the exact value, respectively.

    Granted, I love python and like shell well enough, and chimeras are my jam, so go figure.



  • Yes, ish. There are aspects of it that are really valuable, and fit some use cases extremely well. But, in some senses, yes. Like any DBMS, you’ve got to know it’s strengths and weaknesses. And if you do, there are definitely circumstances where you’d choose it over others. But not always.