Status Update Thread

904 views
Skip to first unread message

Thomas Okken

unread,
Sep 21, 2023, 7:34:26 AM9/21/23
to Free42 & Plus42
I'm starting this thread to post updates on the status of Free42 and Plus42 development. I'm not sure yet whether to make this a read-only thread, where group members would have to start separate threads if they want to respond. For now the thread is writable for everyone, we'll see how it goes.

Here's the first status post:

Work on the next major updates to Free42 and Plus42 has been slow lately, I have needed to take some time off because other aspects of my life got in the way. I'm trying to get back into it now, and currently I have these items at the top of my agenda:
  • FUNC improvement: make it hide the stack contents, so only the actual parameters are on the stack when the function begins. What this means is that functions will be able to use CLST, R↓, etc., without affecting their callers.
  • EDIT improvement: make it support empty lists, nested lists, and matrices within lists.
  • Plus42: Full-screen EDIT.
  • Plus42: Customizable header line.
  • Android and iOS: Better tablet support.
It's a somewhat ambitious list, so even if I'm able to work on it full time, it'll probably take at least a month. Maybe I'll end up deciding it's taking too long and put out a release with only some of these changes, and put off the rest to a following one. Stay tuned!

Thomas Okken

unread,
Oct 28, 2023, 2:45:48 PM10/28/23
to Free42 & Plus42
I finally finished the new FUNC. I uploaded test builds of Free42 and Plus42 for those who are interested in a sneak peek:


The Plus42 builds also include the new features that are taking the place of what was originally going to be a fully customizable header. Namely: LTOP (show LASTx at the top of the stack area); ATOP (show ALPHA at the top of the stack area); HFLAGS (annunciators for flags 0 to 10 in the header line); and HPOLAR (annunciator for POLAR mode in the header line). All of these functions are in the DISP menu.

Work starts on the EDIT improvements next...
Message has been deleted

Thomas Okken

unread,
Nov 6, 2023, 2:04:35 PM11/6/23
to Free42 & Plus42
I implemented nested list and matrix editing in the matrix editor. Test builds are in the same locations as before:


In the new matrix/list editor, the format of the X register prompt now supports lists, nested lists, empty lists, and matrices within lists, with these formats:

1= first item of the top-level list
1.2= second item of the list, which is the first item of the top-level list
1.2.3= third item of the list, which is the second item of the list, which is the first item of the top-level list
etc.

1:1= top-left element of the top-level matrix
2.1:1= top-left element of the matrix which is the second element of the top-level list
etc.

When editing a list, when the current list item is also a list, pressing the → menu key will enter that list;
When editing a list, when the current list item is a matrix, pressing the → menu key will enter that matrix;
When editing a nested list, pressing EXIT or pressing the ← menu key will go to the enclosing list;
When editing a matrix inside a list, pressing EXIT will go to the enclosing list.

When editing an empty list, the item number is shown as the letter E (as in "empty").

The code could use more testing but the basic functionality is all there. The next item on my list is to use the screen area above the X register to show as much of the current list or matrix as will fit, while in the list/matrix editor in Plus42. That will be the final item of core functionality on my current to-do list; I'm planning to release this code as Free42 3.1 and Plus42 1.1 once it's complete and tested.

Thomas Okken

unread,
Nov 6, 2023, 7:22:05 PM11/6/23
to Free42 & Plus42
I uploaded new test builds, fixing two issues:
  1. Free42 and Plus42: RTN after LNSTK without FUNC did not switch back to 4-level stack mode correctly. If the stack had more than 4 levels, it would trim the stack by dropping the lowest levels, rather than the highest.
  2. Plus42 only: Removed the FUNC 01 LNSTK from the start of generated code. The FUNC 01 wasn't necessary -- because generated code always consumes 0 parameters and returns 1 result anyway -- and the LNSTK isn't necessary when the function is called while NSTK mode is already active. Removing these unnecessary calls makes calls from generated code to generated code much more efficient, which is particularly relevant for recursive functions.

Thomas Okken

unread,
Nov 6, 2023, 7:30:47 PM11/6/23
to Free42 & Plus42
Hmm... I just realized that it is necessary to do FUNC 01 during the initial EVAL/EVALN, because without it, LASTX isn't preserved, and the REGX, REGY, REGZ, REGT, LASTX, and STACK[n] functions don't work.
I'll fix this in the next build.

Thomas Okken

unread,
Nov 6, 2023, 9:07:33 PM11/6/23
to Free42 & Plus42
I uploaded another test build, for Plus42 only, that fixes the stack access functions for equations (REGX, REGY, REGZ, REGT, LASTX, and STACK[n]).

