3 ms·
I'll look up the language. I never spent any time on it. I have to say that I am somewhat of a purist when it comes to the idea (and real power) of notation.
by robomartin 13y ago
I'll look up the language. I never spent any time on it. I have to say that I am somewhat of a purist when it comes to the idea (and real power) of notation. If we are going to evolve computing we need to try to move away from trying to fit everything into some mutation of an ASCII bag. I am not proposing graphical programming, been there, done that, it blows. However, a carefully done true language (meaning something with a unique and concise notation with which to express ideas) could be incredibly powerful and evolutionary.
A quick comparison of the code necessary to calculate all primes up to a limit in K and APL:
(!R)@&{&/x!/:2_!x}'!R
(2=+⌿0=(⍳X)∘.|⍳X)/⍳X
This tells me that K was written to fit APL functionality into and ASCII character set. I get it. I understand where some of that came from around that time. As I said before, it was hard to display and generally deal with non-ASCII character sets. K was created around the time of Windows 3.0. It was still the wild west. I can totally see wanting to have the same level of abstraction with easy-to-deal-with ASCII transliterations. The problem is that this is absolutely going in the wrong direction. Notation (symbols, icons) are incredibly powerful and are at the core of some of APL's ability to become a tool for thought.
I feel the same way about languages such as ObjectiveC. Another abomination. There was no reason to do that. Nothing whatsoever was gained by saying: "Hey, let's do the same thing but come up with a different way to write it." Sure, O-C has a few nice things here and there but it did not advance computing in any appreciable way as far as I can identify.
As for the other extensions you listed come with K, that's probably great. I'd have to dive deeper into the language in order to offer even a superficial opinion on that.
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 system work and even in modern hybrids where FPGA's are integrated with capable microprocessors. 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. That 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 my 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.
- beagle3 13y agoK fits APL functionality into ASCII by selecting a smaller (but empirically, better suited) "base". It's not a transliteration of APL into ASCII. e.g., the first element operator is unary asterisk e.g. "x", which is like C's pointer dereference (which gets the first element ..). There is no symbol for "last element" - instead you use "|x" meaning "first of reverse of x". Similarly, there are no compress/expand operators; Instead, there's a "replicate" operator which unifies and simplifies both (and has other uses to boot). In fact, it looks like Arthur used the number of ascii symbols as a constraint for the number of primitives - which are all single characters. (They can be postfixed with a colon to force monadic comprehension, but that's not part of the operator). As a result, K is as much notation as APL is. The domain is "writing real world programs" instead of "expressing algorithms", and it shows, but it's still notation that -- once acquired -- reads like math or APL. > 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 suspecting it's going to make a come-back. The APL / J / K computation model is much easier to apply to GPUs. But prediction of trends is very hard -- doubly so when it is about the future :)
- robomartin 13y agoA long time ago in a galaxy far, far away I had a project on the table to build a hardware-based APL machine with enhancements and extensions to the language. We looked at it very critically and decided that, while applications might be out there, the cost of sales and educating the potential customers was just too great. Just because you can do something it doesn't mean you should. Today things might be different.