4 ms·
Having used APL professionally for ten years from the early 80's to early 90's I am a big fan. I used it for a wide range of applications, from business system
by robomartin 7y ago
Having used APL professionally for ten years from the early 80's to early 90's I am a big fan. I used it for a wide range of applications, from business systems to DNA sequencing. I even published a paper at a conference eons ago.
So, yeah, I am an "APL guy". And, yeah, I think it's dead.
Well, not really, but, yes really at the same time.
Let's start with the most glaring issue:
https://www.dyalog.com/prices-and-licences.htm#devlicprice https://www.dyalog.com/prices-and-licences.htm#devlicprice
Yeah, $1,600 USD for a language license? No. Thanks. Go away.
In addition to this:
"In addition to a current Developer Licence, a Run Time Licence is necessary if:"
Yeah, no. Go away.
And then...
"When several users use one or more applications on a shared server, a Server Licence is required."
No. Definitely no. Please, pretty please, with sugar on top...go away.
I could go on. Just have a look at that page and see how you could possibly justify getting into this monster of a business case for your particular business or any other business who's financials you understand.
If you are still interested after that, take a moment to go browse the source here...
Oh, wait. Yeah. No. Go away.
That said, I still do love APL. I love the language, the ideas, what it represents and the superpowers it gives you. It truly enables the creation of computational solutions for complex problems at the speed of thought once you learn to think in APL (which likely takes about a year to fully internalize).
During the 80's I often dreamed of designing a purpose built computational engine (hardware) specifically designed to execute APL commands in one clock cycle. Hey, I was young and stupid. While I was using APL I was also coding embedded systems in C and assembler. I would often wonder "wouldn't it be amazing to be able to execute this APL statement in one clock cycle, like some of these assembler instructions on this tiny little MCU?".
Anyhow, let's end this on a positive note. Here's a list of language improvements I authored a long time ago. This list isn't exhaustive (it was a five minute stream of consciousness exercise). Also, some of what's on this list might already exist in modern variants of the language. Feel free to criticize, no problem, and comment. Understand I am issuing advance notice that this is not a perfect list or even a current one.
APL should go FOSS or adoption will forever be limited to esoteric high-ROI
applications where it might make sense or legacy APL code already exists.
The option for compilation would be very interesting.
Within a function, variables are global by default. Huge pain in the ass.
Objects. Yet be careful to avoid the mess OOP can (and often does) become.
A language-defined interface to C (or some other suitable language) for
when you need to speed things up.
Inline C or Python, or both, as a first class citizen. Make it first
hybrid high level language.
An extension to nested arrays that allows you to create C-like structures.
I am going after the self-documenting nature of having structure members
have name-based access.
An extension to function definition to allow for more than two arguments.
This would require a little language re-thinking.
I would also look into making a hybrid that includes some C-like syntax
with an APL core. C/C++ -like comments and conditionals with bracketed
groupings of APL code would go far in making code easier to read and
organize.
Native C-like switch() primitive with APL-inspired extensions. For example,
switch could take a vector argument.
APL-run-time-definable comparison operator. Sometimes I want to apply a complex
evaluation function to data rather than the simple equal, not equal, grater/less
than, etc. operators.
The ability to enforce data types if desired.
A means of telling the compiler/interpreter to optimize code
--at the statement level-- for speed or resource (memory footprint) and
other criteria. Certain operations can explode into huge multidimensional
memory-sucking arrays which isn't always the best idea.
Real-time extensions integrated into the language.
Ability to use and request GPU resources for computation.
Ability to use and request CPU cores for computation.
A simple-minded example of the above two would be wrapping a code
section with "CPUn{}" or "GPUn{}, where "n" is the core or GPU number.
Standard interface for custom hardware-based acceleration (read: custom
FPGA boards). FPGA's are amazing, make them first class cititzens.
True binary vectors and arrays.
More flexibility in multidimensional array indexing.
A rethinking of the workspace model to better support multi-developer
environments.
Genetic and Evolutionary computing primitives built into the language.
Neural Network primitives built into the language.
Language native image processing (think OpenCV integrated right into the language as a first class citizen)
Same with NumPy. APL should be able to do all of this and more.
Built in primitives for multi-threaded/multitasked computing.
Built in primitives for network access and processing.
Built in primitives for multi-core and distributed computing.
Built-in primitives for data exchange. For example, ingest or output
nested array data from/to JSON, SQL, XML or other modern data formats.
Better pattern-matching primitives. I'm thinking at least regular
expressions.
A general cleanup of the notation to remove lame text-based "fixes"
from an era when rendering non-ascii characters required custom ROMs
on the graphics card. All APL notation should be symbolic. ASCII
should be limited to strings, function, variable, object and other
constructs that require text. I'm talking about a lot of the quad
stuff, etc.
Make it open source and make the open source version far superior to
any available commercial version.
I'll end with a slightly edited portion of one of my HN posts from about seven years ago:
One of the reasons I abandoned languages such as APL, Forth and LISP, languages that I used extensively for many, many years is that they became less and less practical and relevant.
I can apply C to nearly everything from embedded to workstations/servers and even in modern hybrids where FPGA's are integrated with capable microprocessors. I can hire people, even entire teams, both locally and around the world to work on anything from embedded to web projects in many of the the C-like languages. Trying to do the same with APL, Forth or LISP is very close to impossible (and the quality and capability choices you have are much reduced).
On the hardware front languages like Verilog are very reminiscent of C and, as long as you understand that you are actually describing hardware and not writing software, are easy to pick-up with the appropriate background.
You move up to languages such as C++ and other layers open up. PHP, Python, Objective-C when I absolutely must and Java if I have no choice.
All of these are very flexible and relevant tools that have, for the most part remained relevant and useful for years. This range of applicability will never be achieved with something like APL.
If an APL-like language is going to come to the forefront it will be for very specialized applications where it makes sense. It will not be to run a shopping cart on a website or control a servo on a robot. That's just reality.
I love APL. I devoted a huge chunk of my professional life to it. I can't see using it or the wanna-be variants for anything today. Sorry.
- deleted 7y ago[deleted]
- gandercrews 7y agoI tend to agree with your broader points. In my personal life I often reach for APL to do ad-hoc data analysis. It has grown on me in the last year and has fundamentally changed how I perceive and write code. However, I don't think I could introduce it to a company. For specific points, I would love to see an APL dialect that adopts parts of J, K & haskell. Something that retains the symbolic notation, that provides a deeper & more fluid interface to asm/C, adds some ALGOL-like control-flow constructs, and takes advantage of the intervening decades of programming theory. APL to me is an alternate history of what programming could have been. Its not perfect by any means, but it boldly challenges assumptions about what it means to communicate mathematical thought. It was ahead of its time, and its unfortunate its taken this long for languages to superficially adopt its insights. PS: gnu apl is a great FOSS implementation that is enjoyable to use and rich in features.
- deleted 7y ago[deleted]
- abrudz 7y ago> Having used APL professionally for ten years from the early 80's to early 90's That might be part of problem. Things have happened since then: Dyalog has made the full product available for free, only asking for 2% of any profit you make once you cross a certain threshold. Open-sourcing the interpreter is under consideration. Dyalog has a built-in compiler. Dyalog's new function form, dfns, has variables local by default. Dyalog has fully integrated C#-style OO system. Dyalog has ⎕NA for seamlessly calling C functions as if they were APL functions. Names Associated (⎕NA) C functions can be called inline Dyalog namespaces are objects that are not class-based, but with named members Dyalog's tradfns allow name-lists for multiple required arguments (and results) True, there are no multi-line comments in any APL yet, but Dyalog allows writing {condition : result if true ⋄ result if false} Dyalog has :Select which is similar to switch but allows case-lists. I'm not sure what you mean by "APL-run-time-definable comparison operator", but any function can be used in place of the built-in ones. (This wasn't always the case, but certainly is now. It is quite easy to check for the data type of given input, e.g. using the Data Representation function (⎕DR). Putting the statement in a named function allows you to compile it separately from the surrounding code. Right, no real-time extensions integrated into the language. The co-dfns library allows you to offload computations to the GPU. Dyalog's 1111⌶ allows you to select how many cores to use. Right, no built-in interface for custom hardware-based acceleration Dyalog's binary arrays use true bit-binary representation. Dyalog's at operator @ and the index function ⌷ combined with the rank operator ⍤ provide full control over and flexibility in multidimensional array indexing. Dyalog has supported SCM monitored text files for many years, and the built-in tools are only getting better and better. Not sure what you have in mind with regards "Genetic and Evolutionary computing primitives built into the language." The stencil operator ⌺ is a Neural Network/Cellular Automaton primitive built into the language. Dyalog has some native support for image manipulation, has various libraries too, and deep integration with .NET. Much of NumPy is of course APL breakfast, and there are math libraries for certain other things. In the worst case, use PynAPL to call Python. Dyalog has the spawn operator & for multi-threaded/multitasked computing. I'm not sure network access and processing would be suitable as primitives with glyphs, but Dyalog's Conga library provides this, and may well get further integrated into the interpreter in the future. Dyalog's multi-core and distributed computing primitives are currently accessed with cover functions, but the ¤ and ∥ symbols have been reserved already. Built-in primitives for data exchange? ⎕JSON, SQAPL, and ⎕XML etc. Dyalog's ⎕R and ⎕S provide Perl-compatible regular expressions. I'm not so sure all quad names should have symbols. Many of them have related or prefixed names, e.g. ⎕Nxyz for file functions and ⎕Txyz for thread-handling. That said, plenty of new Unicode symbols have been added lately.