So this is my reasoning:
Hp perfected the the pocket calculator in 1988, providing a machine which:
- had excellent ergonomics for calculating using built-in functions
- was well made
- had great key feel
- it was awful to program
It's not only hard to read, but it seems to lack looping (which seems to be achieved by GOTOs), functions, generic if/else statements, scoping etc. And that's before we get onto advanced functionality, like optimised sort algorithms (heap sorts etc), slices, maps (and hash-table look ups), methods etc...
I'm imagining a pocket calculator which has all the instant-on and practical functionality of the HP42s/DM42, but which also runs command-line programs in python/go/R/julia/etc/etc. I don't think the calculator needs to be capable of being able to write the programs, but maybe viewing it would be possible. I'm not even saying it needs a different screen/resolution etc.. the command line can adapt to a limited character width and height if necessary. With modern connectivity - cables or wifi, it should be just a matter of dragging and dropping programs written in your favourite desktop editor onto the device. Or even neater, have it sync to your github repo automatically.
Just to continue the conversation from the previous thread:
I guess neither! Using a calculator keyboard to program on is a bit sadistic to me Maybe the option would be nice if you were desperate to write out a program on-the-go and didn't have access to a keyboard. If it had a linux distro, nano/vim could easily be included, and a bluetooth keyboard would make it a lot less painful. But I envisage your desktop/laptop machine being the main place to write a program. Python and R at least are dynamic, so the code would run just fine on its own. Go would also run fine, but can also be compiled - which would probably have to happen on the device.Vitasam wrote: ↑Mon Aug 07, 2017 12:22 pmHi, I think I got your point. Just to clarify - what is a model of programming you do prefer: a) using a PC as cross-compiling tool and just run ready-made binaries on DM42 or b) programming completely 'on board' of a DM42?
Just thinking - a good compromise for option b) is a Forth language.
I'm not familiar with forth personally - but looking through the wikipedia page it looks intriguing! With an ARM processor and a linux distro, pretty much any language is doable. I can see that it functions in a similar way to the stack/RPN, which is nice, though the programming language wouldn't have to operate within the environment of the calculator.
Yes, maybe more hardware resources would be required - nothing that couldn't run on a raspberry pi 1, but would draw more power I'm sure. Power supply would likely need to be more substantial than button cell batteries, and would be unlikely to last for months without recharging. I don't think the screen would have to be too different, as long as when you write the programs you bear in mind the screen limitations. For example taking variables in on a single line, and not printing out hundreds of lines of output!H2X wrote: ↑Mon Aug 07, 2017 1:27 pmSome kind of embedded Linux platform came to my mind as well, but that would require more hardware resources than the current DM42, yes?
What about power supply? Battery change or charging should not have to happen too often. What about screen? Surely such a platform could support larger screens than the DM42, but how large?
I get the idea, I'm just not able to imagine the kind of device. Yet.
In my imagination the device would look, feel and function the same as a HP42s/DM42. But it could run programs created using modern languages, i.e. press [assignable program button 1], and it'll run, say, 'python3 mort.py', or 'go run amlprog.go'. These programs could either ask for input, or take what's already on x/y/etc registers and use those. Given cheapness of storage, you could store loads of programs, which could be accessed using a menu, or re-assigned to another hot key.
Anyway, this is just a little dream I have for the ultimate calculator! I love the HP42s, but I think its programming ability was limited by what was doable back in 1988. I would use it around work with a slew of medical programs/calculators...