Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #47578 > unrolled thread

My C++ Coding Standards ( apologies to Bjarne Stroustrup ).

Started byJeff-Relf.Me <@.>
First post2016-12-23 17:06 -0800
Last post2016-12-28 19:36 +0000
Articles 20 on this page of 128 — 32 participants

Back to article view | Back to comp.lang.c++

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  My C++ Coding Standards ( apologies to Bjarne Stroustrup ). Jeff-Relf.Me <@.> - 2016-12-23 17:06 -0800
    Re: My C++ Coding Standards ( apologies to Bjarne Stroustrup ). Paavo Helde <myfirstname@osa.pri.ee> - 2016-12-24 11:00 +0200
      Re: while() and "Loop(3) { _Loop(4)..." aren't "impenetrable". Paavo Helde <myfirstname@osa.pri.ee> - 2016-12-26 23:17 +0200
        Re: Refactoring is good, God's speed. Paavo Helde <myfirstname@osa.pri.ee> - 2016-12-27 01:17 +0200
          Re: Refactoring is good, God's speed. "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2016-12-26 15:26 -0800
          Re: PHP could use #define, seriously. Paavo Helde <myfirstname@osa.pri.ee> - 2016-12-27 10:01 +0200
          Re: Refactoring is good, God's speed. legalize+jeeves@mail.xmission.com (Richard) - 2016-12-28 18:10 +0000
            Re: Refactoring is good, God's speed. woodbrian77@gmail.com - 2016-12-28 10:20 -0800
        Re: Refactoring is good, God's speed. interval1066@gmail.com - 2016-12-30 10:43 -0800
          Re: Refactoring is good, God's speed. legalize+jeeves@mail.xmission.com (Richard) - 2017-01-02 00:44 +0000
            #define came from God himself, it's sacred. Jeff-Relf.Me <@.> - 2017-01-01 23:51 -0800
              #define came from God himself, it's sacred. Jeff-Relf.Me <@..yep> - 2017-01-02 08:00 +0000
                Re: #define came from God himself, it's sacred. moroney@world.std.spaamtrap.com (Michael Moroney) - 2017-01-03 03:58 +0000
                  I completely reWrote it, of course. Jeff-Relf.Me <@.> - 2017-01-03 00:46 -0800
                    I completely reWrote it, of course. Jeff-Relf.Me <@..sour> - 2017-01-03 08:51 +0000
                    Re: I completely reWrote it, of course. Peter Köhlmann <peter-koehlmann@t-online.de> - 2017-01-03 12:13 +0100
                      Re: I completely reWrote it, of course. Melzzzzz <mel@zzzzz.com> - 2017-01-03 12:28 +0100
                      Re: I completely reWrote it, of course. chrisv <chrisv@nospam.invalid> - 2017-01-03 07:32 -0600
                        Ezekiel lives in your head RENT FREE!!  LOL!!! GreyCloud <mist@cumulus.com> - 2017-01-03 12:16 -0700
                        With "warnings as errors", turn off these warnings. Jeff-Relf.Me <@.> - 2017-01-03 13:00 -0800
                      Re: I completely reWrote it, of course. GreyCloud <mist@cumulus.com> - 2017-01-03 12:16 -0700
                        Re: I completely reWrote it, of course. red floyd <dont.bother@its.invalid> - 2017-01-03 12:30 -0800
                          If you're retarded then, yes, _Loop() is "undefined". Jeff-Relf.Me <@.> - 2017-01-16 11:06 -0800
                        Re: I completely reWrote it, of course. scott@slp53.sl.home (Scott Lurndal) - 2017-01-04 13:33 +0000
                          Re: I completely reWrote it, of course. chrisv <chrisv@nospam.invalid> - 2017-01-04 07:45 -0600
                            Re: I completely reWrote it, of course. scott@slp53.sl.home (Scott Lurndal) - 2017-01-04 14:54 +0000
                              The Longest Common Sequence ( NonContiguous ) algorithm ( recursive ). Jeff-Relf.Me <@.> - 2017-01-04 10:17 -0800
                                Re: The Longest Common Sequence ( NonContiguous ) algorithm ( recursive ). Peter Köhlmann <peter-koehlmann@t-online.de> - 2017-01-04 19:19 +0100
                                Re: The Longest Common Sequence ( NonContiguous ) algorithm ( recursive ). moroney@world.std.spaamtrap.com (Michael Moroney) - 2017-01-05 03:34 +0000
                                  The Longest Common Sequence ( NonContiguous ) algorithm ( recursive ). Jeff-Relf.Me <@.> - 2017-01-04 22:26 -0800
                                    Re: The Longest Common Sequence ( NonContiguous ) algorithm ( recursive ). Anonymous <anonymous@invalid.tld> - 2017-01-05 08:18 +0000
                                      Re: The Longest Common Sequence ( NonContiguous ) algorithm ( recursive ). Peter Köhlmann <peter-koehlmann@t-online.de> - 2017-01-05 09:24 +0100
                                      PostScript is my thing. Jeff-Relf.Me <@.> - 2017-01-05 01:08 -0800
                                    My diffs now _perfectly match MicroSoft's WinMerge. Jeff-Relf.Me <@.> - 2017-01-07 03:56 -0800
                                      Re: My diffs now _perfectly match MicroSoft's WinMerge. Peter Köhlmann <peter-koehlmann@t-online.de> - 2017-01-07 13:09 +0100
                                      Re: My diffs now _perfectly match MicroSoft's WinMerge. jonkalb <google@kalbweb.com> - 2017-01-07 08:32 -0800
                                      Re: My diffs now _perfectly match MicroSoft's WinMerge. moroney@world.std.spaamtrap.com (Michael Moroney) - 2017-01-07 20:25 +0000
                                        Like a compiler that compiles itself, my Diff app diffs itself. Jeff-Relf.Me <@.> - 2017-01-07 17:53 -0800
                                        Re: My diffs now _perfectly match MicroSoft's WinMerge. Christian Gollwitzer <auriocus@gmx.de> - 2017-01-10 22:15 +0100
                                          Text file comparison is essential. Jeff-Relf.Me <@.> - 2017-01-16 11:23 -0800
                                            Nothing to compare, left and right, old and new. Jeff-Relf.Me <@.> - 2017-01-19 04:12 -0800
                                Re: The Longest Common Sequence ( NonContiguous ) algorithm ( recursive ). jmfbahciv <See.above@aol.com> - 2017-01-05 14:08 +0000
                                Re: The Longest Common Sequence ( NonContiguous ) algorithm ( recursive ). Vir Campestris <vir.campestris@invalid.invalid> - 2017-01-05 21:09 +0000
                                  Re: The Longest Common Sequence ( NonContiguous ) algorithm ( recursive ). legalize+jeeves@mail.xmission.com (Richard) - 2017-01-05 21:19 +0000
                                    "Functional" programming is "Tree Crawling". Jeff-Relf.Me <@.> - 2017-01-05 14:53 -0800
                                Re: The Longest Common Sequence ( NonContiguous ) algorithm ( recursive ). Lofty Goat <rlwatkins@gmail.com> - 2017-01-05 17:43 -0600
                                  Re: The Longest Common Sequence ( NonContiguous ) algorithm ( recursive ). woodbrian77@gmail.com - 2017-01-10 12:02 -0800
                                    Re: The Longest Common Sequence ( NonContiguous ) algorithm ( recursive ). Gareth Owen <gwowen@gmail.com> - 2017-01-10 20:13 +0000
                                    Re: The Longest Common Sequence ( NonContiguous ) algorithm ( recursive ). scott@slp53.sl.home (Scott Lurndal) - 2017-01-10 20:34 +0000
                                    Re: The Longest Common Sequence ( NonContiguous ) algorithm ( recursive ). Vir Campestris <vir.campestris@invalid.invalid> - 2017-01-10 21:21 +0000
                                      Re: The Longest Common Sequence ( NonContiguous ) algorithm ( recursive ). David Brown <david.brown@hesbynett.no> - 2017-01-10 22:48 +0100
                                        Re: The Longest Common Sequence ( NonContiguous ) algorithm ( recursive ). Vir Campestris <vir.campestris@invalid.invalid> - 2017-01-12 21:40 +0000
                                    Re: The Longest Common Sequence ( NonContiguous ) algorithm ( recursive ). red floyd <dont.bother@its.invalid> - 2017-01-10 13:46 -0800
                                    Re: The Longest Common Sequence ( NonContiguous ) algorithm ( recursive ). Ian Collins <ian-news@hotmail.com> - 2017-01-11 17:41 +1300
                              Re: I completely reWrote it, of course. jmfbahciv <See.above@aol.com> - 2017-01-05 14:08 +0000
                        What about you, GreyCloud ? Jeff-Relf.Me <@.> - 2017-01-16 11:02 -0800
                          Re: What about you, GreyCloud ? GreyCloud <mist@cumulus.com> - 2017-01-16 19:46 -0700
                            Health issues ? Jeff-Relf.Me <@.> - 2017-01-16 20:39 -0800
                              Re: Health issues ? GreyCloud <mist@cumulus.com> - 2017-01-17 11:50 -0700
                                Negative Interest Rates. Jeff-Relf.Me <@.> - 2017-01-19 04:25 -0800
                                  Re: Negative Interest Rates. GreyCloud <mist@cumulus.com> - 2017-01-19 11:47 -0700
                                    Negative Interest Rates "rips off" rich people, not the poor. Jeff-Relf.Me <@.> - 2017-01-19 19:23 -0800
                                      Re: Negative Interest Rates "rips off" rich people, not the poor. GreyCloud <mist@cumulus.com> - 2017-01-20 16:17 -0700
                          Tons of people have reviewed the code, source and object. Jeff-Relf.Me <@.> - 2017-01-19 04:02 -0800
                          Building a complex system can't be done when you're drunk and horny. Jeff-Relf.Me <@.> - 2017-01-19 04:17 -0800
                            Re: Building a complex system can't be done when you're drunk and horny. David Brown <david.brown@hesbynett.no> - 2017-01-19 13:59 +0100
                              No one is here to learn at your feet, sorry. Jeff-Relf.Me <@.> - 2017-01-19 05:30 -0800
                              Re: Building a complex system can't be done when you're drunk and horny. chrisv <chrisv@nospam.invalid> - 2017-01-19 07:37 -0600
                                Building a complex system can't be done when you're drunk and horny. Jeff-Relf.Me <@.> - 2017-01-19 05:43 -0800
                              Re: Building a complex system can't be done when you're drunk and horny. moroney@world.std.spaamtrap.com (Michael Moroney) - 2017-01-20 04:32 +0000
                                Usenet isn't WikiPedia; here, it's all play and no work, anything goes. Jeff-Relf.Me <@.> - 2017-01-19 21:02 -0800
                    The "Least Longest" diffs. Jeff-Relf.Me <@.> - 2017-01-03 03:04 -0800
                  Re: #define came from God himself, it's sacred. Vir Campestris <vir.campestris@invalid.invalid> - 2017-01-03 21:27 +0000
        Re: LoopP( !isDigit( Ch ) ); jonkalb <google@kalbweb.com> - 2017-01-16 22:05 -0800
          Re: LoopP( !isDigit( Ch ) ); woodbrian77@gmail.com - 2017-01-17 11:17 -0800
            Re: LoopP( !isDigit( Ch ) ); David Brown <david.brown@hesbynett.no> - 2017-01-17 22:20 +0100
          Re: LoopP( !isDigit( Ch ) ); Cholo Lennon <chololennon@hotmail.com> - 2017-01-17 18:18 -0300
            Re: LoopP( !isDigit( Ch ) ); Vir Campestris <vir.campestris@invalid.invalid> - 2017-01-17 21:51 +0000
      Re: while() and "Loop(3) { _Loop(4)..." aren't "impenetrable". Öö Tiib <ootiib@hot.ee> - 2016-12-26 13:24 -0800
        Re: "Standards" are like assholes, everyone's got one. Öö Tiib <ootiib@hot.ee> - 2016-12-26 14:27 -0800
          Re: _Underscores have never been -- and could never be -- a problem. Paavo Helde <myfirstname@osa.pri.ee> - 2016-12-27 13:25 +0200
            Re: Compiling C++ is trivial, always. Paavo Helde <myfirstname@osa.pri.ee> - 2016-12-27 21:38 +0200
              Re: Compiling C++ is trivial, always. Mr Flibble <flibble@i42.co.uk> - 2016-12-27 20:01 +0000
                Re: Compiling C++ is trivial, always. Paavo Helde <myfirstname@osa.pri.ee> - 2016-12-27 22:20 +0200
              Re: How big are your .CPP files ( in MegaBytes, not lines ) ? Paavo Helde <myfirstname@osa.pri.ee> - 2016-12-28 00:02 +0200
                Re: You could condense it down into fewer, larger, .CPP files. Ian Collins <ian-news@hotmail.com> - 2016-12-28 14:11 +1300
                  Re: What are you compiling, and how long does it take ? ! Ian Collins <ian-news@hotmail.com> - 2016-12-28 15:34 +1300
                    Re: Are you Linus Torvalds ? Ian Collins <ian-news@hotmail.com> - 2016-12-28 16:14 +1300
                      Re: The _Default "Subject:" line is neither mandatory or desirable. Ian Collins <ian-news@hotmail.com> - 2016-12-28 17:35 +1300
                        Re: Would a hardware/software upgrade help ? Ian Collins <ian-news@hotmail.com> - 2016-12-29 08:09 +1300
                        Re: The _Default "Subject:" line is neither mandatory or desirable. legalize+jeeves@mail.xmission.com (Richard) - 2016-12-28 20:01 +0000
            Re: I don't create .h files, not a one. Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk> - 2017-01-16 19:03 +0000
          Re: _Underscores have never been -- and could never be -- a problem. Öö Tiib <ootiib@hot.ee> - 2016-12-27 05:58 -0800
            Re: _Loop() works fine; I don't use "concurrent_vector.h". Vir Campestris <vir.campestris@invalid.invalid> - 2016-12-27 22:14 +0000
            Re: _Loop() works fine; I don't use "concurrent_vector.h". Öö Tiib <ootiib@hot.ee> - 2016-12-28 02:08 -0800
              Re: _Loop() works fine; I don't use "concurrent_vector.h". woodbrian77@gmail.com - 2016-12-28 09:45 -0800
        Re: "Standards" are like assholes, everyone's got one. Ian Collins <ian-news@hotmail.com> - 2016-12-27 12:34 +1300
    Re: My C++ Coding Standards ( apologies to Bjarne Stroustrup ). Peter Köhlmann <peter-koehlmann@t-online.de> - 2016-12-24 10:40 +0100
      Re: My C++ Coding Standards ( apologies to Bjarne Stroustrup ). woodbrian77@gmail.com - 2016-12-26 17:41 -0800
        Re: My C++ Coding Standards ( apologies to Bjarne Stroustrup ). Ian Collins <ian-news@hotmail.com> - 2016-12-27 15:28 +1300
    Re: My C++ Coding Standards ( apologies to Bjarne Stroustrup ). jonkalb <google@kalbweb.com> - 2016-12-26 23:24 -0800
      Re: My C++ Coding Standards ( apologies to Bjarne Stroustrup ). woodbrian77@gmail.com - 2016-12-27 10:54 -0800
        Re: My C++ Coding Standards ( apologies to Bjarne Stroustrup ). Ian Collins <ian-news@hotmail.com> - 2016-12-28 11:26 +1300
          Re: My C++ Coding Standards ( apologies to Bjarne Stroustrup ). woodbrian77@gmail.com - 2016-12-27 20:36 -0800
            Re: My C++ Coding Standards ( apologies to Bjarne Stroustrup ). Ian Collins <ian-news@hotmail.com> - 2016-12-28 17:42 +1300
              Re: My C++ Coding Standards ( apologies to Bjarne Stroustrup ). woodbrian77@gmail.com - 2016-12-27 21:24 -0800
                Re: My C++ Coding Standards ( apologies to Bjarne Stroustrup ). woodbrian77@gmail.com - 2016-12-27 22:16 -0800
                Re: My C++ Coding Standards ( apologies to Bjarne Stroustrup ). woodbrian77@gmail.com - 2016-12-28 13:29 -0800
                  Re: My C++ Coding Standards ( apologies to Bjarne Stroustrup ). Ian Collins <ian-news@hotmail.com> - 2016-12-29 10:46 +1300
                Re: My C++ Coding Standards ( apologies to Bjarne Stroustrup ). Ian Collins <ian-news@hotmail.com> - 2016-12-30 09:55 +1300
                  Re: My C++ Coding Standards ( apologies to Bjarne Stroustrup ). woodbrian77@gmail.com - 2016-12-29 14:19 -0800
                    Re: My C++ Coding Standards ( apologies to Bjarne Stroustrup ). Ian Collins <ian-news@hotmail.com> - 2016-12-30 11:25 +1300
                      Re: My C++ Coding Standards ( apologies to Bjarne Stroustrup ). woodbrian77@gmail.com - 2016-12-29 21:59 -0800
                        Re: My C++ Coding Standards ( apologies to Bjarne Stroustrup ). Ian Collins <ian-news@hotmail.com> - 2016-12-30 21:27 +1300
                          Re: My C++ Coding Standards ( apologies to Bjarne Stroustrup ). woodbrian77@gmail.com - 2016-12-30 09:51 -0800
                            Re: My C++ Coding Standards ( apologies to Bjarne Stroustrup ). Wouter van Ooijen <wouter@voti.nl> - 2016-12-30 19:46 +0100
                    Re: My C++ Coding Standards ( apologies to Bjarne Stroustrup ). David Brown <david.brown@hesbynett.no> - 2016-12-30 10:07 +0100
                    Re: My C++ Coding Standards ( apologies to Bjarne Stroustrup ). asetofsymbols@gmail.com - 2016-12-30 02:49 -0800
                      Re: My C++ Coding Standards ( apologies to Bjarne Stroustrup ). asetofsymbols@gmail.com - 2016-12-30 03:17 -0800
                Re: My C++ Coding Standards ( apologies to Bjarne Stroustrup ). Ian Collins <ian-news@hotmail.com> - 2016-12-29 10:08 +1300
                Re: My C++ Coding Standards ( apologies to Bjarne Stroustrup ). woodbrian77@gmail.com - 2016-12-28 12:41 -0800
                  Re: My C++ Coding Standards ( apologies to Bjarne Stroustrup ). Chris Vine <chris@cvine--nospam--.freeserve.co.uk> - 2016-12-28 21:59 +0000
                    Re: My C++ Coding Standards ( apologies to Bjarne Stroustrup ). Dombo <dombo@disposable.invalid> - 2016-12-29 14:34 +0100
                      Re: My C++ Coding Standards ( apologies to Bjarne Stroustrup ). woodbrian77@gmail.com - 2016-12-29 10:27 -0800
                        Re: My C++ Coding Standards ( apologies to Bjarne Stroustrup ). Dombo <dombo@disposable.invalid> - 2016-12-29 20:33 +0100
                    Re: My C++ Coding Standards ( apologies to Bjarne Stroustrup ). woodbrian77@gmail.com - 2016-12-28 15:14 -0800
                      Re: My C++ Coding Standards ( apologies to Bjarne Stroustrup ). Ian Collins <ian-news@hotmail.com> - 2016-12-29 13:05 +1300
                Re: My C++ Coding Standards ( apologies to Bjarne Stroustrup ). Chris Vine <chris@cvine--nospam--.freeserve.co.uk> - 2016-12-28 19:36 +0000

