I feel like APL took terseness too far. Every code snippet looks like somebody was playing “code golf”. It may be great for demoing the language, but won’t it be a nightmare for real code?
And I could technically achieve (nearly) the same thing in Lisp by giving my functions and variables names like “ῴ”, but it’s easier to understand when it’s spelled out like “solution-matrix”. Just because everything can be abbreviated to a single symbol doesn’t mean it should be.
Also, as neat as these purely algorithmic problems are, what does real life code look like in APL? What’s an HTTP request look like? How would I parse a JSON blob?
Iverson won a Turing award on this very subject, and I recommend you read his notation as a tool of thought paper for more on this subject.
I programmed in Common Lisp for about a decade but I do a fair amount of programming in q/k (an aplish language that uses ascii characters) these days and having good array support is a massive improvement in my code size and how quickly I can bring solutions. One of the applications I work on has a dozen or so developers on it at the moment.
What’s an HTTP request look like? How would I parse a JSON blob?
Pretty similar to other languages: we just use library or built-ins like everyone else.
To do an HTTP GET in q I write:
.Q.hg`:https://domain/url
And to parse JSON I say:
.j.k text
If you want to see what a parser looks like, I can point you at an example, but you will find it unsatisfying as a beginner since you will lack the ability to read it at this point.
I feel like APL took terseness too far. Every code snippet looks like somebody was playing “code golf”. It may be great for demoing the language, but won’t it be a nightmare for real code?
And I could technically achieve (nearly) the same thing in Lisp by giving my functions and variables names like “ῴ”, but it’s easier to understand when it’s spelled out like “solution-matrix”. Just because everything can be abbreviated to a single symbol doesn’t mean it should be.
Also, as neat as these purely algorithmic problems are, what does real life code look like in APL? What’s an HTTP request look like? How would I parse a JSON blob?
No. Not generally.
In fact usually the opposite.
Iverson won a Turing award on this very subject, and I recommend you read his notation as a tool of thought paper for more on this subject.
I programmed in Common Lisp for about a decade but I do a fair amount of programming in q/k (an aplish language that uses ascii characters) these days and having good array support is a massive improvement in my code size and how quickly I can bring solutions. One of the applications I work on has a dozen or so developers on it at the moment.
Pretty similar to other languages: we just use library or built-ins like everyone else.
To do an HTTP GET in q I write:
And to parse JSON I say:
If you want to see what a parser looks like, I can point you at an example, but you will find it unsatisfying as a beginner since you will lack the ability to read it at this point.
I looked this up after seeing the Haskell one. The APL family of languages has always been amazing for working with dimensional data.