3 ms·
This is a bad choice, I wouldn't understand that it needs to be read backwards. Why not use process's executable name instead?
by codedokode 3y ago
This is a bad choice, I wouldn't understand that it needs to be read backwards. Why not use process's executable name instead?
- lopkeny12ko 3y agoDid you even open the link? Human readability was not a goal, in fact quite the opposite.
- codedokode 3y agoI meant use the name of the program that embeds SQLite, for example, McAfee, Google Chrome etc. This way the user could easily understand which program has created the files.
- djbusby 3y agoHow does it get that in a cross platform way? Or want if the program name has exotic characters?
- codedokode 3y agoI think that in 2023 every decent OS should provide a method to get executable name. And every decent filesystem supports exotic characters.
- arp242 3y agoWhy spend time and effort on all of that when applications can just configure it themselves if they want to?
- yjftsjthsd-h 3y agoIf it were possible to determine the program name in a way that was portable and not too painful, it would be a nice feature for the library to automatically set a better default, both to save work for devs using it and to save sqlite devs the hassle of their library getting blamed for things that aren't its fault. Now, I don't think those conditions are likely to be met, but that doesn't mean it wouldn't be nice if it were practical.
- codedokode 3y ago> If it were possible to determine the program name in a way that was portable Every decent OS in 2023 should provide a method for this.
- krger 3y ago>Every decent OS in 2023 should provide a method for this. Yes, that's rather the problem—there isn't just one way to do that, which makes it a portability issue.
- anon-3988 3y agoIts a horrible link. It points to a specific commit...Okay, so it must have something to do with the commit? Nope, the commit is putting a limit on the number of symlinks to resolve for whatever reason. Then you also notice that the link is simply a link to the file, not a specific line (something like https://github.com/mackyle/sqlite/blob/18cf47156abe94255ae1495ba2da84517dce6081/src/os.h#L57-L79 https://github.com/mackyle/sqlite/blob/18cf47156abe94255ae14...), so you are expected to read the whole C file to figure out why.
- aspyct 3y agoor you just ^F and search for the string you're looking for and enjoy a good laugh :)