5 ms·
sqlite3 :memory: -cmd '.mode csv' ... It should be a war crime for programs in 2022 to use non-UNIX/non-GNU style command line options. Add it to the Rome Stat
by throwaway892238 4y ago
sqlite3 :memory: -cmd '.mode csv' ...
It should be a war crime for programs in 2022 to use non-UNIX/non-GNU style command line options. Add it to the Rome Statute's Article 7 list of crimes against humanity. Full blown tribunal at The Hague presided over by the international criminal court. Punishable by having to use Visual Basic 3.0 for all programming for the rest of their life.
- _joel 4y agoWould :memory: even parse in some shells?
- ketralnis 4y agoWhy wouldn't it? I'm not aware of colons being a special character in any shell I can think of
- naniwaduni 4y agoColons are a little bit special in Bournish shells, since they're a delimiter in variable assignments after which tilde expansions, and some shells extend this behavior to command line arguments. Frankly, I don't find it outside the realm of possibility that there's some combination of options that will make :memory: misparse on a popular shell, I just don't know of any...
- chasil 4y agoMy VMS users say the same thing. Wow, do I not want that to happen. I am not a fan of DCL.
- deleted 4y ago[deleted]
- svnpenn 4y agoGo has been doing same thing for a decade now: https://godocs.io/flag https://godocs.io/flag Personally I'm fine with it. The whole, "let's combine 5 letter options into one string", always smacked of excess code golf to me.
- zrail 4y agoThe initial release of sqlite was in 2000. Yes, well after GNU-style command line options existed but not by much.
- michaelcampbell 4y ago> well after ... but not by much. This seems a contradiction to me. Was it "well after", or after "but not by much"?
- hinkley 4y ago22 years is a long time to deprecate bad command line arguments.
- pdimitar 4y agoSqlite team idolizes backwards compatibility. Which is admirable but at the same time it means we are not getting strong static typing of tables before 2035. Shame. Even bigger shame is that nobody else is taking the torch.
- hinkley 4y agoThe documentation should focus on the 'best' way to accomplish the goal, reducing the number of people who encounter and repeat the old way. Doing anything else is a self-fulfilling prophecy. Yeah of course people are still using the old way, if some of them didn't start using it until after you added the new way.
- simonw 4y agoThey added strong typing of tables a few months ago as an opt-in feature, hence keeping things backwards compatible: https://www.sqlite.org/stricttables.html https://www.sqlite.org/stricttables.html
- pdimitar 4y agoYep, I know. Wish they went even further but it seems like a good start.
- DarmokJalad1701 4y agoLet me introduce you to bazel ... bazel build //:--foobar --//::\\
- ggktk 4y agoI'm not sure what that does, but it reminds me of GNU Parallel's interface, which although smart, is not very intuitive and memorable in my experience.
- remram 4y agoThose -cmd are actually unnecessary, you can do sqlite3 :memory: '.mode csv' '.import taxi.csv taxi' \ 'SELECT passenger_count, COUNT(*), AVG(total_amount) FROM taxi GROUP BY passenger_count'