HNHacker News
TopNewBestAskShowJobs

tangent128

364 karma · joined April 21, 2015

submissionscomments
tangent128··on TypeScript Tricks: Type Guards
In ES6, every variable is "any" and implicitly nullable.

Typescript requires any for ES6 compatibility, but if your code is converted enough ("enough" occurring pretty early in conversion projects in my experience) you can set the compiler flag to forbid non-explicit usage of any.

tangent128··on Concept design for a post-LHC future circular collider at CERN
The subways have to be safe for human passengers, interface with stations, and be built in populated areas without disturbing the buildings above.
tangent128··on Political failure modes and the beige dictatorship
> The vast majority of the country supports healthcare for all but it’s still considered politically impossible.

The party representing the minority opposed to healthcare for all has

1. a structural advantage granting them a government majority more often than the popular vote would suggest;

2. a wide array of obstructive tools at their disposal, including simply refusing to schedule a Senate vote.

The other party literally has universal health care in their platform, and secured a partial expansion less than a decade ago.

tangent128··on Something Twice the Size of Earth Slammed into Uranus and Knocked It Over (2018)
Axial tilt is sometimes defined such that 0° is when the orbital and rotational axes align, including direction of rotation; Venus has a tilt of 177° by this standard, because of its retrograde rotation compared to the majority of the planets.
tangent128··on Netflix's Bow to Saudi Censors Comes at a Cost to Free Speech
That's just another way of saying "you should tolerate intolerance", and the fallacy is the same.

Saudi Arabia and China are not cultural monoliths. Their ruling classes may have a cultural value of stamping out dissenting values, but their subcultures so targeted would certainly disagree.

tangent128··on Rust 2019: Tame Complexity through Community Involvement Tools
I found rust-embed recently[0], which lets you embed an entire directory in release mode while deferring to the file system in debug mode.

[0]: https://github.com/pyros2097/rust-embed

tangent128··on Mickey Mouse and Batman will soon be public domain
Because if you put the elimination of marriage and gender equality on the table, nobody's going to believe you're remotely interested in fixing inequality.
tangent128··on What I learned from reading a thousand emergency room bills
> With respect to financial responsibility, if the cost of the delivery is a concern...

As the GP noted, if you don't even know the order of magnitude to expect, the cost will always be a concern. The upper bound on the price is in the trillions, after all.

> If we start making hospitals list prices beforehand, then they're going to have to raise the base price for an uncomplicated birth in order to subsidize those that do experience complications.

This function is currently performed by insurance companies; a frequent criticism is that insurance should limit itself to true emergency situations, but when any routine operation can balloon in price unexpectedly, it's not irrational to want its purchase mediated through the insurance provider.

tangent128··on Tell HN: Aaron Swartz's website is offline
That algorithm empowers any source to suppress an inconvenient fact by making a baseless assertion of the contrary.
tangent128··on NULL: The worst mistake of computer science? (2015)
If you know something can't possibly be null, then store it as a non-nullable type as soon as you know that.
tangent128··on We are Google employees – Google must drop Dragonfly
The military equipment is irrelevant; they are still far more coordinated than the civilians are permitted to be. Suppressing collective action is one of the central goals of authoritarian censorship.

Democracy is no more a native idea for western culture; 250 years ago every state was a monarchy, and political ideologies based in hierarchy still regularly win elections.

tangent128··on Introducing Hooks
Typescript doesn't do anything ES6 & Webpack don't already do; Javascript already lets you write Java-style code if you really want to.
tangent128··on Riot Games Approach to Anti-Cheat
If the player controls the CPU the code is running on, there is fundamentally no way to enforce they are actually running the code provided.
tangent128··on The Blindness of Social Wealth
Easier said than done. The people who know where in meatspace they could expect to regularly meet people who share interests... tend to be the people who don't have loneliness problems.

"Go make some friends" is too vague for somebody who does not already have a bootstrapped social circle.

tangent128··on FCC declines to punish Sinclair for its ‘must-run’ segments and scripts
Willful ignorance offers a pretty big loophole to that definition.

