HP Forums
Blue Skying - A 71B Today - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: Blue Skying - A 71B Today (/thread-1720.html)



Blue Skying - A 71B Today - Les Bell - 06-26-2014 02:44 PM

I've been playing around with the 71B and its lovely implementation of BASIC. Well, lovely if you ignore the need for line numbers to keep lines in order. And the fact that it's BASIC. Still, the machine was a powerhouse of its time - highly expandable, with its four ports plus HP-IL and card reader, and a commendably open architecture, yet small enough to fit in a jacket pocket.

And it led me to wonder, what would I put in a 71B today? I'd keep the hardware form factor, perhaps slimmed down (although a multi-line display would be nice); the QWERTY keyboard layout with shifted keywords and separate numeric pad is ideal, and I expect we'd all agree the keyboard quality is of prime importance. Rather, I'd just focus on the software (and maybe the processor - we can certainly improve on the Saturn today).

It strikes me that a handheld Python machine would be the way to go. Python has already established itself as the dominant language for non-performance critical scientific and mathematical computing, i.e. code that doesn't have to be compiled and run on a supercomputer. It's embeddable and extensible - see https://docs.python.org/3.4/extending/ - so that the capabilities of LEX files could be provided.

The math module provides all the basic mathematical functions (logs, exponents, trig, hyperbolics) and the cmath module extends this to complex numbers. The syntax isn't quite as natural as we're used to - math.pow(x,y) rather than x^y, for example, but I could live with that (or take non-standard liberties with the language). There's also support for decimal numbers, fractions and pseudo-random numbers.

Add the numpy library and you'd have n-dimensional arrays, linear algebra and Fourier transforms. Scipy gives numerical integration. Sympy could provide a CAS for symbolic maths.

The Python language has all the expected flow control statements, but also supports both object-oriented and functional programming paradigms (lambda, map, reduce, etc.).

Not much of an OS would be required - just a stripped-down Linux kernel. It wouldn't be too difficult to work up a RAM filesystem like that of the 71B, and there probably wouldn't be a need for expansion ports, since everything could be loadable in RAM, probably via USB. Python already has an interactive prompt, but it should be possible to expand it into something like the 71B's CALC mode.

If I had plenty of time and budget, I'd stick an 802.11ac chipset in there (or LTE) and allow access to https://, WebDAV and maybe some form of RPC to other Python apps running on external servers or in the cloud (e.g. Google App Engine). This would allow access to external data sets, possibly in CSV, XML or JSON formats. In fact, the more I think about it, the more I like 802.11 as a way of replacing HP-IL or USB - for example, printing could be done using Google Cloud Print or similar, as could mass storage (but perhaps not data acquisition). Conversely, the calculator could run as a server, allowing use of a full-size screen and keyboard for editing and development, which would also open up the possibility of graphics.

What would you do, in 2014, with a 71B-style form factor? Is Python the language, or would you use JavaScript, ML or something else? And what would you do for I/O?


RE: Blue Skying - A 71B Today - Martin Hepperle - 06-26-2014 03:01 PM

... sounds Raspbery Pi'ish to me - Linux, I/O and you can run everything, not just Python. Its form factor is similar to a HP 71B, but the power consumption probably too high for battery power.

On the other hand a Java VM in hardware would also be a good kernel as you can have Python, Java, JavaScript, Lisp, Scala, ... on this machine via Java's scripting interface. There are at least 10 useable language available which run on this VM. This is more flexible than any other software platform I think. So a user can use the language of his choice, but still access the same core libraries for I/O, math etc. without effort. However i have not seen any BASIC, ALGOL, FORTRAN or FORTH implementation for the Java machine.

Martin


RE: Blue Skying - A 71B Today - Thomas Klemm - 06-26-2014 03:04 PM

Have you ever heard of Micro Python?


RE: Blue Skying - A 71B Today - Garth Wilson - 06-26-2014 08:11 PM

Quote:Well, lovely if you ignore the need for line numbers to keep lines in order.

I sometimes wrote without line numbers, in my text editor, also leaving white space (indentation, blank lines, etc.) for visual factoring, and I put a function in my text editor to make a separate copy of the file and remove the blank lines and formatting data and add line numbers and then TRANSFORM it to BASIC. This also allowed using descriptive variable names, then doing a fast search-and-replace with names the 71's could use. You don't get the advantage of its checking everything as you enter it, but with the other freedoms, you tend to make fewer mistakes anyway.

