mirror of
https://github.com/louisrubet/rpn
synced 2024-11-16 07:47:26 +01:00
v2.4.0-generation
This commit is contained in:
parent
5f0c5e9775
commit
fa69c3c959
6 changed files with 97 additions and 91 deletions
54
CHANGELOG.md
Normal file
54
CHANGELOG.md
Normal file
|
@ -0,0 +1,54 @@
|
|||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [2.4.0] - 2022-02-28
|
||||
|
||||
### Added
|
||||
|
||||
- Better parser (in fact just a lexer, because that's all it takes).
|
||||
- Use of [mpreal](http://www.holoborodko.com/pavel/mpfr/) instead of raw mpfr for calc on reals.
|
||||
- Use of the standard C++ complex class.
|
||||
- Enhanced code quality and memory usage checks.
|
||||
- Added github actions to pass functional tests and valgrind mem checks at each pull request.
|
||||
- Applied [google c++ style guide](https://google.github.io/styleguide/cppguide.html)
|
||||
- points covered are very numerous: c++17, define guard, name and order of inclusions, static and global variables, common patterns, classes, naming conventions etc.
|
||||
- cpplint used with a CPPLINT.cfg removing some warnings.
|
||||
- clang-format is now based on google style.
|
||||
- Test files are now markdown (.md) files, tests result are slightly changed.
|
||||
- Delived as flatpak, not as rpm and deb anymore.
|
||||
- Automatic version string from git.
|
||||
- hex and bin numbers accept floating point input and C99 standard output.
|
||||
- `«` and `»` are now valid as program delimiters. `<<` and `>>` are still valid.
|
||||
- Entering the sign after the base (ex: 0x-1e2) is allowed.
|
||||
- rpn is delivered as flatpak and snap packages to be compatible with a maximum of Linux distribs. rpm and deb are no longer generated.
|
||||
|
||||
### Changed
|
||||
|
||||
Be carefull, compatibility is broken on these points compared to last version 2.3.2:
|
||||
|
||||
- `<< <<` input doesn't lead to `««»»` but to `«<< »`, preventing to eval the real program content.
|
||||
- Making an operation stick to the previous entry is not possible anymore (ex: `1 2+` instead of `1 2 +`), this corrects bad behaviors like `3b114` pushing `3b11` and `4`.
|
||||
- Complexes are written in the form `(1,2)` instead of `(1, 2)` (space is removed).
|
||||
- The binary prefix is always `0b` on display, but the input can be `0b`, `0B`, `2b` or `2B`.
|
||||
- The hex prefix is always `0x` on display, but the input still can be `0x`, `0X` or `16B` at input.
|
||||
- `mant` and `xpon` now give binary (and not decimal) significand and exponent, as it is the norm in the standard libs (libC, standard C++, mpfr, gmp).
|
||||
- `dupn`, `roll`, `rolld` are not leaving anymore their argument in front of the stack in case of error.
|
||||
- `sto+` `sto-` `sto*` `sto/` don't accept anymore the syntax `'varname' value stoX`, but only `value 'varname' stoX`, ex: `3 'a' sto*`.
|
||||
- Incomplete entry `(1,` is not available anymore.
|
||||
|
||||
### Removed
|
||||
|
||||
- Removed useless `unti`, `repea`, `whil` (prev. existing for HP28S compatibility).
|
||||
- Removed `sqr` function, please use `sq` instead (prev. existing for HP28S compatibility).
|
||||
- Removed CtrlC for interrupting a program (considered useless).
|
||||
- Removed old memory management, efficient but poorly maintainable.
|
||||
|
||||
### Fixed
|
||||
|
||||
- `sub` now only accepts boundaries between 1 and the string length.
|
||||
- `sto/` behavior: sto/ now correctly stores variable divided by constant and not constant divided by variable.
|
||||
- `cosh` now returns the hyp cosinus instead of the hyp sinus.
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
project(rpn)
|
||||
|
||||
cmake_minimum_required(VERSION 3.22)
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
if((NOT CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
AND (NOT CMAKE_BUILD_TYPE MATCHES Release))
|
||||
|
@ -19,7 +19,6 @@ else(EXISTS ${PROJECT_SOURCE_DIR}/.git)
|
|||
endif()
|
||||
add_definitions(-DGIT_VERSION="${GIT_VERSION}")
|
||||
message("GIT_VERSION is ${GIT_VERSION}")
|
||||
message("GIT_VERSION is ${GIT_VERSION}")
|
||||
|
||||
# INFO
|
||||
set(RPN_DISPLAY_NAME "rpn")
|
||||
|
|
52
Changelog.md
52
Changelog.md
|
@ -1,52 +0,0 @@
|
|||
Changelog
|
||||
|
||||
- Better parser (now called lexer)
|
||||
- Use of mpreal instead of raw mpfr for calc on reals
|
||||
- Use of C++ complex class
|
||||
- Removing old memory management, efficient but poorly maintainable
|
||||
- Enhanced code quality and memory usage checks
|
||||
- Added CircleCI checks: passing functional tests and valgrind mem checks at each pull request
|
||||
- SonarCloud integration, Sonar way profile
|
||||
- clang-format now based on google style
|
||||
- [google c++ style guide](https://google.github.io/styleguide/cppguide.html) applied
|
||||
- c++17
|
||||
- define guard
|
||||
- name and order of inclusions
|
||||
- static and global variables
|
||||
- common patterns (ex: no static maps or vectors)
|
||||
- classes (explicit)
|
||||
- naming:
|
||||
- file names (.cc .h), types (PascalCase), variables (snake_case), members (trailing _), static const (camelCase begining with k), enum (enum class, values like static const
|
||||
- consistent comments (//), class comments, functions comments
|
||||
- cpplint used with a CPPLINT.cfg removing some warnings
|
||||
- Test files are now markdown (.md) files, tests result are slightly changed
|
||||
- Delivery as flatpak and snap
|
||||
- error string are slightly different, althought error codes are still the same
|
||||
- automatic version string from git, slightly change from previous versions
|
||||
- hex and bin numbers accept floating point inputs
|
||||
- std, fix and sci don't apply to hex and bin
|
||||
|
||||
New
|
||||
- `«` and `»` are now valid as program delimiters. `<<` and `>>` are still valid
|
||||
- entering the sign after the base (ex: 0x-1e2) is allowed
|
||||
- rpn is delivered as flatpak and snap packages to be compatible with a maximum of Linux distribs. rpm and deb are no longer generated
|
||||
|
||||
Compatibility is broken on these points
|
||||
- `<< <<` input doesn't lead to `««»»` but to `«<< »`, preventing to eval the real program content
|
||||
- `1 2+` not allowed anymore, keep `1 2 +`, this corrects bad behaviors like `3b114` pushing `3b11` and `4`
|
||||
- complexes are written in the form `(1,2)` instead of `(1, 2)` (space is removed)
|
||||
- removed useless `unti`, `repea`, `whil` (prev.existing for HP28S compatibility)
|
||||
- removed `sqr` function, please use `sq` instead (prev.existing for HP28S compatibility)
|
||||
- the binary prefix is always 0b on display, but still can be 0b, 0B, 2b or 2B at input
|
||||
- the hex prefix is always 0x on display, but still can be 0x, 0X or 16B at input
|
||||
- `mant` and `xpon` now give binary (and not decimal) significand and exponent, as it is the norm in standard libs (libC, standard C++, mpfr, gmp)
|
||||
- `dupn`, `roll`, `rolld` are not leaving anymore their argument in front of the stack in case of error
|
||||
- `sto+` `sto-` `sto*` `sto/` don't accept anymore the syntax `'varname' value stoX`, but only `value 'varname' stoX`, ex: `3 'a' sto*`
|
||||
- incomplete entry `(1,` is not available anymore
|
||||
- signed zero is the sign of zero is subject to change compared to previous version, for example `-3 sqrt` now equals `(0.000000,1.732051)` instead of `(-0.000000,1.732051)`
|
||||
- removed CtrlC for interrupting a program (considered useless)
|
||||
|
||||
Debug
|
||||
- `sub` now only accepts boundaries between 1 and the string length
|
||||
- `sto/` behavior: sto/ now correctly stores variable / constant and not constant / variable
|
||||
- `cosh` now returns the hyp cosinus instead of the hyp sinus (!)
|
|
@ -1,58 +1,63 @@
|
|||
# **rpn v2.3.2** - generation
|
||||
# Generation
|
||||
|
||||
For now rpn is proposed only for **GNU/Linux**
|
||||
rpn is proposed for **GNU/Linux**.
|
||||
|
||||
It can be generated following the steps below
|
||||
It can be generated following the steps below.
|
||||
|
||||
## version identification
|
||||
## Version identification
|
||||
|
||||
rpn is dynamically linked against GNU MP and GNU MPFR
|
||||
rpn is dynamically linked against GNU MP and GNU MPFR.
|
||||
|
||||
and embeds the source code of linenoise-ng as a submodule
|
||||
and embeds the source code of linenoise-ng and as a submodule
|
||||
|
||||
It is necessary to get MPFR to generate rpn
|
||||
|
||||
## install GNU MPFR headers
|
||||
## Install GNU MPFR headers
|
||||
|
||||
ubuntu 20.04
|
||||
git libmpfr6 cmake
|
||||
|
||||
- download **GNU MPFR** from http://www.mpfr.org
|
||||
- install it with usual autotools commands `./configure && make && make install`
|
||||
|
||||
## generate rpn
|
||||
## Generate rpn
|
||||
|
||||
- clone [rpn project](https://github.com/louisrubet/rpn/) or download a zipped version from [the release directory](https://github.com/louisrubet/rpn/releases)
|
||||
```
|
||||
# git clone https://github.com/louisrubet/rpn.git
|
||||
```
|
||||
|
||||
```shell
|
||||
git clone https://github.com/louisrubet/rpn.git
|
||||
```
|
||||
|
||||
- make
|
||||
|
||||
CMake must be installed on the generation machine
|
||||
|
||||
```
|
||||
# cd rpn/
|
||||
# mkdir build
|
||||
# cd build && cmake .. && make
|
||||
```
|
||||
|
||||
CMake must be installed on the generation machine
|
||||
|
||||
```shell
|
||||
cd rpn/
|
||||
mkdir build
|
||||
cd build && cmake .. && make
|
||||
```
|
||||
|
||||
- install
|
||||
```
|
||||
# cd rpn/build
|
||||
# sudo make install
|
||||
```
|
||||
|
||||
```
|
||||
cd rpn/build
|
||||
sudo make install
|
||||
```
|
||||
|
||||
- packages
|
||||
|
||||
To build RPM package you should install CMake 2.6.0 or higher
|
||||
|
||||
```
|
||||
# cd rpn/build
|
||||
# sudo make package
|
||||
[100%] Built target rpn
|
||||
Run CPack packaging tool...
|
||||
CPack: Create package using DEB
|
||||
(...)
|
||||
CPack: Create package using RPM
|
||||
(...)
|
||||
CPack: Create package using TGZ
|
||||
(...)
|
||||
```
|
||||
```shell
|
||||
cd rpn/build
|
||||
sudo make package
|
||||
[100%] Built target rpn
|
||||
Run CPack packaging tool...
|
||||
CPack: Create package using DEB
|
||||
(...)
|
||||
CPack: Create package using RPM
|
||||
(...)
|
||||
CPack: Create package using TGZ
|
||||
(...)
|
||||
```
|
||||
|
|
|
@ -93,7 +93,7 @@ Provided loop keywords **for|start..next|step**, **do..until**, **while..repeat*
|
|||
|
||||
### command line
|
||||
|
||||
**rpn** is a cli interface with an **interactive editor** with autocompletion provided by **linenoise-ng**, see https://github.com/arangodb/linenoise-ng
|
||||
**rpn** is a cli interface with an **interactive editor** with autocompletion provided by [linenoise-ng](https://github.com/arangodb/linenoise-ng).
|
||||
|
||||
Autocompletion works like those in Linux shells, with keys \<tab\>, Ctrl-R \<search pattern\> etc.
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 6a37ee0e9f117bb9950159545ecdbdbba41799bf
|
||||
Subproject commit e20977cddd1a5bec3672ecd1a388a5f9ffdefa9a
|
Loading…
Reference in a new issue