Wolfram LanguageReviewed July 17, 2019
Wolfram Language, a confusing rebranding of Mathematica, is a programming language and notebook-based browser environment. It has 5,000 functions and data sources built into the language -- no imports required. It has broad applications in engineering, sciences, mathematics, finance and education.
- 👍 Grows on you: gets better once you master the basics
- 👍 Enjoyable to write: concise & powerful, but hard to read
- 👍 Addicting: sometimes it unexpectedly does something cool
- 👍 It’s at its best when it has precisely the library you need
- 👎 Functions are “magical”: not extensible or debuggable
The following video computes all of the words that are in both of Wolfram's built-in dictionaries for French and English:
The following photo demonstrates crawling the web two-hops deep. The first line shows how we can scrape a webpage for its links via
Import. The next line shows how
NestList repeatedly applies a function successively more times to an initial argument. The final lines construct two functions,
links which gets the hyperlinks for an input link (
# stands for the argument and
& ends the function), and
mapLinks which inputs a list and maps (
links over it and then flattens the resulting list of lists. Finally, we use
NestList to apply
mapLinks two-levels deep.
Hovering over any Wolfram function brings up contextual documentation, which you can click on for further reading.
Evaluating certain expressions, such as
SocialMedia["Twitter"], automatically start OAuth flows to login to the third-party application from Wolfram to be able to pull data from that app. This makes it incredibly easy to use basic integrations. Unfortunately, they were limited in their actual usefulness, being able to only pull limited subsets of user data.
Rich content in expressions
Creating HTTP Endpoints
CloudDeploy function can turn certain Wolfram expressions into HTTP endpoints with live URLs. The following creates a static endpoint that returns a JSON object:
The following creates an GIF from a table of images, and makes it available at a URL:
They have a file-system interface as well for organizing web page files. Below it is used with Wolfram's templating language to populate an HTML template with data from a Wolfram expression:
- Get a list of US presidents (could only get one at a time)
- Use natural language input dynamically (get a picture of X animal)
- Make an image animate at 30FPS
- Catch an error