Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> One misconception is that languages like J are in the same caliber as Brain F**k and other esoteric or golfing languages which are mostly for recreational programming. Languages like J however were designed to be a replacement to traditional maths notation - an interface for thinking or a tool of thought as their inventor Kenneth E. Iverson called them in his Turing Award lecture.

Does it actually succeed though? The author aims to show how J helps conceptualize a random walk, but from where I stand, it just makes everything look like a regex or something. I don't see what the insight's supposed to be.

Everybody knows you can do a random walk by simulating an array of random 1 and -1 values and doing a cumsum on that array. You can do that in MATLAB or Python or R too, and it's about as short and more readable.



> Does it actually succeed though?

Not sure about J, but I feel APL certainly does, at least for me - the symbol set makes it very easy to sketch out a solution.

Part of that ease is the generality of the various operators. That is the reductions and cumulative prefix can be done with any function. For example ⌊\ as cumulative min - useful as Vanessa McHale shows <http://blog.vmchale.com/article/numba-why>

kspalaiologos also shows APL enabling mathematical understanding on her blog <https://palaiologos.rocks/>

An APL equivalent of the J is +\¯1 1[(?100⍴2)] although others exist as there's no exact equivalent for J's { - see <https://aplwiki.com/wiki/From>


Let's change the first line:

> One misconception is that languages like J are in the same caliber as less practical languages (esoteric languages like brainf*k) that use symbols more than words. The assumption is that these are mostly for recreational programming.

Making some crude assumptions here, I believe you've already invested a lot of time into studying python, or some other well known language. Understanding python or C gives you an idea of hundreds of other languages because they use similar keywords and structures to represent their code. English also helps a great deal in understanding these languages.

Now, looking at this, giving a language like APL or J a chance means that you have to spend time learning their kind of notation. If you spend your time looking at APL without making an effort to understand it, then you cannot be surprised that it looks like regex to you.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: