Readit News logoReadit News
tangent128 commented on NSF starts vetting all grants to comply with executive orders   science.org/content/artic... · Posted by u/rbanffy
jobbie · 7 months ago
There's a more sensible middle-ground here, in that the military should have no problem enlisting people with gender identity beliefs - just as it's fine for military personnel to hold varying religious beliefs - but that no-one else should be obliged to accept these beliefs as true, and that the military should not have to fund any cosmetic procedures to make an individual appear to be of the opposite sex. While also not discriminating against anyone for having these beliefs.

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.

tangent128 · 7 months ago
We allow people to self-identify their religious beliefs. The government doesn't declare you to be a Catholic or a Buddhist and force your driver's license to say such.

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.)

tangent128 commented on NSF starts vetting all grants to comply with executive orders   science.org/content/artic... · Posted by u/rbanffy
nickburns · 7 months ago
Is that not what Equal Protection under the 14A (applied to the USG through the Due Process clause of the 5A) is for?
tangent128 · 7 months ago
Without enforcement mechanisms (a PIER plan in this context), the 14th Amendment is just blots of ink on paper.
tangent128 commented on Rust in QEMU Roadmap   lore.kernel.org/all/cc409... · Posted by u/todsacerdoti
vlovich123 · 9 months ago
Any ideas why people are relying on distro packaged Rust for development instead of rustup? For Rust it feels weird making development choices around several year old versions of the language.
tangent128 · 9 months ago
Rustup downloads toolchains from third-party (to the distro) repositories; distros do not want to be in a position where they can no longer build packages because of an external service going down.

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.)

tangent128 commented on Base64 Encoding, Explained   akshaykhot.com/base64-enc... · Posted by u/software_writer
soliton4 · 2 years ago
it didnt go into detail about the purpose of the = / == padding. and it also didnt show in the example how to handle data that can not be devided into groups of 6 bits without bits left over. i think i have an understanding of how to do it but it would be nice to be certain. could someone address the following 2 questions in a short and exhaustive way:

- 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?

tangent128 · 2 years ago
Your questions are related.

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

tangent128 commented on Ask HN: Why can't await be used from non-async functions?    · Posted by u/endorphine
endorphine · 4 years ago
I'm awaiting for the promise of the function I'm calling to resolve, similar to what I do in an async function. Why is there nothing to wait for?

Actually I don't understand why the `async` keyword is needed at all.

tangent128 · 4 years ago
If you want your function to block until the promise resolves, then the function calling it also has to block, and the function calling that has to block, and so forth.

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!)

tangent128 commented on Andrew Yang Founds the Forward Party   forwardparty.com... · Posted by u/nipponese
api · 4 years ago
> doing management rather than politics,

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.

tangent128 · 4 years ago
It's not easy to divorce "culture war" from "problem solving", since the question of whether problems even _exist_ and need to be solved is frequently a culture-war issue.

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?"

tangent128 commented on (Risp (In (Rust) (Lisp)))   stopachka.essay.dev/post/... · Posted by u/tosh
brundolf · 4 years ago
> surely a Lisp has to also keep duplicating the list or else it will get into trouble?

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

tangent128 · 4 years ago
The bytes[0] crate is a popular library in the Rust ecosystem for taking reference-counted slices of a shared byte buffer.

[0]: https://docs.rs/bytes/1.0.1/bytes/struct.Bytes.html

tangent128 commented on El Salvador makes Bitcoin legal tender   bbc.com/news/world-latin-... · Posted by u/aazaa
dougSF70 · 4 years ago
I think that using cash makes money expensive which adds some base load inflation - this will help reduces homelessness and other societal ills (such as wealth inequality).

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.

tangent128 · 4 years ago
(I think your definitions are reversed- a decrease in money supply is associated with deflation, not inflation.)
tangent128 commented on Using Rust Macros to exfiltrate secrets   github.com/lucky/bad_acto... · Posted by u/superjared
vlovich123 · 4 years ago
Is there a reason that access to the filesystem isn't sandboxed aggressively by the compiler? Even having build macros that can access arbitrary parts of the filesystem (vs a dedicated scratch directory) seems like a bad idea. Is there any legitimate use-case here?
tangent128 · 4 years ago
rust-embed is one: https://docs.rs/rust-embed/5.9.0/rust_embed/trait.RustEmbed....

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.

tangent128 commented on Hyperbeam: A 1-1 E2E encrypted internet pipe powered by Hyperswarm   github.com/mafintosh/hype... · Posted by u/thinkmassive
Throwaway1771 · 5 years ago
Yeah, I'd be curious to see plaintext pros and cons between this and a quick Wireguard 1:1.
tangent128 · 5 years ago
tl;dr: Hyperbeam is roughly a netcat tunnel that connects via a DHT topic instead of network address; use it where you want a secure one-off tunnel. (for example, to transfer a key for Wireguard)

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

u/tangent128

KarmaCake day364April 21, 2015View Original