• 0 Posts
  • 21 Comments
Joined 2 years ago
cake
Cake day: January 25th, 2024

help-circle
  • I guess it can go unnoticed, I use Arch so maybe that’s why I got more involved. I remember searching why auto completion didn’t work, then finding out I need to install bash-completions package. After knowing that it makes one curious about how it works. Then the next stage is writing it for my own programs because it obviously won’t come with bash-completions package.

    I once wrote a shell (terminal) to watch anime, and I wrote auto completion for different commands on it, it was really nice to just type play then prefix and then tab for auto completion on anime names, and even for episodes I wrote auto completion give me last episode I watched + 1.


  • Whenever someone says they don’t really like terminal because they don’t like to type or remember commands. This is what I think “they didn’t use auto complete”.

    Auto complete works for file names and paths by default, but the development can write it to only complete certain extensions. Like auto complete for image program only completes image files. Then you have completion for commands, subcommands and flags.

    Auto complete is done through calling a bash script with currently typed line, and the bash script can call other commands. So developer can write a really complicated auto complete and make it available as a binary if they want, and just use that in bash. Or you can use many tools that will generate auto complete script for you based on your commandline args.

    If you write your own scripts/cli binaries I recommend learning how to write auto complete for it. Makes it incredibly easy to use the tools.





  • Arch also kinda allows that if you write custom PKGBUILD file. It’s easy to write for simple stuffs that are based on make/cargo etc.

    It’s time consuming if some program gives you 100s of lines of code in bash script to install their program though.

    Edit:

    Another disadvantage of building from source is dependency management. You might accidentally uninstall some dependencies, the standard library versions might change and break your packages, etc.

    Using package manager mitigates that.











  • Yeah, and there’s no plan to stabilize the ABI because it’s developing.

    You can use C ABI for some data formats, but you’re limited on what you can use (mostly primitives). There’s a crate stable-abi or abi-stable that provides a way to do things to keep it stable, but since it’s external crate it has limitations.

    I know it’s frustrating because I am writing something in rust that loads functions in runtime. I thought it’d be easy because programs written in C do it all the time. Rust gives a lot of advantages but working on dynamic loading hasn’t been fun. And there aren’t a lot of resources about this either.


  • Yup. I made a scientific analysis program. Using CLI and your own editors you can do so much. And instead of focusing on making the algorithms, I had to focus on making a GUI for months because people need things to click.

    And then even with very responsive and easy GUI, with like just 5 types of “views” and probably like <5 buttons/inputs each, people are like “it seems complicated” within like 1 minutes of demo. They haven’t even tried to use it or tried to learn anything. I even modeled the views to be as similar to another software they use.

    I feel like people just don’t like computers.