Announcement

Collapse
No announcement yet.

Documentation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Originally posted by Kuciwalker View Post
    dude, it would be ****ing stupid to make + crash on overflow
    Christ, why don't you go get drunk/laid or like and relax a bit ??? First, if it's a batch program, I'll prefer a crash with a reasonable message so I can fix the problem, second, if it's an online, I would like to present the user with a message that the program can't handle the data instead of present wrong results.
    With or without religion, you would have good people doing good things and evil people doing evil things. But for good people to do evil things, that takes religion.

    Steven Weinberg

    Comment


    • Originally posted by Fve Crathva View Post
      Rule 0 of embedded systems: don't crash the program.

      SP
      Rule 1 of embedded systems : in case of failure set the FILE_NOT_FOUND flag
      With or without religion, you would have good people doing good things and evil people doing evil things. But for good people to do evil things, that takes religion.

      Steven Weinberg

      Comment


      • Originally posted by BlackCat View Post
        Christ, why don't you go get drunk/laid or like and relax a bit ??? First, if it's a batch program, I'll prefer a crash with a reasonable message so I can fix the problem, second, if it's an online, I would like to present the user with a message that the program can't handle the data instead of present wrong results.
        WTF would they be writing a program like that in pseudo-assembly C?

        Fact: if you are doing high-performance bigint adds then you either already know you aren't overflowing because you checked beforehand, or don't care.

        Comment


        • Originally posted by Kuciwalker View Post
          WTF would they be writing a program like that in pseudo-assembly C?

          Fact: if you are doing high-performance bigint adds then you either already know you aren't overflowing because you checked beforehand, or don't care.
          True, knowing your data is essential, and if there are no chance that overflow can occur, then no problem. If it can, you want to know.

          I'm a bit curious about your "or don't care" claim - please tell me about the programs that you have written where that was the case.
          With or without religion, you would have good people doing good things and evil people doing evil things. But for good people to do evil things, that takes religion.

          Steven Weinberg

          Comment


          • Originally posted by BlackCat View Post
            Rule 1 of embedded systems : in case of failure set the FILE_NOT_FOUND flag
            Well, that is maybe a bit unfair so a little elaboration - a boolean on an embedded system can have three states true, false and FNF at least according to this site :

            http://thedailywtf.com/

            Hope that you'll find it entertaining
            With or without religion, you would have good people doing good things and evil people doing evil things. But for good people to do evil things, that takes religion.

            Steven Weinberg

            Comment


            • Oh man, it's not like I didn't read the five years ago.

              Comment


              • And you still make programs giving wrong results
                With or without religion, you would have good people doing good things and evil people doing evil things. But for good people to do evil things, that takes religion.

                Steven Weinberg

                Comment


                • Suppose you have a 16-bit timer that increments once per millisecond, and its value can be obtained by calling the Now() function. Your program is a simple polling loop (there is no operating system) that calls three independent functions as often as possible:
                  Code:
                  extern uint16_t Now();
                  
                  int main()
                  {
                      for (;;)
                      {
                          SaltyOJizzmaster();
                          PooperButt();
                          SwellingLabia();
                      }
                      for (;;);
                      return 0;
                  }
                  No function in the loop is allowed to block (so as not to delay the other functions) and they all return in a few microseconds. Modify the program to run the PooperButt() function once every 60 seconds, while the other two functions still run as often as possible (i.e. there is no idle time).

                  SP
                  I got the Jete from C.C. Sabathia. : Jon Miller

                  Comment


                  • Code:
                    extern uint16_t Now();
                    
                    int main()
                    {
                        PooperButt = (function() {
                            var oldpoop = PooperButt;
                            var last = Now();
                            return function() {
                                if (Now() - last > 60000) {
                                    last = Now();
                                    oldpoop();
                                }
                            }
                        })();
                    
                        for (;;)
                        {
                            SaltyOJizzmaster();
                            PooperButt();
                            SwellingLabia();
                        }
                        for (;;);
                        return 0;
                    }

                    Comment


                    • Originally posted by BlackCat View Post
                      I'm a bit curious about your "or don't care" claim - please tell me about the programs that you have written where that was the case.
                      If you can penetrate Kuci's facetious tomfoolery, your question has now been answered.
                      I got the Jete from C.C. Sabathia. : Jon Miller

                      Comment


                      • Didn't you say functional languages were awesome?

                        Comment


                        • im in ur embedded program writin' my javascript

                          Comment


                          • Functional languages are awesome, but we live in a society and there should be limits.

                            SP
                            I got the Jete from C.C. Sabathia. : Jon Miller

                            Comment


                            • I like my programming languages to be functional
                              If there is no sound in space, how come you can hear the lasers?
                              ){ :|:& };:

                              Comment


                              • Interesting bulletin system

                                Unlimited space to host images, easy to use image uploader, albums, photo hosting, sharing, dynamic image resizing on web and mobile.
                                "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
                                Ben Kenobi: "That means I'm doing something right. "

                                Comment

                                Working...
                                X