If you don't fact check information, nobody can say you know it's false.

tangent128··on Birds can see Earth's magnetic fields because of cryptochromes in their eyes
https://en.wikipedia.org/wiki/Haidinger%27s_brush is a real and really cool phenomenon, but it detects light polarization, not magnetic orientation.
tangent128··on Sinclair Made Dozens of Local News Anchors Recite the Same Script
"Independence" is incompatible with "being forced by corporate to grant your credibilty to their talking points".

You can't say Sinclair is "combating the national news broadcasters"; they themselves are a national news broadcaster. They just happen to like branding themselves with local faces.

tangent128··on Wapp – a single-file web framework by the creator of SQLite
https://bigcgi.com/development - "Fast-CGIish Integration"

Are you thinking something like "FastCGI, except over stdin/out instead of a listening socket"? Since that sounds like it could work pretty efficiently if (unlike nginx's fcgi implementation) it supported multiplexing.

tangent128··on Just one QUIC bit
The"correct" answer there is probably to make the network limits explicit, by explicitly requiring a proxy server or organization CA installed in the client. QUIC should still work with middleware that actually terminates the connection instead of meddling from outside.
tangent128··on 100 days with Rust: a series of brick walls
Would it work to add a boxed_clone() function to your Material trait that returns a Box<Material>? (or create a BoxedClone trait if you need that pattern more generally)

Implementations of boxed_clone() could still use &self.clone() to limit boilerplate.

Alternatively, if the Materials are not going to be modified and you just need multiple references to the same object, you could replace the Box<> with an Rc<> or Arc<>.

tangent128··on Responsibility Deflected, the CLOUD Act Passes
A majority among nominal Republicans is not sufficient if there's not a majority among the Republican base that actually votes in primaries, especially with the knowledge that support of DACA will be spun by further-right primary opponents as "letting criminals stream across our border".
tangent128··on Heredity Beyond the Gene
"DNA is the only source of inherited traits" is an outdated thesis, yes.

Genetic variation within a racial group is comparable to genetic variation across groups, making it incoherent as a biological concept even before you get into more-obviously-cultural constructs like the "one-drop rule".

tangent128··on After rising for 100 years, electricity demand is flat
Except that increases the incentives to lower electricity usage.

And even if you can't meaningfully cut your usage any further, inflating utility prices would still make a local solar installation more attractive.

tangent128··on The U.S. Can No Longer Hide from Its Deep Poverty Problem
If the question is "why some are able to flourish, while others continue with nothing indefinitely", then the fact that some children are given $millions in liquid assets where others are lucky to be given food and clothing would certainly seen germane.
tangent128··on AT&T giving $1000 bonus to all its employees because of tax reform
If demand for insurance among healthy people drops, but demand among people with expensive healthcare needs stays constant, then the average price to provide insurance increases.
tangent128··on FCC won’t delay vote, says net neutrality supporters are “desperate”
Metered usage is not a violation of neutrality.

Varying prices or manipulating quality of service based on the endpoint's identity is.

tangent128··on So you want to write a type checker (2014)
Do you have any examples lying around of what the interface differences would look like?
tangent128··on So you want to write a type checker (2014)
If a function takes an array of Animal as an argument, the "intuitive" assumption is that you can pass in a Cat[] to it since it's probably processing the array items and a Cat is an Animal.

In usual Javascript patterns, this intuition works, but it's not sound, since arrays are mutable; the function could write to the array, appending a Dog or a Potoo or a Jellyfish- valid for an Animal[] argument, but not sound for a Cat[].

In practice, in most JS code I've seen, arrays are constructed once and then are passed around as immutable collections, so Typescript's unsoundness saves a lot more casting than it introduces errors.

tangent128··on A Lua 5.3 VM and compiler written in Go
Have you encountered Squirrel yet? It seems to be targeting a "C-flavored Lua" niche: http://www.squirrel-lang.org/
tangent128··on Basic Income Research Proposal
A universal income increase is not a universal net income increase, if taxes on non-UBI income become more progressive at the same time.
← PreviousPage 2 of 5Next →