Hacker Newsnew | past | comments | ask | show | jobs | submit | throwaway894345's commentslogin

As an American, I wonder if Trump succeeds in giving away so much of America's economic and military power to other countries, will it make America a less interesting target for corrupting interests? Maybe the billionaires and foreign governments will invest less money in corrupting our system if it's not the global hegemon?

The USA had the power to prevent corruption through a variety of mechanisms (banking, trade, military, legal). With that capacity diminished, corruption is going to flourish everywhere.

Which is the point: once the first domino falls, the rest will naturally follow suit. The playbook has been tested on the USA, and any guards against it have been eliminated. They are slowly going to work their way across the global, running the same playbook. And where they don't run it, someone else will.

Granted, a weak USA means that they also have no protections should another country attempt to bring them to justice or "nationalize" their property. But I'm sure most of them have a contingency plan for that scenario.


Yes, at the end of this administration Trump will have destroyed the standing of the US so much he'll have solved all our problems by making this country such a shithole no one will want to invest or live here. Immigration problem solved! Trading deficit solved!

> it seems that the devices do MUCH more data-collecting outside Europe

Just a note: GDPR applies globally. Companies can't collect data on Europeans even if they reside on another continent.


GDPR claims to apply globally, in the same way Windows believes it owns the whole computer, but I'm actually running it in a VM. The actual boundary of GDPR is the intersection of where it says it applies (everyone in Europe and European residents everywhere), where it can be enforced (in Europe, mostly, against European business entities), and what judges will actually rule on (probably not Europeans overseas who misrepresent themselves as locals)

As a European that lived in the US for a while, I enjoyed responding to unsolicited marketing emails with GDPR emails to legal departments.

> The Catholic Church has withstood the test of time

What does this even mean? That the Catholic Church has some special authority by dint of having been around a long time? Also, what does it even mean if the Catholic Church has been around for a long time when so much about it (including the line of Popes) has been interrupted? Feels a bit like Theseus's ship.

> BUT it is still here and the closest thing we have to the way early church fathers practiced Christianity than any of the 30,000 protestant churches lol.

By what metric? Catholicism added _a whole lot_ onto traditional Christian teaching (Saints, the pseudo-divinity of mary, the infallibility of the papacy, relics, purgatory, etc) that many protestant denominations have stripped away. One could easily argue (and many do) that these protestant denominations are closer.

I'm not sure we can find an objective answer, or that finding one is even useful beyond ego stroking.


And then there’s the Orthodox Church, which included the Roman Church until the pope insisted on changing the Greek text of the Symbol of Faith in a way that altered basic theology. And hasn’t changed much at all.

> Yeah dog, "just didn't sit right" doesn't really hold up.

Can you cite the law that requires more than “it doesn’t sit right” to record police officers in public?


This isn’t a thundering herd problem, it’s a cascading failure. (Thundering herd is about a bunch of workers waking up simultaneously)

> Most US senior military leaders don't even want conscripts: they're generally unmotivated, cause morale problems, and don't stick around. For an offensive expeditionary force they're worse than useless. Comparisons to Israel are irrelevant because they operate a territorial defense force which isn't expected to conduct sustained power projection far beyond their own borders.

This is an interesting angle I hadn't considered. Why do you think territorial defense vs force projection matters for motivation/morale? Is the idea that territorial defense is more moral? (I'm not the parent, nor am I an advocate for the draft--I'm just curious as I haven't thought much about it)


Yep, I'm an American, and sadly we've proven that our country is neither honorable nor reliable. I hope Saab and others continue to provide the free world with options until my country learns that there are consequences for behaving like the slimiest used car salesmen.

I’ve been experimenting with Rust’s type state pattern—I’m trying to build something that builds an inventory of some object storage prefix (recording the version and size of each object in the prefix), but the pattern seemed so cumbersome. The goal was to avoid committing to a particular I/O color (sync vs async) and to have a testable no_std core, but I have so much less confidence in the typestate version compared to the “define traits for I/O and build an imperative loop around it”. I’m curious if anyone has suggestions (I realize it’s probably difficult to help without access to source code).

Why is it cumbersome?

I’m probably doing it wrong, but when there’s a state with multiple transitions out, I can either model it as distinct methods per transition in which case the caller needs to know how to transition between states or I can have the caller pass an enum in which moves the branch into the state machine at the expense of an enum and a match statement. It’s also like 10x the code. Again, I’m very open to the possibility that I’m doing something wrong. Curious how you would model a state machine for (1) reserving the right to do the inventory (2) querying the next page of results (based on a cursor) and (3) recording the page information and the next cursor.

In the type state pattern you would have something like this

pub trait ValidState {}

struct StateMachine<'a, T>

where

  T: ValidState 
{

untyped: &'a mut UntypedStateMachine,

_marker: PhantomData<T>

}

fn reserve_right<'a>(state: StateMachine<'a, Begin>) -> StateMachine<'a, Reserved>

fn query<'a>(state: StateMachine<'a, Reserved>) -> StateMachine<'a, Queried>

fn record<'a>(state: StateMachine<'a, Queried>) -> StateMachine<'a, Recorded>


How do you model cases where the reservation fails, where the inventory operation is already complete, etc? Basically conditional transitions based on some data received? Also, where does the actual I/O happen? Presumably there is some shell that drives the state machine that does the I/O before or after executing the transition?

The I/O is done using the mutable reference to the UntypedStateMachine in the functions.

For example UntypedStateMachine could just be a vec that you append to or read from.

If you want to model cases with failure your return type will be

Result<StateMachine<Reserved>, Error>

A conditional transition should return something like

(StateMachine<PostConditional>, ConditionalData)


I think this makes sense. I’m eager to try it. Some residual questions: what is “untyped” in this case and what is “PostConditional” (an enum of possible states?)? How do subsequent transitions work?

I also just realized that delegating to “UntypedStateMachine” for I/O probably doesn’t allow for Sans-I/O, right? Presumably the UntypedStateMachine must commit to either being sync or async and that must propagate to the typestate state machine itself, no?

The article also mentions that typestates can be cumbersome:

> Typestate improves code faultlessness and testability, but comes at the cost of more boilerplate code and can degrade readability.

I have noticed this in my own code. `Ticket` with an internal variable tracking the state makes using it simpler. I just have to store one object in my struct `struct MyData { ticket: Ticket }` and call `ticket` methods in the correct order.

Typestate `Ticket<T>` is not as simple. I have to wrap it in my own enum: `enum TicketState { Ticket1(Ticket<Func1Done>), Ticket2(Ticket<Func2Done>), }` to store in my struct: `struct MyData { ticket: TicketState }`. Then every time I call `ticket` methods, I must extract the correct variant value first. That degrades readability and creates extra run-time cost.


You don't need the enum? You just require Ticket<T_0> as a function argument.

It's really not that cumbersome, it's like two extra lines of code...


Lol why is this downvoted? There is no dispute that he spent hundreds of millions of dollars to elect Trump and seat himself in government while his companies are financially dependent on government programs and contracts. This is an obvious conflict of interest, and also completely on par with all of the other corruption we're seeing from this administration.


Yep, it's crazy that people can correctly recognize that corruption is responsible for the current situation but fail to recognize that adding more corruption will not deliver us from it.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: