So, if you are developing something you want to see packaged in distros, it needs to be buildable with the tool versions in the distro's repositories.
(Not just rustup- Debian requires repackaging Cargo dependencies so that the build can be conducted offline entirely from source packages.)
- when do you use =, when do you use == and do you always add = / == or are there cases where you dont add = / == ?
- how to precisely handle leftover bits. for example the string "5byte". and is there anything to consider when decoding?
For context: since a base64 character represents 6 bits, every block of three data bytes corresponds to a block of four base64 encoded characters. (83 == 24 == 64)
That means it's often convenient to process base64 data 4 characters at a time. (in the same way that it's often convenient to process hexadecimal data 2 characters at a time)
1) You use = to pad the encoded string to a multiple of 4 characters, adding zero, one, or two as needed to hit the next multiple-of-4.
So, "543210" becomes "543210==", "6543210" becomes "6543210=", and "76543210" doesn't need padding.
(You'll never need three = for padding, since one byte of data already needs at least two base64 characters)
2) Leftover bits should just be set to zero; the decoder can see that there's not enough bits for a full byte and discard them.
3) In almost all modern cases, the padding isn't necessary, it's just convention.
The Wikipedia article is pretty exhaustive: https://en.wikipedia.org/wiki/Base64
Actually I don't understand why the `async` keyword is needed at all.
At the top of the chain, this ultimately blocks the entire event loop (Javascript semantics are generally not concurrent), so no UI/network events can be processed until that promise resolves and the page/server is left non-responsive.
(And that's assuming you can somehow define clear semantics to run any Javascript code involved in resolving the promise; otherwise, you're deadlocked!)
This. I want someone who will throw the culture war out the window (both the left and right wings of it) and focus 100% on competent problem solving and execution and on real world practical problems facing the country.
These are problems like infrastructure, transportation, water security in the West, energy modernization and decarbonization, repatriation of critical manufacturing capabilities (or at least making the country attractive for it), bringing government services into the digital age, and so on.
"Competence!" should be the battle cry of this movement.
The culture war gets everyone to focus on culture war issues instead of the basic competence of the candidates, leading to the election of the likes of reality show star bullshit artists and people with early stage dementia.
For example, you can't pursue "energy modernization and decarbonization" in the USA without taking a side in the "does anthropogenic climate change exist?" culture war.
Any infrastructure plan, whether heavy-infrastructure or social-infrastructure, touches the culture-war questions of "should the government subsidize industry?" and "should the government subsidize the working class?"
Nope, it doesn't traditionally duplicate the list. It certainly is possible to get into trouble in your logic, but those are the presented semantics, and debating their virtue is out of scope
> why shouldn't Rust use a slice of the vector?
You're gonna get into ownership-hell if you can't give a separate Rc to each list tail, because those can get passed around wherever
Electronic money is never lost, not like those pounds, pennies, dollars, quarters. Losing money, takes out of circulation. While not much is taken out, it might be enough to create a base load of inflation - money becomes more scarce and therefore more expensive.
Low inflation leads to asset price bubbles - stock market and housing in particular. It also suppresses wage inflation. So housing becomes more expensive and wages do not keep up, making housing less affordable. A double punch.
Low inflation leads to more financial speculation as people with access to capital look to diversify away from a limited pool of assets (Bonds and cash become less desirable in low inflation regimes). Buying housing and leasing it out is a good use of capital. However, this leads real-estate investors to drive increases in rent as they chase yield and airbnb-empires also drive rental prices - as this is one way of driving yield.
High rents combined with low wage growth means that people's lives become priced for perfection and one small deviation can knock them out of equilibrium - losing their home / rental property when they lose their job.
All because governments and technology are conspiring to keep inflation low. Using cash is the person-on-the-street's only weapon to fight it.
This macro lets you embed an entire folder of assets in your binary at compile time, to simplify distribution.
Taking the concept further, I could also imagine build macros that compile Typescript or SASS files at build time, or generate data structures from a Protocol Buffers definition file, or in general operations that ingest non-Rust source code and use tools outside the repository.
Wireguard:
+ Can tunnel arbitrary IP traffic
~ Has stricter encryption, with full asymmetric keys (and optionally adding a symmetric key)
- requires permissions to load a kernel module and configure the network stack
Hyperbeam:
+ Only needs userland UDP sockets, not a kernel module
~ Derives its keys from a passphrase, so does not require transferring a full cryptographic key between devices
- is a single application-layer pipe, applicable in shell workflows but not transparently tunneling arbitrary applications
This is a sensible middle-ground approach for the rest of society too. Just treat it like a minority religious belief, then the issue is solved fairly without stepping on anyone's rights.
If both Republicans and Democrats agreed to this approach and put this issue to bed, they could get on with wrangling over much more important problems of governance.
Unless you're proposing making the military- and the rest of society- radically gender neutral, than as soon as a person interacts with a driver's license, passport, social media account, or bathroom, they will have to adopt a gender identity . Why should a third party's "gender beliefs" about a person be elevated above their own?
(I also can't see a justification for denying hormone replacement therapy treatment- it's cheap and ridiculously beneficial for mental health. But, for the same reasons, I advocate its availability over-the-counter.)