You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(.venv) asp@huge-dog nada % nada buildBuilding program: mainError: 0: Traceback (most recent call last): File "/Users/asp/dev/nil/.venv/lib/python3.13/site-packages/nada_dsl/compile.py", line 98, in <module> output = compile_script(sys.argv[1]) File "/Users/asp/dev/nil/.venv/lib/python3.13/site-packages/nada_dsl/timer.py", line 118, in wrapper value = func(*args, **kwargs) File "/Users/asp/dev/nil/.venv/lib/python3.13/site-packages/nada_dsl/compile.py", line 49, in compile_script outputs = main() File "/Users/asp/dev/nil/wordle/nada/src/main.py", line 37, in nada_main -g, ^^ TypeError: bad operand type for unary -: 'SecretInteger' 0:Location: tools/nada/src/error.rs:10Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.Run with RUST_BACKTRACE=full to include source snippets.
Integer:
(.venv) asp@huge-dog nada % nada buildBuilding program: mainError: 0: Traceback (most recent call last): File "/Users/asp/dev/nil/.venv/lib/python3.13/site-packages/nada_dsl/compile.py", line 98, in <module> output = compile_script(sys.argv[1]) File "/Users/asp/dev/nil/.venv/lib/python3.13/site-packages/nada_dsl/timer.py", line 118, in wrapper value = func(*args, **kwargs) File "/Users/asp/dev/nil/.venv/lib/python3.13/site-packages/nada_dsl/compile.py", line 49, in compile_script outputs = main() File "/Users/asp/dev/nil/wordle/nada/src/main.py", line 43, in nada_main _ = -Integer(1) ^^^^^^^^^^^ TypeError: bad operand type for unary -: 'Integer' 0:Location: tools/nada/src/error.rs:10Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.Run with RUST_BACKTRACE=full to include source snippets.
Workaround
Multiplying by minus one n * Integer(-1) works.
Suggestions
Trivially implement unary minus in NumericType with
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
SecretInteger
:Integer
:Workaround
Multiplying by minus one
n * Integer(-1)
works.Suggestions
Trivially implement unary minus in
NumericType
withBeta Was this translation helpful? Give feedback.
All reactions