Post Reply 
newRPL: Alpha demo 0.9 released [UPDATED 2017-10-25]
09-02-2017, 06:23 PM (This post was last modified: 09-02-2017 07:38 PM by pier4r.)
Post: #81
RE: newRPL: Alpha demo 0.9 released [UPDATED 2017-08-24]
OK finally I have my windows10 up and running (although I can use it mostly one day in the weekend) so I installed alpha 0.9. So first of all: thanks for the work.

Some questions:
(a) is there a source file with all the active commands? Or are those sparsed n several source files? Because on the wiki there are not yet the list of commands
(b) can "syntax error" in the editor report also the line where the error is?
(c) I am not sure if I should ask this on the wiki. Since newRPL may be also a valid calculator on the desktop (although not yet with a straightforward input mode), could be possible to add exra pages to cover newRPL desktop? Also, newRPL desktop would be where the main development work takes place, to then move to the calculator programs well debugged.
(c.1) Aside from (c) when I insert something like "aaaaaaaa" and then I hold "left arrow", the cursor on the desktop moves just once and not multiple times. Is this wanted?

update1:
- oh I fought to get the digraph working, instead it seems that I need to use unicode simbols like « » nice but another point for extra pages clarifying this on the wiki. (this is in the page "contributing to the wiki" but it is not clear that it would work between text fils and desktop version)

update2

1 'var1' STO+ works
'var1' 1 STO+ error

using STO+ to add at the end or at the start of a list is very handy in userRPL so if in newRPL STO+ works also for lists, I would expect it would work in both cases.


update3:

OH MY GOODNESS!!!!

Code:

«
  @it seems that in newRPL there are no digraphs.
  0 
  → 
  result 
  « 
    TICKS
    1 10 7 ^ 
    START
      1 'result' STO+ 
    NEXT
    TICKS SWAP - 10 6 ^ / 
    result
  »
»

executes in 2.826 seconds on newRPL 0.9 desktop using one core of an AMD A10-9600P (3 ghz max, 4 cores)

powershell on the same system (win10 pro)
Code:

PS C:\Users\pier> $host


Name             : ConsoleHost
Version          : 5.1.14393.1532
InstanceId       : ba2f3fea-0ae5-40f9-8642-89ac13ab42ac
UI               : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture   : de-DE
CurrentUICulture : de-DE
PrivateData      : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled  : True
IsRunspacePushed : False
Runspace         : System.Management.Automation.Runspaces.LocalRunspace


PS C:\Windows\system32> $r=0 ; for($i = 0; $i -lt 10000000 ; $i++ ) { $r++ }; $r
10000000
PS C:\Windows\system32> Measure-Command { $r=0 ; for($i = 0; $i -lt (10*1000*1000) ; $i++ ) { $r++ }; $r }


Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 30
Milliseconds      : 846
Ticks             : 308469450
TotalDays         : 0,000357024826388889
TotalHours        : 0,00856859583333333
TotalMinutes      : 0,51411575
TotalSeconds      : 30,846945
TotalMilliseconds : 30846,945

IMPRESSIVE! Sure, powershell is an hell of a language with billions of libraries and newRPL is not so usable yet, but it is improving a lot. Having such a performance gap (~ 15 times faster than a official microsoft language for the OS itself) is impressive. Another point, in my opinion, to push newRPL also as math platform on the desktop.

Side note: still impressive, gawk on cygwin 2.5.2 on a pentium M 1.73ghz (winXP) needs 2.4 seconds to do the same task. Impressive because gawk is interpreted and cygwin is not "that" native in winXP as microsoft tools themselves. Plus the relatively slower CPU (actually it may be not that slower for a single core comparison).

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
09-02-2017, 09:36 PM (This post was last modified: 09-04-2017 02:04 AM by The Shadow.)
Post: #82
RE: newRPL: Alpha demo 0.9 released [UPDATED 2017-08-24]
(09-01-2017 06:38 PM)Claudio L. Wrote:  Sorry, I'm not following. If you want PROG so that it doesn't act as a variable just use { { "PROG" << PROG >> } }, no need to add empty programs, or even keycodes.

