1. 2

    Excellent slides on why Neovim is the future! The way they innovate and reinvent Vim is amazing!

    1. 12

      There is also a VIDEO of the talk.

      1. 3

        Ah, yes, thanks. I was about to ask for it, since the slides are sometimes a bit incomprehensible without the talk.

    1. 1

      Currently I use iCloud for all my documents, so those are backed up anyway. I also use timemachine with an external HDD. Still considering using something like Backblaze.

      1. 9

        I love Clojure, but we need to have a talk. Specifically, the use of nil-punning is pretty terrible. (if (seq xs) ...) is not actually a good way to spell (if (not (empty? xs)) ...) but both the language designers and the community embrace this conflation of null and the empty sequence. There are other issues around nil and collections as well.

        Kotlin is my current favorite, but it’s not OK that the best way to write Kotlin currently involves a behemoth of an editor that takes like 2 GB of memory. I can write Clojure in Emacs, which only takes about 80 MB.

        1. 1

          I haven’t tried it, but you should take a look at the Kotlin language server.

          1. 2

            It looks promising, and I love the idea of a language server, but I failed to get it working in my alotted yak-shaving time. I need to take another crack at it. :-)

        1. 4

          Playing the flare-on CTF. Practicing some reverse engineering.

          1. 31

            My position has essentially boiled down to “YAML is the worst config file format, except for all the other ones.”

            It gets pretty bad if your documents are large or if you need to collaborate (it’s possible to have a pretty good understanding of parts of YAML but that’s not always going to line up with what your collaborators understand).

            I keep wanting to say something along the lines of “oh, YAML is fine as long as you stick to a reasonable subset of it and avoid confusing constructs,” but I strongly believe that memory-unsafe languages like C/C++ should be abandoned for the same reason.

            JSON is unusable (no comments, easy to make mistakes) as a config file format. XML is incredibly annoying to read or write. TOML is much more complex than it appears… I wonder if the situation will improve at any point.

            1. 22

              I think TOML is better than YAML. Sure, it has the complex date stuff, but that has never caused big surprises for me (just small annoyances). The article seems to focus mostly on how TOML is not Python, which it indeed is not.

              1. 14

                It’s syntactically noisy.

                Human language is also syntactically noisy. It evolved that way for a reason: you can still recover the meaning even if some of the message was lost to inattention.

                I have a mixed feeling about TOML’s tables syntax. I would rather have explicit delimiters like curly braces. But, if the goal is to keep INI-like syntax, then it’s probably the best thing to do. The things I find really annoying is inline tables.

                As of user-typed values, I came to conclusion that everything that isn’t an array or a hash should just be treated as a string. If you take user input, you cannot just assume that the type is correct and need to check or convert it anyway, so why even bother having different types at the format level?

                Regardless, my experience with TOML has been better than with alternatives, despite its flaws.

                1. 6

                  Human language is also syntactically noisy. It evolved that way for a reason: you can still recover the meaning even if some of the message was lost to inattention.

                  I have a mixed feeling about TOML’s tables syntax. I would rather have explicit delimiters like curly braces. But, if the goal is to keep INI-like syntax, then it’s probably the best thing to do. The things I find really annoying is inline tables.

                  It’s funny how the exact same ideas made me make the opposite decision. I came to the conclusion that “the pain has to be felt somewhere” and that the config files are not the worst place to feel it.

                  I have mostly given up on different config formats and just default to one of the following three options:

                  1. Write .ini or Java properties-file style config-files when I don’t need more.
                  2. Write a dtd and XML when I need tree or dependency-like structures.
                  3. Store the configuration in a few tables inside an RDBMS and drop an .ini-style config file with just connection settings and the name of the config tables when things get complex.

                  As of user-typed values, I came to conclusion that everything that isn’t an array or a hash should just be treated as a string. If you take user input, you cannot just assume that the type is correct and need to check or convert it anyway, so why even bother having different types at the format level?

                  I fully agree with this well.

                2. 23

                  Dhall is looking really good! Some highlights from the website:

                  • Dhall is a programmable configuration language that you can think of as: JSON + functions + types + imports
                  • You can also automatically remove all indirection in any Dhall code, converting the file to a logic-free normal form for non-programmers to understand.
                  • We take language security seriously so that your Dhall programs never fail, hang, crash, leak secrets, or compromise your system.
                  • The language aims to support safely importing and evaluating untrusted Dhall code, even code authored by malicious users.
                  • You can convert both ways between Dhall and JSON/YAML or read Dhall configuration files directly into a language that supports a native language binding.
                  1. 8

                    I don’t think the tooling should be underestimated, too. The dhall executable includes low-level plumbing tools (individual type checking, importing, normalization), a REPL, a code formatter, a code linter to help with language upgrades, and there’s full blown LSP integration. I enjoy writing Dhall so much that for new projects I’m taking a more traditional split between a core “engine”, and then pushing out the logic into Dhall - then compiling it at a load time into something the engine can work with. The last piece of the puzzle to me is probably bidirectional type inference.

                    1. 2

                      That looks beautiful! Can’t wait to give it a go on some future projects.

                      1. 2

                        Although the feature set is extensive, is it really necessary to have such complex functionality in a configuration language?

                        1. 4

                          It’s worth understanding what the complexity is. The abbreviated feature set is:

                          • Static types
                          • First class importing
                          • Function abstraction

                          Once I view it through this light, I find it easier to convince myself that these are necessary features.

                          • Static types enforce a schema on configuration files. There is almost always a schema on configuration, as something is ultimately trying to pull information out of it. Having this schema reified into types means that other tooling can make use of the schema - e.g., the VS Code LSP can give me feedback as I edit configuration files to make sure they are valid. I can also do validation in my CI to make sure my config is actually going to be accepted at runtime. This is all a win.

                          • Importing means that I’m not restricted to a single file. This gives me the advantage of being able to separate a configuration file into smaller files, which can help decompose a problem. It also means I can re-use bits of configuration without duplication - for example, maybe staging and production share a common configuration stanza - I can now factor that out into a separate file.

                          • Function abstraction gives me a way to keep my configuration DRY. For example, if I’m configuring nginx and multiple virtual hosts all need the same proxy settings, I can write that once, and abstract out my intention with a function that builds a virtual host. This avoids configuration drift, where one part is left stale and the rest of the configuration drifts away.

                          1. 1

                            That’s very interesting, I hadn’t thought of it like that. Do you mostly use Dhall itself as configuration file or do you use it to generate json/yaml configuration files?

                        2. 1

                          I finally need to implement Dhall evaluator in Erlang for my projects. I <3 ideas behind Dhall.

                        3. 5

                          I am not sure that there aren’t better options. I am probably biased as I work at Google, but I find Protocol Buffer syntax to be perfectly good, and the enforced schema is very handy. I work with Kubernetes as part of my job, and I regularly screw up the YAML or don’t really know what the YAML is so cutty-pasty from tutorials without actually understanding.

                          1. 4

                            Using protobuf for config files sounds like a really strange idea, but I can’t find any arguments against it.
                            If it’s considered normal to use a serialisation format as human-readable config (XML, JSON, S-expressions etc), surely protobuf is fair game. (The idea of “compiled vs interpreted config file” is amusing though.)

                            1. 3

                              I have experience with using protobuf to communicate configuration-like information between processes and the schema that specifies the configurations, including (nested) structs/hashes and arrays, ended up really hacky. I forgot the details, but protobuf lacks one or more essential ingredients to nicely specify what we wanted it to specify. As soon as you give up and allow more dynamic messages, you’re of course back to having to check everything using custom code on both sides. If you do that, you may as well just go back to yaml. The enforced schema and multi language support makes it very convenient, but it’s no picnic.

                              1. 2

                                One issue here is that knowing how to interpret the config file’s bytes depends on having the protobuf definition it corresponds to available. (One could argue the same is true of any config file and what interprets it, but with human-readable formats it’s generally easier to glean the intention than with a packed binary structure.)

                                1. 2

                                  At Google, at least 10 years ago, the protobuf text format was widely used as a config format. The binary format less so (but still done in some circumstances when the config file wouldn’t be modified by a person).

                                  1. 3

                                    TIL protobuf even had a text format. It sounds like it’s not interoperable between implementations/isn’t “fully portable”, and that proto3 has a JSON format that’s preferable.. but then we’re back to JSON.

                            2. 2

                              JSON can be validated with a schema (lots of tools support it, including VSCode), and it’s possible to insert comments in unused fields of the object, e.g. comment or $comment.

                              1. 17

                                and it’s possible to insert comments in unused fields of the object, e.g. comment or $comment.

                                I don’t like how this is essentially a hack, and not something designed into the spec.

                                1. 2

                                  Those same tools (and often the system on the other end ingesting the configuration) often reject unknown fields, so this comment hack doesn’t really work.

                                  1. 8

                                    And not without good reason: if you don’t reject unknown fields it can be pretty difficult to catch misspellings of optional field names.

                                    1. 2

                                      I’ve also seen it harder to add new fields without rejecting unknown fields: you don’t know who’s using that field name for their own use and sending it to you (intentionally or otherwise).

                                  2. 1

                                    Yes, JSON can be validated by schema. But in my experience, JSON schema implementations are widely diverging and it’s easy to write schemas that just work in your particular parser.

                                  3. 1

                                    JSON is unusable (no comments, easy to make mistakes) as a config file format.

                                    JSON5 fixes this problem without falling prey to the issues in the article: https://json5.org/

                                    1. 2

                                      Yeah, and then you lose the main advantage of json, which is how ubiquitous it is.

                                      1. 1

                                        In the context of a config format, this isn’t really an advantage, because only one piece of code will ever be parsing it. But this could be true in other contexts.

                                        I typically find that in the places where YAML has been chosen over JSON, it’s usually for config formats where the ability to comment is crucial.

                                  1. 9

                                    I’m glad somebody wrote this up, because I feel like everybody who works with big data learns these lessons independently (sometimes multiple times within the same organization). If you teach CS, please make your students read this before they graduate.

                                    Understanding these lessons is basically why the office I work at is so much more productive than the rest of the company we’re a part of: there’s been an effort to get incoming devs to understand that, in most cases, it’s faster, cheaper, & easier to use unix shell tools to process large data sets than to use fancy hypebeast toolchains like hadoop.

                                    There are a couple things this essay doesn’t mention that would probably speed up processing substantially. One is using LC_ALL=C – if you force locale to C, no locale processing occurs during piping, which speeds everything up a lot. Another is that if you are using GNU awk, there’s support for running commands and piping to them internally, which means that downloads can actually be done inside AWK and posts can be done there too – which allows you to open multiple input and output streams and switch between them in a single batch, avoiding some merge steps. Also, one might want to use xargs instead of gnu parallel, because xargs is a more mature tool & one that’s available on basically all unix machines out of the box.

                                    1. 4

                                      One thing I found particularly useful about this post (not evident from the title, but constitutes the first half) is specifics about how the Big Data Science Toolchains can fail, in this case Apache Spark, even when the author tried a bunch of the obvious and less-obvious fixes.

                                      The biggest win here seems to be not necessarily the raw processing time due to low-level optimizations in awk, but more big-picture algorithmic wins from “manually” controlling data locality, where Spark didn’t do the right thing automatically, and couldn’t be persuaded to do the right thing less automatically.

                                      1. 3

                                        Have them read “The Treacherous Optimization” which is all about how GNU grep is so fast: grep is important for its own sake, of course, but the point is that these tools have had decades of work poured into them, even the relatively new GNU tools which postdate the Classic Unix codebases.

                                        It’s also an interesting introduction to code optimization and engineering tradeoffs, or tradeoffs where multiple decisions are defensible because none of them are absolutely perfect.

                                        1. 3

                                          Yeah I’ve personally run into exactly this kind of slowness with R (and Python to a lesser extent), and fixed it with shell. I love R but it can be very slow.

                                          That’s part of the reason I’m working on Oil. Shell is still useful and relevant but a lot of people are reluctant to learn it.

                                          I posted this in another thread, but it is good to eyeball your computations with “numbers every programmer should know”:

                                          https://gist.github.com/jboner/2841832

                                          https://people.eecs.berkeley.edu/~rcs/research/interactive_latency.html

                                          In particular most “parsing” is linear time, so my rule is that you want to be within 2x-10x of the hardware’s theoretical speed. With certain tools you will be more in the 100-1000x range, and then it’s time to use a different tool, probably to cut down the data first. Hardware is cheap but waiting for data pipelines costs human time.

                                          1. 4

                                            When I was working in my first lab I did exactly the same – moved an existing computational biology pipeline off of R to AWK, lots of shell plumbing, GNU Parallel, and a Flask front-end server which submitted jobs in GridEngine. Brought runtime down from 40 minutes to about 30 seconds for one genome. R is nice but can be slow (also, it was just a prototype.)

                                            The pivotal lesson I learned was to embrace the battle-tested technologies in the shell stack and everything Unix instead of fantsy-pantsy modern stacks and tools on top of Hadoop, Spark and others. “Someone probably solved your problem in the 80s” from the author rings absolutely true.

                                            Others call it Taco Bell programming.

                                            1. 2

                                              Taco Bell programming is amazing, I’m saddened by the fact that Taco Bell programming has become quite esoteric. I wish this knowledge was more widespread in the industry.

                                          2. 1

                                            You must be very glad. 3 identical comments 😅

                                            1. 1

                                              Just a glitch. My mouse’s debounce doesn’t work properly, and lobste.rs doesn’t properly deduplicate requests, so when I click post it sometimes emits several duplicate requests which the server treats as duplicate comments (even though they come from the same form).

                                              There was a patch applied for this a year ago, but either it didn’t work or it never migrated from the git repo to the live version of the site.

                                          1. 5

                                            Maybe it’s just my naive preconceptions, but reading

                                            We have connected with so many command-line users who LOVE to customize their terminals and command-line applications.

                                            just feels very wrong from a corporation like Microsoft. The reason probably is that this portrayal of a “community” around a utility, a product basically, has a close to zero chance to be an authentic gesture from your loving OS-Patron (as if that were even the question), than being the result of a cold, statistical survey on how to emotionally engage consumers to consume optimally.

                                            But on the other hand, what else is there left for them to do?

                                            1. 9

                                              The reason probably is that this portrayal of a “community” […] has a close to zero chance to be an authentic gesture […] than being the result of a cold, statistical survey on how to emotionally engage consumers to consume optimally.

                                              I think your cynicism is unfounded and unhelpful. There is a community, and this is a big deal. People have wanted a modern, functional terminal for a long time. I know it’s still cool to hate on Microsoft in many places, but my observations are that the engineers in the company care a lot about contributing to community, and that management wants to do the right thing.

                                              1. 6

                                                There might be a user base, but I am highly sceptical (although I also could be wrong) that this is a “community” of people enthusiastic and engaged in it’s very idea of the terminal. And this really isn’t generic hate of Microsoft (although I still don’t trust them), but rather a distaste of corporate “over-friendly-ness”, regardless of their intentions.

                                                1. 1

                                                  Then douse your skepticism with the pure fresh water of statistics!

                                                  For example, this video from the Windows Developer group on Windows Terminal, released 4 days ago has seven hundred and thirty eight thousand views.

                                                  In what universe does that not count as a community?

                                                2. 3

                                                  I agree, and reading this I think there’s a lesson here for all of us. We need to zoom out and try to be mindful of the fact that people’s needs, wants, preferences and limitations vary a LOT, and so does our ability to be aware of every community or body of users that exists.

                                                  I spoke with a gent yesterday who worked at a company that specialized in selling virtualized DEC Alpha/Tru64 and VMS environments. They have a LOT of customers!

                                                  We all get so hooked into our own little corner of the world that we make the mistake of thinking that corner is the entirety of the world, and it just isn’t.

                                                  As I said elsewhere, Windows Terminal will be a big deal for me because I use WSL in a work context for impermeable reasons I won’t go into again here, where having a ‘real’ terminal emulator will be a massive quality of life improvement.

                                                  1. 2

                                                    Yet all I see is another attempt at “Embrace Extend Extinguish”.

                                                    How long will it take before we see some command line tools which will require this terminal emulator to actually run?

                                                    I’ve been using bash on CygWin whenever I needed some terminal and user land tools on windows and I’m not intending to switch over from something that’s been around for decades, to something new that has only been around for less than a decade. The same goes for WSL.

                                                    1. 5

                                                      Yet all I see is another attempt at “Embrace Extend Extinguish”.

                                                      ¯\_(ツ)_/¯ See what you want to see. That may have been how things were done in the Ballmer era, but we’re a long ways past that now.

                                                      1. 3

                                                        You expect people to just brush over everything they’ve done and are doing and just “move on” and trust them? They did a complete 180 in the last couple of years, you can’t expect people to not be skeptical of them. I don’t believe they have good attention, time will tell. I disagree with all the unethical ways they collect data.

                                                        1. 2

                                                          That may have been how things were done in the Ballmer era, but we’re a long ways past that now.

                                                          Are we? I don’t think so. I see a terminal emulator with extra features like embedded pictures in the text output, without specifications and proper documentations. To me this is the entire office EEE debacle all over again but with a terminal.

                                                          1. 4

                                                            What specifications does a Windows terminal demand? What on earth are they even meant to be extinguishing? It’s a terminal, not some core part of WSL2 or whatever else people are trying to connect this to. When they released PowerShell were they EEEing themselves?! How is this different?

                                                            1. 2

                                                              See: Embrace, extend, and extinguish - Strategy

                                                              Note the careful wording used:

                                                              Embrace: Development of software substantially compatible with a competing product, or implementing a public standard.

                                                              A terminal emulator can be considered a public standard. This terminal is an implementation of that standard.

                                                              Extend: Addition and promotion of features not supported by the competing product or part of the standard, creating interoperability problems for customers who try to use the ‘simple’ standard.

                                                              Extinguish: When extensions become a de facto standard because of their dominant market share, they marginalize competitors that do not or cannot support the new extensions.

                                                              Integration with ssh, PowerShell, Ubuntu on WSL, emoji’s and icons are all promotional features which are not widely supported by the competition. The competition can’t even support them, because a terminal in text-mode on a UNIX-system simply does not have the capability of rendering bitmap graphics until some kind of window-manager is launched.

                                                              What specifications does a Windows terminal demand?

                                                              First: It’s not a “Windows Terminal”. We already have plenty of those. It’s a POSIX-compatible terminal with various extensions that cannot be supported on the other platforms. And it’s running on Windows: A platform which throughout it’s entire history, has been used and abused to gain a monopoly marketshare.

                                                              What on earth are they even meant to be extinguishing? It’s a terminal, not some core part of WSL2 or whatever else people are trying to connect this to.

                                                              It’s an attack on the whole UNIX-like opensource ecosystem which shows that the spirit of Ballmer is still very much alive: Ballmer: ‘Linux is a cancer’ - The Register

                                                              When they released PowerShell were they EEEing themselves?! How is this different?

                                                              This is different from PowerShell in the sense that PowerShell was never meant to be a terminal that could run UNIX-like tools. PowerShell’s main addition was that it opened up commandline access to a lot of the internals of Windows which were previously inaccessible through an easily scriptable commandline interface.

                                                              1. 1

                                                                “The competition can’t even support them, because a terminal in text-mode on a UNIX-system simply does not have the capability of rendering bitmap graphics until some kind of window-manager is launched.” “ It’s a POSIX-compatible terminal with various extensions that cannot be supported on the other platforms. “

                                                                These are good arguments for them potentially doing an EEE strategy. Gotta wonder what the actual risk is, though, if terminal use is so different between Windows and Linux platforms. Anyone intending on using Linux would just use a subset that works on both. If they don’t, they might not care about Linux compatibility. That would mostly be common in Windows shops. I’m curious what attack strategy you think they’ll do in the terminal that would convert more free Linux boxes into paid Windows boxes.

                                                                1. 2

                                                                  The attack strategy is simple: They are betting on the lazyness of software developers.

                                                                  Suppose one of the Windows-only tools finds its way into one of the scripts powering one of the company’s products and sits there for about 3 years. Most of the time that is long enough for all the developers who’ve worked on it, to leave the company.

                                                                  When that happens it will be to hard or costly to fix those scripts and management will be forced to make the decision: “Just run our product on Windows”.

                                                                  I’ll have to admit that I’ve just made this example up, but I am basing it on an example similar to this:

                                                                  #include <stdio.h>
                                                                  
                                                                  int main() {
                                                                      int i = 1;
                                                                      int j = 2;
                                                                      
                                                                      printf("i=%d\n", i);
                                                                      printf("j=%d\n"); // Notice the missing parameter here!
                                                                  }
                                                                  

                                                                  If you compile this with gcc, it will fly in your face and tell you to fix your code. However if you compile this with a recent version of Visual Studio, you will discover that it happily compiles this into a working binary. It even fixes the missing parameter!

                                                                  In the past I’ve “inherited” a C++ application which should in theory be compiling on just about every OS. In reality this was infeasible because of all kinds of minute errors, like the one demonstrated above, which had slipped into the code due to the “extra and out of spec functionality” Microsoft had provided the developers with.

                                                                  You can call me a sadist or whatever you like, but I think that developers deserve a good whipping if they make errors like this. Doubly so if they then rely on the “extra functionalities” provided by their tools of choice.

                                                                  So having seen this, it’s not hard for me to imagine how this brand new terminal will lead to all kinds of “convenient accidents” which will lead to many pieces of software only being compilable and runnable on Windows boxes. It’s EEE in one of it’s purest forms.

                                                                  1. 5

                                                                    If you compile this with gcc, it will fly in your face and tell you to fix your code. However if you compile this with a recent version of Visual Studio, you will discover that it happily compiles this into a working binary. It even fixes the missing parameter!

                                                                    This simply isn’t true, and the reality is the opposite of what you are claiming, as you can verify yourself: by default gcc will compile this without warnings, whereas MSVC (and clang) will warn.

                                                                    1. 1

                                                                      Unfortunately, you are right, and I am dumping this only from memory and I am unable to share parts of the code base I was working on at that time… So I have no other hard proofs available.

                                                                      That doesn’t change my argument though. Allthough I have to admit that I’m genuinely surprised that gcc accepts this example.

                                                                    2. 2

                                                                      Interesting. Yeah, I could see subtle incompatibilities adding up overtime.

                                                            2. 1

                                                              Oh no, they’re still just as evil. They just adapted to the new market. They may or may not be doing less of EEE. I haven’t tracked that. They did use corrupt, patent law to suck billions of dollars out of Android ecosystem despite not contributing jack to it. Selling a polished ReactOS to enterprises probably would get you sued. People in Microsoft and articles like this said they started laying off lots of their QA people with more vulnerabilities, crashes, and data losses coming in future as result. They also have plenty of spyware they’re putting in the new versions of Windows. Plus, never forget their incentive structure means that the next CEO might do even more bad things.

                                                              Microsoft isn’t to be trusted now or ever in the future. All deals done with them should have an escape plan: portable software, data in open formats, and easy moves to another platform in worst case. With the costs of that, probably better to just do business with a more ethical company in the first place. On open platforms where possible. :)

                                                              Bonus: There’s actually a good example in your space. Github, not Microsoft’s offering, was the wise choice. Oh the irony of Github becoming Microsoft anyway.

                                                            3. 1

                                                              It’s very easy to write code that works on Cygwin and doesn’t work on Linux, so I’m not sure how this is any worse.

                                                              1. 3

                                                                Cygwin is a hack. This is an official, supported offering by Microsoft. Tons of people will use it in places where folks hoped to convert people away from Windows. Everything they do might also become legacy systems that, if there’s a lock-in risk here, add to the transition cost of switching that ensures lock-in. Cygwin probably could never do that.

                                                              2. 1

                                                                Nah, they won’t extinguish their own golden goose. Have you seen how much money they’re making with Azure? It ain’t chump change!

                                                            4. 2

                                                              Do you use WSL? If you don’t, you won’t understand the context.

                                                              Picture an environment where they replaced the blazing fast Ferrari like UNIX terminal handling routines with a Model T.

                                                              That’s what this is meant to fix AFAICT.

                                                              1. 1

                                                                No I never have, nor plan to. But I don’t understand why me commenting about their peculiar style of writing/engagement is related to their technical product, which I am not trying to downplay.

                                                                1. 1

                                                                  You’re right. Pardon me.

                                                                2. 1

                                                                  But users of msys or cygwin have had a satisfactory terminal forever in mintty. So it’s not like there’s never been an option.

                                                                  1. 3

                                                                    There hasn’t been a better alternative part of Windows itself, though. Not everyone uses msys or cygwin, especially Windows-only developers.

                                                                3. 2

                                                                  There’s always been communities around Microsoft products, esp developers and admins. It follows naturally with the combination of its humongous market and fact that people in Microsoft shops will want better experiences. They build helpful tools, share code, share tips, and so on like anywhere else. Entire sites were dedicated to Windows FOSS. Many of them also use UNIX/Linux on the side and/or in the same organization for different apps/services.

                                                                  Why does it surprise you that some chunk of Microsoft’s customers wanted a terminal with benefits of Nix terminals? Or that the company that made PowerShell, responding to market demand, would respond to market demand again for terminal improvements? I think it’s in their rational self interest to hook developers up with a good terminal much like it was to make Linux apps easier to run on Windows. Win win long as one is careful to not let Windows, esp any incompatibilities in Microsoft’s versions, to become a dependency. That avoids EEE. ;)

                                                                  1. 1

                                                                    This person is hired and talk in the name of the Microsoft Empire because it serve its interest well, such as actually LOVEing to customize its interest well.

                                                                    If MS learns that involving people from the outside into its project then it is a good thing, but I deeply agree that we should not fool ourself thinking Microsoft does something else than aiming for more market shares.

                                                                    It is the aim of any company of that size, even if it might feature honesty down the stream (the actual person writing the article).

                                                                    1. 3

                                                                      Yes that’s her job as a PM. Specifically they have open sourced this terminal. You talk about promotion and then jump to accuse them of the lack of bringing outsiders into the project.

                                                                      If you take a look at the contributions from the outside in under a week, I’d say outside involvement has already taken root. They’ve also been talking to developers directly (I’ve had a couple times where I’ve been invited to schedule time with them to discuss their development plans and I have no special relationship with Microsoft or the team).

                                                                      It seems like Microsoft has changed but there will be a balance to keep. As long as Azure keeps growing, Windows probably has less pressure to monetize and control every aspect of the platform. The reality seems less about them being generous and more about their business model shifting their focus. No altruistic leaning is needed to understand why Microsoft is suddenly interested in open source and continuing their interest engaging developers (this is how enterprise adoption stick so well, even if you weren’t part of that camp; I wasn’t and didn’t understand until I talked to folks that were).

                                                                      https://github.com/microsoft/Terminal

                                                                      1. 1

                                                                        The big, hard-to-change streams of revenue for Windows come from both lock-in to Windows-specific features and marketing Windows to companies that want their supplier to be around long time with big ecosystem. Microsoft has realized that open sourcing things that tie into their paid platforms usually can’t hurt those sales. They might even help them since the companies will be less likely to switch. They might even buy more Microsoft apps, hosting, or whatever. The community projects also bring them the business benefits of F/OSS and a PR boost.

                                                                        What’s not to like in this approach for a greedy company trying to make its numbers go up in a highly-competitive, changing market that features lots of F/OSS? ;)

                                                                  1. 1

                                                                    An example to take after. Loving it!

                                                                    1. 8

                                                                      Interesting, I’d also like to be less reliant on Google, but apparently my use case is near 100% different.

                                                                      • Google App Engine - nope
                                                                      • Google Analytics - nope
                                                                      • Google Fonts - nope
                                                                      • YouTube - nope
                                                                      • GMail as main account - nope (I have one, but only check it every few weeks)

                                                                      But here’s the kicker, I am an Android user and I don’t see myself switching to Apple in the near future - I usually pay ~300 EUR for a decent new mobile phone, and I refuse to pay 600-1000.

                                                                      So while I’d usually say I’m kind of not relying on Google, not using the services on mobile is too much to ask for me. But apart from the photos part (which get backuped to Google Photos) and location history (which I really, really love) my online life is decoupled from Google quite a bit.

                                                                      I’ve also tried using DuckDuckGo at times, but the search results always make me cry. Maybe I’m holding it wrong.

                                                                      TLDR: Depending on how exactly you use a service and how good the alternatives are, it’s either easy or hard to change. Bah :)

                                                                      1. 13

                                                                        I’ve also tried using DuckDuckGo at times, but the search results always make me cry. Maybe I’m holding it wrong.

                                                                        My experience is that Google search got a lot worse, so DDG doesn’t seem so bad anymore nowadays. Until very recently I used !g a lot with DDG, but no longer.

                                                                        1. 11

                                                                          Unasked-for pro tip: g! is the same thing as !g, which is super nice for us using DDG on mobile while also having the “insert space after punctuation marks” setting turned on (i.e. trying to write !g becomes “! g”, try to find that space, and then backspace…)

                                                                          1. 2

                                                                            Also note, you can put the g! or !g anywhere in the search, doesn’t need to be at the front, its nice to just go g! to have a quick look at what google finds if you’re not finding anything of note.

                                                                            And to the tree parent’s post, I find google search less and less useful every year for finding technical things personally. I rarely have to use the bang operator for google in ddg lately.

                                                                          2. 2

                                                                            Agree.

                                                                            It’s almost as if Google has been actively lowering the bar for competitors the last few years.

                                                                          3. 10

                                                                            I’ve gone from all-in Google fanboi to using almost none of their services, including on Android. I’m running LineageOS without Play Services. Things are surprisingly good, except:

                                                                            • OSM is OK but has nothing on Google Maps, and other location-based apps (eg Uber) seem to not work
                                                                            • Push notifications don’t work for a lot of apps
                                                                            • I still use GCal, and setting it up (with DavDroid) is possible but frustrating, especially when you have a lot of calendars (I have about 8)

                                                                            Despite that I’m happy with the move. It’s a bit like the early Android days - not exactly polished but usable and a bit of a challenge.

                                                                            1. 5

                                                                              Have you installed MicroG? That ought to solve your problems with other location-based apps by letting them use another location provider (like Mozilla’s). I think it also includes a push notification shim of some kind.

                                                                              Davdroid works really, really well with NextCloud calendars, and while setup is not super-easy, it doesn’t get any harder with lots of calendars than with one.

                                                                              1. 3

                                                                                I’ve been meaning to try MicroG, but haven’t yet. Thanks for the reminder.

                                                                                I’m somewhat tied to GCal until I migrate my wife off it (and G Suite in general).

                                                                            2. 7

                                                                              and I refuse to pay 600-1000

                                                                              Used to be in the same boat, but I see it differently now. You either buy a $300 phone from a Chinese company with pretty flagship-like specs, but it mines all your data or you pay $600 - $1000 and you buy a phone with flagship-like specs and it doesn’t mine your data. That’s what Apple’s biggest selling point is to me. You get privacy, but it doesn’t make everything unpolished or near unusable.

                                                                              You’re paying the 600-1000 price tag, just not upfront.

                                                                              1. 1

                                                                                I love LG from S.Korea… (have both LG5 and LG v20) . I changed battery recently ($9 bucks for a new from e-bay) added an SD card. Getting updates. Love video/sound/photo capabilities (may be not as ‘flashy’ as Samsung, but core quality is very good).

                                                                                Having a very thin phone, that slides into a pocket of my tight-fitting jeans –> is not something I value (not that age group, or body type :-) )

                                                                                1. 1

                                                                                  I might be misunderstanding your hint about the Chinese company. I use a Nexus 5X now (sure, it might be manufactured in China.) but in this case I see Google as the only company, no other one. Also not sure about my two HTC ones before that. They were all under 300 EUR.

                                                                                  1. 1

                                                                                    It was just the worst-case scenario. A Nexus 5X is a bit better, but using Google services on an Android phone is still pretty bad from privacy perspective. Maybe you should still reconsider and ask yourself if the extra money isn’t worth the privacy. Like I said, you’re just paying with you data right now instead of with your money. That’s Google’s MO.

                                                                                    1. 4

                                                                                      The extra cost for the Apple route is not just monetary; you’re also paying by giving up the ability to run the software of your choice on it.

                                                                                      1. 1

                                                                                        I got an Android to develop software on.

                                                                                        Have not done so a single time.

                                                                                2. 5

                                                                                  Duck Duck Go finds what I’m looking for most of the time, but I agree that Google is far better. If you care about privacy, consider installing the Tor browser. Google searches via Tor are more private, and this also lets you do Google searches outside of your personal Google filter bubble. Sometimes Google’s filter bubble prevents me from getting the results I need. The differences in search results can sometimes be astonishing and revelatory, so I recommend trying it.

                                                                                  1. 3

                                                                                    Just use StartPage if you want Google’s quality but (more) private queries.

                                                                                    1. 2

                                                                                      Yeah I absolutely agree, but Google has learned my interests (programming and games) good enough that it gives me good results. DDG is usually clicking 3 pages, then going to Google - every time I try it :(

                                                                                    2. 7

                                                                                      Google App Engine - nope

                                                                                      https://en.wikipedia.org/wiki/AppScale

                                                                                      Google Analytics - nope

                                                                                      Piwik

                                                                                      Google Fonts - nope

                                                                                      Just, uh, host the fonts?

                                                                                      YouTube - nope

                                                                                      For consuming video yep, for uploading you might try Vimeo

                                                                                      GMail as main account - nope (I have one, but only check it every few weeks)

                                                                                      I have just been slowly moving each and each service off gmail to my own domain.

                                                                                      1. 11

                                                                                        Not sure wink was asking for alternatives to the five services they don’t use…

                                                                                      2. 4

                                                                                        I’ve found DDG frustrating at times, too. I’m slowly learning how to better leverage it, though. i.e. I’ve automatically started changing my search queries in ways that help it figure out what I mean more easily: quoting certain words or including additional words that I wouldn’t normally include when doing a Google search.

                                                                                        1. 2

                                                                                          The quotes, added words, and using - to remove results improves any search engine. Including Google.

                                                                                          1. 6

                                                                                            I realize that. My point was that although the results from Google were better w/o those additions, you can work around DDG’s inadequacies by doing the things I listed.

                                                                                            1. 2

                                                                                              With Google you can’t be sure anymore. Sometimes it works, sometimes not it seems.

                                                                                          2. 3

                                                                                            I’ve also tried using DuckDuckGo at times, but the search results always make me cry. Maybe I’m holding it wrong.

                                                                                            DDG results range from better than Google to absolute garbage, but on average I find them workable.

                                                                                            However, I realized to started to depend on all kinds of Google search features that are not available in DDG. For example, when I type the name of an establishment in Google, I automatically get the hours and a real time graph with waiting time.

                                                                                            I wouldn’t have thought that trivial things like that would be important for me, but apparently they are, and I switched back to Google search.

                                                                                            1. 3

                                                                                              I’ve found mainly that DDG is ok in general but really terrible at certain specific kinds of searches. If you’re searching for an error message, specific line of code, bug report for a program, that sort of thing… Google is far better. For most other things DDG does just fine, and the ! shortcuts are real handy.

                                                                                              1. 2

                                                                                                It’s interesting that you love Location History so much; what do you like about it?

                                                                                                1. 3

                                                                                                  Well, for example looking up trip routes from a vacation. “When did I do home office 2 weeks ago? Monday or Tuesday?” “How long was this bike ride?”

                                                                                                  Nothing critical, just stuff I like to know and look up.

                                                                                                  1. 3

                                                                                                    Interesting, I also love the idea of having that data, but I hate the idea of other people also having my data, especially of a theoretically sensitive nature.

                                                                                                2. 1

                                                                                                  You can get a used, but perfect condition, iPhone 8 for less than 400 GBP, so maybe ~300 EUR is possible. The resale value is much higher, so I think the long term cost is comparable.

                                                                                                  1. 3

                                                                                                    But you’re still locked into Apple’s walled garden that way.

                                                                                                    1. 2

                                                                                                      I wish people would not parrot out thought terminating cliches like this. Locked into what exactly?

                                                                                                      1. 6

                                                                                                        I’m not the GP but I wouldn’t buy an iPhone because the only way to install apps on the phone is from the App Store, which makes something like F-Droid impossible. AFAIK the only way to install ‘non-official’ apps is to buy a Mac, sign up for a developer account, and then compile and self-sign apps.

                                                                                                        1. 2

                                                                                                          So you can install whatever you want; it just costs $300 (mac) + $99/yr (in true Apple fashion).

                                                                                                          Alternatively you could write a script that refreshes your certificates every night and do it for free!! (+the cost of a used Mac)

                                                                                                          Alternatively alternatively you could buy one of those sketchy “signing services” that force you to install a VPN so that they don’t get caught and use that.

                                                                                                          (Observation: Closed source software on non apple platforms is often worse than their open source counterparts. Practically no open source software exists for apple platforms, but the software quality is generally higher with some notable exceptions. I don’t know where I’m going with this, so it’s just an observation.)

                                                                                                        2. 4

                                                                                                          Locked into what exactly?

                                                                                                          Locked into not being able to run your own OS, and not being able to run your own programs without paying more (I understand you can install your own apps for 30 or 90 days, but you still have to pay for a developer license, IIRC).

                                                                                                        3. 1

                                                                                                          I use Dropbox for file storage, Gmail and Office365 for mail, OmniFocus for TODO, OneNote and Keep for notes, WhatsApp, Slack and Teams for chats, CrashPlan for backup, Google, Amazon and Apple for books, feed.ly for news, 1Password for secure info. where am I locked in?

                                                                                                          1. 4

                                                                                                            Yes, you are quite free to choose from any of the flowers Apple permits in the garden — but you are not free to choose something Apple does not permit.

                                                                                                      2. 1

                                                                                                        You don’t need to use Google services with Android. I’ve flashed LineageOS on my touch phone with FDroid software and I’m pretty happy with it. Edit: haven’t noticed this already got mentioned.

                                                                                                      1. 1

                                                                                                        I’ve done the same a while back.

                                                                                                        • Switched from Gmail to iCloud mail (Apple had given me the @me.com at the time which is nice)
                                                                                                        • Also changed all my account’s email address to the @me.com
                                                                                                        • Started using Duck Duck Go
                                                                                                        • Use an iPhone instead of an Android phone, I already use Macs so that wasn’t a hard switch
                                                                                                        1. 2

                                                                                                          We need more shots at having a cross-(Linux-)distro (if not crossplatform) package manager since flatpak and snap don’t seem to get much traction. Homebrew might have some advantage by starting with a non-zero marketshare.

                                                                                                          1. 9

                                                                                                            Nix is on a good path, it supports all Linux distros and macOS, has really good support for cross compilation, and has a lot of up-to-date packages (source: https://repology.org/).

                                                                                                            1. 2

                                                                                                              Nix supports macos and fulfills all criteria, but just has no adoption, so I wouldn’t bet on it. It’s really about size of package repo and afaik homebrew blows all other cross-platform options out of the water there.

                                                                                                              1. 6

                                                                                                                According to repology (https://repology.org/repositories/statistics), Homebrew has 4,694 packages (78.6% up to date), and nixpkgs unstable has 49,637 (84.3% up to date). If it is about size of package repo, I hope you take a look!

                                                                                                                1. 2

                                                                                                                  That seems… off. Debian unstable is ~29,000. Does Nix consider different versions to be different packages or something?

                                                                                                                  1. 6

                                                                                                                    No. We package all of the haskell package set, plus all the emacs modes. I we ignore having packaged some of these collections, we have about 23,000 packages.

                                                                                                                    1. 1

                                                                                                                      Interesting, is the “normal” stuff in there, like Firefox? I looked at Nix years ago but I found it too complicated to set up compared to just using APT, given that I don’t really care about rolling things back (now that I’m thinking about it, the only time I can ever remember having something broken by a package manager was when I used Arch for awhile).

                                                                                                                      1. 6

                                                                                                                        Interesting, is the “normal” stuff in there, like Firefox?

                                                                                                                        You bet! On Linux, you’ll get firefox no problem: nix-shell -p firefox.

                                                                                                                        For macOS, Nix is very good for getting dev tools, but I’d still get .app’s from Homebrew or the app store.

                                                                                                                        1. 3

                                                                                                                          Could you sum up why I should try using Nix instead of Homebrew on MacOS? I’m genuinly interested in switching over if it offers benefits over Homebrew.

                                                                                                                          1. 7
                                                                                                                            • Allows you to use older versions without problems, hell I can easily get an emacs build from 2009! Very useful for older projects or across different machines.
                                                                                                                            • There’s no problem dealing with many different versions of the same package at once. I could have 10 different packages all having a different version of gcc or clang and I won’t even notice.
                                                                                                                            • Customize builds easily. Useful for using forks of projects, using alternate dependencies, or changing configure flags.
                                                                                                                            • Reproducible builds. A nixpkgs revision can be enough to reproduce a build, no more Builds on My Machine (tm).
                                                                                                                            • Pin exact versions of packages, always creating the same environment. Really useful for development with other people.
                                                                                                                            • Easily and atomically roll back updates without any traces left behind.
                                                                                                                            1. 2

                                                                                                                              Hmm, that sounds good. There isn’t any tradeoff whatsoever?

                                                                                                                              1. 2
                                                                                                                                • It is very different from what you’re probably used to, making it harder to learn.
                                                                                                                                • The documentation could be better.
                                                                                                                                • The majority of users are on Linux, so the amount of packages that work on macOS isn’t as high, but it’s slowly getting there with more automated building happening.
                                                                                                            2. 3

                                                                                                              Why do we need cross-Linux package managers? The package manager is arguably the main thing that differentiates the various Linuces (it certainly isn’t the kernel).

                                                                                                              1. 1

                                                                                                                I used snap a little and found it’s nice. Intellij points to it for command line installation in their docs, that’s nice and easy to use, but I don’t like the extra parameter that is usually required for all apps. I wish this was specified in the package installation file instead so end user wouldn’t have to bother.

                                                                                                              1. 3

                                                                                                                I heard that homebrew was an awful package managers by some compared to, say, apt. Is this true, if so, why?

                                                                                                                1. 11

                                                                                                                  It’s fucking ridiculous how bad this thing is, and the issues around how it’s run are almost as bad as the technical ones.

                                                                                                                  For years it was a source only tool - it did all compilation locally. Then they caught up to 1998 and realised that the vast majority of people want binary distribution. So they added in pre-compiled binaries, but never bothered to adapt the dependency management system to take that into account.

                                                                                                                  So for instance, if you had two packages that provide the same binary - e.g. mysql-server and percona-server (not sure if that’s their exact names in Homebrew), and then wanted to install say “percona-toolkit” as well, which has a source requirement of “something that provides mysql libs/client” - the actual dependency in the binary package would be whatever had been installed on the machine it was built on. This manifested itself in an issue where you couldn’t install both percona-server and percona-toolkit from binaries.

                                                                                                                  When issues like this were raised - even by employees of the vendor (e.g. as in https://github.com/Homebrew/homebrew-core/issues/8717) the official response was “not our problem buddy”.

                                                                                                                  No fucks given, just keep hyping the archaic design to the cool kids.

                                                                                                                  I haven’t even got into the issue of permissions (what could go wrong installing global tools with user permissions) or the ridiculous way package data is handled on end-user machines (git is good for some things, this is not one of them)

                                                                                                                  If you get too vocal about the problems the tool has, someone (in my case, the founder of the project) will ask you to stop contacting them (these were public tweets with the homebrew account referenced) about the issues.

                                                                                                                  1. 4

                                                                                                                    it’s good, easy to use and has a big community with well maintained list of packages. It’s the main package manager for macos. It’s been there for a long time in the macos ecosystem and is much better and easier to use than the older solutions we had such as macport. A cool thing is it has a distinction between command line tool and libraries vs desktop applications (called casks)

                                                                                                                    example; you can install wget with brew install wget, but you’d install firefox with brew cask install firefox.

                                                                                                                    I would stick to linux system’s default package manager, but maybe it’s worth giving it a try I guess.

                                                                                                                    1. 3

                                                                                                                      A cool thing is it has a distinction between command line tool and libraries vs desktop applications (called casks)

                                                                                                                      Why is that cool? It seems pretty pointless to me.

                                                                                                                      1. 2

                                                                                                                        Yeah distinction between them at install tine isn’t that cool, but the fact it does support installing desktop apps is nice. No need for a different tooling like snap does. And you get to know where it’s going to be installed according to the command used. Desktop apps are usually located in /Applications on macos and cli tools are in linked in /usr/local/bin

                                                                                                                    2. 4

                                                                                                                      Pro:

                                                                                                                      • Has every package imaginable (on Mac)
                                                                                                                      • Writing your own formulae is stupidly easy

                                                                                                                      Con:

                                                                                                                      • You can only get the latest version of packages due to how the software repo works.
                                                                                                                      • It’s slower than other package managers

                                                                                                                      Meh:

                                                                                                                      • Keeps every single package you have ever installed around, just in case you need to revert (because remember, you can only get the latest version of packages).
                                                                                                                      • Might be too easy to add formulae. Everyone’s small projects are in homebrew.
                                                                                                                      • The entire system is built on Ruby and Git, so it inherits any problems from them (esp Git).
                                                                                                                      1. 1

                                                                                                                        Someone told me that it doesn’t do dependency tracking, does that tie in with:

                                                                                                                        Keeps every single package you have ever installed around, just in case you need to revert (because remember, you can only get the latest version of packages).

                                                                                                                        Also, I’m not very knowledgeable on package managers, but not being able to get older versions of a package and basing everything on Git seems kind of a questionable choice to me. Also, I don’t like Ruby, but that’s a personal matter. Any reason they chose this?

                                                                                                                        1. 1
                                                                                                                          • You can only get the latest version of packages due to how the software repo works.
                                                                                                                          • Keeps every single package you have ever installed around, just in case you need to revert (because remember, you can only get the latest version of packages).

                                                                                                                          This is very similar to how Arch Linux’s pacman behaves. Personally, I would put both of these under the “pro” header.

                                                                                                                        2. 4

                                                                                                                          The author of Homebrew has repeatedly said this himself (e.g. in this quora answer). He usually says the dependency resolution in Homebrew is substantially less sophisticated than apt.

                                                                                                                          Homebrew became successful because it didn’t try to be a Linux package manager. Instead it generally tries to build on top of MacOS rather than build a parallel ecosystem. The MacOS base distribution is pretty big, so it’s dependency resolution doesn’t need to be that sophisticated. On my system I have 78 Homebrew packages, of those 43 have no dependencies and 13 have just 1.

                                                                                                                          Homebrew Cask also supports MacOS native Application / installer formats like .app, .pkg, and .dmg, rather than insisting on repackaging them. It then extends normal workflows by adding tooling around those formats.

                                                                                                                          So, yes, Homebrew isn’t as good at package management compared to apt, because it didn’t originally try to solve all the same problems as apt. It’s more of a developer app store than a full system package manager.

                                                                                                                          Linuxbrew still doesn’t try to solve the same problems. It focuses on the latest up to date versions of packages, and home dir installations. It doesn’t try to package an entire operating system, just individual programs. I doubt you could build a Linux distribution around the Linuxbrew packages, because it doesn’t concern itself with bootstrapping an operating system. Yes, it only depends on glibc and gcc on Linux, but that doesn’t mean any of the packages in Linuxbrew are set up to work together like they are on an actual Linux distribution.

                                                                                                                          1. 2

                                                                                                                            I don’t want to rag on the homebrew maintainers too much (it’s free software that’s important enough to me that it’s probably the second thing I install on a new mac), but I do have one big UX complaint: every time I run a homebrew command, I have no idea how long it will take. Even a simple brew update can take minutes because it’s syncing an entire git repo instead of updating just the list of packages.

                                                                                                                            brew install might take 30 seconds or it might take two hours. I have no intuition how long it will take before I run it and am afraid to ctrl-c during the middle of a run. I’ll do something like brew install mosh and suddenly I’m compiling GNU coreutils. Huh?

                                                                                                                            While I’d wish they’d fix this variance head-on, at minimum I’d appreciate if it did something like apt and warn you if you’re about to do a major operation. Admittedly apt only does this with disk size, but homebrew could store rough compile times somewhere and ask if I’d like to continue.

                                                                                                                            1. -3

                                                                                                                              I think it’s awful because it’s written in Ruby and uses Github as a CDN.

                                                                                                                              1. 0

                                                                                                                                This comment isn’t helpful. Please be more constructive.

                                                                                                                                1. 0

                                                                                                                                  Who are you to judge? He wanted opinions, I gave mine.

                                                                                                                                  The Ruby VM is awfully slow and using Github as a CDN is so bad it requires no elaboration.

                                                                                                                                  1. 3

                                                                                                                                    Saying it’s slow is much more helpful than what you said above.

                                                                                                                                    1. 1

                                                                                                                                      Yeah.

                                                                                                                            1. 9

                                                                                                                              We’ve used Flask for the past 6-7 years, and written dozens and dozens of applications with it, everything from small silly sites to full blown global e-commerce implementations that handle millions of dollars of sales.

                                                                                                                              The flexibility it offers, while sometimes a disadvantage, ends up being very useful to us when we have special/odd requirements to fulfill.

                                                                                                                              1. 2

                                                                                                                                It seems pretty hard and time consuming to write e-commerce implementation in Flask. Don’t get me wrong, I like Flask, but it seems unsuited for such tasks due to the minimalist nature it embodies. I guess you guys have many in-house modules which you can reuse, which speeds development up quite a bit. How do you people manage?

                                                                                                                                1. 1

                                                                                                                                  This was a very, very specialized task that involved gluing together a dozen different services from different departments within the same multinational company; one department built the product catalog, while the other built the product descriptions, while another was responsible for certain variants of each product, not to mention getting inventory from the fulfillment provider warehouses, or the department responsible for pricing, and many of the above was also on a per-country basis.

                                                                                                                                  It was going to be time-consuming no matter how you sliced it, really.

                                                                                                                              1. 1

                                                                                                                                Avoid comments.

                                                                                                                                Highly disagree, write clear code and supply with comments where necessary. I dislike extremes, they’re mostly wrong.

                                                                                                                                1. 15

                                                                                                                                  As someone who was watching Django since its inception in 2005, and seeing Flask coming on the scene later, I’m surprised to see the same exact argument surfacing after so many years again. And it breaks my heart! Like,

                                                                                                                                  I’d have spent twice as long ripping out the rest of Django’s bits

                                                                                                                                  There’s no need to rip anything out. You just don’t use the bits you don’t need, simple as that. Django is just a Python library. Sure you won’t get any related integration (like supporting a novel auth scheme in the built-in admin) but that’s expected, and you don’t get that in Flask either.

                                                                                                                                  But I always found that the bits you would want to use are usually much more thought out and polished in Django than in other frameworks. (Although I haven’t done any actual comparisons lately.)

                                                                                                                                  1. 10

                                                                                                                                    But I always found that the bits you would want to use are usually much more thought out and polished in Django than in other frameworks.

                                                                                                                                    I love Flask, it’s one of my favourite web frameworks, but what you’re saying is true in a sense. See, Flask’s components are very pluggable and this makes it flexible. Flask has many modules, which I found to be unmaintained (hasn’t had updates for months/years, kinda scary). So because Flask is flexible you can just write everything yourself. Most of the time you don’t want to do that. That’s where Django shines, Django gets maintained so everything Django ships gets maintained. This is one of the strenghts Django has over Flask IMO, just because Flask gets maintained doesn’t mean that all the plugins get maintained, which is a huge weakness if you ask me. The cost of either forking and maintaining it yourself or rewriting everything from scratch are both ridiculously high. Maybe OP has the luxury of writing everything himself or forking and maintaining everything himself, but certainly not everyone can do that.

                                                                                                                                    1. 7

                                                                                                                                      I have seen a bunch of flask apps in my career that probably started as the simplest flask app. They all grew into chaotic collections of code, reimplementing a lot of functionality Django provides directly. Problem is that if you look at 10 flask apps they all do it subtly different.

                                                                                                                                      So instead of setting up flask apps with the standard flask plugins and tinkering for a day or too about initializing then in the right order, you might just start with a Django project and use the parts you need.

                                                                                                                                      If Django had a Single-App template I think many would not use flask, because Django’s multi app directory layout scares a lot of people off.

                                                                                                                                      1. 2

                                                                                                                                        That is exactly why I made mini-django project, I wanted a single file no install needed flask-like app that could grow as needed: https://github.com/readevalprint/mini-django/blob/master/pico_django.py