XOD 0.25.1 issues

This has been a problem for a while: Select File > Switch Workspace. The window that comes up has an “X” to close it, but it doesn’t work. There is no way to abort switch workspace except to browse to the current workspace and re-select it, or exit XOD.

Shift-left/right labels pin “BYTE”, but it is a number.

There is no automatic casting of byte->number or number->byte (but there is u8-to-number & number-to-u8 as work-around). Was it a conscious decision not to auto-cast or did it just get over-looked?

Hello!

It is by design. Byte is a datum for storing/transferring data in general, whereas the number is a value. There’s no unambiguous way to convert a byte to a number and back: it might be a signed conversion or unsigned:

  • 80h — is it 128.00 or -127.00?

Yeah, that’s a legacy bug. The argument is left with the type number for easier handling of multi-byte numbers where bit carrying matters. However, the implementation is still incorrect as of 0.25.1. Will fix it, thank you.

Created an issue for the shifts: https://github.com/xodio/xod/issues/1510

Seems it would be reasonable to assume BYTE is unsigned and auto-cast. If that is the wrong answer, programmer can add node to force correct casting. I can also understand design decision to not assume since it might create difficult-to-find bugs.

I only noticed these issues because my byte-to-bit library node is broken because there was only type “number” available when I created it & now bitwise-and BYTE pins are incompatible with “number” pins on bit shift nodes and my output pins.