[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lojban] Re: A completely different RPN solution.
On Sat, 7 Feb 2009, Robin Lee Powell wrote:
> Subject: Palm Writings + RPN
> From: Robin Lee Powell <rlpowell@digitalkingdom.org>
> 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.