Skip to content

The Overdue Update

Latest
Compare
Choose a tag to compare
@ETHproductions ETHproductions released this 07 Jul 06:54
· 70 commits to master since this release

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 the g flag by default, breaking the effect of logging each successive replacement (#31).
  • A.o(n) assumed n 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() returned NaN 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) and A.å(f) didn't use both inputs.
  • A.ç(a) both modified A and filled the array with references rather than copies of a.
  • A.í(f,a) didn't swap arguments.
  • N.k(), N.ç(), and N.î() used this as a Number object rather than a pure number (#35).
  • N.v() now acts as if all numbers are divisible by 0.
  • Switched from String.fromCharCode to String.fromCodePoint (#42).
  • Added more implicit commas before decimal points.
  • General fixes with implicit Us.
  • 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 in s (opposite of S.o(s)).
  • S.k(f); removes chars that satisfy f (opposite of S.o(f)).
  • S.n(s); converts from base s.length to integer using s 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 satisfy f (similar to A.f(f)).
  • S.y(f); maps each column through f.
  • S.í(s,f?); pairs each char with the corresponding one in s, optionally mapping each pair through f.
  • S.ù/ú/û(n,s=" "); left/right/center-pads each line to length n with s.
  • 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 satisfy f (opposite of A.f(f)).
  • A.y(f); maps each column through f.
  • A.ì(s); converts from base s.length to integer using s 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 through f. If no a is given, uses A again.
  • A.ù/ú/û(n,s=" "); left/right/center-pads each line to length n with s.
  • A.ù/ú/û(s=" "); left/right/center-pads each line to form a rectangle.

New Number methods

  • N.a(n); absolute difference between N and n.
  • N.d(n); gets character at codepoint N+n.
  • N.j(n); whether N is coprime to n (they share no prime factors).
  • N.s(f); converts to string, maps through f, then converts back to number.
  • N.s(s); converts from integer to base s.length using s 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 to Math.approx!)
  • N.z(n=2); integer division.
  • N.ì(s); converts from integer to base s.length using s 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...