Slashdot Mirror


User: DrXym

DrXym's activity in the archive.

Stories
0
Comments
9,024
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 9,024

  1. Re: Learn C for advanced security, not for basics on Is IoT a Reason To Learn C? (cio.com) · · Score: 1

    Most of Rust's checks compile away to zero runtime cost so your questions are invalid to start. It probably doesn't fit every use case but Rust is targeting small devices and has been ported to run on some microcontrollers.

  2. Re: Learn C for advanced security, not for basics on Is IoT a Reason To Learn C? (cio.com) · · Score: 1

    From my initial reading of Rust, it would have major problems due to the way it deals with pointers. If the language is holding your hand to be "memory safe" then there's a good chance it won't work well when dealing with low-level stuff.

    Rust has an explicit "unsafe" keyword which allows you to write a block that does pretty much any dangerous operation including pointer manipulation if you so wish. If you had to set a value into memory, or set or get a pointer from a lib written in C then you can do that.

    The benefit is that the rest of your code (i.e. outside the unsafe block) is checked by the compiler and things like lifetimes, borrowing etc. are enforced. It's very hard to leak memory or forget to close a file because everything is managed by its lifetime and all resources are RAII style. It's also very hard to break a Rust program in an undefined way. The only way I'm aware of is a stack overflow past the guard page on platforms which don't support stack probes. Otherwise at the very least you'll get a panic and a stack unwind / program halt in a controlled fashion.

  3. The usual bollocks on Apple Will Fight 'Right To Repair' Legislation (vice.com) · · Score: 1

    repair their own phones could cause lithium batteries to catch fire

    I shouldn't need to "repair" battery. I should be able to flip the back cover, remove the old battery and insert a new one. How is it that Apple, self professed masters of design cannot enable this simple task?

    The answer is they could and easily but they seal the battery into the device as a cynical ploy to build obsolescence into their devices. Other manufactures seal the battery in too (following Apple's lead). It should not be acceptable and frankly I wonder why more eco conscious jurisdictions (e.g. the EU) permit them to do it. Phones should be serviceable by design and certain elements like batteries should be serviceable with a minimum of effort.

  4. Re:Until on Is IoT a Reason To Learn C? (cio.com) · · Score: 1

    They have. It's called Rust and it solves many of the problems that traditionally plague C or C++ - memory leaks, dangling pointers etc. The net result is more stable, reliable software that has a built in resistance to some forms of attack. I think if I were writing IoT software I would choose Rust unless there was a genuine reason that it could not be used.

  5. Re: Apple just does it right on All Three New 2017 iPhones To Feature Wireless Charging, Says Analyst (macrumors.com) · · Score: 1

    A suitable suggestion for people who enjoy spending a multiple more on a set of headphones, and charging those headphones, and having a little case or some other means to protect those headphones then yeah that's a great suggestion. Other people might wonder why a premium phone device couldn't expend perhaps $.20c to just have a headphone jack built into it. Like every other smart phone.

  6. Re:What's so absurd about it? on Scientists Successfully Decode the Genome of Quinoa (bbc.com) · · Score: 1

    That doesn't make any sense either. If someone says chicken tastes good I don't leap to the conclusion they're referring to eating raw unplucked chicken. I make the reasonable assumption that they're talking to its taste after it has been appropriately prepared for human consumption.

  7. Re:The old adage on Tesla To Start Pilot Production of Model 3 This Month (reuters.com) · · Score: 1

    They are expecting it gets most of the stuff that the Models S and X got right, at a much lower price point. Given their track record, that is not an unreasonable expectation.

    They can expect all they like. It doesn't mean those expectations will be realised.

    Aside from the risks of owning a version 1.0 car, I don't see how expecting the same of the model 3 as the S or X is reasonable given the difference in baseline price. Musk has also tweeted he expects the average spend to be $42,000 which suggests an obvious incentive to gimp the baseline model and nickel and dime people into paying more money.

  8. Re:The old adage on Tesla To Start Pilot Production of Model 3 This Month (reuters.com) · · Score: 2
    You're right, it's definitely true for all cars. Virtually no production vehicle is launched without some form of issue. It's always a good idea to wait a year or two after a product launches for the issues to be shaken out and the recalls to have happened.

    In this case however ~400,000 people appear to have lost their collective minds and preordered a car without knowing all but the most minimal information about it.

  9. Long time coming if true on Wikipedia Bans Daily Mail As 'Unreliable' Source (theguardian.com) · · Score: 1
    The Daily Mail is a horrible news source. Veracity and adherence to truth are unimportant factors when they run a story. If the facts don't match the headline / narrative they're pushing they'll be buried right at the bottom of the article to minimize the chance of anyone seeing them.

    The Mail's perpetual campaign to declare things that cause or cure cancer (or both) is a long running joke demonstrating a willful disregard for accurate reporting. More seriously their campaigns against immigrants, Europe and other things designed to push buttons in their mitte England readers are simply malign.

    And that's assuming there are any facts. e.g. the Mail loves stories about snipers killing evil ISIS members who are about to slaughter innocents.

    They just quote unnamed "sources" and that make shit up. Wikipedia already bans citations from certain sources, and it's understandable if that extends to certain "news" sites.

  10. Re:None of this should be surprising on Facebook Is Closing 200 of Its 500 VR Demo Stations At Best Buy Stores Across US (businessinsider.com) · · Score: 1

    It'll be neat for architects to bring their customers into a room to demo a design with VR and so on but I expect for day to day purposes most people would be content to use a screen - less eyestrain etc. Same for AR.

  11. The old adage on Tesla To Start Pilot Production of Model 3 This Month (reuters.com) · · Score: 1
    Never buy version 1.0 of anything. Any engineer can tell you virtually no hardware or software goes out the door without know problems, some of which may be serious. And in the case of a vehicle some problems will only discovered when vehicles come in for repairs or end up in crashes.

    The model 3 might prove to be a great car out of the gate, or over time especially as it is refined. The model S certainly did, the X not so much. I'm not sure why anyone want to gamble money on it though.

  12. Re:Saponins - besides the point on Scientists Successfully Decode the Genome of Quinoa (bbc.com) · · Score: 2

    That's an incredibly absurd argument that could be applied to wheat, rice, shellfish, meat etc. Lots of foods either don't taste nice or require processing to be considered edible and safe for human consumption.

  13. None of this should be surprising on Facebook Is Closing 200 of Its 500 VR Demo Stations At Best Buy Stores Across US (businessinsider.com) · · Score: 1
    The crash and burn of VR was predictable before the hype train took off and now it's come to pass. I'm not surprised that Occulus thinks the best way to sell the tech is a live demo. But even that doesn't seem to be working. After the initial wow factor passes, it's replaced with a dose of reality - the headset is uncomfortable, all the wires are a pain in the ass, the setup is too much effort, the games aren't exactly great and plentiful and the thing induces motion sickness, eyestrain and headaches. It's a very expensive novelty. And it's a vicious circle - the less people buying (or using) the VR headsets, the less reason to develop games for it.

    I bet sales of the Rift, Vive and PSVR all took a dive after the preorders were fulfilled and usage too.

    That isn't to say VR is bad per se. Certain genres of games benefit enormously from VR - flight / car simulators for example. And perhaps VR headsets can be improved in a number of significant ways (e.g. lose all the wires, bump up the resolution / response rate / tracking / refresh). But as it stands... meh.

  14. He has a career ahead of him on Story Of a Founder Who Burned Through $21M While His Social App Fling Crashed (businessinsider.com) · · Score: 5, Funny

    A narcissistic douche in love with himself, a fondness for hookers, burns through money and leaves a trail of debt and bad business in his wake. He should run for office.

  15. No but other Muslim and non-Muslim countries do. It's not a stretch to imagine that a tech company might very well want itself, its work force and the places it does business in to not be associated with these policies.

  16. I expect their "real motivation" without any reaching for conspiracy theories is that this harms their business. It's a stupid order issued by a stupid president to placate stupid people.

  17. Re:I know what will happen one day. on Developer Argues For 'Forgotten Code Constructs' Like GOTO and Eval (techbeacon.com) · · Score: 1
    I wouldn't say it's useless. I'm writing a lot of Rust at the moment and lack of inheritance can be a pain in the ass especially when implementing some UML that expresses inheritance.

    The workaround is use composition. Make the base class (struct) a member of the things that "derive" from it and a trait that allows callers to call the composite and map the calls onto the base. It's a pain though and for more than one "subclass" involves macros to generate the boiler plate. It would be nice if Rust had a #[derive_composite(base)] that generated this boiler plate automatically.

  18. Re:I know what will happen one day. on Developer Argues For 'Forgotten Code Constructs' Like GOTO and Eval (techbeacon.com) · · Score: 1
    Multiple inheritance of concrete classes generally is bad due to issues like diamond patterns. Single inheritance or multiple inheritance where only one class is concrete and the rest are interfaces is generally ok. That's assuming all the code resides in the same binary since fragile base classes can screw everything up.

    Stuff like virtual destructors, rule of three / five etc. in C++ demonstrate some pretty fundamental problems that can only be overcome with best practice. Inheritance in Java is much nicer.

  19. Sometimes code has to do multiple things and if any of those things fail, the whole lot has to be cleaned up. Using a "goto cleanup" is usually a lot more preferable way of cleaning up that nesting the code in conditionals rendering it unreadable or duplicating the cleanup in several places.

  20. Re:Courage. on Mozilla Binds Firefox's Fate To The Rust Language (infoworld.com) · · Score: 1
    Leaks are only safe if your memory is infinite. Systems programming cannot make that assumption even on the desktop let alone on something like an embedded device. A program could be losing some innocuous amount of memory, e.g. 16 bytes a minute and it would still kill the system in the long term. It might take a very large amount of debugging and analysis to even find the cause.

    Real world software is also not perfect. Maybe you use smart pointers all over the place. But you'll have to link with some library X which is written in C and there are X_alloc / X_free functions you're supposed to call for some opaque pointer. Then you have to add library Y and that's using an older C++ because it can't break compatibility for some reason. Then you use library Z (e.g. Qt) which has its own way of doing stuff totally contradicting everything else. In the middle of all this something leaks and its a mess to find.

  21. Re:As Trump would say: WRONG on Mozilla Binds Firefox's Fate To The Rust Language (infoworld.com) · · Score: 1

    But the tools are still too unstable. Language and library features change from one compiler version to the next.

    The changes are backwards compatible. Freezing of certain APIs, addition of new features.

    And compilation is slow as shit.

    Compilation speeds have improved substantially. And the retort is to say that finding and fixing bugs in the field is way more time / money costly than stopping them from happening in the first place.

    Try compiling a simple hello world with Rust or GCC. The difference is staggering. (at least it was about 6 months ago)

    The difference in what? Speed? I was able to create, compile and run a hello world program in under 4 seconds.


    cargo init --bin
    Created binary (application) project
    cargo run
    Compiling hw v0.1.0 (file:///C:/Temp/hw)
    Finished debug [unoptimized + debuginfo] target(s) in 1.40 secs
    Running `target\debug\x.exe`
    Hello, world!

    Or are they going to use rust to compile only 1% of the code, in which case they are complicating their build for no reason.

    Every time Mozilla crashes because of dangling pointer, data race or some other avoidable problem caused by using C++, that's a reason. Every time someone finds a way to exploit the browser by causing a buffer overrun, stack overflow or whatever, that's a reason. Every time the browser runs stuff sequentially instead of in parallel due to the complexity and risk of data races is a reason.

    There are plenty of reasons to use Rust. And Mozilla's ambition is more than 1% of the code base. Look at the Servo project which aims to replace all of the browser engine with Rust.

  22. Re:Courage. on Mozilla Binds Firefox's Fate To The Rust Language (infoworld.com) · · Score: 4, Interesting
    Rust is pretty easy to program in, more so that C or C++ in some ways, harder in others. It definitely has a mindset / steep learning curve associated with using it for the first time. In C or C++ it's far too easy to allocate memory and forget to free it (or free it multiple times), or stomp over the end of the buffer, or have two threads write to the same data, or call a pointer which isn't there.

    It is very hard to do those things in Rust and that what makes it an excellent systems programming language. It has equivalent performance to C or C++ - almost all checks are at compile time and compile away to nothing in the generated code, and yet the quality of the code is higher because there are less ways it can fail when it passes those checks. That's an extremely compelling argument for code that is expected to run for months or years without failure.

    Aside from the language itself, the std library is way better than for C++ and cross platform. And building software or pulling in external libraries is incredibly easy thanks to the package manager / build tool. It still has some rough edges, but nothing I would consider a blocker.

  23. Re:Ah nostalgia on Microsoft Introduces GVFS (Git Virtual File System) (microsoft.com) · · Score: 1

    That's what cron is for. And by the way, nothing magically makes my git changes appear at a remote site, either - somebody at that remote site has to pull them into their local copy.

    And does every site need a team of engineers and expensive equipment and extra software licences to perform this feat? No. Clearcase did. It was an awful tool.

    If git were used at in its stead there would have been one server somewhere that everyone from any site would push and pull from. It wouldn't matter where in the world it was located because the performance would be fine.

  24. Re:Why Trump is relevant to the story on Electric Car Battery Prices Fell By 80% In the Last 7 Years, Says Study (electrek.co) · · Score: 1

    If he's not like every other politician and actually does what he promises, then he's a far better president than any that have come before.

    Virtually every politician does what they promise to do. I'm sure it's not hard to find scorecards on such things. Whether they succeed or not depends on the opposition they face to see it through. Trump has both houses in his pocket so he is more likely to get what he wants because of that, not because hes any better than any other politician in that regard.

    And more to the point just because someone promises things that are really stupid, really racist or flawed in obvious ways does not mean that you want to see them implemented.

  25. Yes it is bullshit. There are ample articles describing what nazism was, where the party started, where name originated from, what it became, and how in virtually every way that matters it was a far right party. I am sure as far as totalitarianism is concerned far left and far right have a lot in common. It doesn't suddenly make national socialists far left. Nor does black become white just because you want it to be.