1,521 karma · joined August 13, 2015
It's gotten better now, but WebTransport is the solution we've needed for a while.
I love that flakes allow you to decouple a package from nixpkgs and place it in your repo, but in order to fully realize this dream, there needs to be a proper index of these packages, as well as non-experimental support for flakes.
Another (pipe) dream of mine is that Nix gets true cross-platform support, including non-WSL windows. This would allow it to fulfill a role that doesn't currently exist, which is a cross-platform package manager and build system that works across language ecosystems.
They found that the Swift version spent 76% of the time doing reference counting, even slower than Go, which spent 0.5% in the garbage collector.
1. Closures and concurrency really don't mix well. The loop variable capture in particular is very pernicious. There's an open issue to change this behavior in the language: https://github.com/golang/go/issues/20733.
2. Yep. I've seen this problem in our codebase. I've grown to just be very deliberate with data that needs to be shared. Put it all in a struct that's passed around by its pointer.
3. This issue is caught fairly easily by the race detector. Using a sync.Map or a lock around a map is pretty easy to communicate with other Go devs.
4. This should be documented better, but the convention around structs that should not be passed around by value is to embed a noCopy field inside. https://github.com/golang/go/issues/8005#issuecomment-190753... This will get caught by go vet, since it'll treat it like a Locker.
5 & 6. Go makes it pretty easy to do ad-hoc concurrency as you see fit. This makes it possible for people to just create channels, waitgroups, and goroutines willy-nilly. It's really important to design upfront how you're gonna do an operation concurrently, especially because there aren't many guardrails. I'd suggest that many newcomers stick with x/sync.ErrGroup (which forces you to use its Go method, and can now set a cap on the # of goroutines), and use a *sync.Mutex inside a struct in 99% of cases.
7. Didn't encounter this that often, but sharing a bunch of state between (sub)tests should already be a red flag. Either there's something global that you initialized at the very beginning (like opening a connection), or that state should be scoped and passed down to that individual test, so it can't really infect everything around it.
I'm also hoping for official support for static linking. Right now, it's an undocumented feature done through the Feature API.
A really cool enhancement to this would be if the compiler could target a polyglot script that is both Shell and Batch. For example: https://stackoverflow.com/a/17623721
Then you'd get a single script that would automatically be portable and executable on pretty much every conceivable platform.
People are seeing WASM in the context of a distributed runtime. Obviously, this would require you to write your applications with something not POSIX-like, but it would allow you to scale your service on a cluster. Your unit of computation isn't just confined to a single machine.
2. Even under interpretation, WASM doesn't require the interpreter to jump through hoops or optimization to get it to be performant. In this sense, it's more of a portable assembly format than something like LLVM IR.
I wonder if the author considered an input method where keypresses translate directly into a rendered equation? Symbolab kind of does this, so instead of writing an expression in some functional style and seeing its rendered output, I can directly manipulate the rendered equation with the keyboard.
The other point the author makes about discoverability of operators like sqrt and cbrt, I feel that you could circumvent it by introducing a semantic search feature for operators. For example, typing "square root" would display a list of suggestions for operators that match that, like an IDE.
The last question I have is if the author has looked at libraries like Calcium (https://fredrikj.net/calcium/) or the work that went into the Android calculator recently (https://dl.acm.org/doi/pdf/10.1145/3385412.3386037). They use exact arithmetic with computable real/complex numbers. It might serve as a cleaner abstraction that switching between different BigNum representations yourself.
I encountered it when I updated a bunch of NixOS packages at once. Since the crash happened in chromium, I figured I'd downgrade that specific package by pinning an older channel. It still didn't work. But I knew that chromium had worked before, and nix doesn't really use the FHS, so the system wouldn't be polluted with random versions of packages. I also knew that the SHA for chromium had to match what was here: https://github.com/NixOS/nixpkgs/commit/a1c5e5bc40749652503c....
So if chromium wasn't the issue, the problem would have to lie elsewhere. Comparing the last two generations of my system, I found that Sway had updated, which also brought a new version of wlroots that broke older versions of chromium. I eventually found my way to this issue and rolled Sway back until the fix landed in stable.
There were probably easier/quicker ways to reach the same conclusion I did. But I think that knowing the software on my system was built correctly, and was relatively isolated (i.e. wasn't depending on random versions of libraries in the FHS) made it so I wouldn't fall down a rabbit hole that lead to a dead end.