News for hackers. Stuff that matters.
Re:From Competitive Programming to APL by forgotpwd16 on Friday June 04, 2021 @06:09AM (#27392161)
For starters, it can be argued that it remains closer to mathematical notation. Example:

    reduce(+, (j -> j*2^-j).(Float64.(1:n)))
which can be written, but then kinda differs from APL approach of combining primitives

    sum((j -> j*2^-j).(Float64.(1:n)))
compared to

    +/j×2*-j←⍳n
Also the statement is more succinct, and that is better understood when you compare an APL one-liner with a multi-line code in the other two languages. I think this is its true strength.
Re:From Competitive Programming to APL by kwertzzz on Friday June 04, 2021 @08:41AM (#27392992)
The compactness of APL is indeed quite intriguing. One could also write your example in Julia by:

sum(j -> j*2.0^(-j),1:n)

sum(function,array) applies function to all elements of array before the summation (without need to allocate an intermediate array).

Re:From Competitive Programming to APL by Bostonian on Friday June 04, 2021 @08:00AM (#27392727)
I think the Fortran equivalent using an implied do-loop is

    sum([(j*2**(-j),j=1,n)])
Modern Fortran is arguably an array programming language. It has array operations like Matlab, Python/Numpy, and R.
Re:From Competitive Programming to APL by Jtsummers on Friday June 04, 2021 @10:39AM (#27394056)
I find it weird that that's called "modern" Fortran when that came with Fortran 90. Then I remember that even in 2010 academics (perhaps one of the biggest producers of Fortran today) still seemed to be hung up on F77.
Re:From Competitive Programming to APL by Bostonian on Friday June 04, 2021 @12:06PM (#27395044)
You are right that the Fortran community took a long time adopt standards later than F77. Gfortran handles Fortran 90 and 95 well now, and I think F2003 and F2008 (although I don't use too many features from those standards and cannot say for sure from personal experience). I don't remember how mature gfortran was in 2010. Maybe then g95 was more mature.