1. 81

    I beg all my fellow crustaceans to please, please use Firefox. Not because you think it’s better, but because it needs our support. Technology only gets better with investment, and if we don’t invest in Firefox, we will lose the web to chrome.

    1. 59

      Not because you think it’s better

      But that certainly helps too. It is a great browser.

      • privacy stuff — the cookie container API for things like Facebook Container, built-in tracker blocker, various anti-fingerprinting things they’re backporting from the Tor Browser
      • honestly just the UI and the visual design! I strongly dislike the latest Chrome redesign >_<
      • nice devtools things — e.g. the CSS Grid inspector
      • more WebExtension APIs (nice example: only on Firefox can Signed Pages actually prevent the page from even loading when the signature check fails)
      • the fastest (IIRC) WASM engine (+ now in Nightly behind a pref: even better codegen backend based on Cranelift)
      • ongoing but already usable Wayland implementation (directly in the official tree now, not as a fork)
      • WebRender!!!
      1. 7

        On the other hand, WebSocket debugging (mostly frame inspection) is impossible in Firefox without an extension. I try not to install any extensions that I don’t absolutely need and Chrome has been treating me just fine in this regard[1].

        Whether or not I agree with Google’s direction is now a moot point. I need Chrome to do what I do with extensions.

        As soon as Firefox supports WebSocket debugging natively, I will be perfectly happy to switch.

        [1] I mostly oppose extensions because of questionable maintenance cycles. I allow uBlock and aXe because they have large communities backing them.

        1. 3

          Axe (https://www.deque.com/axe/) seems amazing. I know it wasn’t the focus of your post – but I somehow missed this when debugging an accessibility issue just recently, I wish I had stumbled onto it. Thanks!

          1. 1

            You’re welcome!

            At $work, we used aXe and NVDA to make our webcomponents AA compliant with WCAG. aXe was invaluable for things like contrast and missing role attributes.

          2. 3

            WebSocket debugging (mostly frame inspection) is impossible in Firefox without an extension

            Is it possible with an extension? I can’t seem to find one.

            1. 1

              I have never needed to debug WebSockets and see no reason for that functionality to bloat the basic browser for everybody. Too many extensions might not be a good thing but if you need specific functionality, there’s no reason to hold back. If it really bothers you, run separate profiles for web development and browsing. I have somewhat more than two extensions and haven’t had any problems.

              1. 1

                I do understand your sentiment, but the only extension that I see these days is marked “Experimental”.

                On the other hand, I don’t see how it would “bloat” a browser very much. (Disclaimer: I have never written a browser or contributed to any. I am open to being proved wrong.) I have written a WebSockets library myself, and it’s not a complex protocol. It can’t be too expensive to update a UI element on every (websocket) frame.

            2. 5

              Yes! I don’t know about you, but I love the fact that Firefox uses so much less ram than chrome.

              1. 2

                This was one of the major reasons I stuck with FF for a long time. It is still a pronounced difference.

              2. 3

                honestly just the UI and the visual design! I strongly dislike the latest Chrome redesign >_<

                Yeah, what’s the deal with the latest version of Chrome? All those bubbly menus feel very mid-2000’s. Everything old is new again.

                1. 3

                  I found a way to go back to the old ui from https://www.c0ffee.net/blog/openbsd-on-a-laptop/ (it was posted here a few weeks ago):

                  Also, set the following in chrome://flags:

                  • Smooth Scrolling: (personal preference)
                  • UI Layout for the browser’s top chrome: set to “Normal” to get the classic Chromium look back
                  • Identity consistency between browser and cookie jar: set to “Disabled” to keep Google from hijacking any Google > - login to sign you into Chrome
                  • SafeSearch URLs reporting: disabled

                  (emphasis mine)

                2. 1

                  The Wayland implementation is not usable quite yet, though, but it is close. I tried it under Sway, but it was crashy.

                  1. -3

                    Not really. Not to mention Pocked integration and recent vpn advertisement. Ah, and they have removed RSS support.

                    It’s just another product made by a for-profit corporation.

                    I think web got over-complicated. There are none usable truly independent browsers and probably will never be. It’s a read-only “opensource”.

                    1. 16

                      It’s just another product made by a for-profit corporation.

                      They (Mozilla) are actually a non-profit.

                      1. 2

                        There is also Mozilla corporation.

                        1. 12

                          …which is 100% owned by the Mozilla Foundation, and:

                          The Mozilla Corporation reinvests all of its profits back into the Mozilla projects.

                          Forming for-profit corporations is not uncommon for NGOs, because NGOs in many countries are severely legally limited in the amount of commercial activities they’re able to do.

                          1. 3

                            Adding to that, funding FOSS software development is not considered 501(c)3-eligible in the US.

                      2. 5

                        I had the same impression with that over-complication of JS into ES6. CSS is also looking more like a programming language. HTTP/2 is now a binary protocol. So to have a modern web platform, you need to support all of these, and none are trivial anymore. On the other hand, I find it amazing to be able to do netwroking, audio, video, 3d and highly customizable user interfaces with (relatively) few efforts at a pretty good speed. As a platform for creativity and experimentation, it is without equivalent.

                        1. 2

                          without equivalent.

                          Java applets - done right?

                          1. 3

                            Or Flash/Shockwave done openly and right?

                            1. 4

                              Both Java applets and Flash were actually more like trojan horses. See how Flash ( very good scenegraph at the time) became Air (ie. a tentative to take over the Web like Java) and thankfully died because Apple killed it with the iPhone. The intention was to run programs within a walled garden, not to interoperate with the Web at large. At least that’s how I read it.

                              1. 4

                                Good point on long-term risk. Do note I said Flash/Shockwave the tech. That was made by Macromedia, not Adobe. Macromedia was a company whose pricey tech was kick-ass but no attempt to be open or interoperate past maybe Dreamweaver. Catchy name many lay people could spell, too.

                                I think Adobe acquiring them made me drop some F-bombs, sigh a bit, eye rolls, and so on. I knew there would be short-term improvements before the large company FUBARed its value over time. Apple’s position sealed its fate.

                                1. 2

                                  Indeed, Macromedia had a much better stewardship than Adobe in this respect. What I find really ironic is that before the acquisition, Adobe was pushing SVG and SVG animations as an alternative to Flash, embracing and pushing the web standards. After the acquisition, everything stalled and it’s only with Apple creating the Canvas API and standardizing it through the newly created WHATWG that we started to catch up and be able to do so fast interactive graphics on the Web. What we lost, though, is one of the best tool to create vector animations with programmatic behaviour. One step ahead, two steps back some might say.

                              2. 3

                                I think the difference is that aplets and flash were supposed to extend the web experience, new technologies are replacing it. It’s convenient but dangerous as it promotes monoculture. I don’t know if there is a safe middle ground.

                                1. 5

                                  There is a lot being lost with the death of Flash. It was amazingly lightweight when it started out. You can take that Homestar Runner e-mail and the original Flash, resize it to 4k, and it will still render correctly and sharply. You can’t do that when you export animation to YouTube at a set resolution. Not to mention all the games that were made in Flash that we’ll loose soon.

                                  Adobe really butchered all the Macromedia stuff when they acquired that company. It’s pretty sad.

                          2. 2

                            What does “removes RSS support” mean? Was it possible to use it as a feed reader before?

                            1. 3

                              Yeah, it was called “Live Bookmarks” and basically made your RSS feed subs show up in your bookmarks bar (or accessible from a page). It actually looked really neat, but I only found about it when/because they removed it.

                              1. 10

                                “Live Bookmarks” still exist, in Firefox 63.0.3 released on Nov 15th, 2018. I use them. Go to any RSS feed in FF and they will pop up. I use them for multiple Discourse forums.

                                  1. 1

                                    Ah, sad times, thanks for the link!

                              2. -1

                                Sure, using live bookmarks and integrated reader. But RSS collided with the their new commercial and closed product namely Pocket.

                                1. 4

                                  That’s not completely fair. I’m not sure if anything has happened yet, but Mozilla does have plans to open-source Pocket:

                                  As a result of this strategic acquisition, Pocket will become a wholly owned subsidiary of Mozilla Corporation and will become part of the Mozilla open source project.

                          3. 16

                            I switched to Firefox last year, and I have to say I don’t miss Chrome in the slightest.

                            1. 13

                              And those with a little financial liberty, consider donating to Mozilla. They do a lot of important work free a free and open web.

                              1. 10

                                I recently came back to Firefox from Vivaldi. That’s another Chromium/Webkit based browser and it’s closed source to boot.

                                Firefox has improved greatly in speed as of late and I feel like we’re back in the era of the mid-2000s, asking people to chose Firefox over Chrome this time instead of IE.

                                1. 2

                                  I’d love to switch from Vivaldi, but it’s simply not an option given the current (terrible) state of vertical tab support in Firefox.

                                  1. 2

                                    How is it terrible? The hiding of the regular tab bar is not an API yet and you have to use CSS for that, sure, but there are some very good tree style tab webextensions.

                                    1. 2

                                      The extensions are all terrible – but what’s more important is that I lost the belief that any kind of vertical tab functionality has any chance of long-term survival. Even if support was added now, it would be a constant battle to keep it and I’m frankly not interested in such fights anymore.

                                      Mozilla is chasing their idealized “average user” and is determined to push everyone into their one-size-fits-all idea of user interface design – anyone not happy with that can screw off, if it was for Mozilla.

                                      It’s 2018 – I don’t see why I even have to argue for vertical tabs and mouse gestures anymore. I just pick a browser vendor which hasn’t been asleep on the wheel for the last 5 years and ships with these features out of the box.

                                      And if the web in the future ends up as some proprietary API defined by whatever Google Chrome implements, because Firefox went down, Mozilla has only itself to blame.

                                      1. 2

                                        The extensions are all terrible – but what’s more important is that I lost the belief that any kind of vertical tab functionality has any chance of long-term survival. Even if support was added now, it would be a constant battle to keep it and I’m frankly not interested in such fights anymore. The whole point of moving to WebExtensions was long term support. They couldn’t make significant changes without breaking a lot of the old extensions. The whole point was to unhook extensions from the internals so they can refactor around them and keep supporting them.

                                        1. 0

                                          That’s like a car manufacturer removing all electronics from a car – sure it makes the car easier to support … but now the car doesn’t even turn on anymore!

                                          Considering that cars are usually used for transportation, not for having them sit in the garage, you shouldn’t be surprised that customers buy other cars in the future.

                                          (And no, blaming “car enthusiasts” for having unrealistic expectations, like it happens in the case of browser users, doesn’t cut it.)

                                          1. 3

                                            So you’d rather they didn’t improve it at all? Or would you rather they broke most extensions every release?

                                            1. 3

                                              I’m not @soc, but I wish Firefox had delayed their disabling of old-style extensions in Firefox 57 until they had replicated more of the old functionality with the WebExtensions API – mainly functionality related to interface customization, tabs, and sessions.

                                              Yes, during the time of that delay, old-style extensions would continue to break with each release, but the maintainers of Tree Style Tabs and other powerful extensions had already been keeping up with each release by releasing fixed versions. They probably could have continued updating their extensions until WebExtensions supported their required functionality. And some users might prefer to run slightly-buggy older extensions for a bit instead of switching to the feature-lacking new extensions straight away – they should have that choice.

                                              1. 1

                                                What’s the improvement? The new API was so bad that they literally had to pull the plug on the existing API to force extension authors to migrate. That just doesn’t happen in cases where the API is “good”, developers are usually eager to adopt them and migrate their code.

                                                Let’s not accuse people you disagree with that they are “against improvements” – it’s just that the improvements have to actually exist, and in this case the API clearly wasn’t ready. This whole fiasco feels like another instance of CADT-driven development and the failure of management to reign in on it.

                                                1. 3

                                                  The old extension API provided direct access to the JavaScript context of both the chrome and the tab within a single thread, so installing an XUL extension was disabling multiprocess mode. Multiprocess mode seems like an improvement; in old Firefox, a misbehaving piece of JavaScript would lock up the browser for about a second before eventually popping up a dialog offering to kill it, whereas in a multiprocess browser, it should be possible to switch and close tabs no matter what the web page inside does. The fact that nobody notices when it works correctly seems to make it the opposite of Attention-Deficient-Driven-Design; it’s the “focus on quality of implementation, even at the expense of features” design that we should be encouraging.

                                                  The logical alternative to “WebExtension For The Future(tm)” would’ve been to just expose all of the relevant threads of execution directly to the XUL extensions. run-this-in-the-chome.xul and run-this-in-every-tab.xul and message pass between them. But at that point, we’re talking about having three different extension APIs in Firefox.

                                                  Which isn’t to say that I think you’re against improvement. I am saying that you’re thinking too much like a developer, and not enough like the poor sod who has to do QA and Support triage.

                                                  1. 2

                                                    Improving the actual core of Firefox. They’re basically ripping out and replacing large components every other release. This would break large amount of plugins constantly. Hell, plugins wouldn’t even work in Nightly. I do agree with @roryokane that they should have tried to improve it before cutting support. The new API is definitely missing many things but it was the right decision to make for the long term stability of Firefox.

                                                    1. 1

                                                      They could have made the decision to ax the old API after extension authors adopted it. That adoption failed so hard that they had to force developers to use the new API speaks for itself.

                                                      I’d rather have extension that I have to fix from time to time, than no working extensions at all.

                                            2. 1

                                              Why should Mozilla care that much about your niche use case? They already have a ton of stuff to deal with and barely enough funding.

                                              It’s open source, make your own VerticalTabFox fork :)

                                              1. 3

                                                Eh … WAT? Mozilla went the extra mile with their recent extension API changes to make things – that worked before – impossible to implement with a recent Firefox version. The current state of tab extensions is this terrible, because Mozilla explicitly made it this way.

                                                I used Firefox for more than 15 years – the only thing I wanted was to be left alone.

                                                It’s open source, make your own VerticalTabFox fork :)

                                                Feel free to read my comment above to understand why that doesn’t cut it.

                                                Also, Stuff that works >> open source. Sincerely, a happy Vivaldi user.

                                                1. 2

                                                  It’s one of the laws of the internet at this point: Every thread about Firefox is always bound to attract someone complaining about WebExtensions not supporting their pet feature that was possible with the awful and insecure old extension system.

                                                  If you’re care about “non terrible” (whatever that means — Tree Style Tab looks perfect to me) vertical tabs more than anything — sure, use a browser that has them.

                                                  But you seem really convinced that Firefox could “go down” because of not supporting these relatively obscure power user features well?? The “average user” they’re “chasing” is not “idealized”. The actual vast majority of people do not choose browsers based on vertical tabs and mouse gestures. 50% of Firefox users do not have a single extension installed, according to telemetry. The majority of the other 50% probably only have an ad blocker.

                                                  1. 3

                                                    If you’re care about “non terrible” (whatever that means — Tree Style Tab looks perfect to me) vertical tabs more than anything — sure, use a browser that has them.

                                                    If you compare the current state of the art of vertical tabs extensions, even Mozilla thinks they suck – just compare them to their own Tab Center experiment: https://testpilot.firefox.com/static/images/experiments/tab-center/details/tab-center-1.1957e169.jpg

                                                    Picking just one example: Having the navigation bar at a higher level of the visual hierarchy is just wrong – the tab panel isn’t owned by the navigation bar, the navigation bar belongs to a specific tab! Needless to say, all of the vertical tab extensions are forced to be wrong, because they lack the API do implement the UI correctly.

                                                    This is how my browser currently looks like, for comparison: https://i.imgur.com/5dTX8Do.png

                                                    But you seem really convinced that Firefox could “go down” because of not supporting these relatively obscure power user features well?? The “average user” they’re “chasing” is not “idealized”. The actual vast majority of people do not choose browsers based on vertical tabs and mouse gestures. 50% of Firefox users do not have a single extension installed, according to telemetry. The majority of the other 50% probably only have an ad blocker.

                                                    You can only go so far alienating the most loyal users that use Firefox for specific purposes until the stop installing/recommending it to their less technically-inclined friends and relatives.

                                                    Mozilla is so busy chasing after Chrome that it doesn’t even realize that most Chrome users will never switch. They use Chrome because “the internet” (www.google.com) told them so. As long as Mozilla can’t make Google recommend Firefox on their frontpage, this will not change.

                                                    Discarding their most loyal users while trying to get people to adopt Firefox who simply aren’t interested – this is a recipe for disaster.

                                                2. 1

                                                  and barely enough funding

                                                  Last I checked they pulled in half a billion in revenue (2016). Do you believe this is barely enough?

                                                  1. 2

                                                    For hundreds of millions users?

                                                    Yeah.

                                              2. 1

                                                At least with multi-row tabs in CSS you can’t dragndrop tabs. That’s about as bad as it gets.

                                              3. 2

                                                Are vertical tabs so essential?

                                                1. 3

                                                  Considering the change in screen ratios over the past ten years (displays get shorter and wider), yes, it absolutely is.

                                                  With vertical tabs I can get almost 30 full-width tabs on screen, with horizontal tabs I can start fishing for the right tab after about 15, as the tab width gets increasingly smaller.

                                                  Additionally, vertical tabs reduce the way of travel substantially when selecting a different tab.

                                                  1. 1

                                                    I still miss them, didn’t cripple me, but really hurt. The other thing about Tree (not just vertical) tabs that FF used to have was that the subtree was contextual to the parent tree. So, when you opened a link in a background tab, it was opened in a new tab that was a child of your current tab. For doing like documentation hunting / research it was amazing and I still haven’t found its peer.

                                                2. 1

                                                  It’s at least partially open source. They provide tarballs.

                                                  1. 4

                                                    https://help.vivaldi.com/article/is-vivaldi-open-source/

                                                    The chromium part is legally required to be open, the rest of their code is like readable source, don’t get me wrong that’s way better than unreadable source but it’s also very wut.

                                                    1. 2

                                                      Very wut. It’s a weird uneasy mix.

                                                      1. 1

                                                        that’s way better than unreadable source but it’s also very wut.

                                                        I wouldn’t be sure of that. It makes it auditable, but has legal ramifications should you want to build something like vivaldi, but free.

                                                  2. 8

                                                    firefox does not get better with investment, it gets worse.

                                                    the real solution is to use netsurf or dillo or mothra, so that webmasters have to come to us and write websites that work with browsers that are simple enough to be independently maintained.

                                                    1. 8

                                                      Good luck getting more than 1‰ adoption 😉

                                                      1. 5

                                                        good luck achieving independence from Google by using a browser funded by Google

                                                        1. 1

                                                          I can achieve independence from Google without using netsurf, dillo, or mothra; to be quite honest, those will never catch on.

                                                          1. 1

                                                            can you achieve independence from google in a way that will catch on?

                                                            1. 1

                                                              I don’t think we’ll ever get the majority of browser share back into the hands of a (relatively) sane organization like Mozilla—but we can at least get enough people to make supporting alternative browsers a priority. On the other hand, the chances that web devs will ever feel pressured to support the browsers you mentioned, is close to nil. (No pun intended.)

                                                              1. 0

                                                                what is the value of having an alternative, if that alternative is funded by google and sends data to google by default?

                                                                1. 1

                                                                  what is the value of having an alternative

                                                                  What would you like me to say, that Firefox’s existence is worthless? This is an absurd thing to insinuate.

                                                                  funded by google

                                                                  No. I’m not sure whether you’re speaking in hyperbole, misunderstood what I was saying, and/or altogether skipped reading what I wrote. But this is just not correct. If Google really had Mozilla by the balls as you suggest, they would coerce them to stop adding privacy features to their browser that, e.g., block Google Analytics on all sites.

                                                                  sends data to google by default

                                                                  Yes, though it seems they’ve been as careful as one could be about this. Also to be fair, if you’re browsing with DNT off, you’re likely to get tracked by Google at some point anyway. But the fact that extensions can’t block this does have me worried.

                                                                  1.  

                                                                    i’m sorry if i misread something you wrote. i’m just curious what benefit you expect to gain if more people start using firefox. if everyone switched to firefox, google could simply tighten their control over mozilla (continuing the trend of the past 10 years), and they would still have control over how people access the web.

                                                                    1.  

                                                                      It seems you’re using “control” in a very abstract sense, and I’m having trouble following. Maybe I’m just missing some context, but what concrete actions have Google taken over the past decade to control the whole of Mozilla?

                                                                      1.  

                                                                        Google has pushed through complex standards such as HTTP/2 and new rendering behaviors, which Mozilla implements in order to not “fall behind.” They are able implement and maintain such complexity due to funding they receive from Google, including their deal to make Google the default search engine in Firefox (as I said earlier, I couldn’t find any breakdown of what % of Mozilla’s funding comes from Google).

                                                                        For evidence of the influence this funding has, compare the existence of Mozilla’s Facebook Container to the non-existence of a Google Container.

                                                        2. 3

                                                          Just switch to Gopher.

                                                          1. 5

                                                            Just switch to Gopher

                                                            I know you were joking, but I do feel like there is something to be said for the simplicity of systems like gopher. The web is so complicated nowadays that building a fully functional web browser requires software engineering on a grand scale.

                                                            1. 3

                                                              yeah. i miss when the web was simpler.

                                                              1. 1

                                                                I was partially joking. I know there are new ActivityPub tools like Pleroma that support Gopher and I’ve though about adding support to generate/server gopher content for my own blog. I realize it’s still kinda a joke within the community, but you’re right about there being something simple about just having content without all the noise.

                                                          2. 1

                                                            Unless more than (rounded) 0% of people use it for Facebook, it won’t make a large enough blip for people to care. Also this is how IE was dominant, because so much only worked for them.

                                                            1. 1

                                                              yes, it would require masses of people. and yes it won’t happen, which is why the web is lost.

                                                          3. 2

                                                            I’ve relatively recently switched to FF, but still use Chrome for web dev. The dev tools still seem quite more advanced and the browser is much less likely to lock up completely if I have a JS issue that’s chewing CPU.

                                                            1. 2

                                                              I tried to use Firefox on my desktop. It was okay, not any better or worse than Chrome for casual browsing apart from private browsing Not Working The Way It Should relative to Chrome (certain cookies didn’t work across tabs in the same Firefox private window). I’d actually want to use Firefox if this was my entire Firefox experience.

                                                              I tried to use Firefox on my laptop. Site icons from bookmarks don’t sync for whatever reason (I looked up the ticket and it seems to be a policy problem where the perfect is the enemy of the kinda good enough), but it’s just a minor annoyance. The laptop is also pretty old and for that or whatever reason has hardware accelerated video decoding blacklisted in Firefox with no way to turn it back on (it used to work a few years ago with Firefox until it didn’t), so I can’t even play 720p YouTube videos at an acceptable framerate and noise level.

                                                              I tried to use Firefox on my Android phone. Bookmarks were completely useless with no way to organize them. I couldn’t even organize on a desktop Firefox and sync them over to the phone since they just came out in some random order with no way to sort them alphabetically. There was also something buggy with the history where clearing history didn’t quite clear history (pages didn’t show up in history, but links remained colored as visited if I opened the page again) unless I also exited the app, but I don’t remember the details exactly. At least I could use UBO.

                                                              This was all within the last month. I used to use Firefox before I used Chrome, but Chrome just works right now.

                                                              1. 6

                                                                I definitely understand that Chrome works better for many users and you gave some good examples of where firefox fails. My point was that people need to use and support firefox despite it being worse than chrome in many ways. I’m asking people to make sacrifices by taking a principled position. I also recognize most users might not do that, but certainly, tech people might!? But maybe I’m wrong here, maybe the new kids don’t care about an open internet.

                                                            1. 3

                                                              Having devoted many years to building open source products on Mozilla technology I’m not surprised that they’re failing. They’re uninterested in contributions from anyone who doesn’t work for Mozilla Corp and hostile to any project that isn’t Firefox. After I submitted a patch that fixed a bug that was deleting Firefox users’ bookmarks and having it rejected out of hand I mostly gave up on trying to participate.

                                                              Mozilla had a product akin to Electron 15 years ago but killed it because they couldn’t think beyond a single product.

                                                              Just because a company espouses good values doesn’t mean they practice them. I’ll fight for everything that Mozilla stands for but I know they won’t have my back while I do it.

                                                              1. 1

                                                                This. Mozilla’s engineering is largely ok, but nothing of that matters when terrible management-level decisions keep killing their promising stuff.

                                                                At the moment, I just won’t use Mozilla tech, even if it’s exactly what I want, because I’m already expecting that management will sink it in the near future.

                                                                1. 1

                                                                  Mozilla had a product akin to Electron 15 years ago but killed it because they couldn’t think beyond a single product.

                                                                  I guess you are talking about XULRunner. Yeah it is unfortunate that they killed this.

                                                                1. 2

                                                                  What I find interesting is that the issue of Null/Maybe/Either doesn’t come up when you do imperative design. Imagine a head function that takes a closure that is called when a list has a head and is not called otherwise:

                                                                  head([1,2,3], (x) {

                                                                  // x will be 1 here, create whatever side-effect you need in this case

                                                                  })

                                                                  If you need the error case, supply an additional closure as an argument.

                                                                  What is distressing to me about this is that functional-style is elegant in so many ways but not in the case of error handling.

                                                                  1. 4

                                                                    What is distressing to me about this is that functional-style is elegant in so many ways but not in the case of error handling.

                                                                    Weird, for me this is actually one of the biggest selling point of functional programming for me.

                                                                    1. 3

                                                                      I’m struggling to follow this example. You’re essentially providing a default value, which could be expressed as:

                                                                      head' x = fromMaybe x . listToMaybe

                                                                      What in your view qualifies as elegance in the case of error handling? In what way is the FP approach, i.e. wrapping the value in an algebra to preserve composability, inelegant? The idiomatic way of doing this in FP is to explicitly model and handle the potential for failure. I’m not sure how it could be more “elegant” than this.

                                                                      1. 1

                                                                        I’m not providing a default value, just an action on success. If the closure is called, it can do anything or nothing with the value (head) it receives.

                                                                        Head is a contrived example. The more typical way that this works in OO is to just pass along your results on success to another object. If there’s a problem, you just don’t pass them along. There is no need to check for an error at the other end.

                                                                        1. 1

                                                                          Head is a contrived example.

                                                                          Indeed, and quite confusing.

                                                                          It’s difficult for me to argue for or against a particular approach in this case. Without a better example, I would have to ask: Why do you want side effects here anyway?

                                                                      2. 1

                                                                        Well, given the safe head’ function that returns Maybe a, is the following (but pardon my Haskell, it’s probably wrong) not elegant?

                                                                        f :: [a] -> Either a, String
                                                                        f l = case (head’ l)
                                                                               when Some a then Left a
                                                                               when Nothing then “error message”
                                                                        

                                                                        where the name of f probably suggests something about what the function does, especially in case of errors?

                                                                        Or are you specifically concerned about the lack of flexibility in the error handling?

                                                                      1. 3

                                                                        I think the biggest issue these days is language longevity.

                                                                        Creating a language and its surrounding ecosystem takes decades of work – and it’s usually ruined by people who just want to add yet-another language feature, until the language collapses under its own weight. Then the cycle repeats, with decades of effort wasted.

                                                                        See Rust, C#, Scala, C++ … for the various stages of this.

                                                                        There really needs to be some soul-searching/research on preventing this from happening over and over.

                                                                        1. 10

                                                                          Unpopular opinion puffin meme time!

                                                                          I’ve seen this “move to memory safe languages will solve all our problems” argument too many times. There’s a few problems with it:

                                                                          1. The language itself must never use unsafe code and must never contain any type of vulnerabilities.
                                                                          2. The entire operating system must be rewritten in that language. Everything from the bootloader to the kernel to the entire userland (and that includes libc). This new operating system must contain the same feature parity, including the same KBI, KPI, ABI, and API as the old operating system.
                                                                          3. Just because memory safety is solved doesn’t mean that all types of vulnerabilities are solved as well. Think: LFI/RFI with PHP doesn’t involve memory safety vulnerabilities at all.
                                                                          4. All the legacy code deployed on legacy devices. Not only do you have to rewrite the operating system, but you have to replace the billions and billions of Internet-connected devices.
                                                                          5. Perhaps I’m forgetting something. Place whatever I’m forgetting here. ;)

                                                                          edit[0]: Add an item.

                                                                          1. 14

                                                                            (Samuel L. Jackson voice) “Oh you were finished? Well, allow me to retort.”

                                                                            1. This is already countered if goal is fewer vulnerabilities, which safe languages lead to. If aiming for all, safe languages are only a start. The unsafe must be verified using external tools that do exist. The other vulnerabilities will need to be mitigated by review, language extensions, libraries, and/or external tools. Good news is many of these exist and can be added to toolset. Also, eliminating entire classes of errors gives developers more time to focus on others.

                                                                            2. The OS does not need to be rewritten. First, you only need to mitigate the code you use. Projects like Poly2 literally remove every call and feature they dont need. Of the rest, you can use tools that make legacy C memory safe with a performance hit. Then, begin the rewrites on the fast paths to gradually reduce overall performance hit. The C safety scheme is dropped at the end.

                                                                            3. That’s true. I addressed it in No 1. Another example is web application attacks that memory safety doesnt mitigate. So, new language designs addressed more of those risks in form of Ur/Web, Opa, and JIF/SIF. Those can be ported to more popular, safe languages. Rinse repeat.

                                                                            4. The make-C-safer tools, C-to-other stuff, sound analyzers, and separation kernels address legacy. Partly. Legacy will always be a big problem. What you overlook with IoT devices is that’s easiest market to get new code into. About opposite of legacy.

                                                                            5. Ada getting better results than C effortlessly for decades. SPARK getting pointers. Why3 getting support for bit-level issues. Industrial adoption of these by some companies. Shit is getting extra real on prove it has no errors side of things. Slow but steady progress.

                                                                            1. 1

                                                                              Mostly agreed. Note that I’m not saying to not use memory safe languages. My problem is with those who claim that there is no use for C and that C should just die already.

                                                                              The reason why I said the OS would need to be rewritten is because parts of the runtime likely depend on libc (and possibly other C-based libraries (libpthread?)). Those libraries are written in memory unsafe languages, like C, and could be used in an attack.

                                                                            2. 5

                                                                              This is an understandable opinion. As one of the principal authors of Monte, a language that might be characterized as claiming that moving to capability-safe (and thus memory-safe) languages will solve many of our problems, I can at least explain what the world on the other side of the looking-glass looks like.

                                                                              1. Yes, we might hope. There are three pieces. The language should not have unsafe escape hatches, the trusted parts of its implementation should be correct (relative to some specification), and the language should exclude every known bug class. These are tall demands, but Monte does at least achieve the first of them. I think that the other two are moving targets, in that our understanding of bug classes is not always deep and axiomatically-preventable, as with buffer overflows or out-of-bounds access, but is sometimes not conceptually obvious, like misquotation/injection, or emerges from the marching-on of science and technology, like timing-related side-channel-driven data exfiltration, or can even be definitionally incomplete, like plan interference.
                                                                              2. Yes, eventually. Note that there is a benefit to doing this rewrite aside from the hoped-for permanent elimination of some bug classes, though; we don’t have to implement any of the old APIs. This is actually something we expect in the object-capability worldview, because of the phenomenon of taming. Old APIs usually are untamed, and by the time that they are tamed, they no longer are compatible. In the typical Monte module, one cannot open a file, connect with a socket, write to stdout, redefine builtin names, examine a caught exception, or set up module-private global mutable state. Sincere capability-first systems like Genode and seL4 have APIs that tend to seem alien to newcomers, deeply limiting what the typical userland process can do.
                                                                              3. Yes. This relates quite a bit to the first point. We can only claim that some specific bug classes are impossible as a consequence of the underlying structure of the language. For example, Monte does not have a memory model, and consequently some classes of memory bug are not possible. (Of course, to recall your first point in its entirety, bugs in the runtime are possible, and since we generally run on memory-unsafe CPUs, we should be prepared for bugs in the runtime to be exploitable from user code.)
                                                                              4. Yes, but it’s okay, because we already were using language-agnostic abstractions in many cases. As you point out, the Internet is a thing, and many computers are connected through it. But, at the same time, the Internet is not only accessible from memory-unsafe languages. Monte speaks JSON and HTTP just like other modern languages. Nobody is requesting that the ocean be boiled all in a day, merely that we consider the benefits of not drinking seawater.
                                                                              5. Your opinion is not at all unpopular. It is, in fact, the dominant opinion, and many conversations I’ve had with security professionals have consisted entirely of me trying to break through their memetic armor in order to have a conversation.
                                                                              1. 3

                                                                                Sounds like a list of good ideas. Let’s do it!

                                                                                1. -2

                                                                                  People often confuse architectural problems and competence problems with language problems. Most of the security bugs I’ve seen from C programs are due to (a)unskilled programmers and (b) failure to do simple things like use multiple memory protected processes. If program A parses inputs and sends data in parsed form to B, then a pointer exploit in A will not be able to control B - which is the process that should do privilege escalation. As for the first problem, nobody would complain that steel struts are poorly made if major bridges were being constructed by engineers who didn’t know how to calculate load.

                                                                                  People also tend to discount the single-failure point of memory failures in single address space programs. There is no difference in safety between code that is 100% written in despicable C and code that is 99.99% written in super virtuous Rust/Haskell/Pascal/Ada/Javascript/Snobol or whatever, if that 0.01% code is not memory safe.

                                                                                1. 14

                                                                                  I do something like this as well, with the added layer of crazy that my dotfiles are a nix package which is installed and then linked into place.

                                                                                  But really, all I want is unprivileged union mounts that work.

                                                                                  1. 7

                                                                                    But really, all I want is unprivileged union mounts that work.

                                                                                    Plan 9, where art thou?

                                                                                    I seriously don’t understand why Unix hasn’t evolved to be more like Plan 9 over the last few decades. It’s so clearly the right direction!

                                                                                    1. 5

                                                                                      Hey, do you have like a 10-second primer on plan 9? I always see people talking about it but have no idea how it differs from Unix.

                                                                                      1. 7

                                                                                        It’s sometimes said that in Unix, everything is a file. In Plan 9, everything is a filesystem, and they can be transparently or opaquely mounted on top of one another to customise the environment for each process.

                                                                                        For example, where Unix has a special API for making network connections and configuring them, Plan9 has a particular filesystem path: write a description of the connection you want to make, read back a new path. Open that path, and the resulting file-descriptor is your TCP socket. If you want to forward your connections via another computer, you don’t need a special port-forwarding API or a VPN, you can just mount the remote computer’s network-connection filesystem over the top of your own, and everything that makes a network connection from then on will be talking to the TCP stack on the remote computer.

                                                                                        1. 2

                                                                                          I think Redox’ “Everything is a URL” is a nice improvement on Pan 9’s idea.

                                                                                          1. 1

                                                                                            Very interesting. Thanks!

                                                                                          2. 1

                                                                                            That’s a great question!

                                                                                            I guess the big thing about Plan 9 is that it really tried to make everything a file. So using the network was just opening files, writing to the GUI was just writing to files &c. Really, the differences from Unix are mostly a result of that goal, e.g. in Plan 9 any user can create his own namespace of files & directories from other files & directories.

                                                                                            The longer version would go into detail about how that actually worked (short version: really well).

                                                                                        2. 4

                                                                                          Do you have your Nix/dotfiles code somewhere?

                                                                                          1. 3

                                                                                            A more radical approach would be using rewritefs.

                                                                                            1. 2

                                                                                              I use home-manager, and mine looks as simple as:

                                                                                                    home.file = {
                                                                                                      ".stylish-haskell.yaml".source = ../stylish-haskell.yaml;
                                                                                                      ".spacemacs".source = ../spacemacs;
                                                                                                      ".ghci".text = ''
                                                                                                        :set prompt "λ> "
                                                                                                      '';
                                                                                                    };
                                                                                              
                                                                                              1. 1

                                                                                                Me too! Some more stuff I do to manage simple scripts/aliases:

                                                                                                let
                                                                                                  script = text: {
                                                                                                    text = ''
                                                                                                      #!/usr/bin/env bash
                                                                                                      ${text}
                                                                                                    '';
                                                                                                    executable = true;
                                                                                                  };
                                                                                                in {
                                                                                                  # ...
                                                                                                    home.file = {
                                                                                                      "bin/gd" = script ''git diff "$@"'';
                                                                                                      "bin/gds" = script ''git diff --staged "$@"'';
                                                                                                      "bin/gf" = script ''git fetch --all "$@"'';
                                                                                                      "bin/glg" = script ''git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr %cd) %C(cyan)%an%Creset' --date=format:'%d.%m' --abbrev-commit "$@"'';
                                                                                                      "bin/gl" = script ''glg --all "$@"'';
                                                                                                      "bin/gs" = script ''git status "$@"'';
                                                                                                      # Show git branches in ~ "most recently used" order
                                                                                                      "bin/git-bs" = script ''git branch --sort=-committerdate "$@"'';
                                                                                                    };
                                                                                                  # ...
                                                                                                };
                                                                                                

                                                                                                What I especially like about home-manager, is that it allows me to try and gradually migrate stuff to Nix, but I still can do e.g. nix-env -iA nixpkgs.umlet for quick additions/tests, and still have an escape hatch of sudo apt-get install ... if something is not available (or broken for me) in nixpkgs.

                                                                                                1. 1

                                                                                                  You don’t need that script function. viz.:

                                                                                                        programs.bash = {
                                                                                                          ...
                                                                                                          shellAliases = {
                                                                                                            copy = "xclip -i -selection clipboard";
                                                                                                            g = "git";
                                                                                                            e = "emacs -nw";
                                                                                                            ee = "emacs -nw $(fzf)";
                                                                                                          };
                                                                                                        };
                                                                                                  
                                                                                                        programs.git = {
                                                                                                          ...
                                                                                                          aliases = {
                                                                                                            co = "checkout";
                                                                                                            ci = "commit";
                                                                                                            s = "status";
                                                                                                            pr = "pull --rebase";
                                                                                                            l = "log --graph --pretty='%Cred%h%Creset - %C(bold blue)<%an>%Creset %s%C(yellow)%d%Creset %Cgreen(%cr)' --abbrev-commit --date=relative";
                                                                                                          };
                                                                                                        };
                                                                                                  
                                                                                                2. 1

                                                                                                  I remember finding home-manager and was unsure if it worked or was testing on a not-NixOS system, so I kept using my Rube Goldberg setup :/

                                                                                                  1. 1

                                                                                                    I can confirm that home-manager works on OSX. The home.nix file I linked to above is used both on my Thinkpad running NixOS and my Macbook running macOS (via nix-darwin).

                                                                                                    1. 1

                                                                                                      I’m using it succesfully on Ubuntu 16.04.

                                                                                                  2. 1

                                                                                                    Oh, hey, I’ve been meaning to do that. Would you be willing to share your config?

                                                                                                    1. 4

                                                                                                      Here’s my nix expression which, in true FP style, is completely inscrutable:

                                                                                                      { stdenvNoCC, stow, src ? ./. }:
                                                                                                        
                                                                                                      stdenvNoCC.mkDerivation {
                                                                                                        inherit src;
                                                                                                        name = "common-configs";
                                                                                                        propagatedBuildInputs = [ stow ];
                                                                                                        propagatedUserEnvPkgs = [ stow ];
                                                                                                        buildPhase = ''
                                                                                                          wd=$(pwd)
                                                                                                          mkdir $wd/live
                                                                                                          find . -maxdepth 1 -mindepth 1 -type d | \
                                                                                                            grep -v 'work\|scripts\|nix' | \
                                                                                                            while read d; do
                                                                                                              stow --dir=$wd --target=$wd/live --stow $(basename $d)
                                                                                                          done
                                                                                                          echo $out > $wd/live/.config/store-address
                                                                                                        '';
                                                                                                        installPhase = ''
                                                                                                          mkdir -p $out/etc/profile.d $out/cfg
                                                                                                          cp -Lr . $out/cfg
                                                                                                          mv $out/cfg/live $out/live
                                                                                                          cat <<'EOF' >$out/etc/profile.d/stow-configs.sh
                                                                                                          export PARALLEL_SHELL=/bin/sh
                                                                                                          [ -e "$HOME/.config/store-address" ] && stow --dir=$(cat $HOME/.config/store-address) --target=$HOME --delete live
                                                                                                          stow --dir=$(dirname $(realpath $HOME/.nix-profile/live)) --target=$HOME --stow live
                                                                                                          # need to make sure systemd is using the latest unit files
                                                                                                          systemctl --user daemon-reload
                                                                                                          test -f $HOME/.nix-profile/live/.Xresources && xrdb -merge $HOME/.nix-profile/live/.Xresources
                                                                                                          EOF
                                                                                                        '';
                                                                                                      }
                                                                                                      

                                                                                                      The src argument is a directory arranged like “programname/.dotfile”.

                                                                                                      And this is called from a script I call nix-up:

                                                                                                      #!/bin/sh
                                                                                                      nix-channel --update
                                                                                                      test -f "$HOME/lib/$(hostname).nix" &&
                                                                                                      	nix-env --no-build-output --keep-going \
                                                                                                      		--remove-all --install --file "$HOME/lib/$(hostname).nix"
                                                                                                      if test -f "$HOME/.nix-profile/etc/profile.d/stow-configs.sh"; then
                                                                                                      	echo swapping configs...
                                                                                                      	. "$HOME/.nix-profile/etc/profile.d/stow-configs.sh"
                                                                                                      fi
                                                                                                      

                                                                                                      That $(hostname).nix file has a list of packages and hooks the overlay that contains the above expression.

                                                                                                      1. 1

                                                                                                        Thanks! I’m excited to set it up.

                                                                                                  1. 1

                                                                                                    TL;DR: Being able to compare values is not sufficient to sort them correctly. Languages should stop mixing partial order operations with total order operations.

                                                                                                    1. 2

                                                                                                      At least no sufficient to sort in a stable way. You can use comparison operators to sort some values. The result is probably ok, isn’t it? What certainly can not be guaranteed that a second sort will not change the order again even though the sort algorithm is stable.

                                                                                                      What do you mean by “correctly”? For a sort we might have the post-condition “ ∀n: x_n < x_{n+1}”. However, that will never be true with NaNs involved even if you use IEEE754s totalOrder.

                                                                                                      1. 1

                                                                                                        I’ve been thinking I need to review floating point numbers, but since that’ll take a few days, may I ask what the problem with -0.0 and +0.0 is?

                                                                                                      1. 7

                                                                                                        Ceylon came out in that very productive couple of years that also gave us Rust and Go. Ceylon was, IMHO, the most elegant of the three, but (sadly) it ended up going largely nowhere.

                                                                                                        1. 9

                                                                                                          I really wish this had taken off instead of Kotlin; their null-handling approach seemed a lot more sensible.

                                                                                                          1. 3

                                                                                                            Yeah, many things in Ceylon I like more semantics wise, especially when it comes to the type system. Just wish I could use more of Kotlin’s syntax in Ceylon… sadly the C-style type syntax was the main thing I couldn’t stomach. Seems strange that a type-rich language like Celyon went with it :/

                                                                                                            1. 3

                                                                                                              Yeah, it was disheartening to that they couldn’t realize that Type ident works very poorly with Generics, despite it being readily apparent in their own language.

                                                                                                              These problems are the reason why most modern language go with ident: Type instead.

                                                                                                              I guess the other changes felt to many people as just an useless hurdle to jump over (like actual and formal).

                                                                                                              Plus the whole nonsense around wanting all modifiers to be annotations and introducing mandatory ; to work around the issues. Don’t take me wrong, I think it’s a good idea to get rid of the arbitrary distinction between syntax for modifiers and syntax for annotations, but trading in semicolon inference for it is a very bad deal.

                                                                                                          2. 4

                                                                                                            Why do think it was the most elegant of the three?

                                                                                                            1. 6

                                                                                                              That was my impression when all three languages were young years ago. I can’t speak at all for “modern” Rust, though I have used Go fairly extensively.

                                                                                                              (Rust seems to have changed a lot in that time too, which struck me as…unfortunate? I was never a Rustician, but I gave up even cursorily following the language during the times of great change. Go, by comparison, changed little – though it’s a smaller language.)

                                                                                                              Ceylon’s type system allows you to express things in a much more natural fashion for the problems that actually come up a lot, IMHO. The way union/intersection typing and flow typing is handled are quite elegant. Mypy, of all places, is starting to kinda match up (though the underpinnings are not as clear) and is really pleasant to use.

                                                                                                              There’s also the nice part that everything in Ceylon is a class: there are no primitive types. Additionally, all of the fundamental classes are derivable within the type system, thanks to things like enumerated classes. That means that even classes like Integer are, in principle, derivable within the type system itself.

                                                                                                              The emphasis on declarative data and syntax support for it is likewise nice. I know that Rust’s macro system allows you to do even more, but it seems more fiddly to me (at least from my cursory glances). Go’s module-level init code let’s you do basically anything, but it’s not as “declarative”.

                                                                                                              Go ticks a whole lot of my boxes: I’ve always loved Rob Pike’s work on concurrency and the Squeak papers are go-tos for when I need something interesting to reread, and I’ve always loved Oberon…and Go is concurrent Oberon with some C thrown in. I’ve written some fairly hefty production Go code and contributed patches to Google’s gopacket library. It’s a great language but I still often end up writing in C for the low-level stuff and Python for the high-level stuff…maybe it’s just because those are the languages I’m most fluent in, though, I don’t know.

                                                                                                              Rust seems very…large to me. I get why, and I understand and I’m not complaining, but it just feels “big”. Like C++. I will readily admit that I’ve not looked at Rust in years and never wrote any real code with it so I will happily change my mind. I’ve got a copy of The Rust Programming Language sitting in my Amazon cart and will give it a read when things die down at work.

                                                                                                              Of course, the three languages target different things: Ceylon is an application language, Rust is a systems language, and Go is somewhere in between.

                                                                                                              1. 3

                                                                                                                (Rust seems to have changed a lot in that time too, which struck me as…unfortunate? I was never a Rustician, but I gave up even cursorily following the language during the times of great change. Go, by comparison, changed little – though it’s a smaller language.)

                                                                                                                Rust was always a very open project and was announced at the same time as Go, but in a very different state: as a research project. The massive changes stem from the fact that it wasn’t even remotely done back then.

                                                                                                                I find that great, of the languages you mention, it’s the only one that was very open to contributions and all the decisions and changes can be traced.

                                                                                                                That did make it unusable for people wanting a stable language for that time, I agree with that.

                                                                                                                1. 1

                                                                                                                  have you looked at stanza at all? i haven’t had a chance to use it yet, but it has a nice application-oriented philosophy and is designed around gradual typing.

                                                                                                            1. 3

                                                                                                              The year of the Linux desktop is nigh!

                                                                                                              Or not. It’s crap like this that makes Linux a non-starter for most people.

                                                                                                              1. 10

                                                                                                                What ‘crap’ is it exactly that makes Linux a non-starter for ‘most people’?

                                                                                                                Absolutely terrible driver support for hardware because Nvidia are a shitty company? Intel chips have free software drivers integrated into the kernel before the systems are even released. Nvidia still doesn’t help nouveau at all essentially. That Nvidia are allowed to distribute their clearly-GPL-violating proprietary kernel modules is baffling to me.

                                                                                                                Also the author would have probably been completely fine if he just bought the previous model of graphics card, for which nouveau works completely fine as far as I am aware. It’s hardly fair to compare an operating system where you have zero control over hardware whatsoever like Mac to Linux. Linux is expected to work perfectly with all new hardware that comes out, even with zero cooperation from the hardware vendors and all development basically being done by volunteers. Nobody complains that Mac doesn’t work on their random laptop they tried installing it on, or on some hardware it has never been tested with or developed for.

                                                                                                                You know ‘most people’ don’t have a graphics card, right? That most people don’t need 60Hz 4k displays, and certainly not multiple of them. That most people just use a web browser anyway, and so don’t actually care if the GIMP does DPI scaling properly.

                                                                                                                This post can basically be summed up as ‘Nvidia drivers are shit’. That’s an issue, but… that’s Nvidia for you.

                                                                                                                1. 6

                                                                                                                  What ‘crap’ is it exactly that makes Linux a non-starter for ‘most people’?

                                                                                                                  The fact that whether or not any given application will do anything usable or sane with a) text, b) the rest of the interface, or c) both on a monitor resolution that’s been common for years is a complete crapshoot based on which hodgepodge of squirrelly UI frameworks its author happened to personally prefer, consistency be damned?

                                                                                                                  The fact that there’s even separate answers for text and everything else is a usability disaster, let alone the whole matrix of dependencies a user need to dig into to discover why their music player does one thing, their browser another, and their text editor yet a third thing.

                                                                                                                  It’s precisely crap like this that keeps me on OS X, which is by no means perfect, but at least applications look and behave a couple of orders of magnitude more consistently. Life’s too short to dig through this dogshit so I don’t have to squint at a screen. This stuff is a solved problem everywhere else.

                                                                                                                  1. -2

                                                                                                                    The fact that whether or not any given application will do anything usable or sane with a) text, b) the rest of the interface, or c) both on a monitor resolution that’s been common for years is a complete crapshoot based on which hodgepodge of squirrelly UI frameworks its author happened to personally prefer, consistency be damned?

                                                                                                                    It’s not the resolution that’s the issue. It’s that people want pixels on their monitor to not correspond to actual pixels. I have no idea why, but they do. I think it’s mostly a marketing gimmick.

                                                                                                                    It’s precisely crap like this that keeps me on OS X, which is by no means perfect, but at least applications look and behave a couple of orders of magnitude more consistently. Life’s too short to dig through this dogshit so I don’t have to squint at a screen. This stuff is a solved problem everywhere else.

                                                                                                                    If you don’t want to squint, don’t buy a monitor with tiny pixels you have to squint at.

                                                                                                                    1. 7

                                                                                                                      It would be nice if you could avoid condescending comments like this. Consider that your opinion is just an opinion, so it’s not necessarily correct, or at the very least not the best option for every single person out there, especially when literally millions of people clearly consider HiDPI screens useful.

                                                                                                                      Also, if you’re hoping to convince anyone of the merits of Linux, this is emphatically not the way to do it.

                                                                                                                      (FWIW, the comment you originally replied to wasn’t constructive either.)

                                                                                                                      1. 4

                                                                                                                        It’s not the resolution that’s the issue. It’s that people want pixels on their monitor to not correspond to actual pixels. I have no idea why, but they do. I think it’s mostly a marketing gimmick.

                                                                                                                        “72 DPI ought to be enough for anybody”

                                                                                                                        1. 2

                                                                                                                          It’s not the resolution that’s the issue. It’s that people want pixels on their monitor to not correspond to actual pixels. I have no idea why, but they do.

                                                                                                                          because reconfiguring/recompiling literally everything to use larger fonts and UI component measurements is not feasible

                                                                                                                      2. 2

                                                                                                                        I don’t disagree with you. The previous generation of cards doesn’t feature dual HDMI 2.0/DP 1.2 connectors for the low end (notably the passive ones). If I would have known the problem with the drivers, I would have brought a Radeon card, even with the additional fan.

                                                                                                                        1. 2

                                                                                                                          To be fair, the article reads like he made every bad decision possible.

                                                                                                                          • Accepting a faulty product? Check!
                                                                                                                          • Buying Nvidia? Check!

                                                                                                                          This sounds a lot like “I want to learn sailing, so I bought this bike, and now I realized it doesn’t even float!”.

                                                                                                                        2. 3

                                                                                                                          Not just newcomers. Crap like this made me move to Mac after >20 years of using mainly Linux.

                                                                                                                          My gaming box is happily running Arch Linux, though. Steam is very good, and Proton is slowly widening the compatibility to a point where I’m missing nothing.

                                                                                                                          1. 5

                                                                                                                            Crap like this made me move to Mac after >20 years of using mainly Linux.

                                                                                                                            What crap specifically is it that made you move to Mac? Because I can name a lot of crap that made me move away from Mac back to Linux after experimenting with it by buying a Macbook Pro a few years ago, like being tied down to a terrible proprietary operating system missing all the useful features I want.

                                                                                                                            1. 3

                                                                                                                              I personally don’t like Mac either but it is not a terrible OS, it just isn’t made for people like you and me. (For me the worst parts are the cmd-tab, the keyboard layout and the global menu. Typical Mac users love their cmd-tab and global menu and didn’t complain about the keyboard until recently.)

                                                                                                                            2. 1

                                                                                                                              Arch Linux

                                                                                                                              That might be your problem. If you like to have a working computer and want the latest software, try Fedora. If you like to have a working computer and don’t care about the latest software, use Ubuntu. Very few other distros care about ease of use, and if that’s why you left Linux it’s likely because you made it hard on yourself.

                                                                                                                              I spent hours configuring Arch and i3 to be just how I needed it, and it still wouldn’t work well. I installed Fedora and everything (even this one ethernet over type-c dongle someone told me simply could not work on Linux) just worked. It took about 5 minutes to setup my keybinds in KDE again.

                                                                                                                              (Also interesting that I moved the other way as you, Mac -> Linux.)

                                                                                                                              1. 4

                                                                                                                                I had typed here a longer reply, but I’ll just say instead that I have hard time believing some hardware worked on Fedora while not on Arch.

                                                                                                                                1. 1

                                                                                                                                  Why?

                                                                                                                                  1. 2

                                                                                                                                    Hardware compatibility comes primarily from the kernel, and Arch’s kernel follows vanilla in a quite speedy fashion.

                                                                                                                                    1. 2

                                                                                                                                      Ah, the problem likely wasn’t support, but that I needed some config option somewhere to enable it, and I had no idea what package/service would even handle something like that. A ready to use distro already had that configured.

                                                                                                                                      A person who gladly moved to MacOS would probably appreciate something like that not involving configuration.

                                                                                                                                2. 3

                                                                                                                                  Nah, I like Arch Linux. Its simplicity makes many of the deficiencies of desktop PCs worth it. Almost.

                                                                                                                                  I think it’s mostly that I felt that Wayland promised to remove most of these obstacles, but we’re still waiting. Then I happened to have a Mac forced on me by work for a longer time, so I was sort-of forced to experience it. It took some time, but I warmed up to it enough that now I find myself liking how things just work.

                                                                                                                                  Fedora and Ubuntu and Windows are not there yet, and I suspect they never will. The problem is the amount of hardware and software combinations they have to support.

                                                                                                                              2. 1

                                                                                                                                I agree that Linux can be better, but…

                                                                                                                                Scaling for the types of apps he mentioned (Java, and other weird ones) won’t work on Windows either. Only MacOS got this right.

                                                                                                                              1. 9

                                                                                                                                I feel that a discussion of Go code management in October 2018 that does not mention go mod and instead spends time on vendor/ is not doing a reader any favors.

                                                                                                                                Outside of that issue, this article is well-written, plainspoken, and easy to read.

                                                                                                                                1. 4

                                                                                                                                  Thanks for the kind words! I didn’t touch on go mod because some of its interfaces (e.g. go list -m’s output and how go mod interacts with vendor) are not yet stable, so the dependency analysis situation is a bit up in the air. In my practical experience, go mod adoption has been fairly slow.

                                                                                                                                  go mod solves most (all(?)) of the problems with vendor, by (1) disallowing the nested vendor situation and (2) forcing packages in different repositories to have explicit versioning information when imported.

                                                                                                                                  My takeaway from this feedback is to at least mention the existence of newer approaches to avoid misleading readers, even if it’s not completely clear how they fit in yet.

                                                                                                                                  1. 3

                                                                                                                                    I too am utterly confused as to why the article doesn’t seem to mention go mod at all, and can’t see how the article can be useful to a Go programmer in this situation. Also, when I realized that, I stopped reading the text and only skimmed the rest trying to quickly confirm if I’m maybe wrong, but this didn’t seem to be the case. I don’t understand it especially because go mod has a potential to solve at least some problems described in the article (can’t say if all as I didn’t read it all, as I explained above).

                                                                                                                                    1. 1

                                                                                                                                      I only lasted until “It gets a lot of things right: great tooling, a pragmatic language design, and a sane module system.” … are there any useful insights after that?

                                                                                                                                      1. 2

                                                                                                                                        Thanks for the feedback! This was written as an explanation of various pitfalls in Go dependency analysis. I think my takeaway from the feedback above is to provide more actionable information.

                                                                                                                                        1. 2

                                                                                                                                          Don’t take it too seriously, it sounded harsher than I intended.

                                                                                                                                          1. 1

                                                                                                                                            Personally (apart from adding info about go mod), I’d also suggest maybe trying to add some simple example to help explain what you’re trying to demonstrate/communicate. As of now, I’m personally really confused and can’t wrap my head around as to what does the article actually try to tell me. You’re starting the article with “pathologies”, which is a very strong word (at least to me); then you’re saying a lot of “Go does X well/ok/right” — which is confusing to me when you claim to be describing pathologies; then you describe a few ways to describe dependencies in Go projects; still no hint of “pathologies”, and it actually feels to me that you’re using them rather to advertise some options of your product, instead of focusing on the premise of the article; then you seem to describe some subtle situations (presumably those are the claimed “pathologies”?), without providing examples (only claiming “some projects” — that is, what projects exactly? see e.g. Wikipedia’s “who?” template), which currently makes them super hard to understand for me.

                                                                                                                                    1. 6

                                                                                                                                      Wow if I bought a monitor with a dead pixel and weird lines on the screen it’d be back in the shop before you could say ‘Consumer Guarantees Act 1993’. Especially on such expensive high end hardware. I was upset enough that my monitors’ colour balance isn’t quite the same.

                                                                                                                                      EDIT: I also find it absolutely hilarious that DPI scaling works fine in Qt 5, and works fine in actual web browsers, but doesn’t work in Electron, the supposedly ‘modern’ UI framework.

                                                                                                                                      1. 4

                                                                                                                                        He didn’t even align the displays with each other … AAAAAAARGHRGHGHRGH.

                                                                                                                                        1. 3

                                                                                                                                          DPI scaling works fine for Electron apps based on a Chromium version that supports DPI scaling. This has been the case for quite some time now, and Chromium’s move to GTK3 has improved support even further. I’m not sure what Electron apps the author was using that didn’t support DPI scaling, however I’ve yet to come across one that doesn’t scale on my 4K laptop screen. Both VS Code and Slack work flawlessly for me.

                                                                                                                                          I got my XPS 9560 in early 2017 with a 4K screen so I was initially quite worried about scaling issues, however the only apps I ever have issues with are older GTK2 apps (Gimp, and pgAdmin are the only two that I use).

                                                                                                                                          1. 2

                                                                                                                                            DPI scaling works in Electron apps, but I often have to specify it per app (often by using Ctrl +/- for the browser zoom). … It is kinda a step backwards when you think about it.

                                                                                                                                            1. 1

                                                                                                                                              I am using Spotify. I have just checked and it’s still not scaling correctly without the appropriate command-line option. I’ll add a note this may depend on the Electron app.

                                                                                                                                              EDIT: maybe Spotify is not an Electron app, but a CEF app. Is there still a difference?

                                                                                                                                              1. 1

                                                                                                                                                The version of Chromium CEF/Spotify uses seems to lag pretty far behind contemporary Electron builds, just based on https://www.spotify.com/ro/opensource/

                                                                                                                                                1. 1

                                                                                                                                                  Chromium 65 is recent enough to have the appropriate code. But maybe CEF doesn’t make use of it. I’ll update the table to mention Electron apps works fine.

                                                                                                                                                  1. 1

                                                                                                                                                    Spotify for Linux has been around since before Electron existed, so Spotify not using it isn’t much of a surprise.

                                                                                                                                                    According to this page, Electron doesn’t make use of CEF, and instead calls Chromium’s APIs directly, which is probably why Electron apps are able to scale correctly while Spotify doesn’t.

                                                                                                                                                2. 1

                                                                                                                                                  I use Spotify every day in a HiDPI environment. Never had an issue. The one thing you might want to do if the first time you load it the text looks too small is use the built in zoom feature (Ctrl+/Ctrl-) to bring the font to a readable size, it’ll be saved and you won’t have to worry about it anymore.

                                                                                                                                              2. 1

                                                                                                                                                Wow if I bought a monitor with a dead pixel and weird lines on the screen it’d be back in the shop

                                                                                                                                                The policy allowing some handful of dead/stuck pixels has been written into the warranties of most monitors literally since LCD computer monitors have been around. Because most people use their monitors for web browsing, email, document editing, etc, where a couple of extremely tiny black specs are truly insignificant and will literally never be noticed among all of the dust such that accumulates on every screen.

                                                                                                                                                If you want a monitor that comes with zero dead pixels guarantee, they certainly sell those, but they cost more as well since there’s more QA involved.

                                                                                                                                                1. 1

                                                                                                                                                  The policy allowing some handful of dead/stuck pixels has been written into the warranties of most monitors literally since LCD computer monitors have been around.

                                                                                                                                                  They can write whatever they like in the agreement that I never signed or agreed to when I bought a monitor from a shop. It’s completely irrelevant. I’m not talking about returning it to the manufacturer under their warranty, I’m talking about returning it to the shop I bought it from under consumer protection law.

                                                                                                                                                  Because most people use their monitors for web browsing, email, document editing, etc, where a couple of extremely tiny black specs are truly insignificant and will literally never be noticed among all of the dust such that accumulates on every screen.

                                                                                                                                                  My monitor has no dead pixels. If it got a dead pixel, I would notice immediately. They’re incredibly obvious to anyone that isn’t blind.

                                                                                                                                                  If you want a monitor that comes with zero dead pixels guarantee, they certainly sell those, but they cost more as well since there’s more QA involved.

                                                                                                                                                  No, monitors that come with a ‘zero dead pixels’ guarantee are all monitors.

                                                                                                                                                  1. 1

                                                                                                                                                    They can write whatever they like in the agreement that I never signed or agreed to when I bought a monitor from a shop.

                                                                                                                                                    Nobody mentioned an agreement. A warranty is not the same as an agreement or contract.

                                                                                                                                                    I’m not talking about returning it to the manufacturer under their warranty, I’m talking about returning it to the shop I bought it from under consumer protection law.

                                                                                                                                                    It would have been useful to mention that you’re apparently in New Zealand. If I understand it, the law you’re talking about requires every retailer to accept returns of purchased merchandise. Not all countries have such a law. In the U.S. for instance, almost every store accepts returns whether or not the merchandise is defective. But this is simply good customer service, it’s not a legal requirement.

                                                                                                                                                    So now the argument hinges on what is considered defective and who gets to decide that. Is it up to the manufacturer? The retailer? The end user? In your country, I honestly don’t know and don’t care enough to research it right now.

                                                                                                                                                    They’re incredibly obvious to anyone that isn’t blind.

                                                                                                                                                    No, not really. Dead pixels are only obvious when the entire area around the dead pixel is one solid bright color, and even then, are generally indistinguishable from dust. Most people will never notice a dead pixel in everyday use, especially as the pixels in monitors get smaller and smaller. I have a huge monitor with a ridiculous resolution at home. It has a couple of dead pixels, it’s been months since I last noticed them. But by god it was like $200 on Amazon. I’ll happily save a few hundred dollars to deal with a couple of dead pixels I very rarely notice.

                                                                                                                                                    No, monitors that come with a ‘zero dead pixels’ guarantee are all monitors.

                                                                                                                                                    In New Zealand, maybe, but that’s not at all a universal statement. Nor should it be.

                                                                                                                                                    The realities of the LCD manufacturing process are such that if every LCD panel manufacturer threw out all of their panels with one or more dead pixels, every monitor produced would cost the end user a lot more. Because not only do you need better QA, you’re throwing into the trash a significant percentage of your yield. Which has a dual negative impact: Not only did you waste precious factory time and expensive resources on the panel, now it has to get thrown away into a landfill or processed for recycling if that’s even possible.

                                                                                                                                                    It’s far more efficient from a manufacturing, environmental, and market standpoint to just sell the slightly imperfect panels at a discount and sell the perfect panels for whatever the market will bear for zero dead pixels. Which is exactly what most manufacturers do. You want zero dead pixels, buy the one with the zero dead pixels policy. Here is Dell’s version of that: https://www.dell.com/support/article/nz/en/nzbsd1/sln130145/dell-lcd-display-pixel-guidelines?lang=en

                                                                                                                                                    1. 1

                                                                                                                                                      Nobody mentioned an agreement. A warranty is not the same as an agreement or contract.

                                                                                                                                                      A warranty is an example of an agreement. You purchase the thing, and they agree to take it back if it’s faulty. But they can put whatever terms they like, they can define taking it back, define timelines, define ‘faulty’, etc. It’s completely up to them, really. If you don’t like it, don’t buy it.

                                                                                                                                                      It would have been useful to mention that you’re apparently in New Zealand. If I understand it, the law you’re talking about requires every retailer to accept returns of purchased merchandise.

                                                                                                                                                      Only if it’s faulty.

                                                                                                                                                      So now the argument hinges on what is considered defective and who gets to decide that. Is it up to the manufacturer? The retailer? The end user? In your country, I honestly don’t know and don’t care enough to research it right now.

                                                                                                                                                      The same way anything is decided legally: it starts off a bit fuzzy around the edges, but in the vast majority of cases, it’s pretty obvious what it means for something to be faulty. And in a few edge cases, it gets decided by the legal system which sets a precedent that sharpens the edges for everyone else in the future.

                                                                                                                                                      No, not really. Dead pixels are only obvious when the entire area around the dead pixel is one solid bright color, and even then, are generally indistinguishable from dust. Most people will never notice a dead pixel in everyday use, especially as the pixels in monitors get smaller and smaller.

                                                                                                                                                      I can guarantee I’d notice any dead pixels on my 1920x1200, 24 inch monitor. I can guarantee I’d notice any dead pixels on my phone. I think it’s nonsense to claim that most people would never notice a dead pixel in everyday use. A bright dot in the middle of your monitor is going to be obvious if you’re watching something that’s dark. The moment you watch a movie there’s an unmoving bright green dot in the middle of the screen? Everyone is going to notice that.

                                                                                                                                                      I have a huge monitor with a ridiculous resolution at home. It has a couple of dead pixels, it’s been months since I last noticed them. But by god it was like $200 on Amazon. I’ll happily save a few hundred dollars to deal with a couple of dead pixels I very rarely notice.

                                                                                                                                                      It’s fine if the manufacturers and retailers sell them at a discount as seconds. But that’s not what they’re doing. They’re selling them as normal and then just hoping people can’t be bothered complaining about them and returning them.

                                                                                                                                                      The realities of the LCD manufacturing process are such that if every LCD panel manufacturer threw out all of their panels with one or more dead pixels, every monitor produced would cost the end user a lot more.

                                                                                                                                                      For a start, nobody is saying that they have to throw them away. As I said, they could sell them at a discount as a second. Some people would be fine with that, others wouldn’t, that’s friendly to the customer and lets them make a choice with a tradeoff.

                                                                                                                                                      It’s far more efficient from a manufacturing, environmental, and market standpoint to just sell the slightly imperfect panels at a discount and sell the perfect panels for whatever the market will bear for zero dead pixels. Which is exactly what most manufacturers do.

                                                                                                                                                      That’s absolutely not what they do. They sell them all at a price somewhere between those two prices, and when you buy a monitor you roll the dice. Maybe you’ll be lucky, maybe you won’t. People that want a good monitor that actually works as advertised have to roll the dice, and someone that doesn’t care like yourself has to pay a higher cost (for your chance to get a perfect monitor) than they’d pay if they were able to specifically buy a monitor with a couple of dead pixels at a discount.

                                                                                                                                              1. 15

                                                                                                                                                Hot take: I love this.

                                                                                                                                                While it’s clear that DRH is a devout Christian (or an expert satirist), he also takes pains to mention several times that he is not putting this out in order to try to enforce Christian beliefs—or even values—in his community. He also adds, which is quite canny and also unusual, that his expectation is not that failure to comply 100% with the CoC should result in expulsion or blacklisting.

                                                                                                                                                But he is actually acknowledging: people have adopted Codes of Conduct for the purpose of regulating behavior within contained communities of practice for thousands of years in nearly every culture, at least any culture with any kind of monastic tradition. If we feel the sting of an unregulated community, where toxicity damages the spirits of the people we would like to contribute, why not start there?

                                                                                                                                                I’m afraid it will fall on deaf ears because many people—on both sides of the CoC debate—have an immediate allergy to any mention of religious practice. I hope they’re given some time to see this code put into practice.

                                                                                                                                                1. 10

                                                                                                                                                  A large part of this is because organised religion in general, has a pretty fucking horrific history of treating certain groups of people terribly.

                                                                                                                                                  In western society/culture/countries, (some parts of) Christianity has not just a history, but a current-day penchant for treating some of those same groups of people, as shitty as the law will allow them, and trying their damndest to reverse whatever protection laws do provide.

                                                                                                                                                  I’m a straight while male, but I can see plenty of reasons why almost any demographic other than my own would take issue with using Christianity as the basis of a “treat people right” guide.

                                                                                                                                                  Edit to clarify: it’s not just christianity that has treated groups of people like shit, but this CoC is linked heavily to Christianity and Christians do currently treat some of those same groups of people like shit.

                                                                                                                                                  1. 3

                                                                                                                                                    Say the same thing about muslims and you’d be shouted out of the server by hordes of “good” people.

                                                                                                                                                    Christianity is an enormous box containing all from the Swedish (formerly state) church which professes a form of liberation theology where god is gender-neutral and no longer a “lord” as that does not sound inclusive enough to fundamentalist sects who stand next to the road with signs professing all from the end of the earth to “whatever bad happened is your own fault because you allow gay people to be gay people”. The Benedictines have been around for a while, they tend not to do the latter and are far from the former and their Rule is, if clearly religiously tainted, a usable abstraction of the monastic ideal. Software developers as a rule are not medieval monks living in poverty with a vow of obedience which makes parts of the Rule inapplicable but compared to the intersectionalist religious pamphlets which are being used by other projects this one is no worse and in many ways a lot easier on the mind because its religious intentions are so clearly stated (and as such easily ignored by those who prefer to stay away from organised religions). The whole of the thing could be compressed into “do not do unto others what you would not have done upon yourself” which gives room for future abbreviation.

                                                                                                                                                    1. 1

                                                                                                                                                      As I said elsewhere here and on HN, I don’t see why this CoC or any such agreement needs to be more complex than “respect people”.

                                                                                                                                                      If someone needs it spelt out more clearly than that, do so, when the need arises.

                                                                                                                                                      Defining such a specific list of rules (either in this or in other verbose CoC’s), is micromanaging to the ridiculous extreme. If we file a feature request, we don’t preface it with a “how to type” or “basics of $X language” handbook, because we trust that people understand those concepts on their own.

                                                                                                                                                      1. 6

                                                                                                                                                        The reason is moderation, the vast majority of the rule of law in any country could be boiled down into “don’t do bad stuff,” but then when it comes to judgement who defines “bad”?

                                                                                                                                                        Without a CoC or Terms and Conditions by another name; moderation of large communities becomes messy, easily corrupt and non-transparent with different moderators treating people differently based upon personal preference.

                                                                                                                                                        With a CoC/T&C the moderation team have a set of guidelines that they must follow in their moderation duty, this gives a line in the sand that the community know they should not cross and the moderators know they should apply.

                                                                                                                                                        For the majority of people that line is pretty obvious without needing to read the CoC, for a select few however, they need “respect people” spelling out.

                                                                                                                                                    2. 4

                                                                                                                                                      Christianity in particularly

                                                                                                                                                      Christianity has far from a monopoly on human suffering and shitty behavior. Pretty much any organized system of beliefs or tribe of sufficient population will end up with a history of treating some subset of people terribly.

                                                                                                                                                      Please don’t be inaccurate.

                                                                                                                                                      1. 4

                                                                                                                                                        You’re right. I’ll amend.

                                                                                                                                                        1. 3

                                                                                                                                                          Agree. Looking at the people acting offended, it feels that they are largely angry that SQLite didn’t pick their (corporate) religion.

                                                                                                                                                        2. 1

                                                                                                                                                          In western society/culture/countries, (some parts of) Christianity has not just a history, but a current-day penchant for treating some of those same groups of people, as shitty as the law will allow them, and trying their damndest to reverse whatever protection laws do provide.

                                                                                                                                                          But that has nothing to do with Christianity. If those people happened to have a different religion they wouldn’t be different people, they’d just do nasty things for other reasons.

                                                                                                                                                          Countries where other religions have historically dominated are no different in terms of whether they have abusive practices or whether they have bigotry. And it’s pretty obvious from the wide variety of different types of Christianity practiced in different places, from Sweden to Subsaharan Africa, that the culture and socioeconomic status of people is what determines their behaviour, and religion is just an excuse to be nice or an excuse to be nasty, not the cause of nicety or nastyness.

                                                                                                                                                          1. -1

                                                                                                                                                            Edit to clarify: it’s not just christianity that has treated groups of people like shit, but this CoC is linked heavily to Christianity and Christians do currently treat some of those same groups of people like shit.

                                                                                                                                                            Yes, and so do the intersectional feminists who push for entirely-serious codes of conduct. Publishing this explicitly-Christian CoC, even if the author was sincere about valuing the rules of the Benedictines as a way of ordering human communities, has the satirical effect of making the feminist codes of conduct seem not all that different from the codes of conduct of a competing religious tradition.

                                                                                                                                                          2. 8

                                                                                                                                                            I agree. I think the Rule of St Benedict is interesting, but this is real magic:

                                                                                                                                                            However, those who wish to participate in the SQLite community, either by commenting on the public mailing lists or by contributing patches or suggestions or in any other way, are expected to conduct themselves in a manner that honors the overarching spirit of the rule, even if they disagree with specific details. Polite and professional discussion is always welcomed, from anyone.

                                                                                                                                                          1. 7

                                                                                                                                                            CTEs are great, but it’s important to understand the implementation characteristics as they differ between databases. Some RDBMSs, like PostgreSQL, treat a CTE like an optimization fence while others (Greenplum for example) plan them as subqueries.

                                                                                                                                                            1. 2

                                                                                                                                                              The article mentions offhand they use SQL Server, which AFAIK does a pretty good job of using them in plans. I believe (not 100% sure) its optimiser can see right through CTEs.

                                                                                                                                                              1. 2

                                                                                                                                                                … and then you have RDBMSs like Oracle whose support for CTE is a complete and utter disgrace.

                                                                                                                                                                I praying for the day Oracle’s DB falls out of use, because I imagine that will happen sooner than them managing to properly implement SQL standards from 20 years ago.

                                                                                                                                                                1. 2

                                                                                                                                                                  At university we had to use Oracle and via the iSQL web-interface for all the SQL-related parts in our database-courses. It was the slowest most painful experience, executing a simple select could take several minutes and navigating the interface/paginating results would take at least a minute per operation.

                                                                                                                                                                  I would always change it to show all results on one page (no pagination) but the environment would do a full reset every few hours requiring me to spend probably 15-30minutes changing the settings back to my slightly saner defaults. Every lab would take at least twice as long because of the pain in using this system. I loved the course and the lecturer, it was probably one of the best courses I took during my time at university, but I did not want to use Oracle again after that point.

                                                                                                                                                                  I’ve heard that they nowadays have moved the course to use PostgreSQL instead which seems like a much more sane approach, what I would have given to be able to run the code locally on my computer at that time.

                                                                                                                                                                2. 1

                                                                                                                                                                  I didn’t know this, so using a CTE in Postgres current would be at a disadvantage compared to subqueries?

                                                                                                                                                                  Haven’t really used CTEs in Postgres much yet but I’ve looked at them and considered them. Is there any plans on enabling optimization through CTE’s in pg? Or is there a deeper more fundamental undelaying problem?

                                                                                                                                                                  1. 5

                                                                                                                                                                    would be at a disadvantage compared to subqueries

                                                                                                                                                                    it depends. I have successfully used CTEs to circumvent shortcomings in the planner which was mi-estimating row counts no matter what I set the stats target to (this was also before create statistics).

                                                                                                                                                                    Is there any plans on enabling optimization through CTE’s in pg

                                                                                                                                                                    it’s on the table for version 12

                                                                                                                                                                    1. 2

                                                                                                                                                                      It’s not necessarily less efficient due to the optimization fence, it all depends on your workload. The underlying reason is a conscious design decision, not a technical issue. There have been lots of discussions around changing it, or at least to provide the option per CTE on how to plan/optimize it. There are patches on the -hackers mailing list but so far nothing has made it in.

                                                                                                                                                                    2. 1

                                                                                                                                                                      Does anyone know if CTEs are an optimization fence in DB2 as well?

                                                                                                                                                                    1. 4

                                                                                                                                                                      Thinking about language design!

                                                                                                                                                                      Imagine some barebone language with a contains method that should return true if value is contained in some cell:

                                                                                                                                                                      fun contains[T](cell: Cell[T], value: T)
                                                                                                                                                                      

                                                                                                                                                                      The difficulty is that the method needs to returns correct answers in all cases, even in in a situation like this:

                                                                                                                                                                      contains(Cell(NaN), NaN)
                                                                                                                                                                      

                                                                                                                                                                      The core questions are:

                                                                                                                                                                      • how would the implementation look like?
                                                                                                                                                                      • what would be necessary language-wise to allow such an implementation?

                                                                                                                                                                      Previously I made the claim that only two of the following points could be met:

                                                                                                                                                                      1. only one equality operation
                                                                                                                                                                      2. generic types
                                                                                                                                                                      3. correct floating point support

                                                                                                                                                                      E. g. if you satisfy 1. and 2. then you get:

                                                                                                                                                                      fun contains[T](cell: Cell[T], value: T) =
                                                                                                                                                                        cell.value == value // does not handle NaNs correctly
                                                                                                                                                                      

                                                                                                                                                                      If you satisfy 1. and 3., i. e. (no generics) this means you have to implement contains for every individual type:

                                                                                                                                                                      fun containsFloat(cell: FloatCell, value: Float) =
                                                                                                                                                                        cell.value == value || (cell.value.isNaN && value.isNaN)
                                                                                                                                                                      ... // more implementations for each and every type
                                                                                                                                                                      

                                                                                                                                                                      If you satisfy 2. and 3. you need to introduce another equality operation, “identity”: === (which violates 1.)

                                                                                                                                                                      fun contains[T](cell: Cell[T], value: T) =
                                                                                                                                                                        cell.value === value || cell.value == value
                                                                                                                                                                      

                                                                                                                                                                      Now I realized a few minutes ago this is not entirely correct, because the NaN case can be solved like this:

                                                                                                                                                                      fun contains[T](cell: Cell[T], value: T) =
                                                                                                                                                                        cell.value == value || (cell.value != cell.value && value != value)
                                                                                                                                                                      

                                                                                                                                                                      It seems that 0.0 vs. -0.0 cannot be handled similarly though.

                                                                                                                                                                      Opinions?

                                                                                                                                                                      1. 3

                                                                                                                                                                        I could argue that your first case does handle NaNs correctly. Maybe you should reconsider what the “correct” answer should be.

                                                                                                                                                                        Do you know that NaNs can have a payload? What is correct for NaNs with different payloads?

                                                                                                                                                                        1. 1

                                                                                                                                                                          Maybe you should reconsider what the “correct” answer should be.

                                                                                                                                                                          I sorted that out a while ago. Returning false on things like contains or not finding the element to remove on remove is definitely wrong.

                                                                                                                                                                          It means that you not only can’t reliably use floating point values in collections, but also every other composite type containing a float.

                                                                                                                                                                          Do you know that NaNs can have a payload? What is correct for NaNs with different payloads?

                                                                                                                                                                          Yes. Different NaNs are considered to be different.

                                                                                                                                                                          1. 1

                                                                                                                                                                            This is an interesting problem so I googled around a little. This SO answer is quite insightful, especially the last paragraph:

                                                                                                                                                                            To be blunt: the result of NaN == NaN isn’t going to change now. Better to learn to live with it than to complain on the internet. If you want to argue that an order relation suitable for containers should also exist, I would recommend advocating that your favorite programming language implement the totalOrder predicate standardized in IEEE-754 (2008). The fact that it hasn’t already speaks to the validity of Kahan’s concern that motivated the current state of affairs.

                                                                                                                                                                            Wikipedia says on totalOrder

                                                                                                                                                                            The normal comparison operations however treat NaNs as unordered and compare −0 and +0 as equal. The totalOrder predicate will order these cases, and it also distinguishes between different representations of NaNs and between the same decimal floating point number encoded in different ways.

                                                                                                                                                                            IEEE-754 2008 says things like

                                                                                                                                                                            If x and y are both NaNs, then […] negative sign orders below positive sign […and…] signaling orders below quiet for +NaN, reverse for −NaN.

                                                                                                                                                                            This does not really provide you an elegant way to implement “contains”, but I learned that there actually is a total order for floating point specified but “<” does not provide it.

                                                                                                                                                                            1. 1

                                                                                                                                                                              I’d consider

                                                                                                                                                                              this === that || this == that
                                                                                                                                                                              

                                                                                                                                                                              quite elegant.

                                                                                                                                                                              === means identity (whose implementation is built in and cannot be changed), and == means equality (whose implementation can be overridden by users).

                                                                                                                                                                              Both operations can exist on every type without causing too much pain.

                                                                                                                                                                      1. 17

                                                                                                                                                                        Just another “Why Rust should replace Language X” article with not much depth. By now the greatest entrance barrier to Rust is the community’s attitude. Go lacks in a certain field that Rust does well? let’s talk for hours about how rust does it better. Rust lacks async networking that Go was designed to do well? no problem we’ll catch up for sure.

                                                                                                                                                                        1. 13

                                                                                                                                                                          They can’t figure out why everyone doesn’t love their thing and why some like this other thing so much better while they are convinced that the other thing is inferior.

                                                                                                                                                                          1. 5

                                                                                                                                                                            I don’t think this is true for the whole Rust community. However, when a language has temporal exponential growth, there are a lot of newcomers who are intoxicated with the language. It usually takes a few years for a language community at large to get a better perspective on the role of their favorite language. It’s pretty much what happens during all language hypes.

                                                                                                                                                                            I also fundamentally disagree with the author. Go is not a bad language, it just has different design goals than Rust. I think the strongest criticism that one can have is that it does not provide many improvements above modern Pascal, Modula-2, or Oberon-2. The Wirth languages are also very simple. But Go has clearly shown rebooting a language philosophy with a new ecosystem and a more familiar (C-like) syntax can bring success.

                                                                                                                                                                            1. 0

                                                                                                                                                                              The Wirth languages are also very simple.

                                                                                                                                                                              I think even Wirth would design a language in 2018 differently compared to his work in 1971.

                                                                                                                                                                              Go creators seem to disagree, discarding almost FIFTY years of progress in language design.

                                                                                                                                                                              They can do whatever they want, but please don’t drag Wirth through the mud.

                                                                                                                                                                              1. 4

                                                                                                                                                                                I think even Wirth would design a language in 2018 differently compared to his work in 1971.

                                                                                                                                                                                Oberon-2 is from 1991 and Wirth has updated its specification. Here is the 2013 revision of the spec:

                                                                                                                                                                                https://www.inf.ethz.ch/personal/wirth/Oberon/Oberon07.Report.pdf

                                                                                                                                                                                He also still seems to be working on the compiler:

                                                                                                                                                                                https://www.inf.ethz.ch/personal/wirth/news.txt

                                                                                                                                                                                It still looks as simple as it did when I wrote some Oberon in the early 00s.

                                                                                                                                                                                1. 1

                                                                                                                                                                                  That’s unsurprising and doesn’t detract form anything I wrote.

                                                                                                                                                                                2. 2

                                                                                                                                                                                  Go creators seem to disagree, discarding almost FIFTY years of progress in language design.

                                                                                                                                                                                  Have you even considered that they don’t necessarily agree that fifty years of overcomplicated type system designs might not be considered ‘progress’ by everyone?

                                                                                                                                                                                  1. 1

                                                                                                                                                                                    Have you even considered …

                                                                                                                                                                                    No. Quite honestly, I believe they just haven’t bothered to look at anything the didn’t “invent” themselves.

                                                                                                                                                                                    1. -1

                                                                                                                                                                                      I can’t read this comment as anything but some kind of elaborate joke. Surely you can’t seriously hold that view? Talk about Dunning-Kruger…

                                                                                                                                                                          1. 20

                                                                                                                                                                            The “lacks” of Go in the article are highly opinionated and without any context of what you’re pretending to solve with the language.

                                                                                                                                                                            Garbage collection is something bad? Can’t disagree harder.

                                                                                                                                                                            The article ends with a bunch of extreme opinions like “Rust will be better than Go in every possible task

                                                                                                                                                                            There’re use cases for Go, use cases for Rust, for both, and for none of them. Just pick the right tool for your job and stop bragging about yours.

                                                                                                                                                                            You love Rust, we get it.

                                                                                                                                                                            1. 2

                                                                                                                                                                              Yes, I would argue GC is something that’s inherently bad in this context. Actually, I’d go as far as to say that a GC is bad for any statically typed language. And Go is, essentially, statically typed.

                                                                                                                                                                              It’s inherently bad since GC dictates the lack of destruction mechanisms that can be reliably used when no reference to the resource are left. In other words, you can’t have basic features like the C++ file streams that “close themselves” at the end of the scope, then they are destroyed.

                                                                                                                                                                              That’s why Go has the “defer” statement, it’s there because of the GC. Otherwise, destructors could be used to defer cleanup tasks at the end of a scope.

                                                                                                                                                                              So that’s what makes a GC inherently bad.

                                                                                                                                                                              A GC, however, is also bad because it “implies” the language doesn’t have good resource management mechanisms.

                                                                                                                                                                              There was an article posted here, about how Rust essentially has a “static GC”, since manual deallocation is almost never needed. Same goes with well written C++, it behaves just like a garbage collected language, no manual deallocation required, all of it is figured out at compile time based on your code.

                                                                                                                                                                              So, essentially, a GC does what language like C++ and Rust do at compile time… but it does it at runtime. Isn’t this inherently bad ? Doing something that can be done at CT during runtime ? It’s bad from a performance perspective and also bad from a code validation perspective. And it has essentially no upsides, as far as I’ve been able to tell.

                                                                                                                                                                              As far as I can tell the main “support” for GC is that they’ve always been used. But that doesn’t automatically make them good. GCs seem to be closer to a hack for a language to be easier to implement rather than a feature for a user of the language.

                                                                                                                                                                              Feel free to convince me otherwise.

                                                                                                                                                                              1. 11

                                                                                                                                                                                It’s inherently bad since GC dictates the lack of destruction mechanisms that can be reliably used when no reference to the resource are left.

                                                                                                                                                                                Why do you think this would be the case? A language with GC can also have linear or affine types for enforcing that resources are always freed and not used after they’re freed. Most languages don’t go this route because they prefer to spend their complexity budgets elsewhere and defer/try-with-resources work well in practice, but it’s certainly possible. See ATS for an example. You can also use rank-N types to a similar effect, although you are limited to a stack discipline which is not the case with linear/affine types.

                                                                                                                                                                                So, essentially, a GC does what language like C++ and Rust do at compile time… but it does it at runtime. Isn’t this inherently bad ?

                                                                                                                                                                                No, not necessarily. Garbage collectors can move and compact data for better cache locality and elimination of fragmentation concerns. They also allow for much faster allocation than in a language where you’re calling the equivalent of malloc under the hood for anything that doesn’t follow a clean stack discipline. Reclamation of short-lived data is also essentially free with a generational collector. There are also garbage collectors with hard bounds on pause times which is not the case in C++ where a chain of frees can take an arbitrary amount of time.

                                                                                                                                                                                Beyond all of this, garbage collection allows for a language that is both simpler and more expressive. Certain idioms that can be awkward to express in Rust are quite easy in a language with garbage collection precisely because you do not need to explain to the compiler how memory will be managed. Pervasive use of persistent data structures also becomes a viable option when you have a GC that allows for effortless and efficient sharing.

                                                                                                                                                                                In short, garbage collection is more flexible than Rust-style memory management, can have great performance (especially for functional languages that perform a lot of small allocations), and does not preclude use of linear or affine types for managing resources. GC is hardly a hack, and its popularity is the result of a number of advantages over the alternatives for common use cases.

                                                                                                                                                                                1. 1

                                                                                                                                                                                  What idioms are unavailable in Rust or in modern C++, because of their lack of GC, but are available in a statically typed GC language ?

                                                                                                                                                                                  I perfectly agree with GC allowing for more flexibility and more concise code as far as dynamic language go, but that’s neither here nor there.

                                                                                                                                                                                  As for the theoretical performance benefits and real-time capabilities of a GCed language… I think the word theoretical is what I’d focus my counter upon there, because they don’t actually exist. The GC overhead is too big, in practice, to make those benefits outshine languages without runtime memory management logic.

                                                                                                                                                                                  1. 9

                                                                                                                                                                                    I’m not sure about C++, but there are functions you can write in OCaml and Haskell (both statically typed) that cannot be written in Rust because they abstract over what is captured by the closure, and Rust makes these things explicit.

                                                                                                                                                                                    The idea that all memory should be explicitly tracked and accounted for in the semantics of the language is perhaps important for a systems language, but to say that it should be true for all statically typed languages is preposterous. Languages should have the semantics that make sense for the language. Saying a priori that all languages must account for some particular feature just seems like a failure of the imagination. If it makes sense for the semantics to include explicit control over memory, then include it. If it makes sense for this not to be part of the semantics (and for a GC to be used so that the implementation of the language does not consume infinite memory), this is also a perfectly sensible decision.

                                                                                                                                                                                    1. 2

                                                                                                                                                                                      there are functions you can write in OCaml and Haskell (both statically typed) that cannot be written in Rust because they abstract over what is captured by the closure

                                                                                                                                                                                      Could you give me an example of this ?

                                                                                                                                                                                      1. 8

                                                                                                                                                                                        As far as I understand and have been told by people who understand Rust quite a bit better than me, it’s not possible to re-implement this code in Rust (if it is, I would be curious to see the implementation!)

                                                                                                                                                                                        https://gist.github.com/dbp/0c92ca0b4a235cae2f7e26abc14e29fe

                                                                                                                                                                                        Note that the polymorphic variables (a, b, c) get instantiated with different closures in different ways, depending on what the format string is, so giving a type to them is problematic because Rust is explicit about typing closures (they have to talk about lifetimes, etc).

                                                                                                                                                                                        1. 2

                                                                                                                                                                                          My God, that is some of the most opaque code I’ve ever seen. If it’s true Rust can’t express the same thing, then maybe it’s for the best.

                                                                                                                                                                                          1. 2

                                                                                                                                                                                            If you want to understand it (not sure if you do!), the approach is described in this paper: http://www.brics.dk/RS/98/12/BRICS-RS-98-12.pdf

                                                                                                                                                                                            And probably the reason why it seems so complex is because CPS (continuation-passing style) is, in general, quite hard to wrap your head around.

                                                                                                                                                                                            I do think that the restrictions present in this example will show up in simpler examples (anywhere where you are trying to quantify over different functions with sufficiently different memory usage, but the same type in a GC’d functional language), this is just a particular thing that I have on hand because I thought it would work in Rust but doesn’t seem to.

                                                                                                                                                                                            1. 2

                                                                                                                                                                                              FWIW, I spent ~10 minutes trying to convert your example to Rust. I ultimately failed, but I’m not sure if it’s an actual language limitation or not. In particular, you can write closure types in Rust with 'static bounds which will ensure that the closure’s environment never borrows anything that has a lifetime shorter than the lifetime of the program. For example, Box<FnOnce(String) + 'static> is one such type.

                                                                                                                                                                                              So what I mean to say is that I failed, but I’m not sure if it’s because I couldn’t wrap my head around your code in a few minutes or if there is some limitation of Rust that prevents it. I don’t think I buy your explanation, because you should technically be able to work around that by simply forbidding borrows in your closure’s environment. The actual thing where I got really hung up on was the automatic currying that Haskell has. In theory, that shouldn’t be a blocker because you can just introduce new closures, but I couldn’t make everything line up.

                                                                                                                                                                                              N.B. I attempted to get any Rust program working. There is probably the separate question of whether it’s a roughly equivalent program in terms of performance characteristics. It’s been a long time since I wrote Haskell in anger, so it’s hard for me to predict what kind of copying and/or heap allocations are present in the Haskell program. The Rust program I started to write did require heap allocating some of the closures.

                                                                                                                                                                                2. 5

                                                                                                                                                                                  It’s inherently bad since GC dictates the lack of destruction mechanisms that can be reliably used when no reference to the resource are left. In other words, you can’t have basic features like the C++ file streams that “close themselves” at the end of the scope, then they are destroyed.

                                                                                                                                                                                  Deterministic freeing of resources is not mutually exclusive with all forms of garbage collection. In fact, this is shown by Rust, where reference counting (Rc) does not exclude Drop. Of course, Drop may never be called when you create cycles.

                                                                                                                                                                                  (Unless you do not count reference counting as a form of garbage collection.)

                                                                                                                                                                                  1. 2

                                                                                                                                                                                    Well… I don’t count shared pointers (or RC pointers or w/e you wish to call them) as garbage collected.

                                                                                                                                                                                    If, in your vocabulary, that is garbage collection then I guess my argument would be against the “JVM style” GC where the moment of destruction can’t be determined at compile time.

                                                                                                                                                                                    1. 8

                                                                                                                                                                                      If, in your vocabulary, that is garbage collection

                                                                                                                                                                                      Reference counting is generally agreed to be a form of garbage collection.

                                                                                                                                                                                      I guess my argument would be against the “JVM style” GC where the moment of destruction can’t be determined at compile time.

                                                                                                                                                                                      In Rc or shared_ptr, the moment of the object’s destruction can also not be determined at compile time. Only the destruction of the Rc itself; put differently the reference count decrement can be determined at compile time.

                                                                                                                                                                                      I think your argument is against tracing garbage collectors. I agree that the lack of deterministic destruction is a large shortcoming of languages with tracing GCs. It effectively brings back a parallel to manual memory management through the backdoor — it requires manual resource management. You don’t have to convince me :). I once wrote a binding to Tensorflow for Go. Since Tensorflow wants memory aligned on 32-byte boundaries on amd64 and Go allocates (IIRC) on 16-byte boundaries, you have to allocate memory in C-land. However, since finalizers are not guaranteed to run, you end up managing memory objects with Close() functions. This was one of the reasons I rewrote some fairly large Tensorflow projects in Rust.

                                                                                                                                                                                      1. 2

                                                                                                                                                                                        However, since finalizers are not guaranteed to run, you end up managing memory objects with Close() functions.

                                                                                                                                                                                        Hmm. This seems a bit odd to me. As I understand it, Go code that binds to C libraries tend to use finalizers to free memory allocated by C. Despite the lack of a guarantee around finalizers, I think this has worked well enough in practice. What caused it to not work well in the Tensorflow environment?

                                                                                                                                                                                        1. 3

                                                                                                                                                                                          When doing prediction, you typically allocate large tensors relatively rapidly in succession. Since the wrapping Go objects are very small, the garbage collector kicks in relatively infrequently, while you are filling memory in C-land. There are definitely workarounds to put bounds on memory use, e.g. by using an object pool. But I realized that what I really want is just deterministic destruction ;). But that may be my C++ background.

                                                                                                                                                                                          I have rewritten all that code probably around the 1.6-1.7 time frame, so maybe things have improved. Ideally, you’d be able to hint the Go GC about the actual object sizes including C-allocated objects. Some runtimes provide support for tracking C objects. E.g. SICStus Prolog has its own malloc that counts allocations in C-land towards the SICStus heap (SICStus Prolog can raise a recoverable exception when you use up your heap).

                                                                                                                                                                                          1. 1

                                                                                                                                                                                            Interesting! Thanks for elaborating on that.

                                                                                                                                                                                      2. 3

                                                                                                                                                                                        So Python, Swift, Nim, and others all have RC memory management … according to you these are not GC languages?

                                                                                                                                                                                    2. 5

                                                                                                                                                                                      One benefit of GC is that the language can be way simpler than a language with manual memory management (either explicitly like in C/C++ or implicitly like in Rust).

                                                                                                                                                                                      This simplicity then can either be preserved, keeping the language simple, or spent on other worthwhile things that require complexity.

                                                                                                                                                                                      I agree that Go is bad, Rust is good, but let’s be honest, Rust is approaching a C++-level of complexity very rapidly as it keeps adding features with almost every release.

                                                                                                                                                                                      1. 1

                                                                                                                                                                                        you can’t have basic features like the C++ file streams that “close themselves” at the end of the scope, then they are destroyed.

                                                                                                                                                                                        That is a terrible point. The result of closing the file stream should always be checked and reported or you will have buggy code that can’t handle edge cases.

                                                                                                                                                                                        1. 0

                                                                                                                                                                                          You can turn off garbage collection in Go and manage memory manually, if you want.

                                                                                                                                                                                          It’s impractical, but possible.

                                                                                                                                                                                          1. 2

                                                                                                                                                                                            Is this actually used with any production code ? To my knowledge it was meant to be more of a feature for debugging and language developers. Rather than a true GC-less option, like the one a language like D provides.

                                                                                                                                                                                            1. 1

                                                                                                                                                                                              Here is a shocking fact: For those of us who write programs in Go, the garbage collector is actually a wanted feature.

                                                                                                                                                                                              If you work on something where having a GC is a real problem, use another language.

                                                                                                                                                                                      1. 2

                                                                                                                                                                                        In my view rebinding is the behavior of least surprise.

                                                                                                                                                                                        Also, sounds like the kind of academic hand waving that plagues language design and gets in the way of getting things done.

                                                                                                                                                                                        Never thought of trying an optional reference - that would solve that problem where I often want the safety of a reference, but hey, sometimes you want it undefined just for a little bit - but then you are just talking about a pointer no? No! I mean, maybe, … my head hurts …

                                                                                                                                                                                        (I have a design where I can pass in argument A, or argument B and depending on which one is absent I do one thing or the other. I ended up using pointers to A and B even though I would have liked to use references)

                                                                                                                                                                                        Edit: after writing this I just realized for that design I want an overloaded function … doh.

                                                                                                                                                                                        1. 4

                                                                                                                                                                                          It seems large parts of the issue are being caused by the desire of implicitly wrapping values into an “optional”.

                                                                                                                                                                                          Considering that pretty much every other language figured out that this is a bad idea, I wonder why C++ devs keep riding this dead horse.

                                                                                                                                                                                          1. 2

                                                                                                                                                                                            Because C++, for better or worse, is designed by people that don’t really care what people do in other languages. C++ isn’t other languages, it’s not really anything like any other language. The entire idea of what an ‘optional’ is in C++ is completely different from what an ‘optional’ is in every other language anyway. All optionals in most languages are in fact ‘optional references’ already.

                                                                                                                                                                                        1. 1

                                                                                                                                                                                          Can someone recommend a lightweight library that contains Option, Result (and maybe Try), without dragging in all the baggage Vavr/Javaslang does (porting half of Scala’s collections API to Java is a bad idea)?

                                                                                                                                                                                          1. 2

                                                                                                                                                                                            Flatpak is a definite no for me as long as they think it’s acceptable to dump things into $HOME. It’s 2018. No new application should do this.

                                                                                                                                                                                            1. 3

                                                                                                                                                                                              Can you elaborate on this? What do they dump in $HOME and where exactly? You can’t change it?

                                                                                                                                                                                              1. 0

                                                                                                                                                                                                Flatpak creates its own .var directory in $HOME.

                                                                                                                                                                                                1. 3

                                                                                                                                                                                                  What’s wrong with that?

                                                                                                                                                                                                  1. 0

                                                                                                                                                                                                    It’s my home directory, not the application’s.

                                                                                                                                                                                              2. 3

                                                                                                                                                                                                I have the same question as @andyc. Do you think of applications that create files, like rc-files, or folders on $HOME directory level or does this even include subfolders of the XDG base directories, e.g. XDG_CONFIG_HOME (~/.config/<application>)?

                                                                                                                                                                                                Update:

                                                                                                                                                                                                I just installed an application via flatpak and checked which folders where created/modified and it showed that flatpak does not respect the XDG directories specification, instead the application was installed into .var/app/. I assume that this is what you’re referring to?

                                                                                                                                                                                                1. 3

                                                                                                                                                                                                  Yes, I was referring to the .var directory.

                                                                                                                                                                                                  But according to the Flatpak developers Flatpak adheres to the XDG spec and .var is “nothing to see here”: https://github.com/flatpak/flatpak.github.io/issues/191

                                                                                                                                                                                                2. 2

                                                                                                                                                                                                  While I agree with you that they should have used a directory for ~/.var that adheres to the XDG spec - like ~/.local/var - they aren’t dumping configuration or any files besides that directory into $HOME. I would however like to see an explanation as to why it was necessary to use the ~/.var directory. Apparently after a discussion including XDG devs, they decided to go that route.

                                                                                                                                                                                                  1. 3

                                                                                                                                                                                                    It has been a common issue of application developers to believe that their app is special and should be exempt from the rules. I have seen it many times, but the Flatpak devs invented a whole new level of entitlement.

                                                                                                                                                                                                    1. 2

                                                                                                                                                                                                      What’s supposed to be the correct way to do this?

                                                                                                                                                                                                1. 18

                                                                                                                                                                                                  Something I’ve noticed–all these sites are now basically instantly usable. And sure, they’re not pretty, but I’m there to read things. There is a little clunkiness, but I think this trend is very promising.

                                                                                                                                                                                                  Shame they still have the massive blob of comments at the bottom.

                                                                                                                                                                                                  1. 10

                                                                                                                                                                                                    I think that efficient websites don’t have to be ugly or clunky.

                                                                                                                                                                                                    I’d love to get some feedback on my own site, which I believe is “pretty” (at least if you like its style) and loads very fast. (It requests some specific web fonts, but usability is not degraded if users block them/use their own.)

                                                                                                                                                                                                    Any bloat I missed?

                                                                                                                                                                                                    1. 11

                                                                                                                                                                                                      The combination of a thin font and the gray text cancer makes it hard to read.

                                                                                                                                                                                                      Custom fonts best be avoided if your intent is to share information.

                                                                                                                                                                                                      1. 2

                                                                                                                                                                                                        Thanks! I made the table row background brighter and made the links darker.

                                                                                                                                                                                                        Before: https://imgur.com/LCHhqby

                                                                                                                                                                                                        After: https://imgur.com/yM0kGu2

                                                                                                                                                                                                        What do you think?

                                                                                                                                                                                                        Edit: I slightly increased the background color again, it looked good on my desktop, but was almost invisible on my notebook.

                                                                                                                                                                                                        1. -4

                                                                                                                                                                                                          You people need to get your eyes checked. It’s very dark grey on very light grey. Fix your contrast or something.

                                                                                                                                                                                                          1. 16

                                                                                                                                                                                                            That was not enormously constructive and fairly antagonistic. I give you a gratuitous C-, and half a rotten trout.

                                                                                                                                                                                                            1. 3

                                                                                                                                                                                                              The font is too thin for the old (like me). I checked with my old eyes.

                                                                                                                                                                                                          2. 3

                                                                                                                                                                                                            I like that you have a natural categorization system - a table - on your front page. For many, that’s too many links or too much text. But humans are very good at scanning for information. So your design both respects the user’s abilities and provides them with a lot of information at once. Moreover, the table layout keeps the information legible. This is against the simple Apple-style minimalism.

                                                                                                                                                                                                            What I said above comes pretty much directly from Edward Tufte. I went to one of his one-day conferences, where he brought up the website of the National Weather Service. Specifically, he noted that the abundance of links at the bottom, categorized, ordered, and with headings was a great example of a design that provides maximal information. (The part about respecting the user is my point.)

                                                                                                                                                                                                            1. 2

                                                                                                                                                                                                              Thanks for letting me know this, I was never really sure if the grid was a good idea!

                                                                                                                                                                                                            2. 2

                                                                                                                                                                                                              Only complaint would be the GA blob, but ad blockers take care of that handily.

                                                                                                                                                                                                              1. 2

                                                                                                                                                                                                                Thanks, I removed that. I don’t even remember adding it.

                                                                                                                                                                                                              2. 2

                                                                                                                                                                                                                I feel similarly about my site, where an article which would be 12k in plaintext is 130k in total (or 95k over the wire because gzip), and that’s with all the features I want; automatic javascript-based code highlighting for most programming languages from highlight.js, tracking/analytics with (self-hosted) matomo, and as nice-looking CSS as I know how to make.

                                                                                                                                                                                                                All it really takes is just to render the HTML on the server (either statically or dynamically) and not through javascript on the client, and not have ads or huge tracking suites or integration with social networks, and to be careful about putting auto-playing videos or huge images on the page.

                                                                                                                                                                                                                The main page however is bigger than necessary at 1.13MB, exactly because I haven’t been careful about huge images on the page - and those images aren’t even visible. I have to fix that.

                                                                                                                                                                                                                1. 3

                                                                                                                                                                                                                  as nice-looking CSS as I know how to make

                                                                                                                                                                                                                  And then I’ll come and use Reader Mode to get rid of that crap. :)

                                                                                                                                                                                                                  I wish the Web was universally usable without styling. Like paper.

                                                                                                                                                                                                                  1. 4

                                                                                                                                                                                                                    Paper? Doesn’t that medium permanently and physically link the style with the content?

                                                                                                                                                                                                                    … I’ve seen some awful design and layout on paper …

                                                                                                                                                                                                                    1. 1

                                                                                                                                                                                                                      yes it seems as though they’ve been hit with a debilitating wave of nostalgia.

                                                                                                                                                                                                                      1. 1

                                                                                                                                                                                                                        True, it’s one argument against publishing in PDF.

                                                                                                                                                                                                                        What I had in mind is that scientific papers, fiction books and such don’t tend to have much variance (partly because the target medium is usually black and white, ink is expensive, and printers don’t enjoy making halftones anyway). So my “without styling, like paper” means looking like your usual printed document. Simple, focusing on information.

                                                                                                                                                                                                                      2. 2

                                                                                                                                                                                                                        That’s okay :) I don’t use reader mode much myself, but I’m a huge proponent of having markup that’s semantic enough to let people consume the web however fits them best.

                                                                                                                                                                                                                        1. 1

                                                                                                                                                                                                                          I wish the Web was universally usable without styling. Like paper.

                                                                                                                                                                                                                          Amen. At least most blogs are, including this one. I read it without CSS.

                                                                                                                                                                                                                        2. 1

                                                                                                                                                                                                                          Interesting content! I particularly enjoyed the article about obscure C features :-)

                                                                                                                                                                                                                      3. 3

                                                                                                                                                                                                                        I also love the trend of debloating Web sites that need to serve a smaller cause - but what do you do on a website that needs, or promotes having the community and/or its readers participate in a discussion, which requires a comment section or something alike? I find this challenging, since many if not all of the sites that tried to minify themselves (and I came across) decided to remove the comment section, such as this case, instead of finding an “alternative”

                                                                                                                                                                                                                        1. 4

                                                                                                                                                                                                                          Well, the comedy option would be to show a discussion tree and just use an email client to submit to a thread, and on recieving the email posting appropriately.

                                                                                                                                                                                                                          Just because the frontend is not bloated doesn’t mean you can’t have stuff going on in the server.

                                                                                                                                                                                                                            1. 2

                                                                                                                                                                                                                              I suspect the trend of removing comments sections comes a lot from people thinking something like “oh while I’m removing all this unnecessary shit I might as well stop bothering with the burden of moderating comments and deleting spam too”.

                                                                                                                                                                                                                              Comments aren’t inherently heavyweight, we had guestbooks back in the 90s. ;)

                                                                                                                                                                                                                              Admittedly it is the case that a lot of the obvious off the shelf choices of software for running a comments section are kinda heavy.

                                                                                                                                                                                                                            2. 1

                                                                                                                                                                                                                              I’d be pretty interested in people trying out building usable sites beyond reading. Though perhaps web apps are doomed to not be fast and reactive on account of the need to fetch the data, it would be cool to see things like GMail but actually a super fast interface.