5 ms·
APL compiler targeting a typed array intermediate language
- BMarkmann 10y agoAn interesting project was kicked around here / proggit the other day, using apltail as the middle of a pipeline transforming APL code into optimized GPU code (Futhark), instead of targeting C. It is a pretty good display of ML's suitability for this sort of task. I've always been impressed (amazed?) at the performance APL and its descendants get in an interpreted environment -- I'd be interested to see performance comparisons between the output of apl-to-apltail-to-C / apl-to-apltail-to-futhark and an APL interpreter.
- girvo 10y agoI believe this is the paper in question! https://futhark-lang.org/publications/fhpc16.pdf https://futhark-lang.org/publications/fhpc16.pdf
- BMarkmann 10y agoOh wow, hard numbers, thanks! That's very impressive, but strangely misleading in the graph towards the bottom that appears to clock TAIL->Futhark->OpenCL and Futhark->OpenCL exactly the same in more than half the cases (if you look at the raw numbers if appears that the second approach blows the first away in most).
- Athas 10y agoThat's because the speedup graph cuts away at a 100x speedup, but some of these (somewhat silly) benchmarks are compute-bound and hence gets these crazy 1000x speedups on the GPU.
- QuinnWilton 10y agoThis is awesome. I always recommend that people at least look into APL, to get a taste of how different some paradigms of programming are from what they're used to. Unfortunately, the de factor implementation of APL (Dyalog) is proprietary, and last I checked, the process of getting a trial license takes too much time to be worth it for people with only a passing interest. It's great to see another open source implementation. Here's my favourite video of APL in action. It'll blow your mind: https://www.youtube.com/watch?v=a9xAKttWgP4 https://www.youtube.com/watch?v=a9xAKttWgP4
- Avshalom 10y agonot to take away from this, which is quite cool but: GnuAPL is coming along nicely, and of course libre. Dyalog has a 32-bit windows (though it works on wine middling well) only unregistered version http://dyalog.com/download-zone/unregistered.htm http://dyalog.com/download-zone/unregistered.htm that other than a splash screen works great. Also if you're a student: I sent them like a 2 sentence email(from a .edu domain) that basically said "hey I'm a student, I wanted to play around with APL for data analysis" and they got back to me with a student license in like a couple hours. I am wary of proprietary environments I'm not going to argue for them, but getting a hold of a working+legal copy of Dyalog is actually pretty painless
- ShaneWilton 10y ago> I'm not going to argue for them, but getting a hold of a working+legal copy of Dyalog is actually pretty painless That's good to hear. Last time I tried it took a few days for them to get back to me. I'm also excited to give GnuAPL another try too. It looks like it's coming a long way since the initial release.
- eggy 10y agoIf you're serious about investing time in something, 2 days is not much, although it didn't take that long for me. Dyalog has great documentation, videos, and resources. I tried NARS2000, a free version of APL, but it was not as polished. I mainly use J, and since Ken Iverson created APL, and then went on to create J with the help of a bunch of other smart people. J has certain things not found in Dyalog APL, and is very functional with trains and forks and general function composition. J is damn fast for an interpreted language, and the Jd database, which is a bit slower than kdb+/q, still is faster than many Spark/Shark setups for big data. I am waiting for something like Futhark mentioned below, which marries J or APL to the GPU or FPGA or other hybrid card. A true vector/array language running on true array hardware, hopefully ridding the CPU-GPU bottleneck back and forth between host and device. Plus I just like playing with J. I have used Lisp/Scheme for years, but languages like Forth and J/APL/K/Q really blow my mind, more so than the legendary Lisp ,'epiphany' at least for me.
- iamed2 10y agoShashi Gowda presented on APL implemented in Julia at JuliaCon today: https://gist.github.com/shashi/9ad9de91d1aa12f006c4 https://gist.github.com/shashi/9ad9de91d1aa12f006c4
- jxy 10y agoThis is quite interesting, especially the llvm jit bits. Are there any performance figures?
- KenoFischer 10y agoIt's just a shallow transformation to julia, so it's fast ;). Would be fun to compare with a production quality APL implementation (I hear they have some fancy optimizations that we don't yet have in julia).
- protomyth 10y agoIf APL is your interest and you like Smalltalk, the take a look at F-Script. It is an interesting take on array programming.
- rebootthesystem 10y agoI used APL professionally for about 10 years. It absolutely changes the way you see and think about solving problems with computers. Give it a shot: http://www.nars2000.org/ http://www.nars2000.org/
- PeCaN 10y agoRelatedly, I highly recommend anyone read Notation as a Tool of Thought¹ if they haven't yet. If I may inquire, what did you work on with APL? ¹ http://www.jsoftware.com/papers/tot.htm http://www.jsoftware.com/papers/tot.htm
- rebootthesystem 10y agoA range of applications from inventory management for electronics manufacturing to DNA sequencing and robotics.
- arcfide 10y agoThis is one of a few GPU capable compilers currently targeting APL as a source language. I am the implementer for another system, called Co-dfns, which is designed to integrate GPU compilation into Dyalog APL. A third system is the APEX compiler that targets SAC written by Bernecky. We get together at the ARRAY workshop and PLDI each year and usually go over and compare our systems to one another. Each system is bringing some unique features and capabilities to the table, and it will be interesting to see these systems evolve over time. More information on Co-dfns can be found here: https://arcfide.github.io/Co-dfns/ https://arcfide.github.io/Co-dfns/