From: Farley Flud Subject: Re: Why Python When There Is Perl? Newsgroups: comp.os.linux.advocacy References: <17be420c4f90bfc7$63225$1585792$802601b3@news.usenetexpress.com> <17be75acfaf8f0f4$2017$3384359$802601b3@news.usenetexpress.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lines: 65 Path: ...!news.misty.com!weretis.net!feeder6.news.weretis.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!news.usenetexpress.com!not-for-mail Date: Thu, 21 Mar 2024 08:54:25 +0000 Nntp-Posting-Date: Thu, 21 Mar 2024 08:54:25 +0000 X-Received-Bytes: 2285 Organization: UsenetExpress - www.usenetexpress.com X-Complaints-To: abuse@usenetexpress.com Message-Id: <17bebbae334656b9$74345$2906873$802601b3@news.usenetexpress.com> Bytes: 2697 On Wed, 20 Mar 2024 17:40:34 -0500, Physfitfreak wrote: > > Hmm... I'm not that dedicated to the task. For now, I've made my mind, > and even have started the "learning curve" if such a thing exists for > qb64 :-))) > Don't listen to those incompetent chumps. Learning about hardware first is critical. The classic example is recursion. In the abstract realm recursion seems highly efficient and elegant. But such elegance has to ultimately be translated into machine code and, at this level, recursion becomes highly inefficient and even idiotic. It has long ago been proved that all programming can be reduced to the simple ideas of SEQUENCE and BRANCHING. Indeed, if you examine the instruction set of a modern CPU that is ALL that you will find: sequence and branching (aside from the arithmetic-logic unit). Fundamental CPU operations are very simple: arithmetic, logic, and shift. But from these everything else can be built. You already know the arithmetic (or most of it). So start with the logic tables: AND 0 and 0 = 0 0 and 1 = 0 1 and 0 = 0 1 and 1 = 1 OR 0 or 0 = 0 0 or 1 = 1 1 or 0 = 1 1 or 1 = 1 XOR 0 xor 0 = 0 0 xor 1 = 1 1 xor 0 = 1 1 xor 1 = 0 These logic operations are used in making decisions that allow branching, bit conversions, and many other crucial operations. How can we know that an ASCII character is uppercase? char AND 0x20 If the zero condition flag is set then the character is uppercase. We can then branch based on the condition flag. Very simple. Know these by heart. This ends today's lesson. There is only one programming philosophy: fuck that abstract elegant shit and get back to the machine.