Page 1 of 7  [1] 2 3 4 5 6 7  Next page →


#47578 — My C++ Coding Standards ( apologies to Bjarne Stroustrup ).

FromJeff-Relf.Me <@.>
Date2016-12-23 17:06 -0800
SubjectMy C++ Coding Standards ( apologies to Bjarne Stroustrup ).
Message-ID<Jeff-Relf.Me@Dec.23--5.06P.Seattle.2016>
My C++ Coding Standards ( apologies to Bjarne Stroustrup ):

1. If everything ( but the top node ) were local,
   then you'd be spending all your time traversing trees,
   like an ant, instead of doing real work.

   So use Global Variables/Functions early and often.
   This, the common way, is ambiguous:

     if ( HandleEvents(1) ) ...

   Instead, use globals (below), like this:

     WaitForClick = 1, HandleEvents();  if ( Click ) ...

   Globals:

     int WaitForClick, Click ;

     void HandleEvents() { MSG  Msg ;
       GetMsg:   PeekMessage( &Msg, 0, 0, 0, PM_REMOVE );
       Click = Msg.message == WM_LBUTTONDOWN ;
       //  Handle system events, like WM_NCACTIVATE...  Blah Blah.

       //  When WaitForClick == 1, Exit if-and-only-if there's a Click:
       if ( Click || !WaitForClick  ) { WaitForClick = 0 ;  return ;   }

       //  Draw Stuff... Blah Blah.
       goto GetMsg ;  }

2. InLine Conditionals ( Bool ? True() : False() ) are nice and concise.
   For example:

     inline  int  TheSmaller( int X, int Y ) { return X < Y ? X : Y ;  }

     #define  FlagTheNym   /*  'V' is for Visitor. */  \
        Nym.Trusted ? 'T' : Nym.Dropped ? 'D' : Nym.Kid ? 'K' : Nym.Adult ? 'A' : 'V'

3. Simplify Odd system calls, like this:

     wchar  aString[999];
     Str( aString, L"A 32 bit, unsigned Random Integer: %I64d", Rand32 );

     Globals:

       typedef wchar_t  wchar ;
       unsigned int  uiRand ;  
       #define  Rand32 ( rand_s( &uiRand ), uiRand )  //  Seeding is implicit.
       #define  Str  swprintf  //  Print to a Unicode string, "printf" style.

4. A variable's declared type isn't always appropriate; so Type Cast.

     #define  szStr  (int)wcslen  //  Return the length of a Unicode string.

     #define  Zero( X )  memset( & X, 0, sizeof X )  //  Implicit cast to (void*).

     Zero( aStruct );

5. Create fewer/larger functions.
   Put everything in a single, large .CPP file -- don't create .H files.

6. Local, ShortTerm variables are nice.  Like:

     wchar _T[999], *P = _T ;

     Loop(3) { _Loop(4) P += Str( P, L"( %d, %d )%s", J, JJ, J == eJ ? L"\n" :  L" " );  }

     printf( _T );

     Globals:

       #define   Loop( N )  int         eJ = ( N ) - 1, J = -1 ; while ( ++J <= eJ )
       #define  _Loop( N )  int JJ = J, eJ = ( N ) - 1, J = -1 ; while ( ++J <= eJ )
       #define  Str  swprintf
       typedef  wchar_t  wchar ;

     Output:

       ( 0, 0 ) ( 1, 0 ) ( 2, 0 ) ( 3, 0 )
       ( 0, 1 ) ( 1, 1 ) ( 2, 1 ) ( 3, 1 )
       ( 0, 2 ) ( 1, 2 ) ( 2, 2 ) ( 3, 2 )

See X.CPP in "Jeff-Relf.Me/X.ZIP". 

[toc] | [next] | [standalone]


#47581

