HP Forums

Full Version: NumWorks open source calculator
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7
(08-30-2017 08:59 PM)EugeneNine Wrote: [ -> ]Ok, I'm confused, what I CAS. I always thought it was just the backwards (non RPN) entry method.

It stands for Computer Algebra System, see here: https://en.wikipedia.org/wiki/Computer_algebra_system.

Although it includes many(!) capabilities beyond a traditional calculator, the key conceptual difference is a CAS manipulates variables symbolically rather than numerically.

Experts will no doubt add additional clarifications below.

CAS does not mean Algebraic Notation or Operations (i.e. non-RPN or non-RPL) as you were thinking, a CAS can be added to any type of system, though being symbolic, most equations are obviously expressed in algebraic format.
(08-30-2017 05:09 PM)compsystems Wrote: [ -> ]is possible to install or incorporate sympy on NumWorks? http://www.sympy.org/en/index.html
I don't think so. The current micro-python kernel lacks standard libraries, adding them and sympy would probably require too much space. Moreover, sympy is slow compared to a compiled CAS, and that would matter on a calculator. The best candidate for a small CAS on the numworks is probably Eigenmaths, that runs already on Casio calculators. But this is a limited CAS.
Lua has at least one symbolic mathematics package. Lua should fit, it was designed to be small and it is also very fast. LuaJit is even faster and has an ARM backend but I don't know what its memory footprint is.

One issue with these scripting languages is garbage collection. They all have garbage collection but I'm not aware of any that have compacting garbage collection. In an always on device like a calculator, you will eventually run out of memory due to fragmentation.


