]> Lady’s Gitweb - Pisces/log
Pisces
12 months agoSimplify implementation of defineOwnProperties
Lady [Sun, 19 Nov 2023 16:04:50 +0000 (11:04 -0500)]
Simplify implementation of defineOwnProperties

There was no reason to create a custom iterable here; just iterate the
splat array manually.

12 months agoDrop dependency on object.js from symbol.js
Lady [Sun, 19 Nov 2023 16:04:35 +0000 (11:04 -0500)]
Drop dependency on object.js from symbol.js

This is only a loadtime dependency and not necessary.

12 months agoMove arraylike functions into object.js
Lady [Sun, 19 Nov 2023 16:04:12 +0000 (11:04 -0500)]
Move arraylike functions into object.js

Arraylikes are treated as objects, even when they aren’t literally
objects (e·g strings). `isArraylikeObject` notably checks for both.

12 months agoMove isArrayIndexString into string.js
Lady [Fri, 17 Nov 2023 02:47:41 +0000 (21:47 -0500)]
Move isArrayIndexString into string.js

…and add some missing tests for isIntegerIndexString.

12 months agoMove string functions from value.js to string.js
Lady [Fri, 17 Nov 2023 02:26:48 +0000 (21:26 -0500)]
Move string functions from value.js to string.js

These actually make more sense here!

12 months agoMove isIntegerIndexString into value.js
Lady [Fri, 17 Nov 2023 02:09:38 +0000 (21:09 -0500)]
Move isIntegerIndexString into value.js

While potentially relevant to collections, this function is actually
about classifying types of value.

12 months agoTest constructability, name, length in numeric.js
Lady [Fri, 17 Nov 2023 01:45:04 +0000 (20:45 -0500)]
Test constructability, name, length in numeric.js

12 months agoRename Ascii‐related functions in string.js
Lady [Sat, 11 Nov 2023 03:36:51 +0000 (22:36 -0500)]
Rename Ascii‐related functions in string.js

Treating Ascii as a pronouncable acronym, not an unpronouncable one.

12 months agoRename scalarValueString → toScalarValueString
Lady [Sat, 11 Nov 2023 03:12:06 +0000 (22:12 -0500)]
Rename scalarValueString → toScalarValueString

Also update the implementation to use the new `String::toWellFormed`
method.

12 months agoTest constructability, name, length in string.js
Lady [Sat, 11 Nov 2023 02:55:58 +0000 (21:55 -0500)]
Test constructability, name, length in string.js

12 months agoRefactor object.js to use createArrowFunction
Lady [Sun, 5 Nov 2023 21:11:51 +0000 (16:11 -0500)]
Refactor object.js to use createArrowFunction

12 months agoRedo create⸺Function A·P·I in function.js
Lady [Sun, 5 Nov 2023 20:41:30 +0000 (15:41 -0500)]
Redo create⸺Function A·P·I in function.js

`createCallableFunction` and `createIllegalConstructor` are now joined
by a `createArrowFunction`, and all three have extremely similar
interfaces. Further refactoring is probably necessary elsewhere in the
codebase to make use of these changes.

12 months agoMove arraylike & index functions → values.js
Lady [Sun, 29 Oct 2023 23:26:53 +0000 (19:26 -0400)]
Move arraylike & index functions → values.js

Lengths and indices are properly kinds of values, not kinds of
collections, and this enables their use much earlier in the dependency
chain.

13 months agoTest constructability, name, length in iterable.js
Lady [Sat, 21 Oct 2023 19:47:08 +0000 (15:47 -0400)]
Test constructability, name, length in iterable.js

13 months agoImprove object.js a·p·i
Lady [Sat, 21 Oct 2023 19:29:12 +0000 (15:29 -0400)]
Improve object.js a·p·i

- Add tests for functions which were formerly just re·exports of
  standard library functions.

- Test constructibility, name, and length for all exported functions.

- Replace `isFrozenObject` and `isSealedObject` with `isUnfrozenObject`
  and `isUnsealedObject`, as the former versions return _true_, not
  _false_, when provided with a non·object argument.

- Revise `setPrototype` to have better behaviours than the Ecmascript
  implementation when provided with a non·object argument.

14 months agoCast to primitive when creating function names
Lady [Tue, 5 Sep 2023 00:49:47 +0000 (20:49 -0400)]
Cast to primitive when creating function names

This matches the behaviour of `toPropertyKey`, which is a soft spec
prerequisite (`SetFunctionName` takes a property key argument).

