-
Notifications
You must be signed in to change notification settings - Fork 1
Khaf
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 (כ).
- 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)
-
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 forconcat
)
-
-
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
anddiv
for larger and real numbers - fix
trunc
andround
problems - fix
Math.isInteger
- fix conflicts between Array and String functions with common names (e.g.
Array.split
vsString.split
) - fix ftrunc for small integers
- fix rounding numbers (to make it mathematically correct)
- fix
cmod
andcdiv
- optimize
Math.isPrime
- fix
Console.textColor
for Unix systems - Unify behavior of
Array.setAt
andString.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
- fix T distribution functions
- add new functions of
Math.genDivisors
,Math.genNaturalDivisors
,Math.divides
- 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
-
callWhile
,callFor
,callUntil
- Negative index of a table/string as its tail
- Student's T test
Versions of Papaj:
Pre-builds: Bereshit (v.0.0.1), Shemot (v.0.0.2)
Aleph (v.0.1.0), Bet (v.0.2.0), Gimel (v.0.2.1), Dalet (v.0.3.0)
Hey (v.0.3.1), Vav (v.0.4.0), Zain (v.0.4.1), Chet (v.0.4.2), Tet (v.0.4.3)
Yod (v.0.5.0), Khaf (v.0.5.1), Lamed (v.0.5.2), Mem (v.0.5.3), Nun (v.0.5.4), Samech (v.0.5.5)
Development version: Leviathan
Packages of Papaj:
Vanilla, Array, Console, Date, Math, Number, String
Structures of Papaj:
Conditional, Entity, Loop, Variable
Array, Boolean, DateTime, Exception, LogicalExpression, Function, Number, Null, String
Home, PapajScript, Papaj (interpreter), Papaj REPL