HP Forums

Full Version: Algebraic Programming Language APL
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello, is possible to categorize all the CAS programming languages into a single name?
https://en.wikipedia.org/wiki/Category:C...ra_systems

and what name would it have?

Is correct to say Algebraic Programming Language or Symbolic language? What other names do you propose?

https://en.wikipedia.org/wiki/Symbolic_computation
To the first question yes, & I suggest "Casian".

I'm still considering the second problem.
(10-20-2017 12:46 PM)compsystems Wrote: [ -> ]Hello, is possible to categorize all the CAS programming languages into a single name?
https://en.wikipedia.org/wiki/Category:C...ra_systems

and what name would it have?

Computer algebra systems maybe? I am not sure I follow your question.
"APL" might be confusing as there is already a programming language by that name.

https://en.wikipedia.org/wiki/APL_(progr..._language)

[Seeing "calculator" and "APL" certainly got my interest up. Maybe somebody will port it to the Prime. :-) ]
(10-20-2017 09:48 PM)BobVA Wrote: [ -> ]Maybe somebody will port it to the Prime. :-)

Should be possible. The Prime has a full Unicode character set and the PPL seems fast enough to run a usable interpreter. We just need someone crazy enough to actually do it :-0
(10-21-2017 01:13 AM)John Keith Wrote: [ -> ]
(10-20-2017 09:48 PM)BobVA Wrote: [ -> ]Maybe somebody will port it to the Prime. :-)

Should be possible. The Prime has a full Unicode character set and the PPL seems fast enough to run a usable interpreter. We just need someone crazy enough to actually do it :-0

Unfortunately, the HP Prime does NOT have a "full Unicode character set" (such a font would be impossibly huge). Specifically, all of the APL characters in the "Miscellaneous Technical" block are missing (specifically code points 2336 through 237A, and 2395).
(10-20-2017 09:48 PM)BobVA Wrote: [ -> ]"APL" might be confusing as there is already a programming language by that name.

https://en.wikipedia.org/wiki/APL_(progr..._language)

[Seeing "calculator" and "APL" certainly got my interest up. Maybe somebody will port it to the Prime. :-) ]

From that Wikipedia page: "The growth of end-user computing tools such as Microsoft Excel and Microsoft Access has indirectly eroded potential APL usage. These are frequently appropriate platforms for what may have been APL applications in the 1970s and 1980s. Some APL users migrated to the J programming language, which offers some advanced features. Lastly, the decline was also due in part to the growth of MATLAB, GNU Octave, and Scilab. These scientific computing array-oriented platforms provide an interactive computing experience similar to APL, but more closely resemble conventional programming languages such as Fortran, and use standard ASCII. Other APL users continue to wait for a very low-cost, standardized, broad-hardware-usable APL implementation."
Why is this relevant? The Prime has a spreadsheet as one of its built in application. This is the kind of tool that Microsoft Excel, which is one the tools whose growth "has indirectly eroded potential APL usage", is. Not only that, PPL (i. e. the Prime) can directly operate on entire matrices stored in variables.
(10-21-2017 06:24 AM)Joe Horn Wrote: [ -> ]Unfortunately, the HP Prime does NOT have a "full Unicode character set" (such a font would be impossibly huge).

Even in the G2?
(10-11-2018 10:49 PM)toml_12953 Wrote: [ -> ]
(10-21-2017 06:24 AM)Joe Horn Wrote: [ -> ]Unfortunately, the HP Prime does NOT have a "full Unicode character set" (such a font would be impossibly huge).

Even in the G2?

Correct. The current "Prime Sans" font already contains over 30,000 characters. But that's only a tiny fraction of the number of code points which have been officially defined by Unicode. The "Last Resort" font, used by font fanatics (like me) to detect missing characters, contains almost 400,000 characters... and even THAT font is missing many code points. A "full Unicode character set" in the HP Prime is not going to happen.
(10-12-2018 12:14 AM)Joe Horn Wrote: [ -> ]
(10-11-2018 10:49 PM)toml_12953 Wrote: [ -> ]Even in the G2?

Correct. The current "Prime Sans" font already contains over 30,000 characters. But that's only a tiny fraction of the number of code points which have been officially defined by Unicode.