14 months agoDefine names for LazyLoader getters & setters
Lady [Tue, 5 Sep 2023 00:35:57 +0000 (20:35 -0400)]
Define names for LazyLoader getters & setters

This commit also fixes some of the `LazyLoader` tests.

14 months agoCast to function name in createCallableFunction
Lady [Tue, 5 Sep 2023 00:27:48 +0000 (20:27 -0400)]
Cast to function name in createCallableFunction

This requires moving the definition of `toFunctionName` inside the same
closure as `createCallableFunction` to ensure that it is defined before
`createCallableFunction` is called (e·g when defining
`ordinaryHasInstance`).

14 months agoTest createCallableFunction names and lengths
Lady [Mon, 4 Sep 2023 22:38:25 +0000 (18:38 -0400)]
Test createCallableFunction names and lengths

14 months agoTest function lengths in {value∣function∣symbol}.js
Lady [Mon, 4 Sep 2023 22:37:35 +0000 (18:37 -0400)]
Test function lengths in {value∣function∣symbol}.js

14 months agoAdd toFunctionName to function.js
Lady [Mon, 4 Sep 2023 22:25:40 +0000 (18:25 -0400)]
Add toFunctionName to function.js

14 months agoAdd symbolToString and symbolValue to symbol.js
Lady [Mon, 4 Sep 2023 21:34:27 +0000 (17:34 -0400)]
Add symbolToString and symbolValue to symbol.js

14 months agoRename make⸺ to create⸺ in function.js
Lady [Mon, 4 Sep 2023 21:15:24 +0000 (17:15 -0400)]
Rename make⸺ to create⸺ in function.js

“make⸺” names are used in the Ecmascript specification to describe
in‐place modifications. These functions return new values, so “create”
is more appropriate.

14 months agoCreate symbol.js module with getSymbolDescription
Lady [Mon, 4 Sep 2023 20:57:00 +0000 (16:57 -0400)]
Create symbol.js module with getSymbolDescription

14 months agoAdd makeIllegalConstructor to functions.js
Lady [Mon, 4 Sep 2023 19:54:46 +0000 (15:54 -0400)]
Add makeIllegalConstructor to functions.js

14 months agoTest function.js non·constructor constructability
Lady [Mon, 4 Sep 2023 19:47:12 +0000 (15:47 -0400)]
Test function.js non·constructor constructability

14 months agoEnsure each function in function.js has proper name
Lady [Sat, 22 Jul 2023 07:42:24 +0000 (00:42 -0700)]
Ensure each function in function.js has proper name

Also provides a wrapper for `constructor` for parity even though this
isn’t strictly required, and simplifies the implementation of
`isConstructor` to make use of `completesNormally`.

14 months agoAdd completesNormally to function.js
Lady [Sat, 22 Jul 2023 07:39:17 +0000 (00:39 -0700)]
Add completesNormally to function.js

This is a convenience function which returns true if calling the
argument results in a normal completion (i·e not a throw), and false
otherwise.

14 months agoUse strict asserts in function.test.js
Lady [Sat, 22 Jul 2023 07:30:18 +0000 (00:30 -0700)]
Use strict asserts in function.test.js

Also test to ensure that getters and setters are not constructable.

14 months agoTest value.js non·constructor constructability
Lady [Mon, 4 Sep 2023 19:37:32 +0000 (15:37 -0400)]
Test value.js non·constructor constructability

16 months agoEnsure each function in value.js has correct name
Lady [Sat, 22 Jul 2023 06:39:26 +0000 (23:39 -0700)]
Ensure each function in value.js has correct name

This requires making `sameValue` a wrapper of `Object.is` instead of
literally the same function.

16 months agoUse strict asserts in value.test.js
Lady [Sat, 22 Jul 2023 06:52:19 +0000 (23:52 -0700)]
Use strict asserts in value.test.js

16 months agoAdd iterator function builders; use in string.js
Lady [Sat, 22 Jul 2023 06:30:50 +0000 (23:30 -0700)]
Add iterator function builders; use in string.js

This commit adds a number of new `⸺IteratorFunction` functions in a
new `iterable.js` module, for building “iterator functions” from
various kinds of iterable object (as well as generator functions, which
are not themselves iterable). These functions are useful
metaprogramming tools for creating iterators akin to those produced by
the native Ecmascript builtins like `Array::values` or `Map::entries`
when starting from an already‐iterable base value but needing to map it
somehow.

The existing functions `codeUnits`, `codepoints`, and `scalarValues`
already fell into this category and have been refactored to make use of
the new technique.

