This presentation introduces Wolframite, a new Clojure library that bridges the powerful Wolfram Language/Mathematica computational kernel with the Clojure and Java ecosystems. Speakers Jakub Holý and Thomas Clark motivate the project by showcasing how Wolfram's unique blend of built-in knowledge, symbolic manipulation, and high-level functions can be seamlessly integrated into Clojure for diverse applications, from video processing and geographical calculations to advanced scientific research. For developers, Wolframite offers access to Wolfram's extensive capabilities with Clojure's strong engineering principles like namespacing and interactivity. For scientists, it provides a robust solution for symbolic functional programming and rapid prototyping, addressing gaps where Wolfram might excel or simplify complex tasks. The talk includes a live demonstration of Wolframite's usage, highlighting its ability to leverage Wolfram's features, access documentation, and display rich visualizations within the Clojure REPL environment. Wolframite 1.0 is presented as a ready-for-adoption tool aiming to empower both programmers and the numerical scientific community.
Bringing Computational Intelligence to Clojure with Wolframite
0:31 Introduction to Wolframite: The presentation introduces Wolframite, a project aimed at bringing computational intelligence to Clojure by bridging it with the Wolfram Language.
Jakub Holý: A professional developer with extensive interest in data science, based in Norway, who discovered Wolfram's capabilities.
Thomas Clark: A professional physicist, now a Scottish-Hungarian citizen, whose motivation for Wolframite is "to get stuff done."
1:47 Project Funding & History: Wolframite received short-term funding from Clojurists Together and acknowledges decades of prior work by other contributors.
2:39 What is Wolframite? (Mineral Analogy): Wolframite, as a mineral, is a composite of tungsten, iron, and manganese. This serves as an analogy for the project's philosophy: "the whole is greater than the sum of its parts," combining Wolfram, Java's ecosystem, and Clojure.
4:20 Wolframite as a Project: Wolframite aims to combine the "best of Wolfram" (dense computational kernel) with the Java ecosystem, accessible through Clojure, and is part of the broader SciCloj stack.
5:09 What is Wolfram Language?: Wolfram is defined as a general-purpose programming language that emphasizes "computational intelligence," integrating access to knowledge databases, AI, number crunching, and symbolic manipulation, making it incredibly flexible.
6:39 Why Wolframite for Clojure Developers? (Demonstrations):
6:59 Video Editing Example: Demonstrated using ImageBoundingBoxes to detect and outline a dog in a video in just three lines of Wolfram code (and a slightly longer Clojure equivalent), highlighting Wolfram's high-level, smart, and generic functions, built-in knowledge base (e.g., entity for "dog"), and seamless feature combination.
10:16 Geography Example: Shows finding the shortest path between European capitals, using natural language input for data retrieval (semantic interpretation), the built-in knowledge base (Europe, countries, capitals, locations), the FindShortestTour function (for an NP-complete problem), and built-in plotting capabilities.
12:01 Broad Capabilities: Wolfram can handle data across social, cultural, scientific, mathematical, and physical domains, as well as sound, video, text, and language.
13:04 Wolfram is Sometimes Better: Wolfram is "best-in-class" for symbolic functional programming, designed from the ground up for this, unlike general-purpose languages like Python (SymPy). It complements Clojure's capabilities and addresses missing features due to Wolfram's extensive investment.
15:26 Wolfram is Sometimes Easier: High-level APIs (e.g., import HDF file) simplify complex tasks, which is crucial for prototyping and rapid idea testing, especially with Wolfram's 7,000+ globally available functions.
17:43 Wolframite Offers More: Wolfram is powerful but benefits from being embedded in a "toolbox." Clojure, as a functional Lisp connected to the Java ecosystem, is presented as the ideal language for accessing Wolfram.
19:34 Practical Advantages of Wolframite: Offers a free way to use the Wolfram engine (without the full frontend), provides proper namespacing for Wolfram's global functions, allows deep customization (e.g., rewriting language terms, meta-programming with threading macros for math), and improves interactivity via the REPL compared to Wolfram's notebook interface.
Starting Wolframite: Involves running a JVM process that starts a Wolfram Engine process and sets up communication, occasionally using the Wolfram Cloud.
Evaluating Expressions: Shows dot product calculation, using both raw Wolfram strings and Clojure aliases.
Translation & Documentation: Demonstrates translating raw Wolfram into Wolframite syntax and accessing detailed Wolfram documentation pages directly from Clojure.
Displaying Visualizations: Shows plotting graphs, displaying chemical structures (e.g., ethanol), text structures, and complex curves directly within the Clojure environment using Java to render the output.
28:28 Key Wolframite Functions:start-wolframite, to-wolframite, from-wolframite, evaluate, and help. All 7,000+ Wolfram functions are accessible via namespaced vars.
28:52 Extensive Documentation: The project has put significant effort into its documentation, including quick starts, deep dives (e.g., cavity physics), and guides for new users, all rendered as runnable Clojure notebooks.
29:46 Call to Action: Encourages attendees to try Wolframite, spread the word, and engage in discussion and feedback, embodying the "iron sharpens iron" motto.