Threads for alanz

  1. 4

    This is the time of the cycle I open the graph of release critical bugs, keep the tab open, and check it every few days.

    Here is the all history graph

      1. 17

        Read it right to the end. Or at least the epilogue.

        1. 18

          How dare you ask me to violate the posters creed.

          1. 4

            In case anyone’s wondering about context, it seems like, if you click on the title of a post at the top of the page, it opens a whole new page. I’m not sure when this was added but I think it’s a recent feature?

          2. 7

            Considering how the argument devolved into increasingly less specific platitudes, I assumed it would be revealed that ChatGPT wrote the lot of it. The actual epilogue surprised me.

          1. 10

            This is a build system produced by Neil Mitchell, one of the authors of Build systems a la carte, and author of Shake. It has a good pedigree, and is well thought out.

            1. 3

              With respect to linked lists, a colleague referred me to https://rust-unofficial.github.io/too-many-lists/ when I was learning, and I found it a very good introduction, covering the intricacies of the various lifetime and related issues.

              1. 1

                How does this relate to the approach in QuickCheck? From a quick scan of the article it seems similar.

                1. 2

                  Well, the way you go about using tools like QuickCheck and RMC is perhaps similar, but the way they actually work under-the-hood is actually quite different. For example, RMC uses CBMC which means it does symbolic execution of the program — that is, it doesn’t actually execute the code. Whereas QuickCheck does actually execute the code and must try a lot of inputs to find useful stuff.

                1. 1

                  The motivating example of lazy loading sounds like a thunk in haskell. Only evaluate it when needed.

                  1. 20

                    A related good idea is Architecture Decision Records to explain and justify how the architecture evolved over time.

                    1. 8

                      Getting LSP integrated pervasively in Emacs in a way that it reliably just works and performs well out of the box

                      I don’t get how this should work, when setting up LSP servers is now the issue. If you want to use rust-analyser, you have to download rust-nightly. If you want to use a Java LSP server, you have to do class-path magic. If you want to use a Python LSP server, you’ll have to let pip download every single python library again to get the right versions. If you want to compile a Haskell LSP server, you’ll need to buy some more RAM.

                      But if this would be solved, and all I have to do is run “sudo package-manager install java-lsp-server”, then it would be a considerable advancement. The best one can do, as I understand is planned for 28.1, is to get Eglot into a working and stable state, so that it’s ready for when the server implementations have matured.

                      Having a wizard showing up in new Emacs installations might be a great low-hanging fruit way of making Emacs more accessible.

                      I have discussed this on the mailing list, but haven’t ever had the time to implement this myself (yet). What Emacs needs is a wizard language, that can be used to teach Emacs itself, but also any package (just like ert is used for tests). Most proposals haven’t been too pretty though.

                      Take a look at the screenshots of these Neovim GUIs:

                      I don’t see any notable difference, tbh. What I would get is better integration into window managers (opening downloaded files in existing emacs sessions), but I have never understood what neovim actually achieves by splitting UI and backend. Sure, it’s a good design decision in principle, but considering the complexity of Emacs display engine, I’m not sure if it is worth it.

                      It is very easy to either freeze Emacs or cause it to run very slowly. Multiple times a day I have to hit C-g incessantly to bring it back from being frozen. When that fails, I am sometimes able to get it back with pkill -SIGUSR2 Emacs. At least once per week I have to pkill -9 Emacs because it turned completely unresponsive.

                      I used to have these problems, but in my experience this comes from fighting Emacs instead of cooperating with it. Using unnecessary packages, weird themes and wanting popups everywhere will simply slow stuff down. The main parallelism in Emacs is done by starting external processes, since Emacs is more of a Unix shell than Lisp machine.

                      It would be great to have more and more of these influencing and being incorporated to the Emacs Lisp standard library and made to be very performant.

                      Please not, dash and s are quite annoying and don’t always lend themselves to idiomatic Elisp (I understand they are influenced by Clojure, which has a difference heritage). seq.el and map.el are nice, but since they are based on generic functions, they are often slower.

                      It would be great to move to a forge style of contribution.

                      As long as it doesn’t require new accounts, and everybody is free to participate in the conversations, ok, but I’ve only seen this implemented by source-hut, and none of the GitHub clones that have spoiled so many people.

                      1. 6

                        Emacs is more of a Unix shell than Lisp machine

                        Strongly agree with this. It’s extremely good as a “visual shell” / UI framework. It’s not usually a good UX when you try to implement too much of your world in Elisp with dozens of packages, spinners, networking, etc. You end up in C-g hell as the author describes. Over 15 years of usage I’ve actually evolved away from the “rewrite everything in Elisp” view and towards “drive scripts from Elisp and slurp results into a buffer for processing”

                        Please not, dash and s … don’t always lend themselves to idiomatic Elisp

                        Also agree. Writing idiomatic Elisp using the built in APIs isn’t that hard, but it’s more “old skool” and can be imperative/verbose, so I guess some people don’t like it

                        On the other hand I think it’s kind of dumb to have to import a “cool” string library to install a library that does something I actually want.

                        Elisp isn’t Clojure and I’m glad for that. I think a lot of the complaints are that it isn’t Clojure/CL/etc, but its not supposed to be. It’s basically a 70s era MacLisp clone.

                        In general I think two (no three) things:

                        1. People can write whatever they want to write, it’s free software, their itch etc
                        2. I wish a lot of the people trying to make Emacs “better” (by their definition) but who are also possibly adding complexity to the code base, changing variables and APIs and default settings etc would just chill and learn more about what it is they’re trying to change before concluding “this needs feature X, let’s hack it in and now everyone has to live with it”
                        3. I know #2 is something of a straw man and not 100% fair but Emacs is where I live all day every day and somebody else’s “cool new feature” is my “unnecessary risk and complexity” (and possibly lost hours troubleshooting)
                        1. 5

                          Take a look at the screenshots of these Neovim GUIs:

                          I don’t see any notable difference, tbh. What I would get is better integration into window managers (opening downloaded files in existing emacs sessions), but I have never understood what neovim actually achieves by splitting UI and backend. Sure, it’s a good design decision in principle, but considering the complexity of Emacs display engine, I’m not sure if it is worth it.

                          The exactly same thing has been said for vim, yet neovim managed to pull if off. Just for the sake of it being a great design decision, it would be worth implementing it. The case in points are so many different forks of emacs, trying to make it run on different platforms (emacs-mac, xemacs, …).

                          1. 4

                            I don’t get how this should work, when setting up LSP servers is now the issue. If you want to use rust-analyser, you have to download rust-nightly.

                            This imo is exactly the problem which should be solved by editor’s extension. In VS Code, the user just installs the rust-analyzer extension and the binary is downloaded automatically. IIRC, coc-nvim provides a similar experience.

                            It is important that LSP support in an editor allows for each language to have a dedicated, easy discoverable plugin which deals with dirty integration bits.

                            1. 4

                              I’ve had pretty hit-or-miss luck with things actually working in VS Code when you do that. Just yesterday I tried using it for C# for the first time, responded “yes” to the prompt when it asked if I wanted to install the recommended C# extensions, and now I have some kind of dependency hell around .NET version mismatches (“Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found.”). Some of the language extensions install without problems, but I’ve come not to expect it.

                            2. 3

                              If you want to compile a Haskell LSP server, you’ll need to buy some more RAM.

                              haskell language server provides precompiled binaries that transparently download for vsode, and lsp-mode is working on reusing this ability.

                              You can also install prebuild binaries via ghcup

                              1. 3

                                That’s basically the same problem as with rustup, that I have to install software from external sources, instead of having it all done by my (system’s) package manager.

                                1. 3

                                  You can consider using Nix to declaratively create project development environments that includes build tools like LSP servers, which is exactly what I do in my open source Haskell project (run nix-shell --run "code ." and things “just work”, be it on Linux, macOS or WSL).

                              2. 2

                                I used to have these problems, but in my experience this comes from fighting Emacs instead of cooperating with it. Using unnecessary packages, weird themes and wanting popups everywhere will simply slow stuff down.

                                I don’t think it’s productive to put blame for these problems on the user. Extensibility is the main selling point of Emacs for many, people use it because they want those features. Of course it’s always possible to shot oneself in the foot. But if some of the problems are solvable on the level of platform, they should be solved there. When I pick a theme I want to pick it for its look and not think if it will slow down my editor. If an extension delays startup, becomes unresponsive or slows down every key stroke I want to be told by Emacs about what’s to blame but I also want it to be hard to achieve.

                                It shouldn’t be as easy to bring the editor to a crawl. The user doesn’t have to be an expert or to use vanilla Emacs for it to be fast. The machine I’m typing this on has 8 cores, I don’t see why crazy computations to paint parentheses in rainbow colours should slow down my typing or scrolling. I think support for asynchronous execution is one of the main reasons why Neovim succeeded.

                                1. 1

                                  Hard agree.

                                  1. 1

                                    Extensibility is the main selling point of Emacs for many, people use it because they want those features.

                                    What features? My comments are more related to UI stuff like pop-ups or constant redrawing effects – in other words non-functional aspects. They can be nice and fun, but since most of the time they are hacks, it’s nor surprising that they aren’t efficient.

                                    If an extension delays startup, becomes unresponsive or slows down every key stroke I want to be told by Emacs about what’s to blame but I also want it to be hard to achieve.

                                    The problem here is that there is no such thing as an extension. There is no means to distinguish between the core and (so-called) extension, because they are equal.

                                    It shouldn’t be as easy to bring the editor to a crawl.

                                    As an editor, yes, but again Emacs is a fully programmable environment. Evaluate

                                    (defalias 'eval #'identity)
                                    

                                    and slowly everything will start to break. Emacs’ power necessarily includes the ability to break stuff. The barrier can be lowered, but adding more (finite) computing power doesn’t solve the “issue”.

                                  2. 2

                                    If you want to use rust-analyser, you have to download rust-nightly.

                                    rust-analyzer provides pre-built binaries

                                    1. 1

                                      But if this would be solved, and all I have to do is run “sudo package-manager install java-lsp-server”, then it would be a considerable advancement.

                                      I’ve only tried clangd, which I was able to just grab via my distro’s package manager and it just worked (other than that every few hours clangd gets OOM killed…)

                                    1. 3

                                      Can you be on more than one leaderboard at the same time?

                                      1. 3

                                        Yes

                                        1. 3

                                          Yes!

                                        1. 24

                                          I have taken to using the --force-with-lease flag instead of just --force. It gives some protection that the repo you are pushing to hasn’t been changed by someone else in the meantime, and you trash that work.

                                          See e.g. http://weiqingtoh.github.io/force-with-lease/

                                          1. 7

                                            I really wish --force-with-lease was simply --force, and that this latter option was something like --force-for-reals. Saner defaults are always a good thing.

                                            1. 1

                                              Great tip! Thanks

                                              1. 1

                                                Oh this is great! Thanks

                                                1. 1

                                                  I learned about this after overwriting a coworker’s commit. Excellent flag, should really be the default for -f

                                                1. 12

                                                  i think the insanely low contrast setting that seem to be the fashion now probably contribute more to cognitive loading.

                                                  And I am a proud light-theme, decent contrast user.

                                                  1. 4

                                                    GHC has a pretty good system for this, where they use the concept of a Note which is a short link to a longer comment in the same or a different file. e.g.

                                                    tcTyClGroup :: TyClGroup GhcRn
                                                                -> TcM (TcGblEnv, [InstInfo GhcRn], [DerivInfo])
                                                    -- Typecheck one strongly-connected component of type, class, and instance decls
                                                    -- See Note [TyClGroups and dependency analysis] in GHC.Hs.Decls
                                                    tcTyClGroup (TyClGroup { group_tyclds = tyclds
                                                    ...
                                                    

                                                    And this is used to justify any particular decision that has been taken.

                                                    1. 3

                                                      I am currently experimenting with TiddlyWiki and its journal feature which has a stated goal of being self-contained and staying usable for the long term. And has many options for storage.

                                                      1. 2

                                                        What mechanism do you use to save (and sync across machines) tiddlywiki pages?

                                                        1. 2

                                                          I would be interested in this as well unless op is thinking about using a hosted tiddywiki instance.

                                                          1. 1

                                                            I have Caddy with the webdav and jwt plugins. It works great until the jwt expires, so turning off autosave is a must.

                                                            1. 1

                                                              I am still experimenting. Right now I use the node based server on my laptop, running against a data directory in a Dropbox folder. But this is more for backup than sync.

                                                              1. 1

                                                                My ideal case would be any solution that involves each save directly writing to the local file (a Chrome extension, perhaps?), so I can just sync that file in Keybase filesystem, and get automatic sync as a result.

                                                            2. 2

                                                              a lot of people complain that tiddlywiki becomes unusable once you have too many tiddlers. I’ve tried it out and it works but i’m backing out for this reason

                                                            1. 5

                                                              What is an “disinterested obsession”? Isn’t that an oxymoron?

                                                              1. 12

                                                                ‘disinterested’ does not mean ‘uninterested’. It means ‘without expectation of personal reward’.

                                                                1. 2

                                                                  Yet another word probably borrowed from French: désintéressé has exactly the same meaning.

                                                                2. 5

                                                                  I read it as “disinterested in earning money from an obsession”. But that’s just because I believe the author is writing from his position as venture capitalist, where “obsession for customer satisfaction” is something people can say with a straight face.

                                                                  1. 5

                                                                    To me it is pretty clear

                                                                    A bus ticket collector’s love is disinterested. They’re not doing it to impress us or to make themselves rich, but for its own sake.

                                                                    It is an intrinsic motivation, rather than one driven by anything at all from the outside.

                                                                    1. 2

                                                                      I see. They come from a world where “interest” is only defined in financial terms.

                                                                      1. 2

                                                                        I personally think Paul Graham is such a person. I’ve never met him though.

                                                                    2. 4

                                                                      “Disinterested” and “uninterested” are not synonyms.

                                                                      1. 3

                                                                        Synonyms & Antonyms for disinterested

                                                                        Synonyms

                                                                        apathetic, casual, complacent, incurious, indifferent, insensible, insouciant, nonchalant, perfunctory, pococurante, unconcerned, uncurious, uninterested

                                                                        https://merriam-webster.com/dictionary/disinterested

                                                                        1. 2

                                                                          I think this is more a recognition of how people use the word (incorrectly or otherwise). For many people, they’re synonymous even though they’re actually not. But this is the prescriptivist vs descriptivist divide, really.

                                                                    1. 4

                                                                      For me one of the main benefits of strongly typed functional programming (e.g. Haskell) is precisely that it reduces cognitive load.

                                                                      In pure code, the inputs and outputs are clearly defined, and you know there can be no side effects in called functions.

                                                                      For code with effects, this is made apparent, and so can be looked at more carefully.

                                                                      1. 2

                                                                        I agree. I think it’s fair to take this to the next step: which tools and languages automatically reduce load? But even in pure FP, you can end up with symbol leakage from underlying systems that you trust that do things you didn’t expect. One of the nice things about the onion architecture is that it forces you to come to terms with all of that right up-front. One of the things I don’t like about railway programming is that you can endlessly put off making business decisions because you’re not forced to think through leakage right away, at the point of consumption.

                                                                      1. 2

                                                                        In my view this is how true tech learning takes place. You are focused on solving a specific problem, so are concentrating hard on the details as you go along. And there is a dopamine reward for working it out.

                                                                        Which of course is exactly what the article says. Consider this vehement agreement.

                                                                        1. 2

                                                                          There is an update published at https://blog.mozilla.org/addons/2019/05/04/update-regarding-add-ons-in-firefox/

                                                                          The TLDR is they are using the “studies” mechanism to auto-push an update, provided you opt in to “studies” until it is done.

                                                                          1. 0

                                                                            The add-ons are working for me, so it seems to have been effective.

                                                                          1. 13

                                                                            I find the single most useful thing has been using it as a place to ask myself questions, and answer them.

                                                                            This has been a revelation for me over the past few months. I’d heard people say things like this in the past, but I never quite clicked that they actually meant “ask yourself a question” rather than “think about something”.

                                                                            If I ask myself a question, out loud if possible, and then attempt to answer it, I’m often surprised by the outcome. Half of the process is iteratively refining the question itself, the other half refining the answer.

                                                                            1. 6

                                                                              There’s probably psychological research on this but I’ve been thinking that maybe thinking itself is meant to be collaborative or competitive, at least in a lot of contexts, and that’s why language is such a big part of thought. And if dialogue is linguistically, rhetorically, communicatively a good way to explore a topic or question, then I should probably have dialogues with myself too. Like, why would an inner monologue be better than an inner dialogue?

                                                                              1. 2

                                                                                Dialogue is a very natural thing as well, have you ever argued with yourself over a purchase? How about an implementation?

                                                                                1. 2

                                                                                  I think this technique ties in to the same brain machinery as Rubber duck debugging, with similar good effects.

                                                                                  1. 1

                                                                                    As far as I’m aware, thinking evolved from language, so it being “naturally” collaborative absolutely makes sense.

                                                                                    Part of it (at least for me) is that it’s far easier to stay on topic when I’m participating in a dialog; even when that dialog is with myself.

                                                                                  2. 6

                                                                                    It also reminds me of one of my favorite papers that I re-read often (although not often enough): https://www.microsoft.com/en-us/research/uploads/prod/2016/12/State-the-Problem-Before-Describing-the-Solution.pdf

                                                                                    1. 2

                                                                                      Good callout. I thought this was one of the key insights in the article as well.

                                                                                    1. 2

                                                                                      http://git-annex.branchable.com/ is also an option, it is specifically designed to manage large data sets, distributed across varied storage repositories, include glacier, S3, WebDAV etc.

                                                                                      And you can set policies of how many copies you want of various things, what is available in your “working set” on specific machines, and so on.

                                                                                      The biggest drawback (for me) is that as it is git based, it doesn’t play nice with archiving directories that have git projects in them. Or didn’t when I last looked.

                                                                                      1. 2

                                                                                        git annex is great software, but you are right about not being able to store git in it.

                                                                                        I use a combination of git annex and borg backups currently. Am slowing designing/thinking about a tool to replace both these use cases.