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

help-circle

  • I recommend you gnu parallel. It does similar things, but runs the commands in parallel. And it’s way easier to pipe than xargs. If you really need it to run one command at a time you can give number of cores to 1. And it also has progress bars, colors to differentiate stdout fo different commands, etc.

    Basic example: to echo each line

    parallel echo < somefile.txt

    To download all links, number of jobs 4, show progress

    parallel -j 4 --bar ''curl -O" < links.txt

    You can do lot more stuffs with inputs, like placing them wherever with {}, numbers ({1} is first) that allow multiple unique arguments, transformers like remove extension, remove parent path, etc. worth learning




  • Now I’m thinking why don’t we make an image editor that we can customize the simple UI. Like users choose which sliders and tools to put on the ui, it’ll be simple UI with like just 5-10 buttons/sliders/tools, but you van customize it to have basically anything. That way you can simply drag drop tools make new UI and then use it for specific use cases.

    Maybe already existing tools have that options. Or maybe we need to make a new one, in that case, it’d be nice if we could just add all different tools in dlls or sth, so that you can only download/keep the tools you use.





  • 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.