FromPaavo Helde <myfirstname@osa.pri.ee>
Date2016-12-24 11:00 +0200
Message-ID<i5Wdne2lmpeKpMPFnZ2dnUU78YnNnZ2d@giganews.com>
In reply to#47578
On 24.12.2016 3:06, Jeff-Relf.Me wrote:
> My C++ Coding Standards ( apologies to Bjarne Stroustrup ):
>
> 1. If everything ( but the top node ) were local,
>     then you'd be spending all your time traversing trees,
>     like an ant, instead of doing real work.
>
>     So use Global Variables/Functions early and often.
>     This, the common way, is ambiguous:
>
>       if ( HandleEvents(1) ) ...
>
>     Instead, use globals (below), like this:
>
>       WaitForClick = 1, HandleEvents();  if ( Click ) ...
>
>     Globals:
>
>       int WaitForClick, Click ;
>
>       void HandleEvents() { MSG  Msg ;
>         GetMsg:   PeekMessage( &Msg, 0, 0, 0, PM_REMOVE );
>         Click = Msg.message == WM_LBUTTONDOWN ;
>         //  Handle system events, like WM_NCACTIVATE...  Blah Blah.
>
>         //  When WaitForClick == 1, Exit if-and-only-if there's a Click:
>         if ( Click || !WaitForClick  ) { WaitForClick = 0 ;  return ;   }
>
>         //  Draw Stuff... Blah Blah.
>         goto GetMsg ;  }
>
> 2. InLine Conditionals ( Bool ? True() : False() ) are nice and concise.
>     For example:
>
>       inline  int  TheSmaller( int X, int Y ) { return X < Y ? X : Y ;  }
>
>       #define  FlagTheNym   /*  'V' is for Visitor. */  \
>          Nym.Trusted ? 'T' : Nym.Dropped ? 'D' : Nym.Kid ? 'K' : Nym.Adult ? 'A' : 'V'
>
> 3. Simplify Odd system calls, like this:
>
>       wchar  aString[999];
>       Str( aString, L"A 32 bit, unsigned Random Integer: %I64d", Rand32 );
>
>       Globals:
>
>         typedef wchar_t  wchar ;
>         unsigned int  uiRand ;
>         #define  Rand32 ( rand_s( &uiRand ), uiRand )  //  Seeding is implicit.
>         #define  Str  swprintf  //  Print to a Unicode string, "printf" style.
>
> 4. A variable's declared type isn't always appropriate; so Type Cast.
>
>       #define  szStr  (int)wcslen  //  Return the length of a Unicode string.
>
>       #define  Zero( X )  memset( & X, 0, sizeof X )  //  Implicit cast to (void*).
>
>       Zero( aStruct );
>
> 5. Create fewer/larger functions.
>     Put everything in a single, large .CPP file -- don't create .H files.
>
> 6. Local, ShortTerm variables are nice.  Like:
>
>       wchar _T[999], *P = _T ;
>
>       Loop(3) { _Loop(4) P += Str( P, L"( %d, %d )%s", J, JJ, J == eJ ? L"\n" :  L" " );  }
>
>       printf( _T );
>
>       Globals:
>
>         #define   Loop( N )  int         eJ = ( N ) - 1, J = -1 ; while ( ++J <= eJ )
>         #define  _Loop( N )  int JJ = J, eJ = ( N ) - 1, J = -1 ; while ( ++J <= eJ )
>         #define  Str  swprintf
>         typedef  wchar_t  wchar ;
>
>       Output:
>
>         ( 0, 0 ) ( 1, 0 ) ( 2, 0 ) ( 3, 0 )
>         ( 0, 1 ) ( 1, 1 ) ( 2, 1 ) ( 3, 1 )
>         ( 0, 2 ) ( 1, 2 ) ( 2, 2 ) ( 3, 2 )
>
> See X.CPP in "Jeff-Relf.Me/X.ZIP".

Nice. One suggestion: you should consider adding templates into your 
toolkit. A creative mix of macros and templates makes the code even more 
impenetrable. Your _Loop macros could be probably upgraded to use 
recursive templates instead of boring while cycles, for example!


[toc] | [prev] | [next] | [standalone]


#47626 — Re: while() and "Loop(3) { _Loop(4)..." aren't "impenetrable".

FromPaavo Helde <myfirstname@osa.pri.ee>
Date2016-12-26 23:17 +0200
SubjectRe: while() and "Loop(3) { _Loop(4)..." aren't "impenetrable".
Message-ID<rIadnbKYnc9nFfzFnZ2dnUU78U_NnZ2d@giganews.com>
In reply to#47581
On 26.12.2016 22:36, Jeff-Relf.Me wrote:
> You ( Paavo Helde ) replied ( to me ):
>> > 6. Local, ShortTerm variables are nice.  Like:
>> >
>> >       wchar _T[999], *P = _T ;
>> >
>> >       Loop(3) { _Loop(4) P += Str( P, L"( %d, %d )%s", J, JJ, J == eJ ? L"\n" :  L" " );  }
>> >
>> >       printf( _T );
>> >
>> >       Globals:
>> >
>> >         #define   Loop( N )  int         eJ = ( N ) - 1, J = -1 ; while ( ++J <= eJ )
>> >         #define  _Loop( N )  int JJ = J, eJ = ( N ) - 1, J = -1 ; while ( ++J <= eJ )
>> >         #define  Str  swprintf
>> >         typedef  wchar_t  wchar ;
>> >
>> >       Output:
>> >
>> >         ( 0, 0 ) ( 1, 0 ) ( 2, 0 ) ( 3, 0 )
>> >         ( 0, 1 ) ( 1, 1 ) ( 2, 1 ) ( 3, 1 )
>> >         ( 0, 2 ) ( 1, 2 ) ( 2, 2 ) ( 3, 2 )
>> >
>> > See X.CPP in "Jeff-Relf.Me/X.ZIP".
>>
>> A creative mix of macros and templates makes the code even more
>> impenetrable. Your _Loop macros could be probably upgraded to use
>> recursive templates instead of boring while cycles, for example!
>
> while() and "Loop(3) { _Loop(4)..." aren't "impenetrable", last I checked.

I guess this is something we can disagree on.

_Loop(4) however is just undefined behavior, one is not allowed to use 
such identifiers.

PS. I am currently in the process of refactoring some code from a 
previous coworker who liked macros and templates very much. This task 
has been postponed for 10 years because the code is so intractable. I'm 
pretty sure this coworker thought that he wrote the best code and 
followed the best coding conventions.


[toc] | [prev] | [next] | [standalone]


#47629 — Re: Refactoring is good, God's speed.

FromPaavo Helde <myfirstname@osa.pri.ee>
Date2016-12-27 01:17 +0200
SubjectRe: Refactoring is good, God's speed.
Message-ID<fpudnft1K_KUOPzFnZ2dnUU78XnNnZ2d@giganews.com>
In reply to#47626
On 26.12.2016 23:51, Jeff-Relf.Me wrote:
> You ( Paavo Helde ) replied ( to me ):
>> > while() and "Loop(3) { _Loop(4)..." aren't "impenetrable", last I checked.
>>
>> I guess this is something we can disagree on.
>>
>> _Loop(4) however is just undefined behavior, one is not allowed to use
>> such identifiers.
>
> Macros are _good_, you should use them.
> Who wouldn't prefer Loop(4) over "for( i=0; I <= 3; i++ )" ?

I started to write down a 10-bullet answer for that question, but then I 
realized that you must be just trolling as nobody can't be that stupid.

> You must be prejudiced; afraid of change.

I have changed away from C and macro madness and have no plans to go 
back, thank you.

[toc] | [prev] | [next] | [standalone]


#47630 — Re: Refactoring is good, God's speed.

From"Rick C. Hodgin" <rick.c.hodgin@gmail.com>
Date2016-12-26 15:26 -0800
SubjectRe: Refactoring is good, God's speed.
Message-ID<6f5fba07-f764-4568-8bac-04f78586aabb@googlegroups.com>
In reply to#47629
On Monday, December 26, 2016 at 6:17:46 PM UTC-5, Paavo Helde wrote:
> I have changed away from C and macro madness and have no plans to go 
> back, thank you.

I believe in macros (and Crystal Light ... because I believe in me).

I have created a full pre-processor language in CAlive that is a
complete subset of the language, such that things are exposed through
arrays and indices (when reference), such as "filename.ext[200]" to
reference the 200th line of the file filename.ext.  The on-disk file
isn't changed, but in memory it is changed.  You can insert lines,
replace anything, etc.  Full editing is available through the macro
language, and there is also an ability to write out a hard commit to
disk so that a section between a starting marker and ending marker is
physically updated on disk.

[singing]  "If I ever the time ... to complete this language of mine ...
            then maybe I can make it sing ... and become a real, yes a
            real thing."

But, we shall see, Paavo.  We shall see.

Best regards,
Rick C. Hodgin

[toc] | [prev] | [next] | [standalone]


#47638 — Re: PHP could use #define, seriously.

FromPaavo Helde <myfirstname@osa.pri.ee>
Date2016-12-27 10:01 +0200
SubjectRe: PHP could use #define, seriously.
Message-ID<E4GdnTkTGK1-gv_FnZ2dnUU78dXNnZ2d@giganews.com>
In reply to#47629
On 27.12.2016 3:45, Jeff-Relf.Me wrote:
> You ( Paavo Helde ) replied ( to me ):
>> > Macros are _good_, you should use them.
>> > Who wouldn't prefer Loop(4) over "for( i=0; I <= 3; i++ )" ?
>>
>> I started to write down a 10-bullet answer for that question, but then I
>> realized that you must be just trolling as nobody can't be that stupid.
>
> Sure, I wrote thousands of lines of C++, just to troll you; to wit:
>
>    http://Jeff-Relf.Me/cStyle.HTM
>    <Screenshot  <http://Jeff-Relf.Me/Visual-Studio-2015.PNG>>
>
>> > You must be prejudiced; afraid of change.
>>
>> I have changed away from C and macro madness
>> and have no plans to go back, thank you.
>
>  From C to what, PHP ?

If you haven't figured out in 40 years that C and C++ are different 
languages, then I guess it's too late for you now.

> My professional C++ code gets input from, and outputs to Excel 2016.

What C++ code? What you have posted online so far is bad C, with fixed 
size arrays and unsafe sprintf() variants.

>
> PHP could use #define, seriously.

PHP is not written in C++.

[toc] | [prev] | [next] | [standalone]


#47697 — Re: Refactoring is good, God's speed.

Fromlegalize+jeeves@mail.xmission.com (Richard)
Date2016-12-28 18:10 +0000
SubjectRe: Refactoring is good, God's speed.
Message-ID<o40v7a$n1o$1@news.xmission.com>
In reply to#47629
[Please do not mail me a copy of your followup]

Paavo Helde <myfirstname@osa.pri.ee> spake the secret code
<fpudnft1K_KUOPzFnZ2dnUU78XnNnZ2d@giganews.com> thusly:

>I have changed away from C and macro madness and have no plans to go 
>back, thank you.

Fuckin' A, bubba.
-- 
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
            The Terminals Wiki <http://terminals-wiki.org>
     The Computer Graphics Museum <http://computergraphicsmuseum.org>
  Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>

[toc] | [prev] | [next] | [standalone]


#47698 — Re: Refactoring is good, God's speed.

Fromwoodbrian77@gmail.com
Date2016-12-28 10:20 -0800
SubjectRe: Refactoring is good, God's speed.
Message-ID<f69ae822-dbfe-45ec-b277-5b1b4b5b3e1b@googlegroups.com>
In reply to#47697
On Wednesday, December 28, 2016 at 12:10:58 PM UTC-6, Richard wrote:

I'm glad these "men" were busted:

http://www.twincities.com/2016/12/27/south-st-paul-teacher-partner-allegedly-abused-8-victims/

Children deserve better than "teachers" getting them
drunk and high in order to abuse them.

[toc] | [prev] | [next] | [standalone]


#47756 — Re: Refactoring is good, God's speed.

