1. 9

    No matter how many Vim Tips & Tricks articles I encounter, I always learn something new

    1. 2

      I’m not sure if Bram Moolenaar himself knows everything his own software is capable off.

    1. 11

      nice read. one of these blog posts that you hardly read these days (unagitated, reporting an experience).

      I woudn’t consider myself to be a minimalist with regards to software resource usage, but lately I started to wonder a bit about it. The reason is I noticed that my phone (Android) loses all of its sluggishness in its UI when I am in the energy saving mode below 15%. What difference a reduction in animation can make! Obviously I could manually enable that mode, but I fear it will deprioritize background tasks such as messenger apps. Nevertheless, I looked for an option to configure the animation and couldn’t find it. This got me thinking.

      Looking back, my Windows 95 PC (Pention II 266 MHz) ran a graphical user interface with just 32 GB RAM. Of course most applications on it were written in plain C and C++, with a Windows API that was taylored to optimizing performance in application code. Nevertheless it seems excessive that my 16 GB macbook swaps occasionally without me doing much fancy stuff.

      1. 4

        “Looking back, my Windows 95 PC (Pention II 266 MHz) ran a graphical user interface with just 32 GB RAM.”

        I think you meant 32MB of RAM. Otherwise, you were spending way too much on RAM and NUMA hardware for a CPU with max of 3.5GB addressable memory per Windows box.

        1. 3

          haha, indeed MB ;)

          Could have made a fortune seeling a 32 GB RAM device back then i guess

          1. 1

            You could’ve made a fortune just patenting one in the U.S.. ;)

          2. 2

            This is one reason I use alternative ROMs on my phone. The level of customization is insane, including disabling animations. I’m so spoiled by it, I can’t stand manufacturer ROMs or even vanilla AOSP.

          3. 4

            FWIW, there’s a setting in Android’s developer settings called “animation scale” that scales the duration of (some) animations. Why something like this isn’t an ordinarily available setting like Apple’s “reduced motion” mode I don’t know.

          1. 5

            Interesting read, although it leaves out several key pieces of information. Like just what is “torch”? Looks like it is this. And why not link to binwalk while you’re at it?

            But yeah, it’s a bad idea to set someone else’s LD_LIBRARY_PATH. Torch should have provided a shell script that sets it just for itself when invoked (that’s how we do it). But I never knew that about the trailing ‘:’!

            1. 1

              This is why I rather put the existing variable as a prefix, instead of suffix.

              1. 3

                Which does absolutely nothing. An empty element is treated as . regardless of whether it’s first or last or in the middle.

                1. 1

                  Is there any simple way to avoid leaving any leading or trailing :? This isn’t as simple as I’d like:

                  LD_LIBRARY_PATH=$(sh -c 'IFS=:; echo "$*"' -- $LD_LIBRARY_PATH EXTRA PATHS)

                  1. 6

                    LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}/additional/path"

                    See Single Unix Specification, 2.6.2 Shell Command Language → Word Expansions → Parameter expansion.

                    ${parameter:+word}: substitute word if parameter is set and not null, null otherwise.