This is kind of off topic, but it would be nice if the Prime connectivity kit had a "Char" function that would allowed one to insert any one of the "30,000 characters" into a program when writing a program on the computer using the connectivity kit. Currently, I have to save the program to the virtual calculator, open the saved program in edit mode on the virtual calculator, insert the special character using the "char" key on the virtual calculator, send the program back to the connectivity kit, refresh the program on the connectivity, and continue with programming. That is a lot of work just to type one special character.
(10-12-2018 03:30 AM)Gene222 Wrote: [ -> ]Currently, I have to save the program to the virtual calculator, open the saved program in edit mode on the virtual calculator, insert the special character using the "char" key on the virtual calculator, send the program back to the connectivity kit, refresh the program on the connectivity, and continue with programming. That is a lot of work just to type one special character.

I got around a similar issue in my Casio fx-9750gII; I couldn't type in a / character. Then I remembered that the Casio has a character picker for most of the available single characters (472 of them). I opened up a file in the PC and put certain characters into it that I could simply cut/copy and paste into place; thankfully the 9750gII/9860gII supports that. How would that work on the Prime, given its far larger character set?

(Post 306)
(10-12-2018 03:30 AM)Gene222 Wrote: [ -> ]This is kind of off topic, but it would be nice if the Prime connectivity kit had a "Char" function that would allowed one to insert any one of the "30,000 characters" into a program when writing a program on the computer using the connectivity kit. Currently, I have to save the program to the virtual calculator, open the saved program in edit mode on the virtual calculator, insert the special character using the "char" key on the virtual calculator, send the program back to the connectivity kit, refresh the program on the connectivity, and continue with programming. That is a lot of work just to type one special character.

I agree it's frustrating. My workaround is to keep a Word document with my most-often used Prime characters in it, and whenever I need one, just swap that window forward, copy the desired character, swap back to the Connectivity Kit, and paste the character. Not optimal, but still only a few keystrokes.
(10-12-2018 04:33 AM)Joe Horn Wrote: [ -> ]I agree it's frustrating. My workaround is to keep a Word document with my most-often used Prime characters in it, and whenever I need one, just swap that window forward, copy the desired character, swap back to the Connectivity Kit, and paste the character. Not optimal, but still only a few keystrokes.

Most can be worked around without the need for this.

Assigning a value to a variable can be done Pascal-style with ':='. E.g. 'x:=1;'

Comparisons can be written without the need for the "special" character using '<>' for inequality and '<=' and '>=' for the obvious comparisons. Occasionally you'll need the '→' character for instructions like R→B() and on Windows machines at least (I don't know about Mac or Linux) you can get that by holding down the Alt key, typing 26 and releasing the Alt key.

Most operating systems also provide a character map of some sort that allows you to select the required character and copy it to the clipboard.
I originally was just going to send this note to a couple of people on the thread, but maybe others would be interested. Years ago, I defined an alternate "geek" keyboard layout for Windows which is based on the US QWERTY layout, but makes use of the RIGHT "Alt" key (and the shifted version of it) to directly invoke all sorts of special characters, math symbols, Greek letters, language diacritics, and the like WITHOUT having to remember code #s or tediously copy-paste from the character map tool.

I've used it as my only keyboard layout for many years and have given to to colleagues as well. There's little pain going back and forth between it and the "default" should you need to since it doesn't radically change the normal keyboard, but mostly makes use of that Right Alt key to do the new stuff. As far as I know it works with all versions of Windows, although I didn't go back before XP and haven't tried Win10 yet.

It can be easily personally customized with a free Microsoft tool if you like. Also, while I started with the base keyboard being the default QWERTY that Windows ships with in teh US market, but somebody could easily do the same idea starting from any of the many other regional QWERTY, QWERTZ, AZERTY, or other layouts.

I've attempted to attach a map of what it looks like.

If anybody is interested, send me a private mail with your email and I'll send you the files.
(10-12-2018 08:58 PM)burkhard Wrote: [ -> ]... Years ago, I defined an alternate "geek" keyboard layout for Windows ...
If anybody is interested, send me a private mail with your email and I'll send you the files.

Sounds very useful! PM sent.
(10-13-2018 02:09 AM)Joe Horn Wrote: [ -> ]Sounds very useful! PM sent.

1 +
(10-12-2018 07:24 AM)grsbanks Wrote: [ -> ]Occasionally you'll need the '→' character for instructions like R→B() and on Windows machines at least (I don't know about Mac or Linux) you can get that by holding down the Alt key, typing 26 and releasing the Alt key.