Thomas Okken

unread,
Nov 7, 2023, 9:11:12 AM11/7/23
to Free42 & Plus42
I uploaded another test build, with improved FSTART behavior.

FSTART replaces the old FUNC 01 LNSTK at the beginning of generated code. FSTART also performs FUNC 01 and LNSTK, but only when they are actually needed. That is, when the generated code is called from generated code, FUNC 01 and LNSTK are not performed, and if the generated code is called from RPN user code, FUNC 01 is performed, and LNSTK is performed if the stack wasn't in NSTK mode already.

Together, these changes make equation-to-equation calls much more efficient, while also making the stack access functions work in equations called from equations, where they didn't work previously.

Thomas Okken

unread,
Nov 7, 2023, 3:03:04 PM11/7/23
to Free42 & Plus42
I uploaded a new set of test builds. They fix a bug in EDIT, which could start up in the wrong mode (list vs. matrix editing).

Thomas Okken

unread,
Nov 7, 2023, 6:49:03 PM11/7/23
to Free42 & Plus42
New update: fix to Plus42, where you couldn't exit from the matrix editor while editing a top-level empty list.

Thomas Okken

unread,
Nov 10, 2023, 7:45:35 PM11/10/23
to Free42 & Plus42
New update:
Added CSLD? to CATALOG→PRGM
Removed Alt-/ and Alt-? shortcuts for "About" in the Windows versions
Plus42: Added VIEW() function

The VIEW() function takes one or more parameters, and displays/prints them using the RPN VIEW function. It returns its last parameter. From an evaluation standpoint, it acts like SEQ().

Vincent Weber

unread,
Nov 11, 2023, 1:58:38 AM11/11/23
to Free42 & Plus42
The VIEW() function is nowhere to be found in the equation catalog, shouldn't it be next to STOP() in the PRGM.FNCT menu and even mapped to the VIEW key? 
Think of us, poor mobile users won't don't have a keyboard :D

Thomas Okken

unread,
Nov 11, 2023, 3:14:10 AM11/11/23
to Free42 & Plus42
Oops 😰

Thomas Okken

unread,
Nov 11, 2023, 3:07:01 PM11/11/23
to Free42 & Plus42
New updates:
  1. Keyboard mapping fix for Linux (support for shifted arithmetic keys on the number pad; should work for Shift-Space too).
  2. Plus42 equation editor: added VIEW to CATALOG→FCN and to PGM.FCN, and enabled the VIEW key. Also moved the type check functions to a submenu within PGM.FCN, to prevent the menu from becoming more than 5 rows long.

Vincent Weber

unread,
Nov 11, 2023, 3:57:03 PM11/11/23
to Free42 & Plus42
Just 2 questions regarding VIEW() 
1. If you supply more than one argument, they are viewed in order, but in practice you only get to see the last one, so what's the point of supplying several? I thought if was for printing, but:
2. Those VIEW statements don't get printed, be it in MAN or TRACE mode, is it intended? 

Vincent Weber

unread,
Nov 11, 2023, 4:54:39 PM11/11/23
to Free42 & Plus42
Forget what I've said for 2, I stupidly forgot about flag 21!! 
Message has been deleted

Thomas Okken

unread,
Nov 11, 2023, 6:23:07 PM11/11/23
to Free42 & Plus42
Forget what I've said for 2, I stupidly forgot about flag 21!!
 
That's your answer for question 1 as well:
 
1. If you supply more than one argument, they are viewed in order, but in practice you only get to see the last one, so what's the point of supplying several? I thought if was for printing, but:

Bingo!

Thomas Okken

unread,
Nov 15, 2023, 11:10:52 AM11/15/23
to Free42 & Plus42
I released Free42 3.1 today.
(Plus42 1.1 will follow in about two weeks.)

The released version adds a few fixes to the list editor, but is otherwise identical to the most recent test version. I have removed the test versions; the release versions for Android, Windows, MacOS, and Linux are up on my web site now, and they will probably show up in the Android and iOS app stores in a day or two, if not sooner. (You never know how long it will take, but it's been mostly within a day in recent times.)

Thomas Okken

unread,
Nov 15, 2023, 8:18:45 PM11/15/23
to Free42 & Plus42
The Android and iOS versions of Free42 3.1 are in the app stores now.

Werner Huysegoms

unread,
Nov 16, 2023, 3:43:23 AM11/16/23
to Free42 & Plus42
CSLD? allows you to verify if stack lift was disabled upon calling the UDF. Is there also a way of returning with stack lift disabled? RTNSLD ;-)
Werner

