14 ms·
APL deserves its renaissance too
- rbanffy 8y agoI will support this, but only if IBM brings back the beam-spring keyboard.
- danielvf 8y agoThe beam-spring keyboards are still being made - someone bought the patents, tooling, and supplies from IBM and their main supplier, 22 years ago and has been making them ever since. http://www.pckeyboard.com/page/category/UKBD http://www.pckeyboard.com/page/category/UKBD
- rbanffy 8y agoNope. These are the buckling spring ones. I have one (http://www.pckeyboard.com/page/category/PC122 http://www.pckeyboard.com/page/category/PC122) and it's awesome. But the beam spring was awesomer ;-)
- privong 8y agoThey even sell an APL keycap set: http://www.pckeyboard.com/page/product/USAPLSET http://www.pckeyboard.com/page/product/USAPLSET
- rbanffy 8y agoThese guys are pretty amazing. I can't recommend their keyboards enough.
- nickpeterson 8y agoYeah, he's speaking of the Model F variant of keyboards from IBM rather than the Model M (the better known buckling spring variant). There are a ton of Model F's online for sale because they're not natively compatible with regular computer and thus need an adapter (I believe), and they're just not as widely known. Also the Model F is a monstrous beast of a keyboard, that would make even a regular model M seem compact. I just want an industrial (gray) Model M Space Saver. I'd get one but I still need to think of a good argument to use with my wife over a $600 keyboard...
- rbanffy 8y agoBeam-spring > buckling-spring Model F > buckling-spring Model M. The guys at Unicomp were musing around the Space Saver layout. Not sure if they have the machinery, or the funds, to do the tooling to build it.
- FractalLP 8y agoI'd love for it to go more mainstream with a high performance open source implementation. Dyalog is pretty good, and I like J, but feel the missing symbol leaves something out. K/Q with kdb+ is too expensive, and the other open source array language implementations (Qnial, Klong, Kona, GNUAPL)are just not there.
- ratboy666 8y agoHow is GNU APL not there? It is standards compliant, 99.9% pure APL2 (per ISO standards), and is actively maintained (bugs and issues are usually turned around in a day or two). It performs quite well, and can be easily extended. I have even added memmap vectors to it to achieve even more performance (and to begin GPGPU integration). GNU APL also supports a library version (libapl.so) which allows APL2 to be incorporated into other applications via C ffi. This is my primary use case -- interactive development followed by delivery via libapl.so.
- FractalLP 8y agoI think it requires a more expert user. I couldn't get the manual install process to work on Ubuntu and I believe it requires MinGW or Cygwin to work on Windows (not for a beginner either). Don't get me wrong, I'm really really glad it is there.
- anonu 8y agoKx could be much bigger if they open sourced the q interpreter, tapped into a larger developer pool who could write libraries and add ons. There's more money in selling consulting services than licenses...
- yiyus 8y agoAs much as I would love that, I do not think getting bigger is an issue for Kx. It seems to me they are doing quite well with their current model. I have read before (sorry, I do not have the link) that Arthur Whitney does not really believe in open source. That is unfortunate (and a mistake, if you ask me). Even if he did not release a complete product, I would like to study his code. Reading and trying to understand kparc.com/b/ is a very enlightening experience. I wish k.c was there too.
- tlack 8y agoReally accessible tutorial format here. More of this could get more people into APL. (Although truthfully I don't think that char set will ever fly in a broad commercial sense)
- leoc 8y agoThe MCM/70 https://en.wikipedia.org/wiki/MCM/70 https://en.wikipedia.org/wiki/MCM/70 , another early microcomputer which failed to thrive, was also an APL machine. In fact, the computer pictured at the bottom of the article is an MCM/70. Interesting to consider what maybe could have been. (One reason the MCM/70 wouldn't have had BASIC is that its development predates BASIC Computer Games https://en.wikipedia.org/wiki/BASIC_Computer_Games https://en.wikipedia.org/wiki/BASIC_Computer_Games , apparently the original, 1973 publication of BASIC listings. Those were all games written on and for the Dartmouth BASIC system or other DEC microcomputers. I think (I am not an expert) it was probably this corpus, and its publication in a readily-available book, that originally drew microcomputer systems like the ALTAIR towards supporting BASIC.)
- pavlov 8y agoI've felt that high-DPI touchscreens are the opportunity for an APL renaissance, if there's ever going to be one. Once hardware keyboards standardized around ASCII in the '70s, it cramped the promise of APL's custom notation. On touchscreen it's trivial to render a software keyboard that contains the entire symbol set (perhaps even adapted to the user's experience level to make it less scary initially?). Increased resolution could be used to make the programs easier to parse visually by e.g. scaling symbols based on their context and nesting level, just like we do in math equations. I'd like to work on an open source APL variant that runs on iPad and/or touchscreen Windows. It should be aimed at entry-level programmers because they don't have the imperative mindset strongly ingrained yet. It would be interesting to see if "touch APL as first language" could be a viable approach to teaching programming. Just need to find the time somehow... :/
- Analemma_ 8y agoWhat's the intersecting region in the Venn diagram between "people who will program in APL" and "people who will program on a touchscreen" though? They're small circles to begin with— most programmers seem to have an allergic reaction to coding on tablets and APL is kind of a hard sell even notwithstanding the input issue— and so I can't imagine the overlap is many people at all.
- pavlov 8y agoLike I said, it would be an open source project aimed at new learners who haven't yet built up those preconceptions. It's ok if it doesn't take off since it's not a business. (If there's one thing I've learned in my career, it's that you can't change developers' minds about anything fundamental. We are extremely stuck in our ways, myself included, and all too ready to pretend that tiny incremental changes in syntax or tooling are revolutions.)
- deleted 8y ago[deleted]
- dmurray 8y ago
- Ruud-v-A 8y agoCould Numpy be considered the APL renaissance? Not in syntax, but conceptually?
- jacquesm 8y agoNo, not for terseness. Numpy is nice because it extends Python in a reasonably good and efficient way but standalone it doesn't do much of anything and Python is so much more verbose than APL. That's the beauty of APL in a way: there really is nothing left to remove.
- samatman 8y agoIt can be both! https://github.com/baruchel/apl https://github.com/baruchel/apl What I'm craving is APL for TensorFlow...
- dnautics 8y agoIf we're going that way, I'd say Julia is closer.
- ChrisRackauckas 8y agoIn fact, it can get extremely close: https://www.youtube.com/watch?v=XVv1GipR5yU https://www.youtube.com/watch?v=XVv1GipR5yU And since you can define your own operators, you could just go all of the way.
- dnautics 8y agoYou can't define operator precedence though!! (That's a good thing). There was once a Julia talk about a really old programming language which disallowed any operator groupings without parens except for the basic seven or eight. https://gist.github.com/ityonemo/6512f3b4fd02b9a9cc292cf0f88534c5 https://gist.github.com/ityonemo/6512f3b4fd02b9a9cc292cf0f88... also string macros are cheating!
- adamnemecek 8y agoI would love apl with types.
- bstamour 8y agoHave you looked at Perl 6? It's optionally typed, and can be nearly as terse as apl with some of it's higher order operators.
- FractalLP 8y agoYou'd have to essentially embed a slow unoptimized APL in it which you can do. Add that to the fact that P6 is already slow at the moment would be an issue. Also, unlike APL, your P6 APL operators would probably be only known to you. It would definitely work though.
- b2gills 8y agoUnicode has APL characters, so create the operators using them. If there is a conflict with an existing feature you could always create a Slang. A Slang is a module that changes the parser. (It could be argued that with this feature all programming languages are a subset of Perl 6)
- FractalLP 8y agoI've heard that quote, but realistically, that would be a huge project to write an efficient APL in P6 and as I already said, the performance wouldn't make you happy.
- rbonvall 8y agoTake a look at this paper that explores the idea: https://www.cs.ox.ac.uk/people/jeremy.gibbons/publications/aplicative.pdf https://www.cs.ox.ac.uk/people/jeremy.gibbons/publications/a...
- delish 8y ago
- transfire 8y agoThought this very thing a few minutes ago, only to sit down and see this.
- rebootthesystem 8y agoNo, it does not. I used APL professioally for about ten years back in the 80's. I love the language. It is incredibly powerful. Once you internalize it's like playing the piano, you don't think about the mechanics you play music. However, the language did not stand the test of time for far more important issues than the inconvenience of the character set and the keyboard. And, no, J is not a successor to APL, even though Iverson created it. J is an abomination. He made a mistake. He thought that abandoning notation --which is incredibly powerful-- would solve the APL popularity problem. What he ended-up creating was a royal mess of the first degree. It's garbage. APL could be very useful today but someone with the time and context needs to organize an effort to evolve it into a modern language that retains the power of what got branded as a "tool for thought" while adding layers of functionality that are sorely missing. I wish I had the time to embark on this journey. I would love to do something like that, but I can't. Again, the character set and keyboard are not the problem. I used to touch type APL. Didn't take that long to get there. People learn to drive vi/vim. It's a matter of having to have a reason to make the effort. And the ecosystem. That's another huge issue. This has two aspects: Finding qualified programmers and having access to libraries so you don't reinvent the wheel. Back in the day I used to do a lot of work with Forth as well. Great language for the right applications, but finding qualified Forth programmers was difficult when the language was popular and it became nearly impossible with the passage of time. APL suffers from the same problem, a seriously limited talent pool. I probably don't need to explain the value and power of having libraries to support a wide range of applications. Python is a good example of this today. You can find a library to do just about anything you might care to approach with Python, from desktop through embedded and web. In many ways the breath and depth of available libraries an be far more important than language capabilities and sophistication. After all, if you had to write OpenCV from scratch there's no amount of APL magic that is going to make you more efficient and effective than a 15 year old kid with Python and OpenCV. I see APL mentioned on HN with some frequency. I feel that some here are in love with the idea of APL rather than understanding the reality of APL. Again, I love the language, but there's a reason I stopped using it about 25 years ago. What's interesting is that C, which I started using way before APL, is still around and very solid language (with lots of libraries) for the right applications.
- 8y ago
- qop 8y agoI want to draw APL. Like with a stylus. That's pretty much how I'd want to use it, and the only way I'd bother. It's cool tech but it's general purpose appeal is nonexistent and there is already Julia and Matlab in technical computing space. If I could draw APL symbols and have some common libraries for JSON and Http and stuff like that, I could see a renaissance having enough steam to do something. Otherwise, it's only the top gun high level nerds that already use it anyways, that would want to work in non-ascii. Modern developers seem to have an ever decreasing attention span these days. How many developers under 25 use vim? It's always less than it was last year. :(
- untangle 8y agoRemember the Palm Pilot? Drawing the ASCII-ish symbols in the little box? While I did memorize the strokes, I never found the process efficient. I don't think that drawing APL runes would be any better -- certainly not better than the key-combos of Dyalog's bespoke APL editor (free for personal use, BTW).
- qop 8y agoWow, actually I do remember that, and it sucked! So, I've never written apl, and I'm glad I read this comment because that's an excellent point you raise. To expand a bit, I was thinking about being able to notate computation graphically. That's really what I want. Visual programming has existed and has sucked forever, but those thoughts don't go away that there might be a way to do it, if I just had the missing piece. I need to sit down with dyalog and find out what I'm missing, it sounds like. Thanks!
- eigenspace 8y agoTo be fair, ownning an iPad Pro, I can say first hand that the handwriting recognition possible with the stylus is actually quite remarkable and a great improvement from the old palm-pilot days.
- qop 8y ago
- jacquesm 8y agoIf you want APL to be reborn make a version that supports GPU acceleration. That just might give it momentum enough to be used, a language that runs with the native speed of the GPU and that is easy to compose without having to fiddle with the details could be a winner. There is this: https://github.com/Co-dfns/Co-dfns https://github.com/Co-dfns/Co-dfns But it's not quite it. As for the word 'deserve': computer languages don't really deserve anything, they get adopted, or not. APL is a beautiful language and it gives me immense pleasure when I 'get' a program but the barrier between 'the problem' and 'the solution' hinges on libraries, eco systems and communities. I suspect that APL's window of opportunity has passed and even if Clojure became 'a modern lisp' and Elixir became 'a modern Erlang' I don't really see a big driver behind 'A modern APL'. What would it do that can't be done in other ways?
- bgongfu 8y agoNo experience, and not APL; but [0] pops up on my radar now and then. [0] https://futhark-lang.org/ https://futhark-lang.org/
- jph00 8y agoIt would be a great dsl for tensor comprehensions. Also it's a better notation for much (most?) of the math of data science. I wish papers used it. Then the math would be unambiguous and testable and maybe even correct.
- Athas 8y agoHow is Co-dfns not what you want? It is by far the best attempt I know of for bringing the full power of APL to accelerators like GPUs[0]. ...however, it is not easy. Full APL has a lot of features (like nested arrays) that are incredibly difficult to map to GPU execution. And in general, APL is not easier to map to GPUs than your bog standard Numpy-style matrix library (in fact it's harder, since Numpy only has regular arrays and simple operations). [0]: I was involved in a project that targeted only a small well-behaved subset of APL, which was hard enough: https://github.com/henrikurms/tail2futhark https://github.com/henrikurms/tail2futhark
- untangle 8y agoNeat little tribute article. APL will not be reborn. If that was going to happen, this century's embrace of analytics and linear-algebra-rich machine learning would have propelled the upswell. It didn't and it won't. Why? It's not the symbols. Not the keyboard. Nor the learning curve. Nor the lack of standardization, libraries, or GPU support. These are collateral damage, not primary drivers. APL will not flourish because it is effectively a DSL with archaic I/O capability. It is a nearly-pure functional programming language. It's primary domain is mathematics. Native GUIs, networking, the web -- all uncompetitive add-ons. In this sense, APL and Haskell share some DNA. For dynamic systems modeling for my thesis, I reached for APL and Matlab. I still code Dyalog APL for recreation. Love it. But I wouldn't build a web app with it and a wouldn't run my company on it.
- derefr 8y agoIs there a reason one wouldn’t just build the core engine of SIMD math software in APL, much like people build the core engines of medical-system software in Prolog?
- todd8 8y agoIs Prolog really used for medical-system software? It seems to me that it turned out to be the wrong path taken by Japan's Fifth Generation Project. In the early 80's I experimented with Prolog. Simple ideas were simply coded into programs; it was really very interesting. However, the need to understand the compiler's inner workings to get programs that ran efficiently by manually inserting "cuts" to limit backtracking ruins Prolog's claim to being simple to translate requirements into programs. An even more serious problem with Prolog is the simplicity of it's model for logic. It is very easy to end up with requirements in the real world that don't easily fit the model. See for example the SHOOT problem in [1], where the concluding sentence is: > As such, the claim implicit in the development of nonmonotonic logics--that a simple extension to classical logic would result in the power to express an important class of human nondeductive reasoning--is certainly called into question by our result. Don't get me wrong, I was the Chief Scientist at a company with one Prolog based product. I still thinks its an interesting language, but I predict that it will remain eclipsed by much more general purpose programming languages. [1] https://www.aaai.org/Papers/AAAI/1986/AAAI86-054.pdf https://www.aaai.org/Papers/AAAI/1986/AAAI86-054.pdf
- iainmerrick 8y agoI keep hearing APL is great, but like everyone else I find the cryptic symbols very off-putting. I haven’t seen a really compelling explanation for why it’s great. It looks like a bunch of matrix and vector functions with very terse names. Is it significantly different from just taking GLSL, say, and #define-ing one-character names for all the built-in functions? What is APL’s secret sauce? This article suggests that a lot of the fun is just the cryptic symbols themselves. That’s absolutely fine, but it doesn’t seem like something that “deserves” a renaissance, compared to, say, Lisp, which really does have a uniquely productive idea at its core.
- zokier 8y agoIf you don't like the symbols then there are J and K/Q which are ASCII based but retain many of APLs other characteristics. https://en.wikipedia.org/wiki/J_(programming_language) https://en.wikipedia.org/wiki/J_(programming_language) https://en.wikipedia.org/wiki/K_(programming_language) https://en.wikipedia.org/wiki/K_(programming_language)
- 49bc 8y agoIf you lose the symbols you lose the terse nature of the language, which as far as I can tell seems to be one of the most alluring parts of the language (the author of the blog post shows game of life as essentially a one-liner).
- omaranto 8y agoDid you read any J programs? It is just as terse as APL. (Probably K is pretty terse too, but I won't comment on it as I only know J.)
- vorg 8y agoIn J, the parens, brackets and braces aren't balanced because those 6 symbols, i.e. `(`, `)`, `[`, `]`, `{` and `}`, are used as standalone symbols for other syntactic stuff, making J code very hard to read.
- qwerty456127 8y agoAPL looks like the best programming language I've ever seen. I wish it could be extended with SQL and web-service mappings to input-output data conveniently and to use functions written in other languages (like C and Python) for acceleration and rapid logic prototyping.
- uryga 8y agoWell, there's K, along with its flagship database KDB which lets you write SQL-like queries and, from what I've heard, integrates very nicely with the language. idk how good their FFI story is. Unfortunately, you need to pay for commercial use.
- icen 8y agoYou can extend kdb with c functions, but they need to take/return their internal K structures, so you'll need to wrap functions. `2:` is the thing to look at. Otherwise there's ipc clients, and a very nice native python integration now.
- FractalLP 8y agoDyalog has a web server and a fully documented SQL library.
- nickpeterson 8y agoNot exactly what you want, but you may want to check out F# type providers..
- g8oz 8y agonoob question: how do I paste those symbols in say Notepad++?
- ASalazarMX 8y agoI'm more worried about how to type them with a standard QWERTY keyboard.
- Avshalom 8y agoWell I can't say for Windows but in Linux APL is one of the keyboard layouts standard in basically any install. In KDE you can just go in and enable it, in gnome/xfce/cinnamon you have to tell the system to actually show you all the layouts gsettings set org.gnome.libgnomekbd.desktop load-extra-items true in a terminal will make it show up, then you just set it to toggle with some button. https://www.dyalog.com/apl-font-keyboard.htm https://www.dyalog.com/apl-font-keyboard.htm
- FractalLP 8y agoWhen I used the Dyalog APL free trial on Windows it installed a new keyboard mapping as part of the process. I think the keymapping is also on their site. It uninstalled as well I think when I was finished and uninstalled.
- mkl 8y agoJust copy and paste. They're normal Unicode characters. If you mean "type" rather than "paste", well that's more complicated.
- keithnz 8y agoJ seems to have its fans ( http://www.jsoftware.com/ http://www.jsoftware.com/ and https://en.wikipedia.org/wiki/J_%28programming_language%29 https://en.wikipedia.org/wiki/J_%28programming_language%29 ) and uses ascii instead of all the different symbols. Some of the code CAN be quite terse (and cryptic) like quicksort=: (($:@(<#[), (=#[), $:@(>#[)) ({~ ?@#)) ^: (1<#) I spent a small amount of time learning the basics a while ago, but never really used it for anything. But it was interesting and I'd have to spend a lot more time with it to get into the mindset. Popular with some Code Golfers as well.
- riskneutral 8y ago> quicksort=: (($:@(<#[), (=#[), $:@(>#[)) ({~ ?@#)) ^: (1<#) Please, no. Glyphs / characters are not a scarce or constrained resource in software development. The major resource constraint is developer time spent writing, reading and debugging code. APL (and its descendants) are specifically designed to make these challenges far more difficult than they need to be.
- keithnz 8y agoI think it's worth suspending judgement and opinions about what you think a programming language should be and evaluate it on its own terms. The preceding is a terse form of the code, you can write it more verbosely. But just like regex, terse forms can be very useful once you understand them.
- wwweston 8y agoI could also see either the existing chain of ascii glyphs becoming more legible with some wisely-chosen syntax highlighting, or an editing environment where the ascii glyphs are used to produce something distinctive, and that might change how developers relate to the symbols.
- avhon1 8y agoFunny that you should say that. APL was designed to be easy to read, like how mathematicians can look at an equation and immediately get a feel for it. "Notation as a Tool of Thought": http://www.jsoftware.com/papers/tot.htm http://www.jsoftware.com/papers/tot.htm
- gregfjohnson 8y agoI have used and loved apl\11 and its successors for many years. It could not be compiled on 64-bit machines, because of some ancient programming practices that were used throughout the code. I took some time to update apl\11 so that it compiles and runs on modern machines. Did a few other things as well, such as replacing linear algorithms in the symbol table code with O(logN) algorithms. I would refer to this project as "heirloom software". It is touchingly old-fashioned in some ways, a bit dusty, and still fully serviceable. It is a bit like owning and flying an Ercoupe. A bit quirky, an ongoing effort of love, but a joy to fly. Edit your apl with vim, run apl files like scripts from the shell, pipe inputs and outputs, copy an APL binary or build it anywhere with a C compiler, run it immediately and conveniently. My take on the 'funny characters problem' was to go with touch typing, and stick with ASCII. If you can write APL with your eyes closed, you can use APL-touchtype. "rho" is "R", "iota" is "I", etc. Trig is "O". Log is "O@*". (APL-touchtype uses "@" instead of backspace, and with that trivial substitution, all of the APL overstrikes become APL-touchtype ascii.) It is ABSOLUTELY a work-in-progress, but anyone who wants to is welcome to give it a try: https://github.com/gregfjohnson/aplette
- yeukhon 8y agoOh god no. This would kill programming productivity. Why people like these complicated programming languages? Seriously...
- dTal 8y agoYour comment reminded me very much of a paragraph in "Beating the Averages"[1]: "As long as our hypothetical Blub programmer is looking down the power continuum, he knows he's looking down. Languages less powerful than Blub are obviously less powerful, because they're missing some feature he's used to. But when our hypothetical Blub programmer looks in the other direction, up the power continuum, he doesn't realize he's looking up. What he sees are merely weird languages. He probably considers them about equivalent in power to Blub, but with all this other hairy stuff thrown in as well. Blub is good enough for him, because he thinks in Blub." [1] http://www.paulgraham.com/avg.html http://www.paulgraham.com/avg.html
- a-saleh 8y agoI remember being floored by APL few months ago when I learned about co-dnfs and watched the stream by Aaron Hsu [1] with quotes like "This code is perfectly readable, it just isn't in English". Thing is, when I was thinking about trying it, I never figured out a good toy project. Like, when I wanted to try anything else, most of the time I would know I would be able to cobble together a web-service. Haskell, Erlang, even Prolog. I understand co-dnfs to be self-hosting, so maybe a toy programming language? [1] https://www.youtube.com/watch?v=gcUWTa16Jc0 https://www.youtube.com/watch?v=gcUWTa16Jc0
- icen 8y agoDo some deep learning. It's very straightfoward, and you only need some trivial IO. Writing a programming language in APL is not for the faint of heart - co-dfns is, alongside it's performance goals, to show that compilers aren't necessarily a bad fit for APL.
- nickpeterson 8y agoIncidentally, I wouldn't be shocked if you reached out to Aaron Hsu and he actually helped you. I sent him a related email and found him to be extremely cordial and informative.
- chuchana 8y agoHere's a partial implementation of APL running on Common Lisp: https://github.com/phantomics/april https://github.com/phantomics/april
- KWxIUElW8Xt0tD9 8y agoLearned APL in a college linear algebra class long ago and loved it (still have the books). Best story: circuit synthesis class assignment to perform matrix exponentiation -- two lines of APL while the rest of the class was struggling with FORTRAN and the like.