1,764 karma · joined December 23, 2021
> More terse is not the same as more readable (in fact, I find the reverse).
I generally agree, but I also find that "all explicit" also hinders readability because it tends to drown the nitty-gritty details. As always it's a matter of balance :) And I think that neither go nor rust are great in this matter as one is verbose and the other falls in the "keyword soup" with the chain call, the closure, and the format macro. I'm pretty sure something in between could be found.
1. Most often found in library code, the error types have the metadata embedded in them so they can nicely be bubbled up the stack. That's where you'll find `do_a_thing().map_err(|e| Error::FileOpenError { file, user, e })?`, or perhaps a whole `match` block.
2. In application code, where matching the actual error is not paramount, but getting good messages to an user is; solutions like anyhow are widely used, and allow to trivially add context to a result: `do_a_thing().context("opening file")?`. Or for formatted contexts (sadly too verbose for my taste): `do_a_thing().with_context(|| format!("opening file {file} as user {user}"))?`. This will automatically carry the whole context stack and print it when the error is stringified.
Overall, what I like about this approach is the common case is terse and short and does not hinder readability, and easily gives the option for more details.
As for the second point, what I like about _not_ easily seeing all return paths (which are a /\? away in vim anyways), is that special handling stands out way more when reading the file. When all of the sudden you have a match block on a result, you know it's important.
But yes, VPNs did solve this issue at the time of writing, and I even used one for quite long as my mobile carrier used to proxy all images through their own servers, as well as intercepting port 21. They stopped doing the former with the advent of HTTPS. To my knowledge they did not use this for nefarious purposes (they served downscaled images for lighter browsing at a time where 3G was frugal and websites not optimized yet for mobile).
This is not Arm or risc-v territory (yet), perhaps Ampere devices. However this is approachable by Loongsoon an I’d bet it’s the path they’ll take.
> Rust can run multiple threads just fine--it's not Javascript. As such, it didn't have to use async/await. It could have tried any of a bunch of different solutions. Rust is a systems language, after all.
it allows you to have semantic concurrency where there are no threads available. like, you known, on microncontrollers without an (RT)OS where such a systems programming language is a godsend.
seriously, using async/await on embedded makes so much sense.
and I can still write conceptually similar select code using the, well, select! macro provided by most async runtimes to do the same on a select list of futures. better separation, easier to read, and overall it boils down to the same thing.
Any chance something similar exists for slack? The discord client is not that much of a pain, but slack you have to pick between a client that OOMs the machine, and a browser tab that OOMs the browser.
Indeed since clients have a websocket connection to stream incoming messages, it should be nigh indistinguishable for them from a regular clients.
Also, the API abuse they are worried about is spam and scams, so just pulling out messages is likely to be the last of their problems.
I did use it in the past using the Rust library Serenity [0] (unofficial library ofc) to make a geoguesser-like bot [1] for a private server with friends. Pretty simple to use actually! Do note they have some pretty harsh ratelimits when it comes to API calls though, so pay attention to caching when fetching data (not likely to be an issue for your usecase at it'll mostly be server-sent events.
[0]: https://docs.rs/serenity/latest/serenity/
[1]: https://github.com/Tuetuopay/bot-ticelli (don't judge, this was thrown together between amongus games during lockdown)
The 12V comes from an external power supply through a barrel jack, from which I also derive the 3.3V rail. The Pi provides no power whatsoever. I should publish the design files somewhere.
As for the NIC, it's a Netronome Agilio-CX which is fully programmable using eBPF and such.
As for bandwidth, well, it's one lane of PCIe gen 2. This won't win any races but can be useful to access exotic hardware not available in usb or if you don't care about bandwidth. (e.g. HBA with many drives for mass storage without speed requirement).
Anyways, I ended up making my own and it works great. No fuss, no wait, no complications.
though I don't know what would prevent any bgp daemon from running in e.g. the wireguard iOS app? there are bgp daemons like gobgp that can be easily integrated in other software.
but this was more meant to be a joke than anything. wireguard is batteries definitely not included, and is why tailscale and the like do exist.
(* for linux and bsd)
By affiliation I mean something like hosted on the same server but officially unlinked, not obvious affiliations. If a core maintainer redistributing them on their personal website.
Sadly the new official french azerty keyboard has dedicated keys for both opening and closing quotes, and the good ol' simple quote tucked away behind modifier keys. As a dev I hate it. (arguably I should not even use azerty for development but that's another issue)
You want to know why a change was made, or who so that they can explain it. You land on a blob of a diff, with no meaningful commit message (any commit message was squashed to /dev/null to be replaced with the MR title and description). And then off you go to the corresponding github/gitlab/whatever MR only to find a wall of "hmmmm" "why no work?" "try something" etc commits.
Snark aside, very much agreed, and I don't like that they got away with it. It's precisely with the mindset of "we'll have enough" that companies like ford have a /8 or the DoD has more /8s that we can count. And with this mindset we'll run out of IPv6 the same we ran out of IPv4.
Oh and I ended up disabling IPv6 altogether as their router would crap itself with a modest amount of IPv6 traffic. Pulling ~10Mbps of IPv6 would completely DoS the router, as it would not even go as far as answering to ARP. Some quality hardware for sure.
dang it, I want to try it now. and make an article stating I did it in Zig for the clicks!