While that doesn't quite do what I want, I found something else that does - I was misunderstanding something about how the format works. Sorry about that.

I do still have one request regarding menus - that the 'help' slot accept a variable as well as a string. It would just display the contents of the variable, just as if you'd long-pressed on the Vars button.

Quote:With a command that tells you which item is visible in the menu from a program, you could write code that "moves" with the menu using ASNKEY.

Is such a command in the offing? Smile

EDIT: In the old OT49 library on the 50g, there was a function LMN that would retrieve the items in any menu on the calculator, in order. RCLMENU LMN would return a list. Handy!

Speaking of libraries, you've already mentioned some possibilities, but will it be feasible for a newRPL user to create them on the calculator?
Find all posts by this user
Quote this message in a reply
09-05-2017, 02:07 PM (This post was last modified: 09-05-2017 02:21 PM by Eddie W. Shore.)
Post: #83
RE: newRPL: Alpha demo 0.9 released [UPDATED 2017-08-24]
How do you install NewRPL on the 50g? The file is in bin format at 819K (won't fit on any of the ports). Will I need to convert it first?

Thanks in advance
Visit this user's website Find all posts by this user
Quote this message in a reply
09-05-2017, 03:31 PM
Post: #84
RE: newRPL: Alpha demo 0.9 released [UPDATED 2017-08-24]
http://www.hpmuseum.org/forum/thread-8152.html

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
09-05-2017, 07:43 PM (This post was last modified: 09-05-2017 07:44 PM by The Shadow.)
Post: #85
RE: newRPL: Alpha demo 0.9 released [UPDATED 2017-08-24]
(09-02-2017 06:23 PM)pier4r Wrote:  using STO+ to add at the end or at the start of a list is very handy in userRPL so if in newRPL STO+ works also for lists, I would expect it would work in both cases.

I can answer this one. In newRPL, + is used with lists for element-by-element addition, not for concatenation. You concatenate using ADD. (This is the reverse of original RPL.)

I've already mentioned to Claudio that a STOADD command would be very useful, and he's taken it under advisement.
Find all posts by this user
Quote this message in a reply
09-05-2017, 08:43 PM
Post: #86
RE: newRPL: Alpha demo 0.9 released [UPDATED 2017-08-24]
(09-02-2017 09:36 PM)The Shadow Wrote:  I do still have one request regarding menus - that the 'help' slot accept a variable as well as a string. It would just display the contents of the variable, just as if you'd long-pressed on the Vars button.
That seems easily doable.


(09-02-2017 09:36 PM)The Shadow Wrote:  Is such a command in the offing? Smile

EDIT: In the old OT49 library on the 50g, there was a function LMN that would retrieve the items in any menu on the calculator, in order. RCLMENU LMN would return a list. Handy!

RCLMENU/RCLMENUOTHR/RCLMENULST have the first visible element of the menu encoded in the lower bits, so it's already available. The MENUCODE tells you library/menu number/first visible item, all encoded in various bits.
You can use them in menu key handlers to know what menu key the user pressed.

(09-02-2017 09:36 PM)The Shadow Wrote:  Speaking of libraries, you've already mentioned some possibilities, but will it be feasible for a newRPL user to create them on the calculator?

Of course. New commands will behave just like builtin.

Now I'll be off line for a few days. Hurricane nuisance.
Find all posts by this user
Quote this message in a reply
09-05-2017, 09:11 PM (This post was last modified: 09-05-2017 09:11 PM by The Shadow.)
Post: #87
RE: newRPL: Alpha demo 0.9 released [UPDATED 2017-08-24]
(09-05-2017 08:43 PM)Claudio L. Wrote:  RCLMENU/RCLMENUOTHR/RCLMENULST have the first visible element of the menu encoded in the lower bits, so it's already available. The MENUCODE tells you library/menu number/first visible item, all encoded in various bits.
You can use them in menu key handlers to know what menu key the user pressed.

I had already figured out that the lower bits tell you which page you're on.

Is there any way to tell which page of a user-defined menu is showing?

Quote:Now I'll be off line for a few days. Hurricane nuisance.

Sorry to hear that! Stay safe!
Find all posts by this user
Quote this message in a reply
09-05-2017, 10:03 PM (This post was last modified: 09-05-2017 10:04 PM by Guenter Schink.)
Post: #88
RE: newRPL: Alpha demo 0.9 released [UPDATED 2017-08-24]
(09-05-2017 08:43 PM)Claudio L. Wrote:  Now I'll be off line for a few days. Hurricane nuisance.

I'll be in Florida for a few days commencing September 18th. I know it's not the best time but it's just after the HHC. I hope Hurricane activities have passed then.
Find all posts by this user
Quote this message in a reply
09-06-2017, 12:57 AM
Post: #89
RE: newRPL: Alpha demo 0.9 released [UPDATED 2017-08-24]
(09-05-2017 02:07 PM)Eddie W. Shore Wrote:  How do you install NewRPL on the 50g? The file is in bin format at 819K (won't fit on any of the ports). Will I need to convert it first?

Thanks in advance

A few of us are trying to help Claudio with the documentation for newRPL. There is a section describing how to do the installation, take a look at chapter 1, section c. Installation here:

newRPL Wiki

By the way, I enjoy your blog (especially the programming tutorials on the HP Prime).

Cheers,
Steve
Find all posts by this user
Quote this message in a reply
09-06-2017, 01:25 PM
Post: #90
RE: newRPL: Alpha demo 0.9 released [UPDATED 2017-08-24]
(09-06-2017 12:57 AM)smartin Wrote:  
(09-05-2017 02:07 PM)Eddie W. Shore Wrote:  How do you install NewRPL on the 50g? The file is in bin format at 819K (won't fit on any of the ports). Will I need to convert it first?

Thanks in advance

A few of us are trying to help Claudio with the documentation for newRPL. There is a section describing how to do the installation, take a look at chapter 1, section c. Installation here:

newRPL Wiki

By the way, I enjoy your blog (especially the programming tutorials on the HP Prime).

Cheers,
Steve

On both accounts, thank you Steve!

Eddie
Visit this user's website Find all posts by this user
Quote this message in a reply
09-10-2017, 04:45 PM (This post was last modified: 09-10-2017 09:05 PM by The Shadow.)
Post: #91
RE: newRPL: Alpha demo 0.9 released [UPDATED 2017-08-24]
I've noticed that STO+, STO-, and the other STO variants do not play nice with lists at all. For example, if 'A' contains { 1 2 3 } and you do 4 'A' STO+, you get an 'Empty data stack (internal)' error, and 'A' ends up containing 4.

Also, their syntax is different (and less flexible) than oldRPL. In oldRPL, if 'A' contains 4 and you do:

1 'A' STO-

you get -3. If you want 3, you do:

'A' 1 STO-

instead. Basically, the variable gets replaced with the value and then the operation is done.

This doesn't matter for commutative operations, of course. But even multiplication isn't commutative for matrices!

Finally, add +, -, and * to the list of things that need to be mapped to alpha-hold. /, alas, has to remain Z by default.

EDIT: I just noticed that IABCUV returns an "Empty data stack (internal)" error, even though it works otherwise. By the way, any chance of ICHINREM? I can fake it well enough with a working IABCUV, though.
Find all posts by this user
Quote this message in a reply
09-11-2017, 12:45 AM
Post: #92
RE: newRPL: Alpha demo 0.9 released [UPDATED 2017-08-24]
(09-10-2017 04:45 PM)The Shadow Wrote:  I've noticed that STO+, STO-, and the other STO variants do not play nice with lists at all. For example, if 'A' contains { 1 2 3 } and you do 4 'A' STO+, you get an 'Empty data stack (internal)' error, and 'A' ends up containing 4.

Also, their syntax is different (and less flexible) than oldRPL. In oldRPL, if 'A' contains 4 and you do:

1 'A' STO-

you get -3. If you want 3, you do:

'A' 1 STO-

instead. Basically, the variable gets replaced with the value and then the operation is done.

This doesn't matter for commutative operations, of course. But even multiplication isn't commutative for matrices!

Finally, add +, -, and * to the list of things that need to be mapped to alpha-hold. /, alas, has to remain Z by default.

EDIT: I just noticed that IABCUV returns an "Empty data stack (internal)" error, even though it works otherwise. By the way, any chance of ICHINREM? I can fake it well enough with a working IABCUV, though.

I'll investigate the internal empty stack, and can add some extra flexibility to the STO variants. They should work well with lists so I'll check what's going on. May take a few days.
Find all posts by this user
Quote this message in a reply
09-12-2017, 01:57 PM
Post: #93
RE: newRPL: Alpha demo 0.9 released [UPDATED 2017-08-24]
(09-11-2017 12:45 AM)Claudio L. Wrote:  I'll investigate the internal empty stack, and can add some extra flexibility to the STO variants. They should work well with lists so I'll check what's going on. May take a few days.

Thanks as always! I also sent you a couple emails with malfunctioning programs.

Is the version with fixed SAME ready?
Find all posts by this user
Quote this message in a reply
09-12-2017, 08:13 PM
Post: #94
RE: newRPL: Alpha demo 0.9 released [UPDATED 2017-08-24]
(09-10-2017 04:45 PM)The Shadow Wrote:  I've noticed that STO+, STO-, and the other STO variants do not play nice with lists at all.

The 50g AUR admits that the "storage arithmetic" functions are "quirky" when they are given lists. Here's an excerpt:

Quote:Appendix F

Parallel Processing with Lists

Parallel processing is the idea that, generally, if a command can be applied to one or more individual arguments, then it can also be extended to be applied to one or more sets of arguments. ...

Group 10: Quirky commands

A few commands behave uniquely with respect to parallel processing:

STO+. STO+ performs parallel list addition only if both arguments are lists. If one argument is a list and the other is not, STO+ appends the non-list argument to each element in the list.

? STO-, STO*, STO/. These commands perform parallel processing if both arguments are lists, but fail otherwise.

<0|ɸ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
09-12-2017, 11:57 PM
Post: #95
RE: newRPL: Alpha demo 0.9 released [UPDATED 2017-08-24]
(09-12-2017 01:57 PM)The Shadow Wrote:  Is the version with fixed SAME ready?

I believe the ROMs were uploaded last week (can't recall, it's been crazy since the storm, as soon as I can I'll rebuild and re-upload just in case).

(09-12-2017 08:13 PM)Joe Horn Wrote:  The 50g AUR admits that the "storage arithmetic" functions are "quirky" when they are given lists.

I think they will be a lot less quirky thanks to the reversed + and ADD functionality, plus the overloaded operators. STO+ will simply RCL whatever variable call the + operator, which will run exactly as if the objects were on the stack, nothing special, and STOre the result. This should provide a consistent behavior. It is now, except I didn't implement the reversed arguments yet, it expects the same arguments as STO.
Find all posts by this user
Quote this message in a reply
09-15-2017, 04:26 PM (This post was last modified: 09-15-2017 04:27 PM by Claudio L..)
Post: #96
RE: newRPL: Alpha demo 0.9 released [UPDATED 2017-09-15]
(09-11-2017 12:45 AM)Claudio L. Wrote:  I'll investigate the internal empty stack, and can add some extra flexibility to the STO variants. They should work well with lists so I'll check what's going on. May take a few days.

I didn't fix IABCUV yet, but everything else came out today, please flash the new ROM.

Also today are the new font support commands.
There's FNTnnnn and →FNTnnnn commands for each area of the stack:
→FNTMENU changes the menu fonts
→FNTSTK changes the stack levels 2 and up
→FNT1STK changes the first level of the stack
→FNTFORM changes the font for forms (coming soon, Forms are not yet implemented)
→FNTCMDL changes the font of the editor (command line)

Fonts are designated by name. You install a user font in the system by using FNTSTO (uninstall with FNTPG). You must provide a name for the font just like any variable. Then you use that name with the →FNTnnnn commands.
There are some fonts in ROM (all designed by our friend Helix):

8-pixel fonts:
'Font8A'
'Font8B'
'Font8C'
'Font8D'

7-pixel fonts:
'Font7A'

6-pixel fonts:
'Font6A'
'Font6B'

5-pixel fonts:
'Font5A'
'Font5B'
'Font5C'

Any of the names above can be used until somebody starts designing and publishing user-created font packs.

I personally like 'Font7A' for the menus, takes a bit more space but doesn't look bad at all.
Find all posts by this user
Quote this message in a reply
09-16-2017, 08:39 AM
Post: #97
RE: newRPL: Alpha demo 0.9 released [UPDATED 2017-09-15]
Hi am curious if there are plans to implement XMIT, SRECV, and BUFLEN into NEWRPL. I want to switch to NEWRPL but use the serial port quite a bit.
Find all posts by this user
Quote this message in a reply
09-16-2017, 05:19 PM (This post was last modified: 09-16-2017 07:33 PM by The Shadow.)
Post: #98
RE: newRPL: Alpha demo 0.9 released [UPDATED 2017-09-15]
Just found an interesting directory display bug. If you create a directory with exactly six items in it, then use ORDER to put that directory on the second or higher page of another directory, the display will be completely whacked when you move to that directory.

Let's say you have a directory containing A B C D E F. When you move to that directory from above, what you will see is: F, then four blank keys, then F again. Only the first F will be functional.

I think the issue here is that the VAR menu retains its page number as it moves up and down the directories (unlike oldRPL). And when it tries to move onto the second page of a directory that doesn't have one and doesn't need a NXT button, it freaks out.

P.S. Yay to the new ROM! Downloading.

EDIT: Is the bug mentioned here the 'menu display glitch' you mentioned on the first page?

EDIT: You forgot to mention ->FNTSTAT and ->FNTPLOT. Also, what is FNTPG? What arguments do FNTSTO and FNTRCL take?
Find all posts by this user
Quote this message in a reply
09-17-2017, 12:42 AM
Post: #99
RE: newRPL: Alpha demo 0.9 released [UPDATED 2017-09-15]
(09-16-2017 05:19 PM)The Shadow Wrote:  Just found an interesting directory display bug. If you create a directory with exactly six items in it, then use ORDER to put that directory on the second or higher page of another directory, the display will be completely whacked when you move to that directory.

Let's say you have a directory containing A B C D E F. When you move to that directory from above, what you will see is: F, then four blank keys, then F again. Only the first F will be functional.

I think the issue here is that the VAR menu retains its page number as it moves up and down the directories (unlike oldRPL). And when it tries to move onto the second page of a directory that doesn't have one and doesn't need a NXT button, it freaks out.

P.S. Yay to the new ROM! Downloading.

EDIT: Is the bug mentioned here the 'menu display glitch' you mentioned on the first page?
Yes. This time I beat you to it by mere seconds :-). Test again with the new ROM and should be fixed. I re-uploaded today with other bug fixes (ISTRUE was not working well on reals, and also IDIV2 produced a (yet another) denormalized zero when the quotient was 0), make sure your VERSION is build 907, otherwise download again.

(09-16-2017 05:19 PM)The Shadow Wrote:  EDIT: You forgot to mention ->FNTSTAT and ->FNTPLOT. Also, what is FNTPG? What arguments do FNTSTO and FNTRCL take?

Yes I did! FNTSTAT is for the status area, and FNTPLOT is the font to be used when you add labels to a plot (to be finished, plot objects are still under development). FNTPG is FoNT PurGe, to uninstall fonts installed with FNTSTO.

Let me know if you find any more bugs. This last ROM was quite stable while I was working on the HHC contest. I'll wait one more week to fix other bugs we find, then I'll name it 0.9a and re-release the PC demo and all targets more officially. Keep hunting.
Find all posts by this user
Quote this message in a reply
09-17-2017, 12:45 AM
Post: #100
RE: newRPL: Alpha demo 0.9 released [UPDATED 2017-09-15]
(09-16-2017 08:39 AM)snrowe Wrote:  Hi am curious if there are plans to implement XMIT, SRECV, and BUFLEN into NEWRPL. I want to switch to NEWRPL but use the serial port quite a bit.

Yes there are. Of course, other things have more priority, like matrix handling being very incomplete, there's no nonlinear numeric solvers yet, no ODE solvers, etc.
Once the math part is more complete I'll start adding the little details, like USB HID communications, serial comms, an in-calc visual code debugger, etc.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 3 Guest(s)