Hi, I’m Shauna! I’m a 37 year old transgender woman from Ontario, Canada. I’m also a Linux enthusiast, and a Web Developer by trade. Huge Star Trek fan, huge Soulsborne fan, and all-around huge nerd.

  • 0 Posts
  • 19 Comments
Joined 1 year ago
cake
Cake day: June 15th, 2023

help-circle







  • It’s definitely an edge case by say you’re in ~/ and you run a script like ./code/script.sh then it thinks the current working direct is ~/ rather than what is probably intended which is ~/code/. If your bash script uses full paths like /home/$USER/code/ then it will still run correctly regardless of the current working directory that the scrip was run from.


  • You need to learn bash scripting. Also, there are a few default files that the .bashrc uses which can be helpful to compartmentalize the custom things you do to it so that it’s easier to undo if you screw something up. To do that, just add this to the bottom of your .bashrc

    if [ -f ~/.bash_custom ]; then
        . ~/.bash_custom
    fi
    
    

    What that will do is check if the .bash_custom file exists and then run the .bash_custom file in your home directory and apply anything in there. Also, you can call the file whatever you like, but bash does have some defaults that it will check for and run them without editing the .bashrc at all. It’s kind of hard to find a list of the the files that it automatically checks for, but I know that .bash_aliases is one of them, and I think it checks .bash_commands as well, but I’m not entirely sure. Either way, you can force it to check your custom one by using the code above.

    Then you can create the file and add any custom things in there that you like. For example, I like to frequently update through the terminal but running sudo apt update && sudo apt upgrade && sudo apt autoremove && flatpak upgrade was a bit tedious and I wanted a bit less feedback so I made a custom alias for my personal use.

    alias update='echo "Updating packages..."; sudo apt update -y &> /dev/null; echo "Packages updated."; echo "Upgrading packages..."; sudo apt upgrade -y &> /dev/null; echo "Packages upgraded."; echo "Cleaning up packges..."; sudo apt autoremove -y &> /dev/null; echo "Packages cleaned up."; echo "Updating flatpaks..."; flatpak update -y &> /dev/null; echo "Flatpaks updated."'

    Which hides most of the text from updating and just gives me feedback on what it’s currently doing if I don’t really care to know all of the details. So now I just run update in the terminal and plug in my password and it updates and upgrades everything in a human readable way.

    There’s a lot that can be done with bash scripting, like editing files, iterating over files and directories, setting environment variables. It’s basically a full programming language so the limits are mostly your imagination.







  • Well if we’re considering alternate histories where a civilization gains access to a working computer then it’s basically impossible to tell. It depends on so many variable factors. Whether someone in that time period takes a significant enough interest to even look into it in the first place, whether they’re smart enough to solve the question of what it’s doing, and even who’s hands the computer falls into.

    There’s a famous example of an ancient Roman trinket that was kept in the collection of a wealthy person. It was a small device that when placed over hot water would spin. We would recognize that device today as a steam turbine and we would know that it has the possibility of sparking the industrial revolution if the right person got a chance to look at it.

    So if an ancient civilization got their hands on a modern computer and managed to do anything useful at all with it, it would alter world history in ways that we wouldn’t recognize it anymore. Even if they didn’t directly reverse engineer the computer but instead gained insight into other technologies like electricity or plastic production, it would alter world history in such a way that the modern computer would almost certainly be produced much earlier than in our own history which kind of nullifies the point of the question.


  • Technically everything that a computer does can be simulated using any medium, pen and paper for example, or rocks and sand (relevant XKCD).

    As for actually creating the parts needed, well a modern computer is just a very advanced Turing Machine which only requires 3 parts to operate: a tape for storing memory, a read/write head for reading/altering the data in memory, and a state transition tape to instruct the head to move left/right on the memory tape.

    The memory and state transition tapes themselves can be anything, even a pen or rocks as in the previous examples. The read/write head could be anything as well. In previous iterations of computers we used the state of and turning on and off of vacuum tubes as a read/write head.

    So conceptually, any time that humans were intellectually capable of reasoning out the logic. Their computer would just run much slower and be less useful the farther back in time you go.


  • ShaunaTheDead@kbin.socialtoLinux@lemmy.ml*Permanently Deleted*
    link
    fedilink
    arrow-up
    4
    arrow-down
    1
    ·
    11 months ago

    I’m not sure where you’re getting that idea from. Almost anything designed for Windows works flawlessly through WINE or Proton. If I do run into an issue I usually find that Windows users are also having the same problems so it’s not a Linux compatibility issue. Every once in awhile I’ll have to run winetricks or protontricks to install a dependency. Overall, Linux compatibility is pretty incredible these days, in my opinion.