HP Forums
Plus42 Equations, Preview Release - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: Not HP Calculators (/forum-7.html)
+--- Forum: Not quite HP Calculators - but related (/forum-8.html)
+--- Thread: Plus42 Equations, Preview Release (/thread-17724.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40


RE: Plus42 Equations, Preview Release - rprosperi - 03-20-2022 06:33 PM

2 Ideas that may help:

1. Some brand PCs that include these dedicated App keys include a utility that lets you 'program' the keys to run the program you want. What brand/model do you have?

2. The windows calculator application is named "calc.exe". If you add the installation folder for Plus42 to the front of the Windows Path, and rename the executable file to "calc.exe" it may launch Plus42 properly. (depends on how that vendor implemented it)

Here's a guide to add a new folder to your path.


RE: Plus42 Equations, Preview Release - Thomas Okken - 03-20-2022 07:16 PM

(03-20-2022 06:33 PM)rprosperi Wrote:  1. Some brand PCs that include these dedicated App keys include a utility that lets you 'program' the keys to run the program you want. What brand/model do you have?

Yes, that's probably the method of choice. Having this as a check box in the Free42 / Plus42 preferences is nice when it works, but the problem, as far as I'm aware, is that Microsoft has never formally documented which registry keys to edit to make this kind of customization. At some point they did something in international or multilingual versions of Windows, where certain parts of the registry were localized, adding another level of keys somewhere, and at that point, trying to set AppKey\18 programmatically became a somewhat nondeterministic process... I have the feeling I should just remove this feature and be done with it.


RE: Plus42 Equations, Preview Release - Albert Chan - 03-20-2022 11:24 PM

A minor issue, when using equation editor.

Type 123456789012345678901

This filled the line and a blinking cursor.

Type 2

The line seems to disappear.

Type 345678901234567890123

Scrolling now work as expected.

Type 4

Line disappear again. (every 22 characters ?)


RE: Plus42 Equations, Preview Release - Thomas Okken - 03-20-2022 11:48 PM

Confirmed, but only in 2-line mode.
I'll look into it!

(This sounds like the hack I implemented quite a while ago, to put the cursor on a line by itself, when it's at the end of the text and the text is n * <screen width> characters long. In the multi-line editor, this hack is necessary in order to prevent the cursor from dropping into the menu row, but it shouldn't be activated in two-line mode.)


RE: Plus42 Equations, Preview Release - Thomas Okken - 03-21-2022 01:49 PM

New update:

1. Fixed equation editor cursor positioning behavior in 2-line mode (see the posts above).
2. Windows and Linux only: Less aggressive annunciator-off repainting, in order to better support skins that use giant Shift annunciators to change the whole keyboard layout when Shift is pressed. This probably needs more work to make this kind of trick work better with the equation editor, but at least now it is consistent across all versions, and more useful than before.


RE: Plus42 Equations, Preview Release - johanw - 03-21-2022 03:06 PM

(03-20-2022 04:27 PM)Thomas Okken Wrote:  The "Map Calculator Key" option works by modifying the Windows Registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AppKey\18\​ShellExecute. That used to work fine, but at some point, it stopped working on some machines, and I never figured out what exactly the problem was,

I checked the registry, and on this machine it turned out that the value was not set at all. When I set it manually the calc key worked as it should be, starting Plus42.

This machine requires me to type in my password when I want to start regedit (company policy, but at least they made me local admin), maybe it failed silently to update the key? And BTW, there was no ShellExecute string value below 18 so I had to add that too.


RE: Plus42 Equations, Preview Release - Thomas Okken - 03-21-2022 03:57 PM

I just tried it on my machine (Windows 10 running in VirtualBox), and found that the calculator key option failed silently there as well. When I checked the error code, it was a "permission denied" error. I also noticed that when I searched the registry, it found AppKey keys at two locations: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AppKey and HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Explore​r\AppKey, and AppKey\18\ShellExecute was only set in the latter.

The combination of these two issues was enough to make me finally throw my hands up in despair and remove the Calculator Key feature from Free42 and Plus42. May it rest in peace.


RE: Plus42 Equations, Preview Release - johanw - 03-21-2022 04:33 PM

From what I find here: https://stackoverflow.com/questions/13440530/how-can-i-get-permissions-to-write-to-registry-keys and elsewhere this is probably more effort than it is worth.

I can understand MS though: suppose any program could change that key binding to start some malware installer.


RE: Plus42 Equations, Preview Release - rprosperi - 03-21-2022 05:16 PM

As it looks like you are comfortable with regedit, etc. idea #2 in my post above should be easy to do and will work.


RE: Plus42 Equations, Preview Release - Thomas Okken - 03-21-2022 05:20 PM

Indeed!

What I find funny is that my commit history tells me that I implemented this feature in February 2010, which was after Windows Vista had come out and MS had started in earnest to make Windows more secure. And yet people managed to use the Calculator Key feature in Free42 anyway. Maybe it was because people kept using Windows 2000 and XP for so long. Or maybe Vista didn't lock down the HKEY_LOCAL_MACHINE part of the registry yet.


RE: Plus42 Equations, Preview Release - johanw - 03-21-2022 05:55 PM

(03-21-2022 05:20 PM)Thomas Okken Wrote:  Or maybe Vista didn't lock down the HKEY_LOCAL_MACHINE part of the registry yet.

From what I've read it is mostly a 64 bit OS thing. When Vista came out not many consumers had 64 bit systems, and XP 64 bit was not such a success. These days I doubt there are any 32 bit windows machines sold as new.


RE: Plus42 Equations, Preview Release - Thomas Okken - 03-24-2022 01:12 AM

This is the real reason why the big display is important Big Grin

Code:
00 { 83-Byte Prgm }
01▸LBL "VITA"
02 CLLCD
03 -1ᴇ-6
04 STO 00
05 -5ᴇ-5
06 STO 01
07 HEIGHT
08▸LBL 00
09 WIDTH
10▸LBL 01
11 RAN
12 0.5
13 -
14 R↓
15 0>? ST T
16 PIXEL
17 DSE ST X
18 GTO 01
19 R↓
20 DSE ST X
21 GTO 00
22 TIME
23 STO ST L
24▸LBL 02
25 LIFE
26▸LBL 03
27 LASTX
28 TIME
29 HMS-
30 X>? 00
31 GTO 03
32 X>? 01
33 GTO 02
34 GTO "VITA"
35 END



RE: Plus42 Equations, Preview Release - roberto_abraham - 03-24-2022 01:49 AM

Well, kiss my productivity goodbye! :-)

