Threads for zaynetro

    1. 4

      It is nice to see main browsers reaching 99/100 interop grades. Unfortunately, Google Meet disables most of its features in Safari.

      Should Interop project also include compatibility with Google services? /irony

      1. 4

        Unfortunately, Google Meet disables most of its features in Safari.

        Try Microsoft Teams instead. It only disables audio and video for Linux Firefox, which are not that important.

      2. 3

        Could be an interesting story, but this version of it is paywalled.

        1. 1

          That’s really my mistake, I didn’t even notice (I use “Bypass Paywalls Clean” extension). Can a moderator change the link to https://www.washingtonpost.com/technology/2025/02/07/apple-encryption-backdoor-uk/ which is the primary source anyway?

          1. 2

            Found my new favorite UUIDv4; 2,645,248,903,793,120,745,936,665,251,644,898,482 aka 00000000-0000-4000-8000-000000000000

            1. 2

              This one is pretty cool as well:

              01234567-1234-4567-8910-012345678910
              

              #4,076,311,213,693,541,599,577,947,114,082,202,425

              1. 6

                My best sentence so far: deadbeef-face-4fed-abad-cafeaddeddad (#3003558009800267091891832516774608388 ). “Dead beef face fed a bad cafe”, added Dad.

            2. 2

              Nice demo, but to learn something I’d need more explanations.

              Butnthen I have always been too stupid to get the nix language. I also hate that everything I install sees a different “system” (== set of dependencies). That is so hard to reason about the entirety.

              1. 3

                Nix is just if OCaml were a config language. 😛 If it isn’t the language side but the Flakes that are causing you issue I wrote a post similar last year that goes in the other direction, talking about devShells last & derivations first. It isn’t better or worse than the OP’s article but different approaches seem to resonate differently with different audiences.

                1. 1

                  Fair enough! I think the main goal of my post (and the original) is to show what’s possible and some of the benefits. Learning Nix (the language) well enough to get a grasp on things is better captured elsewhere.

                  The different “system” is definitely tricky when using Flakes, but there are some great tools that make it so that you don’t have to care much or at all and it sort of gets hidden away. One such example is Flake Parts: https://flake.parts

                  1. 2

                    Learning Nix (the language) well enough to get a grasp on things is better captured elsewhere.

                    I have seen that statement in several places, but nobody ever pointed to a good “elsewhere” to learn the Nix language at :-)

                    1. 2

                      I have a hands-on guide to Nix language on my website: https://zaynetro.com/explainix

                      Let me know if you learn something new by using it!

                      1. 1

                        Thanks. I tried lerning nix a couple of years ago and have forgotten pretty much everything, so your page is way too advanced for my current state of knowledge.

                      2. 1

                        I found https://nixos.org/guides/nix-pills/ very good. Otherwise, using nix repl and searching for specific issues you’re having will uncover more. I feel relatively proficient with it, now!

                  2. 3

                    I did try switching to eglot but I just failed to configure it for a monorepo I am working on. We use npm workspaces and eglot just didn’t want to work with them. I did try several solutions online including configuring project.el to no avail. For one project eglot did work well though. Emacs felt way smoother with it.

                    It is worth mentioning that I am Emacs configuration noob so if changes don’t work I just fallback to Doom’s defaults.

                    1. 1

                      Honestly, life is easier that way. Doom’s defaults are great.

                      1. 1

                        Monorepos have their disadvantages. This is a good chance to split them.

                        1. 7

                          That will be a good way to convince your boss: “Hey, I know we have a monorepo, but I’ve been trying to switch from lsp-mode to eglot, and eglot doesn’t work well on monorepos, so maybe can we change the architecture?”

                          1. 2
                          2. 1

                            Thanks but I actually prefer the monorepo setup we have.

                        2. 1

                          This is great. Would it be possible to add a feature where we can paste in our nix files, and have them explain it to us? Not just at the syntactic level, but a little higher, maybe?

                          1. 1

                            It technically should be possible but requires a lot of work. First of all Explainix needs to support the rest of the syntax, then we can think of supporting user code. I was looking into compiling rnix-parser to wasm and then displaying the AST. Unfortunately, that project is no longer maintained so need to find an alternative first.

                          2. 2

                            Please share the javascript for this!

                            1. 12

                              This is pretty cool! If I may make a suggestion, I’m a silly user who doesn’t read all the text, and I was confused about what was interesting here. I closed the tab and then thought surely there must be more and came back and started reading more carefully. Maybe it’d be more obvious areas are clickable by having one default to clicked on load? Really neat.

                              1. 4

                                I, too, loaded the page, looked, left, and only discovered that you can click on things when I checked a second time.

                                1. 1

                                  Thanks for sharing this. As a creator of the tool it is so hard for me to comprehend this confusion :)

                                2. 2

                                  Where are the blink tags when you need them the most? :P

                                  1. 1

                                    If I may make a suggestion, take the part where it says

                                    Click on any element to display help.

                                    And QUADRUPLE its size.

                                    1. 6

                                      Syncthing has had this feature since 2021: release v1.15.0. While I am using Syncthing I haven’t tried connecting an untrusted device. Instead I decided to just run on my home NAS to have an always-on device.

                                      1. 12

                                        In that setup, I’d still be inclined to enable this mode, unless you also expose the syncthing directory via SMB or something else. If the NAS is just there as a blob of storage, then treating it as an untrusted device means that a compromise of the NAS won’t leak the data that you sync with SyncThing. A computer that doesn’t need to see plaintext should never have access to plaintext.

                                        1. 6

                                          I don’t think you can take that as an absolute principle. You need to weigh the chances of your NAS being compromised against the chances of losing your keys, and the cost of data leakage against the cost of data loss.

                                          1. 2

                                            Ideally, yes.

                                            My NAS has several SMB shares and I am too lazy to encrypt the disk.

                                          2. 5

                                            huh this is apparently still in beta ? didn’t get that memo when setting up my syncthing stuff

                                          3. 1

                                            Note If you use the experimental new nix CLI with Flakes and Git in a current (2.18.1) version of Nix, only files tracked by Git will be available to Nix, so this generally won’t be a problem.

                                            How would I import a local file not tracked by Git in this case? I’d like to have a generic home manager config and a private override on each machine (local file that is in gitignore).

                                            1. 3

                                              Either:

                                              • Stop using Git, nix build in a non-Git directory allows access to all files (but also imports them all into the store, be careful)
                                              • Use nix build path:. instead, which also allows access to all files (and imports them all into the store), but this might not work with tooling and is annoying to type
                                              • Use stable Nix which doesn’t have any such limitations. Then you can also use union (gitTracked ./.) ./non/git/tracked to make a non-git-tracked file available to a derivation build. Though this would of course introduce impurities if you consider Git commits as your input.
                                            2. 2

                                              The author could use nix profile install to install packages globally. It works for both individual packages and for installing a flake. I was meaning to write a blog post about a similar topic but haven’t had time to finish it yet.

                                              1. 3

                                                That ends up basically being the modernized version of nix-env -i, no? Unless I’m missing some differences, I haven’t really looked at these more imperative aspects of nix.

                                                1. 3

                                                  I took a look and it seems like one difference is that you can save the profile to a flake.lock file and maybe restore from it

                                                  1. 1

                                                    I don’t really know what happens behind the scenes. I am just a casual user trying to figure things out. But it is a part of new command line interface, yes.

                                                  2. 1

                                                    Yes, but there’s no way to capture the stuff installed like that into a flake or something, so it’s purely an imperative way to install things and as such is frowned upon by nix heads.

                                                    1. 1

                                                      You can.

                                                      You create a flake with a default package. That default package derivation is built using buildEnv or symlink.

                                                      packages."<system>".default = derivation;
                                                      

                                                      Then you can test your flake with nix build . this should create a directory result with all of your binaries. Once you are happy you can do nix profile install . to put all those binaries in your profile globally.

                                                      P.S typing this from phone so a bit limited with examples

                                                      UPD: the you use nix profile list and nix profile upgrade 0 to update the list of packages every time you modify your flake.

                                                      UPD2: . is a path to a directory with your flake.nix file. Could be local, could be remote URL.

                                                  3. 2

                                                    Thanks for bringing quality improvements to the Nix ecosystem! I personally haven’t noticed any problems across macos upgrades yet.

                                                    Was I just lucky? Shall I migrate to the Nix installer? Can I migrate to it or do I need to do a clean install?

                                                    1. 1

                                                      I was about to ask a similar question - I just installed Nix via the Determinate Systems installer a few weeks ago. Is there an upgrade path to this new one, or is it uninstall/reinstall?

                                                      (Very exciting, BTW.)

                                                      1. 3

                                                        Some users don’t have this issue. For example, I think nix-darwin has some tricks up its sleeve to avoid it.

                                                        If you’d like to switch, you’ll need to do a full removal and then reinstallation. Unfortunately as jvns noted that uninstall can be tricky with the upstream installer… but once you’ve migrated our installer makes it trivial to remove. This is also why we don’t currently support “adopting” an existing Nix install. We’ve done a lot of engineering to make the install revertable safely and thoroughly, and we don’t want to get it wrong and spoil someone’s day.

                                                    2. 1

                                                      This looks like NATS influence. Great to see open source projects paying close attention to “competitors”.

                                                      1. 19

                                                        My theory of why Tailwind is popular is that it’s great for agency work because you’ll never have to return to that quick dirty “we need this done yesterday” client codebase in 2 years to maintain it. It has its place, and it’s a nice piece of work, but I’ll stick with semantic CSS or style-props any day.

                                                        1. 8

                                                          I agree that it’s ideal for agency work where you need things to be unique-ish but also within a style guide, but I’ve never had a semantic CSS system that I didn’t hate after 6 months of use. Maybe I just need to get good, but I think it’s a very difficult goal unless you really have an extremely focused team.

                                                          1. 4

                                                            There’s also the fact that if you’re using a semantic template / components system to generate non-semantic HTML, the non-semantic HTML matters a lot less even from a maintenance POV, and gets in the way of the stupid special cases your stupid client asks for.

                                                            1. 3

                                                              I know many non-agencies that use it, so I don’t think that theory holds up.

                                                              1. 3

                                                                So do I! never said it was exclusively agencies, but it seems perfect for throwaway projects like landing pages.

                                                              2. 2

                                                                I was cautious of Tailwind at first but eventually decided to use it in a couple of hobby projects. There is a learning curve at first but in the end it has saved me a ton of time and made things look good out of the box.

                                                                My projects are new and I have no experience of contributing to a years-old Tailwind project so this remains to be seen.

                                                                1. 3

                                                                  I did work in a team who were moving away from Tailwind, it was a fairly complex SaaS app though so it made a lot of sense.

                                                                  1. 3

                                                                    Exactly. This is purely a matter of taste. I personally prefer the semantic approach and move faster with that. Having a super lean & fast site is also important for me — that’s where Tailwind can never match.

                                                                    1. 4

                                                                      Eh, the tailwindcss CLI tool will only emit the bits of css that you actually use in your templates, that is usually pretty lean.

                                                                      1. 1

                                                                        The CLI is in use on the official Spotlight template, which is significantly bigger. No way you can reach the semantic levels of minimalism.

                                                                        1. 2

                                                                          Ok, it might be 2x as big as the absolute minimal possible size - so what? But the difference is no way as big as you “benchmarked” - there is inline SVG elements, many additional features in the Tailwind version, so it is not a fair comparison at all.

                                                                          1. 3

                                                                            So what?

                                                                            Some of us just don’t like the bloat factor that TW introduces

                                                                      2. 2

                                                                        This is one reason I really love Panda CSS now, hooks into React+TypeScript well and generates stylesheets with zero waste!

                                                                  2. 3

                                                                    Thanks for your insights! I personally host on fly.io and use LiteFS to sync my SQLite db across the nodes. It does work well and fits my needs. The best part is local development: I don’t need to launch any services. I just run the project which connects an SQLite database on disk. As for email and S3 I do use external services :/

                                                                    1. 1

                                                                      Fly is pretty compelling for many things and it’s only going to expand its portfolio. The most important thing on my list is GitHub integration so I don’t have to manage the build pipeline. That alone would move it up my list significantly.

                                                                    2. 2

                                                                      I have used DALL-e to generate an icon for my project. That’s been really helpful as I wouldn’t be able to do it myself. As for writing code I haven’t really tried any tools yet.

                                                                        1. 3

                                                                          … then one could simply write:

                                                                          async fn do_health_check_par(hc: impl HealthCheck<check(): Send> + Send + 'static) {
                                                                          

                                                                          Doesn’t look simple to me but I get the point. I guess this will only be necessary when moving a future to another task so pretty rare in my case.

                                                                          A couple of years ago I was rather excited about Rust but recently every time I read about async Rust I am just left puzzled by the amount of complexity. As a language user maybe I should just stop worrying…

                                                                          1. 3

                                                                            I think the article posted here the other day perfectly sums up my feelings of referring to anything of this nature as simple.

                                                                            1. 2

                                                                              Supporting asynchronicity under Rust’s standards of “memory safety without garbage collection, concurrency without data races, stability without stagnation” is acknowledged as complex, but, if one doesn’t need asynchronicity, one can choose libraries such as ureq that reject async and its complexity.