T+X, CLK24/CLK12, MDY/DMY and settings menu.

Discussion around the SwissMicros DM42 calculator
rprosperi
Posts: 1698
Joined: Mon Apr 24, 2017 7:48 pm
Location: New York

Re: T+X, CLK24/CLK12, MDY/DMY and settings menu.

Post by rprosperi »

Geoff Quickfall wrote:
Mon Jan 08, 2018 2:57 am
OUCH, ;)

But still, any thoughts on the setting menu?

During a test run of a routine I moved the clock one hour (23:00 to 00:00) ahead which took the date and day with it. To return to the correct time was twenty three +1h pushes forward followed by thirty +1d key presses.

T+X would have fixed this in two key presses plus be programmable. My suggested menu would have been two key presses but not programmable.

Anyone?
I'm not sure if you are looking for support from users, or seeking official feedback from SM.

Assuming the former, I strongly agree adding T+X will easily solve many related tasks and must support both manual and program use.

Also, the -1h and -1d should probably also be added into the setup pages, though to me, this is a lower priority if T+X is available.

IANASMEBILTI (I am not a SwissMicros employee but I like this idea).
--bob p

DM42: β00071 & 00282, DM41X: β00071 & 00656, DM10L: 071/100
User avatar
Walter
Posts: 3070
Joined: Tue May 02, 2017 11:13 am
Location: On a mission close to DRS, Germany

Re: T+X, CLK24/CLK12, MDY/DMY and settings menu.

Post by Walter »

How about creating a little program using the programmable menu? Just crossed my mind... ;)
WP43 SN00000, 34S, and 31S for obvious reasons; HP-35, 45, ..., 35S, 15CE, DM16L S/N# 00093, DM42β SN:00041
Thomas Okken
Posts: 1098
Joined: Tue May 02, 2017 5:48 pm
Location: Netherlands
Contact:

Re: T+X, CLK24/CLK12, MDY/DMY and settings menu.

Post by Thomas Okken »

Walter wrote:
Mon Jan 08, 2018 4:45 am
How about creating a little program using the programmable menu? Just crossed my mind... ;)
Not possible. The clock can't be set from the calculator -- that's the point, and implementing T+X would address that in a very useful and flexible way.

(I think it would also make sense to implement RCLAF, SETAF, and CORRECT (clock calibration) and SETIME and SETDATE, but being able to *adjust* the clock by a given offset would be useful even if none of those other functions are present.)
Geoff Quickfall
Posts: 328
Joined: Wed May 24, 2017 10:44 pm
Location: Vancouver Canada
Contact:

Re: T+X, CLK24/CLK12, MDY/DMY and settings menu.

Post by Geoff Quickfall »

Yes:

1) T+X would be wonderful and my first choice due to programmability.

2) SETTIME and SETDATE would be a close second.

3) barring that a much easier and intuitive setting menu using the plus and minus functions for each sett8ng as described earlier.

Walter:

I am working on routines which include flags for a programmable change (not calculator clock change) for crossing time zones in both dir3ctions which including rolling date forward and backward as well as time. Proving very awkward. T+X or SETTIME and SETDATE would be helpful. See above, this posting.

Bob,

Yes, the more on my bandwagon precludes me being an “island of one”. Of course Thomas and the the SWISS MICROS group hopefully and do read these posts. :D

Geoff
grsbanks
Posts: 1122
Joined: Tue Apr 25, 2017 11:23 am
Location: Preston, Lancs, UK
Contact:

Re: T+X, CLK24/CLK12, MDY/DMY and settings menu.

Post by grsbanks »

rprosperi wrote:
Mon Jan 08, 2018 3:18 am
Assuming the former, I strongly agree adding T+X will easily solve many related tasks and must support both manual and program use.

