Slashdot Mirror


User: Ihlosi

Ihlosi's activity in the archive.

Stories
0
Comments
4,892
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 4,892

  1. Trains on Mars. on Does Elon Musk's Hyperloop Make More Sense On Mars? · · Score: 1

    I predict that settlements on Mars will be connected by trains instead of fancy hyperloops. Simple, proven technology (electrically powered), and it's easy to expand the system and add more stops if necessary.

  2. Go abroad and have some FATCA nightmares. on Rich and American? Australia Wants You · · Score: 1

    Though, I suppose if you're a millionaire, you can afforde the tax advisors that sort things out for you.

  3. If it stayed this unreliable, then no. on Ask Slashdot: If Public Transport Was Free, Would You Leave Your Car At Home? · · Score: 1

    Public transportation need to be reliable and on time first, and affordable second. I don't care whether the ride is free if I wind up wasting 30-60 minutes due to delays once every ten rides.

  4. Great, they're patenting train seating? on Simple Geometry = More Seats In an Airline · · Score: 1
    Trans have had this type of seating for years.

    Also, it's no good airplanes. Do you really want to be on the receiving end of an acute case of motion sickness?

  5. On earth. on Boeing Patents an Engine Run By Laser-Generated Fusion Explosions · · Score: 1
    I really can't think that Boeing would be so daft as to think that anyone would ever use this on Earth.

    Project Pluto was supposed to be used on Earth. You know, if the Americans can't have it, then at least the commies wouldn't have it, either.

    https://en.wikipedia.org/wiki/...

  6. Re:WHAT radioactive materials? on Boeing Patents an Engine Run By Laser-Generated Fusion Explosions · · Score: 1

    Tritium.

  7. It's project Pluto again, with 100% more fusion? on Boeing Patents an Engine Run By Laser-Generated Fusion Explosions · · Score: 1
  8. Re: C++ is never the right tool on Ask Slashdot: Is C++ the Right Tool For This Project? · · Score: 1
    Once memory is allocated in an embedded system, it cannot be de-allocated.

    Wait, you're not using the stack? ;)

    Ok, back to serious mode - I'm working on small embedded stuff, and memory is either allocated statically or it's on the stack in the form of local variables. new/delete/malloc/free don't appear in my code, either.

  9. Re:I'm spending 60% of my monthly income on rent on The Vicious Circle That Is Sending Rents Spiraling Higher · · Score: 1
    You can list your property and expect a solid offer at above-market pricing within 48 hours.

    Isn't an offer you can expect pretty close to market pricing?

  10. Freakishly illegal. on Who Owns Your Overtime? · · Score: 1

    Not paying anyone for overtime would be so freakishly illegal where I live.

  11. Re:We're all learners... on Knowing C++ Beyond a Beginner Level · · Score: 1
    As long as nonvirtualfunc does not (directly or indirectly) dereference the this pointer, it will work just fine

    IIRC, doing this will have undefined behavior. It may work the way you describe, or it may do anything else.

  12. Re:Division Has A Meaning on Ask Slashdot: What's the Harm In a Default Setting For Div By Zero? · · Score: 1
    Put the check there.

    Depending on your platform, putting the check there might interfere with CPU load/latency constraints (and using a bigger CPU might interfere with power/cost constraints), while having the CPU just return zero as the result of division by zero can be handled later (when it doesn't interfere with CPU load/latency).

  13. Contradiction ... on Ask Slashdot: Is C++ the Right Tool For This Project? · · Score: 1
    The main reasons I have for this are the needs to manage memory usage and disk access at a very granular level and a desire to be cross-platform.

    You can pick one of the two and make no promises about the other.

    Or does "cross-platform" in this context mean "Linux+Windows"?

  14. Re:We're all learners... on Knowing C++ Beyond a Beginner Level · · Score: 1
    So how about you help people by saying how this can be null,

    I assume by something like this:

    ((my_class *) (0))->somemethod();

    As long as somemethod() doesn't try to access any class members, the code may even fail to show any obvious misbehavior.

  15. Re:Given how C++ is taught. on Knowing C++ Beyond a Beginner Level · · Score: 0
    Why not?

    If I wanted the programming language to be smarter than myself, I'd pick an appropriate language (not C++).

    From a quick glance, smart pointers kind of look like local objects, but they're created on the heap instead of the stack, and whatever they point to automatically gets deleted when the smart pointer goes out of scope. Okay, that's not horribly smart. I could live with it.

  16. Re:Given how C++ is taught. on Knowing C++ Beyond a Beginner Level · · Score: 0
    ...smart pointers...

    I don't like the sound of that. I'm sticking with C and occasionaly bits of assembly.

  17. Re:Knowing when not to on Knowing C++ Beyond a Beginner Level · · Score: 2
    Knowing when not to use templates, virtualization, [insert favorite c++ function here], etc.

    Basically, only use a language feature if it provides a tangible benefit (making the code easier to understand and maintain almost always qualifies; making the code run faster qualifies if it's not running fast enough yet; "This is cool, let's try using it!" only ever qualifies in your own private projects).

  18. Re:Given how C++ is taught. on Knowing C++ Beyond a Beginner Level · · Score: 0
    You should almost never see a new, and never a delete in normal code

    If you're seeing any news, and no corresponding deletes, doesn't that mean the code leaks memory?

  19. Masters know their limitations. on Knowing C++ Beyond a Beginner Level · · Score: 0

    Masters know they don't know everything, and only use language features they know they can use without introducing bugs.

  20. Re:Scientific worldview undermining own credibilit on Is the End of Government Acceptance of Homeopathy In Sight? · · Score: 1
    Come back when you find a repeatable RCT of a homeopathic remedy that shows an effect better than placebo

    Easy. Just test a combination of various homeopathic agents, with one of them actually being a real drug (under a fancy homeopathic name) at high enough concentration to have an actual effect.

    I have seen studies done this way. Always check the homeopathic medicine in question for barely diluted, real drugs.

  21. Re:I'm with you to some extent on Ask Slashdot: What's the Harm In a Default Setting For Div By Zero? · · Score: 1
    Could you give an example of when x/0 can be safely treated as 0?

    a) The program needs to process bursts incoming data quickly and timely, and it is known that only nonzero output values are valid. The program combs through received data later, when there is time.

    b) You need to feed an audio DAC or something, and outputting 0 will result in a barely noticable glitch, but missing several samples due to exception handling will produce a very noticable acoustic artefact.

  22. Re:Infinity on Ask Slashdot: What's the Harm In a Default Setting For Div By Zero? · · Score: 1
    Of course. Then do your check for zero before the division, if your latency requirements can handle it. If either option doesn't meet spec, then your specifications are where the "bug" is...

    Or maybe you have bursts of data coming in that needs to be processed in a timely manner (leaving no time for exeptions or even checks), followed by periods in which you can comb through the data packets and deal with cases of division by zero (e.g. if you know that the result is normally nonzero, any zeros showing up in your data indicate that these samples need to be handled separately).

    It's all a matter of your application.

  23. Re:Infinity on Ask Slashdot: What's the Harm In a Default Setting For Div By Zero? · · Score: 1
    Fix your damn program to check for a dividend of zero, or at least trap the exception and handle it then.

    If you have the CPU cycles for this, it is the better option. Depending on the application, you may not have this luxury (really low latency signal processing where trapping an exception will break the real-time behavior of the system).

  24. Re:Idiot on Ask Slashdot: What's the Harm In a Default Setting For Div By Zero? · · Score: 1
    It is not trivial, and in real world situations could be deadly.

    Not ignoring the problem could be deadly, too, or at least very costly. It all depends on the application.

    Why do you think ARM put a mode in their CPUs where they just return zero on a division by zero? Does ARM leave their CPU design to idiots? I don't think so.

  25. Re:Idiot on Ask Slashdot: What's the Harm In a Default Setting For Div By Zero? · · Score: 1
    Would you prefer the subroutine to report the speed as 0

    Yes. Because other parts of the cruise control algorithm can recognize a speed of zero as a point where the cruise control should not be operating at all and disengage it.

    The other options would be:

    Report an arbitrary value. This leads to horrible results as the arbitrary value may be below the set speed, but still in a range where the cruise control operates.

    Report the maximum value. This may lead to funny results if the programmer did not pay close attention to signed/unsigned datatypes.

    Do random stuff, crash, require restart before cruise control can be re-engaged: This doesn't immediately lead to horrible results, but to lots of unhappy customers wondering why their car needs resets/power cycling like their Windows computer does.