Message Boards Message Boards

1
|
15115 Views
|
7 Replies
|
7 Total Likes
View groups...
Share
Share this post:

How to develop software with Wolfram?

Posted 7 years ago

Wolfram Language is impressive, no doubt.

But I do not really understand the different Wolfram software development environments. Is there some link explaining what is what and for which purpose?

There is Mathematica, Development Platform, Programming Lab, Wolfram|Alpha and many more.

Currently I am using Programming Lab (Standard License, €240/year, which is pretty expensive) and occasionally Wolfram|Alpha.

What I want, is just using Wolfram Language in a professional integrated development environment like Visual Studio, Eclipse, Java-IDEs, MatLab and the like. Which is not really possible with Programming Lab, since I get no control over (local) project Organisation, but just some notebooks within the Wolfram cloud.

With its natural language input Wolfram|Alpha is impressive and funny, but not useful for programming, since it does not understand Wolfram Language, or only small parts of it and those only sometimes and there is no documentation. It's an endless trial and error process.

POSTED BY: Werner Geiger
7 Replies
Posted 7 years ago

Mathematica / Wolfram Language can be called from programs written in C, C++, Java, .NET, etc and vice versa, Features to do that are documented here, but I have no experience with those features. Mathematica functions such as Integrate and Simplify call Mathematica code when they are used, and much of Wolfram Alpha is written in the Wolfram Language. Both involve thousands of files that are used when needed. No doubt, the developers at Wolfram Research have used Mathematica / Wolfram Language to develop large programs. I wish they did more to explain how others can develop large programs.

POSTED BY: Ted Ersek

There are a number of ways of using Mathematica which could be considered as "developing software" at various levels. Many users use Mathematica as a programmable super graphical calculator from which they copy out results, sometimes by hand, to Tex files or other documents. Some users, such as those in this thread, think in terms of a large programming project utilizing an IDE with multiple sources of code, multiple programmers, sophisticated debugging, version control and maintenance capabilities.The first group of users may be getting less than they could profitably use from Mathematica and the second approach is far too complicated, expensive and unnecessary for the vast majority of users.

There is another in-between approach that comes complete with Mathematica but which I feel is underused and under-appreciated. It applies to users who wish to learn, develop, preserve, document and communicate technical capability on some technical subject. Would that include you? The medium is a Wolfram Mathematica Application. An Application can include some or all of the following: notebooks, packages, stylesheets, palettes, documentation, private and public folders, and other types of files and documents.

I discuss more details of this approach at my web site A Mathematica Style.

The one piece of software that doesn't come with Mathematica, but is available free is Wolfram Workbench. It is an IDE but I only use it for documentation.

http://www.wolfram.com/workbench/

You can develop capability and build up an Application slowly over time. Several people can easily collaborate on an Application. The Application could become quite large. The Application could contain classical style technical papers. I tend to think of Mathematica not as a programmable super graphical calculator, but as a writing medium. A literate notebook using sectional organization, textual discussion, active calculation and dynamics is far superior to static printed papers and PDF documents.

You can transmit an Application to another Mathematica user and all they have to do is unzip it into their Applications folder to obtain all its resources. It might be considered a disadvantage that the reader needs to have Mathematica. But more and more technical people have Mathematica or have access to it, and when others see what can be done with Mathematica Applications more and more will be attracted to it.

There are many beautiful examples of CDF documents. They surely have their proper usages. But they have a complicated business model; it is not easy to support a CDF document with packages, stylesheets, palettes or an Application. A more serious disadvantage, say for teaching, is that the professor gets to use the full capabilities of Mathematica and the student gets to slide a Slider.

One might even develop an Application whose purpose was to develop and test algorithms and then transmit them to a large C++ development project.

The Wolfram Language lets you create your own custom interfaces, using its uniquely straightforward symbolic interface-building technology. You can build simple interactive applications very quickly that scale seamlessly to large application interfaces. Mathematica executables can be distributed as CDF documents either directly or the Wolfram Kernel can be accessed programmatically in multiple ways via the Cloud and the Internet.

The Wolfram kernel that is installed by both CDF player and Mathematica can be thought of (crudely) as the Virtual Machine the executable needs to access to run - so its just like Java or .Net in this respect, more so when you consider there is also a browser plug in.

To take the analogy further - Mathematica is the IDE (integrated development environment) where you write & test your code and CDF player is the run-time.

For lots of non-trivial examples see:

http://demonstrations.wolfram.com/

My favourite is the Radial Engine.

http://demonstrations.wolfram.com/RadialEngine/

People who are serious about writing Mathematica programs mighttake things one step further and use Wolfram Workbench (which is just the Eclipse IDE modified for Wolfram Language code development), together with a Version Control System (VCS) like Git.

Infact my company has just spent some time working with a Wolfram consultant to produce a CDF Application who used exactly this set up. If you want more I suggest you ask Wolfram customer services for reference sites.

