Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: rbowman Newsgroups: comp.os.linux.setup,comp.os.linux.advocacy,sci.physics Subject: Re: I think in FORTH & program in C/C++. Date: Sat, 2 Oct 2021 12:55:36 -0600 Lines: 36 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net Cc1rxtK54mADgKyy4eVXcwubiIwSR7O9G0a/7oXVwVRib7Q7DP Cancel-Lock: sha1:O1M5NyziBMtgQhenML3040ZXCb4= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 In-Reply-To: Xref: csiph.com comp.os.linux.setup:4607 comp.os.linux.advocacy:595099 sci.physics:833517 On 10/02/2021 02:50 AM, The Natural Philosopher wrote: > On 02/10/2021 03:44, rbowman wrote: >> On 10/01/2021 02:51 PM, Clutterfreak wrote: >>> Good programming requires sticking to the essentials. If it can be done >>> with an "if" statement never do it in any other way. If it can be done >>> with a simple loop, never do it by a recursive function. Stick to the >>> essentials and write it for others not for yourself when you're doing it >>> as a job. It belongs to the company that pays you, not to you. It is for >>> others to use. So as a person you have to meet certain criteria to be >>> able to do it right. It isn't just the ability to code. >> >> But tail recursion is kool or at least kooler than recursion. >> > I wrote a marvellous maze generation algorithm that called itself again > and again until it had filled every square with a passage or a wall. > > And a multi level kitting analyser that allowed you to crate assemblies > of sub assemblies of sub sub assemblies and so on. That called itself > again and again until very level had been analysed. > > The problem of people creating sub assembles of parts containing > themselves (Russells paradox) was prevented by as popup sayin 'you cant > do that!') > > I LOVE recursion. > It has its place. We use ONC RPC/XDR. More technological debt since we powered down the last big-endian machine about 10 years ago. Anyway, it works so it's nothing we gave a lot of thought until mysterious crashes started occurring. Seem the internals are highly recursive when it's unraveling data and it was blowing the stack out. Luckily editbin allows you to increase the allowable stack size of an executable so we bumped it up.