Thomas Okken

unread,
Nov 16, 2023, 3:50:34 AM11/16/23
to Free42 & Plus42
CSLD? allows you to verify if stack lift was disabled upon calling the UDF. Is there also a way of returning with stack lift disabled? RTNSLD ;-)

No.

Thomas Okken

unread,
Nov 24, 2023, 12:09:17 PM11/24/23
to Free42 & Plus42
I just uploaded new Plus42 test builds. These now include the full-screen matrix/list editor.
This new full-screen mode works the same as the original matrix editor, except it uses the entire screen area above the X register to show as much of the current matrix or list as it can. If you want to see the regular stack and header display, you can switch back to the old UI using the new STK toggle in the second row of the matrix editor menu.

Barring bug fixes and UI tweaks, this is what I'm planning to release as Plus42 1.1 in early December.

Vincent Weber

unread,
Nov 24, 2023, 12:15:15 PM11/24/23
to Free42 & Plus42
I have just tried it, and I love the new UI, very flexible and pretty, even better than the 48! 
Just one thing I find strange, though. When you modify one cell, this is not reflected in the full-screen editor immediately when you press Enter. Only if you move one cell with the arrows. Is it on purpose? 

Thomas Okken

unread,
Nov 24, 2023, 12:45:55 PM11/24/23
to Free42 & Plus42
I have just tried it, and I love the new UI, very flexible and pretty, even better than the 48! 

Thanks! :-)
 
Just one thing I find strange, though. When you modify one cell, this is not reflected in the full-screen editor immediately when you press Enter. Only if you move one cell with the arrows. Is it on purpose? 

Yes, it is. What you see in the grid is what's currently stored in the matrix. What you're entering in the X register isn't stored in the matrix until you press one of the arrow keys in the menu.

Vincent Weber

unread,
Nov 24, 2023, 12:47:07 PM11/24/23
to Free42 & Plus42
Ok, thanks! And congrats! :) 

Thomas Okken

unread,
Nov 24, 2023, 12:55:09 PM11/24/23
to Free42 & Plus42
😊🥳

Thomas Okken

unread,
Nov 25, 2023, 7:45:15 AM11/25/23
to Free42 & Plus42
I just noticed I forgot to mention something:

Just 2 questions regarding VIEW() 
1. If you supply more than one argument, they are viewed in order, but in practice you only get to see the last one, so what's the point of supplying several? I thought if was for printing, but:
2. Those VIEW statements don't get printed, be it in MAN or TRACE mode, is it intended?

If you turn off the printer (PROFF) and then set flag 21, VIEW and AVIEW instructions in programs will halt program execution, so you can look at the output at your leisure, and press R/S when you're ready to let the program continue. This is behavior going back all the way to the HP-41C, and it is meant to allow programs to rely on VIEW and AVIEW for printing, while also being usable when no printer is available. The same trick can be used with VIEW() in Plus42 equations.

Thomas Okken

unread,
Nov 25, 2023, 7:48:04 AM11/25/23
to Free42 & Plus42
Updated Plus42 test builds for Windows; they were missing the Extended keyboard mapping that I added to Free42 a couple of weeks ago.
(The Mac and Linux versions were already in sync with the latest Free42 keyboard logic.)

Thomas Okken

unread,
Nov 29, 2023, 11:15:57 AM11/29/23
to Free42 & Plus42
Free42 3.1.1: bug fix release

It was brought to my attention that ASSIGN "" (to remove an assignment from one CUSTOM menu key) didn't work in Free42 3.1 for iOS. This turned out to be caused by (yet another) optimizer bug in Apple's compiler, and it affected the MacOS version as well.

I'm releasing a new version, 3.1.1, to fix this bug.
It also fixes the bug where GOTO in EDIT/EDITN, while editing a list, would ask for a column number. It shouldn't do that, since lists are one-dimensional, so you should only have to enter a row number.

Thomas Okken

unread,
Nov 29, 2023, 6:31:39 PM11/29/23
to Free42 & Plus42
Plus42 1.1 released

Will appear in the Android and iOS app stores today or tomorrow, I expect; the desktop versions are on my web site now.
Thanks to everyone for their suggestions and help!

2023-11-29: release 1.1

* Full-screen matrix and list editing (EDIT & EDITN)
* Added option to show LASTX at the top of the stack display area: DISP→LTOP
* Added option to show ALPHA at the top of the stack display area: DISP→ATOP
* Added option to show the state of flags 0-10 in the header: DISP→HFLAGS
* Added option to show an indicator for POLAR mode in the header: DISP→HPOLAR
* EDIT, EDITN, and INDEX now support editing lists, nested lists, empty lists,
  and matrices within lists. See the Free42 web site for details.
