Threads for frontsideair

    1. 16

      Unbelievable. I’m more convinced that Google is getting increasingly incompetent rather than being deliberately evil. There isn’t a day where I don’t spot a bug in one of their products. This makes me more skeptical about the SRE principles they spearheaded.

      1. 4

        I think the thing with SRE is that there is a process to fix problems. SRE is not a QA department and has never been. SRE is about budgeting errors and spending them to increase development speed or saving them and decreasing development speed.

        It’s also about learning from mistakes, so we will follow the postmortem process and see if we can improve our reliability next time or for the next thing.

        I’m pretty sure we’re not publishing anything publicly on an issue like this, but there will be something internal.

        1. 8

          I mean, I’m not at Google, but I’ve seen a few talks of the SRE marketing tour and it was definitely highlighted that SRE pro-actively works with product teams to avoid errors before they happen.

          An under that framing, I would expect “track certificate expiration and rotate early” on the standard checklist, particularly for a device you ship to customers, where patching is not as easy.

          1. 5

            Thank you, that’s exactly what I meant.

            It’s not like Google employees are happy to introduce bugs because they have a budget, or if they hadn’t followed the SRE principles they’d have zero bugs.

            This certificate expiry thing is just an anecdote, but the bugs I notice every day mean that tracking velocity on the same terms as correctness may be fostering a culture that lowers the overall quality. Maybe SRE isn’t even at fault here, but the velocity/correctness has been tuned a bit too far for the past few years. I can only guess.

      2. 10

        Personally I strongly prefer adding a prefix to all my commit messages. Usually it’s a small form namespace on what you are touching. This could be the library or module name.

        Example from my own projects: https://github.com/Foxboron/ssh-tpm-agent/commits/master/

        This is also commonly done in the kernel tree as well: https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/

        This allows easy filtering of relevant commits and gives you a quick overview of relevant changes you are interested inn. You could also use conventional commits, but personally I don’t like them.

        1. 5

          Yeah, I think that makes sense for large projects and monorepos.

          My feeling on prefixes and conventional commits is that people should do it if they find value in it, but they should do it thoughtfully and recognize the costs. I think for conventional commits especially, people adopt them without recognizing that it adds a burden for contributors to learn the project’s particular prefix rules, and it eats up scarce screen real estate in the commit title.

          1. 3

            I think it’s probably worth including a link to conventional commits ideas in the doc and present some arguments for and against. Personally I prefer not to use them in smaller projects, but I maintain a larger rust crate where we’ve chosen to use them and find that they’re generally useful. In particular, having a convention for when commits have breaking changes helps us automate that side of things in our changelogs.

            My reasons for preferring not to use them come pretty much from the idea that they often artificially constrain the language in ways that tend to promote bad commit summaries in ways mentioned in your doc. E.g. fix: background color bug instead of “Change background to pink to fix color contrast’.

            1. 3

              Thanks for reading!

              I originally did have a section on Conventional Commits and other style choices, but I felt like style discussion was bloating the scope of the article, so I trimmed it out.

              For fun, here’s what I had:

              1. 2

                I use conventional commits for work, but for personal projects I don’t and I never though why, it was an unintentional decision.

                I guess it’s because it’s more work, there’s no clear line between e.g. fix and refactor, it reads less natural for no apparent gain for me.

                And I hate repeating the word “fix” twice.

          2. 2

            I favor it, but the extremely-short 50-character “limit” on the first line of the commit means that sometimes it has to go. If I did something to the TimestampedCircularBuffer type I’ve already blown half of my first-line budget. If I also add metricutil: to the head of the line that would leave me with 12 characters to say what I actually did.

            1. 4

              I believe the 50-character limit is fake. It is stated in man pages for git, but neither git, nor kernel follow it! Someone should send a PR removing in from manpages.

              1. 2

                Do you know software that actually requires the 50 character limit? I also see it highlighted in vim, but ignore it if my message has to be longer to be meaningful (I’d say I stay below 80 all the time, but go above 50 quite often). So far no problems. I think also git log displays the full line.

                1. 2

                  Nothing really requires it, but it looks bad in GitHub for example if you ignore it, and my editor forces a line break unless I try hard to override it.

            2. 3

              Exposing a port from your laptop to your phone: When developing a web application, once in a while you’ll have to test on an actual device.

              Note that if your development server is on the same local network as yours, you probably don’t even need Tailscale for this. Just point your phone at whatever the IP address of your laptop or desktop is on your local network and you’ll see the site on your phone. (If you’re at work or at a coffee shop, sometimes this won’t work, and you’d want to consider Tailscale again.)

              In fact that this works so easily on LAN is part of the initial inspiration for Tailscale: Remembering the LAN

              1. 2

                I thought about mentioning this but I wasn’t sure. Some dev servers listen on 127.0.0.1 and you need to give a flag like —host to make it listen to 0.0.0.0 so it sounded a bit distracting.

                It could still be a good footnote, let me add it! Thanks!

                1. 1

                  I added the footnote!

              2. 6

                Not directly related, but I’ve found that tailscale pairs incredibly well with https://mutagen.io/ to sync a folder between computers.

                They have their own solution (https://tailscale.com/kb/1369/taildrive), but it is based on webdav, which is almost unusable on macOS. In contrast mutagen works as expected.

                1. 1

                  I wasn’t aware of Taildrive, though given its alpha state and your stability comments, it’s a good thing I didn’t mention it.

                  1. 1

                    TIL https://mutagen.io , might need to play around with it since it looks pretty cool.

                    1. 1

                      Care to elaborate about the macOS issues?

                      1. 1

                        I think it’s remote drive in general, which adds a bunch of latency when you’re trying to develop in them.

                        In contrast, mutagen works by creating a copy of the files on each ends, and then use a file-watcher to sync them

                    2. 3

                      NordVPN (I work there) also offers free meshnet service as part of its vpn client software.

                      1. 2

                        I saw no mention of WireGuard on that page. Would you be able to describe how that service works in comparison to Tailscale?

                        1. 4

                          To my knowledge, it’s quite similar, although I’m not a Tailscale user. You can associate multiple devices with your account, and all of these devices become part of your mesh network. They will have local IP addresses that can be accessed from each device, along with optional nicknames (DNS domains). Additionally, you can invite other people to connect their machines to your mesh network.

                          From implementation pov, it’s pure WireGuard for user traffic. For linux we use the official kernel module, for Windows we use official WireGuardNT and for other systems (macOS, iOS, Android) we generally use NepTUN rust userspace WireGuard implementation (formerly CloudFlare’s boringtun). When connecting peers we try to connect them directly (with various NAT traversal techniques) and if that fails we transparently run the traffic over the relay servers.

                          The logic of setting it all up, nat punching, and other control-plane like responsibilities is handled by cross platform rust library libtelio used by all the clients. In case of Linux, the client is also open source: https://github.com/NordSecurity/nordvpn-linux.

                        2. 1

                          Interesting, I’ve never heard of that before! The homepage doesn’t open here in Turkey by the way, probably a big target for censorship circumvention.

                        3. 3

                          I have used DDNS in the past. The bad news is that it’s no longer possible thanks to a cursed thing called CGNAT.

                          Wait, what? I am still using DDNS to do basically the same thing (hosting a site on a SBC from my home).

                          1. 3

                            Lucky for you, but your days may be numbered. My ISP offers paid static IP service though, but I haven’t used it.

                          2. 5

                            The bad news is that it’s no longer possible thanks to a cursed thing called CGNAT

                            No longer possible for whom? My takeaway from this post was less “tailscale is good” and more “wow, I’m sure glad my ISP didn’t screw me over like this person’s did!”

                            1. 3

                              Yeah that’s just my experience but with the IPv4 pool drying up it’s kind of inevitable? Also there’s still the question of exposing the home server to the internet. (Which may be desired if it’s hosting your blog, of course.)

                            2. 8

                              Tailscale is the one of few services that I use where a rug pull of the free tier will really screw me over

                              1. 8

                                Luckily there’s Headscale for that day! Surely there will be a disruption and self-hosting is a chore but at least all hope will not be lost.

                                1. 3

                                  How bad is the NAT traversal situation with Headscale?

                                  I’m a happy Tailscale user (also free tier, although I almost feel guilty for the sheer amount of convenience I get for free) and I’m regularly amazed by its ability to establish direct communication in seemingly hopeless scenarios (e.g., NATs on both sides, one of which is a double NAT and the other is café Wi-Fi, sometimes in different countries). I’m assuming that at least some of the hole punching logic must be on the server side?

                                    1. 2

                                      I wish I knew but I haven’t needed to try Headscale yet. That’s what concerns me the most, one day needing Headscale and finding it lacking. But comments from other users seem to speak highly of it.

                                      1. 1

                                        I’ve been using Headscale for a few years now. Not many, if any, NAT issues. However when going overseas to places/areas with dodgy networking infrastructure, sometimes I would have a NAT hiccup or connection issue.

                                        IIRC HS uses the same DERP servers as Tailscale since that list is public(?)

                                        1. 2

                                          It does by default, but you can also run your own.

                                          1. 1

                                            Correct, yeah. I haven’t experimented with doing that myself because I think the default TS servers have served me well. Haven’t had issues besides like I said, in foreign countries. Which isn’t ideal, but I’m not even sure if those issues I had are directly related to NAT – could be just related to general shaky connectivity.

                                  1. 34

                                    I used Tailscale the other day to solve a problem where I wanted to scrape a government website from inside GitHub Actions but I was being IP blocked by Cloudflare. My scraper in GitHub Actions now connects to my Tailscale network and uses my Apple TV as an exit node - works great! https://til.simonwillison.net/tailscale/tailscale-github-actions

                                    1. 2

                                      I’ve done similar to bypass geographic restrictions on streaming services when traveling abroad. The streaming services block IP addresses from certain regions and they also typically block popular VPNs, but with Tailscale I set the exit node for my Raspberry Pi at home and I was good to go. The only issue is that if you want to watch content on a TV, you need something like an Apple TV that can connect the TV to Tailscale.

                                      1. 1

                                        I read your article after I created my setup and found it similar to mine. Another cool use case!

                                      2. 4

                                        I just had a nasty bug today because I put the wrong id, and looking for a good resource for introducing branded types to my project in a lightweight way. This looks nice.

                                        1. 1

                                          Yes, I’m pretty sure these are “just” phantom types. I think maybe a distinction is that there is no value-level representation for a phantom type (i.e. erased after type checking) but brands seem to contain values in them?

                                          1. 1

                                            I’m not sure how to compare to phantom types, but in the case of branded types, you still want e.g. a string, but want to type it nominally. In other words, it can be substituted as another primitive type, but you can’t substitute a primitive to the branded type. And it’s all erased in runtime!

                                        2. 6

                                          I have a coworker who uses a similar tool, and the commit messages are always a description of what changed, never the intent behind the change. And that’s to be expected, we can’t be expect LLMs to read minds. But I’m more interested in the intent, so I see this as a net negative, even as a person who relies on copilot daily.

                                          1. 3

                                            I would really like to see a speed (and memory usage) comparison of running mlx vs just ollama out-of-the-box.

                                            1. 6

                                              Ollama is built on llama.cpp, so this should be relevant:

                                              When comparing popular quant q4_K_M on Llama.cpp to MLX-4bit, in average, MLX processes tokens 1.14x faster and generates tokens 1.12x faster. This is what most people would be using.

                                              That was before the small model performance improvement mentioned in the article.

                                            2. 1

                                              A hard constraint on the project is that the unminified, uncompressed size must be less than that of the minified & compressed version of the (excellent) preact library (currently 4.6Kb).

                                              Is there a reason for this?

                                              1. 4

                                                I think it’s a good benchmark. When I see a library that’s a competitor to React and claims to be minimal, I compare them to Preact, in terms of bundle size, and they usually fail. To me, what’s the point of losing the declarative model and still not being as small as Preact?

                                                1. 1

                                                  I think its a good benchmark for minified/compressed code. Not so good of a benchmark for assessing unminified code however.

                                                  By size, Fixi is trying to fit into the equivalent of a single fully documented function of Preact’s, in terms of line count.

                                                  1. 5

                                                    fixi is in part designed to be plausibly run without either minification or compression, both of which require a fair amount of technical sophistication. Therefore I decided to use the minified & compressed version of Preact as an admittedly arbitrary benchmark for what “small enough” is.

                                                    at this point I’m very confident that the unminified & uncompressed version of fixi will be ~25% smaller than the minified & compressed version of preact, which I’m happy with. (This is not to denigrate the achievement preact, which is a great project and has a much more complicated task.)

                                              2. 1

                                                I’m all for single source of truth and sharing code as much as possible, so it sounds like a great move! Some questions that I have:

                                                • What’s the accessibility story? You can go very far with just using HTML correctly, but headless component libraries like react-aria and radix go beyond that, fixing problems that can’t be fixed with only HTML.
                                                • Production readiness. Like one of the commenters, go-app reference crashed my tab. Is that acceptable for the business, “works best in IE 9” style, or does Safari have a bug?
                                                • Performance. 4.6 MB payload is big, but wasm is parsed while streaming so it may be better in practice. How does it compare to the system it replaced?
                                                • Code style. If I was coming from React I wouldn’t want to go back to dark ages by writing finicky selectors and raw DOM operations. Declarative is now what all web UI libraries are doing, and rightly so. I should check go-app later on my laptop, which would likely answer my questions.
                                                1. 2
                                                  • Accessibility: AFAIK there’s no technical reason it can’t be just as good, but I don’t think I know enough about a11y to identify major gaps here. (I’m aware of aria tags for example but don’t have it internalized and probably need to do an a11y audit in general. Thanks for the reminder.)
                                                  • Production readiness: hmm, well we’ve tested it across all major browsers (including Safari, desktop and mobile) and it doesn’t crash. I would guess that’s just a bug with go-app.dev. I will say that when the app crashes, it crashes hard.
                                                  • Performance: it does take a second or so to load from cache, which now that you mention it does seem a shame considering it’s cached haha. In the grand scheme of things it hasn’t really mattered (no one has mentioned it), but it’d be nice to chip away at that.
                                                  • Code style: yeah, Go-App is declarative-ish: you’re not writing HTML syntax like JSX, you’re just calling an API that’s codegen’d from the HTML spec. I like the DX, and the fact that it’s just code, but you do have to babysit parentheses, commas, brackets, etc.

                                                  Here’s v2 and v3 side by side if you want to kick the tires:

                                                2. 3

                                                  Yes please, trailing commas everywhere, every little helps.

                                                  1. 13

                                                    If I had the time I’d love to make something that teaches assembly by setting progressively harder challenges that you solve in a simulated RISC-V system. Something like what the Lichess website uses to teach Chess combined with the Little Man Computer.

                                                    You would start with only RV32I and it would make you do some loading/storing and arithmetic and loops. Gradually the CPU would gain the M(ultiply), B(itmanip), and C(ompressed) extensions and you would have to complete challenges with limited instructions or memory. Eventually a second core would be added and you’d get the A(tomics) extension, or the privileged spec would be introduced and you’d have to correctly handle interrupts and syscalls from an unprivileged program.

                                                    I think it would be a fun way to learn assembly and basic computer architecture and realistically someone could make and evaluate something like this for an undergraduate dissertation.

                                                    1. 5

                                                      Something I dream of, too. I’ve thought about how to build up in abstraction from something like a Zachtronics game, some discussion in this old blog post (and this older one).

                                                      I tried doing this in a graduate program but never really got my act together. If you do find the time I’d love to see how it goes, please reach out if you’d like to talk through the design.

                                                      (Edited a few times but) in case you haven’t seen it, there’s a neat modern take on assembly-ish programming puzzles in Human Resource Machine (and a parallel programming sequel!). The ambitious Turing Complete has you build a computer from gates and design a machine code for it.

                                                      1. 3

                                                        You might be interested in the games TIS-100, Exapunks, Shenzhen I/O, MHRD, and Comet 64.

                                                          1. 1
                                                          2. 1

                                                            Shameless plug, but if anyone’s interested in one-instruction set architectures, I made a TIS-100-like subleq programming game that is free: https://jaredkrinke.itch.io/sic-1

                                                          3. 2

                                                            Have you seen human resource machine? It might not be the specific instruction set you’re after, but many of the elements you mentioned are there.

                                                            Edit: whoops, I see a sibling poster already mentioned it. It’s a great game though.

                                                            1. 2

                                                              Not specifically about assembly but nand2tetris sounds similar that it may be inspiring at least.

                                                            2. 1

                                                              I thought this would be like https://everyuuid.com and it is, in a way, but also very informative.

                                                              1. 2

                                                                This could not be more timely! I have a similar project in mind that would instead deal with transcriptions from what are essentially stories aired from a radio show, but I’m afraid I’m even more foreign to the world of semantic search. Hopefully you can clear some things up for me:

                                                                1. If the language I’m dealing with isn’t English, am I right to assume that I will have to find an embedding model that is meant to deal with that language?
                                                                2. Is creating embeddings the only way to achieve something similar to yours, wouldn’t pointing an LLM towards a large corpus of text have the same result? (Definitely being very loose with terms when saying “point an LLM”)
                                                                3. How much does it cost to run a web app like yours (depends on the traffic, yes, but let’s assume that it’s just sitting there)?

                                                                There are probably other questions, but these came to mind immediately.

                                                                  1. 1

                                                                    I hope this will be useful to you! Let me answer your questions:

                                                                    1. Yes, the embedding model I used specifies that it’s only good for English, you need to find either a model for the language you’re targeting, or a larger multilingual one.

                                                                    2. While I’m not sure if using an LLM wholesale to create embeddings would work, since their first step is to create embeddings anyway, it would be more expensive to use an LLM anyway.

                                                                    3. My demo runs free, thanks to the generous free tiers Vercel and Supabase provide! You can check how much allowance is there on their respective pricing pages.

                                                                    Let me also answer an unasked question, I didn’t fine tune the app for performance, for example I don’t use vector indices, which may affect the cost. If it was more than a demo, I would be more careful.

                                                                  2. 8

                                                                    It’s a shame, I think this would be a win overall, however small. While I understand that old packages won’t be benefitting from this, common sense tells me that most downloaded packages are often most updated ones and that would make it significant.

                                                                    1. 2

                                                                      At the end of the day, you’ll probably have more impact by convincing the biggest players to reduce their size (like React). I’m not sure I understood what was difficult about integrating the tool into the npm cli, or why slower publishing is a problem (it’s not a common workflow compared to the time spent creating).

                                                                      1. 3

                                                                        Integrating Zopfli into the CLI would require WebAssembly, which the npm maintainers were reticent to use. And slower publishing makes a big difference for some packages—for example, when I tested it on the typescript package, it took 2.5 minutes.

                                                                        1. 4

                                                                          when I tested it on the typescript package, it took 2.5 minutes.

                                                                          https://www.npmjs.com/package/typescript?activeTab=versions

                                                                          2.5 minutes once a day is.. nothing? Especially when the savings are on the scale of terabytes of data (and that’s just the public registry). I imagine they’re waiting on CI builds for significantly longer than that.

                                                                          Integrating Zopfli into the CLI would require WebAssembly

                                                                          Why was wasm necessary over a native (via bindings) or JS implementation?

                                                                          1. 7

                                                                            2.5 minutes once a day is.. nothing? Especially when the savings are on the scale of terabytes of data (and that’s just the public registry). I imagine they’re waiting on CI builds for significantly longer than that.

                                                                            I think doing this has too many edge cases to be worth it, at least as a default. I imagine a package author on a slow machine, wondering why it takes half an hour to publish. I imagine someone wondering why there’s been a huge slowdown, and emailing npm support or complaining online. I imagine a large module where Zopfli takes a very long time to build.

                                                                            There are ways around this. You could imagine a command line flag like npm publish --super-compression, or a timeout on Zopfli with a “regular” gzip fallback. But that complexity has to work for hundreds of thousands of package authors.

                                                                            Why was wasm necessary over a native (via bindings) or JS implementation?

                                                                            That’s true, wasm isn’t the only solution. Because the compression is CPU-bound, I’d be concerned that a JS solution would be too slow. And a native solution could work, but I recall the npm CLI team trying to keep native dependencies to a minimum to improve compatibility.

                                                                            1. 1

                                                                              but I recall the npm CLI team trying to keep native dependencies to a minimum to improve compatibility.

                                                                              I’m impressed to find out the cli is entirely implemented in JS. I didn’t do any additional digging to look at the first-party package dependencies, however.

                                                                              https://github.com/npm/cli

                                                                    2. 1

                                                                      I was thinking about how embeddings are really cool, so to dip my toes I built a Next.js + pgvector project for semantically searching a list of movies. It’s very basic but a good start overall. Devenv also helped me a lot!