Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
retoor30302dDon't know what Solona is but * fap fap fap *. What are they making that the performance difference is enough to go from Rust to C? Their production will go down hardcore probably. Normally not worth the performance difference I guess.
-
@retoor
Solana is a cryptocurrency.
And while rust has comparable performance to C, no matter how much they like to parrot it, runtime safety guarantees (which are available in most C runtimes too!) *do* have a runtime overhead. If only by virtue of running additional code. -
Are they? A few google searches didn't give me any results. And for what it's worth the end product is WASM so the original language doesn't really matter
Even if, I *highly* doubt performance problems would be the reason. General Rust code is about as fast as general C code, and maybe faster once you factor in the defensive programming techniques necessary to not shoot yourself in the foot
Couple that with the fact that Rust also uses llvm as a backend.... Yeah it's pretty much the same -
@12bitfloat I was trying to look up on when that firedancer thing comes out
trump with his stupid coins careened the whole ecosystem into dysfunction. we must go faster -
@jestdotty Ah I see. Okay but that's just one implementation of solana verifier. Good on them, but I wouldn't say that all of solana is now switching to C
-
retoor30302d@12bitfloat not faster, for sure. Also, many defensive programming isn't needed. It's done by other functions. Rust will by default have that overhead everytime. The faster thing is total bullshit.
-
@retoor Not really. Yes, Rust does force you to do it correctly, but you should *also* be doing that in C. Like Mutex, Atomics, etc.
And if you know what you're doing you can easily just use a bit of unsafe and circumvent all that
But for real, answer me this: In a C project with 50k+ LOC would you really write layers of functions returning temporary values which stem from other arguments? Maybe, but that's pretty damn risky, because at some point somebody is gonna screw up
In Rust, you can just do that. For free. References are literally pointers! But the compiler makes sure you can't screw up -
retoor30302d@12bitfloat could it be possible to have a language like rust but not weird? I think I'm just aiming at a better version of C++. C++ also kinda feels like typescript on javascript. The C strings are sting a thing. The C++ string object is a hoax.
-
retoor30302d@retoor hmm, c# actually. But it laks the real performance. But it'll become my goto language. I consider C# development quite fast but what I've written recently in python was impossible to do so quick with C#. I'm comparison to python even C# development is quite slow. For this project development speed is important. I don't want to work in on a chatapp too long because it doesn't contribute much to my knowledge. So build build build finish move on. My next project will be using go. A much needed molodetz change.
-
@retoor From a syntax perspective? I think that's mostly just familiarity bias. Some people don't like Rust because they can't read Rust. Which makes sense! But it's not a valid reason to hate the language, because once you *can* read it, it's not that hard
But from a semantic perspective? Yeah..... Rust is kinda hard. And I don't think you can make something like Rust without it being hard
E.g. the rule that there can only ever be either ONE mutable reference to a value (even across threads!) OR potentially many shared references (which you can only read from). It's a VERY restrictive rule which makes writing complex apps in Rust very complex
But you can't remove that. Because it's necessary to guarentee the things Rust guarentees -
retoor30302d@12bitfloat you know a language is made for humans right? A language being hard to read is by default not a very good language. I often think Rust is like that with no reason. They could've maybe made a language with the same features without the weird stuff. I just don't see any benefit at all for programmer.
-
-
@retoor But that's why I still, after like 6 years, still *adore* rust
It's not hard because of bullshit like Haskell. Haskell is difficult just so you can jerk off. Rust is hard for a real reason that gives you something. Sure, not everybody likes that. But I kinda do -
retoor30302d@12bitfloat programming is more fun if you suffer a bit tho. I made my python project more complex than needed to make it fun but it's still quite easy. I'm lately adding Python as plugin system to my C projects. That's fun. Thanks to that I can easily implement advanced AI in C projects. But also, I've implemented OpenAI API in C. Nobody does that - it doesn't make sense. Well, I did!
-
@retoor Don't worry, I'm quite happy with the performance of my Rust
It's not about the size but how you use it, as they say ;) -
retoor30301d@12bitfloat maybe your dad said that to you because he knows :p for now - I replaced my self written https client in my C project with curl lib bevause of sadly still some very unexpected stuff. And now - by just typing this I realize what the issue is. Will fix it actually. Dammit. Protocol issue, it uses often chunked and sometimes normal. The normal one was so rare that I decided to do it later and I forgot about it. Fuck, raped a lot of code. Hmm, everything is in git tho.
Related Rants
TIL even Solana is switching from rust to C for performance reasons
whoopsie
random
rust
performance