Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates name of the default module #144

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions conformance/system_macros/delta.ion
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@
// Demonstrations of some interesting things you can do with delta.

(ion_1_1 "delta and repeat can be combined to generate"
(mactab $ion_encoding (macro from_x_count_n_by_step (x n step) (.delta (.. (%x) (.repeat (%n) (%step))))))
(mactab _ (macro from_x_count_n_by_step (x n step) (.delta (.. (%x) (.repeat (%n) (%step))))))
(then "an increasing sequence" (text "(:from_x_count_n_by_step 0 10 1)") (produces 0 1 2 3 4 5 6 7 8 9 10))
(then "a count-by-twos sequence" (text "(:from_x_count_n_by_step 0 10 2)") (produces 0 2 4 6 8 10 12 14 16 18 20))
(then "a decreasing sequence" (text "(:from_x_count_n_by_step 5 10 -1)") (produces 5 4 3 2 1 0 -1 -2 -3 -4 -5)))

(ion_1_1 "it is possible to create a delta of deltas encoding"
// See, for example
// https://www.timescale.com/blog/time-series-compression-algorithms-explained/#delta-of-delta-encoding
(mactab $ion_encoding
(mactab _
(macro delta_of_deltas (flex_int::init dod*) (.delta (.. (%init) (.delta (%dod)))))
(macro rle (flex_uint::run_length flex_int::value) (.repeat (%run_length) (%value))))
(text "(:delta_of_deltas 52 (:: -1 (:rle 10 0) 1 (:rle 5 0) 1 (:rle 5 0)))")
Expand Down
Loading