1. 4

    Helpful article!

    I recently tried and liked buf which seems to have a lot of overlap with the topics mentioned here.

    https://github.com/bufbuild/buf

    (Apologies if this tooling is redundant for gRPC. I’m using Protobufs with TWIRP, but there was enough overlap with what it suggested that I wanted to mention it)

    1. 1

      This is cool! I’ve been wanting something like this for a while. I usually commit and rebase, but sometimes I find that a little too slow.

      One thing that I’ve found helpful, I use git log --oneline to get the line number of the commit I want to modify, then use HEAD~~~ where the number of tildes is equal to that line number. I usually type each ~ as I count.

      https://github.com/zachahn/dotfiles/blob/7af6d6d75f354ad5c2b75e156ffe9c9fe03a75ca/_bin/git-fu (fu stands for “fix up”! I have a separate script git fua that runs git add . and then calls this script.)

      1. 1

        So is rvm no longer fashionable? I’ve used (and contributed to) it for years and never really explored except a brief flirtation with ruby-install and chruby that didn’t go well enough to merit continuing it.

        1. 1

          Do you recall why chruby didn’t work well for you? Would be good to know as I recommend it over rbenv and rvm.

          If rvm is working well for you, stick with it, changing may not be worth the effort. After Bundler was added to Ruby, rvm lost favor (with some) as its gemset feature is no longer needed. Rbenv has always had its fans and chruby gained favor among the “smaller is better and more Unix-like” crowd. Right now, asdf seems to be gaining in popularity as it can accommodate multiple languages (Ruby, Node, etc) and that’s useful since the Rails installation got bloated with a requirement for Node as well as Ruby. That’s current fashion, as I see it :-)

          1. 1

            I’m not sure if it’s completely fair to say that chruby is simpler than rbenv. It looks like they have almost identical user-facing features, the differences between them now just look like implementation differences. (I’d believe that the implementation is simpler though! I haven’t compared myself)

            That said, I’m definitely a “rbenv fan” haha. It’s reliable and invisible; I only think about it when starting a project and when upgrading Ruby versions (rbenv handles shims automatically now). One feature of rbenv I find useful is that it supports fish shell out of the box

            1. 1

              All good points for rbenv. Handling shims automatically was a great step forward. So yes, really just implementation differences at this point.

            2. 1

              I don’t, but it might have been because I was still trying to use gemsets. I don’t remember how long ago this was but a lot of my Ruby projects are old and their env was setup during peak RVM popularity. Since then, there’s an explosion of version managers. I’ve recently moved onto a Python team and am really digging pyenv.

              1. 1

                I don’t, but it might have been because I was still trying to use gemsets. I don’t remember how long ago this was but a lot of my Ruby projects are old and their env was setup during peak RVM popularity. Since then, there’s an explosion of version managers. I’ve recently moved onto a Python team and am really digging pyenv.

            1. 3

              People expect to easily dismiss the menu. Dialog elements, unless you include javascript, don’t seem to handle clicking outside, no longer hovering, or hitting escape. That’s the only reason I rarely use details for more than buttons requiring two clicks to activate (for more dangerous functionality)

              1. 1

                Is there a solution that allows this without JS? It seems a shame to throw out something where the basics work without JS just because some extended functionality doesn’t.

                1. 1

                  Sure, you can add the rest of the functionality with JS. That’s what GitHub does.

                  1. 1

                    It doesn’t look like JS is necessary for click-outside-to-close. The slide I linked to in my comment shows an example of it. I tried it just now by turning off JS using Firefox dev tools, then closing the menu and the modal by clicking outside, and it closed! The modal was a bit funny though, the X button didn’t work, but clicking outside did.

                    That said, I didn’t look into how it works yet!

              1. 6

                I was particularly excited about the idea of modals without JS, especially after seeing this slide. Crazy!

                1. 1

                  Haha I really like this. It seems to work well on my phone too! It reminded me of a similar project that I liked to play around with, https://github.com/muan/megamoji

                  1. 2

                    Kinda interesting. I wonder what caused this. I don’t think I’ve ever considered mitigating problems like this.

                    1. 2

                      Here’s a post mortem from a problem in a similar-sounding vein (but affecting a different, equally critical system) that occurred some years earlier: https://github.blog/2016-10-28-incident-report-inadvertent-private-repository-disclosure/ When you process enough requests, some truly unfortunate circumstances can line up, repeatedly.

                      1. 1

                        Thank you for the link, never would have noticed the connection!

                        1. 1

                          Np! I was part of incident response when the 2016 one happened so it’s stayed pretty fresh in my mind.

                    1. 2

                      As a very casual Rust user, I don’t really know what these proposed changes might mean to me, but I’m excited about this nonetheless! I do have to say that really appreciate Rust’s stability and it’s improvements over the years. I was hoping to see some mention about interoperability with Result and Option when using the error handling ? operator, but on second thought, I guess features like that aren’t tied to editions!

                      1. 8

                        Right, the things that are tied to editions are things which would be breaking changes, but which don’t break interoperability (code from all editions must be able to call each other and compile/link together). Adding things to the prelude, for example, is fine in an edition.

                        As for what these things mean concretely (assuming things land as described here):

                        1. You’ll be able to implement TryFrom and TryInto without needing to use std::convert::{TryFrom, TryInto} first.
                        2. You’ll be able to call things like Vec::from_iter(some_iterator) without use std::iter::FromIterator.
                        3. Closures which previously may not have worked, or may have required cumbersome code to work around because they captured a whole struct when you only needed part of it, will be possible or simpler.
                        4. Resolving features for dependencies with Cargo will be more powerful and flexible.
                        5. A bunch more small stuff.
                      1. 1

                        I heard of this project when Hotwire was released. I like Parcel since it doesn’t require very much configuration, but I hope to try this out soon to compare it.

                        1. 3

                          Cool, OTF support! I considered using PrawnPDF to generate my resume from a YAML file a while ago. But I ended up using XeTeX since it had OTF support.

                          I don’t think I’ll revisit that decision anytime soon—I’m pretty happy with my current setup. It’s good to know though that it’s supported now.

                          1. 1

                            Just curious, are you able to create a new Rails app yet, or is there work to be done there? And does it run reasonably well?

                            1. 1

                              Yes. I was able to create a Rails app and get that up and running. I don’t know about speed as I didn’t have any complicated running on the rails app. Just a simple scaffold and such.

                            1. 3

                              I think my dotfiles are in the vault since I updated it within the 80 day window. It’s strange that something so personal—it’s a glimpse into how I work, and similarly I’m the only person who’d find it useful—will last so long.

                              It’s also kinda interesting that my dotfiles have changed since then. I’ve already outgrown the version of the dotfiles that will outlive me.

                              1. 2

                                I think my dotfiles are in the vault since I updated it within the 80 day window.

                                You can check whether you contributed to the Arctic Code Vault by visiting your GitHub profile. You should get a badge in the left sidebar under “Highlights”. In addition, if you hover it you see which repositories of yours are in the vault.

                                It’s strange that something so personal—it’s a glimpse into how I work, and similarly I’m the only person who’d find it useful—will last so long.

                                Yep, it’s really strange. I think they’re definition of active repository is kind of wide, I wonder how many “useless” repositories got in the vault.

                                1. 3

                                  if you hover it you see which repositories of yours are in the vault

                                  The format seems to be “{{three most starred repos}} and more!”. I don’t see a way to get a complete list of repos that went into the vault.

                                  I wonder how many “useless” repositories got in the vault

                                  A lot of archeological artifacts are items people have thrown away—often because they broke or worn out. I think future historians may find dotfiles more valuable than programs because it’s a glimpse into how people actually used computers in our time. If someone accidentally added their command history files, that’s even better.

                              1. 1

                                If you’re going to write in a literate sort of style with long comments, you might want to change the syntax highlighting on your blog, as the current one renders comments in grey on dark grey as though they are noise to be ignored.

                                1. 3

                                  I agree, the comments in the dark theme do look too muted. I’ll definitely look into improving that, thanks for the feedback!

                                  1. 1

                                    Done! It’s not perfect, but it’s the best I could find for now. Hope it’s a bit better!

                                1. 4

                                  I’d be interested in seeing a strongly-connected components algorithm like Tarjan’s or Kosaraju’s written up like this.

                                  1. 2

                                    Yep, would be great to see @zachahn explanations of more algorithms.

                                    This style of explanation works for me.

                                    I prefer to see at the same time:

                                    • ‘wording’
                                    • pictures (even in ascii),
                                    • notes on the negative (eg why, something reasonably obvious, would not work),
                                    • precise working implementation and the outputs at each step for a sample input (whether it is an algorithm or a mathematical construct).
                                    • test questions (with answers)

                                    Often, although these days, not that often – I would print the same material, 4-5 times, and just add the parts (of the above) that are missing in the original explanation. That, then becomes my study guide, that I would go through multiple times.

                                    In my observation, many study guides/explanations could be categorized as

                                    • Study guide for benefit of the author (eg, to understand a concept, it is always helpful to explain it)
                                    • Study guide as an additive information share (eg. targeted at folks who are familiar with the area, but not with the particular thing)
                                    • Test/interview prep
                                    • Study guide as an ‘artistic expression of education’ itself (where the educational aspect is the art, and is the main point). Those would reflects authors gifts/skills on building up educational content.

                                    For a person new (or rusty) to a given area, it is the 4th category that’s probably the easiest, and most beneficial to consume. But it is also the most difficult and time consuming to author. This example, may be, started as (1), but ended closer to (4)

                                    1. 2

                                      Thank you! I’m very glad you liked the explanation 😄

                                      Yes I have to admit that the blog post was the first category. I thought it’d be helpful to write it down so that I’d have a reference for the future.

                                      Thanks for your feedback! I’ll have to keep it in mind for the future.

                                    2. 1

                                      I’ll add that to my blog backlog!

                                    1. 1

                                      Well written - easy read.

                                      1. 1

                                        Thank you!

                                      1. 11

                                        I agree completely with the point of the article. But one thing I don’t understand: why do people have so much trouble building IKEA furniture? How am I surrounded by such incredibly smart and capable people who, when faced with furniture, can’t follow simple directions? It’s bananas.

                                        1. 6

                                          Yeah, this utterly baffles me. Perhaps it’s a self-reinforcing cycle — building IKEA furniture is said to be difficult, so people find it difficult, so people say it is difficult, so…

                                          Was it genuinely difficult at one time, but now they can’t escape this trap?

                                          1. 1

                                            I also thought it was easy my whole life and always wondered the same thing, but a few years ago, I had a really hard time assembling a TV unit.

                                            Looking back, I think the directions were clear, but after a long day at IKEA and late in the evening, all the pieces looked the almost identical. So I ended up drilling holes in the wrong place and had to rebuild it a couple times.

                                            1. 1

                                              I agree on that point, but I also find the lack of shading to be unhelpful sometimes. It’s easy to install things backwards and only notice in later steps because they weren’t explicit about the directionality of some component regarding holes or texture or whatever.

                                          2. 1

                                            It’s especially weird in that IKEA must put a lot of effort into making instructions that are as clear as possible. Granted, they are basically without text of any kind, but I’ve found that they’re generally designed to be clear and unambigous. Where there is symmetry, it’s called out.

                                            1. 1

                                              It’s definitely the case with most no-name furniture kits I’ve bought. Perhaps the Wayfair effect is more correct?

                                              IKEA is definitely a better experience. Less messing with rough edges or screwing things at odd angles. The instructions are just diagrams for easy localization, but they’re easy to understand.

                                              1. 1

                                                I think you have a will to build it quickly as you know that it should be simple. So you don’t read as carefully as you should, make a mistake and now spend hours debugging your furniture.

                                                Reminds me something…

                                              1. 3

                                                Work, Animal Crossing, and programming for fun.

                                                I’m surprised I like the game so much. Tracking the stalk market with my college friends has become one of the highlights of my week.

                                                It’s been an interestingly productive season for my side projects. So far, I rewrote my static site generator, and I finally wrote my “ctags delegator”

                                                So this week, I’ll probably test out my ctags delegator a bit. And I’ll probably start working on a new project, but I’m not quite sure what yet!

                                                1. 3

                                                  This reminds me of something one of my friends is working on! I haven’t heard any recent updates, but I really liked his demonstrations of what it could do.

                                                  https://hyfen.net/memex/

                                                  1. 1

                                                    I’m so glad I’m on this site. I’ve never heard of a “memex” but it sounds like what I’ve wanted for years. I’m gonna watch your friend’s talk later today.

                                                    1. 1

                                                      I’d be really interested in providing either feedback or code if he’s still working on this.

                                                    1. 3

                                                      Hello! I’ve been working on this project for the past few months. There are a bunch of great admin frameworks already, but I wanted to write this because the Rails admin frameworks I knew about brought in too many dependencies. I’m generally of the opinion that code is a liability, so I’m generally hesitant to bring in more code than I need. (Super has a few prebuilt, vendored dependencies, but those shouldn’t interfere with the application itself.)

                                                      The closed source, paid version isn’t quite ready (still need to figure out some licensing stuff), but I thought it would be valuable to get some early feedback for the project in general. The list of TODOs never ends!

                                                      If you want to skip straight to the demos, here’s the one for Super Professional and one for Super.

                                                      Also, I wanted to note that I took up @mperham’s offer to chat. It was super helpful, thanks Mike!

                                                      1. 1

                                                        Cool work. Can I ask why you use POST requests instead of GET requests when filtering? Using POST makes it hard (or impossible) to bookmark or or share a specific view with someone else.

                                                      1. 2

                                                        Kinda related… is there a way to get my email – on a domain I control – to be delivered to two different mail providers? I’d love to try out FastMail, but not at the cost of losing my existing mail service during the trial period.

                                                        1. 2

                                                          At a protocol level, no (redundancy of MX records is for when one server is down) — but most mail providers have some mechanism of transparently forwarding messages which should allow this kind of trial?

                                                          1. 2

                                                            but most mail providers have some mechanism of transparently forwarding messages which should allow this kind of trial?

                                                            This is exactly what I do when trialing new providers I am interested in. This way no mail is lost and I can still play around with the new provider without fear of losing anything.

                                                          2. 1

                                                            I think you can try out a mail provider on a subdomain. I don’t remember if I ever tried that myself though lol