Skip to content
Paul Lipkowski edited this page Dec 9, 2023 · 61 revisions

Khaf (v.0.5.1) is a stable version of RPN Calculator (now Papaj). Its release date is March 21, 2021. It is named after the eleventh letter of Hebrew alphabet – khaf (כ).

Details and features

  • Name: Khaf
  • Version Code: 0.5.1
  • Version Type: Generation 3 build
  • Release Date: March 21, 2021
  • Stable precedessor: Yod (v.0.5.0)
  • Stable successor: Lamed (v.0.5.2)
  • Language: FreePascal
  • Lines of code: 9880
  • Number of functions: 419 + user-defined ones
  • Maximum number of instructions: de facto no limit (depends how many you can put in AnsiString, which has limit of either 2,147,483,647 (32 bit) or 9,223,372,036,854,775,807 chars (64 bit))
  • Number of entity types: 9 (10 with quasitypes)
  • Number of packages: 6
  • Tested on:
    • systems: Windows (Win2000, Win7, Win8.1, Win10), Linux (Ubuntu 18-20, Debian 8-9, Manjaro 20.2)
    • architectures: i386/x86 (32 bit), amd64/x64 (64 bit)

Code and binaries

  • You can download the binaries/executables of Khaf here.
  • You can find its source code here.

List of changes

v.0.5.1.0 – the first release of March 21, 2021

  • Array functions:
    • crush
    • destroy
    • filter
    • left, right, cutLeft, cutRight, cutBothSides, between, subarray
    • map
    • reduce, reduceFromFirst
    • reduceRight, reduceRightFromLast
    • reduceMode
    • join
    • split, splitByExpression
    • weave, unweave
    • crushBy
    • getTail, getHead
  • String functions:
    • cutLeft, cutRight, cutBothSides
    • upper, lower, uplower
    • getAt, setAt, compare
    • join (alias for concat)
  • Vanilla functions:
    • frontrem
  • Math functions:
    • isNatural
    • cbrt
    • log2 / lbin
    • log10 / ldec
    • log16 / lhex
    • gamma, gammaln
    • Gamma distribution functions – funcGamma, distGamma, randomGamma, genGamma
    • Chi-squared distribution functions – funcChiSq, distChiSq, randomChiSq, genChiSq
    • Erlang distribution functions – funcErlang, distErlang, randomErlang, genErlang
    • Student's T distribution functions – funcT, distT, randomT, genT
  • for-loops
    • for ( item : Array ) { }
  • Syntax changes
    • String.run -> String.eval
  • New variable engine with scopes
  • Global variables
  • Fix the bugs and faults
  • Fix elif bug
  • Directive @stringmode and @stringstart
  • Strings are zero-based default (i.e. the first char has index of 0)
  • Strings are C-like evaluated with \ ASCII escape codes by default
  • mod and div for larger and real numbers
  • fix trunc and round problems
  • fix Math.isInteger
  • fix conflicts between Array and String functions with common names (e.g. Array.split vs String.split)
  • fix ftrunc for small integers
  • fix rounding numbers (to make it mathematically correct)
  • fix cmod and cdiv
  • optimize Math.isPrime
  • fix Console.textColor for Unix systems
  • Unify behavior of Array.setAt and String.setAt
  • Introduction of exclamations at Array functions of setAt, getAt, push, pop, shift, getTail, getHead, pushAt, popAt
  • New DateTime entity type
  • Date/Time management – Date package
    • Date.toDateTime
    • Date.toTimestamp
    • Date.now, Date.today, Date.yesterday, Date.tomorrow, unixEpoch
    • Date.truncDate, Date.truncTime
    • Date.getYear, Date.getMonth, Date.getDay
    • Date.getHour, Date.getHour24, Date.getHour12, Date.getMinute, Date.getSecond, Date.getMillisecond
    • Date.getWeekDay, Date.getYearDay
    • getMonthWeek, getYearWeek
    • Date.setYear, Date.setMonth, Date.setDay
    • Date.setHour, Date.setMinute, Date.setSecond, Date.setMillisecond
    • Date.addYear, Date.addMonth, Date.addDay
    • Date.addHour, Date.addMinute, Date.addSecond, Date.addMillisecond
    • Date.isPM
    • Date.isLeapYear
    • Date.isInLeapYear
    • diffYear, diffMonth, diffWeek, diffDay
    • diffHour, diffMinute, diffSecond, diffMillisecond
    • spanYear, spanMonth, spanWeek, spanDay
    • spanHour, spanMinute, spanSecond,spanMillisecond
    • format
    • compare, compareDate, compareTime
  • GUI load/save files
  • GUI resizable window

v.0.5.1.1 – update of April 15, 2021

  • fix T distribution functions
  • add new functions of Math.genDivisors, Math.genNaturalDivisors, Math.divides

v.0.5.1.2 – update of April 18, 2021

  • fix elif conditional bug
  • introduction of parametrized functions, e.g. function ( x y ) { x y * sqrt }
  • optimize Array.map, Array.reduce
  • fix minor function bugs
  • Vanilla function of frac
  • Math functions: cub, inv, countNaturalDivisors, sumNaturalDivisors, funcTau, funcSigma, funcMobius, funcEuler/funcPhi

The features moved to the next stable version

  • callWhile, callFor, callUntil
  • Negative index of a table/string as its tail
  • Student's T test
Clone this wiki locally