Releases: aiken-lang/stdlib
v2.2.0
Added
aiken/cbor.{deserialise}
: to recoverData
from CBOR bytes. @KtorZaiken/collection/pairs.{insert_with_by_ascending_key}
: for inserting in pairs while specifying how to combine values on key conflict. @ariady-putra
Changed
- Various documentation fixes. (@Cryptonean, @waalge, @Micrograx)
Removed
- N/A
v2.1.0
Added
-
Various new helper functions:
aiken/collection/list.{for_each}
: for performing many side-effects.aiken/collection/dict.{pop}
: for accessing and removing a value from a dictionnary in a single op.aiken/primitive/bytearray.{starts_with}
: for matching bytearray prefixes.aiken/primitive/math/rational.{pow}
: for computing (int) powers of rational numbers.cardano/assets.{match}
: efficiently compare two value-like.cardano/assets.{restricted_to}
: extracting value subsets from parent value.
-
Comparison functions for various Cardano types:
cardano/address/credential.{compare}
: for ordering credentials.cardano/governance/voter.{compare}
: for ordering voters.cardano/transaction/output_reference.{compare}
: for ordering output references.cardano/transaction/script_purpose.{compare}
: for ordering script purpose.
-
New BLS12-381 crypto modules:
Changed
- N/A
Removed
- N/A
Contributors
@KtorZ, @perturbing, @Newt6611, @adrian052, @logicalmechanism, @nemo83
v2.0.0
Note
Significant performance improvements (mostly on CPU) across all boards mostly due to the integration of Plutus V3.
see benchmarks
test | cpu | mem |
---|---|---|
aiken/cbor.{serialise_1} | -38.20% | ±0.00% |
aiken/cbor.{serialise_2} | -38.20% | ±0.00% |
aiken/cbor.{serialise_3} | -37.25% | ±0.00% |
aiken/cbor.{serialise_4} | -41.95% | ±0.00% |
aiken/cbor.{serialise_5} | -42.77% | ±0.00% |
aiken/cbor.{serialise_6} | -42.63% | ±0.00% |
aiken/cbor.{serialise_7} | -40.51% | ±0.00% |
aiken/cbor.{serialise_8} | -37.25% | ±0.00% |
aiken/cbor.{serialise_9} | -41.95% | ±0.00% |
aiken/cbor.{diagnostic_1} | -47.62% | -4.35% |
aiken/cbor.{diagnostic_2} | -45.16% | -2.87% |
aiken/cbor.{diagnostic_3} | -43.32% | -13.33% |
aiken/cbor.{diagnostic_4} | -38.28% | -8.03% |
aiken/cbor.{diagnostic_5} | -44.15% | -14.59% |
aiken/cbor.{diagnostic_6} | -42.77% | -12.21% |
aiken/cbor.{diagnostic_7} | -43.87% | -16.87% |
aiken/cbor.{diagnostic_7_alt} | -42.99% | -11.56% |
aiken/cbor.{diagnostic_8} | -46.00% | -10.23% |
aiken/cbor.{diagnostic_9} | -42.81% | -2.81% |
aiken/cbor.{diagnostic_10} | -38.28% | -8.03% |
aiken/cbor.{diagnostic_10_alt} | -38.43% | -8.03% |
aiken/cbor.{diagnostic_11} | -44.00% | -8.51% |
aiken/cbor.{diagnostic_12} | -45.65% | -11.56% |
aiken/cbor.{diagnostic_13} | -44.44% | -9.34% |
aiken/cbor.{diagnostic_14} | -43.59% | -19.77% |
aiken/cbor.{diagnostic_15} | -46.50% | -3.67% |
aiken/cbor.{diagnostic_16} | -41.89% | -13.41% |
aiken/collection/dict.{bench_from_ascending_pairs} | -20.48% | ±0.00% |
aiken/collection/dict.{from_list_1} | -20.16% | ±0.00% |
aiken/collection/dict.{from_list_2} | -18.28% | ±0.00% |
aiken/collection/dict.{from_list_3} | -17.83% | ±0.00% |
aiken/collection/dict.{from_list_4} | -18.97% | ±0.00% |
aiken/collection/dict.{bench_from_pairs} | -25.28% | ±0.00% |
aiken/collection/dict.{find_1} | -20.63% | ±0.00% |
aiken/collection/dict.{find_2} | -20.43% | ±0.00% |
aiken/collection/dict.{find_3} | -22.03% | ±0.00% |
aiken/collection/dict.{find_4} | -22.53% | ±0.00% |
aiken/collection/dict.{get_1} | -20.63% | ±0.00% |
aiken/collection/dict.{get_2} | -22.72% | ±0.00% |
aiken/collection/dict.{get_3} | -23.26% | ±0.00% |
aiken/collection/dict.{get_4} | -26.91% | ±0.00% |
aiken/collection/dict.{get_5} | -26.30% | ±0.00% |
aiken/collection/dict.{has_key_1} | -28.07% | ±0.00% |
aiken/collection/dict.{has_key_2} | -30.77% | ±0.00% |
aiken/collection/dict.{has_key_3} | -30.22% | ±0.00% |
aiken/collection/dict.{has_key_4} | -27.25% | ±0.00% |
aiken/collection/dict.{is_empty_1} | -27.86% | ±0.00% |
aiken/collection/dict.{keys_1} | -20.30% | ±0.00% |
aiken/collection/dict.{keys_2} | -17.48% | ±0.00% |
aiken/collection/dict.{size_1} | -37.90% | ±0.00% |
aiken/collection/dict.{size_2} | -32.34% | ±0.00% |
aiken/collection/dict.{size_3} | -27.97% | ±0.00% |
aiken/collection/dict.{values_1} | -20.30% | ±0.00% |
aiken/collection/dict.{values_2} | -17.58% | ±0.00% |
aiken/collection/dict.{delete_1} | -20.16% | ±0.00% |
aiken/collection/dict.{delete_2} | -24.29% | ±0.00% |
aiken/collection/dict.{delete_3} | -21.03% | ±0.00% |
aiken/collection/dict.{delete_4} | -25.03% | ±0.00% |
aiken/collection/dict.{delete_5} | -27.22% | ±0.00% |
aiken/collection/dict.{delete_6} | -25.83% | ±0.00% |
aiken/collection/dict.{filter_1} | -20.16% | ±0.00% |
aiken/collection/dict.{filter_2} | -19.61% | ±0.00% |
aiken/collection/dict.{filter_3} | -20.15% | ±0.00% |
aiken/collection/dict.{insert_1} | -22.83% | ±0.00% |
aiken/collection/dict.{insert_2} | -21.77% | ±0.00% |
aiken/collection/dict.{insert_with_1} | -17.21% | ±0.00% |
aiken/collection/dict.{insert_with_2} | -22.66% | ±0.00% |
aiken/collection/dict.{insert_with_3} | -25.81% | ±0.00% |
aiken/collection/dict.{map_1} | -19.56% | ±0.00% |
aiken/collection/dict.{map_2} | -23.66% | ±0.00% |
aiken/collection/dict.{union_1} | -17.91% | ±0.00% |
aiken/collection/dict.{union_2} | -8.67% | ±0.00% |
aiken/collection/dict.{union_3} | -22.82% | ±0.00% |
aiken/collection/dict.{union_4} | -22.77% | ±0.00% |
aiken/collection/dict.{union_with_1} | -22.90% | ±0.00% |
aiken/collection/dict.{fold_1} | -35.94% | ±0.00% |
aiken/collection/dict.{fold_2} | -22.31% | ±0.00% |
aiken/collection/dict.{foldr_1} | -36.21% | ±0.00% |
aiken/collection/dict.{foldr_2} | -21.93% | ±0.00% |
aiken/collection/dict.{to_list_1} | -98.69% | -66.72% |
aiken/collection/dict.{to_list_2} | -98.91% | -66.72% |
aiken/collection/list.{push_1} | -8.02% | ±0.00% |
aiken/collection/list.{push_2} | 1.25% | ±0.00% |
aiken/collection/list.{range_1} | -27.77% | ±0.00% |
aiken/collection/list.{range_2} | -27.39% | ±0.00% |
aiken/collection/list.{repeat_1} | -23.72% | ±0.00% |
aiken/collection/list.{repeat_2} | -27.96% | ±0.00% |
aiken/collection/list.{all_1} | -28.36% | ±0.00% |
aiken/collection/list.{all_2} | -27.59% | ±0.00% |
aiken/collection/list.{all_3} | -27.94% | ±0.00% |
aiken/collection/list.{any_1} | -28.23% | ±0.00% |
aiken/collection/list.{any_2} | -28.09% | ±0.00% |
aiken/collection/list.{any_3} | -26.95% | ±0.00% |
aiken/collection/list.{at_1} | -27.60% | ±0.00% |
aiken/collection/list.{at_2} | -19.96% | ±0.00% |
aiken/collection/list.{at_3} | -27.60% | ±0.00% |
aiken/collection/list.{at_4} | -20.77% | ±0.00% |
aiken/collection/list.{at_5} | -25.75% | ±0.00% |
aiken/collection/list.{count_empty} | -36.83% | ±0.00% |
aiken/collection/list.{count_all} | -32.37% | ±0.00% |
aiken/collection/list.{count_some} | -31.73% | ±0.00% |
aiken/collection/list.{count_none} | -30.44% | ±0.00% |
aiken/collection/list.{find_1} | -20.59% | ±0.00% |
aiken/collection/list.{find_2} | -25.53% | ±0.00% |
aiken/collection/list.{find_3} | -19.64% | ±0.00% |
aiken/collection/list.{has_1} | -27.88% | ±0.00% |
aiken/collection/list.{has_2} | -27.69% | ±0.00% |
aiken/collection/list.{has_3} | -26.95% | ±0.00% |
aiken/collection/list.{head_1} | -14.03% | ±0.00% |
aiken/collection/list.{head_2} | -16.90% | ±0.00% |
aiken/collection/list.{is_empty_1} | -26.48% | ±0.00% |
aiken/collection/list.{is_empty_2} | -25.35% | ±0.00% |
aiken/collection/list.{index_of_1} | -25.62% | ±0.00% |
aiken/collection/list.{index_of_2} | -27.52% | ±0.00% |
aiken/collection/list.{index_of_3} | -26.65% | ±0.00% |
aiken/collection/list.{index_of_4} | -19.96% | ±0.00% |
aiken/collection/list.{last_1} | -19.18% | ±0.00% |
aiken/collection/list.{last_2} | -16.26% | ±0.00% |
aiken/collection/list.{last_3} | -17.13% | ±0.00% |
aiken/collection/list.{length_1} | -37.90% | ±0.00% |
aiken/collection/list.{length_2} | -30.89% | ±0.00% |
aiken/collection/list.{delete_1} | -20.20% | ±0.00% |
aiken/collection/list.{delete_2} | -15.02% | ±0.00% |
aiken/collection/list.{delete_3} | -20.55% | ±0.00% |
aiken/collection/list.{delete_4} | -22.46% | ±0.00% |
aiken/collection/list.{drop_1} | -24.62% | ±0.00% |
aiken/collection/list.{drop_2} | -28.08% | ±0.00% |
aiken/collection/list.{drop_while_1} | -19.79% | ±0.00% |
aiken/collection/list.{drop_while_2} | -22.25% | ±0.00% |
aiken/collection/list.{drop_while_3} | 0.86% | ±0.00% |
aiken/collection/list.{drop_while_4} | -27.26% | ±0.00% |
aiken/collection/list.{filter_1} | -20.20% | ±0.00% |
aiken/collection/list.{filt... |
1.9.0
compiler compatiblity |
---|
>= v1.0.28-alpha |
Added
- A new module
aiken/pairs
to work with associative lists (a.k.a.Pairs
). (@KtorZ, @MicroProofs) - A new function
minted_to_dict
akin toto_dict
to turningMintedValue
toDict
. (@dmitrystas)
Changed
Warning
BREAKING-CHANGE
Specialized all Dict
's key to ByteArray
, and thus remove the need for passing an extra comparison function in many functions. Dict
are however still specialized with a phantom type for keys.
Warning
BREAKING-CHANGE
Few functions from Dict
have been renamed for consistency:
from_list
->from_pairs
from_ascending_list
->from_ascending_pairs
to_list
->to_pairs
Removed
N/A
Full Changelog
1.8.0
compiler compatiblity |
---|
< v1.0.28-alpha |
>= v1.0.25-alpha |
Added
-
value.reduce
to efficiently fold over a value and its elements. @micahkendall -
value.from_asset_list
to turn an asset list into a Value while enforcing invariants expected ofValue
. @MicroProofs @KtorZ -
math.is_sqrt
as a more efficient alternative tosqrt
. @francolq
Changed
- Disclaimers in documentation to
bytearray.to_string
andstring.from_bytearray
regarding UTF-8 encoding. @KtorZ
Removed
N/A
1.7.0
Added
list.index_of
: For getting a values index in a list.transaction.placeholder
: For constructing test transactions.transaction.value.is_zero
: For checking whether a value is null.
Changed
value.to_minted_value
now correctly preserves the invariant ofMintedValue
: it always contain a null quantity of Ada.
1.6.0
1.5.0
1.4.0
1.3.0
Added
math.sqrt
: For calculating integer square roots using a quadratically convergent method @KtorZ, @logicalmechanismmath/rational.numerator
&math/rational.denominator
: For accessing parts of a rational value. @KtorZ, @micahkendallmath/rational.arithmetic_mean
: For computing arithmetic mean of rational values. @KtorZmath/rational.geometric_mean
: For computing geometric mean of two rational values. @logicalmechanism
Changed
-
Clear empty asset lists in
Value
on various operations. Before that fix, it could happen that removing all assets from a given policy would lead to an empty dictionary of assets still be present in theValue
. @logicalmechanism -
Fixed few examples in the documentation. @ariady-putra
Removed
N/A