AnyTimeTraveler
Joined 7 years ago
Joined 7 years ago
For the times where there is a background load: RTIC has task priorities and pre-emption, so you can run your compute-intensive task with a lower priority and react to interrupts in a timely manner.
User is lead to believe X, if they don't read the fineprint.
X is not the case. Instead you get Y.
That sounds perfectly fitting into a consumer rights wiki to me.
Also, Clinton the cat is the much beloved cat of the persom who started the wiki.
It's a shellscript that they encrypted. They decrypt it and feed the decrypted output immediately into the shell, to be sourced.
That encrypted secrets file could contain any shellscript, so the aliases are stored in there, together with the API-Keys and passwords.
I chose what happens after. Can recommend. I wasn't even aware of my privilege.
This website
1. reacts well to my system preference of a dark theme in my news-reader
2. has a toggle at the top for dark theme
3. works flawlessly with DarkReader in my browser
Until I saw your comment, I didn't even know the website had a light version.
Again: What?
You can also create a struct, put your "global" variable inside it and then put all the functions that need the variable into an Impl block of that struct. If you then add the parameter `&self` to these functions, you can access the "global"variable any time via `self.global_variable`.
If that is not enough, then you can always make an actual global variable by first wrapping it in a Mutex, to prevent simultaneous access and then wrapping that in an Arc for Atomic Reference Counting. That allows you to pass "copies" of that variable around anywhere, satisfying the borrow-checker (since the variable is now reference-counted in a thread-safe way).
If you need a lot of parallel reading, replacing the Mutex with an RwLock is a good idea, since it allows locking from multiple threads, if you want to read it in most cases.
You can easily write code that does not contain any possible panic points, if you want.
if a == b { ...
Just that the check will be replaced at compiletime with a constant, since the borrow-checker tracks all objects lifetimes and can use that information to optimize the check away.
The objects themselves don't make it into the compiled binary, since they have no size, but all the required information about them will make it in. So you can treat them like ordinary objects and do all the usual operations on it, without wasting any memory during runtime.