1,874 karma · joined Jun 12, 2019 (7y ago) · 701 submissions
[ my public key: https://keybase.io/thinkharder; my proof: https://keybase.io/thinkharder/sigs/Ibpz0COsvz2qYl2K8YfzrhucHf2rcZIxityh5WvYC_k ]
comment 3y ago · link · parent
So say you wouldn't sell your house for less than 500k but similar houses in your area are only selling for 350k. You would probably declare the value at $350k to minimize your taxes. If someone comes along and offers you $400k then you can either:
1. Sell to them, which you won't because 400 < 500
2. Update the declared value to 400k (and payer a higher tax)
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
This is mostly a thought experiment so there is not an actual detailed implementation plan by the authors. But my sense was that it's not that you actually have to sell immediately but more like someone can offer to buy at $X and then you either have to sell or $X becomes the new declared value for future tax payments.
comment 3y ago · link · parent
I agree and in cases where sentimental value is a real concern I think there are obvious problems with this sort of system. But I also think there are a lot of domains where this isn't really a concern such as patents.
> The classic example is the poor person who inherits a nice house but can't pay the inheritance tax (and/or subsequent propery taxes), and is thus forced to sell the house in order to pay the taxman.
This is an entirely separate issue but this also seems entirely solvable in our current system of inheritance tax. You should just inherit the original cost basis along with the asset. So if you don't want to sell your inherited house you don't have to. But if you do then your taxes should be paid based on the original cost basis.
comment 3y ago · link · parent
comment 3y ago · link · parent
How so? It seems like it would lead people to asses things at the "correct" value (eg the value at which you would actually sell the asset). So if you buy an asset for less than it is worth to you then you still have a valuable asset, you just need to pay a tax on that asset. Where this would obviously break down is with personal property that has some sentimental value. It would be unjust for people to either have to sell a treasured family heirloom or else pay an exorbitant tax to avoid selling it, but if restricted to domains where that is not a consideration (like patents or other corporate assets) it seems like a good system to me.
comment 3y ago · link · parent
> They declare a high price they're happy to walk with and then continue trolling people with their patent
They can if they want but by declaring a high price they are also then obligated to pay a lot of taxes. So the system disincentivizes both under and over estimating the value of patents. It also incentivizes property going to the highest value use. So if I can do something more valuable with your patent than you are able to do (for whatever reason) I can afford to pay for it more than you can afford to pay the tax.
comment 3y ago · link · parent
While this would pose obvious practical problems as a system for property taxes, it seems like it might actually be a good system for patent taxes. Basically, you should have a to pay a patent tax to hold a patent. You can declare whatever value you want on the patent but have to also be willing to sell the patent at that declared value (or maybe just license it). I haven't thought it through really (just an idle thought) it certainly seems like it would basically destroy the business model of "patent trolls" and curb the practice of major tech players accumulating a huge portfolio of dubious patents as a cudgel they can threaten smaller competitors with.
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
These are all things you should do as the team lead or manager whether you are in person or remote.
comment 3y ago · link · parent
comment 3y ago · link · parent
Some are arguing that people are just naturally more productive in office than at home. I don't necessarily but that argument but it at least makes sense. If what you're worried about is people slacking off at home then I don't quite see how RTO is a solution to that. I've worked with people in that past who showed up to the office every day and played poker online, browsed reddit and watched videos on YouTube.
comment 3y ago · link · parent
comment 3y ago · link · parent
And for the record I have worked restaurant, retail and construction jobs in the past.
comment 3y ago · link · parent
comment 3y ago · link · parent
There are some pretty common reasons why a future in not Send:
1. It is reliant on some thread-local state in which case you can't move it to another thread 2. It uses something which relies of being single threaded for sounds. An example would be `Rc` the standard reference counted pointer in the std. It uses a `usize` for the refcount so it is not safe that have two `Rc` for the same data on different threads. If you need a reference counted pointer that is thread safe you need to use `Arc` which uses an `AtomicUsize` for the ref count and so is Send.
> I just need to be able to await the other routine and resume when it completes, not somehow make the two runtimes merge into one unified one and violate their constraints. The ONLY data from my coroutines which should end up on a different thread is what I explicitly pass to the routine, not my continuation.
Sure, and you could do this in Rust now perfectly fine. Spawn a future on a separate runtime (or a CPU intensive task on a regular thread) and await the result on the current runtime. But by default what happens whenever you hit an `await` is that the coroutine is suspended and goes onto the runtime's run queue until it is woken back up and gets rescheduled. In Tokio's multi-threaded runtime it can be rescheduled on next wake on any worker thread so it must be `Send`. If you use the single threaded tokio runtime there is only one thread so it doesn't need to be `Send`. And even in the multi-threaded tokio runtime you can still spawn tasks that are pinned to the current worker thread using LocalSet.
In writing application code this is (to me at least) mostly a non-issue. Most futures will be Send anyway so the Send bound is not a big deal. But if you do have something that is not Send then you can always use LocalSet to spawn it. The issue I think is really in writing library code where you start to have to add Send bounds everywhere so it jives with multi-threaded runtimes. Like say you have a trait with a method that returns a `Stream` but the concrete type of the `Stream` is not important as long as it produces the required output. So you have
``` trait MakeThingStream { fn make_it(&self) -> Box<dyn Stream<Item = Thing>>; } ```
Well now all the compiler knows is that the output implements `Stream<Item = Thing>`. But this may not be Send so you'll get compiler errors if you try to use this in a multi-threaded runtime. So you add Send/Sync bounds:
``` trait MakeThingStream { fn make_it(&self) -> Box<dyn Stream<Item = Thing> + Send + Sync>; } ```
Great, now it plays nicely with multi-threaded runtimes but even if it's being used in a single-threaded runtime you still require the Send/Sync bounds.
comment 3y ago · link · parent
The solution would probably just to create standard interfaces in std for this so you could just do `std::async::sleep(Duration::from_millis(100)).await` and just delegate the implementation details to the runtime (or something like that).
comment 3y ago · link · parent
comment 3y ago · link · parent
It think of it in the sense that you are talking about though because I grew up with a lot of people in the building trades. They often use "laid off" to mean basically "there's not enough work so I'm not getting hours until there is more" (eg temporary). But I think that is pretty specific to those industries where there is pretty fixed pool of labor and the work is highly seasonal.
comment 3y ago · link · parent
comment 3y ago · link · parent
A pattern that has worked quite well for me is to use
``` struct ComputeTask { some_state: SomeState, completion: Sender<Output>, }
impl ComputeTask { fn run(self) { .. do you compute-intensive stuff
self.sender.send(output);
}
}async fn do_stuff() -> Result<Output> {
let (tx,rx) = tokio::sync::oneshot::channel(); let task = ComputeTask { .., tx }
rayon::spawn(move || task.run());
rx.await
}```