Which will output (a bunch of TxReports, followed by):
"foo"
0.3
:foo/bar
12
ff62d552-6569-4d1b-b667-04703041dfc4
2018-01-01 11:00:00 UTC
65544
Note that [(> ?v 0)] matches strings, keywords, and uuids, in addition to the types that seem intentional that it matches (e.g. doubles, longs, instants, and refs -- I'm assuming these are intentional, since a similarly broad < will return those, but not the strings/keywords/uuids).
In fact, it always seems to include the nonsense types, no matter how large I make the second argument to > (I've tried 1.79e308 and 9223372036854775807, at least).
This seems to exhibit itself when comparing if a variable is larger than a constant. For constant values of $k, [(> ?v $k)] and [(>= ?v $k)] both cause the issue, as do [(< $k ?v)] and [(<= $k ?v)]. But not when comparing if a constant is larger than a variable, e.g. [(< ?v $k)], [(<= ?v $k)], [(> $k ?v)] and [(>= $k ?v)] all seem to behave correctly.
It seems like the types returned by the inequality predicates (
>
,>=
,<
,<=
) aren't limited to what is vaguely sensible.To reproduce, you can copy/paste the following into the mentat CLI:
Which will output (a bunch of TxReports, followed by):
Note that
[(> ?v 0)]
matches strings, keywords, and uuids, in addition to the types that seem intentional that it matches (e.g. doubles, longs, instants, and refs -- I'm assuming these are intentional, since a similarly broad<
will return those, but not the strings/keywords/uuids).In fact, it always seems to include the nonsense types, no matter how large I make the second argument to
>
(I've tried1.79e308
and9223372036854775807
, at least).This seems to exhibit itself when comparing if a variable is larger than a constant. For constant values of
$k
,[(> ?v $k)]
and[(>= ?v $k)]
both cause the issue, as do[(< $k ?v)]
and[(<= $k ?v)]
. But not when comparing if a constant is larger than a variable, e.g.[(< ?v $k)]
,[(<= ?v $k)]
,[(> $k ?v)]
and[(>= $k ?v)]
all seem to behave correctly.