Playing with Wolfram Playing Cards(adereth.github.io) |
Playing with Wolfram Playing Cards(adereth.github.io) |
http://store.wolfram.com/view/misc/index.str#heart-spikey-mu...
I’ve been thinking about writing about some of these details and how other languages and editors could be inspired.
Anybody who thinks there might be interest?
Modifying the Mathematica code after its written, however, is very tricky.
Shameless plug: https://scrollto.com/the-generalized-mean-an-algorithmic-app...
The code could maybe be written in another language but the fact that Mathematica allows for unbound variables and has beautiful functional library calls like Fold, make it very elegant to write once and work with almost any arguments. Wolfram Cloud is free and Mathematica has a trial, if you did want to fool around.
Mathematica is written in C++, it would be nice to see Wolfram head in the direction of having it produce binaries. It could become a major language of general development if that ever became the case. But Wolfram has always been very "particular" with his goals. One can dream...
(it must have been a pain to hand type those expressions...great job!)
https://www.smithsonianmag.com/innovation/this-flashlight-is...
That article says you can get about 5 milliwatts using a Peltier converter, so working backwards based on Peltier converters being ~10% efficient that's only 50 milliwatts radiated by your hands. Even with an ideal 100% efficient converter that turns 100% of that energy into electricity, combined with a 100% efficient step up converter to raise the voltage that's not a lot to work with, that's barely enough power to light a couple of blue LEDs, much less a display and a microcontroller capable of rendering 3D graphics.
https://github.com/patriciogonzalezvivo/PixelSpiritDeck/blob...
#%:/
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.comAlso, 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)
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 =: #%:*/
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 :-)