I always loved APL when I was a student around 1980, I had access to the little IBM "transportable" that supported APL and Basic, I think it was the 5100 or 5110. I remember writing a little table tennis game in APL, which was likely unreadable to me a day later.
Sounds silly, but do you have the source code for your table tennis game? If not, do you remember the logic you used? Was it using Graphpak? I am curious as to how one would write a table tennis game without any conditionals.
The APL Source Code (2012)
51–60 of 61 posts
Re: The APL Source Code (2012)
#52Earlier quoted context omitted.
If a string (or a file or whatever) is "just" an array (of bytes; characters, again: whatever), then yes.
If that means "you don't get much more than what C offers", then I'll take that as a no. I18N, Unicode, Regex, built-in string manipulation functions, character set conversions and efficient data structures are table stakes at this point.
No, it’s quite a bit more than C offers, which has a paltry twenty-eight “operators”, none of which “work” on arrays. Most of the libraries in C and C-like languages have huge libraries because getting those twenty-eight operators to do anything can be a lot of work if you don’t think about it much.
In contrast, Iverson has more than 50 excellent operators, sensibly extended to arrays. Not all APLish languages have all the operators, but the choice about what they do have typically considers how all of Iversons operators can be/are used and how/when they can be implemented in terms of each other. This is largely a matter of taste.
And better symbols means better ideas. Some things are just more obvious in APL. And once you see it, you can take it with you.
When using C, I don’t typically use the C library, or libraries for any of those things you mentioned, because they just aren’t that complicated once you have seen APLish solutions to those problems. And that’s a good thing because less code means less bugs.
Re: The APL Source Code (2012)
#53Earlier quoted context omitted.
If that means "you don't get much more than what C offers", then I'll take that as a no. I18N, Unicode, Regex, built-in string manipulation functions, character set conversions and efficient data structures are table stakes at this point.
APL is very decent at string manipulation. I could try to explain why, but I am afraid that you'll have to see for yourself to understand why what you wrote is both true and not very applicable to APL.
Re: The APL Source Code (2012)
#54Earlier quoted context omitted.
I actually find it way easier and shorter to review code I've written in J and APL, because it is so succinct and the symbols are well defined. Having to review something that is a paragraph or one page of code is much easier than following pages of other programming languages code. You can comment APL as you can in most PLs, and with the REPL-like dev environment, you can test pieces of code for verification quite i…
we need just the correct expectations. APL is like mathematics for me. i need to read it several time to understand dense unfamiliar terms and formulas. same goes for APL. it is not the typical language which i assume can be read while driving
Re: The APL Source Code (2012)
#55Earlier quoted context omitted.
I actually find it way easier and shorter to review code I've written in J and APL, because it is so succinct and the symbols are well defined. Having to review something that is a paragraph or one page of code is much easier than following pages of other programming languages code. You can comment APL as you can in most PLs, and with the REPL-like dev environment, you can test pieces of code for verification quite i…
What are you using April for?
Re: The APL Source Code (2012)
#56Earlier quoted context omitted.
I actually find it way easier and shorter to review code I've written in J and APL, because it is so succinct and the symbols are well defined. Having to review something that is a paragraph or one page of code is much easier than following pages of other programming languages code. You can comment APL as you can in most PLs, and with the REPL-like dev environment, you can test pieces of code for verification quite i…
What are you using April for?
Re: The APL Source Code (2012)
#57Earlier quoted context omitted.
If that means "you don't get much more than what C offers", then I'll take that as a no. I18N, Unicode, Regex, built-in string manipulation functions, character set conversions and efficient data structures are table stakes at this point.
Sigh. No, it’s quite a bit more than C offers, which has a paltry twenty-eight “operators”, none of which “work” on arrays. Most of the libraries in C and C-like languages have huge libraries because getting those twenty-eight operators to do anything can be a lot of work if you don’t think about it much. In contrast, Iverson has more than 50 excellent operators, sensibly extended to arrays. Not all APLish languages…
Re: The APL Source Code (2012)
#58Earlier quoted context omitted.
Sigh. No, it’s quite a bit more than C offers, which has a paltry twenty-eight “operators”, none of which “work” on arrays. Most of the libraries in C and C-like languages have huge libraries because getting those twenty-eight operators to do anything can be a lot of work if you don’t think about it much. In contrast, Iverson has more than 50 excellent operators, sensibly extended to arrays. Not all APLish languages…
So if I understand you right, APL treats strings as arrays of whatever . This makes sense and isn't particularly hard to understand. Is there a way to treat Unicode strings as arrays of graphemes, instead of bytes or codepoints?
Re: The APL Source Code (2012)
#59Earlier quoted context omitted.
So if I understand you right, APL treats strings as arrays of whatever . This makes sense and isn't particularly hard to understand. Is there a way to treat Unicode strings as arrays of graphemes, instead of bytes or codepoints?
Dyalog APL does this by default.