BobMcDear / trap

Autoregressive transformers in APL
MIT License
89 stars 5 forks source link

Usage #1

Closed abrudz closed 1 month ago

abrudz commented 1 month ago
BobMcDear commented 1 month ago

Hello,

Thank you for your feedback. I've addressed the first two points in the latest commit, but the reason ⎕IO←0 was kept outside the namespace is that Co-dfns doesn't support system functions (besides ⎕NC, ⎕SIGNAL, and ⎕DR), so compiling TRANSFORMER wouldn't have been possible were the index origin set therein. However, ⎕IO←0 can be removed altogether, especially since Co-dfns is by default 0-based, and the README would be updated accordingly to specify the indexing. What do you think?

abrudz commented 1 month ago

That could work, but maybe even better is to move the actual namespace into APLSource/TRANSFORMER.apln (file names should match contents) and add APLSource/⎕IO.apla containing just 0. This way, one can Link into # with the same effect. This also allows you to include instructions on how to actually import the namespace into one's APL session:

      ]Import # /path/to/APLSource
Imported: # ← /path/to/APLSource

In fact, one can launch directly from the shell with dyalog LOAD=/path/to/APLSource and it'll auto-Link to #.

BobMcDear commented 1 month ago

I see, that makes sense. I'll make these changes and release the commit later today.

BobMcDear commented 1 month ago

I've done as you recommended. Please let me know if you have any other related suggestions, and we can reopen this issue if need be.