Once a MMA project reaches a certain complexity there is zero difference between a scientist and software developer(me too is a software programmer for driver restore), the effort requires formal development methods and disciplines as already noted. If you truly want an answer that satisfies you, you need to spend some more time refining your definition of "normal softwares" otherwise your question is unanswerable. –

POSTED BY: Homes Katosvich
Posted 7 years ago

I agree. Wolfram is very powerful for computational thinking and such, but in terms of building software, it is not much help. I was thinking about if it was possible to integrate Wolfram into code in other languages (C++, Objective c, java, swift, etc.) Basically would it be possible to call Wolfram from other code? In this way people could develop software apps while still utilizing the power of Wolfram. Any ideas?

POSTED BY: C C
Posted 7 years ago

I did not try ist myself until now. But from the docs it should be possible to call WL from other languages and vice versa.

But this is not my current problem. I would be happy to know from others experience which Wolfram environment is suitable for developing large projects with pure WL.

POSTED BY: Werner Geiger
Posted 7 years ago

Great, Mark, thank you very much for explaining things.

This helped me a little. I am happy that I am not the only one classical developer who is confused by Wolfram's product structure. (Sometimes I thought I am too old (66) and meanwhile too stupid to understand that :-) )

But the question remains: Which of the many environments would be feasible to develop large projects? Programming Lab is definitely not a solution, since it has no idea of "projects" or the like. There are just stand-alone notebooks - maybe linked by manual hyperlinks. If I imagine to develop and deploy some large project with some millions of lines of code, some hundreds of files and some tens of developers and domain-specialists and all their domain-specific reports: It would be a nightmare.

Anyway: Fortunately I am no longer in this kind of business. I am now working with Wolfram just for fun. With pretty tricky algorithmic/mathematical problems, but no more with huge real-world-projects. This kind of things can be solved within some large WL-notebook.

POSTED BY: Werner Geiger
Posted 7 years ago

Hi, Werner. I too am coming from similar products/programming environments as you. I have developed applications in Visual Studio, Eclipse, and the likes. I have been using the Wolfram Language for less than a year. It is difficult to adjust to the way Wolfram is structured, but after a while you get used to it. Here is how I understand it:

  • Wolfram Language — an extensible bank of functions and the syntax that allows these functions to be combined. It is more than that, of course, but I think that is the essence. There are some youTube lectures by Richard Gaylord that helped me understand this perspective.
  • Wolfram Alpha — an app written in the Wolfram Language to interpret natural language input and return useful output. It is not expecting Wolfram Language input like "Style[TraditionalForm[Factor[x^2 + 5 x - 14]],Gray]", but instead the types of questions we might ask a computational version of Google, like "factor x^2+5x-14" or "x2+5x-14, factor" (or "What color is Vega?" or "gross Domestic product, austria"). Typing Wolfram Language syntax into Wolfram Alpha rarely returns useful results.
  • Wolfram Development Platform — this is more the analog to Eclipse, an environment designed to make writing Wolfram Language easier. It color codes, pairs delimiters, auto-completes, checks for errors, links to documentation, formats entities, and does many other things to make coding in the Wolfram Language smoother. I don't know whether it is even possible to write Wolfram Language code without such an environment.
  • Wolfram Programming Lab — similar to the Wolfram Development Platform except that it walks you through lessons with examples.
  • Mathematica — similar to the Wolfram Development Platform, but in a user interface optimized for mathematics. Probably the correct way to say this is that the Wolfram Development Platform is a more general-purpose version of Mathematica.
  • Wolfram Desktop — The Eclipse-like programming environment that runs on your local computer. It tends to be a smoother experience than the online version.
  • The Cloud — an online programming environment for the Wolfram Language, a home for various resources (apps, files, images, etc.) that can be called using the Wolfram Language, and a personal storage location for files created by those who develop in the Wolfram Language. I personally wish they would let me save files to my local machine, but I'm getting used to the cloud storage.
  • Wolfram Curated Data — Banks of information on bridges, formulas, plant and animal species, historical events, cities, and many, many more topics. The data sets tend to be broad, covering an enormous number of entries. The data structures are designed for depth, too, though I find that Missing[not found] is quite a common entity value. I assume that the data values will fill in over time. The data does tend to be up-to-date and accurate, though I have run into a few inaccuracies. The most glaring was that someone had, apparently deliberately, corrupted the movie data so that Richard Milhous Nixon was listed as the star of dozens of classic movies. Again, I assume that "curated" means that these types of issues will disappear over time.

It is confusing. I'm still frustrated that my workflow isn't the same as I'm used to, particularly the fact that I can't compile my apps to run outside of the Wolfram framework. In that sense, it is kind of like Flash and its need for the Flash Player. But the trade-off is worth it for me. The function-based approach, the marvelous ability to display math and graphics, and the intuitive nature of the coding makes it my tool of choice.

I hope this helps.

POSTED BY: Mark Greenberg
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract