I should release more often... I mean, 13 months? Really?
General added features
- Added
%c
and%C
character classes (consonants +y
and anything else, respectively) (#50). - Added
%p
and%P
character classes (printables and anything else, respectively). - Added
%q
and%Q
character classes (printables + newline and anything else, respectively). - Added 7 shortcuts:
Ê
(l
),Ë
(mDEF{D
),Ì
(gJ
),Í
(n2
),Î
(g
),Ï
(XYZ{Y
),Ñ
(*2
). - Added
Math.approx
function, which rounds out errors of a magnitude less than 10n (default n = 5). - Each line except the last is now assigned to a variable, in order
U
,V
,W
,X
,Y
,Z
,A
,B
,C
, ...T
(not that anyone will ever get anywhere near that far)
Bug fixes/improvements
S.e()
used theg
flag by default, breaking the effect of logging each successive replacement (#31).A.o(n)
assumedn
was an integer, entering infinite loops if it wasn't (#37).A.r(f)
now starts with the first element if no starting value is given.A.x()
returnedNaN
if any of its elements couldn't be parsed as a number.A.z(n)
broke somehow. I think the fix broke it in a different way.- Auto-functions in
A.ä(f)
andA.å(f)
didn't use both inputs. A.ç(a)
both modifiedA
and filled the array with references rather than copies ofa
.A.í(f,a)
didn't swap arguments.N.k()
,N.ç()
, andN.î()
usedthis
as a Number object rather than a pure number (#35).N.v()
now acts as if all numbers are divisible by0
.- Switched from
String.fromCharCode
toString.fromCodePoint
(#42). - Added more implicit commas before decimal points.
- General fixes with implicit
U
s. - General fixes with
$interpolated JS$
. - Balance parentheses inside
?:
, adding an extra layer if necessary. - Make
++
and--
take precedence over anything else, adding a layer of parentheses. - Remove many unnecessary layers of parentheses to improve readability.
- Add spacing to improve readability. (Only permanent side-effect is breaking The Polyglot)
- More I haven't yet mentioned and don't remember.
New String methods
S.k(s)
; removes chars ins
(opposite ofS.o(s)
).S.k(f)
; removes chars that satisfyf
(opposite ofS.o(f)
).S.n(s)
; converts from bases.length
to integer usings
as the alphabet.S.n(a)
; same as above, but with an array of items making up the alphabet.S.o(f)
; keeps only the chars that satisfyf
(similar toA.f(f)
).S.y(f)
; maps each column throughf
.S.í(s,f?)
; pairs each char with the corresponding one ins
, optionally mapping each pair throughf
.S.ù/ú/û(n,s=" ")
; left/right/center-pads each line to lengthn
withs
.S.ù/ú/û(s=" ")
; left/right/center-pads each line to form a rectangle.
New Array methods
A.e(a)
; returns whether the two arrays are equal (#42)A.k(f)
; removes items that satisfyf
(opposite ofA.f(f)
).A.y(f)
; maps each column throughf
.A.ì(s)
; converts from bases.length
to integer usings
as the alphabet.A.ì(a)
; same as above, but with an array of items making up the alphabet.A,ï(a,f?)
; Cartesian product, mapping each pair throughf
. If noa
is given, usesA
again.A.ù/ú/û(n,s=" ")
; left/right/center-pads each line to lengthn
withs
.A.ù/ú/û(s=" ")
; left/right/center-pads each line to form a rectangle.
New Number methods
N.a(n)
; absolute difference betweenN
andn
.N.d(n)
; gets character at codepointN+n
.N.j(n)
; whetherN
is coprime ton
(they share no prime factors).N.s(f)
; converts to string, maps throughf
, then converts back to number.N.s(s)
; converts from integer to bases.length
usings
as the alphabet.N.s(a)
; same as above, but with an array of items making up the alphabet.N.y(n=2)
; GCD. (Even works on decimals, thanks toMath.approx
!)N.z(n=2)
; integer division.N.ì(s)
; converts from integer to bases.length
usings
as the alphabet.N.ì(a)
; same as above, but with an array of items making up the alphabet.
I should keep better track of my changes to make it easier to write these changelogs. Or maybe I could just release an update every few weeks or months so I don't forget what I've done...