17 months agoAdd buffer getters and setters to binary.js 0.4.0
Lady [Tue, 27 Jun 2023 01:07:19 +0000 (18:07 -0700)]
Add buffer getters and setters to binary.js

These are rough equivalents to the `DataView` methods, but can be
called with any kind of array buffer or array buffer view. Internally,
they (weakly) remember a `DataView` instance for each buffer and use
that for accessing values (to ensure correct endianness behaviour).

17 months agoAdd arrayBufferSlice to binary.js
Lady [Mon, 26 Jun 2023 02:18:53 +0000 (19:18 -0700)]
Add arrayBufferSlice to binary.js

17 months agoSupport SharedArrayBuffer; drop isDataView
Lady [Mon, 26 Jun 2023 01:57:06 +0000 (18:57 -0700)]
Support SharedArrayBuffer; drop isDataView

- `SharedArrayBuffer` counts as an array buffer; use
  `isArrayBuffer($) && !isSharedArrayBuffer($)` to detect only
  non‐shared buffers.

- `isDataView` is no longer supported as a separate function; use
  `isArrayBufferView($) && !isTypedArray($)` to detect data views.

17 months agoApply various minor updates to binary.js
Lady [Mon, 26 Jun 2023 01:54:33 +0000 (18:54 -0700)]
Apply various minor updates to binary.js

17 months agoRename is⸺ to is⸺Object in object.js
Lady [Sun, 25 Jun 2023 05:54:54 +0000 (22:54 -0700)]
Rename is⸺ to is⸺Object in object.js

17 months agoApply various minor formatting changes
Lady [Sun, 25 Jun 2023 05:25:22 +0000 (22:25 -0700)]
Apply various minor formatting changes

17 months agoRename to{I∣Ui}ntN to to{S∣Uns}ignedIntegralNumeric
Lady [Sun, 25 Jun 2023 05:19:23 +0000 (22:19 -0700)]
Rename to{I∣Ui}ntN to to{S∣Uns}ignedIntegralNumeric

“int·N” and “u·int·N” are not really ♓🌟 Piscēs terms.

17 months agoFix linting errors in string.*
Lady [Sun, 25 Jun 2023 00:09:30 +0000 (17:09 -0700)]
Fix linting errors in string.*

17 months agoExport welknown symbols from value.js and use them
Lady [Sun, 25 Jun 2023 00:06:14 +0000 (17:06 -0700)]
Export welknown symbols from value.js and use them

This commit changes function.js to depend on value.js and not the other
way around.

17 months agoUse === more frequently in binary.js
Lady [Sat, 24 Jun 2023 23:54:50 +0000 (16:54 -0700)]
Use === more frequently in binary.js

The convention is to use `===` in situations where type·casting is
known not occur.

17 months agoAdd various is⸺ functions to binary.js
Lady [Sat, 24 Jun 2023 23:47:06 +0000 (16:47 -0700)]
Add various is⸺ functions to binary.js

17 months agoAdd isArrayBufferView & toArrayBuffer to binary.js
Lady [Sat, 24 Jun 2023 04:32:04 +0000 (21:32 -0700)]
Add isArrayBufferView & toArrayBuffer to binary.js

This also removes a previous less‐than‐ideal dependency on `instanceof`
when converting arguments to array buffers for base⸺ conversions.

17 months agoFix permissions of binary.test.js
Lady [Sat, 24 Jun 2023 03:23:12 +0000 (20:23 -0700)]
Fix permissions of binary.test.js

For some reason this file had execute permissions, which are wholly
unnecessary.

18 months agoMake base32 handling less forgiving 0.3.1
Lady [Mon, 22 May 2023 02:50:19 +0000 (19:50 -0700)]
Make base32 handling less forgiving

Ordinarily, one only encounters base32 strings of length 0, 2, 4, 5, or
7 characters (mod 8). If it is of length 3 or 6, the final character is
in the middle of an incomplete byte. As with length 1, this should
probably throw an error, as the other alternative is to entirely ignore
the character.

(It already did throw an error before this change, but
unintentionally.)

18 months agoAdd ::flags override to Matcher 0.3.0
Lady [Sat, 20 May 2023 01:05:32 +0000 (18:05 -0700)]
Add ::flags override to Matcher

Otherwise this code will break if new flags are added but not supported
by ♓🌟 Piscēs.

18 months agoUse strict equals in Matcher constraint tests
Lady [Sat, 20 May 2023 01:05:27 +0000 (18:05 -0700)]
Use strict equals in Matcher constraint tests

