11

I need an APL implementation to test some expressions, do your know which is the best interpreter for the language ?

It would be great if it is free and it runs on Linux.

John Saunders
  • 160,644
  • 26
  • 247
  • 397
lurks
  • 2,576
  • 4
  • 30
  • 39

5 Answers5

15

You can test simple expressions with my APL interpreter, it runs on JavaScript in the browser: http://ngn.github.com/apl/web/index.html

EDIT: I've moved on from APL and now I recommend learning K instead. I made a partial re-implementation of K6 in C at https://codeberg.org/ngn/k/

ngn
  • 7,763
  • 6
  • 26
  • 35
  • Looks great and very intuitive – lurks Jun 15 '11 at 13:35
  • A few issues, but this is pretty good work. :-) – Orbling Jul 03 '11 at 14:03
  • I agree. Way better than tryapl. – primo Dec 13 '12 at 07:35
  • Well, thank you :) A bold statement, considering the fact that behind tryapl runs Dyalog, the best (albeit commercial) APL implementation out there. – ngn Dec 21 '12 at 18:06
  • @ngn, how do I assign a matrix to a variable? Say 2x2 matrix? – Maria Ines Parnisari Apr 22 '13 at 18:40
  • Also, i can't seem to find the division operator.. % doesn't work! – Maria Ines Parnisari Apr 22 '13 at 20:39
  • @l19 You can create a matrix using the "reshape" verb (rho), for instnce: `2 2 ⍴ 11 12 21 22`. Check out the first example. – ngn Apr 23 '13 at 07:33
  • You can assign anything to a variable using the "copula", `←`. Unlike J, APL uses `÷` for division; that's the "obelus" symbol which you can find on calculators. I think Iverson later picked `%` for J because it is the ASCII symbol which most looks like `÷`. By the way, in my project I didn't bother to document the language. If you google around, you can find some decent introductory material on it. – ngn Apr 23 '13 at 07:43
  • 1
    Thanks @ngn! Two things though: your interpreter doesn't have the `÷` on the keyboard, and the inner product of matrices (`+.x`) doesn't work. – Maria Ines Parnisari Apr 23 '13 at 19:17
  • Fixed. It underwent a major rewrite in the past month. Most of it should work, but don't expect it to be 100% complete. – ngn Apr 24 '13 at 16:30
  • @ngn The partitioned enclose(`⊂`) works slightly weirdly, if you go by the [Dyalog Help](http://help.dyalog.com/latest/Content/Language/Primitive%20Functions/Partitioned%20Enclose.htm) – Aditya Sriram Jun 05 '19 at 14:40
8

Try GNU APL. Version 1.0 was released September 27, 2013.

JPaget
  • 969
  • 10
  • 13
5

Also, if you want to try something, why not go to http://tryapl.org ? :) And, finally, Dyalog Ltd. offers free version of their interpreter (the best you can get, IMHO) - which is free for personal, non-commercial use - which sounds like what you do.. And while TryAPL gives you a protected environment in which certain "potentially harmful" statements are not allowed, there is a new service available which gives you a complete sandboxed Dyalog APL environment that can execute scripted commands at https://tio.run/#apl-dyalog

MBaas
  • 7,248
  • 6
  • 44
  • 61
2

Try APLX for Linux (Personal Edition) Version 1.1 from MicroAPL.

AAsk
  • 1,431
  • 4
  • 17
  • 25
0

The best for PC are>

APL2 IBM but free only a trial period.

APLX is very good but some different to APL2.seems to be Eternal Life inside APL.