* FUNC now hides the caller's RPN stack, so user-defined functions can use
  functions like CLST and R↓ without causing side effects.
* User-defined functions can now be made to support 'stack lift disable'
  properly. For functions using FUNC, this happens automatically, and other
  functions can use the new CSLD? function (Caller's Stack Lift Disabled?).
* FNRM and UVEC, when called with very large parameters, could get incorrect
  results due to overflows in intermediaries. Fixed.
* Fixed parameter bounds check in PIXEL.
* Windows, MacOS, and Linux versions: Keyboard maps now support separate
  mappings for unshifted and shifted numeric keypad keys, and unshifted and
  shifted Space.

Thomas Okken

unread,
Nov 29, 2023, 8:11:06 PM11/29/23
to Free42 & Plus42
Plus42 1.1 is live in the Android and iOS app stores.

Thomas Okken

unread,
Dec 1, 2023, 8:47:07 AM12/1/23
to Free42 & Plus42
I found a couple of minor bugs, one in FUNC and one in CSLD?
I built bug fix releases: Free42 3.1.2 and Plus42 1.1.1.
They're on my web site now, and waiting for approval for Google Play and the iOS App Store.

Thomas Okken

unread,
Dec 13, 2023, 7:57:36 PM12/13/23
to Free42 & Plus42
Android 13 and Android file access

Just a quick heads-up:

Now that it looks like the regressions in Plus42 1.1 and Free42 3.1 have been taken care of, I've started looking into dealing with the long-standing issue of file access restrictions under Android 11 and later.

It looks like this will be a pretty straightforward fix, using the file selection intents that are also used by Emu42.

I just became aware of a new problem, in Android 13, where the file selection dialogs don't work at all. This appears to be due to yet another file access restriction, one which I hadn't realized existed, because existing apps were getting their earlier access permissions grandfathered. But new installs, and clean re-installs, don't get these grandfathered privileges, and they are subject to the full impact of the new restrictions.

Both the Android 11 restrictions and the newer ones in Android 13 should be fixable by adopting logic like what exists in Emu42.

I'll try to get these changes done before Christmas. Updates to follow.

Hans J Albertsson

unread,
Dec 15, 2023, 2:39:47 PM12/15/23
to Free42 & Plus42
You are amazing! 
Almost can't wait for the result..
Message has been deleted
Message has been deleted

Thomas Okken

unread,
Dec 16, 2023, 11:46:18 AM12/16/23
to Free42 & Plus42
I have raw and state import & export working in the Android 13 emulator. That turned out to be pretty easy.
Dealing with skins and print-out files will be a bit more complicated, since handling those properly will require support for copying arbitrary files between the app's private storage and the directories reachable by the file selection intents. Not rocket science but it will require a bit of UI work.

Oh, and the app's OS requirement is going to go from 4.0 to 4.4 😱

Vincent Weber

unread,
Dec 16, 2023, 11:57:09 AM12/16/23
to Free42 & Plus42
Excellent, all the best Thomas! 

Thomas Okken

unread,
Dec 18, 2023, 6:57:55 PM12/18/23
to Free42 & Plus42
The Android file access fixes are done:
Free42 3.1.2b is on my web site and in the Play Store;
Plus42 1.1.2b is in the Play Store.

Vincent Weber

unread,
Dec 18, 2023, 7:01:09 PM12/18/23
to Free42 & Plus42
Seems to work great! Thanks Thomas! 

Hans J Albertsson

unread,
Dec 20, 2023, 9:10:26 AM12/20/23
to Free42 & Plus42
I tried playing around with this on plus42.
Moving programs in and out seem to work ok but "states" has me baffled.
No wonder, I have never ever even contemplated using them.
Is there some writeup/how-to with a reasonable work flow?

Say I want to set up a base state, with a couple of programs and a special set of ready made variables, such as the volume of 12g of ethanol and various bottle sizes.
Then I would like to create a couple of states as refinements of this base state, such as one state for easy calculations of blood alcohol vs time and another for risk assessment of various rates of consumption.
How do you do that in Plus42?

Thomas Okken

unread,
Dec 20, 2023, 8:56:30 PM12/20/23
to Free42 & Plus42
"states" has me baffled.

That sounds like it should be a separate thread, not a conversation on the Status Update Thread.
Here's the documentation that currently exists: https://thomasokken.com/free42/#state
If that is not sufficient, start a new thread, and I'll try to help there.

Johan Neven

unread,
Dec 21, 2023, 2:44:38 AM12/21/23