Otherwise Deno will see Matcher is a RegExp and cast to a string.

18 months agoAdd base32 support to binary.js
Lady [Sat, 20 May 2023 01:05:19 +0000 (18:05 -0700)]
Add base32 support to binary.js

Includes both the RFC base32 definition and the “W·R·M·G” definition by
Douglas Crockford.

18 months agoAdd base16 support to binary.js
Lady [Sat, 20 May 2023 01:05:02 +0000 (18:05 -0700)]
Add base16 support to binary.js

Just iterating over the bytes and doing `$.toString(16).toUpperCase()`
or `parseInt($, 16)` might actually be faster, but I kind of like using
an actual algorithm to ensure parity with base64 ⁊·c processing.

18 months agoFix base64 implementation
Lady [Fri, 19 May 2023 07:20:39 +0000 (00:20 -0700)]
Fix base64 implementation

I believe that the old implementation was just wrong, and it simply
wasn’t caught because Deno’s `assertEquals` doesn’t actually know what
to do with raw buffers. Wrapping them to build typed arrays creates
working tests, and this implementation matches observed behaviour with
`atob` and `btoa`.

18 months agoRemove irregular whitespace
Lady [Sun, 25 Sep 2022 07:52:56 +0000 (00:52 -0700)]
Remove irregular whitespace

18 months agoPolish object.js a little
Lady [Sun, 25 Sep 2022 07:48:49 +0000 (00:48 -0700)]
Polish object.js a little

18 months agoPolish binary.js a little bit.
Lady [Sun, 25 Sep 2022 07:24:35 +0000 (00:24 -0700)]
Polish binary.js a little bit.

Internal functions now have some code documentation, and the runtime
dependency on arrays being iterable (for splatting arguments) was
removed.

18 months agoRename base64.js to binary.js; reorganize contents
Lady [Sun, 25 Sep 2022 07:00:10 +0000 (00:00 -0700)]
Rename base64.js to binary.js; reorganize contents

`atob` and `btoa` now have the much clearer names `base64Binary` and
`base64String`; filename‐safe equivalents have been added.

The intention is to add the base16 and base32 formats from R·F·C 3548
as well, although that work is still forthcoming.

18 months agoAdd to⸺Notation functions to numeric.js
Lady [Tue, 20 Sep 2022 03:39:11 +0000 (20:39 -0700)]
Add to⸺Notation functions to numeric.js

The default Number::toString method provides a result which is
difficult to parse. Number::toExponential and Number::toFixed are
better; they are now provided via toExponentialNotation and
toFixedDecimalNotation. Support for big·ints has been added as well.

18 months agotoIntegerOrInfinity 🔜 toIntegralNumberOrInfinity
Lady [Tue, 20 Sep 2022 03:34:38 +0000 (20:34 -0700)]
toIntegerOrInfinity 🔜 toIntegralNumberOrInfinity

This new name is clearer, especially as this function now accepts
big·int arguments.

18 months agoAdd toIntegralNumber to numeric.js 0.2.0
Lady [Mon, 19 Sep 2022 02:31:02 +0000 (19:31 -0700)]
Add toIntegralNumber to numeric.js

Also allow big·int arguments in toIntegerOrInfinity.

18 months agoAdd POSITIVE_ZERO and NEGATIVE_ZERO to numeric.js
Lady [Sun, 18 Sep 2022 22:02:31 +0000 (15:02 -0700)]
Add POSITIVE_ZERO and NEGATIVE_ZERO to numeric.js

18 months agoProvide fake external constructor for Matcher
Lady [Thu, 8 Sep 2022 05:20:46 +0000 (22:20 -0700)]
Provide fake external constructor for Matcher

Classes which depend on identity for behaviours should not be exposed
because this inheritance can be modified at runtime. This commit
provides a fake Matcher constructor which simply calls the real one.

This has a side‐effect of reducing the amount of prototype modification
which this class setup entailed, at the cost of needing to manually
redefine all the properties from the internal Matcher constructor
prototype onto the external one.

18 months agoPass exec result to constraint in Matcher
Lady [Thu, 8 Sep 2022 04:14:53 +0000 (21:14 -0700)]
Pass exec result to constraint in Matcher

18 months agoAdd support for constraints to Matcher 0.1.4
Lady [Thu, 8 Sep 2022 03:17:51 +0000 (20:17 -0700)]
Add support for constraints to Matcher

18 months agoMake toIntN & toUintN more accommodating
Lady [Thu, 8 Sep 2022 02:13:16 +0000 (19:13 -0700)]
Make toIntN & toUintN more accommodating