Regarding the multi-line display: I'm sure we will all take all the resolution we can get, but I find that I can also get along with very little, if it is used well. Although I have the 80-column video interface and monitor, I wanted my text editor to be nimble even when I was mobile, without the big monitor and interface box and power supply. Using the 1-line, 22-character LCD is like viewing your work through a keyhole (for those of us old enough to remember the type where you could see through to the other side of the door if the key wasn't in the hole), but it turned out that that really wasn't so bad if you could move the keyhole around nimbly. Something like a tiny trackball would have further improved it, but it worked surprisingly well as it was. One time when I was on a school board, I had a draft of something I had nearly finished writing to the board, and I was reading it to another board member off the 71, at normal talking speed, probably 500-1000 words, and he wondered how I could be reading and reading off that little computer without even touching it. I had to show him. (I had a print-block-to-LCD function in my editor which allowed telling it how fast to scroll while you read.)

Quote:And what would you do for I/O?

HPIL was perfect for so many things, and I used it a lot in the late 1980's for controlling many pieces of lab instrumentation, simultaneously, through the HP82169A HPIL-to-HPIB interface converter. There's no reason HPIL couldn't have been taken to much greater speeds. Later, I considered making an HPIL-like synchronous serial interface loop that would have SPI speeds, but ended up with a true serial bus instead of a loop, compatible with SPI but more flexible, extended in several directions at once. I called it 65SIB.

What got me into my home-made workbench computers though was the fact that HPIL could not give me sub-microsecond control or monitoring of individual bits for things on the workbench. In fact, USB fails terribly there too. USB is ok for consumer items but it's absolutely terrible for those of us trying to set up custom things on the workbench. Even its name is very inaccurate. To go further though, I will refer you to Samel Falvo's excellent short article, "Software Survivalism" from 8 months ago.

The 71 is where I got my introduction to Forth, and I was absolutely enthralled with it, in spite of the fact that what's in the 71's Forth/Assember module is an extremely poor implementatin of it. Fortunately, since it's Forth, I was able to improve and extend it a lot, even without learning the assembly language.


RE: Blue Skying - A 71B Today - Les Bell - 06-26-2014 10:55 PM

(06-26-2014 03:01 PM)Martin Hepperle Wrote:  ... sounds Raspbery Pi'ish to me - Linux, I/O and you can run everything, not just Python. Its form factor is similar to a HP 71B, but the power consumption probably too high for battery power.

Yep - the power consumption would be the problem. A low-power processor would be the way to go. If I was doing this sort of thing commercially, though, I would probably want to focus my efforts on one language, rather than spread development, documentation and support across a variety - but document the architecture so it's open for others to re-target.

I should stress, though, I'm not planning anything - just dreaming. I'm not likely to find time to play seriously with these ideas any time soon. Sad


RE: Blue Skying - A 71B Today - Les Bell - 06-26-2014 10:57 PM

(06-26-2014 03:04 PM)Thomas Klemm Wrote:  Have you ever heard of Micro Python?

I hadn't - thanks, Thomas! I've just been playing around with Python in what little spare time I have, and then when I got my 71B, an obvious synergy appeared. I'll check that out, though, as I can think of one or two interesting projects for it. Wink


RE: Blue Skying - A 71B Today - Les Bell - 06-26-2014 11:11 PM

(06-26-2014 08:11 PM)Garth Wilson Wrote:  I sometimes wrote without line numbers, in my text editor [...]

At this point, I only have the 71B itself - I was curious about the machine and so got one just to play with. Despite being a dyed-in-the-wool RPN guy, I'm liking it much more than I expected - there are some very clever and elegant ideas in there.

(06-26-2014 08:11 PM)Garth Wilson Wrote:  Regarding the multi-line display [...] Although I have the 80-column video interface and monitor
[...]
HPIL was perfect for so many things, and I used it a lot

I figured that a single-line display would be fine for use as a calculator, for running applications and for simple program - especially if one could connect to the machine and use a full-sized screen and keyboard. However, after I posted I remembered that Python uses indentation to denote program structure, and a single-line display would not make that particularly clear. On the other hand, the answer might be as simple as marking the bezel so that the level of indentation is more obvious.

I'd completely forgotten about the HP-IL video display. Darn it - while I have an HP-IL tape drive and printer, I'd promised SWMBO (She Who Must Be Obeyed) that I was done acquiring vintage HP gear for a while, but it looks like I could be in trouble . . .

(06-26-2014 08:11 PM)Garth Wilson Wrote:  The 71 is where I got my introduction to Forth, and I was absolutely enthralled with it, in spite of the fact that what's in the 71's Forth/Assember module is an extremely poor implementatin of it. Fortunately, since it's Forth, I was able to improve and extend it a lot, even without learning the assembly language.

I think I'll give the Forth ROM a miss - so many toys, and so little time . . .