Frominterval1066@gmail.com
Date2016-12-30 10:43 -0800
SubjectRe: Refactoring is good, God's speed.
Message-ID<6d043fba-f4c8-45c2-aecc-63e780516fd1@googlegroups.com>
In reply to#47626
On Monday, December 26, 2016 at 1:51:38 PM UTC-8, Jeff-Relf.Me wrote:
> Macros are _good_, you should use them.

Sure. Microsoft created a whole language out of them. Its called MFC.

[toc] | [prev] | [next] | [standalone]


#47777 — Re: Refactoring is good, God's speed.

Fromlegalize+jeeves@mail.xmission.com (Richard)
Date2017-01-02 00:44 +0000
SubjectRe: Refactoring is good, God's speed.
Message-ID<o4c7pt$ib$1@news.xmission.com>
In reply to#47756
[Please do not mail me a copy of your followup]

interval1066@gmail.com spake the secret code
<6d043fba-f4c8-45c2-aecc-63e780516fd1@googlegroups.com> thusly:

>On Monday, December 26, 2016 at 1:51:38 PM UTC-8, Jeff-Relf.Me wrote:
>> Macros are _good_, you should use them.
>
>Sure. Microsoft created a whole language out of them. Its called MFC.

That's a bit unfair.  When MFC was created, lots of what we can do
with templates wasn't known yet.  Also, the message maps and whatnot
are basically static data structures.  If you didn't use macros to
eliminate the boilerplate, it would be worse.

There are still a few small tasks at which macros are useful.  Namely
token composition and emitting a chunk of repeated boilerplate.  In
this regard, the preprocessor is basically being used as a limited
form of code generation.  It's fine until you get into advanced code
generation and then you're better off with a separate tool, which
thankfully is easily written in standard C++.
-- 
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
            The Terminals Wiki <http://terminals-wiki.org>
     The Computer Graphics Museum <http://computergraphicsmuseum.org>
  Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>

[toc] | [prev] | [next] | [standalone]


#47780 — #define came from God himself, it's sacred.

FromJeff-Relf.Me <@.>
Date2017-01-01 23:51 -0800
Subject#define came from God himself, it's sacred.
Message-ID<Jeff-Relf.Me@Jan.1--11.51P.Seattle.2017>
In reply to#47777
#define came from God himself, it's sacred.

For example:  At times, my code needs to set flags; to wit:

  #define TopFlags  (  S =  BB_Slow <=  EE_Slow,  \
                      _S = _BB_Slow <= _EE_Slow,  \
                       F =  BB_Fast <=  EE_Fast,  \
                      _F = _BB_Fast <= _EE_Fast   )

  #define BtmFlags  (  S =  EE_Slow >=  BB_Slow,  \
                      _S = _EE_Slow >= _BB_Slow,  \
                       F =  EE_Fast >=  BB_Fast,  \
                      _F = _EE_Fast >= _BB_Fast   )

I'd much rather see "TopFlags", in places, then the expansion.

The best code ( for me, and only me ) 
is the code I designed and wrote myself.

As a programmer, text file comparison is essential, like water.
So I wrote my own diff routines 
( ScreenShot: http://Jeff-Relf.Me/Diff.PNG ).
[ See X.EXE, X.HTM and X.CPP in http://Jeff-Relf.Me/X.ZIP ]

Diff scans ( comparing "Tokens"[*] ) from four directions at once 
( LeftOlder: to Top, to Bottom;  RightNewer: to Top, to Bottom ).
[ *: "Lines" in files, "Words" in lines ]

At it's heart, and right off the bat, 
Diff skips unchanged Tokens at the start and/or end.
I call this "the Pinch".

Then it "peels off" MisMatches from the ends ( the "diffs" )...
Stopping when it finds MatchCount matches[*]...
Pinching and Peeling, from the edges to the middle.
[ *: MatchCount is 1 for normal, nearby matches,
     not counting BlankLines.  Otherwise, WhiteSpace matters. ]

The "diffs" are then sorted by line number and printed...
both the lines in the files and the words in the lines...
green for the new stuff, red for the old stuff.

This way, I can easily focus on the red and green words,
(mostly) ingnoring the rest.

Peel(), below, peels off diffs from the tops and bottoms
of LeftOlder and RightNewer text files.

BB is a pointer to start of a dynamic array of lines ( pointers );
EE points to the end of the array.

Already, BB and EE point to "diffs" (mismatches lines).
 BB and  EE are from the LeftOlder file.
_BB and _EE are from the RightNewer file.

  void Peel( LnA BB, LnA EE, LnA _BB, LnA _EE ) { int rv, S, _S, F, _F ;  
    LnP t, _t ;  LnA  BB_Slow, _BB_Slow,  BB_Fast, _BB_Fast,   EE_Slow, _EE_Slow, EE_Fast, _EE_Fast ;
    TopMatch = BtmMatch = 0, BB_Slow = BB, _BB_Slow = _BB, EE_Slow = EE, _EE_Slow = _EE, ReSetBB_Fast, ReSetEE_Fast ;

    Top:    if ( TopMatch ) if ( BtmMatch ) goto Done ; else goto Btm ;
            if ( TopFlags, TopMatch = !S && !_S ) { 

              //  Done scaning the top of LeftOlder and RightNewer, no matches.
              BB_Match = 0 ;    goto Btm ;  }

            if (  F && _S ) if ( !gTopMatch(  BB_Fast -  BB_Slow, BB_Fast, EE, _BB_Slow, _EE ) )  BB_Fast++ ; else goto Btm ;
            if ( _F &&  S ) if ( !gTopMatch( _BB_Fast - _BB_Slow, BB_Slow, EE, _BB_Fast, _EE ) ) _BB_Fast++ ; else goto Btm ;

            //  Lower the top of LeftOlder and RightNewer.
            if ( TopFlags, !( F && _S || _F && S ) ) BB_Slow += S, _BB_Slow += _S, ReSetBB_Fast ;                  goto Btm ;

    Btm:    if ( BtmMatch ) if ( TopMatch ) goto Done ; else goto Top ;   
            if ( BtmFlags, BtmMatch = !S && !_S ) { 

              //  Done scaning the bottom of LeftOlder and RightNewer, no matches.
              EE_Match = 0 ;    goto Top ;  }

            if (  F && _S ) if ( !gBtmMatch(  EE_Slow -  EE_Fast, BB, EE_Fast, _BB, _EE_Slow ) )  EE_Fast-- ; else goto Top ;
            if ( _F &&  S ) if ( !gBtmMatch( _EE_Slow - _EE_Fast, BB, EE_Slow, _BB, _EE_Fast ) ) _EE_Fast-- ; else goto Top ;

            //  Raise the bottom of LeftOlder and RightNewer.
            if ( BtmFlags, !( F && _S || _F && S ) ) EE_Slow -= S, _EE_Slow -= _S, ReSetEE_Fast ;                  goto Top ;
       
    Done:   BB_Match = BB_Match && EE_Match ? BB_Match : EE_Match ? ( _BB_Match = _EE_Match, EE_Match ) : ( _BB_Match = _EE, EE );
            EE_Match = BB_Match && EE_Match ? EE_Match : BB_Match ? ( _EE_Match = _BB_Match, BB_Match ) : ( _EE_Match = _BB, BB );  }

Globals:

  int  TopMatch, BtmMatch ;    LnP  F, _F ;    
  LnA  BBx, EEx, _BBx, _EEx, BB_Match, EE_Match, _BB_Match, _EE_Match ;

  #define TokensMatch  ( F && _F && F[-1] == _F[-1] && Eq( F, _F ) )
  #define ReSetBB_Fast  ( BB_Fast = BB_Slow, _BB_Fast = _BB_Slow )
  #define ReSetEE_Fast  ( EE_Fast = EE_Slow, _EE_Fast = _EE_Slow )

  #define  ShaveDown  ( goDown( F, EEx, EE  ), goDown( _F, _EEx, _EE  ), TokensMatch )
  #define  PinchDown  ( goDown( F, BBx, EE  ), goDown( _F, _BBx, _EE  ), TokensMatch )
  #define  goDown( P, PP, EE ) ( P = ++PP >= EE ? 0 : *PP )

  int gTopMatch( int Wander, LnA BB, LnA EE, LnA _BB, LnA _EE ) { 
     BB_Match = EEx = BB, _BB_Match = _EEx = _BB, EEx--, _EEx-- ;  
     Loop( 1 + Wander/99 ) if ( ShaveDown ) eJ += !*F ;  else return 0 ;
     return TopMatch = 1 ;   }

  #define  ShaveUp  ( goUp( F, BBx, BB  ), goUp( _F, _BBx, _BB  ), TokensMatch )
  #define  PinchUp  ( goUp( F, EEx, BBx ), goUp( _F, _EEx, _BBx ), TokensMatch )
  #define  goUp( P, PP, BB )  ( P = --PP <  BB ? 0 : *PP )

  int gBtmMatch( int Wander, LnA BB, LnA EE, LnA _BB, LnA _EE ) { 
    EE_Match = BBx = EE, _EE_Match = _BBx = _EE ;  
    Loop( 1 + Wander/99 ) if ( ShaveUp ) eJ += !*F ;  else return 0 ;
    return BtmMatch = 1 ;   }

Far Globals:

  #define   Loop( N )  int  eJ = ( N ) - 1, J = -1 ; while ( ++J <= eJ )

  typedef wchar_t  wchar ;  typedef wchar  *LnP ;  typedef  LnP  *LnA ;

[toc] | [prev] | [next] | [standalone]


#47783 — #define came from God himself, it's sacred.

FromJeff-Relf.Me <@..yep>
Date2017-01-02 08:00 +0000
Subject#define came from God himself, it's sacred.
Message-ID<ifte5e$kqd$e@alt.butts.pillow.biters>
In reply to#47780
#define came from God himself, it's sacred. #define came from God
himself. Himself, it's sacred.

To set flags; to set flags; to set flags; to set flags; to wit: For
example: At times, my code needs to set flags; to set.

_EE_Slow <= EE_Fast <= EE_Fast, \ F = _BB_Slow <= _EE_Slow, \ F =
BB_Slow, \ _F = BB_Slow, \ _S = BB_Fast <= EE_Slow <= EE_Slow <=
_BB_Fast <= _BB_Slow <= EE_Slow <= _BB_Fast <= EE_Fast <= EE_Fast )
#define TopFlags ( S = _BB_Slow, \ _F = BB_Slow <= EE_Slow <=.

> = BB_Slow, \ F = _BB_Slow = BB_Fast, \ _S = _EE_Slow = _BB_Fast =
> BB_Slow, \ _F = EE_Slow, \ _F = _EE_Slow, \ _F = EE_Slow = BB_Slow =
> _BB_Slow = BB_Slow, \ F = EE_Slow = BB_Slow, \ _F = _BB_Fast =
> _BB_Fast ) #define BtmFlags ( S = EE_Slow = _EE_Slow.

I'd much rathen ther see "TopFlags", in places, ther see "TopFlags",
in places, then the. Expansion.