How did you determine Alt+26 was for the '→' character? The HP Prime character map shows the "Alt number" for arrow character to be "2192" and "8594" as shown on the picture below. However, Alt+2192 and Alt+8594 do not work when typing on the connectivity kit as shown in the subsequent picture, but Alt+26 does work. Incidentally, when typing on a MS Word 2016 document, both Alt+26 and Alt+8594 yields the arrow character for the "Prime Sans" font.

[Image: b5451w.png]

[Image: 2ryfxhz.jpg]
(10-13-2018 06:46 PM)Gene222 Wrote: [ -> ]
(10-12-2018 07:24 AM)grsbanks Wrote: [ -> ]Occasionally you'll need the '→' character for instructions like R→B() and on Windows machines at least (I don't know about Mac or Linux) you can get that by holding down the Alt key, typing 26 and releasing the Alt key.

How did you determine Alt+26 was for the '→' character? The HP Prime character map shows the "Alt number" for arrow character to be "2192" and "8594" as shown on the picture below. However, Alt+2192 and Alt+8594 do not work when typing on the connectivity kit as shown in the subsequent picture, but Alt+26 does work. Incidentally, when typing on a MS Word 2016 document, both Alt+26 and Alt+8594 yields the arrow character for the "Prime Sans" font.

From here, the good, old ASCII:
[Image: ascii-0-127.gif]
(10-13-2018 07:30 PM)Massimo Gnerucci Wrote: [ -> ]From here, the good, old ASCII:

That is close, but it not the same as on the HP Prime Connectivity Kit.

Code:
EXPORT CharactersList()
BEGIN
END;

// HP Prime Connectivity Kit

// Alt+1  ☺
// Alt+2  ☻
// Alt+3  ♥
// Alt+4  ♦
// Alt+5  ♣
// Alt+6  ♠
// Alt+7  •
// Alt+8  ◘
// Alt+9  ○
// Alt+10  ◙
// Alt+11  ♂
// Alt+12  ♀
// Alt+13  ♪
// Alt+14  ♫
// Alt+15  ☼
// Alt+16  ►
// Alt+17  ◄
// Alt+18  ↕
// Alt+19  ‼
// Alt+20  ¶
// Alt+21  §
// Alt+22  ▬
// Alt+23  ↨
// Alt+24  ↑
// Alt+25  ↓
// Alt+26  →
// Alt+27  ←
// Alt+28  ∟
// Alt+29  ↔
// Alt+30  ▲
// Alt+31  ▼
// Alt+32   
// Alt+33  !
// Alt+34  "
// Alt+35  #
// Alt+36  $
// Alt+37  %
// Alt+38  &
// Alt+39  '
// Alt+40  (
// Alt+41  )
// Alt+42  *
// Alt+43  +
// Alt+44  ,
// Alt+45  -
// Alt+46  .
// Alt+47  /
// Alt+48  0
// Alt+49  1
// Alt+50  2
// Alt+51  3
// Alt+52  4
// Alt+53  5
// Alt+54  6
// Alt+55  7
// Alt+56  8
// Alt+57  9
// Alt+58  :
// Alt+59  ;
// Alt+60  <
// Alt+61  =
// Alt+62  >
// Alt+63  ?
// Alt+64  @
// Alt+65  A
// Alt+66  B
// Alt+67  C
// ...
// Alt+90  Z
// Alt+91  [
// ...
// Alt+200  ╚
// ...
// Alt+300  ,
// ...
// Alt+400  É

// Alt+769  ☺

It is almost as if the HP Prime Connectivity Kit uses a different font from the Virtual Calculator. In any event, I will use Joe's work around and keep a short list of commonly used special characters on a separate program and just copy and paste from that list, instead of using Alt+numbers method, because I can't figure out what the Alt+numbers are for the HP Prime Connectivity Kit.
(10-13-2018 09:49 PM)Gene222 Wrote: [ -> ]
(10-13-2018 07:30 PM)Massimo Gnerucci Wrote: [ -> ]From here, the good, old ASCII:

That is close, but it not the same as on the HP Prime Connectivity Kit.

But your question was: How did you determine Alt+26 was for the '→' character?

To grsbanks' quote: "Windows machines at least (I don't know about Mac or Linux) you can get that by holding down the Alt key, typing 26 and releasing the Alt key."
Pages: 1 2
Reference URL's