Pauli
(08-30-2017 02:51 PM)Claudio L. Wrote: [ -> ]
(08-30-2017 05:35 AM)ijabbott Wrote: [ -> ]There seems to be some question about whether or not it can only run digitally signed firmware due to "exam mode" requirements (https://www.reddit.com/r/numworks/commen...tty_easily). This may put the kibosh on projects such as porting Free42, WP-34s, WP-43s, NEWRPL, etc.

I may be wrong, but as far as I can see the STM32 doesn't have secure boot, firmware encryption, or anything like that. There's a cryptographic accelerator module that can be used by software to speed up encryption, but the encryption still has to be done by the firmware and there's nothing protecting that. Disabling signature check in the firmware should be as easy as bypassing erase on exam mode.
Kinetis by NXP have secure boot, but STM32F4 doesn't as far as I know.
Then perhaps it's just a matter of bypassing whatever "official" update mechanism the firmware provides.
I have no crystal ball to guess about any new calculator's success, but Computer Algebra Systems in calculators seem to be here to stay:

https://trends.google.com/trends/explore...Calculator

This feature is the only one that can push me to buy a new calculator for professional duties, though I am not in a hurry now; so far I am a numerical happy camper with Free42 on my desk at work.

Although Numworks' approach looks innovatively divergent, in terms of Python programmability, the lack of NumPy/SimPy is a bit of a shame, and it could certainly be an stopper for any pro.
I'd like to observe that, while the price is not that small. It is the first iteration of the device for the manufacturer
(it is not that the first calculator from hp, ti, casio, sharp was as good as the ones that are sold today).

Plus one should keep in mind that those devices should keep alive the battery, to implement large libraries one need resources and those have a price. Aside from being overkill in a device that does not have much "space" (ram/rom). numpy /simpy are good maybe for a tablet or something bigger. it is unlikely one goes on using them on a calculator with limited keyboard (limited for letters, not for numbers).

And even on a tablet, I am skeptical (unless it is very big, like 10'). Likely one needs a real keyboard to make use of those libraries.

I would be pretty happy (due to the possible competition) if the device would be good enough on the numerical side to match, say, an hp50g or a ti 89, not even a prime /nspire.
Without a form of secure boot, upgrading will be possible. It could be very hard.

I'd expect there to be a small boot loader which runs the calculator firmware. If this boot loader is properly checking for cryptographic signatures, you're not loading a new image onto the device while it is there.

This doesn't stop you necessarily, it might be possible to attach debugging headers to the board and to then replace the boot loader with your own. Soldering will be required and the case will have to be opened. Even if the debug pins aren't run out somewhere nice (they almost always are), it could still be possible to hook them up -- I've seen loose wires pushed under a BGA chip to contact an internal pin before.

If this approach isn't possible, the processor can be replaced by another which you've programmed specially.

Far more likely is the boot loader doesn't implement the cryptography properly and there is an exploitable hole.

The real question is: is it worth the effort? The answer is most likely no. If you are up to doing the kinds of things required, you are probably up to learning the exam material.


Pauli
<speculation>
I'm now guessing that the firmware update would be via the STM32F412xx's built-in USB DFU (direct firmware update) bootloader. Perhaps NumWorks has a fancy "firmware update utility" running on Windows and/or Mac that checks for valid firmware, but that ought to be easy to bypass using generic STMicro firmware update tools.
</speculation>
(08-31-2017 09:55 PM)Paul Dale Wrote: [ -> ]Without a form of secure boot, upgrading will be possible. It could be very hard.

I'd expect there to be a small boot loader which runs the calculator firmware. If this boot loader is properly checking for cryptographic signatures, you're not loading a new image onto the device while it is there.

This doesn't stop you necessarily, it might be possible to attach debugging headers to the board and to then replace the boot loader with your own. Soldering will be required and the case will have to be opened. Even if the debug pins aren't run out somewhere nice (they almost always are), it could still be possible to hook them up -- I've seen loose wires pushed under a BGA chip to contact an internal pin before.

If this approach isn't possible, the processor can be replaced by another which you've programmed specially.

Far more likely is the boot loader doesn't implement the cryptography properly and there is an exploitable hole.

The real question is: is it worth the effort? The answer is most likely no. If you are up to doing the kinds of things required, you are probably up to learning the exam material.


Pauli

From the link I posted, the bootloader is in ROM, comes from the manufacturer of the MCU, and has the ability to reflash the firmware through UART, USB, etc. and doesn't have any cryptography. Even if they put a second stage bootloader to check a signature, you can simply flash another one with the factory bootloader. It is marketed as an open platform and I think it is, there's no need to find hidden ways to hack it.
I have no interest in bypassing exams, but if it's as easy as it seems to be, the main concern is the exam boards pulling their certification, then they can't sell and become instant vaporware.
The big question is if our community should adopt it as an open platform and port our favorite firmware projects to it, with the risk that all our effort can go to waste if they pull out of the market.
It's a risky move.
That sounds a lot easier.

A lot of CPUs like that have fuses that can disable some of the recovery modes. Manufacturers rarely use them.


Pauli
(09-01-2017 02:47 AM)Claudio L. Wrote: [ -> ]The big question is if our community should adopt it as an open platform and port our favorite firmware projects to it, with the risk that all our effort can go to waste if they pull out of the market.
It's a risky move.

I would just wait a year or so. If it is still in business, then go for it.

It can be that the device is all fine and the exam certification won't be so precise checking everything, but still no one would buy it (due to people preferring known brands), so the brand would go down nevertheless.
(09-01-2017 02:47 AM)Claudio L. Wrote: [ -> ]The big question is if our community should adopt it as an open platform and port our favorite firmware projects to it, with the risk that all our effort can go to waste if they pull out of the market.
It's a risky move.

(09-01-2017 05:19 AM)pier4r Wrote: [ -> ]I would just wait a year or so. If it is still in business, then go for it.

I agree with pier4, definitely wait at least a year to see if the product survives and mfr support remains. Although somewhat innovative, the cards are definitely stacked against this player. And the open source nature of the platform will likely not be seen as acceptable to the conservative boards that review these machines for testing certification. Even if safeguards are in place, they can always be circumvented. Though I agree with a comment above - anyone capable of doing so deserves to pass the tests it may be used on. Wink
I can't help thinking one of the designers must have looked at the HP Prime and thought light orange on white was a good idea! (It also has light grey on white instead of the HP Prime's light blue on white.)
(09-04-2017 04:48 PM)compsystems Wrote: [ -> ]discussion on hackaday

https://hackaday.com/2017/09/03/hackaday...er-3-2017/


.

He he, I was the first to put a snarky comment Smile
Playing with online simulator, the first version seems to be bare: function/sequence graphing, linear regression (only), no factorial function. I'm sure that there will be additions should Numworks gets success.

I am not crazy about the yellow alpha characters and gray shift functions on the white keyboard. The lack of color contrast makes for hard reading.

What peaks my interest and hence may get me to buy on is the Python programming language, which will be a first for calculators.
The current version of microPython has only one editable buffer without helper and no commandline, moreover the built is minimal, there is no math module for example. It may change of course, but currently it's almost unusable. Actually, it appears that one month before release the calc was not programmable, the micropython module was added in extremis, there is a warning that it is a beta version, where I would call it a proof of concept...
There is no connection between apps on this calculator, it means that if you define a Python function f, you can not run it in the calculation app, this is also true for a function defined in the function app, you can not call it from the calculation app! It also lacks a solver application, a spreadsheet, geometry, helper to enter a matrix, lists, vectors, etc.
From github, it appears there is 1 fulltime developper +1 partial time (the startup manager), therefore it will take time to match the expectations of a calculator at that price. The flash ROM is only 1M, where 526K are already used, it may well be filled before...
I would recommend upgrading the flash to 8M, at least.
... no math/cmath micro-library included!?! :.! It really sounds weird, for being a calculator, I mean.
(09-05-2017 09:12 AM)Luigi Vampa Wrote: [ -> ]... no math/cmath micro-library included!?! :.! It really sounds weird, for being a calculator I mean.

The port configuration is here
Not much enabled!
(09-04-2017 07:33 PM)Eddie W. Shore Wrote: [ -> ]What peaks my interest and hence may get me to buy on is the Python programming language, which will be a first for calculators.
The first with built-in Python, anyway. You can run MicroPython on TI-Nspire using the Ndless hack, although the port hasn't been updated since the original port three years ago.
Pages: 1 2 3 4 5 6 7
Reference URL's