From nobody@digitalkingdom.org Tue Feb 10 13:57:54 2009 Received: with ECARTIS (v1.0.0; list lojban-list); Tue, 10 Feb 2009 13:57:54 -0800 (PST) Received: from nobody by chain.digitalkingdom.org with local (Exim 4.69) (envelope-from ) id 1LX0c6-0000CM-2p for lojban-list-real@lojban.org; Tue, 10 Feb 2009 13:57:54 -0800 Received: from julia.math.ucla.edu ([128.97.4.5]) by chain.digitalkingdom.org with esmtp (Exim 4.69) (envelope-from ) id 1LX0c0-0000Bz-5m for lojban-list@lojban.org; Tue, 10 Feb 2009 13:57:54 -0800 Received: from xena.cft.ca.us (harlech.math.ucla.edu [128.97.4.254]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "Jim Carter", Issuer "UCLA-Mathnet Root Certificate" (verified OK)) by julia.math.ucla.edu (Postfix) with ESMTP id 0CAF451C49 for ; Tue, 10 Feb 2009 13:57:41 -0800 (PST) Received: by xena.cft.ca.us (Postfix, from userid 500) id EB7513C325; Tue, 10 Feb 2009 13:57:39 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by xena.cft.ca.us (Postfix) with ESMTP id 3C69F3C324 for ; Tue, 10 Feb 2009 13:57:40 -0800 (PST) Date: Tue, 10 Feb 2009 13:57:40 -0800 (PST) From: Jim Carter To: lojban-list@lojban.org Subject: [lojban] Re: A completely different RPN solution. In-Reply-To: <20090207205106.GG31130@digitalkingdom.org> Message-ID: References: <20090207205106.GG31130@digitalkingdom.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Score: -1.0 X-Spam-Score-Int: -9 X-Spam-Bar: - X-archive-position: 15290 X-ecartis-version: Ecartis v1.0.0 Sender: lojban-list-bounce@lojban.org Errors-to: lojban-list-bounce@lojban.org X-original-sender: jimc@math.ucla.edu Precedence: bulk Reply-to: lojban-list@lojban.org X-list: lojban-list On Sat, 7 Feb 2009, Robin Lee Powell wrote: > Subject: Palm Writings + RPN > From: Robin Lee Powell > To: rlpowell@digitalkingdom.org > Date: Tue, 28 Oct 2008 18:17:34 -0700 > > @h1 A Completely Different RPN Solution > > We could have explicit push and pop operators in KOhA. Call them > xa'a and xu'u, respectively. Usage would be like so: > > xa'a li pa sumji li re .i sumji li vo xu'u > > The first bridi adds 1 and 2 and pushes the result onto the stack. > The second adds 4 to the topmost stack element. > > Given that, there could also be an RPN marker that would allow > dropping the explicit push and pop, given text such as: > > li pa li re te sumji .i li vo li mu te sumji .i te pilji (etc.) This brings back fond memories. The mathematical expression syntax in Old Loglan was rather horrendous, and I was not satisfied with the grammar for simple dimensioned quantitites such as "I am 1.73 meters high". When I worked on gua\spi I took the opportunity to define mathematical expressions as RPN. This document section begins with math expressions (and continues with quantification, and sentence forms, which are not today's topic). http://www.math.ucla.edu/~jimc/guaspi/vocab2.html In "real" RPN no explicit stack pushing and popping are needed because the operators have a predetermined number of arguments; they always pop all their arguments and then push the single result. But if an operator had multiple results (e.g. quotient and remainder), or where you want to optimize a computation by computing a sub-expression once and then replicating the result, then explicit stack manipulation is needed. James F. Carter Voice 310 825 2897 FAX 310 206 6673 UCLA-Mathnet; 6115 MSA; 405 Hilgard Ave.; Los Angeles, CA, USA 90095-1555 Email: jimc@math.ucla.edu http://www.math.ucla.edu/~jimc (q.v. for PGP key) To unsubscribe from this list, send mail to lojban-list-request@lojban.org with the subject unsubscribe, or go to http://www.lojban.org/lsg2/, or if you're really stuck, send mail to secretary@lojban.org for help.