Writing RPL programs on OS X



#20

All of the discussions on this that I can find are either older and suggesting software that is not compatible with current computers, or using wine to run a windows hp emulator.

I would like to be able to write longer programs on my computer and transfer them via SD card. My problem is that I'm not understanding a way to type the special characters that my calculator uses.

For example the square root symbol, x-bar, or greek characters, etc.

Does anyone know of a way to allow me to type these HP 50g compatible characters on a mac running OS X?

I'm pretty uneducated on the topic of character coding, all I've been able to find is that the 50g uses ISO-8859-1 character map with certain characters altered. I was able to load the ISO-8859-1 character set on my computer, and I can (with the help of an hp 48 font map) insert characters (using the top and left legend) in this ISO-8859-1 character set which do show up as the intended character once displayed on my 50g. But as the image shows, the characters on my computer are just empty boxes, so I have to use that table on the web page linked to find them. It's quite a pain.

Hopefully there is a more graceful way to do this?

Edited: 27 Nov 2013, 4:59 p.m.


#21

Hi Sean, IIRC there is a 48/50 TTF font floating around for documentation. Whether or not that aligns with the codes in the 50g is unknown to me. However you can probably use it as a base for a custom font. Unicode fonts will probably have all the characters, but then you need to make it ISO-8859-1.

After you figure the fonts out, then the next step is to download and run Ukelele so that you can create a custom keyboard map using the option/alt key for example. This is how I use APL on my Mac. APL has an alien dialect. :-)

After running Ukelele, put your custom keylayout in $HOME/Library/Keyboard Layouts as 50g,keylayout. Then from System PrefLang & Text/Input Sources, select your 50g keylayout. I'd also check "Allow a diff for each document" so that as you jump around apps, they keylayout will remain with your editor/emulator.

Lastly from System Pref/Keyboard/Keyboard Shortcuts/Spotlight, uncheck "show spotlight window". This way you can use the default opt-cmd-space to switch keylayouts quickly.

Oh, instead of a custom font, use unicode chars and define that with Ukelele. Then write a small program to convert your text file from unicode to ISO-8859-1 and vv. I have not found an easy way to make fonts on the Mac based on other fonts, etc...

Good luck.


#22

Egan - just wondering which APL implementation you run on the Mac? I use NARS2000 on Windows and the new GNU APL on Linux but haven't found an APL for MAC OSX. Thanks!


#23

Quote:
Egan - just wondering which APL implementation you run on the Mac?

GNU APL.
./configure --prefix=/usr/local;make;sudo make install

#24

Thanks Egan for the command-line installation instructions -- it worked!


#25

I run apl with Terminal with the fonts and layout from: http://www.dyalog.com/resources/. However I've made a few minor changes to the key layout using Ukelele to align with GNU APL. The unicode that GNU APL expects does not always align with Dyalog. You can either change the keymap or hack Avec.* in GNU APL.

#26

Another alternative is slash notation:

HP48G/HP49G Backslash Equivalences

HP49G ANSI Back- Description
CHARS Char- slash
Code actor Equi-
valent

128 &#128; \<) Angle symbol for polar notation
129  \x- x with bar above it
130 &#130; \.V
131 &#131; \v/ Square root symbol
132 &#132; \.S Integral symbol
133 &#133; \GS Uppercase Greek Sigma
134 &#134; \|>
135 &#135; \pi Lowercase Greek pi
136 &#136; \.d Differentiation symbol
137 &#137; \<= Less-than or equal-to symbol
138 &#138; \>= Greater-than or equal-to symbol
139 &#139; \=/ Not-equal-to symbol
140 &#140; \Ga Lowercase Greek alpha
141  \-> Right arrow
142 &#142; \<- Left arrow
143  \|v Down arrow
144  \|^ Up arrow
145 &#145; \Gg Lowercase Greek gamma
146 &#146; \Gd Lowercase Greek delta
147 &#147; \Ge Lowercase Greek epsilon
148 &#148; \Gn Lowercase Greek eta
149 &#149; \Gh Lowercase Greek theta
150 &#150; \Gl Lowercase Greek lambda
151 &#151; \Gr Lowercase Greek rho
152 &#152; \Gs Lowercase Greek sigma
153 &#153; \Gt Lowercase Greek tau
154 &#156; \Gw Lowercase Greek omega
155 &#155; \GD Uppercase Greek Delta
156 &#156; \GP Uppercase Greek Pi
157  \GW Uppercase Greek Omega
158 &#158; []
159 &#159; \oo Infinity symbol
171 « \<< Start of program delimiter (<<)
176 ° \^o Degree symbol
181 µ \Gm Lowercase Greek mu
187 » \>> End of program delimiter (>>)
215 × \.x Cross-product operator
216 Ø \O/ Slashed Oh
223 ß \Gb Lowercase Greek beta
247 ÷ \:- Division symbol

#27

Hi Sean,

As an alternative you might consider my Hoppi program at:-

www.bitbucket.org/cloudycat/hoppi

