1. 4

    Just recently I’ve added a CI test to check if our bundle size is bigger than 5mb.

    Oops.

    1. 4

      Moment.js is a much nicer experience in general when dealing with time and dates, and has many saner defaults and helper functions, although it’s ultimately backed by the native date object so it doesn’t paper over everything perfectly.

      I’ve found https://js-joda.github.io/js-joda/ to be a really robust library for more complex date time stuff, it is especially easier to reason about and manipulate date times with time zone offsets. It’s a port of a java library and the api reflects this and is quite clunky, but it’s also using its own immutable representation instead of the native date.

      1. 8

        I’d recommend going with date-fns instead of Moment.js, for reasons like immutability, tree-shaking and performance.

        1. 2

          I regretted going with moment.js for an angular app. It is HUGE and isn’t really easy to reduce size. I shouldn’t have to do some fancy build steps to do it.

          1. 1

            That’s fair I use it on the backend mostly less of an issue there

            1. 1

              Yeah, I wouldn’t mind that on the backend.

        1. 3

          My favorite terminal emulator. I just wish acrylic transparency gets in there, but unfortunately it’s too platform-specific :(

          1. 4

            What is acrylic transparency?

              1. 1

                Ahh right.

                unfortunately it’s too platform-specific

                Doesn’t seem like something that would only be possible on one platform. Or did you mean that it’s not a style that’s likely to be desired outside of Windows?

                1. 2

                  Well, Alacritty tries to be as platform-agnostic as possible - and adding acrylic transparency/opacity means that there needs to be specific handling for it in certain operating systems. You can enable it on Linux using a compositor, but Windows (and I’m pretty sure Mac as well) is a different story

                  https://github.com/alacritty/alacritty/pull/3537#pullrequestreview-384074016

          1. 4

            The example given is quite extreme. Overall, I think verbosity isn’t necessarily a bad thing (look at vim for example).

            Also, if you’re into comments - just give an example of the input and output of such a Regular Expression. It would do most of the job, and if the reader knows just a bit of regex, they could figure it out, either by themselves or by using tools like regexr and regex101.

            1. 1

              regex101

              +1 for regex101, their test functions and also storage for your tests, so you can embed that as comment

              1. 1

                That might be a bad idea if you want your code to last longer than Regex101. Probably okay if it’s purely supplemental to your actual comment, though.

                1. 1

                  true, but it’s just additional, with an easy way to verify & create it