5 ms·
I love Mathematica too, so I bought the Home edition. I play in a lot, but at work and home I keep J open [1]. It has a shell and an IDE of sorts if you want it
by eggy 9y ago
I love Mathematica too, so I bought the Home edition. I play in a lot, but at work and home I keep J open [1]. It has a shell and an IDE of sorts if you want it.
Something like the geometric mean in your article is:
#%:/
define it as gm =: # %: /
# is tally or number of terms
%: is root
* multiply
/ apply over or map
gm 1 100
10
It also has plot libraries, graphics and is very fast for an interpreted language. Perfect for math and statistics. I do like the curated data available to Mathematica, and WL or Wolfram Language is able to be coded functionally, imperatively, or any way you might want.
[1] jsoftware.com
- goldenkey 9y agoThe main point of the code was to create new means and show derivation of known means. It's easy to write a geometric mean in any language. Having the solve function in Mathematica makes it possible to do dynamically generated means that wouldn't be possible in languages without a strong CAS library. Also, will J error out on gm a b ? or gm a 100? The beauty of Mathematica is that I can still get results results in algebraic form, when I leave variables unset. In:= GeneralizedMean[{x, y, z, t}, (#*#2) &] Out= (t x y z)^(1/4)
- eggy 9y agoThe article was great, and I get your point. I was not presenting J as comparable to Mathematica as CAS or WL vs. J, but only showing its expressiveness. You are correct in that it will error out with your examples without writing catch code. I too dream WL goes native. Until then, I will stick with other PLs. How do you like Clojure for mathematics? I still use Maxima on my Android phone along with J. Wolfram Alpha is nice to have too on it! Also my example was missing the * even though it was explained below. It should be: gm =: #%:*/
- goldenkey 9y agoThank you - I hope to eventually produce a paper about alternative continuous and discrete means/norms. Kolmogorov went 5/10 the way, I think I brought his line of questioning to its rightful conclusion. Theres a lot of research to still be done however - only certain forms have easy closed forms when taken on continuous spaces. You might enjoy Part 2: https://scrollto.com/means-of-infinite-sets-and-more/ https://scrollto.com/means-of-infinite-sets-and-more/ I actually have never used J, have only minor experience with Clojure in a startup codebase I once worked on, and never heard of Maxima. You have invited me to explore J and Maxima and I thank you for that. So far, I have used solely Mathematica for mathematics. I've tried python with pandas and other libraries but the syntax always seemed obtuse for me. Python's C call interop is why its so library friendly - but the actual language makes these libraries seem bolted on, less integrated than preferable. There are so many languages to try: Haskell, Rust and Julia are on my bucket list. I've mostly conceded to just learning languages when I need to - for an open source codebase or new job. To me, coding is a means to an end of production of tools, apps, deliverables.. Curiosity can deliver one into an abyss of stasis - where one learns all the most amazing expressiveness tools and techniques but never builds anything with them. All a balance..right. Godspeed :-)