Hello all,
I am new to the HP50G UserRPL and need advice.
On PCs, I am used to use lists as container for variable structure of
data with nested lists.
aka
{{1 2 3 {4 5}} {4 5 6 {7 8}} {9}} 'mylist' STO
Do I have to write my own GET and PUT functions to access the values or
is it supported in some way?
aka
list {2 4 1} GET -> 7
Thanks
Patrice
|
|
0
|
|
|
|
Reply
|
Patrice
|
11/12/2009 7:13:19 AM |
|
On 12 Nov., 08:13, Patrice <f...@home.fr> wrote:
> =A0 =A0 =A0 =A0 Hello all,
>
> =A0 =A0 =A0 =A0 I am new to the HP50G UserRPL and need advice.
>
> =A0 =A0 =A0 =A0 On PCs, I am used to use lists as container for variable =
structure of
> data with nested lists.
> aka
> =A0 =A0 =A0 =A0 {{1 2 3 {4 5}} {4 5 6 {7 8}} {9}} 'mylist' STO
>
> =A0 =A0 =A0 =A0 Do I have to write my own GET and PUT functions to access=
the values or
> is it supported in some way?
> aka
> =A0 =A0 =A0 =A0 list {2 4 1} GET =A0-> =A07
>
> Thanks
>
> Patrice
|
|
0
|
|
|
|
Reply
|
software49g
|
11/12/2009 8:06:57 AM
|
|
Hello,
the AUR which contains all USER-RPL-Commands is available at
http://www.hpcalc.org/details.php?id=7141.
You can use GET, GETI, PUT, PUTI with lists or arrays.
Be warned that list access is pretty slow because the list has no size
field and thus all access has to be done by slow searching through the
Composite Object.
However, there is a trick to speed up access of Composite Objects by
wrapping them into a Code Object which can be done at compile time but
this "costs" 10 Nibbles for each list and of course this can not be
done in USER-RPL.
Depending on your needs you might want to choose another "container"
for your variables. If you are only using real numbers an array maybe
a better choice.
HTH,
Andreas
http://www.software49g.gmxhome.de
http://www.youtube.com/watch?v=Pj72miclisM
|
|
0
|
|
|
|
Reply
|
software49g
|
11/12/2009 8:07:25 AM
|
|
<software49g@gmx.de> wrote in message
news:854eaa84-4871-456f-a963-e434557853df@w19g2000yqk.googlegroups.com...
> Hello,
>
> the AUR which contains all USER-RPL-Commands is available at
> http://www.hpcalc.org/details.php?id=7141.
>
> You can use GET, GETI, PUT, PUTI with lists or arrays.
>
> Be warned that list access is pretty slow because the list has no size
> field and thus all access has to be done by slow searching through the
> Composite Object.
>
> However, there is a trick to speed up access of Composite Objects by
> wrapping them into a Code Object which can be done at compile time but
> this "costs" 10 Nibbles for each list and of course this can not be
> done in USER-RPL.
Not even with DevLib functions like COMP-> ->LST
???
|
|
0
|
|
|
|
Reply
|
Veli
|
11/12/2009 11:05:50 AM
|
|
Patrice wrote:
> =A0 =A0 =A0 =A0 {{1 2 3 {4 5}} {4 5 6 {7 8}} {9}} 'mylist' STO
>
> =A0 =A0 =A0 =A0 Do I have to write my own GET and PUT functions to access=
the values or
> is it supported in some way?
> aka
> =A0 =A0 =A0 =A0 list {2 4 1} GET =A0-> =A07
list { 2 4 1 } 1 << GET >> DOLIST
-Joe-
|
|
0
|
|
|
|
Reply
|
Joe
|
11/12/2009 12:43:52 PM
|
|
Hello,
Thanks for answers.
I wrote 2 quick and dirty functions to suit my needs.
Patrice
On Thu, 12 Nov 2009 08:13:19 +0100, Patrice <fake@home.fr> wrote:
> Hello all,
>
> I am new to the HP50G UserRPL and need advice.
>
> On PCs, I am used to use lists as container for variable structure of
>data with nested lists.
>aka
> {{1 2 3 {4 5}} {4 5 6 {7 8}} {9}} 'mylist' STO
>
> Do I have to write my own GET and PUT functions to access the values or
>is it supported in some way?
>aka
> list {2 4 1} GET -> 7
>
>Thanks
>
>Patrice
|
|
0
|
|
|
|
Reply
|
Patrice
|
11/13/2009 12:51:53 AM
|
|
Hello,
Me again :) still sharpening my skills in UserRPL
I reached the point "Make it right".
Now heading to the point "Make it fast".
Does anybody know about a table measuring speed of commands, telling
what is fast and how fast is fast, what is slow and how slow is slow.
For exemple, I have been told that named vars are slower than stack
operations but I don't know repective speeds.
Thanks in advance
Patrice
|
|
0
|
|
|
|
Reply
|
Patrice
|
11/17/2009 12:22:52 AM
|
|
In article <ebq3g5558hjmmt96bfvvbmovfpsnqlqido@4ax.com>,
Patrice <fake@home.fr> wrote:
> Hello,
>
> Me again :) still sharpening my skills in UserRPL
>
> I reached the point "Make it right".
> Now heading to the point "Make it fast".
>
> Does anybody know about a table measuring speed of commands, telling
> what is fast and how fast is fast, what is slow and how slow is slow.
> For exemple, I have been told that named vars are slower than stack
> operations but I don't know repective speeds.
>
> Thanks in advance
> Patrice
One way of finding out relative speeds is by using the TEVAL command.
It effectively mimics the EVAL command but appends the elapsed time for
evaluation to the stack.
Put a program which you wish to test on the stack, or its name if saved
in that directory or above, following any necessary inputs for that
program, then execute TEVAL.
|
|
0
|
|
|
|
Reply
|
Virgil
|
11/17/2009 12:34:39 AM
|
|
On Mon, 16 Nov 2009 18:22:52 -0600, Patrice wrote:
> what is fast and what is slow
Data storing:
Fastest: Stack
Fast: Temporary (local) variables
Slow: User (global, permanent) variables
(particularly when variables change size or are created/deleted)
Calculation:
Fast: Real, Complex
Slow: Integer
Interfaces:
Fast: menu based
Slow: form based
Writing programs:
Some things that are slower to execute
may nonetheless make programming easier, faster,
and even safer (e.g. UserRPL itself).
> how slow is slow
In metric or English units?
[r->] [OFF]
|
|
0
|
|
|
|
Reply
|
John
|
11/17/2009 12:45:33 AM
|
|
Hello,
>=A0 For exemple, I have been told that named vars are slower than
stack
> operations but I don't know repective speeds.
Generally stack access is the fastest way as this is only a stack of
pointer where each pointer is 5 nibbles wide and generally stack
manipulating commands are PCOs (but some are secondaries - use Nosy to
find out what a kind a command is)
However, if there is a lot of stack movements than NULLAMS are faster,
loading the pointer to a NULLLAM in the range of 1 - 27 is very fast
(ca. 0,05ms according to EMU48) because this done trough one single
command, from LAM 28 it gets a little slower (because the #BINT is
needed).
Named LAMs are at least ten times slower as they are searched in
memory wheras NULLLAMS are calculated.
HTH,
Andreas
http://www.software49g.gmxhome.de
http://www.youtube.com/watch?v=3DPj72miclisM
|
|
0
|
|
|
|
Reply
|
ISO
|
11/17/2009 12:57:49 AM
|
|
On Mon, 16 Nov 2009 18:57:49 -0600:
> PCOs, secondaries, NULLLAMS, BINT, ...
Interesting answers to a UserRPL question.
But there must be lots of SysRPL people reading anyway :)
[r->] [OFF]
|
|
0
|
|
|
|
Reply
|
John
|
11/17/2009 1:30:03 AM
|
|
Hello Andreas,
I guess your answer is for SysRPL.
Patrice
On Mon, 16 Nov 2009 16:57:49 -0800 (PST), Andreas M�ller
<andreas_moellerNOSPAM@gmx.de> wrote:
>Hello,
>
> >� For exemple, I have been told that named vars are slower than
>stack
> > operations but I don't know repective speeds.
>
>Generally stack access is the fastest way as this is only a stack of
>pointer where each pointer is 5 nibbles wide and generally stack
>manipulating commands are PCOs (but some are secondaries - use Nosy to
>find out what a kind a command is)
>
>However, if there is a lot of stack movements than NULLAMS are faster,
>loading the pointer to a NULLLAM in the range of 1 - 27 is very fast
>(ca. 0,05ms according to EMU48) because this done trough one single
>command, from LAM 28 it gets a little slower (because the #BINT is
>needed).
>
>Named LAMs are at least ten times slower as they are searched in
>memory wheras NULLLAMS are calculated.
>
>HTH,
>Andreas
>http://www.software49g.gmxhome.de
>http://www.youtube.com/watch?v=Pj72miclisM
|
|
0
|
|
|
|
Reply
|
Patrice
|
11/17/2009 1:43:31 AM
|
|
|
11 Replies
220 Views
(page loaded in 0.135 seconds)
Similiar Articles: UserRPL: Need advice - comp.sys.hp48Hello all, I am new to the HP50G UserRPL and need advice. On PCs, I am used to use lists as container for variable structure of data with ne... HP48GX Routine to Extract Prime Number Factors - comp.sys.hp48 ...UserRPL: Need advice - comp.sys.hp48 HP48GX Routine to Extract Prime Number Factors - comp.sys.hp48 ... (remember that free advice is sometime worth it.) ... request for advice - comp.graphics.api.openglUserRPL: Need advice - comp.sys.hp48 Replace this with: EVAL \-> m v p Now you don't need ... 3D0.99 return Z=3D2.326 Here the final program in userRPL ... advice on what programs to install on a new HP 50g - comp.sys.hp48 ...UserRPL: Need advice - comp.sys.hp48 Hello all, I am new to the HP50G UserRPL and need advice. On PCs, I am used to use lists ... HP48 • View topic • editing programs ... Debug4x: 50g Emulation Supported!!!!! - comp.sys.hp48UserRPL: Need advice - comp.sys.hp48... and PUT functions to access the values or is it supported ... Start the emulator from inside the IDE, you might need ... ... conversion of pixels into mm - comp.soft-sys.matlabUserRPL: Need advice - comp.sys.hp48 conversion of pixels into mm - comp.soft-sys.matlab UserRPL: Need advice - comp.sys.hp48 conversion of pixels into mm - comp.soft-sys ... sys-rpl and clock - comp.sys.hp48UserRPL: Need advice - comp.sys.hp48 sys-rpl and clock - comp.sys.hp48 UserRPL: Need advice - comp.sys.hp48 HP Enterprise Business Community where you can get advice ... Help with CASE Command in User RPL - comp.sys.hp48UserRPL: Need advice - comp.sys.hp48 Hello, the AUR which contains all USER-RPL-Commands is ... how i can make an upload to a pc? > thanks for the help ... ... can also be ... Converting 48 ROM Dump for EMU48 - comp.sys.hp48UserRPL: Need advice - comp.sys.hp48 Converting 48 ROM Dump for EMU48 - comp.sys.hp48 UserRPL: Need advice - comp.sys.hp48... 27 is very fast (ca. 0,05ms according to EMU48 ... loading programs onto a hp 49g+ - comp.sys.hp48UserRPL: Need advice - comp.sys.hp48... of stack movements than NULLAMS are faster, >loading ... to manipulate some strings in UserRPL on a HP 49g ... Pointers to global and stack variables - comp.compilersUserRPL: Need advice - comp.sys.hp48... and what is slow Data storing: Fastest: Stack Fast: Temporary (local) variables Slow: User (global ... access is the fastest way ... how to get ascii data in the hp 50g with the seriell port and ...> how i can get the data without learning sysrpl... . c and userrpl UserRPL is all you need. ... would be ok:-) > how i can make an upload to a pc? > thanks for the help ... hp 48 programs and hp 49g+ programs - comp.sys.hp48>>If you can help me please send me an e-mail to narkxx@hotmail ... X > That works for standard UserRPL.... > What about SysRPL/Asm? You need the source and that's ASCII by ... Numeric Integration Methods - comp.sys.hp48Except where noted, these are all written in UserRPL ... Help with discrete double integral - comp.soft-sys.matlab ... You need to have some knowledge of the problem before ... Running 49g libraries on 50g - comp.sys.hp48It's all UserRPL and installed okay on the 49G+, although ... and Reza said it was okay for me to ask for help. ... Running 49g libraries on 50g - comp.sys.hp48 If I need ... UserRPL: Need advice - comp.sys.hp48 | Computer GroupHello all, I am new to the HP50G UserRPL and need advice. On PCs, I am used to use lists as container for variable structure of data with ne... HP48GX Routine to Extract Prime Number Factors - comp.sys.hp48 ...UserRPL: Need advice - comp.sys.hp48 HP48GX Routine to Extract Prime Number Factors - comp.sys.hp48 ... (remember that free advice is sometime worth it.) ... 7/27/2012 6:20:31 PM
|