Also, the -1h and -1d should probably also be added into the setup pages, though to me, this is a lower priority if T+X is available.
We're working on a way to get -1h and -1d back into the time/date setup pages for V3.3. I can ask about T+X to see if it would be a possibility but don't hold your breath because I think that the idea with the DM42 is not to add to Free42's vocabulary.

Now, if T+X were to be added to Free42's trunk, that would be a different matter, but that does imply giving Free42 write access to the system clock, which might not be possible on all of the supported platforms. As I said, I can but ask.
There are only 10 kinds of people in the world: those who understand binary and those who do not.
Thomas Okken
Posts: 1098
Joined: Tue May 02, 2017 5:48 pm
Location: Netherlands
Contact:

Re: T+X, CLK24/CLK12, MDY/DMY and settings menu.

Post by Thomas Okken »

grsbanks wrote:
Mon Jan 08, 2018 7:39 am
T+X were to be added to Free42's trunk, that would be a different matter, but that does imply giving Free42 write access to the system clock, which might not be possible on all of the supported platforms.
Setting the system clock is a privileged operation on any modern OS, so implementing T+X, SETIME, SETDATE etc. in Free42 would require it to be setuid root, or use some privilege escalation API, meaning you'd get a password prompt from the OS whenever you tried using those functions. It would also be bad design, because the clock, being a vital and shared resource, is *supposed* to be adjustable only through the OS-provided Control Panel / System Preferences / etc.

On a calculator, there typically is no user-visible separation between the OS and the calculator environment, so having T+X etc. be part of the vocabulary is inevitable. With the DM42 and its setup menu, the situation is not so clear-cut, but I think the case for a T+X function is still pretty strong, at least for those who travel between time zones more than occasionally. Or something like T+X in the setup menu, where over- or under-flowing the minutes or hours would cascade to the date as well.
rprosperi
Posts: 1698
Joined: Mon Apr 24, 2017 7:48 pm
Location: New York

Re: T+X, CLK24/CLK12, MDY/DMY and settings menu.

Post by rprosperi »

Deciding to not add to FREE42's vocabulary as a guiding principle, but suggesting Thomas do just that, seems odd, but I am not programming either one so I can't say for sure if there are good reasons that are obvious (to other people).

@Thomas - Having said that, is it feasible to build FREE42 with platform-dependent vocabulary, so that for example, T+X is available if such capability can be executed from FREE42's application access level, but not on systems where escalated access would be required? (I'm guessing this is not a current capability, and that it also ain't easy.)

Alternately, T+X could be available as a platform-dependent call, and act simply as a NOP on the latter class of systems (which likely includes all platforms except for FREE42).

But, however it might be added (by whoever chooses to) is there a means to encode a new command in a way that existing FREE42 implementations won't choke, if they are fed a DM42 .raw file that used this new command? Of course, there would be no sensible reason for someone to do this, but someone will...
--bob p

DM42: β00071 & 00282, DM41X: β00071 & 00656, DM10L: 071/100
Thomas Okken
Posts: 1098
Joined: Tue May 02, 2017 5:48 pm
Location: Netherlands
Contact:

Re: T+X, CLK24/CLK12, MDY/DMY and settings menu.

Post by Thomas Okken »

Platform-specific commands are possible in Free42, and they do exist: ACCEL, LOCAT, and HEADING exist only in the Android and iOS versions, and FPTEST exists only in debug builds. When you try to run code containing such commands on platforms / in builds where they aren't available, they'll show up as XROMs, and return Nonexistent when executed, and this can be detected at run time using flag 25.

I will never implement T+X (or SETIME, SETDATE, SETAF, etc.) because none of the platforms I support allow unprivileged users to set the clock. The only way I could see implementing those functions is by giving Free42 its own clock, which user code could then mess with to its heart's content without changing the system clock, but how useful would that be?

The thing is, privilege is not an issue in the DM42. If user code changes the clock there, there are no other apps that are affected. The DM42 exists to run Free42 and nothing else. (Of course that may change in the future, but I'm not concerned with that possibility now.)
Post Reply