Khaf - MrKaszeba19/PapajLang GitHub Wiki
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
List of changes
v.0.5.1.0 – the first release of March 21, 2021
- Array functions:
crushdestroyfilterleft,right,cutLeft,cutRight,cutBothSides,between,subarraymapreduce,reduceFromFirstreduceRight,reduceRightFromLastreduceModejoinsplit,splitByExpressionweave,unweavecrushBygetTail,getHead
- String functions:
cutLeft,cutRight,cutBothSidesupper,lower,uplowergetAt,setAt,comparejoin(alias forconcat)
- Vanilla functions:
frontrem
- Math functions:
isNaturalcbrtlog2/lbinlog10/ldeclog16/lhexgamma,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
elifbug - Directive
@stringmodeand@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 modanddivfor larger and real numbers- fix
truncandroundproblems - fix
Math.isInteger - fix conflicts between Array and String functions with common names (e.g.
Array.splitvsString.split) - fix ftrunc for small integers
- fix rounding numbers (to make it mathematically correct)
- fix
cmodandcdiv - optimize
Math.isPrime - fix
Console.textColorfor Unix systems - Unify behavior of
Array.setAtandString.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.toDateTimeDate.toTimestampDate.now,Date.today,Date.yesterday,Date.tomorrow,unixEpochDate.truncDate,Date.truncTimeDate.getYear,Date.getMonth,Date.getDayDate.getHour,Date.getHour24,Date.getHour12,Date.getMinute,Date.getSecond,Date.getMillisecondDate.getWeekDay,Date.getYearDaygetMonthWeek,getYearWeekDate.setYear,Date.setMonth,Date.setDayDate.setHour,Date.setMinute,Date.setSecond,Date.setMillisecondDate.addYear,Date.addMonth,Date.addDayDate.addHour,Date.addMinute,Date.addSecond,Date.addMillisecondDate.isPMDate.isLeapYearDate.isInLeapYeardiffYear,diffMonth,diffWeek,diffDaydiffHour,diffMinute,diffSecond,diffMillisecondspanYear,spanMonth,spanWeek,spanDayspanHour,spanMinute,spanSecond,spanMillisecondformatcompare,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