that transfers programs via USB or serial cable. It features automatic translation between hp50g character codes and UTF-8 (native Mac encoding, see the README).

It's free! If you try it then please let me know if you like it (or not -- all feedback welcome).

Thanks,
Paul


#28

Paul, this is awesome, esp. with the translation. +1 for using Lisp too. :-)

This is very quick/dirty keylayout for OS/X that uses the unicode from your source:

To use, go to http://sense.net/~egan/RPL/ and download the keylayout and icns file and put in $HOME/Library/Keyboard Layouts, then from Sys Pref/Lang & Text/Input Sources select RPL and/or follow my directions above.

I've only tested with TextEdit and VIM from Terminal.

If others want to improve the icon or or layout go ahead and send to me and I'll update it.


#29

Hi Egan,

Thanks for the keyboard layout, that's very useful!

When I get the time I want to integrate a text editor into Hoppi to enable editing of RPL objects and transferring them to/from the stack. This shouldn't be too difficult since there is an editor built-in to the Clozure Common Lisp environment. It will just take a little time for me to figure out how to do it (I'm no expert with Cocoa).

Paul

#30

Wow thanks fellas, these options are excellent! I've just gotten both Hoppi and Ukelele.

#31

Is this keyboard layout using unicode characters? There will still need to be a step that converts the text file to ISO-8859-1 right?


#32

Quote:
Is this keyboard layout using unicode characters?

Correct, using the unicode recognized by Hoppi. BTW, I made some minor changes, please look at the PDF for the proper map.
Quote:
There will still need to be a step that converts the text file to ISO-8859-1 right?

No. Hoppi does that automatically when transferring to and from the 50g.

You should be ready to go.

Edited: 29 Nov 2013, 4:25 p.m.

#33

Paul, I'm having some trouble figuring out how to transfer files with Hoppi. I downloaded the .dmg package and moved the application over to my Applications folder. When I run Hoppi it sees and connects to the calculator, but past that I'm not understanding how to send a file to the calculator, or pull one from it.

One time I was able to select a file in Hoppi but it said that the transfer failed. Every other time I have clicked the button in the top left of Hoppi that is labeled with my home directory, all files are greyed out.

I'm not exactly sure when or how to use the RECV command on the 50g.

Sorry for my ignorance ;)


#34

Hi Sean,

I really need to improve the documentation :-)

With a 50g the easiest way to transfer files is via the FILER application (left-shift APPS key).

To send a file to the computer select it in the FILER then press the SEND soft-key (2nd page of the soft menu).

To transfer a file from the computer to the calculator go to the File->Send File... menu command in Hoppi, select the appropriate file from the file dialog then press the Send button. On the calculator within the FILER press the RECV soft key.

The problem with the 50g (as opposed to the 48g) is that the "Transfer.." app does not seem to work correctly (at least in Kermit mode): it sends nonsense packets when it should be requesting a directory listing, so a fully calculator controlled transfer is not possible (yet).

Hope this helps,
Paul


#35

Hi Paul,

Last time I use this it worked: http://hpconnect.sourceforge.net/

Perhaps there are some hints in the source.


#36

Hi Egan,

It doesn't use Kermit. It uses the Xmodem protocol and requires the calculator to be in server mode running the XSERV command.

Paul


#37

Yeah I know. Is that a problem? Xmodem is faster than Kermit too.

#38

Ah, thanks. It seems obvious now that I've done it. Worked perfectly, now I can type notes or formulas exactly as I had hoped, thank you!


Possibly Related Threads…
Thread Author Replies Views Last Post
  HP50g: Writing a function that returns a function Chris de Castro 2 2,143 12-10-2013, 06:49 PM
Last Post: Han
  48G vs 49G+ User RPL Speed Comparison John Colvin 7 2,680 11-16-2013, 10:07 PM
Last Post: Han
  RPL 32 David Hayden 4 2,107 11-11-2013, 11:34 AM
Last Post: David Hayden
  [HP-Prime] - Shortcuts for program writing Jean-Michel 4 1,999 11-01-2013, 07:55 AM
Last Post: Jean-Michel
  HHC / HP Museum Programming Contest for RPN and RPL machines Gene Wright 18 5,722 09-22-2013, 09:39 AM
Last Post: Miguel Toro
  Pilbox speedup on Mac OS X Håkan Thörngren 1 1,168 06-07-2013, 03:27 PM
Last Post: Egan Ford
  PILBox on Mac OS X success Håkan Thörngren 5 2,004 03-25-2013, 11:45 AM
Last Post: Egan Ford
  Saturn on Android_OS and i-OS CompSystems 6 2,251 03-17-2013, 01:40 PM
Last Post: hugh steers
  Is there a free RPN stack emulator for writing 35s programs Chris C 6 2,385 11-20-2012, 08:01 AM
Last Post: Mike (Stgt)
  RPL long vs. short names peacecalc 5 2,087 10-30-2012, 01:25 PM
Last Post: peacecalc

Forum Jump: