Please create an account to participate in the Slashdot moderation system


Forgot your password?
Check out the new SourceForge HTML5 internet speed test! No Flash necessary and runs on all devices. ×

Comment Re:What the Idiotic Hell./ (Score 1) 380

Which benchmarks in particular? I've followed quite a few Reddit discussions comparing Rust to C/C++ benchmarks and usually any major discrepancy boils down to something unrelated to the language. e.g. discrepancies in how the benchmark is written for each language, e.g. some C/C++ benchmarks conditionally run SIMD intrinsic functions or OpenMP extensions. Or peformance differences in something specific such as a regex library. BTW Rust does have a SIMD library and data parallelization libs but it doesn't seem of relevance to compare a benchmark in one language that doesn't do them to one that does.

And if you compare basic runtime performance of the generated code they come out the same. And this should not be surprising. Most of Rust's safety / lifetime checking is compile-time and incurs no runtime cost. It spits out bitcode which is optimised and turned into machine code through the LLVM backend. The performance of compiling Clang code vs Rust should therefore be quite similar.

And as I said, speed is not the only consideration. Rust may happen to be as fast as C or C++ but that alone would probably mean nothing. I expect the main attraction people see in the language is because it reduces the potential for runtime errors and therefore more stable software particularly in systems programming.

Comment Re:What the Idiotic Hell./ (Score 2) 380

4. More popular languages tend to be faster. Usually a shit ton faster. Java has gone from a bloated mess to a bloated mess that is often within spitting distance of C on performance shootouts. That's from the popularity spurring further development. C is almost always king of the hill and nothing is faster. Python? Rust? Whatever n00bs. Those languages may be nice to write complex code that only gets run occasionally but if you need high end performance they aren't going to cut it.

Rust is a compiled language. It uses the same backend as Clang to produce optimized code. The code it produces as fast as C and C++ while still providing protection against data races and a raft of other issues that can crash or destabilize something written in C or C++.

So while it may not ever gain the popularity of C or C++, the implication that its slow is wrong.

And besides, in the real world, speed is not the only consideration. Time to market is important, reliability is important, maintenance is important, portability is important. High level languages have become popular because they avoid a lot of the nasty pitfalls that are found in the likes of C and C++. Even if there is a performance trade off, it might be seen as worth it if the code is delivered on time and meets the requirements.

Comment Too easy to get hung up on one language (Score 1) 380

I find the best way for my skills to remain relevant is to have the day-job language(s) and learn a new one on the side. And by learn a new one I don't mean just reading a book or doing some crappy tutorial. I mean write something substantial and functional in it. Something you can stick on the resume because the project is open sourced or otherwise visible to someone who cares to look for it. Open source is best because they can see your actual code and your authorship.

Even if the new language turns out to be a dud it's still a good exercise since it demonstrates to an employer (and to yourself) that you are motivated, can adapt and are capable of learning new skills.

Comment Re:Rust gets it right (Score 1) 87

You don't have to unwrap on everything though. If I have a function that is guaranteed to return something (e.g. a constructor) it just returns that thing. Compare to C++ where anything that returns a pointer is potentially capable of returning NULL even if it shouldn't.

Option and Result are only necessary for actions which might legitimately might return something or might not. e.g. a network request, or retrieving a record from a database. Even there it's not necessary to unwrap since you could say "if let Some(foo) = do_something() { ... } else { ... }" and the object foo will be unwrapped straight into the variable foo.

I think Rust has some very clumsy syntax though especially when types are nested inside boxes, cells or whatever. It'd be nice to have a super unwrap which can reach all the way into a boxed, refcounted thing and just return it with minimal code.

Comment Re:Why is Windows 10 the benchmark? (Score 1) 205

I doubt many embedded systems even need RTOS. Devices like routers, set top boxes, IoT etc. just needs to be responsive to normal system events. Chances are they're running a pared down ser of processes so they're not exactly doing much except what they're supposed to be doing.

If I did need an RTOS I'm not so sure I'd even trust hardware like the RPi to run it. If it's that critical that it works, then running it on a cheap board seems like a false economy.

Comment I'd be far more interested in what comes next (Score 4, Interesting) 234

Seales says he's working on hundreds of scorched scrolls uncovered from Herculaneum. To me that would be a FAR more interesting project. They might discover lost Greek texts or other works of antiquity. Even if its just tax returns, local ordinances or mundane records related to daily life it would still be interesting.

Comment Re:"it was used for children's writing exercises" (Score 3, Insightful) 234

It's called abiogenisis and there are various plausible hypotheses. But even if someone were to demonstrate a self assembling and self replicating molecule through one of these processes it doesn't say that's how they occured on Earth over 3.5 billion years ago. But just because something is unknowable does it become god-did-it.

Comment Rust gets it right (Score 1) 87

Rust probably isn't quite a "mainstream programming language" although it's getting close. But anyway it doesn't support null or null pointers for normal safe programming. Objects are created by declaring them so they either are or they aren't.

If you have a function that may return an object or may not for some reason, then it must return an Option or a Result (or something of a similar nature) and the caller has to explicitly test and handle what got returned.

Null is only supported for unsafe operations, e.g. calling out to some 3rd party library or a system API.

Comment Re:200 Million Yahoo "Users" (Score 2) 169

Yahoo has been running for decades now. Even if in recent years they'd been salting and using key stretching / slow hashes to protect new users it might not necessarily protect somebody who created their account in 1999. The only way Yahoo could improve the security of these accounts is a mandatory password change at the next login, nag active users to change their passwords, or wait for users to change the password themselves. At present Yahoo are nagging users to change their password.

Comment Re:Cool, and no 4K content (Score 1) 207

If you let some idiot build it they will still come.

I suppose if you were buying a TV any way then it might be worth the future proofing. But buying a 4K without that reason doesn't seem very smart. 4K is still somewhat early adopter and the price of TVs will drop and the capabilities will increase. By the time there is 4K content to speak of they might be hundreds cheaper.

The difference between 4K and 1080p is also far less pronounced than between 1080p and 480/576. You'd have to have a massive TV be sat extremely close to see the difference.

Comment Re:Already approved (Score 1) 69

Ah right. Java was invented through a fear of learning and developer incompetence. It couldn't possibly be because C and C++ have very obvious shortcomings that some people have a desire to solve while still preserving as much of what they like about it.

And clearly since Java has become the bedrock of enterprise development they clearly got something right.

Slashdot Top Deals

If bankers can count, how come they have eight windows and only four tellers?