1. 1

    I do this extensively in scripts for cloning Git repos, downloading files from cloud storage (see also: rclone), managing plain-text to-do lists, the works. I used Gary Bernhardt’s selecta in all these scripts or years, and recently moved over to fzf with very little fiddling.

    1. 2

      Please, dear hacker friends, understand: This is the result of a blind adherence to a general policy of adding copyright notices to all programs. Not an absurdity of copyright law.

      There are plenty of absurdities in copyright law. But I don’t think this stems from any of them.

      1. 14

        I’ve been really tempted to buy a remarkable2. But the reviews I see say it’s great for note taking but not so great for just reading PDFs. Mostly I want to read PDFs. I’m still on the fence.

        1. 14

          As long as your PDFs don’t require color, it is 100% worth it. Definitely one of my favorite devices at the moment.

          1. 5

            Same. In the month or so I’ve had one, it hasn’t caused me a single frustration (and I’m the kind of person who gets annoyed at the user interfaces of my own Apple products). It works exactly as advertised. Anyone who thinks it might be worth the price tag should watch a third party review video and check out the official and awesome list projects. It has been awhile since I’ve stayed this excited about a new device so long after buying it.

          2. 12

            I picked one up recently hoping that I could migrate a lot of my ebooks and pdfs to it. I don’t plan on returning it, but I wouldn’t recommend it.

            I was a huge fan of the kindle dx, but I’ve managed to break the buttons on a couple which renders them practically useless. I was on the fence with the first remarkable device but figured I’d given the latest iteration a shot. I figured it’d be a good DX substitute. It’s not. I want to like it, the physical design is really good, but the software sucks.

            I have a large collection of documents (epub/pdfs) that I was looking forward to getting on the device. Largely a mix of books published in electronic formats from regular publishers (O’Reilly, Manning, PragProg, etc.) as well as a few papers and docs I’ve picked up here and there.

            First, the reMarkable desktop/mobile app that you have to rely on for syncing is a little wonky. Syncing between the device and mobile/desktop versions of the app works, but leaves a little to be desired. Second, I have yet to load a pdf or epub that isn’t brutally slow to navigate (just page by page). If the document has images or graphics (even simple charts and illustrations) it will affect navigation performance. Occasionally a document will load relatively quickly, and navigate reasonable well, only to slow down after a few page turns. Epubs tend to be a little more difficult to work with - particularly if you decide to change the font. All I have to compare this device to is my broken DX, which, everything considered, positively smokes the reMarkable.

            It’s usable. It works alright for PDFs, less so for epubs. On the positive side, the battery life is quite good.

            1. 3

              I agree with your analysis in most regards. Syncing a lot of ebooks and pdfs to it is not something at which it would excel by default. I have a large Calibre library, and I haven’t synced it over for that reason. However, it’s something I’m looking forward to investigating with KOReader, which supports the reMarkable.

              I haven’t experienced the lag that you talk about, but can understand that that would be bothersome – though I definitely have experienced the “wonkiness” of the companion apps.

              1. 1

                My understanding is that epubs are converted to PDF before being synced? Is that actually the case?

                1. 4

                  It renders the epub to pdf for display but that’s all in-memory. It’s still an epub on disk.

                  1. 1

                    Along these lines, another interesting observation I’ve made has to do with the way some kinds of text get rendered. In particular, I’ve encountered epubs with code listings that render fine in other apps and on other devices, but render horribly on the remarkable2 device. Interestingly, in some of those cases I will also have a publisher provided PDF that renders just fine.

                    Further, epubs and PDFs are categorized differently in both the app and the device. With epubs you can change the justification, page margins, line spacing, fonts, and font size. With PDFs you have fewer options, but you do have the ability to adjust the view (which is great for papers since you can get rid of the margins).

                    1. 1

                      I don’t know. I’ve got a couple books that are both pdf and ePub, and the pdf version behaves a little better. You can also resize and change fonts for ePub doc, but not for PDFs.

                    2. 2

                      I don’t think so – from my playing around with ssh, there are definitely some epubs stored on device. I actually think the browser extension generates epubs, rather than pdfs which was surprising.

                      1. 2

                        Huh. Cool. Hmmm. The real reason I shouldn’t get one is that I always fall asleep with my e-reader and it often bounces off my face.

                        1. 3

                          That’s a pro, for the device, it weighs next to nothing. I’ve damn near knocked myself out dropping an iPad Pro on my head when reading in bed.

                          1. 1

                            For me, it’s more the fact that the Kobo then ends up falling onto the floor. I’m not crazy with that with a $120 device, so …

                  2. 7

                    I own Gen 1 and Gen 2. I love the simplicity and focus of the device. It’s an amazing… whiteboard.

                    Note taking is not suuuper great. Turns out marking up a PDF to take notes actually isn’t that great because the notes quickly get lost in the PDF. It’s not like in real life, where you can put a sticky note to jump to that page. The writing experience is fantastic though. I have notebooks where I draw diagrams/ideas out. I like it for whiteboarding type stuff.

                    Reading is terrible. I mean, it works. Searching is painfully slow. The table of contents doesn’t always show up (even though my laptop PDF reader can read the TOC just fine). When you do get a TOC, the subsections are flattened to the top level, so it’s hard to skim the TOC. PDF links don’t work. Text is often tiny, though you can zoom in. EPUBs appear to get converted to PDFs on the fly and their EPUB to PDF conversion sucks. Though, I’ve found doing the conversion myself in Calibre is way better.

                    Overall, I like the device for whiteboarding. But it’s kinda hard to recommend.

                    1. 2

                      Marking up PDFs works better in color, since you can pick a contrasting ink color. I do it in Notability on my iPad Pro (which is also great for whiteboarding / sketching.)

                      I was tempted by reMarkable when the first version came out, but I couldn’t see spending that kind of money on something that only does note taking and reading. I’m glad it’s found an audience though, it’s a cool device.

                      1. 1

                        What is the advantage over drawing on a piece of paper or on a whiteboard, then taking a photo of what you’ve drawn, if needed?

                        1. 1

                          I tried paper note books, but I’m too messy and make too many mistakes. Erasing, moving, and reordering is hard on paper.

                          A whiteboard is pretty good for temporary stuff and erases better than paper. But, it can be a bit messy.

                          I also tried Rocketbook for a while. I got the non-microwaveable (yes you read that right) one. That was okay. A little meh for me.

                          And of course, you can’t read PDFs on any of these.

                        2. 1

                          Agreed that it is hard to find notes. There should be a way to jump to pages that have notes on them (this is how Drawboard PDF works, for example).

                          1. 1

                            Turns out marking up a PDF to take notes actually isn’t that great because the notes quickly get lost in the PDF. It’s not like in real life, where you can put a sticky note to jump to that page.

                            So far the best experience I’ve seen for this is LiquidText on an iPad Pro. While you can write on the PDF as any other annotator, there’s also a lot of more hypertext type of features, like collecting groups of notes in an index, or writing separate pages of notes that are bidirectionally hyperlinked to parts of the document they refer to. Or do things like pull out a figure from a paper into a sidebar where you attach notes to it.

                            The main downside for me is that you do more or less have to go all-on on LiquidText. It supports exporting a workspace to flat PDFs, but if you used the hypertext features in any significant way, the exported PDFs can be very confusing with the lack of expected context.

                        1. 4

                          This seems like a mix between software politics and regular politics, predicated on some assumptions that are very much not commonly held. Is it really on-topic?

                          Moreover, I was under the impression that it was “free software” which discriminated against proprietary software, and “open source” which explicitly did not (embodied by the dual worldviews of Richard Stallman and Linus Torvalds, respectively).

                          1. 2

                            I was under the impression that it was “free software” which discriminated against proprietary software, and “open source” which explicitly did not

                            That’s much, much cleaner than my experience actually bears out. For example, both cofounders of the Open Source Initiative maintain to this day that “open source” was just a new name for “free software”. They came to disagree with each other about what OSI actually did, in the early days, honored that identity.

                            More recently, in “defending” itself against new, strong copyleft licenses, the OSI board actually passed a change to its license-approval process making “software freedom” an explicit criterion.

                            Whether this is good politics, appropriation, or something like reality is a source of endless opinion. No clean theory survives first contact with reality. Or a competing theory.

                          1. 6

                            This is what early free and open people celebrated as “meritocracy”, before it became clear that the particular kind of lazy, blinkered discrimination actually practiced online, as distinct from the mythical fair holistic contest of achievement, potential, and brilliance hackers found so flattering, had terrible social consequences.

                            This was in fact the entire point of the word “meritocracy” from the beginning. It was coined as satire.

                            1. 2

                              This was in fact the entire point of the word “meritocracy” from the beginning. It was coined as satire.

                              And yet, the meaning and connotation of a term can change: See “blacklist”, a term already used in the 17th century that only recently became associated with racial tensions, so folks request to retire it now.

                              While meritocracy is terribly hard to implement and easy to abuse as a gatekeeping device, I wouldn’t be too hung up on its “original” meaning to reject the notion altogether.

                              1. 1

                                The point of examining meritocracy is to realize that any choice of partition or gradient, regardless of its particular operational benefits, is going to lead to an unjust and harmful society which oppresses the bulk of its population. How far would you change the meaning, and where would you try to go with it? By any definition of “better” and “best”, meritocracy writes its own critique.

                                1. 1

                                  That’s an actual argument. “It was coined as satire”, less so in my opinion (but commonly used as if it was).

                              2. 1

                                Yeah, it’s one of those tropes that’s better known in truncated form, which happens to give exactly the wrong impression. Like “rotten apple”, “information wants to be free”, and “Utopia”.

                                I’ve basically just given up. Unless the misapprehension is really the point I want to make.

                              1. 14

                                I fully intend to reread this, because it seems interesting, but I have no idea what Mitchell’s thesis is, or if he has a thesis. It mostly makes sense to me at the level of individual paragraphs, but I don’t know how they fit together.

                                In particular, the entire first half of the essay had me asking “why isn’t this just the difference between ‘free and open’?” Happy to see he anticipated the question, but I didn’t understand the response.

                                1. 11

                                  Sorry if that didn’t come across clearly enough. I write these things first and foremost for myself. Occasionally other people find them worthwhile.

                                  If I were going to try to mush the thesis into a comment box, it would be that the current go-to argument against new, strong copyleft licenses like SSPL, that open source licenses can’t discriminate against closed software development, flaunts the history of free and open source software. The whole crux of that movement was learning to tell the difference between “open” and “closed” and coming down strongly on the side of open.

                                  The reason the argument plays these days is that a bunch of closed software companies have taken over leadership of open source institutions. Twenty years ago, they’d’ve all counted as “evil” online, and the idea that open source “wins” if there’s open source in proprietary software would’ve been angrily and soundly dismissed.

                                  I have a mechanism for summarizing my own blog posts, which I never remember to use. I’ll add it now. Thanks.

                                  1. 3

                                    I think the hardest part is that I react to that and see “free, not open”. Looking at the current state of open source, I think a FSF person has every right to say “I told you so!”

                                    But clearly you think there’s more going on here. I see below that you think that was a personality driven fight, but is that the only way it misses what you think is going on?

                                    Edit: P.S. Sorry for “or if he has a thesis”. I think that’s sloppy writing on my part. What I meant is that I didn’t know how much you wanted to argue for a very specific point, vs. framing the situation and making observations as a sort of first draft of how to think about it.

                                    1. 6

                                      I mention in my post, or tried to mention, that I think the archetype of the free-versus-open schism invites us to write all this off as “same old story”, instead of seeing all that’s completely new and different.

                                      Superficially, the AWS-Elastic fight today seems a lot like the fight that kept AGPLv3 from becoming GPLv3. But we’re talking about a fight between companies, not, say, FSF versus Google. Even when foundations are weighing in, as OSI did against Elastic, we’re talking about foundations that have been propped up, staffed, and influenced by commercial firms and their people for decades. Among those companies, the ones with the most influence are first and foremost makers of proprietary products and services, plus huge integrator-consultancies, not movement stalwarts, as in the early 2000s.

                                      Personalities were a big part of the FSF-OSI schism. But there were real policy issues there, too. I don’t mean to write it off as a big Tim-ESR-RMS-Linus pissing match, though it was that, too.

                                  2. 4

                                    I think the thesis is that the phrase “open source” has gone from being about freedom of end-users to read/copy/modify software to freedom of corporations to include software in their proprietary stacks which end-users are not permitted to read/copy/modify. And that the complaints that Elastic’s new license is not “open” are just a new move in this long battle over whose freedom open source is about.

                                    1. 2

                                      I know what you mean by “I don’t know how they fit together”. He does not have a structure sort of writing style. You kind of have to go along for the ride of all his thoughts, but I enjoy that sometimes more than the “5 things you need to know about open source licensing” sort of blogging.

                                    1. 8

                                      Not one mention of ESR or RMS, which is a bit ahistorical. It’s all ancient history, one supposes, but there was a deliberate push to move towards the current anodyne, toothless culture around Open Source. People needed to get paid, and that was the compromise we chose.

                                      One bit is sadly humorous to me:

                                      It was just as much a time of brash, arrogant, idealistic hard-cases prying open the eyes of fellow developers and sending them out for a fight with the industry.

                                      We had one such amazingly brash hard-case. The platinum bar of libre software, best kept under a glass dome, as a continual reference point for where we were actually at. The mob banded together to throw him out and mock him. Everybody clapped.

                                      What’s the point in standing up for a community or an ideal if we all know that fate could await us? Libre software already pays poorly, so how can we compete with the big and small corporations enclosing the commons? Why bother?

                                      1. 10

                                        Not one mention of ESR or RMS

                                        Not by name, which I expect is intentional, but several references to such persons without names such as:

                                        Pick a vague, high-sounding snippet from the “Open Source Definition”, an edited copy of an edited copy of a generalist statement of principles drafted in private mostly by one guy.

                                        1. 8

                                          Yeah, that’s what I had in mind. I didn’t want to personalize the issues. The exception was Tim O’Reilly, who I mentioned by name. But he named his company after himself, so I didn’t really have an option without making a potentially obscure reference, like “Animal Books, Inc.”.

                                          It’s important not to understate how important peculiar personalities were to all of this. But I think their importance gets overplayed more often than underplayed. And I thought overplaying it here would weaken what I have to say.

                                          One of the points I hope I made was that what we’re seeing now isn’t just a rehash of the old “free versus open” schism, which was very personality driven. The fissure around copyleft versus permissive is opening up again, but the context and content is very different.

                                          1. 2

                                            Ah, fair point!

                                          2. 8

                                            RMS was definitely the figurehead of the “free” movement. But I think that unique symbolic status was more a reflection of hackers, and scene media, wanting one “face” per camp. I’ve known plenty of folks who took his views to heart, acted, and spoke on them. Some even came to chide him for his “tactical compromises”.

                                            Some of these folks are still around, and still very active. Everybody’s social experience is different. Mine has been that the movement burns a lot hotter in Europe, in India, and generally outside the USA.

                                            People needed to get paid, and that was the compromise we chose.

                                            Thanks for that. I don’t think I’ve seen that view before.

                                            I’ve usually seen it framed as giving up the goal of freedom for the side effects of corporate efficiency, shared resources, leaner startups, and so on. But I suppose it can also be seen as preserving freedom or openness within the trade, but not outside it, without it necessarily following the compromise is just a self-serving conspiracy against the laity. Some is better than none.

                                            Personally, that strikes me as balancing out heavily on the side of the money. But that’s hardly provable, or falsifiable. Just an impression.

                                            1. 7

                                              What’s the point in standing up for a community or an ideal if we all know that fate could await us?

                                              I don’t want to re-litigate RMS losing access to an office and a private organisation deciding they did not want him as their leader. But the philosophical split between East Coast/MIT inflected GNU and West Coast/Berkeley BSD was a fact long before everyone was made aware of Stallman’s culinary habits.

                                              And it’s still a huge factor. I like to think that people who like BSD see themselves are future entrepreneurs, eager to lock their secret sauce away when they make it big, while GNU lean more towards academia’s ideal of information open and accessible to all.

                                              1. 4

                                                It’s annoying that BSD is technically the “freer” license (e.g., lets developers do more with their code) while accelerating the tragedy of the commons. The academics, it would appear, were correct.

                                                1. 2

                                                  What does BSD allow that MIT doesn’t? Or do I misunderstand which licenses you’re comparing?

                                                  1. 4

                                                    I would assume that the comparison is between the GNU-culture licenses (eg GPL) and the BSD ones.

                                                    1. 1

                                                      Correct, I honestly forgot the dual meaning. I could have used “Harvard” but MIT was where RMS thrived.

                                                    2. 1

                                                      I used “MIT” in the sense of where RMS pursued doctorate studies (he earned a bachelor degree at Harvard). I don’t know if it’s stated explicitly, but I do believe that he was very influenced by the academic view of software.

                                                      MIT isn’t a monolith and as a technical seat of learning it has strong ties to business.

                                              1. 13

                                                I’ve really enjoyed reading this blog over the last few weeks. He has a great perspective and explains the legal side well. Seems like there is an “Open Source Industrial Complex” where lots of money is made selling products and having conferences about “open source”.

                                                1. 5

                                                  You’ll hear people who work in the field joke about a “compliance-industrial complex”. I think that started back in the early 2000s, after big companies started permitting use of open source in masse. Salespeople for nascent compliance solutions firms would fly around giving C-level officers heartaches about having to GPL all their software. My personal experience of those products, both for ongoing use and for one-off due diligence, is that they’re way too expensive, painful to integrate, just don’t work that well, and only make cost-benefit if you ingest a lot of FUD. Folks who disagree with me strongly on other issues, like new copyleft licenses, agree with me here.

                                                  That said, I don’t mean to portray what’s going on in the open source branding war as any kind of conspiracy. There are lots of private conversations, private mailing lists, and marketing team meetings that don’t happen in the open. But the major symptoms of the changing of the corporate guard are all right out there to be seen online. That’s why I walked through the list of OSI sponsors, and linked to the posts from AWS and Elastic. It’s an open firefight, not any kind of cloak-and-dagger war.

                                                  1. 7

                                                    Agreed. I’m getting increasingly tired by some communities’ (especially Rust’s) aggressive push of corporate-worship-licenses like BSD, MIT (and against even weak copy-left licenses like MPL).

                                                    1. 17

                                                      I’m saying this with all the respect in the world, but this comment is so far detached from my perception of license popularity that I wanna know from which niche of the tech industry this broad hatred of Rust comes from. To me it seems like one would have to hack exclusively on C/C++/Vala projects hosted on GNU Savannah, Sourcehut or a self-hosted GitLab instance to reach the conclusion that Rust is at the forefront of an anti-copyleft campaign. That to me would make the most sense because then Rust overlaps with the space you’re occupying in the community much more than, say, JavaScript or Python, where (in my perception) the absolute vast majority of OSS packages do not have a copyleft license already.

                                                      1. 3

                                                        Try shipping any remotely popular library on crates.io and people heckle you no end until they get to use your work under the license they prefer.

                                                        Lessons learned: I’ll never ship/relicense stuff under BSD/MIT/Apache ever again.

                                                        1. 2

                                                          this broad hatred of Rust comes from

                                                          Counter culture to the Rust Evangelism Strike Force: Rust evangelists were terribly obnoxious for a while, seems like things calmed down a bit, but the smell is still there.

                                                          1. 1

                                                            I think it’s beneath this site to make reactionary nonsense claims on purpose.

                                                            1. 2

                                                              How is criticizing a (subset) of a group for their method of communication “reactionary”?

                                                              1. 1

                                                                I’m saying soc’s claim about Rust pushing for liberal licensing is nonsense and probably reactionary to the Rust Evangelism Strike Force if @pgeorgi’s explanation is true. My point is that “counter culture” is not an excuse to make bad arguments or wrong claims.

                                                                1. 2

                                                                  OK, that makes a bit more sense.

                                                              2. 2

                                                                reactionary nonsense claims

                                                                like talking about some “broad hatred of Rust” when projects left and right are adopting it? But the R.E.S.F. is really the first thing that comes to my mind when thinking of rust, and the type of advocacy that led to this nickname sparked some notable reactions…

                                                                (Not that I mind rust, I prefer to ignore it because it’s just not my cup of tea)

                                                          2. 7

                                                            I won’t belabor the point, but I’d suggest considering that some of those project/license decisions (e.g. OpenBSD and ISC) may be about maximizing the freedom (and minimizing the burden) shared directly to other individual developers at a human-to-human level. You may disagree with the ultimate outcome of those decisions in the real world, but it would be a wild misreading of the people behind my example as “corporate worshipping”.

                                                            As I have said before: “It’s important to remember that GNU is Not Unix, but OpenBSD userland is much more so. There isn’t much reason to protect future forks if you expect that future software should start from first principles instead of extending software until it becomes a monolith that must be protected from its own developers.”

                                                            Not all software need be released under the same license. Choosing the right license for the right project need not require inconsistency in your beliefs about software freedoms.

                                                            1. 6

                                                              The specific choice of MIT/Apache dual-licensing is so unprincipled and weird that it could only be the result of bending over backwards to accommodate a committee’s list of licensing requirements (it needs to compatible with the GPL versions 2 and 3, it needs a patent waver, it needs to fit existing corporate-approved license lists, etc). This is the result of Rust being a success at all costs language in exactly the way that Haskell isn’t. Things like corporate adoption and Windows support are some of those costs.

                                                              1. 3

                                                                I can’t speak directly to that example, as I don’t write Rust code and am not part of the Rust community, but it would not surprise me if there were different and conflicting agendas driving licensing decisions made by any committee.

                                                                I do write code in both Python and Go (languages sharing similar BSD-style licensing permissiveness), and my difficult relationship to the organization behind Go (who is also steward of its future) is not related in any way to how that language has been licensed to me. Those are a separate set of concerns and challenges outside the nature of the language’s license.

                                                        1. 3

                                                          The title is clickbait. The post fails to back it up.

                                                          For the conclusion to follow from the author’s vague assertions that Google is behind Chrome and Google does Bad Things, you have to share some unstated view of what the Web should be, that Google’s interests will inevitably drag Chrome against it, that Firefox is the antidote, and that that difference Firefox can make is a moral one. Ditto their statements to make Google out as the same as Microsoft of yesteryear. As someone who worked in Web Dev in the Internet Explorer era, who did a lot of cross-browser bug hunting and had to price contracts based on browser support, I don’t see it.

                                                          Chrome was a revelation. It was free. It followed the standards. It updated itself. It was fast, even on modest machines. You could install it on computers for friends, family, and non-techie coworkers and pretty much forget about it. No going back every year or every quarter, uninstalling a bunch of malicious toolbars and plugins, reassessing which browser is in the lead this year, or upgrading the one you already had manually. You didn’t have to constantly explain away disruptive UI changes. You could send links to settings pages. Chrome was, and remains, a gobsmacking high water mark of strategic corporate loss leading. And not just by Google. Before Blink, WebKit did long, faithful service.

                                                          There’s plenty of evidence that Google gets its way in the standards bodies, and not just to play Alpha Engineer. Many standards processes have been changed to cede more leadership to implementations, the most prominent of which is clearly Chrome. I’d love to see more diversity and openness in standards, and more outside contribution to roadmap in Chromium. But despite all the non-FANG potential that could be unlocked that way, it’s icing on the fluffy, moist cake of stability and maintenance that Chrome represents.

                                                          The dominant implementation of “core” web standards is permissively licensed open source. Major use cases, from news to secure communications to e-commerce, aren’t being levered by standards shenanigans into dependence on one vendor’s browser implementation, or by extension its operating system. Altruism it ain’t, at least from higher levels. But it ain’t heyday Microsoft, either.

                                                          1. 4

                                                            If the Bourne shell frustrates you … welcome to the club. It frustrates a lot of people.

                                                            Some of your frustration is probably rooted in the process model itself, the operating system, rather than in BASH. Pipes. Exit codes. Signals. Environment variables. Scattershot argument and output conventions. Languages don’t really solve this mess, so much as hopefully expose it faithfully, so you can try and manage it yourself. The language determines what abstractions you can use, and use conveniently, to try and do that. In my experience, those that try to “hide” the complexity below usually fail to expose it completely. The popular scripting languages have all figured it out, eventually.

                                                            Frankly, if you’re doing something delicate, or need it to be more reliable, there’s nothing wrong with #!/usr/bin/python or #!/usr/bin/ruby or #!/usr/bin/node or the like. Yeah, there are efficiency and startup time trade-offs. But if you’re on a desktop, laptop, or server, the cost of one interpreter probably ain’t gonna break you.

                                                            1. 1

                                                              The problem with those other options starts when you want to get that script on your coworker’s machine. Which version of python are they running? Do they have ruby or node installed?

                                                              1. 2

                                                                If you’re going to write a full-featured application, I agree that versioning remains wise. But core process handling and string manipulation APIs haven’t changed much in ten-plus-year-old popular scripting languages.

                                                                The exception’s probably Python 2 to 3, but most distros I’m aware of know this and suffix their binaries on $PATH. So you can do #!/usr/bin/python2 or #!/usr/bin/python3.

                                                                If the second choice is BASH, it’s not such a stretch to write for the common denominator and avoid newish bells and whistles. I’ve shipped deployment, testing, and other scripts this way, without significant issue.

                                                                1. 2

                                                                  Python has a habit of casually introducing backwards-incompatible changes in new releases. That’s not only python2 vs python3. E.g. in Python 3.6 there was a general overhaul where all the modules handling file paths moved from taking strings, to taking pathlib paths. That broke my code (and updating it to work on 3.6 broke it on 3.5). That’s just one point, the interwebs have plenty of such stories. The library ecosystem seems to have a similar attitude. Python2 vs Python3 is far from being a problem for me. But each time I find an old Python script that I need to use, I cringe in expectation of what I’m going to have to do with its dependencies and the Python version itself. A month ago e.g. I needed to make some 2 years old Python script from Chromium repos work today. Took me almost a day, hunting down historical dependency versions that weren’t available anymore on PyPI. I also have similar story with the most popular yaml library. With Python, any version change of just about anything, be it the interpreter or any library you’re using, is likely to cause pain. At least it has always been like that in my experience.

                                                            1. 8

                                                              I’ve been a happy customer of Feedbin since 2013. I use their web UI on desktop and the Reeder app (iOS) on my phone. Highly recommend both. Feedbin in particular has lot of nice touches like being able to subscribe to Twitter accounts and email newsletters as well as RSS feeds, an API, custom sharing targets, Feedbin notifier app, and it’s open-source.

                                                              1. 3
                                                                • Postgres 10
                                                                • Redis > 2.8
                                                                • Memcached
                                                                • Elasticsearch 2.4

                                                                That’s a crazy set of deps. Especially given postgresql can do key value store, PubSub and full text search with insanely fast trigram search. Even if you wanted to keep a dedicated key-vaules store, redies and memcached have huge overlap.

                                                                1. 3

                                                                  It’s a pretty standard Rails stack for sites that get a decent amount of traffic/poll a lot of feeds, which I imagine Feedbin does.

                                                                2. 2

                                                                  Likewise. Not sure when I first signed up, but it’s a bill I’m more than happy to pay each month.

                                                                1. 7

                                                                  About a hundred lines, including argument parsing, terminal color management, and helper functions.

                                                                  I suspect a lot of folks will click the title out of latent anxiety about their own quick and dirty scripts. There’s nothing wrong with quick and dirty scripts.

                                                                  Perhaps a hundred lines of throat clearing is “minimal” for internal tools used by larger teams, for shell scripts shipped as primary user or installation interfaces of products, or to meet standing policies about user interfaces. The “minimum” for most scripts I’ve written or helped maintain is a valid shebang. Maybe set -e.

                                                                  1. 7

                                                                    Agreed. I also think that when you’re writing scripts for consuption by anyone that isn’t just you (like an internal tool), you should think about removing Bash-isms to avoid issues with different shells.

                                                                    1. 6

                                                                      He does indicate it’s specifically meant to be run by bash via a shebang. Unless you really need to support multiple shells, the extra pain is just not worth it; bash is pervasive enough it’s a fair baseline for the vast majority of typical use-cases.

                                                                      The alternative is lowest common denominator POSIX and that’s hard work. Sometimes it’s necessary, but it’s not pretty (not that bash is either, but it’s certainly going to be more verbose). The salt-bootstrap.sh script is a nice example of the approach.

                                                                    2. 3

                                                                      And set -u, so undefined variables don’t silently work (typos make this bad), and set -o pipefail so failed piped programs stop execution. And then -euo pipefail in every subshell, and don’t forget to split up VAR = $(set -e && dosomething) and export VAR because export swallows failed exit codes…

                                                                      It’s really far too difficult to write correct bash, mostly it’s best to just avoid it.