• 3 Posts
  • 26 Comments
Joined 10 months ago
cake
Cake day: January 25th, 2024

help-circle









  • Thank you for your detailed response.

    I am ok using macros. But even proc macro only get the tokens and using in on the whole mod is unstable unless you use use it on mod sth{...} instead of code being on in a different file (sth.rs).

    The plug-in system is dynamic in a sense that my plans for it are loading them through shared libraries (.dll, .so) compiled separately by users. But I also have internally provided core plugins that come with the program. But rust ABI system is not that stable, so in worst case I might have to ask users to just add plugin code to some directory and re-compile program instead of loading from shared libraries. That’s why I’m trying to make it as simple as possible. Asking users to modify the rust code somewhere else yo register the plugin might be met with resistance.

    I was thinking that using build script to parse the source code and generating those codes could work, but that seemed hacky. So I was trying to see if there are better solutions, as it felt like a problem people might have come across themselves.



  • Thank you. I just put the call with !, I don’t necessarily want a macro solution. Any solution is acceptable, my requirement is that I can just keep adding more mods with functions in src/functions/ and not have to register each function.

    Inventory seems like the solution I am looking for. Although in my case, instead of collecting different values of the same type, I want to collect different types that all have same trait. But maybe I can make a temporary struct with Box<dyn _> member to collect it if trying to collect it directly doesn’t work. I do not plan to support WASM. I am planning to make C/C++ and Python API for the libraries though, so if it has problems with them, then I might have a problem.





  • For adding with Firefox or similar apps on laptop. I have another program that monitors clipboard (or selection), can filter with regex and run custom commands. So simply copying the url to the video can trigger the curl command to add to playlist.

    Making it in the phone is the hard part. I don’t know much about android dev so any help would be appreciated. I did find somewhere you can make a simple app with protocol definition for sharing, and on share to the app, run the request to the server in the local network.

    I also want to implement file share, if you share a file to that app from local storage, it could upload to the server and mpv can stream it. Since I have used the basic tcp connection, I couldn’t do that in this version either.







  • You know how people say “Devil you know is better than God you don’t”?

    Excel is that Devil people know. It’s not the best tool for a lot of stuffs but it let’s people do things.

    I saw a co-worker generate sequence for formula in excel for another cell in excel. They wanted to do average of all January data, instead of averageif/sumif/countif etc, they generated a sequence a1+a13+a25… And used excels’ drag down thing to make the formula. I’m like who could even verify it.


  • Some software is always going to have problems. Specially if the developer never had to work with linux.

    In my case I think of it like my choice of Linux like how people may choose other lifestyle. It’s not about having superior experience in everything, but about general good experience and self satisfaction.

    Just think of it this way, people in the 90s were happy with the softwares they had, so if some subset of software is not available to me it’s not end of the world. On the flip side many softwares are only available to me because of linux, my favorite is poppler-tools that allow me to merge PDFs and other pdf related tasks that in windows you’d need to pay Adobe for. If you compare and want things that you can’t have it’ll always make you unhappy. Everytime you search for a tool, search in linux websites or search source codes and you’ll be happy to ignore any tools that have a lot of licensing complications and windows only support. Not saying that’s the way to do it, but that’s how I do it.