Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Recording calc commands (like macro, but editable)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
electricpete  
View profile  
 More options Feb 4, 2:33 pm
Newsgroups: comp.sys.hp48
From: electricpete <electricpe...@gmail.com>
Date: Sat, 4 Feb 2012 11:33:00 -0800 (PST)
Subject: Recording calc commands (like macro, but editable)
In excel vba, when we record a macro, the vba code gets recorded and
we can go back and edit it later using program editor to further
customize the program.  This is a fantastic way for quickly/
effectively generating a program imo because it allows us to use the
native (excel) environment in the way we are used to with immediate
feedback as macro recording proceeds, rather than typing programming
commands in our editor without any feedback at all.

It would be great if same capability existed in HP48 or emu48.   (Does
it?).
I was initially excited when I saw the macro record/play menu choices
in Emu48. Then when I played with them it generated a file with
extension "mac" that doesn't seem readable on anything other than the
emulator (for playback).   I suspect my initial optimism was unfounded
and the programmers of this macro feature never implemented the
particular feature I'm describing. Correct?

Second thought: it occurs to me we might be able to do this in the
HP48 itself using RPL.  We would have to create an application which
interacts with the user "normally", but also stashes each entered
command into an HP48 program variable.  Has anyone done this?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John H Meyers  
View profile  
 More options Feb 7, 5:20 am
Newsgroups: comp.sys.hp48
From: John H Meyers <jhmey...@nomail.invalid>
Date: Tue, 07 Feb 2012 04:20:24 -0600
Local: Tues, Feb 7 2012 5:20 am
Subject: Re: Recording calc commands (like macro, but editable)
On 2/4/2012 1:33 PM, electricpete wrote:

> I was initially excited when I saw the macro record/play menu choices
> in Emu48. Then when I played with them it generated a file with
> extension "mac" that doesn't seem readable on anything other than the
> emulator (for playback).   I suspect my initial optimism was unfounded
> and the programmers of this macro feature never implemented the
> particular feature I'm describing. Correct?

> Second thought: it occurs to me we might be able to do this in the
> HP48 itself using RPL.  We would have to create an application which
> interacts with the user "normally", but also stashes each entered
> command into an HP48 program variable.  Has anyone done this?

I just type my program commands into an editor,
then transfer them to and run them on the emulator.

There are also "Vectored Enter" variables which can be
installed in the calculator to record what you do in the calculator
(e.g. can save all command lines and all keypresses), FWIW.

I've never used "Macro" yet -- your description doesn't make it sound
that inviting, but I suppose a sample of a ".mac" file might help,
as far as comprehending what it is.  Or maybe there's some documentation,
which of course I never read :)

[r->] [OFF]


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
oliverue  
View profile  
 More options Feb 7, 7:29 pm
Newsgroups: comp.sys.hp48
From: oliverue <olive...@hotmail.com>
Date: Tue, 7 Feb 2012 16:29:28 -0800 (PST)
Local: Tues, Feb 7 2012 7:29 pm
Subject: Re: Recording calc commands (like macro, but editable)

> ... it occurs to me we might be able to do this in the
> HP48 itself using RPL.  We would have to create an application which
> interacts with the user "normally", but also stashes each entered
> command into an HP48 program variable.  Has anyone done this?

FWIW, the ability you seek exists in ND1 (an iOS RPL calculator).
There're record and stop soft-keys in the Program menu.

This technique is, of course, limited to recording a sequence of
commands, when useful programs usually contain control structures
(IFs, FORs, DOs, etc.).

However, with list processing, IFT and IFTE, and an efficient way to
produce lists {1...n}, you can often replace IFs and FORs, and this
technique becomes really powerful for interactive program development,
where you see step-by-step what is happening to test data. A real
advantage of RPN in this: as you enter the test data before your first
command, you can opt to not record it, and thereby obtain a function
that will work with different input data, without editing.

An example to illustrate what I'm talking about:

Say you want to write a function that computes the sum of all perfect
squares up to a given number.

Steps:
- Enter 10                           (stack: 10; this be the test
data)
- Press record
- Enter 1                             (stack: 10, 1)
- Press SWAP                    (stack: 1, 10)
- Enter range                      (stack: [1 2 3 4 5 6 7 8 9 10])
- Enter [ √ FP 0 == ]
- Enter filter                        (stack: [1 4 9])
- Enter total (or ∑LIST)      (stack: 14)
- Press stop

The stack will now contain your program: ≪ 1 SWAP [√ FP 0 ==] filter
total ≫

As you didn't record the test data (10), it will use as input
whatever's on the stack, when you run it. That is, it is the desired
function. (And you know it works, because you saw the intermediate
results and the final result, as you performed the steps.)

You store the function and run it on 10000. Result: 338350

The function replaces this more traditional RPL program, containing
FOR and IF structures (which cannot be recorded in principle):
≪ \-> n ≪
   0
   1 n FOR i
      IF i √ FP 0 ==
      THEN
         i +
      END
   NEXT
   ≫

More about array processing and recording is in the latter portion of
this: http://naivedesign.com/ND1/User_Functions.html

As an aside, with ND1 you can edit on your computer and run on your
iOS device a second later: http://naivedesign.com/ND1/Computer_Link.html
(This is actually quite a bit more convenient than an emulator (or so
I find).)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
electricpete  
View profile  
 More options Feb 7, 10:47 pm
Newsgroups: comp.sys.hp48
From: electricpete <electricpe...@gmail.com>
Date: Tue, 7 Feb 2012 19:47:00 -0800 (PST)
Subject: Re: Recording calc commands (like macro, but editable)
> I just type my program commands into an editor,
> then transfer them to and run them on the emulator.

You probably carry in your mind the status of the stack. Having the
stack displayed helps double-check the mental model, if nothing more
than how many items are on the stack.  It is not a requirement, just a
convenience.

> There are also "Vectored Enter" variables which can be
> installed in the calculator to record what you do in the calculator
> (e.g. can save all command lines and all keypresses), FWIW.

Thanks. Google led me to a descriptoin (FAQ 8.12). That sounds like
exactly what I was looking for.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
electricpete  
View profile  
 More options Feb 7, 10:49 pm
Newsgroups: comp.sys.hp48
From: electricpete <electricpe...@gmail.com>
Date: Tue, 7 Feb 2012 19:49:28 -0800 (PST)
Local: Tues, Feb 7 2012 10:49 pm
Subject: Re: Recording calc commands (like macro, but editable)
On Feb 7, 6:29 pm, oliverue <olive...@hotmail.com> wrote:
> FWIW, the ability you seek exists in ND1 (an iOS RPL calculator).
> There're record and stop soft-keys in the Program menu.

That looks like a great program. Unfortunately, I am using an Android
rather than an iPhone.  If you put it on the Android platform, I think
I would buy it in a heartbeat.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
oliverue  
View profile  
 More options Feb 8, 5:09 am
Newsgroups: comp.sys.hp48
From: oliverue <olive...@hotmail.com>
Date: Wed, 8 Feb 2012 02:09:30 -0800 (PST)
Local: Wed, Feb 8 2012 5:09 am
Subject: Re: Recording calc commands (like macro, but editable)
Android will be supported. Working on it.

Already runs on Kindle on a 6" E-ink display, with 2-3 weeks of use
between charges and a huge display. Unfortunately, this cannot be
released yet. Amazon is highly selective about who they let make
apps...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »