Threads for benwaffle

  1. 1

    Been using Zed for the past month and it’s awesome. It’s a shame the author didn’t test it. The post is very informative though 👍

    1. 3

      I’d love to! Get me an invite!

      1. 2

        It sounds like an amazing project but since it is MacOS only so far and I’m on Linux only I can’t even give it a spin.

        1. 1

          DM’d on twitter

      1. 4

        I subscribe to the belief that every project should have a Makefile with tasks:

        • deps installs all dependencies as automated as they can be (it’s OK if it outputs some manual steps, but a rerun should detect those things having been done and not output the manual nudges if they’re not needed)
        • check runs all linting and static analysis without modifying anything
        • test runs all unit tests minimally and any integration tests that are low impact
        • build produces some artifact
        • all does all of the above
        • clean deletes artifacts and, if possible, restores the codebase to as close to its original state as possible
        • help outputs a list of tasks

        For my Scala and Rust projects, this yields a ~14 line Makefile that just executes sbt or cargo, respectively. For my Python and Ruby projects, there’s a lot more to it. Any sufficiently advanced system of build scripts or documentation eventually just reimplements make.

        All of this in pursuit of the idea that someone should be able to clone and verify a build representing a clean starting point for development and troubleshooting with two three commands: git clone whatever && cd whatever && make all.

        1. 4
          • deps installs all dependencies as automated as they can be
          • all does all of the above

          This is… weird. If I run git clone whatever && cd whatever && make all, and it suddenly starts running apt commands with root, I’d be seriously pissed.

          1. 4

            “Install dependencies” probably refers to installing the dependencies in user space, for example “pip install –user”. In any case, nothing should be able to run root commands via sudo without your prior consent. If this is possible, e.g., because you “misconfigured” sudo, then you have other problems. ;)

          2. 3

            I always assumed that I was alone doing so and now I am happy to discover that other people also find merit in a (small) Makefile with some standard targets like ‘all’, ‘build’, ‘test’, and ‘check’, regardless if the actual build System is something complete different (like, for example, Gradle, sbt, or Mill).

            1. 1

              isn’t it kind of redundant for Scala?

              • deps - sbt update
              • check - sbt scalafix --check
              • test - sbt test
              • build - sbt publish
              • all - sbt ';test;publish'
              • clean - sbt clean
              • help is missing, i’ll give you that

              So the main value here is consistency with your other projects?

              1. 1

                You’ve nearly fully reproduced it! The missing help task:

                ##@ Utility
                help: ## Display this help
                	@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n  make \033[36m\033[0m\n"} /^[a-zA-Z0-9_-]+:.*?##/ { printf "  \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
                

                The main value is a consistent onboarding across all projects without someone needing to know the specifics of a particular ecosystem and without having to read a long README (if it even exists).

                At my company, we have more than 5,000 people writing code. Many are working in Java or Kotlin and JavaScript while another set is working in Go. Folks in my area, data science, are working mostly in Python but a few teams are slinging Scala. Without the convenience of a Makefile on-ramp, I can get an env up and running for our Java, Kotlin, and Scala projects without thinking because of the time I’ve spent in those ecosystems (Gradle and SBT, really). I touch JavaScript and Go so rarely that I have to look up stuff on how to do the things I want to do because there’s a false assumption of familiarity in those codebases. I’ve spent a lot of time improving my team’s Python devex but I have a long way to go to be able to play in some other teams’ sandboxes. It’s a lot easier now that I’m more familiar with Python tooling but I’d happily take a make check test over the ecosystem equivalent in any ecosystem so that I as a developer can care less about remembering the tooling and focus more on delivering value by expeditiously working in that codebase with guardrails, lints, tests, and everything else the maintainers care about running without me having to care about them (perhaps except when they fail, hopefully with actionable errors!).

            1. 22

              Well, they brought MagSafe back, and the M1 chips are almost unbelievably good, so current state = good. The worst thing I can say is most all their screens are 60 Hz.

              I would recommend the cheapest M2 laptop they offer, and maybe some SD cards (some folks think the storage is small).

              1. 6

                I think all of the M1/M2 macbooks have ProMotion (120hz) displays

                1. 14

                  The 14” and 16” M1 MacBook Pros have ProMotion displays. The 13” M2 MacBook Pro and the M1/M2 MacBook Air do not.

                  1. 2

                    My M1 macbook pro does not have promotion. it’s 60hz, non HDR. still a very good panel though.

                  2. 4

                    Totally agreed on everything but the “cheapest” if only because the SSDs were changed from 2 separate chips down to 1 which makes read and write performance noticeably slower.

                    1. 2

                      If you go with SD cards be sure to check the speeds as well, since there are still very slow SD cards being sold.

                    1. 10

                      I guess if you’re asking for the most portable way, and are not tied to C, Go supports this out of the box on every platform

                      1. 7

                        Same in rust where you can use include_bytes!.

                        1. 6

                          This feels too simple. Including binary data used to be a skill.

                          1. 7

                            So was flint-knapping, blacksmithing and professional abacus use. ¯_(ツ)_/¯

                      1. 6

                        In my experience Firefox absolutely is a processor hog. I often have to kill -9 it because it can’t spare the cycles to accept my clicks to close tabs. I am tempted to set up a hook in my window manager to kill -STOP Firefox windows when they aren’t in focus.

                        1. 24

                          I’m not sure what your use of Firefox is or your hardware, but I use Firefox extensively on Linux and Mac and I never have to kill it. I generally only ever have one window, but it can have numerous tabs open

                          1. 2

                            I run Linux on my ThinkPad T61; I use multiple windows though.

                            1. 23

                              Oh well on that machine I bet kill is your close friend :)

                            1. 1

                              Ooh thankyou. I tried searching for “tab pausing” a while ago and didn’t find anything.

                              Youtube video tabs seem to eat my CPU even if I’m on the train with no internet, not looking at them and have never interacted with them. A few other common sites do the same and need javascript to display anything so I can’t force them to behave without closing them.

                              1. 1

                                thanks I’ll try it

                              2. 5

                                I think the problem with your T61 is memory starvation (it maxes out at 4GB, right)? My partner and I have switched out our old laptops for newer ones with 16GB of RAM, and web browser slowness and instability is no longer a problem.

                                1. 2

                                  In this case top shows that it’s a CPU issue. My T61 has 8GB of RAM.

                              1. 11

                                So this is not a dig at them, but what are they trying to achieve? Mozilla overall has recently issues with both user retention and funding. I’m not sure i understand why they’re pushing for an entirely new thing (which I assume cost them some money to acquire k9) rather than improving the core product situation?

                                Guesses: a) those projects so separate in funding that it’s not an issue at all, or b) they’re thinking of an enterprise client with a paid version?

                                1. 9

                                  These things are indeed separate in funding. Thunderbird is under a whole different entity than, say, Firefox

                                  1. 2

                                    Aren’t they both funded by the Mozilla Foundation? How are they separate?

                                      1. 7

                                        @caleb wrote:

                                        Aren’t they both funded by the Mozilla Foundation? How are they separate?

                                        Your link’s first sentence:

                                        As of today, the Thunderbird project will be operating from a new wholly owned subsidiary of the Mozilla Foundation […]

                                        I’m confused…

                                        1. 2

                                          Seems pretty clear by the usage of the word “subsidiary”

                                          Subsidiaries are separate, distinct legal entities for the purposes of taxation, regulation and liability. For this reason, they differ from divisions, which are businesses fully integrated within the main company, and not legally or otherwise distinct from it.[8] In other words, a subsidiary can sue and be sued separately from its parent and its obligations will not normally be the obligations of its parent.

                                          The parent and the subsidiary do not necessarily have to operate in the same locations or operate the same businesses. Not only is it possible that they could conceivably be competitors in the marketplace, but such arrangements happen frequently at the end of a hostile takeover or voluntary merger. Also, because a parent company and a subsidiary are separate entities, it is entirely possible for one of them to be involved in legal proceedings, bankruptcy, tax delinquency, indictment or under investigation while the other is not.

                                  2. 5

                                    They’re going to need to work on a lot of things, including a lot of stability improvements as well as better/more standard support for policies and autoconfig/SSO for Thunderbird to really be useful in enterprise.

                                    Frankly, Thunderbird is the only real desktop app that I know of that competes with Outlook, and it’s kind of terrible… there really is a market here, and I don’t think that working on android client is what they need

                                    1. 2

                                      Gnome Evolution works better than Thunderbird in an enterprise. For thunderbird IIUC you need a paid add-on to be able to connect to Office365 Outlook mailboxes (in the past there used to be an EWS plugin that worked with onprem Outlook, but doesn’t seem to work with O365), whereas Evolution supports OAuth out of the box.

                                      1. 4

                                        Thunderbird supports IMAP/SMTP Oauth2 out of the box, which O365 has if your org has it enabled. What it lacks (and what Evolution has in advantage) is Exchange support.

                                        If your org has IMAP/SMTP/activesync enabled then you can even do calendaring and global address completion using TbSync, which I rely heavily on for CalDAV / CardDAV support anyway (though I hear Thunderbird is looking to make these two an OOB experience as well)

                                    2. 3

                                      I can’t say for certain, but I think maybe they’re looking to provide a similar desktop experience on mobile. I use Firefox and Thunderbird for work, and it is a curious thing to note that Thunderbird did not get any kind of Android version. Firefox already released base and Focus as Android applications, so it would be cool to see a Thunderbird exist in the (F)OSS Android ecosystem.

                                      I have been a K-9 user for a number of years but I do think it’s UI could use a bit of an update. I have been using it since Android 5.0 and it has basically had the same interface since the initial Material release. This could be an exciting time for K-9 to get a new coat of paint. I will love K-9 mail even if this doesn’t pan out well.

                                      1. 5

                                        K-9 mail is almost perfect the way it currently is on Android (at least when it comes to connecting to personal mailboxes). I can’t speak about how well it’d work in an enterprise because I keep work stuff off my phone on purpose.

                                        1. 4

                                          The biggest functional shortcoming with K-9 is no support for OAuth2 logins, such as GMail and Office365. You can currently use K-9 Mail with an app-specific password in GMail, but Google will be taking that ability away soon. I also have some minor issues with notifications; my home IMAP server supports IDLE, but I still often see notifications being significantly delayed.

                                          In terms of interface, there was a Material cleanup a while ago, and the settings got less complicated and cluttered, so it’s very usable and reasonably presentable. But it does look increasingly out of date (though that’s admittedly both subjective and an endless treadmill).

                                          1. 3

                                            oauth2 was merged a few days ago https://github.com/thundernest/k-9/pull/6082

                                            1. 1

                                              Ah, yeah, I saw elsewhere that it’s the only priority for the next release.

                                    1. 1

                                      This is always a fun one for this topic: https://github.com/DataDog/dd-trace-go/blob/main/go.sum

                                      Don’t take this as a knock on datadog. They make a great product. Much respect.

                                      1. 2

                                        The value is that they bundle all the integrations into a single binary, and it’s easy for them to do because they can pull in the client lib.

                                        1. 1

                                          Indeed, and it‘a very useful. Although this isn’t the agent, but rather their tracer. So it gets pulled in to your binary, but same idea. It’s just jarring to see your go.mod blow up as a result of pulling parts of this in for the first time.

                                      1. 9

                                        I recommend adding --audio-quality best and --embed-metadata --embed-thumbnail

                                        1. 6

                                          Emacs does not need to be a VSCode clone in a TUI.

                                          What it does need is some ants in its pants—it needs a NeoEmacs fork with some energy behind it.

                                          It needs something to force a rethink of defaults and such. NeoVIM did this for VIM—even users that have stayed on the original VIM project have benefited, but for the NeoVIM fork itself being able to drop legacy cruft only beneficial to 30 year old systems has enabled all sorts of new features that were being blocked. (Case in paint, I’m writing this Lobste.rs post in a full blown NeoVIM driven text area with 100% of my terminal editor environment nestled nicely in the browser.)

                                          1. 2

                                            This is pretty exciting - https://emacs-ng.github.io/emacs-ng/

                                            1. 1

                                              How, if at all, does this compare to:

                                              https://github.com/commercial-emacs/commercial-emacs

                                              …?

                                              (Not an Emacs user, for reasons I can give elsewhere.)

                                              1. 1

                                                That does actually look promising! As a 30 year vimmer I probably won’t be using it much myself, but I will keep an eye on it. That’s the kind of project that could even improve VIM just from having the progress and diversity on the other side of the fence. I’ll take NeoVIM’s Lua over emacs-ng’s Javascript personally, but I think both are a win. The progress in a canvas and just being able to have more than one front end is cool too.

                                            1. 2

                                              Let’s hope that a: there’s a fallback, b: there’s an option to keep using passwords and c: the protocol used is something open and standard so that if I want to I can write an appropriate “authenticator” application for any platform and don’t have to rely on software blessed by microsoft, apple and google (and d: the protocol isn’t some abomination which is basically impossible to implement by a single human, and e: the implementation doesn’t have to be blessed by an authority who will just deny your application because you’re a lone developer writing something for yourself).

                                              1. 2

                                                The protocol I believe is FIDO U2F. But who knows if they add some extra to it to make it unique to their platform, like MS did with Active Directory. I hope not, but history would say I shouldn’t keep my hopes very high.

                                                I also hope they allow hardware U2F keys like Yubikey, NitroKey, etc.

                                                1. 1

                                                  It’s an extension to WebAuthn

                                                  1. 3

                                                    I’m not an expert but this article from Mozilla suggests the opposite, that WebAuthentication is an extension of FIDO. https://blog.mozilla.org/security/2019/04/04/shipping-fido-u2f-api-support-in-firefox/

                                                1. 12

                                                  This isn’t a good article. To pick one point among many

                                                  You can build an abstraction that holds both the counter and the mutex together, somewhat awkwardly:

                                                  func (pc *ProtectedCounter) read() int64 {
                                                      return pc.value
                                                  }
                                                  

                                                  And that code is correct.

                                                  It is definitely not correct — the read of pc.value needs to be guarded by the mutex, same as the write.

                                                  This is concurrency 101 stuff. And it’s totally fair to say that the subtlety here is difficult and worth solving at a language level! But if you’re going to offer a critique, I think you need to have a better understanding than what’s demonstrated here.

                                                  1. 2

                                                    Why do you need to guard the read if your value is just an int? There’s no way you could get an int in an inconsistent/broken state

                                                    1. 4

                                                      If you want your system to be sequentially consistent, then you need to ensure reads and writes are issued in the same order as if the program were run sequentially. In this case, if you don’t guard the read with a mutex, then your reads and writes could be reordered; a read may occur before a write even if it needed to occur after. For some applications this is fine (then your application does not need sequential consistency), but some form of locking must occur here to keep the operation sequentially consistent. An alternative (not a preferred one, just one) here would be to use a reader-writer lock. When the writer has this lock, readers are excluded from the critical section; multiple readers can share a lock but writers are blocked until readers release the lock.

                                                      1. 1

                                                        Because the memory model of the language requires it. No operation is safe unless explicitly documented to be safe (i.e. sync/atomic). And there is no such thing as a benign data race ;)

                                                    1. 4

                                                      Why use C89 in 2021? That’s a 32 year old standard. We have C17 now.

                                                      1. 9

                                                        Especially with C89 you have a huge variety of compilers available allowing you to run your code on nearly every architecture as well as checking your code for maximum standard compliance (some compilers are more liberal than others).

                                                        With any C standard that is >= C99 you are effectively forced using clang or gcc.

                                                        1. 4

                                                          Can you give an example of an architecture that is only supported by a C89 compiler?

                                                          1. 3

                                                            MS VisualC++ only began to add C99 support in Visual Studio 2013, and I’m not sure they support anything newer. So you’re no longer limited to C89 for Windows code these days, but there’s a long tradition of “keep your expectations very low if you want to write C and be portable to the most popular desktop OS”.

                                                            1. 3

                                                              According to this blog post they were working on C11 and C17 support last year. I don’t know how far they are with things they listed as missing.

                                                        2. 4

                                                          Later versions of the C standard are a lot less portable and a lot more complex. I use C89 when I want to write software that I know will be portable across many different machines and will work with nearly any C compiler. IMO, it doesn’t really make sense to target anything later than C11; C17 doesn’t make enough notable and useful changes to warrant using it.

                                                          1. 1

                                                            Some old code bases, especially in the embedded space, are still written for it.

                                                          1. 13

                                                            All those things in “Linux also hides some gems” are super cool because they reveal the other, uh, problem, and the reason why OS X sucked so much life out of the Linux desktop back in the 00s. And still does.

                                                            6 months are enough to see these cool things. In another 6-10 years, on the other hand:

                                                            • Tracker/search will probably be at the third or fourth incarnation. About as many apps will support its latest incarnation as today. If you multiply that by 3 or 4 it’ll be a decent number – but otherwise it’ll probably be just enough.
                                                            • Most of the extensions being mentioned won’t work anymore
                                                            • Gimp and Inkscape will be using GTK 4 and will be a little weird because everything else will be on GTK 5
                                                            • Journal will not really work anymore because one of its dependencies related to font-rendering will be effectively abandonware. Most distributions will stop packaging it.
                                                            • Nautilus will go through another major redesign. It will not be able to show icons smaller than 64x64. Finder will most certainly still be a dumpster fire but it’ll still be the same dumpster fire you remember from 2021.
                                                            1. 7

                                                              Finder will most certainly still be a dumpster fire but it’ll still be the same dumpster fire you remember from 2021.

                                                              The truth hurts. Since Mac OS X just turned 20 years old, I’ve been rereading Siracusa’s old reviews. The Finder is more reliable now, but much of its behavior is just as inscrutable as in the brushed metal days.

                                                              1. 11

                                                                The original Finder was an odd beast for two reasons:

                                                                First, it was a Carbon application. Back when OS X launched, Apple wasn’t sure if they could get developers to adopt Objective-C and so they had three developer environments. Carbon was a pure-C update of the classic MacOS Toolbox, layered on top of CoreFoundation (C APIs giving similar functionality to the NeXT Foundation Kit), Cocoa (a slightly updated OpenStep) and ‘Mocha’ (officially called something no one remembers), which bridged Java with Cocoa, allowing developers to write native Mac apps in Java. The Mocha stack was really impressive at the time. It used much less memory than other JVMs (it was the first to share standard library class data across instances) and it bridged things like Java arrays and strings transparently with their Cocoa counterparts. NeXT had largely given up getting developers to use Objective-C and had rewritten their flagship WebObjects product family in Java, so Apple thought that it was probably the future.

                                                                Second, it was really two applications. There was a big internal fight going on between the Apple and NeXT folks, who both had good and self-consistent UI models that didn’t compose well. It tried to implement both the Classic MacOS spatial Finder and the NeXT File Browser UIs in the same application. It was aggressively modal as a result: you could switch between the two modes by either pressing a button or (sometimes) navigating to a different directory.

                                                                Eventually they gave up on the spatial model. It worked really well in the old Apple System days, when people typically had a few dozen files and spatial memory helped find them. It doesn’t scale at all to thousands of files because people’s spatial memory doesn’t scale that well.

                                                              2. 7

                                                                Gimp and Inkscape will be using GTK 4 and will be a little weird because everything else will be on GTK 5

                                                                When I started with Linux/BSD around 2000, everything used their own toolkit. Had 10 applications? Chances are you had at least 4 different toolkits, 4 different looks, 4 different file dialogs.

                                                                Things have improved a lot since then especially if you’re using one of the desktop environments that come with a suite of applications (although KDE offered a lot of this in 3.x as well; I never understood why GNOME ended up getting the bigger mindshare, as KDE always seemed miles ahead to me).

                                                                1. 2

                                                                  Eh, things have improved in the last 20 years as in there are now only two toolkits. However, the level of integration that was possible 10-15 years ago, via things like Qt’s gtk2-style or QtCurve, is long out of reach by now. Things look less weird only insofar as KDE is shipping a Breeze theme for GTK3, with various quirks because GTK3’s CSS is a little quirky – but you still get two different file dialogs, two always slightly (at best, if you’re using Breeze) different looks, two vastly different interaction models (e.g. the infamous “single click browse totally not a bug” in GTK3 from a while back, different scrollbar behaviour etc.).

                                                                  If you stick to a single desktop environment that’s not a problem, but you could stick to a single desktop environment back in 2003, too :-).

                                                                  1. 1

                                                                    If you stick to a single desktop environment that’s not a problem, but you could stick to a single desktop environment back in 2003, too :-).

                                                                    From what I remember it was a lot less smooth though; the desktop environments now are a lot more integrated and complete than they were in the Gnome 1.x and early Gnome 2.x days.

                                                                    you still get two different file dialogs, two always slightly (at best, if you’re using Breeze) different looks, two vastly different interaction models (e.g. the infamous “single click browse totally not a bug” in GTK3 from a while back, different scrollbar behaviour etc.).

                                                                    Two is better than four? 🙃 But there is clearly still some work ahead; arguably things like file selectors shouldn’t even be a part of the toolkit but just an independent process, which would also solve things like this.

                                                                2. 4

                                                                  I think this is because we have no language that people like for doing GUI development. We see a lot of web based applications for this reason. There are some hopes that rust will have good GUI eventually and maybe that will fix some things. You are right though, we are still working on the foundations. If you live in a terminal (which many linux users gravitate towards) then you feel this much less.

                                                                  1. 7

                                                                    we have no language that people like for doing GUI development

                                                                    This is pretty much it.

                                                                    I’d love to write/hack/contribute to GUI applications on Linux, but I have pretty much the choice between the 1970ies’ garbage language (C), the 1980ies’ tire fire (C++) or various “bindings” that are usually incomplete, completely undocumented, and even more complicated to use than going with C directly.

                                                                    that rust will have good GUI

                                                                    Not sure Rust is a good language for this: there is a lot of complexity that one simply doesn’t care about when writing GUI applications.

                                                                    1. 2

                                                                      GTK’s bindings are fairly complete because they are autogenerated.

                                                                      Python - https://pygobject.readthedocs.io/en/latest/

                                                                      Vala - https://valadoc.org/

                                                                      JS - https://gjs-docs.gnome.org/

                                                                      1. 1

                                                                        None of these languages are a large enough improvement over C/C++, considering that none of bindings allow you to not know the underlying C/C++ artifacts anyway.

                                                                    2. 6

                                                                      JavaScript being so trendy is certainly responsible for the current crop of “native” (i.e. Electron) apps but the rest of the situation is entirely of our own (i.e. the open source community’s doing). If you compile a 15 year-old Win32 application that is effectively “finished”, you get that app running against today’s Win32 API, with 30 years of bugfixes and up-to-date support. If you compile XMMS from 15 years ago, or the old KDE 3 applications, you’ll get applications running against GTK 1.x or Qt 3.x.

                                                                      Basically, the “modern” Linux desktop isn’t a 30 year-old environment, it’s just the latest, third or so, in a series of 10 year-old environment. It’s pretty much where the Windows desktop was back in 2003 or so – way better than back in 2014, for example, but pretty much where it was back in 2010.

                                                                      1. 1

                                                                        I have been shilling guix and nixos elsewhere in this thread so I’ll continue hammering this: that’s exactly a problem that reproducible builds solve.

                                                                        1. 4

                                                                          The big problem isn’t that it’s hard to compile XMMS because it’s hard to compile GTK 1 anymore – which is what NixOS & co helps you with – the problem is that it’s a bad idea. If you’re compiling a 20 year-old Win32 application today, you’ll be linking it against libraries that are still supported and have 30 years of bugfixes. If you’re compiling a 20 year-old GTK app, you’ll be linking it against a library that has been abandoned for 15 years, has shaky UTF support. Specifically for XMMS you probably won’t be able to get it make a hiss, either, because none of the sound servers it supports still work (maybe the ALSA plugin would still work, not sure). NixOS & co. certainly make it easy to compile and deploy long-abandoned code, but once you’ve done that, it’s not like you can do much with it anymore.

                                                                          The fact that Win32 is backwards-compatible to such an embarrassing degree doesn’t just mean it’s annoying to write against, it also means that 30 years’ worth of applications still get 30 years’ worth of bugfixes and improvements. GTK, and KDE Frameworks being what they are, means you get a few years’ worth of applications, with a few years’ worth of improvements and bugfixes.

                                                                          1. 1

                                                                            Note that GNUstep can still compile most applications that were written for mid ‘90s OpenStep, as well as more recent Cocoa applications (though, at this point, it’s a decade behind Cocoa in a lot of places). There are a bunch of other open source projects that have similar or better backwards compatibility guarantees. In the open source world, I’d settle for source compatibility (not needing binary compatibility) but that’s rare among the big buzzwordy projects. I suspect that this is because a lot of the commercial funding for these comes from entities that want to keep you on an upgrade treadmill because their business involves selling support and certifications.

                                                                  1. 32

                                                                    I have no experience with Scala, but my overwhelming sense of the language and the community is that the whole thing is a mess. So I didn’t consider it, and still wouldn’t.

                                                                    Ouch. Regardless of whether it is true, outsiders getting such an impression is not good for any language/library/community.

                                                                    1. 24

                                                                      It’s the impression I get, too. I used to be super-excited about it, but then Kotlin got a lite version of most of the things I was excited about, and (AFAIK) they’ve been working on the “actual proper version” of Scala for about 5 years now, with no end in sight. And last time I looked into it even Rust developers were making fun of the compile times.

                                                                      1. 14

                                                                        Can second, third?, this. Never used scala. Know very little about it. I have the impression its terrible based upon my limited readings on the internet.

                                                                        scala has a serious image problem.

                                                                        1. 10

                                                                          At a previous job, I used Scala as one of my primary development languages, mostly maintaining an existing scala codebase. My general impression of Scala was that it was an okay-enough language if you stuck to writing functional-style code in it. The fact that it simultaneously supported object-oriented workflows, as well as interoperability with existing Java code made the language big and complex (although the ability to use the existing Java library ecosystem is of course quite useful).

                                                                          I liked that it made pervasive use of Option types in lieu of nulls everywhere (although the language still supported null, for Java interoperability I assume) - but for whatever reason, it really wanted to use Java-style exceptions instead of saner Result types. Its monadic for construct (pretty similar to Haskell do-expressions) was a genuinely neat idea. Implicit parameters are a terrible idea and I wasted many hours debugging confusing compilation errors around them. And a lot of the tooling (sbt and various plugins) was slow and/or buggy, in my experience. Note that I was using Scala before the 3.0 upgrade, which I understand has made some significant improvements.

                                                                          All in all, I didn’t hate Scala, but neither was I particularly enthused by it. I would absolutely prefer to write code in Rust than Scala unless I really needed to run code on the JVM for some reason - and even then, I would spend some time looking into Kotlin first, since that language seems to have a better reputation.

                                                                          1. 3

                                                                            I use scala at work, it’s great. Compile times are a bit long though.

                                                                            1. 2

                                                                              Seconded. I enjoy the experience of writing code in Scala. Compile times can be annoying sometimes.

                                                                            2. 1

                                                                              Can you go into the specifics?

                                                                              1. 1

                                                                                About what exactly? Like I said I don’t really know much scala. I’ve just heard it’s a “terrible” language.

                                                                                I’m not passing judgement. I’ve never used it. Just the feeling you get based on what you see on the internet.

                                                                            3. 7

                                                                              That was a gratuitous dismissal that really have no place when it comes to make engineering decisions. The author didn’t disclose how much they looked into it or why/how it is a mess. It’s a versatile language with very sweet compact syntax and above average documentation. Well, at least it was when I used it almost a decade ago.

                                                                              I do however a few concerns about it, perhaps it is this kind of thing the article refers to:

                                                                              • Too much syntax sugar, too many ways of doing the same thing. This has proven to be counter productive (cough cough perl) for language productivity and ultimately adds little value. The same simple problem solved by different developers can look almost like two different languages.
                                                                              • Many years ago, I picked scala for a web crawling project because it had a support for concurrency using actors built right in the standard api. This allowed for tremendous flexibility and control of concurrency threads and resources. But the thing crashed unexplainably after half an hour or so. I couldn’t figure out why, looked everywhere, posted the problem in the most prominent community communication channels but never got any help. I eventually had to rewrite the crawler using python and eventlet. A couple of years after, the problem was mentioned as a fixed bug on the release notes of a version of the language. This was a huge disappointment. The core api had unusable concurrency primitives and no one knew about it. A couple of more years passed and the actors support was dropped in favor of a third party library (akka). I take it it was poorly written and full of bugs. for a language with so much emphasis on its theoretical and academic foundations, this is very embarrassing and discrediting. No offence for the good people behind it.
                                                                              • It was positioned to offer a great deal of advantages over java, but in my opinion didn’t achieve critical mass and, with google announcing first class support for kotlin in android, I believe the window of opportunity is closed and all we will see from now on is a language decreasing in popularity and momentum.
                                                                              1. 5

                                                                                above average documentation

                                                                                I’d call Scala’s documentation many things, but above average is certainly not one of them. The lack of interest in trying to improve Scala’s documentation was the breaking point that made me leave.

                                                                                all we will see from now on is a language decreasing in popularity and momentum

                                                                                Yes, that’s my take too. If there is one thing consistent about Scala, it is that the people in charge simply can’t be bothered to deal with the problems people actually have instead of working on issues they would like people to have.

                                                                              2. 5

                                                                                It’s a great language to have learned, Martin Odersky is a master programming language implementer. Scala totally changed the way I think about programming, what the fundamental units of the language and runtime look like, and made something like Rust a lot easier to understand as well. Although F# is basically the same category of language. I’d definitely read a book on one or the other on top of any ML experience, this class of staticly typed FP/OO language has come a long way.

                                                                                1. 4

                                                                                  It’s amazing that so many people identify with this impression.

                                                                                  Like the rest, that’s the impression I got. I was a young functional programmer wanting to see what functional coolness was next, so I went to a presentation at conference where the code was to be in Scala.

                                                                                  Oh my god. It was painful to look at. There was a ton of IDE and code “noise” everywhere, and the presenter had a bit of a problem explaining why his solution looked the way it did in Scala.

                                                                                  That was enough for me, so I put that in my “no go” list. I don’t wish to trash anybody or their language, but what’s weird for me is that I haven’t met any coders yet exposed to it that didn’t have a somewhat similar opinion. It looked like Java and the compiler had a three-way with a Klingon, and this was the child.

                                                                                  It continues to impress me how much of coding is the experience and not the guts. In this way, it’s much like eating at a fine restaurant. You’re not excited about the food, you’re excited about the game, the experience, the stories, etc.

                                                                                  ADD: Just for the record, the point here isn’t that Scala sucks. It’s that people make these first impressions about various tools based on all kinds of things that might be silly. And then they never give them a second chance. The point is that the “furniture” and experience of a programming project and demo for some reason mean more than what’s actually going on. I have no idea what that guy was talking about, but I remember my impression of the tool quite vividly.

                                                                                  1. 4

                                                                                    As someone that used Scala (and Spark) for a school project, I wasn’t terribly impressed either. Granted, I don’t think I’ll ever choose JVM languages without prevailing factors being in play (such as needing to target Android), and Scala wasn’t bad, but my experience with it didn’t make me want to use it more.

                                                                                1. 1

                                                                                  I’ve been using dfc

                                                                                  1. 6

                                                                                    My experience mirrors the author. It’s great for things like programming. You can’t be too distracted by the Internet or tempted by games because this machine lacks the resources for many of those things, at least while running other things as well. Netflix doesn’t run because there is no Widevine plugin for ARM64 (yet).

                                                                                    It is fast enough to do one thing at a time. I’ve been writing Rust and Go code on it, using emacs & lsp-mode (so continuous recompiling in the background), and running a browser for docs and youtube playback in the background. This works fine, but is probably at the limit of what this laptop can handle.

                                                                                    1. 4

                                                                                      Have you tried a lighter browser like netsurf for documentation? And is there any difference when you use mpv+youtube-dl instead of the official site?

                                                                                      1. 1

                                                                                        I haven’t tried either. It works just well enough as is not to bother.

                                                                                      1. 1

                                                                                        Does it only differ from regular ssh git repos in that the server doesn’t need openssh installed?

                                                                                        1. 8

                                                                                          The setup for most traditional setups is pretty complicated because it involves sharing an openssh instance, creating a git user to allow the user to log in, as well as a method of automatically generating (or hooking into) the authorized_keys file. The actual permission checking is traditionally done with a separate shell program. This is a lot of small pieces and if any one of them does something wrong, it’s easy for a user to get access to your server. There was a bug with bash a few years back where if a user could ssh in to your server, they could get a shell - stuff like this makes piggy backing off openssh really scarry. I think it makes more sense to keep users separate from local unix accounts.

                                                                                          Also, because the ssh server and git server are coupled together, you can start doing interesting things - allow users to log in with their actual username, build custom commands to list repos the user has access to, maybe even enable 2fa.

                                                                                        1. 3
                                                                                          • I use Arch Linux both at home and at work, although I’ve been tempted to switch to something slightly more stable and without rolling releases.
                                                                                          • I use i3 for my window manager, since it has effectively ruined me for other WMs. Keyboard is king.
                                                                                          • My editor is Vim, in the terminal.
                                                                                          • My terminal is Alacritty.
                                                                                          • My shell is fish
                                                                                          • My browser is Firefox with the “vimium” vim keybind extension
                                                                                          • Geary for email, but I’m looking to switch (suggestions welcome)
                                                                                          • In the terminal, I use tmux and use it to handle terminal sessions. tmux attach is very helpful for when I want to SSH in to my work machine from home and do work there.
                                                                                          • Weechat for exactly one IRC server and channel (@dsh, you here?)
                                                                                          • find and ripgrep in the terminal for finding stuff
                                                                                          • Nextcloud for cloud storage
                                                                                          • tokei to count lines of code (very, very fast compared to cloc)
                                                                                          1. 3

                                                                                            take a look at https://github.com/sharkdp/fd instead of find. it’s nicer (like ripgrep), with gitignore support, colors by default, etc…

                                                                                            1. 1

                                                                                              I’m quite content with Fastmail’s web interface. I don’t like to have my email client always open anyway, because it can break new out of flow. What’s making you want to switch from Geary btw?

                                                                                              1. 1

                                                                                                Geary’s interface feels like it doesn’t update consistently. For example, I’ll see that I have 2 unread messages, but the actual view of my inbox won’t show that unless I manually switch from one mailbox folder to another (e.g. inbox -> drafts -> inbox). Doing some cursory searches shows that this may have been fixed earlier this year so I’ll have to see if I can get an update for my distro.

                                                                                                Additionally, I really wish Geary had a “read all” button. It was suggested about a year ago, but it’s still an open issue. Maybe it’s time for me to learn Vala and make that contribution.

                                                                                            1. 5

                                                                                              Gmail and Protonmail

                                                                                              Don’t like either of them - but at the same time I don’t like email period.

                                                                                              Are there any decent solutions that let me… Host a mail server to collect everything and let me access my mail using either a self hosted webserver or a mail client? I’d like to be able to view mail on my phone for example and a web client seems like the only sane solution for that.

                                                                                              1. 2

                                                                                                Any mobile email client should support IMAP servers

                                                                                              1. 20
                                                                                                1. 4

                                                                                                  how often do you receive email that is HTML-only and what do you do when that happens?

                                                                                                  1. 8

                                                                                                    I pass it to w3m using a mailcap entry. It makes most HTML mails readable. For the ones that still don’t display correctly, I ignore them and ocassionally send a response back to the sender asking them to stop sending unreadable mails.

                                                                                                    1. 7

                                                                                                      I also use mutt exclusively.

                                                                                                      Typically, HTML-only emails aren’t actually emails I want to receive. If, for some reason, I do need to view the email in rendered HTML, you can have the HTML attachment rendered in your browser. But most of the time it’s good enough to just pass it through to w3m and render the content in mutt.

                                                                                                      1. 1

                                                                                                        Are you able to sync address books from IMAP servers?

                                                                                                        1. 3

                                                                                                          I use lbdbq from lbdb with Mutt’s query_command and then configure whichever backed I need, i.e. abook, finger, LDAP, etc.

                                                                                                          1. 1

                                                                                                            Mutt can use an external command/program to query for contacts. As long as you can get them out of whatever external system, mutt can use them.

                                                                                                            For example, here’s how you can set it up so that mutt reads from your contact book on OS X: http://stevelosh.com/blog/2012/10/the-homely-mutt/#contacts (I don’t use this particular setup, but it’s well explained).

                                                                                                            1. 2

                                                                                                              When I use any other email client such as Thunderbird with my institution, once I configure the IMAP and server, the client is able to automatically fetch the relevant addresses (from some LDAP server I guess) for my institution. Thus, it is able to autocomplete the addresses even if I had never emailed a person before so long as they are an employee of that institution. However, I am unable to figure out where exactly Thunderbird (or apple mail) is getting this information from. I do not see any LDAP configuration in its settings.

                                                                                                              So my question then is, how do I figure out which LDAP is associated with a particular IMAP, and is there any way to retrieve this information from other email clients?

                                                                                                              1. 1

                                                                                                                That is something I’m unaware of. I’ve always configured my contact syncing (from whatever source) separately from my IMAP configuration.

                                                                                                        2. 4

                                                                                                          HTML-only is usually SPAM, but I have a server-side html2markdown filter to add a text part in these cases, which works out maybe half the time. In (very rare) cases when I need to read an HTML-only email where the filter didn’t produce something useful, I hit the button in mutt to open in firefox

                                                                                                          1. 2

                                                                                                            isn’t opening it in Firefox is worse than opening in a HTML-mail reader (like Thunderbird)? Firefox will run scripts, load remote images etc. Thunderbird disallows scripts and only loads remote resources through opt-in.

                                                                                                            1. 2

                                                                                                              What’s your threat model here? Do you think this hacker-ish setup is common enough to become a target? I think if a person is savvy enough to setup their email client this way, then they’re also savvy enough to quickly spot 99.9%+ of fraudulent emails.

                                                                                                              1. 2

                                                                                                                Mostly concerned about read tracking really. So this isn’t for targeted attacks but re-enabling the common threats

                                                                                                              2. 1

                                                                                                                On spam and newsletters? Yes. But those go in the trash long before getting opened :)

                                                                                                            2. 2

                                                                                                              I use mutt exclusively, but I do care about being able to read HTML.

                                                                                                              When I get an email that doesn’t render in mutt, I hit H and it renders the email in Google Chrome.

                                                                                                              I synchronise my email server (Fastmail) with mbsync, so I always have my stuff even if I’m offline. I use notmuch for searching.

                                                                                                              1. 1

                                                                                                                Non-sarcastic counter-question: Are people who read HTML email not worried about the privacy implications?

                                                                                                                1. 5

                                                                                                                  I was under the impression that Thunderbird’s “don’t display images” feature is good enough to avoid this - please enlighten me if it isn’t.

                                                                                                                  I get by with seeing only the HTML body sans external media 90%. For some rare providers I do allow to load stuff, but usually I can “click to open website” and yes of course, they can then track that I read that mail - but I signed up for that newsletter and I am actively looking, so I guess that’s fair then.

                                                                                                                  1. 3

                                                                                                                    I, for one, am.

                                                                                                                    Honest question: do mutt or other non-HTML email systems handle typographical things you’d want from HTML? For me, the minimum would be underlining, italics, mono-spaced and proportional fonts. I’ve not yet discovered what to search in the manual.

                                                                                                                    1. 3

                                                                                                                      mutt itself doesn’t handle he html stuff at all: it just pipes the html to some other program which pipes back text to display. So you can do that if you want by piping it through a converter program and using a terminal that supports it, though personally I like not having any of those things. I like to be able to just read it.

                                                                                                                      1. 1

                                                                                                                        Honest question: do mutt or other non-HTML email systems handle typographical things you’d want from HTML?

                                                                                                                        I generally don’t want those in my emails either. I prefer plain text.

                                                                                                                        1. 3

                                                                                                                          You may prefer that, but my desire for more is well-founded.

                                                                                                                          The vast majority of systems for conveying textual information other than the limited world of terminals has supported the things I’m asking for, because they are useful. My personal most frequent use is monospace for referencing classes or code examples.

                                                                                                                        2. 1

                                                                                                                          mutt is a command line program, so whatever your command line can display is what you get in mutt.

                                                                                                                        3. 3

                                                                                                                          I use Fastmail’s web interface and the built-in Mail app on macOS and on iOS, and all of these have options to prevent images from being loaded unless and until you click a button to show them. My point being, defense against tracking pixels is a widespread feature at this point.

                                                                                                                          1. 2

                                                                                                                            Any modern email client doesn’t load remote resources (images) by default, there’s a “show images” button.

                                                                                                                            1. 2

                                                                                                                              I have disabled auto-loading external images in gmail

                                                                                                                          2. 3

                                                                                                                            How do you manage the address books? That is, are you able to hook into Gmail and other IMAP address books? (LDAP). This is the largest pain point for me

                                                                                                                            1. 2

                                                                                                                              I have a script that adds every email address I send email to to my mutt aliases file for easy tab completion

                                                                                                                              1. 2

                                                                                                                                I’m using vim-notmuch-address where CTRL+X CTRL+U completes email addresses (also works by name).