4 ms·
It seems like the main issue is that the author doesn't know the language yet. It would probably take a beginner python programmer 40+ minutes to write the mod
by de_Selby 8y ago
It seems like the main issue is that the author doesn't know the language yet.
It would probably take a beginner python programmer 40+ minutes to write the mode function too.
J might have a lot of primitives, but for an example that might be more familiar, so does assembly and people got along just fine there. There is an investment in getting the hang of the primitives but there aren't a huge amount of them, and once you do a problem like this becomes much easier.
The other thing that's really nice is that you start to see how to solve it in different ways using completely different sets of primitives.
- IshKebab 8y agoNo that isn't the problem. There are essentially 200 unnamed functions that you have to learn. The problem isn't that he hasn't learned them, it's that there are 200 of them that you have to learn! Normal languages only have about 20 unnamed functions (i.e. operators) and they're mostly things we've already learnt at school.
- de_Selby 8y agoI don't think you're contradicting my post. If you don't know the fundamental primitives you don't know the language yet. You also don't need to know 200 of them, the author even addresses that point. >Normal languages Who's to say what "normal" is? There is a learning curve to other languages too, people just forget that because they went through it so long ago.
- patrickg_zill 8y agoLisp has 900+ functions in the Common Lisp the Language book alone; though I suppose they are all named.
- avmich 8y ago> There are essentially 200 unnamed functions that you have to learn. Is % an unnamed function? Or {. ? Then you have lots of unnamed things in, say, Java, which are "public", "static", "char" etc... You don't need to learn them all before you can start doing something useful. J for C PRogrammers provides a good course gently introducing simple ones first.
- tluyben2 8y agoBut that goes here too. You can write software with Java knowledge from school. But doing things efficiently for your goal (large data sets, real time processing etc) requires skill. How is that different than Java (or Python, or C++); if you do things in your 20 unnamed functions, your software will most likely not be pleasant to read or execute. And the 'unnamed' is really not true; you are tripping over the fact that these are symbols, but these symbols do have names in APL/j/k. And, like learning a new natural language, you really do not need that much time learning them. All languages have this issue, the symbols is not the difficult factor here. If I do not know dictionaries are called dictionaries/hashmaps, my Python code will likely end up a horror show.
- rtpg 8y agoI think the subtler point is that the primitives have varying complexity, meaning that "get something by its key" is on the same level as the Mealy machine example. It's messy to read and is also kind of a waste of valuable global namespace There's some nice magic in how quickly you can write mode as an expert, and part of the appeals of APLs are the power of some of the built-ins. There's likely other tools that would be more worthwhile in the `:;` spot than its current definition.