Commit edbd108 1 parent c83270f commit edbd108 Copy full SHA for edbd108
File tree 1 file changed +2
-2
lines changed
conformance/system_macros
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 69
69
// Demonstrations of some interesting things you can do with delta.
70
70
71
71
(ion_1_1 "delta and repeat can be combined to generate"
72
- (mactab $ion_encoding (macro from_x_count_n_by_step (x n step) (.delta (.. (%x) (.repeat (%n) (%step))))))
72
+ (mactab _ (macro from_x_count_n_by_step (x n step) (.delta (.. (%x) (.repeat (%n) (%step))))))
73
73
(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))
74
74
(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))
75
75
(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)))
76
76
77
77
(ion_1_1 "it is possible to create a delta of deltas encoding"
78
78
// See, for example
79
79
// https://www.timescale.com/blog/time-series-compression-algorithms-explained/#delta-of-delta-encoding
80
- (mactab $ion_encoding
80
+ (mactab _
81
81
(macro delta_of_deltas (flex_int::init dod*) (.delta (.. (%init) (.delta (%dod)))))
82
82
(macro rle (flex_uint::run_length flex_int::value) (.repeat (%run_length) (%value))))
83
83
(text "(:delta_of_deltas 52 (:: -1 (:rle 10 0) 1 (:rle 5 0) 1 (:rle 5 0)))")
You can’t perform that action at this time.
0 commit comments