primitive - GNU APL 中无法识别的符号

标签 primitive apl gnu-apl

我正在尝试使用 GNU APL,但我的实验很快就陷入了僵局。 事情是这样的:

x←1 2 3 4 5
⍝ build the matrix u where u_{ij} = x_i + x_j,
⍝ then filter the entries equal to 6
u←6=x∘.+x

到目前为止一切顺利,u 是一个翻转的单位矩阵,正如预期的那样。

现在,我想获取非零条目的索引,所以我尝试

⍸u

但在这里我收到一个SYNTAX ERROR++警告。 输入以下任何命令时都会出现相同的错误:

{⍸6=⍵∘.+⍵}x
{⍸6=⍵∘.+⍵} 1 2 3 4 5
{⍸6=⍵∘.+⍵} ⍳5
app←{⍸6=⍵∘.+⍵}

我怀疑这是我本地安装的问题,因为我无法重现 online interpreter 上的错误。 .

有人以前见过这个问题吗? 我从源代码(ubuntu,GCC)编译APL,该错误出现在版本1.7和1.8中。 我可以使用 GNU 镜像中提供的预编译二进制文件重现该错误。 我想知道我在编译和安装 GNU APL 时是否犯了一个错误,但我做的唯一一个非标准的事情是从 src 文件夹中的 Makefile 中取消设置 WERROR 标志,否则由于未检查的返回值而无法编译来源。

最佳答案

我通过电子邮件发送了[email protected]让某人看一下。这是我得到的回复:

no idea. I am getting this:

      ⍝ build the matrix u where u_{ij} = x_i + x_j,
      ⍝ then filter the entries equal to 6
      u←6=x∘.+x
 
      ⍸u  1 5  2 4  3 3  4 2  5 1

SVN is 18005 aka. 1474 and the related code has not changed für years.

Regarding:

"otherwise it would not compile due to an unchecked return value in the source."

please report this kind of problems to [email protected] with a printout of the compiler's error message. Compilers are becoming increasingly picky about various this which causes code to happily compile for a decade an then out of a sudden raise a warning with a new compiler code.

I have the ambition that GNU APL compiles on almost all platforms and compilers and since I cannot test all platforms on my own it is important that users like you with a different platform inform me about problems.

Best Regards,
[Dr.] Jürgen [Sauermann, the main developer of GNU APL]


根据 GNU APL mailing list 进行编辑:

2020 年 12 月添加了对 的支持 (r1368)。发布的 tarball 没有它;您必须从存储库编译开发版本才能获取它。

请注意,tarball 不是安装 GNU APL 的首选方式。

关于primitive - GNU APL 中无法识别的符号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68035235/

相关文章:

java - Java 是否有统一原始数据类型和对象数据类型的长期计划?如何?

apl - 将函数标识符转换为字符串

apl - 如何在 APL 编译器之间进行选择?

java - 如果我有一组独特的 Longs,如何获得一组独特的整数?

java - 原始数组初始化没有值?

arrays - 将手动 realWorld# 状态传递与任意 Monad 交错是否安全

apl - 在 Dyalog APL 中使用 ⌸ 时如何提供默认值

f# - 我如何在 F# 中执行 APL 中的压缩?

if-statement - APL的If-Else条件?