10 ms·
WolframScript enables Wolfram Language code to be run from any terminal
- joeberon 7y agoI used this recently to speed up some symbolic manipulation. I was using SymPy but its simplify is really quite slow and the documentation basically just says "work out exactly which simplifications you need and apply them", however in my case I needed something completely general. Now I check whether wolframscript is installed and then just call it in the command line. It's much faster for complicated simplifications, but also much slower for simple stuff (I guess it has a long start up time) SymPy has a built-in converter to/from Mathematica (although it can't convert from Mathematica lists yet), so that's helpful (Here's the project I used it in for interested people https://github.com/joebentley/simba https://github.com/joebentley/simba)
- praptak 7y agoIt's proprietary. Do we need another Flash?
- simonh 7y agoIf you don't need it, don't use it.
- jimhefferon 7y agoFair enough, but it is helpful for someone to bring up the point about it being closed.
- praptak 7y agoI'm just pointing out that proprietary languages tend to die outside proprietary environments.
- unlinked_dll 7y agoMatlab and Java seem to be doing alright
- qchris 7y agoBoth of them certainly have their uses, but especially for MATLAB, are they? I'm working as an engineer in academia right now, and even with all the legacy holdover of MATLAB, many people I know (including almost every undergrad project I've helped with) are either using R or Python, and I know I don't go for it unless I'm absolutely forced. And that's nothing to say for the researchers whose eyes light up upon hearing of Julia. Few of those people seem like they'll be advocates for buying expensive seat licenses if they become PIs down the line or join industry 5-10 years from now. Mathematica seems a little different because I don't believe there's currently a viable alternative, let alone a commonly used one.
- unlinked_dll 7y agoI mean yea, MATLAB is indispensable for the working engineer in controls or signal processing. Python is coming in vogue because of ML applications, but it's primarily used in the wild for scripting together builds and tests, which often are used for testing data generated by MATLAB models. I've never seen a workplace use R or Julia or list them on a job posting outside data science or academia. Julia in particular is missing major components that make it useable, particularly in signal processing. MATLAB also has the advantage of being useful as a CLI calculator for linear algebra, which is how a lot of engineers use it in their day to day. The REPL's of python and Julia are far too slow for that kind of work, frankly. Especially Julia. the JIT takes forever to warm up. It really doesn't fit into my workflow at all, and I've tried to force it. Also, Simulink.
- qchris 7y agoYour point about Simulink is fair--even the Octave version, Xcos, doesn't provide much of an alternative for doing good controls simulations. And while I agree that the Julia's JIT is pretty slow to come up, if I'm doing a lot of linear algebra work, I've typically just left a dedicated terminal open for it. I also haven't had much of a real speed issue with using a REPL or notebook, unless the data sets are unreasonably large. I think I disagree with your take on Python's most common uses, as well as the implication that it is just now "coming into vogue." I'm by nobody's measure a Pythonista, but my experience has been that it gets pulled in almost anywhere it can, from scripting to app development to scientific computing. I am curious about your experience with signal processing, though--how have you seen MATLAB used where Python wasn't or couldn't? I haven't done much in that area since undergrad/internships, and there I would have said that LabView was much more prevalent as a tool, or even Labwindows. At least for many of the common functions like FFT, I don't recall MATLAB being any more common than any other language for that sort of thing (although as I said, my experience there might not be representative).
- joeberon 7y agoHow is this related to Flash? Mathematica is a powerful pattern based symbol manipulation language, Flash is a media creation software, which do you think reaches more end users?
- Nullabillity 7y agoBoth are proprietary trapware.
- joeberon 7y agoMathematica is only trapware because it's so much better than anything else available
- swiley 7y agoThey used to say that about flash too.
- h91wka 7y agoMapleSoft Maple was on par with Mathematica, when I worked with both (ca 2010). Not sure about current state of affairs. Maple's embedded programming language is also quite a bit nicer.
- h91wka 7y agoP.S. I actually remembered one area where Maple is still absolutely superior, that is plotting. It doesn't require to explicitly set argument range, it tries to find features of the function and adjusts the range to include them. AFAIK, Mathematica still doesn't do this.
- tiawaven 7y agoUse sagemath (sage). Runs from the command line and is python based.
- qubex 7y agoI’m a Mathematica addict and (as I have remarked elsewhere) rely predominantly on iPads as my platform of choice. Sure, Wolfram Online works fine when a network connection is available, but I’m really, really, really hoping that sooner rather than later they’ll release a fully fledged notebook & back-end kernel version of Mathematica for the iPad. This shows some flexibility on their behalf, but it’s moving in the wrong direction (as far as I’m concerned, at least).
- jwr 7y agoOh, yes, please. The iPad (especially the Pro ones) is such an incredible machine — thin, light, fantastic battery life, and faster than most laptops. It would run Mathematica really, really well.
- qubex 7y agoIt would be an amazing platform. It almost pains me that the inherent potential is not (yet) realised.
- akjssdk 7y agoI would say that porting Mathematica to the iPad would require them to be able to run the Mathematica engine on iPadOS. And with the strict rules Apple has around arbitrary code execution I would highly doubt that is going to happen.
- qubex 7y agoThat’s actually a misconception: Apple has allowed interpreted languages (e.g. Python, as in Pythonista) to tun on iOS/iPadOS for several years now. The Wolfram Language is definitely an interpreted language and therefore would not fall afoul of their rules.
- 7thaccount 7y agoIt's also a multi-gigabyte installation full of Java, C, and Wolfram code. It is huge....so I'm sure there are some difficulties.
- giggly_gopher 7y agoThis seems like they just polished some rough edges off of the existing command line version of Mathematica. I wish they would not call it Wolfram Language. His ego/talent ratio is already so high it's NKS level buffoonery.
- someperson 7y agoNKS?
- goodmachine 7y agoA New Kind of Science, S. Wolfram (2002) https://en.wikipedia.org/wiki/A_New_Kind_of_Science https://en.wikipedia.org/wiki/A_New_Kind_of_Science "A Rare Blend of Monster Raving Egomania and Utter Batshit Insanity" http://bactra.org/reviews/wolfram/ http://bactra.org/reviews/wolfram/
- dTal 7y agoBut also, to be fair, a deeply fascinating mathematical picture-book.
- goodmachine 7y agoAgreed!
- yarrel 7y agoIt is one of my favourite works of crank science, the hardback has pride of place in that section of my library. It's beautiful, mind-expanding, awe-inspiring, and over-inflated in the grandiosity of its self-regard way past the point of parody.
- giggly_gopher 7y agoNew Kind of Science
- saagarjha 7y ago
- enriquto 7y agoI was a heavy user of mathematica 20 years ago, on a 486 with MS-DOS. Of course, it was inside a terminal. Has the ability to run mathematica textually been lost in the meantime?
- mrpippy 7y agoI hope not, historically you've always been able to run the MathKernel from a terminal and interact with it that way. Maybe this is the same thing, just more targeted to use as an interpreter.
- folmar 7y agoIt's not been lost, but the visual editor has advanced a lot since then. Yet the cli was much unchanged. The visual version is quite reasonable an IDE now.
- georgewsinger 7y agoWolfram Language is insanely great. I've been using wolframscript as (i) a shell replacement and (ii) a piping/glue language for larger projects. Wolframscript makes this hard though for the following two reasons: (i) wolframscript requires users to login before any script can be ran; (ii) only 1 wolframscript REPL can be open at a time. (i) makes it impossible to export wolframscripts to users who don't know what wolframscript is. For example, if I'm using wolframscript as a build tool for a larger Haskell project, and some user downloads my software, they'll first have to login to Wolfram Cloud before the wolframscript is able to run. There's no way I'm going to force people to do that, so it hinders the growth of the language. (ii) makes it hard to use wolframscript as a complete terminal replacement. People often use multiple terminals at once, at different locations in the file system. Wolframscript only allows once at a time. Wolfram Language is insanely good. It should be more popular than Python. I think fixing some of these licensing/login issues could help it grow.
- tome 7y ago> Wolfram Language is insanely great That sounds exciting. Can you explain more?
- vtail 7y agoIt's hard to come up with a short answer to explain the greatness of the tightly integrated system with tons of functionality and highly sophisticated function/rule based programming style, but let me give you a quick taste of it: the following code CloudDeploy[ FormFunction[{"a" -> "Number", "b" -> "Number", "c" -> "Number"}, Plot[#a x^2 + #b x + #c, {x, -10, 10}] &], Permissions -> "Public"] will create and deploy a publicly accessible web form that asks for 3 coefficients and plots a parabola. How many lines of code / external libraries would you need to do the same thing in python? https://www.wolframcloud.com/obj/e0b275e6-49a2-4901-a806-e3622fa1906c https://www.wolframcloud.com/obj/e0b275e6-49a2-4901-a806-e36...
- tome 7y agoCool! Is it because the Wolfram libraries and infrastructure are great, or is there something in the semantics of the language that makes this so nice?
- reikonomusha 7y agoIn my opinion, while Mathematica is the world’s best general purpose calculator, it does more harm than good in producing reproducible and explainable science and math. The topic of math software being closed source has been beat to death (by me and others), so I’ll veer into a different path. As a tiny anecdote, a colleague of mine recently published a paper in quantum computation and computed a representation of some mathematical object, specifically the exact value of an angle which modulates a particular quantum gate. In the paper was this bizarre continued fraction along with arctans and pi’s that no experimental physicist in their right mind would have derived themselves. “Where in the world did this come from?” I asked, while reviewing the paper. “Oh, it’s just what Mathematica gives,” he responded. “I don’t even fully understand it. But I do use it as proof that the angle is an irrational number and thus breaks its inclusion in some known finite group.” You might call out this otherwise accomplished physicist for what appears to be misusing the tool—taking results at face value without understanding them—but I guarantee scientists and engineers are doing this stuff daily, in more consequential places than abstract quantum physics papers. Wolfram and his team have built something amazing, and built an incredibly successful business, but I hope he uses his business acumen to find a way to contribute to the “greater good” while he continues to enjoy running a company and making money.
- davesque 7y agoIt seems like the result of the paper should then be conditioned on the correctness of the chain of re-writes that Mathematica used to arrive at the continued fraction. Isn't there a way to tell Mathematica to output all re-write rules used to form an expression? I seem to recall something like this is possible.
- reikonomusha 7y agoThis is not possible in Mathematica, especially since it’s not all based off of rewrite rules. Wolfram even boasts the 100s of of pages of C and Mathematica code used to implement even individual algorithms. With regards to conditioning the result, it should be as such, but no researcher would ever smear their result like that. Research is cutthroat.
- 7y ago
- dang 7y agoOngoing related thread ("Mathematica v12.1"): https://news.ycombinator.com/item?id=22625370 https://news.ycombinator.com/item?id=22625370 Probably too different to merge the submissions.