Wrote myself. The best code ( for me, and only me ) is the best code I
designed and wrote myself. The code ( for me, and. The best code ( for
me, and wrote myself.

So I wrote my own diff.PNG ). [ See X.CPP in http://Jeff-Relf.Me/X.ZIP
] As a programmer, text file comparison is essential, like water. So I
wrote my own. Routines ( ScreenShot: http://Jeff-Relf.Me/X.ZIP ] As a
programmer, text file comparison is essential, like water. So I wrote
my own diff routines ( ScreenShot: http://Jeff-Relf.Me/X.ZIP ] As a
programmer, text file comparison is essential, like water.

Four directions at once ( comparing "Tokens"[*] ) from four directions
( LeftOlder: to Top, to Top, to Top, to Top, to Top, to Top, to Top,
to Top, to Bottom four directions at once ( LeftOlder: to Top, to Top,
to Bottom; RightNewer: to Bottom; RightNewer: to Top, to Top, to Top,
to Top, to Top, to Bottom; RightNewer: to Top, to Top, to Bottom four.

Heart, Diff skips unch". I call the Pinchanged Tokens at the bat, and
right off the bat, and right off this "the start, Diff this "the
Pinch". At it's heart, and right off the bat, Diff. At it's heart, and
right off the bat, and/or end.

*: MatchCount is 1 for normal, nearby matches[*]. MisMatchCount
matters. [ *: Matches to the "diffs" ). Pinching when it finds ( the
ends ( therwise, WhiteSpace middle. Othe edges from the ends ( the
middle. Stopping and Peels off" MisMatches, nearby matters. Stopping
and Peels off" MisMatchCount is 1 for not count matchCount matches,
nearby matchCount. Stopping, from the ends ( the ends ( the ends ( the
edges from the ends Matches from the "diffs" ). Othe ends ( the ends (
the "diffs" ). Stopping when it "peels off" MisMatches[*].

Both the old stuff, red by lines. Both the new stuff, red by line
number and the "diffs" are the words in the words in the words in then
sorted by line number and the number and then sorted by line number
and printed. Both the words in the old stuff, red by lines in the new
stuff, red by lines. Both the lines in then sorted.

This way, I can easily focus on the rest. This way. This way, I can
easily focus on the red and green words, (mostly) ing the red and
green words, (mostly) ing the rest. Rest.

Peel(), below, peels off diffs from the tops and RightNewer and
bottoms of LeftOlder. RightNewer and RightNewer and bottoms of
LeftOlder and RightNewer and bottoms of LeftOlder and RightNewer text
files.

BB is a pointers ); EE pointer to start of a pointer to the end.
Pointers ); EE points to start of a pointer to start of a points to
the end of lines ( pointer to start of a points to start of a dynamic
array.

BB and EE point to "diffs" (mismatches. Lines). BB and EE point to
"diffs" (mismatches lines). Already, BB and EE point to "diffs"
(mismatches lines). BB and EE are from the LeftOlder file. BB and _EE
are from the LeftOlder file. Already, BB and _EE point to "diffs"
(mismatches lines).

Peel( LnP t, EE, _BB, LnA BB_Slow, BB, _EE ) { int rv, S, _F ; LnA
BB_Slow, _F ; void Peel( LnA _BB_Fast ; LnA BB, _t ; LnA _BB, EE_Slow
= BtmMatch = 0, BB_Fast, _EE_Fast ; TopMatch = _BB_Slow, _BB, EE_Fast,
EE_Fast, _t ; LnA _BB, _BB_Slow = BB_Fast, _EE_Slow, BB_Slow, _BB_Slow
= EE, LnA EE, _BB_Slow = EE_Fast, EE, _EE_Slow = BtmMatch = _BB_Fast,
EE, ReSetEE_Fast, EE_Slow, _EE_Fast, _S, _EE_Slow, BB_Slow, _BB_Slow,
_F ; LnA _EE_Slow, _BB, LnA BB, LnA BB_Slow = EE_Slow = BtmMatch =
BtmMatch = BB_Slow = BB_Fast, _BB_Slow = EE_Fast, _BB_Fast, _BB,
_BB_Slow.

TopFlags, TopMatch ) if ( BtmMatch ) goto Done ; else goto Done ; else
goto BtmMatch ) if ( Btm ; else goto Done ; else goto Done ; else goto
Btm ; else goto BtmMatch ) goto BtmMatch ) if ( TopMatch ) if (
TopFlags.

BB_Match = 0 ; goto Btm ; } // Done scaning the top of LeftOlder and
RightNewer, no matches. BB_Matches. BB_Match = 0 ; goto. Top of
LeftOlder and RightNewer, no matches. BB_Matches.

If ( !gTopMatch( _F && S ) if ( _BB_Fast, EE, _BB_Slow, EE, _BB_Fast -
_BB_Slow, BB_Fast++ ; if ( _F && S ) BB_Slow, _BB_Fast - BB_Fast++ ;
else goto Btm ; if ( F && S ) if ( _BB_Fast - BB_Slow, BB_Fast, EE,
_BB_Fast - _BB_Fast++ ; else goto Btm ; else goto Btm ; else goto Btm
; else goto Btm ; if ( _F && S ) if ( _F && _S ) BB_Fast - _BB_Slow,
BB_Fast, EE, _EE ) BB_Slow, _BB_Fast, EE, _BB_Slow, BB_Fast - BB_Slow,
_EE.

RightNewer. If ( TopFlags, !( F && _S || _F && _S ||. If ( TopFlags,
!( F && _S, _BB_Slow += S, ReSetBB_Slow += S, _BB_Slow += S,
ReSetBB_Slow += S, _BB_Slow += S, _BB_Slow += S, _BB_Slow += _S,
ReSetBB_Slow += _S || _F && S ) BB_Slow += S, ReSetBB_Slow += S,
_BB_Slow += S, _BB_Fast ;  goto Btm ; // Lower.

Goto Done ; if ( BtmMatch ) if ( BtmMatch = !S && !_S ) goto Done ; if
( BtmMatch ) goto TopMatch ) goto Done ; else goto TopMatch ) if (
TopMatch = !S && !_S ) if ( Btm: if ( BtmMatch ) { BtmMatch = !S &&
!_S ) {.

EE_Match. 0 ; goto Top ; goto Top ; } // Done scaning the bottom of
LeftOlder and RightNewer, no match = 0 ; goto Top ; goto Top ; } //
Done scaning the bottom of LeftOlder and RightNewer, no matches.

_EE_Slow, _BB, EE_Fast, BB, _BB, _EE_Slow - EE_Slow ) if ( !gBtmMatch(
EE_Fast, BB, _BB, EE_Slow ) if ( F && _S ) EE_Fast-- ; else goto Top ;
else goto Top ; else goto Top ; else goto Top ; else goto Top ; else
goto Top ; if ( !gBtmMatch( _F && _S ) if ( !gBtmMatch( EE_Fast ) if (
F && _S ) if ( F && _S ) _EE_Fast-- ; else goto Top ; else goto Top ;
else goto Top ; else goto Top ; else goto Top ; if ( F && _S ).

If ( BtmFlags, !( F && _S, ReSetEE_Slow -= _S || _F && S ) EE_Slow -=
_S || _F && _S || _F && _S || _F && S ) EE_Slow -= S, ReSetEE_Slow -=
_S || _F && _S || _F && _S, _EE_Slow -= S, _EE_Slow -= S, ReSetEE_Slow
-= S, ReSetEE_Fast.    goto Top ; // Raise the bottom of LeftOlder and
RightNewer.

_EE, EE ); } Done: BB_Match = _BB_Match, EE_Match : BB_Match =
_EE_Match = _EE_Match : BB_Match ) : ( _EE, EE ); EE_Match ? (
_BB_Match = BB_Match = _EE_Match, EE_Match ) : BB_Match = _BB_Match )
: BB_Match : EE_Match : ( _EE_Match : ( _BB_Match ? BB_Match =
BB_Match = BB_Match ? ( _BB_Match = _BB_Match = BB_Match ? EE_Match,
EE ); EE_Match ? BB_Match ) : ( _EE, EE_Match ? ( _EE_Match &&
EE_Match = BB_Match ? EE_Match ? ( _BB_Match ? BB_Match ? BB_Match =
BB_Match = _BB_Match = BB_Match.

Globals:

LnP F, _BB_Match, EEx, _EEx, _BBx, BtmMatch, BtmMatch ; int TopMatch,
_BB_Match ; LnP F, _BB_Match, BB_Match ; LnP F, _EEx, _F ; LnA BBx,
BtmMatch, _BBx, EEx, BtmMatch, _BBx, BtmMatch, BtmMatch.

EE_Fast ( BB_Fast = EE_Fast = BB_Fast = _F[-1] && _F[-1] == _EE_Slow,
_F && _F[-1] && _F ) #define TokensMatch ( F, _F[-1] == _BB_Fast (
BB_Fast = EE_Slow, _F[-1] && Eq( F && _F && _F && Eq( F, _F && Eq( F
&& _F ) #define ReSetEE_Slow ) #define TokensMatch ( F && F[-1] ==
_EE_Fast = BB_Slow, _BB_Slow, _F[-1] == _EE_Fast = _F[-1] == _EE_Fast
( F && _F && _F ) #define TokensMatch.

_BBx, EE ), TokensMatch ) #define PinchDown ( goDown( P = ++PP )
#define goDown( F, _EE ? 0 : *PP ) #define PinchDown( F, EE ), goDown(
F, _EE ? 0 : *PP >= EE ), TokensMatch ) ( goDown( _F, _EE ), goDown(
F, _EEx, EE ), TokensMatch ) #define PinchDown( _F, BBx, EE ) #define
goDown( F, EE ), TokensMatch ) #define PinchDown ( goDown( F, EE ),
goDown ( goDown( P, EEx, _EEx, EE ), goDown ( goDown( F, BBx, EEx, EE
? 0 : *PP >= EEx, EE.

_BB, LnA BB_Match = EEx = EEx-- ; else return TopMatch( int Wander,
LnA BB, LnA _EEx = BB_Match( int Wander, LnA _BB, EEx--, _BB, _EEx--,
_BB_Match = _BB, LnA EE, LnA BB, EEx = _EEx = BB, EEx = _EE ) if (
ShaveDown ) { BB_Match( int gTopMatch( int Wander, LnA BB, LnA _EEx--,
_BB_Match = BB, LnA EEx--, _BB, LnA _EE ) eJ += !*F ; Loop( 1 +
Wander/99 ) eJ += !*F ; else return 0 ; else return TopMatch = _EEx =
_BB, LnA EE, LnA BB_Match =.

*PP < BB ? 0 : *PP < BB ) #define goUp( F, _BB ), goUp( F, _EEx, BBx,
_BBx, _EEx, _BB ? 0 : *PP < BB ), TokensMatch ) #define PinchUp (
goUp( F, _EEx, _BBx, _EEx, BB ), goUp( P, BBx, _BBx ), goUp( _F, EEx,
_EEx, _BB ), TokensMatch ) ( goUp( P = --PP ) #define PinchUp ( goUp(
_F, _BB ), goUp( _F, EEx, BBx ), TokensMatch ) #define goUp( _F, _BBx,
_BB ), TokensMatch ) #define PinchUp ( goUp( _F, EEx, _BB ), goUp(.

GBtmMatch = 1 + Wander, LnA BB, LnA _EE_Match = _EE ) if ( ShaveUp )
if ( ShaveUp ) { EE_Match = EE, LnA _EE_Match( int gBtmMatch = 1 +
Wander/99 ) { EE_Match( int gBtmMatch = _BB, LnA _BB, LnA BB, LnA BBx
= _BB, LnA EE, LnA EE_Match( int Wander, LnA _BB, LnA EE, _EE ) eJ +=
!*F ; Loop( 1 + Wander, LnA _BB, LnA EE, LnA _EE_Match = EE_Match =
EE_Match = _BBx = EE, _EE_Match = _BB, LnA BBx = EE_Match( int.

Gls: Globalobals: Falobals:s:.

While ( ++J <= eJ ) - 1, J = ( N ) - 1, J = ( N ) int eJ ) int eJ ) -
1, J = ( ++J <= eJ = ( ++J <= eJ = ( ++J <= eJ ) - 1, J = ( N ) - 1.

Wchar *LnP ; typedef wchar_t wchar ; typedef wchar_t wchar *LnP ;
typedef LnP ; typedef wchar ; typedef.

[toc] | [prev] | [next] | [standalone]


#47795 — Re: #define came from God himself, it's sacred.

Frommoroney@world.std.spaamtrap.com (Michael Moroney)
Date2017-01-03 03:58 +0000
SubjectRe: #define came from God himself, it's sacred.
Message-ID<o4f7ht$g4p$2@pcls7.std.com>
In reply to#47783
Gee, the code from the forged Relf looks better than the code from
the real Jeff.

[toc] | [prev] | [next] | [standalone]


#47796 — I completely reWrote it, of course.

FromJeff-Relf.Me <@.>
Date2017-01-03 00:46 -0800
SubjectI completely reWrote it, of course.
Message-ID<Jeff-Relf.Me@Jan.3--0.46A.Seattle.2017>
In reply to#47795
You ( MichaelMoroney ) wrote:
> Gee, the code from the forged Relf looks better than
> the code from the real Jeff.

No one gives a shit about the C++ code I posted,
nor should they, but it helps _me.

Since then, I completely reWrote it, of course;
I'm sure to change it again, as time goes by.

Currently, it's:

  //  ScreenShot:  http://Jeff-Relf.Me/Diff.PNG
  //  Help/Settings:  http://Jeff-Relf.Me/X.HTM

  //  Peel(), below, peels off diffs from the tops and bottoms
  //  of LeftOlder and RightNewer text files.
  //  
  //  BB is a pointer to the start of a dynamic array of lines ( pointers );
  //  EE points to the end of the array.
  //  
  //  Already, BB and EE point to "diffs" (mismatches lines).
  //   BB and  EE are from the LeftOlder file.
  //  _BB and _EE are from the RightNewer file.

  void Peel( LnA BB, LnA EE, LnA _BB, LnA _EE ) { int rv, S, _S, F, _F ;  
    LnP t, _t ;  LnA  BB_Slow, _BB_Slow, BB_Fast, _BB_Fast, EE_Slow, _EE_Slow, EE_Fast
    , _EE_Fast, Mid = BB + ( EE - BB )/2, _Mid = _BB + ( _EE - _BB )/2 ;
    TopMatch = BtmMatch = 0, BB_Slow = BB, _BB_Slow = _BB ;
    EE_Slow = EE, _EE_Slow = _EE, ReSetBB_Fast, ReSetEE_Fast ;

    Top:    if ( TopMatch ) if ( BtmMatch ) goto Done ; else goto Btm ;   
            if ( Level = BB_Fast - BB_Slow, TopFlags, TopMatch = !S && !_S ) {

               //  Done scaning the top of LeftOlder and RightNewer, no matches.
               BB_Match = 0 ;    goto Btm ;  }

            if (  F && _S ) if ( !gTopMatch( BB_Fast, EE, _BB_Slow, _EE ) )  BB_Fast++ ; else goto Btm ;
            if ( _F &&  S ) if ( !gTopMatch( BB_Slow, EE, _BB_Fast, _EE ) ) _BB_Fast++ ; else goto Btm ;

            //  Lower the top of LeftOlder and RightNewer, thus growing a pair of diffs.
            if ( TopFlags, !( F && _S || _F && S ) ) BB_Slow += S, _BB_Slow += _S, ReSetBB_Fast ;    goto Btm ;

    Btm:    if ( BtmMatch ) if ( TopMatch ) goto Done ; else goto Top ;
            if ( Level = EE_Slow - EE_Fast, BtmFlags, BtmMatch = !S && !_S ) {

               //  Done scaning the bottom of LeftOlder and RightNewer, no matches.
               EE_Match = 0 ;    goto Top ;  }

            if (  F && _S ) if ( !gBtmMatch( EE_Fast, BB, _EE_Slow, _BB ) )  EE_Fast-- ; else goto Top ;
            if ( _F &&  S ) if ( !gBtmMatch( EE_Slow, BB, _EE_Fast, _BB ) ) _EE_Fast-- ; else goto Top ;

            //  Raise the bottom of LeftOlder and RightNewer, thus growing a pair of diffs.
            if ( BtmFlags, !( F && _S || _F && S ) ) EE_Slow -= S, _EE_Slow -= _S, ReSetEE_Fast ;    goto Top ;
       
    Done:   BB_Match = BB_Match && EE_Match ? BB_Match : EE_Match ? ( _BB_Match = _EE_Match, EE_Match ) : ( _BB_Match = _EE, EE );
            EE_Match = BB_Match && EE_Match ? EE_Match : BB_Match ? ( _EE_Match = _BB_Match, BB_Match ) : ( _EE_Match = _BB, BB );  }


Near Globals:

  int  Level, TopMatch, BtmMatch ;    LnP  F, _F ;
  LnA  BBx, EEx, _BBx, _EEx, BB_Match, EE_Match, _BB_Match, _EE_Match ;

  #define TokensMatch  ( F && _F && F[-1] == _F[-1] && Eq( F, _F ) )
  #define ReSetBB_Fast  ( BB_Fast = BB_Slow, _BB_Fast = _BB_Slow )
  #define ReSetEE_Fast  ( EE_Fast = EE_Slow, _EE_Fast = _EE_Slow )

  #define  MatchDwn  ( _MatchDwn( F, PP, EE  ), _MatchDwn( _F, _PP, _EE  ), TopMatch = TokensMatch )
  #define  _MatchDwn( P, PP, EE ) ( P = ++PP >= EE ? 0 : *PP )

  #define  MatchUp  ( _MatchUp( F, PP, BB ), _MatchUp( _F, _PP, _BB  ), BtmMatch = TokensMatch )
  #define  _MatchUp( P, PP, BB )  ( P = --PP <  BB ? 0 : *PP )

  int gTopMatch( LnA PP, LnA EE, LnA _PP, LnA _EE ) { BB_Match = PP, _BB_Match = _PP, PP--, _PP-- ;

    //  For nearby comparisons, One Match ( not counting blank lines ) is good;
    //  more matches are needed when "zooming out" hundreds of lines.
    Loop( 1 + Level/99 ) eJ += !MatchDwn ? -eJ : !*F ;    return TopMatch ;   }

  int gBtmMatch( LnA PP, LnA BB, LnA _PP, LnA _BB ) { EE_Match = PP, _EE_Match = _PP ;  
     Loop( 1 + Level/99 ) eJ += !MatchUp ? -eJ : !*F ;   return BtmMatch ;   }

  Pinch( LnA BB, LnA EE, LnA _BB, LnA _EE ) { 
    LnA PP = BB - 1, _PP = _BB - 1 ;  while ( MatchDwn );
    BBx = BB = PP, _BBx = _BB = _PP, PP = EE, _PP = _EE ;
    while ( MatchUp );  EEx = ++PP, _EEx = ++_PP ;  }

  #define TopFlags  ( S =  BB_Slow <= Mid, _S = _BB_Slow <= _Mid, F = BB_Fast <= Mid, _F = _BB_Fast <= _Mid )
  #define BtmFlags  ( S =  EE_Slow >= Mid, _S = _EE_Slow >= _Mid, F = EE_Fast >= Mid, _F = _EE_Fast >= _Mid )

Far Globals:

  #define   Loop( N )  int  eJ = ( N ) - 1, J = -1 ; while ( ++J <= eJ )

  typedef wchar_t  wchar ;  typedef wchar  *LnP ;  typedef  LnP  *LnA ;

[toc] | [prev] | [next] | [standalone]


#47797 — I completely reWrote it, of course.

FromJeff-Relf.Me <@..sour>
Date2017-01-03 08:51 +0000
SubjectI completely reWrote it, of course.
Message-ID<7D29485E.49E84ABC@Robinia.Shakespearei.Pallida>
In reply to#47796
                                                              ؛ ɐuן*  duן  ɟǝpǝdʎʇ  ؛ duן*  ɹɐɥɔʍ ɟǝpǝdʎʇ  ؛ ɹɐɥɔʍ  ʇ‾ɹɐɥɔʍ ɟǝpǝdʎʇ  
                                                                                                                                     
                                                             ( ɾǝ => ɾ++ ) ǝןıɥʍ ؛ Ɩ- = ɾ 'Ɩ - ( u ) = ɾǝ  ʇuı  ( u )dooן   ǝuıɟǝp#  
                                                                                                                                     
                                                                                                                         :sןɐqoןb ɹɐɟ
                                                                                                                                     
                        ( pıɯ‾ =< ʇsɐɟ‾ǝǝ‾ = ɟ‾ 'pıɯ =< ʇsɐɟ‾ǝǝ = ɟ 'pıɯ‾ =< ʍoןs‾ǝǝ‾ = s‾ 'pıɯ =< ʍoןs‾ǝǝ  = s )  sbɐןɟɯʇq ǝuıɟǝp#  
                        ( pıɯ‾ => ʇsɐɟ‾qq‾ = ɟ‾ 'pıɯ => ʇsɐɟ‾qq = ɟ 'pıɯ‾ => ʍoןs‾qq‾ = s‾ 'pıɯ => ʍoןs‾qq  = s )  sbɐןɟdoʇ ǝuıɟǝp#  
                                                                                                                                     
                                                                                {  ؛ dd‾++ = xǝǝ‾ 'dd++ = xǝǝ  ؛( dnɥɔʇɐɯ ) ǝןıɥʍ    
                                                                            ؛ ǝǝ‾ = dd‾ 'ǝǝ = dd 'dd‾ = qq‾ = xqq‾ 'dd = qq = xqq    
                                                                            ؛( uʍpɥɔʇɐɯ ) ǝןıɥʍ  ؛ Ɩ - qq‾ = dd‾ 'Ɩ - qq = dd ɐuן    
                                                                                        } ( ǝǝ‾ ɐuן 'qq‾ ɐuן 'ǝǝ ɐuן 'qq ɐuן )ɥɔuıd  
                                                                                                                                     
                                                       {   ؛ ɥɔʇɐɯɯʇq uɹnʇǝɹ   ؛ ɟ*¡ : ɾǝ- ¿ dnɥɔʇɐɯ¡ =+ ɾǝ ( 66/ןǝʌǝן + Ɩ )dooן     
                                               ؛ dd‾ = ɥɔʇɐɯ‾ǝǝ‾ 'dd = ɥɔʇɐɯ‾ǝǝ } ( qq‾ ɐuן 'dd‾ ɐuן 'qq ɐuן 'dd ɐuן )ɥɔʇɐɯɯʇqb ʇuı  
                                                                                                                                     
                                                      {   ؛ ɥɔʇɐɯdoʇ uɹnʇǝɹ    ؛ ɟ*¡ : ɾǝ- ¿ uʍpɥɔʇɐɯ¡ =+ ɾǝ ( 66/ןǝʌǝן + Ɩ )dooן    
                                                                ˙sǝuıן ɟo spǝɹpunɥ „ʇno buıɯooz„ uǝɥʍ pǝpǝǝu ǝɹɐ sǝɥɔʇɐɯ ǝɹoɯ  //    
                                                      ؛poob sı ( sǝuıן ʞuɐןq buıʇunoɔ ʇou ) ɥɔʇɐɯ ǝuo 'suosıɹɐdɯoɔ ʎqɹɐǝu ɹoɟ  //    
                                                                                                                                     
                                  ؛ --dd‾ '--dd 'dd‾ = ɥɔʇɐɯ‾qq‾ 'dd = ɥɔʇɐɯ‾qq } ( ǝǝ‾ ɐuן 'dd‾ ɐuן 'ǝǝ ɐuן 'dd ɐuן )ɥɔʇɐɯdoʇb ʇuı  
                                                                                                                                     
                                                                       ( dd* : 0 ¿ qq  > dd-- = d )  ( qq 'dd 'd )dnɥɔʇɐɯ‾  ǝuıɟǝp#  
                                     ( ɥɔʇɐɯsuǝʞoʇ = ɥɔʇɐɯɯʇq '(  qq‾ 'dd‾ 'ɟ‾ )dnɥɔʇɐɯ‾ '( qq 'dd 'ɟ )dnɥɔʇɐɯ‾ )  dnɥɔʇɐɯ  ǝuıɟǝp#  
                                                                                                                                     
                                                                       ( dd* : 0 ¿ ǝǝ =< dd++ = d ) ( ǝǝ 'dd 'd )uʍpɥɔʇɐɯ‾  ǝuıɟǝp#  
                                 ( ɥɔʇɐɯsuǝʞoʇ = ɥɔʇɐɯdoʇ '(  ǝǝ‾ 'dd‾ 'ɟ‾ )uʍpɥɔʇɐɯ‾ '(  ǝǝ 'dd 'ɟ )uʍpɥɔʇɐɯ‾ )  uʍpɥɔʇɐɯ  ǝuıɟǝp#  
                                                                                                                                     
                                                                   ( ʍoןs‾ǝǝ‾ = ʇsɐɟ‾ǝǝ‾ 'ʍoןs‾ǝǝ = ʇsɐɟ‾ǝǝ )  ʇsɐɟ‾ǝǝʇǝsǝɹ ǝuıɟǝp#  
                                                                   ( ʍoןs‾qq‾ = ʇsɐɟ‾qq‾ 'ʍoןs‾qq = ʇsɐɟ‾qq )  ʇsɐɟ‾qqʇǝsǝɹ ǝuıɟǝp#  
                                                                 ( ( ɟ‾ 'ɟ )bǝ && [Ɩ-]ɟ‾ == [Ɩ-]ɟ && ɟ‾ && ɟ )  ɥɔʇɐɯsuǝʞoʇ ǝuıɟǝp#  
                                                                                                                                     
                                                              ؛ ɥɔʇɐɯ‾ǝǝ‾ 'ɥɔʇɐɯ‾qq‾ 'ɥɔʇɐɯ‾ǝǝ 'ɥɔʇɐɯ‾qq 'xǝǝ‾ 'xqq‾ 'xǝǝ 'xqq  ɐuן  
                                                                                   ؛ ɟ‾ 'ɟ  duן    ؛ ɥɔʇɐɯɯʇq 'ɥɔʇɐɯdoʇ 'ןǝʌǝן  ʇuı  
                                                                                                                                     
                                                                                                                        :sןɐqoןb ɹɐǝu
                                                                                                                                     
                                                                                                                                     
{  ؛( qq 'qq‾ = ɥɔʇɐɯ‾ǝǝ‾ ) : ( ɥɔʇɐɯ‾qq 'ɥɔʇɐɯ‾qq‾ = ɥɔʇɐɯ‾ǝǝ‾ ) ¿ ɥɔʇɐɯ‾qq : ɥɔʇɐɯ‾ǝǝ ¿ ɥɔʇɐɯ‾ǝǝ && ɥɔʇɐɯ‾qq = ɥɔʇɐɯ‾ǝǝ            
   ؛( ǝǝ 'ǝǝ‾ = ɥɔʇɐɯ‾qq‾ ) : ( ɥɔʇɐɯ‾ǝǝ 'ɥɔʇɐɯ‾ǝǝ‾ = ɥɔʇɐɯ‾qq‾ ) ¿ ɥɔʇɐɯ‾ǝǝ : ɥɔʇɐɯ‾qq ¿ ɥɔʇɐɯ‾ǝǝ && ɥɔʇɐɯ‾qq = ɥɔʇɐɯ‾qq   :ǝuop    
                                                                                                                                     
                      ؛ doʇ oʇob    ؛ ʇsɐɟ‾ǝǝʇǝsǝɹ 's‾ =- ʍoןs‾ǝǝ‾ 's =- ʍoןs‾ǝǝ ( ( s && ɟ‾ || s‾ && ɟ )¡ 'sbɐןɟɯʇq ) ɟı            
                                          ˙sɟɟıp ɟo ɹıɐd ɐ buıʍoɹb snɥʇ 'ɹǝʍǝuʇɥbıɹ puɐ ɹǝpןoʇɟǝן ɟo ɯoʇʇoq ǝɥʇ ǝsıɐɹ  //            
                                                                                                                                     
                             ؛ doʇ oʇob ǝsןǝ ؛ --ʇsɐɟ‾ǝǝ‾ ( ( qq‾ 'ʇsɐɟ‾ǝǝ‾ 'qq 'ʍoןs‾ǝǝ )ɥɔʇɐɯɯʇqb¡ ) ɟı ( s  && ɟ‾ ) ɟı            
                             ؛ doʇ oʇob ǝsןǝ ؛ --ʇsɐɟ‾ǝǝ  ( ( qq‾ 'ʍoןs‾ǝǝ‾ 'qq 'ʇsɐɟ‾ǝǝ )ɥɔʇɐɯɯʇqb¡ ) ɟı ( s‾ && ɟ  ) ɟı            
                                                                                                                                     
                                                                                       {  ؛ doʇ oʇob    ؛ 0 = ɥɔʇɐɯ‾ǝǝ               
                                                  ˙sǝɥɔʇɐɯ ou 'ɹǝʍǝuʇɥbıɹ puɐ ɹǝpןoʇɟǝן ɟo ɯoʇʇoq ǝɥʇ buıuɐɔs ǝuop  //               
                                                                                                                                     
                                                       } ( s‾¡ && s¡ = ɥɔʇɐɯɯʇq 'sbɐןɟɯʇq 'ʇsɐɟ‾ǝǝ - ʍoןs‾ǝǝ = ןǝʌǝן ) ɟı            
                                                              ؛ doʇ oʇob ǝsןǝ ؛ ǝuop oʇob ( ɥɔʇɐɯdoʇ ) ɟı ( ɥɔʇɐɯɯʇq ) ɟı    :ɯʇq    
                                                                                                                                     
                      ؛ ɯʇq oʇob    ؛ ʇsɐɟ‾qqʇǝsǝɹ 's‾ =+ ʍoןs‾qq‾ 's =+ ʍoןs‾qq ( ( s && ɟ‾ || s‾ && ɟ )¡ 'sbɐןɟdoʇ ) ɟı            
                                             ˙sɟɟıp ɟo ɹıɐd ɐ buıʍoɹb snɥʇ 'ɹǝʍǝuʇɥbıɹ puɐ ɹǝpןoʇɟǝן ɟo doʇ ǝɥʇ ɹǝʍoן  //            
                                                                                                                                     
                             ؛ ɯʇq oʇob ǝsןǝ ؛ ++ʇsɐɟ‾qq‾ ( ( ǝǝ‾ 'ʇsɐɟ‾qq‾ 'ǝǝ 'ʍoןs‾qq )ɥɔʇɐɯdoʇb¡ ) ɟı ( s  && ɟ‾ ) ɟı            
                             ؛ ɯʇq oʇob ǝsןǝ ؛ ++ʇsɐɟ‾qq  ( ( ǝǝ‾ 'ʍoןs‾qq‾ 'ǝǝ 'ʇsɐɟ‾qq )ɥɔʇɐɯdoʇb¡ ) ɟı ( s‾ && ɟ  ) ɟı            
                                                                                                                                     
                                                                                       {  ؛ ɯʇq oʇob    ؛ 0 = ɥɔʇɐɯ‾qq               
                                                     ˙sǝɥɔʇɐɯ ou 'ɹǝʍǝuʇɥbıɹ puɐ ɹǝpןoʇɟǝן ɟo doʇ ǝɥʇ buıuɐɔs ǝuop  //               
                                                                                                                                     
                                                       } ( s‾¡ && s¡ = ɥɔʇɐɯdoʇ 'sbɐןɟdoʇ 'ʍoןs‾qq - ʇsɐɟ‾qq = ןǝʌǝן ) ɟı            
                                                              ؛ ɯʇq oʇob ǝsןǝ ؛ ǝuop oʇob ( ɥɔʇɐɯɯʇq ) ɟı ( ɥɔʇɐɯdoʇ ) ɟı    :doʇ    
                                                                                                                                     
                                                                       ؛ ʇsɐɟ‾ǝǝʇǝsǝɹ 'ʇsɐɟ‾qqʇǝsǝɹ 'ǝǝ‾ = ʍoןs‾ǝǝ‾ 'ǝǝ = ʍoןs‾ǝǝ    
                                                                          ؛ qq‾ = ʍoןs‾qq‾ 'qq = ʍoןs‾qq '0 = ɥɔʇɐɯɯʇq = ɥɔʇɐɯdoʇ    
                                                           ؛ ᄅ/( qq‾ - ǝǝ‾ ) + qq‾ = pıɯ‾ 'ᄅ/( qq - ǝǝ ) + qq = pıɯ 'ʇsɐɟ‾ǝǝ‾ '    
                                               ʇsɐɟ‾ǝǝ 'ʍoןs‾ǝǝ‾ 'ʍoןs‾ǝǝ 'ʇsɐɟ‾qq‾ 'ʇsɐɟ‾qq 'ʍoןs‾qq‾ 'ʍoןs‾qq  ɐuן  ؛ ʇ‾ 'ʇ duן    
                                                             ؛ ɟ‾ 'ɟ 's‾ 's 'ʌɹ ʇuı } ( ǝǝ‾ ɐuן 'qq‾ ɐuן 'ǝǝ ɐuן 'qq ɐuן )ןǝǝd pıoʌ  
                                                                                                                                     
                                                                                      ˙ǝןıɟ ɹǝʍǝuʇɥbıɹ ǝɥʇ ɯoɹɟ ǝɹɐ ǝǝ‾ puɐ qq‾  //  
                                                                                       ˙ǝןıɟ ɹǝpןoʇɟǝן ǝɥʇ ɯoɹɟ ǝɹɐ ǝǝ  puɐ qq   //  
                                                                        ˙(sǝuıן sǝɥɔʇɐɯsıɯ) „sɟɟıp„ oʇ ʇuıod ǝǝ puɐ qq 'ʎpɐǝɹןɐ  //  
                                                                                                                                 //  
                                                                                             ˙ʎɐɹɹɐ ǝɥʇ ɟo puǝ ǝɥʇ oʇ sʇuıod ǝǝ  //  
                                                         ؛( sɹǝʇuıod ) sǝuıן ɟo ʎɐɹɹɐ ɔıɯɐuʎp ɐ ɟo ʇɹɐʇs ǝɥʇ oʇ ɹǝʇuıod ɐ sı qq  //  
                                                                                                                                 //  
                                                                                        ˙sǝןıɟ ʇxǝʇ ɹǝʍǝuʇɥbıɹ puɐ ɹǝpןoʇɟǝן ɟo  //  
                                                                       sɯoʇʇoq puɐ sdoʇ ǝɥʇ ɯoɹɟ sɟɟıp ɟɟo sןǝǝd 'ʍoןǝq '()ןǝǝd  //  
                                                                                                                                     
                                                                                      ɯʇɥ˙x/ǝɯ˙ɟןǝɹ-ɟɟǝɾ//:dʇʇɥ  :sbuıʇʇǝs/dןǝɥ  //  
                                                                                      bud˙ɟɟıp/ǝɯ˙ɟןǝɹ-ɟɟǝɾ//:dʇʇɥ  :ʇoɥsuǝǝɹɔs  //  
                                                                                                                                     
                                                                                                                     :s,ʇı 'ʎןʇuǝɹɹnɔ
                                                                                                                                     
                                                                                        ˙ʎq sǝob ǝɯıʇ sɐ 'uıɐbɐ ʇı ǝbuɐɥɔ oʇ ǝɹns ɯ,ı
                                                                                      ؛ǝsɹnoɔ ɟo 'ʇı ǝʇoɹʍǝɹ ʎןǝʇǝןdɯoɔ ı 'uǝɥʇ ǝɔuıs
                                                                                                                                     
                                                                                                   ˙ǝɯ‾ sdןǝɥ ʇı ʇnq 'ʎǝɥʇ pןnoɥs ɹou
                                                                                     'pǝʇsod ı ǝpoɔ ++ɔ ǝɥʇ ʇnoqɐ ʇıɥs ɐ sǝʌıb ǝuo ou
                                                                                                                                     
                                                                                                       ˙ɟɟǝɾ ןɐǝɹ ǝɥʇ ɯoɹɟ ǝpoɔ ǝɥʇ <
                                                                               uɐɥʇ ɹǝʇʇǝq sʞooן ɟןǝɹ pǝbɹoɟ ǝɥʇ ɯoɹɟ ǝpoɔ ǝɥʇ 'ǝǝb <
                                                                                                        :ǝʇoɹʍ ( ʎǝuoɹoɯןǝɐɥɔıɯ ) noʎ 

[toc] | [prev] | [next] | [standalone]


#47801 — Re: I completely reWrote it, of course.

FromPeter Köhlmann <peter-koehlmann@t-online.de>
Date2017-01-03 12:13 +0100
SubjectRe: I completely reWrote it, of course.
Message-ID<o4g0ub$nmq$1@dont-email.me>
In reply to#47796
The worst "programmer" of all time babbled:

> You ( MichaelMoroney ) wrote:
>> Gee, the code from the forged Relf looks better than
>> the code from the real Jeff.
> 
> No one gives a shit about the C++ code I posted,
> nor should they, but it helps _me.
> 
> Since then, I completely reWrote it, of course;
> I'm sure to change it again, as time goes by.
> 
> Currently, it's:
> 
>   //  ScreenShot:  http://Jeff-Relf.Me/Diff.PNG
>   //  Help/Settings:  http://Jeff-Relf.Me/X.HTM
> 
>   //  Peel(), below, peels off diffs from the tops and bottoms
>   //  of LeftOlder and RightNewer text files.
>   //
>   //  BB is a pointer to the start of a dynamic array of lines ( pointers
>   );
>   //  EE points to the end of the array.
>   //
>   //  Already, BB and EE point to "diffs" (mismatches lines).
>   //   BB and  EE are from the LeftOlder file.
>   //  _BB and _EE are from the RightNewer file.
> 
>   void Peel( LnA BB, LnA EE, LnA _BB, LnA _EE ) { int rv, S, _S, F, _F ;
>     LnP t, _t ;  LnA  BB_Slow, _BB_Slow, BB_Fast, _BB_Fast, EE_Slow,
>     _EE_Slow, EE_Fast , _EE_Fast, Mid = BB + ( EE - BB )/2, _Mid = _BB + (
>     _EE - _BB )/2 ; TopMatch = BtmMatch = 0, BB_Slow = BB, _BB_Slow = _BB
>     ; EE_Slow = EE, _EE_Slow = _EE, ReSetBB_Fast, ReSetEE_Fast ;
> 
>     Top:    if ( TopMatch ) if ( BtmMatch ) goto Done ; else goto Btm ;
>             if ( Level = BB_Fast - BB_Slow, TopFlags, TopMatch = !S && !_S
>             ) {

Ye gods!

[toc] | [prev] | [next] | [standalone]


#47802 — Re: I completely reWrote it, of course.

FromMelzzzzz <mel@zzzzz.com>
Date2017-01-03 12:28 +0100
SubjectRe: I completely reWrote it, of course.
Message-ID<20170103122847.45f37efb@maxa-pc>
In reply to#47801
On Tue, 03 Jan 2017 12:13:42 +0100
Peter Köhlmann <peter-koehlmann@t-online.de> wrote:

> The worst "programmer" of all time babbled:
> 
> > You ( MichaelMoroney ) wrote:  
> >> Gee, the code from the forged Relf looks better than
> >> the code from the real Jeff.  
> > 
> > No one gives a shit about the C++ code I posted,
> > nor should they, but it helps _me.
> > 
> > Since then, I completely reWrote it, of course;
> > I'm sure to change it again, as time goes by.
> > 
> > Currently, it's:
> > 
> >   //  ScreenShot:  http://Jeff-Relf.Me/Diff.PNG
> >   //  Help/Settings:  http://Jeff-Relf.Me/X.HTM
> > 
> >   //  Peel(), below, peels off diffs from the tops and bottoms
> >   //  of LeftOlder and RightNewer text files.
> >   //
> >   //  BB is a pointer to the start of a dynamic array of lines
> > ( pointers );
> >   //  EE points to the end of the array.
> >   //
> >   //  Already, BB and EE point to "diffs" (mismatches lines).
> >   //   BB and  EE are from the LeftOlder file.
> >   //  _BB and _EE are from the RightNewer file.
> > 
> >   void Peel( LnA BB, LnA EE, LnA _BB, LnA _EE ) { int rv, S, _S, F,
> > _F ; LnP t, _t ;  LnA  BB_Slow, _BB_Slow, BB_Fast, _BB_Fast,
> > EE_Slow, _EE_Slow, EE_Fast , _EE_Fast, Mid = BB + ( EE - BB )/2,
> > _Mid = _BB + ( _EE - _BB )/2 ; TopMatch = BtmMatch = 0, BB_Slow =
> > BB, _BB_Slow = _BB ; EE_Slow = EE, _EE_Slow = _EE, ReSetBB_Fast,
> > ReSetEE_Fast ;
> > 
> >     Top:    if ( TopMatch ) if ( BtmMatch ) goto Done ; else goto
> > Btm ; if ( Level = BB_Fast - BB_Slow, TopFlags, TopMatch = !S && !_S
> >             ) {  
> 
> Ye gods!

I think that he is insane...

-- 
press any key to continue or any other to quit...

[toc] | [prev] | [next] | [standalone]


#47804 — Re: I completely reWrote it, of course.

Fromchrisv <chrisv@nospam.invalid>
Date2017-01-03 07:32 -0600
SubjectRe: I completely reWrote it, of course.
Message-ID<vg9n6c5k4viehgoo44h414k1o13qfsoirt@4ax.com>
In reply to#47801
Peter Köhlmann wrote:

> The worst "programmer" of all time babbled:
>> 
>> No one gives a shit about the C++ code I posted,
>> nor should they, but it helps _me.
>> 
>> Since then, I completely reWrote it, of course;
>> I'm sure to change it again, as time goes by.
>> 
>> Currently, it's:
>> 
>>   //  ScreenShot:  http://Jeff-Relf.Me/Diff.PNG
>>   //  Help/Settings:  http://Jeff-Relf.Me/X.HTM
>> 
>>   //  Peel(), below, peels off diffs from the tops and bottoms
>>   //  of LeftOlder and RightNewer text files.
>>   //
>>   //  BB is a pointer to the start of a dynamic array of lines ( pointers
>>   );
>>   //  EE points to the end of the array.
>>   //
>>   //  Already, BB and EE point to "diffs" (mismatches lines).
>>   //   BB and  EE are from the LeftOlder file.
>>   //  _BB and _EE are from the RightNewer file.
>> 
>>   void Peel( LnA BB, LnA EE, LnA _BB, LnA _EE ) { int rv, S, _S, F, _F ;
>>     LnP t, _t ;  LnA  BB_Slow, _BB_Slow, BB_Fast, _BB_Fast, EE_Slow,
>>     _EE_Slow, EE_Fast , _EE_Fast, Mid = BB + ( EE - BB )/2, _Mid = _BB + (
>>     _EE - _BB )/2 ; TopMatch = BtmMatch = 0, BB_Slow = BB, _BB_Slow = _BB
>>     ; EE_Slow = EE, _EE_Slow = _EE, ReSetBB_Fast, ReSetEE_Fast ;
>> 
>>     Top:    if ( TopMatch ) if ( BtmMatch ) goto Done ; else goto Btm ;
>>             if ( Level = BB_Fast - BB_Slow, TopFlags, TopMatch = !S && !_S
>>             ) {
>
> Ye gods!

If  "Ezekiel" was here, and you said that the above code was crap, he
would demand "facts and a code analysis".  LOL

The kreep even claimed that it was "ignorant" to say that Relf's
statements eschewing the importance of compliler warnings were
"stupid".

I couldn't make this stuff up!

Ezekreep was a trolling fsckwit, if ever there was one.  Apparently,
he thought that he could beat us with his lies.

-- 
"For some reason the mindless droids here equate anything open source
with somehow being technically superior."  -  trolling fsckwit
"Ezekiel", lying shamelessly

[toc] | [prev] | [next] | [standalone]


#47809 — Ezekiel lives in your head RENT FREE!! LOL!!!

FromGreyCloud <mist@cumulus.com>
Date2017-01-03 12:16 -0700
SubjectEzekiel lives in your head RENT FREE!! LOL!!!
Message-ID<o4gt7t$t5b$13@dont-email.me>
In reply to#47804
On 01/03/17 06:32, chrisv wrote:
> Peter Köhlmann wrote:
>
>> The worst "programmer" of all time babbled:
>>>
>>> No one gives a shit about the C++ code I posted,
>>> nor should they, but it helps _me.
>>>
>>> Since then, I completely reWrote it, of course;
>>> I'm sure to change it again, as time goes by.
>>>
>>> Currently, it's:
>>>
>>>    //  ScreenShot:  http://Jeff-Relf.Me/Diff.PNG
>>>    //  Help/Settings:  http://Jeff-Relf.Me/X.HTM
>>>
>>>    //  Peel(), below, peels off diffs from the tops and bottoms
>>>    //  of LeftOlder and RightNewer text files.
>>>    //
>>>    //  BB is a pointer to the start of a dynamic array of lines ( pointers
>>>    );
>>>    //  EE points to the end of the array.
>>>    //
>>>    //  Already, BB and EE point to "diffs" (mismatches lines).
>>>    //   BB and  EE are from the LeftOlder file.
>>>    //  _BB and _EE are from the RightNewer file.
>>>
>>>    void Peel( LnA BB, LnA EE, LnA _BB, LnA _EE ) { int rv, S, _S, F, _F ;
>>>      LnP t, _t ;  LnA  BB_Slow, _BB_Slow, BB_Fast, _BB_Fast, EE_Slow,
>>>      _EE_Slow, EE_Fast , _EE_Fast, Mid = BB + ( EE - BB )/2, _Mid = _BB + (
>>>      _EE - _BB )/2 ; TopMatch = BtmMatch = 0, BB_Slow = BB, _BB_Slow = _BB
>>>      ; EE_Slow = EE, _EE_Slow = _EE, ReSetBB_Fast, ReSetEE_Fast ;
>>>
>>>      Top:    if ( TopMatch ) if ( BtmMatch ) goto Done ; else goto Btm ;
>>>              if ( Level = BB_Fast - BB_Slow, TopFlags, TopMatch = !S&&  !_S
>>>              ) {
>>
>> Ye gods!
>
> If  "Ezekiel" was here, and you said that the above code was crap, he
> would demand "facts and a code analysis".  LOL
>
> The kreep even claimed that it was "ignorant" to say that Relf's
> statements eschewing the importance of compliler warnings were
> "stupid".
>
> I couldn't make this stuff up!
>
> Ezekreep was a trolling fsckwit, if ever there was one.  Apparently,
> he thought that he could beat us with his lies.
>

[toc] | [prev] | [next] | [standalone]


#47811 — With "warnings as errors", turn off these warnings.

FromJeff-Relf.Me <@.>
Date2017-01-03 13:00 -0800
SubjectWith "warnings as errors", turn off these warnings.
Message-ID<Jeff-Relf.Me@Jan.3--1.00P.Seattle.2017>
In reply to#47804
You two ( ChrisV and Peter Köhlmann ) keep telling us:

  Turn on _all warnings; all else is _foolish/_noobish.

With "warnings as errors", turn off these warnings:

  C4100: unreferenced parameter.
  C4101: unreferenced local variable.
  C4189: local variable is initialized but not referenced.

    Variables gets comment out, at times, when debugging.
    UnUsed code is informative, and might be needed again.

Other C++ Coding Rules:

  http://Jeff-Relf.Me/C++CodingRules.HTM

[toc] | [prev] | [next] | [standalone]


Page 1 of 7  [1] 2 3 4 5 6 7  Next page →

Back to top | Article view | comp.lang.c++


csiph-web