Nonsense. Rust is clearly the superior blood type.
Well, to get a boolean out of a bit array you have to do some operations. So at first it doesn’t make it more performant. Compilers probably don’t automatically make them bitarrays because of that.
However, the memory savings means less cache used. And a cache miss is way more expensive than those bit operations. So they should be more performant. I’m sure someone out there has done the actual research and there’s a good reason why compilers don’t make all booleans bitarrays.
I guess that’s another way to avoid the overflow problem
C:
int increment(int i) {
return (int) (1[(void*) i])
However, if you wanna go blazingly fast you gotta implement O(n) algorithms in rust. Additionally you want safety in case of integer overflows.
use std::error::Error;
#[derive(Debug, Error)]
struct IntegerOverflowError;
struct Incrementor {
lookup_table: HashMap<i32, i33>
}
impl Incrementor {
fn new() -> Self {
let mut lut = HashMap::new();
for i in 0..i32::MAX {
lut.insert(i, i+1)
}
Incrementor { lookup_table: lut }
}
fn increment(&self, i: i32) -> Result<i32, IntegerOverflowError> {
self.lookup_table.get(i)
.map(|i| *i)
.ok_or(IntegerOverflowError)
}
On mobile so I don’t even know if they compile though.
“wasted” is completely relative. I would pay 30-50 euros for a cool design of a GPU.
Nowadays reliability and coverage is actually the selling point.
They may all have enough speed, but usually the expensive ISPs are more reliable. Mostly because the "cheap ISP"s are just the expensive ones in a trenchcoat selling excess bandwidth. But when the excess bandwidth is no longer excess, the cheap ones are the first to be cut off.
So if you don’t need 99.99…% uptime, the cheap ones are much better.
I’d bet if you were a lego fan you’d say the same about legos.
Housing and concerts are orders of magnitude apart in “importantness”. All of the items above are not needed to live. A home is needed.
This user was not using git though, he was using vs code. That button doesn’t say “git reset” it says “discard all changes”. And btw, what it does is “git clean”, which is something that git can do.
Just below the button there is a list of all the changes. In his case, there were 3000 changes of the type “file creation”. Discarding a file creation can only be made one way: deleting the file.
Anyway, this user is presumably in his learning phase, I would not assume that he knows what git reset or git restore actually do.
There is a warning. IIRC it says “are you sure you want to discard all changes? This action is unreverisble”. In the context of version management. Creating a file is a change. And just below the button to discard all changes is the list of changes. In that list he could’ve seen 3000 changes of the type “file creation”, when you discard a file creation, it means to undo the creation, which is a deletion.
The button days what is going to do. There is a warning about what it’s going to do. And there is a list of the exact changes it’s going to undo.
The only way to avoid this from happening is to not have the button exist. In that case, the users that actually want to discard all changes would be unable to do so.
I don’t even know why people ITT are blaming the IDE and completely ignoring this.
When you learn git, you do so on a dummy project, that has 5 files which are 10 characters long each.
An IDE is not made so you can’t break things, it is tool, and it should let you do things. It’s like complaining that Linux will let you delete your desktop environment. Some people actually want to delete your desktop environment. You can’t remove that option just because someone can accidentally do it by ignoring all the warnings.
They should be paid though
Spaniard here. Not only does my company not pay me for lunch time. It also demands it to be at least 30 minutes long. How is it even legal to force my unpaid time to be a minimum amount?
Windows 11 is little more than a reskin of windows 10, and they still fucked it up.
Rounded corners are mandatory (Why? I really preferred squared ones). But developers can choose to have their windows square. Why only the developers? Let the user decide how a windows looks like!
And don’t get me started on the start menu. It was a complete massacre. Tiles are gone (am I the only one that liked them?). Instead, now we pin apps to the start menu. Fine I guess, except for the fact that half of the fucking menu is taken up by fucking recomendations. If I remove every single recommendation, instead of having my space back for more pinned programs I get this message: “oh you like this precious white space? If you turned on some recommendations it would show something”. No, i don’t want recommendations, I want my start menu space back. Which btw in windows 10 used to be resizable to whatever size I wanted.
Oh and lets not forget about the volume mixer. Which some genius decided that it was better to keep it 10 clicks away from the user in the settings, instead of conveniently at one click in the taskbar. Which they also made the sound settings their own special taskbar element, instead of another taskbar program. So now if I want to replace their shitty sound settings with the ones I like (trumpet btw), now I would have 2 sound settings in the taskbar, while in win10 I only had 1.
And whose Idea was to join the sound settings and internet settings in the same taskbar button visually? Which is also not the same button functionally. You see, if you press the left side of the button it opens the sound settings, but the right side opens the internet settings. How much do Microsoft UI people get paid?
I guess we got dark notepad, that’s nice.
That is because when you’re a beginner, you read everywhere that you should be using anaconda and jupyter notebooks. I know because I did so. Neither of them lasted more than a week on my computer though.
Anything that’s not an integer or a range doesn’t belong inside []
. Much more readable to use zip, map, filter, etc. And more powerful.
EDIT: that was meant for indexing lists. Strings inside []
for indexing ducts are fine.
I haven’t used npm. But pip is horrible. Some times I’ve used a well-known library that only works on linux, but there is no mention of it whatsoever, and it installs without problem. The error only happens at run-time (not even when importing!) and says nothing about platform-dependency. I only learned that it was a linux-only library because I happened to try running it on a Linux machine to see if it worked.
Many times you have to set up your environment a specific way (environment variables, PATH, install dependencies outside of pip) for it to work, and there’s no mention of it anywhere. Sometimes you install the library with pip, sometimes with apt, and there is no way to know which one. And sometimes the library is both in apt and pip, but the pip one does nothing.
Furthermore, good luck importing a library. You might have installed it with “pip install my-library” but to import it you have to do “import MyAwesomeLibrary3”. And pip won’t tell you about that.
The mistake was choosing a language, and afterwards searching for a use to the language you just learned.
I don’t think changing a profession’s terms to “prevent stupid jokes” is a smart move.
Also, most importantly. Assembly.