These used to not handle non‐integers well, and now do gracefully.

18 months agoTreat object function args more consistently 0.1.3
Lady [Sun, 4 Sep 2022 21:47:15 +0000 (14:47 -0700)]
Treat object function args more consistently

Functions like getOwnPropertyKeys now do not require that their
arguments are objects, but *do* require that they are not null or
undefined. Similarly, toObject now throws for null and undefined
values, rather than returning an empty object. Use `toObject($ ?? {})`
if you need the old behaviour.

18 months agoAdd toString to string.js
Lady [Sun, 4 Sep 2022 21:19:38 +0000 (14:19 -0700)]
Add toString to string.js

Also properly casts some arguments of string functions to strings.

18 months agoAdd toIntegerOrInfinity to numeric.js
Lady [Sun, 4 Sep 2022 21:15:36 +0000 (14:15 -0700)]
Add toIntegerOrInfinity to numeric.js

18 months agoAdd LazyLoader class 0.1.2
Lady [Sat, 23 Jul 2022 23:13:27 +0000 (16:13 -0700)]
Add LazyLoader class

18 months agoAdd isArraylikeObject 0.1.1
Lady [Sat, 23 Jul 2022 19:20:43 +0000 (12:20 -0700)]
Add isArraylikeObject

Also renames lengthOfArrayLike 🔜 lengthOfArraylike.

18 months agoUpdate README 0.1.0
Lady [Sat, 23 Jul 2022 08:37:18 +0000 (01:37 -0700)]
Update README

18 months agoRefactor base64; remove runtime dependencies
Lady [Sat, 23 Jul 2022 08:17:12 +0000 (01:17 -0700)]
Refactor base64; remove runtime dependencies

18 months agoRefactor iri; remove runtime dependencies
Lady [Sat, 23 Jul 2022 07:19:58 +0000 (00:19 -0700)]
Refactor iri; remove runtime dependencies

18 months agoAdd Matcher class for whole‐string matching
Lady [Sat, 23 Jul 2022 04:27:35 +0000 (21:27 -0700)]
Add Matcher class for whole‐string matching

18 months agoAdd arraylike functions and collection unit tests
Lady [Sat, 23 Jul 2022 02:42:47 +0000 (19:42 -0700)]
Add arraylike functions and collection unit tests

18 months agoAdd string functions and unit tests
Lady [Fri, 22 Jul 2022 02:47:55 +0000 (19:47 -0700)]
Add string functions and unit tests

18 months agoAdd numeric functions and unit tests
Lady [Sun, 17 Jul 2022 22:18:57 +0000 (15:18 -0700)]
Add numeric functions and unit tests

18 months agoRemove dependencies of function.js; add tests
Lady [Sun, 17 Jul 2022 17:52:45 +0000 (10:52 -0700)]
Remove dependencies of function.js; add tests

- No longer depends on mutable runtime bindings or other modules

- Unit tests for all function exports

18 months agoSplit some object code into value and unit test
Lady [Sun, 17 Jul 2022 20:45:08 +0000 (13:45 -0700)]
Split some object code into value and unit test

Also adds tests for module exports.

18 months agoBasic functions for object & function manipulation
Lady [Sat, 9 Jul 2022 23:02:22 +0000 (16:02 -0700)]
Basic functions for object & function manipulation

18 months agoAdd string functions
Lady [Sat, 4 Jun 2022 23:12:17 +0000 (16:12 -0700)]
Add string functions

18 months agoL·E·I·R·I support
Lady [Sat, 21 May 2022 01:09:20 +0000 (18:09 -0700)]
L·E·I·R·I support

18 months agoMore comprehensive support for RFC 3986 & RFC 3987
Lady [Tue, 17 May 2022 03:57:40 +0000 (20:57 -0700)]
More comprehensive support for RFC 3986 & RFC 3987

18 months agoPropertyDescriptor and frozenCopy
Lady [Sat, 30 Apr 2022 01:18:02 +0000 (18:18 -0700)]
PropertyDescriptor and frozenCopy

18 months agotoPrimitive and toPropertyKey
Lady [Thu, 28 Apr 2022 00:56:34 +0000 (17:56 -0700)]
toPrimitive and toPropertyKey

18 months agoInitial codes
Lady [Sat, 29 May 2021 20:37:16 +0000 (13:37 -0700)]
Initial codes

Most of this was taken from الرشآء.

This page took 0.052683 seconds and 4 git commands to generate.