I've been experimenting with SALT
but am encountering consistent Load
problems that seem to only affect raw function-trains. I hoped for any advice on ensuring all functions Load
correctly.
To illustrate, in a clear workspace I'll create some example functions for converting hex and octal. Some are dfns, others are raw trains:
FromOct←8⊥⊢
ToOct←(FromOct⍣¯1)
FromHex←{16⊥⍵}
ToHex←{((16⊥⊢)⍣¯1)⍵}
HexToOct←ToOct FromHex
Initial salt state:
⎕SE.SALT.List '/path/to/salt'
Type Name Versions Size Last Update
Then Snap
the workspace:
⎕SE.SALT.Snap '/path/to/salt -clean -loadfn'
** WARNING: ⎕LX is empty
#.FromHex #.FromOct #.HexToOct #.ToHex #.ToOct
⎕SE.SALT.List '/path/to/salt -type'
Type Name Versions Size Last Update
Fn FromHex 25 2021/05/18 17:08:32
Fn FromOct 25 2021/05/18 17:08:32
Fn HexToOct 46 2021/05/18 17:08:32
Fn ToHex 36 2021/05/18 17:08:32
Fn ToOct 31 2021/05/18 17:08:32
Fn load_ws 537 2021/05/18 17:08:32
And check what the load_ws
function is importing:
⎕CMD 'cat /path/to/salt/load_ws.dyalog | grep "^ Load''"'
Load'"/path/to/salt/FromHex" -target=#' â #.FromHex
Load'"/path/to/salt/FromOct" -target=#' â #.FromOct
Load'"/path/to/salt/HexToOct" -target=#' â #.HexToOct
Load'"/path/to/salt/ToHex" -target=#' â #.ToHex
Load'"/path/to/salt/ToOct" -target=#' â #.ToOct
In a clear workspace, run the load_ws
:
⎕SE.SALT.Load '/path/to/salt/load_ws'
load_ws
*** could not fix "/path/to/salt/FromOct.dyalog"
*** could not fix "/path/to/salt/HexToOct.dyalog"
*** could not fix "/path/to/salt/ToOct.dyalog"
The dfns load fine, the trains fail.
A ready workaround is to wrap with tradfns or dfns, but this is very undesirable.
Any thoughts on getting SALT to Load these kind of functions correctly?
Thanks