VERY COOL, Thomas!


RE: Plus42 Equations, Preview Release - rprosperi - 03-24-2022 02:10 AM

For the love of God, someone please post a screen shot....


RE: Plus42 Equations, Preview Release - Steve Simpkin - 03-24-2022 07:02 AM

(03-24-2022 02:10 AM)rprosperi Wrote:  For the love of God, someone please post a screen shot....

It is very animated so this is a static moment in chaos...


RE: Plus42 Equations, Preview Release - Thomas Okken - 03-24-2022 02:18 PM

New update:

1. Improved decimal Y^X, as discussed in this thread.
2. Android and iOS versions: tweaked the PortraitShort skin layout. Because of the way I programmatically generated this skin from the full-size PortraitTall skin, the keys' sensitive rectangles ended up not extending below the keys, and as a result, it was rather easy to hit the key below the one you were aiming for. This would happen to me all the time, anyway -- I use a phone with a 9:16 screen so PortraitShort is selected by default; people with iPhone X series phones or anything else with 9:19.5 screens may never have noticed any problem.


RE: Plus42 Equations, Preview Release - roberto_abraham - 03-24-2022 10:35 PM

(03-24-2022 02:10 AM)rprosperi Wrote:  For the love of God, someone please post a screen shot....

A full appreciation of the wonderful insanity of Thomas' program requires a movie and not a screenshot. Every iteration is seeded by a new random number, so some animations are more interesting than others, but here's a pretty typical example:

https://www.dropbox.com/s/3mapxj1sazd2oq7/42pluslife.mp4?dl=0

I'm sure Conway would be proud.

Bob


RE: Plus42 Equations, Preview Release - rprosperi - 03-24-2022 10:46 PM

I thought a screen grab would do, but the video is appreciated. A lot faster than I was guessing too.

Thanks!


RE: Plus42 Equations, Preview Release - Thomas Okken - 03-24-2022 10:59 PM

It's faster than it looks, that's the speed with a delay between generations. It you take that out, you can crank the resolution up to 527x512 (64 rows and 88 columns) and it still settles down so fast you can barely catch what's happening.
I wrote the algorithm in the previous century and boy have computers speeded up since then!


RE: Plus42 Equations, Preview Release - ijabbott - 03-25-2022 08:19 PM

I noticed that the gliders freeze when they hit a screen boundary, rather than wandering off into the sunset. On the plus side, if gives other things more of a chance to crash into them!

Another possible variant would be a finite, toroidal surface, like the playfield of Asteroids™.