HP Forums
The Fibonacci Triangle - HP-38/39/40 GROB Question - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: The Fibonacci Triangle - HP-38/39/40 GROB Question (/thread-176484.html)



The Fibonacci Triangle - HP-38/39/40 GROB Question - Marcus von Cube, Germany - 01-01-2011

In this thread in the French MySilicium forum there are several programs to display the Fibonacci sequence as a binary image. The original idea is from this page: http://naivedesign.com/ND1/The_Fib_Triangle.html.

The by far fastest solution runs on a HP50g and uses binary arithmetic and a dynamically built GROB. The HP40gs uses very similar hardware but its programming model is so simplified that I came up with a program which is about 100 times slower than the user RPL program for the 50G. This is a little frustrating. The main problem is that I couldn't find a way to dynamically construct a GROB. I see two possible solutions:

1) There exists a library somewhere in the wild which provides dynamic string and GROB handling.

2) The program is translated to SysRPL. Can I program in SysRPL on the machine or what do I need?


Re: The Fibonacci Triangle - HP-38/39/40 GROB Question - Han - 01-01-2011

Quote:
2) The program is translated to SysRPL. Can I program in SysRPL on the machine or what do I need?

You can program in SysRPL on the machine by simply typing "256 ATTACH" and using the built-in compiler. You can also download Jazz 50G if you wish to do SysRPL debugging, among other things.


Re: The Fibonacci Triangle - HP-38/39/40 GROB Question - Han - 01-01-2011

Also, it would be faster to draw directly onto the screen after each computation rather than manipulate everything via strings and GROBs.




Re: The Fibonacci Triangle - HP-38/39/40 GROB Question - Tim Wessman - 01-02-2011

Yes, you can program in sysRPL, but it is quite a pain and requires you to understand applet structure, and use a lot of not so nicely integrated tools to do so.

TW


Re: The Fibonacci Triangle - HP-38/39/40 GROB Question - Oliver Unter Ecker - 01-02-2011

Hi Markus,

Quote:
The by far fastest solution runs on a HP50g and uses binary arithmetic and a dynamically built GROB.

Fastest, if you don't include the calculator that served as inspiration for this thread. For completeness, ND1, with a run-time of 0.3s for computation and 0.7s for computation and display, is quite a bit faster than the 50g at 170s for this task. :-)

The implementations are really impressive, though.

Oliver


Re: The Fibonacci Triangle - HP-38/39/40 GROB Question - Marcus von Cube, Germany - 01-02-2011

Han, I'm talking about the 39G (or 39gs/40gs), not the 50g. I don't think I can attach the library on these machines.


Re: The Fibonacci Triangle - HP-38/39/40 GROB Question - Marcus von Cube, Germany - 01-02-2011

Can you tell us more about ND1?


Re: The Fibonacci Triangle - HP-38/39/40 GROB Question - Marcus von Cube, Germany - 01-02-2011

I understand that I can program FOR the machine in SysRPL but obviously not ON the machine.

BTW, is there a SYSEVAL call the does the equivalant of PVIEW to allow interactive scrolling of a GROB of arbitrary size?


Re: The Fibonacci Triangle - HP-38/39/40 GROB Question - Marcus von Cube, Germany - 01-02-2011

This was my first attempt and it's slower than the GROB version.


Re: The Fibonacci Triangle - HP-38/39/40 GROB Question - Oliver Unter Ecker - 01-02-2011

Marcus,

Of course. ND1 is a new calculator in the spirit of the HP-28,-48,-49 lines. A vague mix of HP-28S and HP-50g, it supports RPL but its biggest strength and architectural feature is that it's built on JavaScript and HTML5, and that it's fully programmable and extensible.
There's a lot of information on the "app-site" at http://naivedesign.com/ND1
Click on Specs to begin and also see the comparison to HP calcs on the specs page.

An intro to the project, and call for programmer participation, for HP pros is here http://groups.google.com/group/comp.sys.hp48/browse_thread/thread/2b377149669b7fb4#
You may also want to check out http://groups.google.com/group/comp.sys.hp48/browse_thread/thread/5bd6e0b2e4691311#

Cheers.