Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #47859
| From | Jeff-Relf.Me <@.> |
|---|---|
| Newsgroups | comp.lang.c++, comp.os.linux.advocacy, sci.physics |
| Subject | "Functional" programming is "Tree Crawling". |
| Date | 2017-01-05 14:53 -0800 |
| Organization | Glorb Internet Services, http://www.glorb.com |
| Message-ID | <Jeff-Relf.Me@Jan.5--2.53P.Seattle.2017> (permalink) |
| References | (1 earlier) <vrup6cp8gegehcqkbnnfi4gkf05tf1qtda@4ax.com> <T08bA.190083$mI2.177601@fx08.iad> <Jeff-Relf.Me@Jan.4--10.17A.Seattle.2017> <_JKdnVUjT6pyKPPFnZ2dnUU78b-dnZ2d@brightview.co.uk> <o4md9h$3h2$1@news.xmission.com> |
Cross-posted to 3 groups.
Speaking of Chinese, you ( Direct3D Richard ) wrote:
> The bigger mind-twist for a conventional procedurally oriented thinker
> is the switch to functional oriented thinking.
"Functional" programming is "Tree Crawling";
i.e. you spend all your time crawling on trees, like an ant.
Mostly, it's used in academia, not the market place.
When you see a lot of WhiteSpace and comments,
you know, _right _away, that there's a problem.
Dense PostScript ( .PDF ), on the other hand, is ubiquitous.
I use C++, instead of C, because it's basically C,
but with nice extras. I've C++ code that generates .PDF files.
C++ also has paths/lines/arcs, like PostScript; to wit:
ScreenShot: Jeff-Relf.Me/Chess.PNG
ID2D1PathGeometry *Path ; ID2D1GeometrySink *pSink ;
r = Prev ? D/2 : W/2, x = MvX( From ), y = MvY( From );
X = MvX( To ), Y = MvY( To ), dx = X - x, dy = Y - y ;
Compass = atan2( dy, dx );
Tangent = Pi/2 - asin( r/sqrt( dx*dx + dy*dy ) );
Start = Compass + Tangent, End = Compass - Tangent ;
Direct2D->CreatePathGeometry( &Path );
Path->Open( &pSink ), pSink->SetFillMode( D2D1_FILL_MODE_WINDING );
pSink->BeginFigure( Pnt( X, Y ), D2D1_FIGURE_BEGIN_FILLED );
dx = r*cos( Start ), dy = r*sin( Start );
pSink->AddLine( Pnt( x + dx, y + dy ) ), dx = r*cos( End ), dy = r*sin( End );
D2D1_ARC_SEGMENT Arc = {
{ x + dx, y + dy }, { r, r }, 0, D2D1_SWEEP_DIRECTION_CLOCKWISE,
fmod( _360 + End - Start, _360 ) > Pi ? D2D1_ARC_SIZE_LARGE : D2D1_ARC_SIZE_SMALL };
pSink->AddArc( Arc );
pSink->EndFigure( D2D1_FIGURE_END_CLOSED );
pSink->Close(), Trash( pSink );
dxWin->SetTarget( WinSur ), dxWin->DrawGeometry( Path, C, LnW );
dxWin->FillGeometry( Path, TransBlush );
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
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
csiph-web