Skip to content

Commit

Permalink
Updates name of the default module (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
popematt authored Dec 4, 2024
1 parent c83270f commit edbd108
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit edbd108

Please sign in to comment.