24 ms·
There is a Javascipt emulation available here. Its gnuapl and not Dyalog APL http://baruchel.hd.free.fr/apps/apl/ http://baruchel.hd.free.fr/apps/apl/
by alexcweiner 11y ago
There is a Javascipt emulation available here. Its gnuapl and not Dyalog APL http://baruchel.hd.free.fr/apps/apl/ http://baruchel.hd.free.fr/apps/apl/
- Zuider 11y agoI had to check if 0÷0 = 1 in the light of an earlier thread which discussed the rationale for making 0%0 = 0 in the J language, successor to APL. https://news.ycombinator.com/item?id=9750742 https://news.ycombinator.com/item?id=9750742 From the article in the above link: >"The reason for wanting a definition for zero divided by zero is given by Falkoff and Iverson in The Design of APL as "it was deemed desirable to avoid an error trap in this case." I think that both decisions are crazy. Any calculation that leads to division by zero is indicative of a conceptual problem, and the user should be alerted to this by an explicit declaration of error, not silent failure. I guess that this is mitigated by the fact that the languages are intended to be used interactively by individuals who know what they are doing. As an alternative to the expensive, proprietary implementations of APL, one can also try NARS2000, which is a free, open-source, ISO/IEC 13751 Extended APL. http://www.nars2000.org/ http://www.nars2000.org/
- alexcweiner 11y agoI find that division by zero usually satisfies some edge condition in practice, as you are usually dealing with lists of numbers in APL, and it doesn't really come up that often. gnuapl is also FOSS :)
- Zuider 11y agoBut which is preferable 0 or 1? Maybe something in between, or maybe even something surprising like -1/12? Which choice will lead to the least error in the long run? NARS2000 comes with a pretty IDE.