|
From: | Juergen Sauermann |
Subject: | Re: [Bug-apl] Make infinity and pi symbols into constants? |
Date: | Thu, 16 Jan 2014 18:38:22 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130330 Thunderbird/17.0.5 |
Hi,
well, I see a number of problems. First thing is ⎕AV. Even though ⎕AV is a bit outdated and ⎕UCS is a less proprietary way to generate charactersm it may still be in use. And is often tied to APL fonts in some way. Usually the lower half are exactly ASCII and the upper half is some mapping of relevant APL characters. ⎕AV shall be 256 characters in size for backward compatibility. ⎕AV is already rather crowded, so for every new character (single ones, not entire Unicode pages) we have to kill another one (convention has it that all relevant APL characters are in ⎕AV). New function symbols are possible but would undermine compatibility of GNU APL with IBM APL2. 2. Fonts I have emails from GNU APL users that do not use X, for example on Raspberry but also on others OSs. Paul Hardy from the GNU Unifont project has developed a console font that includes all characters currently used in GNU APL, those for Lambdas (⍺, ⍵ etc.) and so on. There is a limitation on the number of characters in such fonts and according to the latest email I got from Paul there is only 1 character free. If we now introduce additional characters for APL then this would result in some systems not being able to display them 3. Keyboards (already mentioned) 4. APL look and feel Right now we have Letters, Digits, ∆ and ⍙ as characters fur user defined names and the greekish and mathematically looking characters for primitive APL functions. This is a clear border between the user-defined and the system-defined domain. If we would allow unused greek symbols in user defined functions or variables, then what would Z←ABCσ123 mean? To me (and admittedly old-fashioned APL-er) this would look like a monadic function ABC calling σ with argument 123 or maybe dyadic σ with arguments ABC and 123. Taking all this together I believe the problems that may occur are bigger than the benefits. And it would be a move away from a "common APL" that is useful for everybody. ---------------------------------------------------------------------- Having all that said I have two more notes: 1. You can use Unicode freely in GNU APL strings including the greek ones. Only APL program text (outside strings) is limited to the existing symbols. 2. The symbol table of GNU APL allows for those symbols already. Only the tokenizer insists on the standard symbols. So if you desperately want π for ○1 then you can try this: ∇Z←Pi Z←○1 ∇ and write a native function that roughly does this:: 1. lookup Pi (returns a Symbol *sym) 2. create new_symbol from UCS_string(UTF8_string("π")); 3. new_symbol->push_function(sym-Get_function()); /// Jürgen On 01/16/2014 02:34 PM, Elias Mårtenson wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |