I get this every time I talk to programmers about a concept that isn't completely obvious. And some that are completely obvious
-10 karma · joined May 25, 2022
I get this every time I talk to programmers about a concept that isn't completely obvious. And some that are completely obvious
The correct solution is to never ever use rust. It's a failed experiment that noone noticed failed
You got to do this yourself because YMMV
My projects don't use many includes and little templates. So C++ is more than 4x faster. I think in one case it was 10x faster but other people might claim I'm cheating because most people don't write code that way. If you often write template heavy code or need to include many large headers you'll get different results
I'll sum up "container invalidation". In C or C++ if you append an array you may cause the array to grow which means it might have a different pointer. You basically can't take an address of an array you're planning to grow. All containers are like that except list I think which I never use
In rust, it's roughly the same idea. The problem is I borrowed something from vec (you can think of it as taking a reference or creating a pointer). I then call a function that is const (you can see here it's &self and not &mut self https://doc.rust-lang.org/src/alloc/vec/mod.rs.html#1911). But that invalidates the borrow like push_back/resize/reserve and such in C++. Which is absolutely ridiculous because it's doesn't modify anything.
It makes me so mad because even the one thing I like about rust is annoying to use. Using an annoying checker, slower compiler, harder to optimize language is too much. I don't shoot myself in the foot in C++ so I'm unable to get a win in rust. For me using rust is more pain than practical
> People struggle with Rust for a number of reasons ... the borrow checker!
The borrow checker was the easiest thing for me to learn and the only thing I liked about rust. Except it's broken. I have to constantly reborrow after calling a constant function. The reason I actually bailed on rust is because it's a worse C++ (compiles slower, executes slower, isn't compatible with C's __thread etc etc), it's a worse webserver (I still use PHP and C#), it's worse for database heavy code, it's not very good for one offs (C# and python are better), it basically cost too much to switch for the broken borrow checker
Also the article at the end doesn't make it clear what he thinks. Usually I read the start and end to see if I'm interested in the topic and I'm not sure if this article is in secret a rant
The guy filming immediately says (something like) "you see. That's what I said".
The problem is also policy is made for typical situations and people are trained to ignore problems because its a pain in the butt to deal with policy makers
Under using is probably more common but I wouldnt be surprised if some places used too many that people started ignoring it
-Edit- I think it was this. Apparently my memory isn't very good because I forgot all the cuts https://youtu.be/sCEzEVJkO1U?t=20 Actually at 1m 18s guy says "there's 5 cones". Maybe my memory isnt terrible lol
I think the better guess is having people opt into amazon drivers using ring to let themselves in so their package isn't stolen from their porch
I don't know why google created this language. It offers nothing new and I can't see why they'd use this over rust when rust can be used. I don't see why they use this over zig since zig can certainly be used where this language is meant to be used. Zig actually brings something new
Overall google is 0/3 on creating languages that people want to use. Maybe go is useful but I haven't seen enough proof
Overall I don't see myself using this. 0/3 google
Yeah! Why do I have to sponsor hires who happen to be not legal citizen. I have to hop all these hops to hire while your local grocery store doesn't have to sponsor anyone! So annoying /s obviously
A commit message helping me learn anything that I didn't get from a code comment sounds like a stretch. I'm doubting this
> How do you see if someone modified the test then? I feel like we are maybe misunderstanding eachother
Clearly. I was suggesting I might see commit messages if I'm using git blame to find out if a case was removed from a set of test or if it never existed in the first place. But I don't see how messages would help at all in anything I do. What I'm looking for is far too specific to be in a commit message and this whole thread about using commit messages to learn sounds nonsensical.
For example (one that you linked to) a person said I was wrong and his comment wasn't flagged yet when I asked him to stop replying to my comments (many of my comments in the thread weren't on his comments) mine gets flagged https://news.ycombinator.com/item?id=32086054
Not once in my entire life have I heard anyone say this
Almost always its either about it being faster or so they can use a language that isn't JS. And both are those have dubious value because I seen wasm be slower and people complain a lot about lack of tool support. Which is why the other day I claimed very few people use it. I seen many try it once or twice and not want to go through it again
Usually people 'own' a file or part of the system so that wouldn't really be happening anyway