Threads for brouberol

  1. 3

    P.S. Please don’t talk to me about types and dataclasses, I will ridicule you to no end :-)

    What does this mean, @isagalaev?

    1. 3

      I’m a little tired of the condescending attitude expressed online here and there about type-checking being an obviously superior way of writing code. Especially in toy exercises aimed at readability. I’m not taking seriously anyone who would claim that slapping field(default_factory=dict) on the children field here constitutes any improvement.

      1. 1

        Ah that’s what you meant! I actually read the opposite into it: something in the vein of « don’t start testing me on data structures and typed languages as my knowledge is superior ». I was really confused about it, because it contrasted with using unannotated python, and also with the general tone of the article as a whole.

        My 2 cents: it’s worth rephrasing as readers might leave with a wrong impression.

        Thanks for the article, I found it very interesting!

    1. 1

      Nit: the screenshot that is supposed to showcase yarn’s output is actually showing what git commyt does.

      1. 2

        In $PREVIOUS_JOB, cdk8s hit the right spot for us. It allowed us to build useful abstractions on top of kubernetes in a programming language we were used to, catch typos and inconsistencies at build time that could have bubbled into deployment errors, via static analysis. On top of that, we were able to never have to write the common Helm {{ $.Values.path.to.value | indent 14 | trim }} atrocity, which mangles both logic and formatting.

        It has support for CRDs as well, which does not hurt.

        To each their own obviously, but it really solved the issue of managing both configuration complexity and YAML format correctness at the same time.

        1. 1

          Oh wow, cdk8s has matured nicely! I have a bunch of mind-bending Helm charts that just yesterday were the cause of a hard-to-spot issue. I might start looking into converting some of them to cdk8s.

          1. 1

            Wow, cdk8s looks really nice. At work we’re currently using Jsonnet to define our manifests but Jsonnet is ugly. I might try to push for this.

          1. 1

            An iteration on this that would be super interesting would be to have a bot report the data on the comment. One of the Ember Data maintainers did that for asset size for production builds of the library a couple years ago, and the TypeScript team has a bit to run builds generated from PRs against known outliers in the ecosystem to prevent significant regressions. In both cases, it’s incredibly handy to just have the info show up “inline” right where the other work and discussion is happening.

            1. 1

              Oh that’s a great idea! I gave it a go here and it seems to be working nicely. Thanks for the idea!

              1. 2

                🤩 cool! Also, it’s neat that it’s that easy to set up bot responses that way—I might have to do that with ideas like this myself in the future.

            1. 1

              I think I tried using the LLVM instrumentation for generating code coverage data, but I think the issue for our projects was that we have a lot of FFI and of other libraries being linked, and just getting it to build was nightmarish. We use tarpaulin - it still has some issues, various weird segfaults were happening so we had to restrict what we get coverage for, but it’s quite straight-forward overall, and works fairly well with CodeCov. Maybe I should try again with LLVM, though.

              1. 1

                Was that using https://github.com/taiki-e/cargo-llvm-cov? Someone sent me the link as a potential alternative to grcov.

              1. 2

                Mine is https://blog.balthazar-rouberol.com. I write a couple of DIY projects, technical subjects such as setting up a wireguard VPN, managing my small personal infrastructure with devops tools, and the chapters of a self-published book a friend and I are working on, introducing tools of the trade for aspiring software engineers.

                1. 5

                  For the terminal, I cannot recommend enough Alacritty. Although it’s still beta, I’ve never had any issues with it. The yaml configuration is just perfect, it supports everything I need, and has been super nice in term or rendering speed.

                  1. 1

                    Interesting! And I guess if you need to have tabs and panes in your alacritty terminal, you use something like tmux do to this ?

                    1. 1

                      Why not just have multiple terminals open?

                      1. 1

                        I guess it’s just a habit of mine. I run gnome-shell which does not have a very good window tiling story.

                        Edit: Oh and also I like the fact that splitting a terminal pane in 2 places you in the same directory. This way you can easily add more panes for the same project without having to cd to the project directory. I guess the workflow just grew on me.

                        1. 1
                          1. With screen/tmux I can have several sessions, with a very specific layout for each project, and switch to each of them easily.
                          2. The organization of windows like my panes are setup, would require a tilling window manager, which I would use only for terminals.
                          3. Having the same setup at work (macOS) and at home (nix) with a simple config file.

                          And probably many other reasons that I don’t have from the top of my head.

                          1. 1

                            I understand the appeal of tmux, even if 99% of my usage has only been to detach a terminal. I was asking because I wondering why you needed terminal-emulator tiling.

                        2. 1

                          Yes. I personally use tmux.

                          If you’re using tabs and splits from your terminal, I think taking the time to transition to tmux has some benefits, for not a lot of work.

                          1. 1

                            Yep, I have actually been playing with it server-side. I find myself using it more and more now that I’m happy with my config. Thanks for the feedback!

                      1. 2

                        So, I’m reading his section on Terminals, and he mentions running Terminator on Linux and iTerm2 on Mac, which has always been my choice. Lately I’ve been doing a lot of work on Terminator (see below) and I’ve actually gotten it to work on my mac. I’m working out the bugs up and down the stack ( one problem ended up being a bug in the quartz backend of GTK) but I’m hoping to have support for Mac integrated for the next major release.

                        I’m also a Fedora co-maintainer for Terminator and along with the debian maintainer, we’re about to release v1.92 which will finally migrate to python3, after many years of no updates.

                        1. 1

                          Oh that’s great to hear! As a long-time Terminator user (8 years I think?), thank you for the work!

                        1. 1

                          As a person who manages many corporate systems, I actually try very hard not to customize my shell environment too much. Once you commit that super handy custom shell alias or vim key binding to muscle memory, you’ll find yourself trying to use it everywhere, which leads to frustration.

                          But if I was a developer who rarely left the comfort of localhost, sure, I’d customize the crap out of everything.

                          1. 3

                            FWIW it’s relatively easy to package up basic config and ship it over when you SSH into a system, so there’s no reason you can’t bring some conveniences with you. There’s stuff like xxh. I just use this small script to send a basic bash config around.

                            1. 1

                              Oh absolutely. The whole premise of the article is that you are able to mirror your customization everywhere. As this article was mainly targetting newcomers, I was assuming one computer, or maybe 2. I could make this more explicit, and state that you don’t have to customize if we can’t or don’t want to.

                              1. 1

                                That’s only true for a part of the corporate world. You might be in charge of deploying the bash config ;)

                                Only half-joking, in my last company I sat down and created a minimal, but useful .bash_aliases that we just deployed to every machine as part of the general updates, including nice prompts and different colors per data center/staging/prod.

                                Nothing fancy, just some common stuff that even some distros have been shipping for a while, and some defaults, also a better vim color scheme.

                              1. 6
                                alias filesize='ls --size --human-readable -1'
                                

                                May I suggest du -h?

                                1. 1

                                  Thanks for the feedback. This was mainly an artefact from the first chapter, where we started with ls and then experimented with options, long and short. du -h is the “right” command for this indeed. I removed the alias. Thanks again!