Recent

Author Topic: Announcing TRURL RPN Engine  (Read 744 times)

jwdietrich

  • Hero Member
  • *****
  • Posts: 1036
    • formatio reticularis
Announcing TRURL RPN Engine
« on: July 13, 2019, 02:05:37 pm »
Reverse Polish Notation (RPN) is a mathematical notation and entry logic for calculators that has some advances over the more common algebraic notation. This is why many scientists and engineers prefer RPN-based calculators. Devices are, however, expensive and available from a small number of companies only (e.g. HP and SwissMicros). The selection of virtual calculators with RPN for desktop computers is limited, too. The TRURL project provides libraries for creating virtual calculators in Object Pascal and pre-compiled apps for macOS, Windows and other operating systems.

With immediate effect, TRURL's RPN Engine for Lazarus and Free Pascal is available. It is a collection of Object Pascal types, classes and procedures that can be used as a foundation for virtual RPN calculators. The RPN Engine supports the creation of both text-mode and GUI-based calculators.

More information is available from trurl.sf.net. The site also provides TRURL A, a very simple (but fully functional) RPN calculator that shows, how easy it is to create a calculator with Lazarus and the RPN Engine.

All software of the TRURL repository is available with a BSD license, making it freely available for both free open source and commercial projects.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.0.6 | FPC 3.0.4 | PPC, Intel, ARM | macOS, Windows, Linux

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7604
Re: Announcing TRURL RPN Engine
« Reply #1 on: July 13, 2019, 03:03:15 pm »
A simple RPN engine come with FPC part of unit symbolic, and the demo
packages/symbolic/examples/rpnthing.pas

implements a minimal RPN stack based calculator.

jwdietrich

  • Hero Member
  • *****
  • Posts: 1036
    • formatio reticularis
Re: Announcing TRURL RPN Engine
« Reply #2 on: July 13, 2019, 03:12:14 pm »
A simple RPN engine come with FPC part of unit symbolic, and the demo
packages/symbolic/examples/rpnthing.pas

implements a minimal RPN stack based calculator.

Thanks. RPNThing has a slightly different objective, but it is very elegant. Good to know about this.
« Last Edit: July 13, 2019, 03:16:58 pm by jwdietrich »
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.0.6 | FPC 3.0.4 | PPC, Intel, ARM | macOS, Windows, Linux

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7604
Re: Announcing TRURL RPN Engine
« Reply #3 on: July 13, 2019, 03:34:35 pm »
It's all crude, since i needed it mostly as an evaluation engine in own programs.

But as a fun part, I implemented symbolic derivation (which is what the name of the unit comes from). If your engine doesn't support it, you are welcome to take it. BSD license is good enough for me.

jwdietrich

  • Hero Member
  • *****
  • Posts: 1036
    • formatio reticularis
Re: Announcing TRURL RPN Engine
« Reply #4 on: July 27, 2019, 10:29:33 am »
It's all crude, since i needed it mostly as an evaluation engine in own programs.

But as a fun part, I implemented symbolic derivation (which is what the name of the unit comes from). If your engine doesn't support it, you are welcome to take it. BSD license is good enough for me.

This is very interesting. I will give it a go.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.0.6 | FPC 3.0.4 | PPC, Intel, ARM | macOS, Windows, Linux

jwdietrich

  • Hero Member
  • *****
  • Posts: 1036
    • formatio reticularis
Re: Announcing TRURL RPN Engine
« Reply #5 on: July 27, 2019, 10:48:56 am »
The RPN Engine has been updated to version 1.0.1, which is a bug-fix release improving error handling. See http://trurl.sf.net or https://sourceforge.net/projects/trurl/ for details.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.0.6 | FPC 3.0.4 | PPC, Intel, ARM | macOS, Windows, Linux