原始函数序列的 Dyalog SALT.Load 异常 "could not fix"
Dyalog SALT.Load exceptions "could not fix" for raw function trains
我一直在试验 SALT
,但遇到了一致的 Load
问题,这些问题似乎只影响原始函数序列。我希望得到有关确保所有功能 Load
正确的任何建议。
为了说明,在一个清晰的工作区中,我将创建一些用于转换十六进制和八进制的示例函数。有些是 dfns,有些是原始火车:
FromOct←8⊥⊢
ToOct←(FromOct⍣¯1)
FromHex←{16⊥⍵}
ToHex←{((16⊥⊢)⍣¯1)⍵}
HexToOct←ToOct FromHex
初始盐状态:
⎕SE.SALT.List '/path/to/salt'
Type Name Versions Size Last Update
然后Snap
工作区:
⎕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
并检查 load_ws
函数正在导入什么:
⎕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
在一个干净的工作区中,运行 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"
dfns 加载正常,列车失败。
一个现成的解决方法是用 tradfns 或 dfns 包装,但这是非常不可取的。
有没有想过让 SALT 正确加载这些函数?
谢谢
根据the current SALT User Guide:
Nameclasses 3.3 (primitive or derived function) and 4.3 (primitive or derived operator) cannot be manipulated using SALT – attempting to do so can result in a loss of data.
如, Dyalog Ltd. recommends transitioning from SALT to Link, especially when using Dyalog APL version 18.1, due to be released in the upcoming months. However, note that even Link does not currently handle tacit functions所述:
Functions, operators and namespaces without text source (⎕NC
of 3.3 or 4.3, namely derived functions/operators, trains and named primitives), are not supported.
与 SALT 不同,SALT 未计划接收任何主要功能添加,这 可能会在不久的将来发生变化。
虽然手动将默认函数包装在 tradfns 中很尴尬,但 “Lazy” library 使这变得轻而易举。
我一直在试验 SALT
,但遇到了一致的 Load
问题,这些问题似乎只影响原始函数序列。我希望得到有关确保所有功能 Load
正确的任何建议。
为了说明,在一个清晰的工作区中,我将创建一些用于转换十六进制和八进制的示例函数。有些是 dfns,有些是原始火车:
FromOct←8⊥⊢
ToOct←(FromOct⍣¯1)
FromHex←{16⊥⍵}
ToHex←{((16⊥⊢)⍣¯1)⍵}
HexToOct←ToOct FromHex
初始盐状态:
⎕SE.SALT.List '/path/to/salt'
Type Name Versions Size Last Update
然后Snap
工作区:
⎕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
并检查 load_ws
函数正在导入什么:
⎕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
在一个干净的工作区中,运行 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"
dfns 加载正常,列车失败。
一个现成的解决方法是用 tradfns 或 dfns 包装,但这是非常不可取的。
有没有想过让 SALT 正确加载这些函数?
谢谢
根据the current SALT User Guide:
Nameclasses 3.3 (primitive or derived function) and 4.3 (primitive or derived operator) cannot be manipulated using SALT – attempting to do so can result in a loss of data.
如
Functions, operators and namespaces without text source (
⎕NC
of 3.3 or 4.3, namely derived functions/operators, trains and named primitives), are not supported.
与 SALT 不同,SALT 未计划接收任何主要功能添加,这 可能会在不久的将来发生变化。
虽然手动将默认函数包装在 tradfns 中很尴尬,但 “Lazy” library 使这变得轻而易举。