Untitled

⚠️ Caution Ahead

mathematics is not a programming language in the traditional sense. While it is a language for expressing ideas and solving problems, it is not designed specifically for the purpose of controlling computers or creating software. Thus, equating mathematics directly to programming languages may not be entirely valid. This acts as a interesting parody of transforming or imagining Mathematics as some sort of Open Source Programming Language spanning from the ancient era.

What if Mathematics was a programming language?

The Programming Language for the Human Mind

From Practice to Theory

Mathematics is an ancient and evolving programming language, with a long and complex history of development and refinement. It was designed by early civilizations such as Egypt, Mesopotamia, and Greece, who developed the language to solve practical problems such as accounting, measurement, and construction, as a way to express and manipulate numerical and geometric concepts.

Expanding Theory

Over time, these early mathematical ideas were refined and expanded upon by mathematicians such as Euclid, Archimedes, and Pythagoras, who laid the foundation for modern mathematics by defining the syntax and grammar of the language. They developed the core data types and operations that form the foundation of the language, such as numbers, equations, and geometric shapes.

A Unified Git Repository and a explosion of Open Source libraries

As mathematics continued to develop, new concepts and techniques were introduced, such as calculus, algebra, and trigonometry. These new ideas were often the work of individual mathematicians, who introduced new functions, algorithms, and libraries that extended the capabilities of the language. For example, Isaac Newton and Gottfried Leibniz developed the calculus library, while Leonhard Euler developed the library of complex functions.

Let’s devise the mathematics programming language with the Physics library. Here’s Newton’s git pull request back in 1687 that implements the calculateForce method to the Physics library

/**
 * Calculates the gravitational force between two objects, based on their masses and the distance between them.
 *
 * @param {number} mass1 The mass of the first object.
 * @param {number} mass2 The mass of the second object.
 * @param {number} distance The distance between the two objects.
 * @returns {number} The gravitational force between the two objects.
 *
 * @Author Newton (1687)
 */
function calculateForce(mass1, mass2, distance) {
  const G = 6.674e-11; // gravitational constant
  const force = (G * mass1 * mass2) / (distance ** 2);
  return force;
}

In the modern era, mathematics has continued to evolve and expand, with new areas of study such as topology, number theory, and probability theory emerging. Today, mathematics is a global programming language, with contributions from mathematicians all over the world. It is an open-source language, with a community of programmers mathematicians who collaborate to improve and expand the language's capabilities. For example, let’s relook back to Newton’s calculateForce method. It’s apart of the Mathematics Physics library, pull requested back in 1687, and code reviewed and still maintained (subject to revision given a scientific paradigm shift that breaks or updates Newtons law) by the consensus of the open-source scientific community. Many mathematical physicists, a subtype of mathematicians whose specialize in the Physics library, constantly API calls Newton’s code for their everyday physics script - be it a modeling thought experiments, devising practice problems, or designing their own framework. So, here’s an example:

# The Earth to Moon Thought Experiment
import physics from 'physics';

const earthMass = 5.97e24; // mass of the Earth in kilograms
const moonMass = 7.34e22; // mass of the Moon in kilograms
const moonDistance = 3.84e8; // average distance between the Earth and Moon in meters

const gravitationalForce = physics.calculateForce(earthMass, moonMass, moonDistance);

console.log(`The gravitational force between the Earth and Moon is ${gravitationalForce} Newtons.`);

Overall, the history of mathematics can be seen as the evolution of a complex and powerful programming language, with a rich set of libraries, data types, and operations that allow programmers to express complex concepts and solve the toughest problems. By mastering the language of mathematics, mathematicians can unlock the secrets of the universe and push the boundaries of human knowledge and understanding; While also contributing the constantly-evolving mathematics programming language.

You too can learn the language. Here’s the many opportunities for contributing this open-source project:

You could design new libraries, improve, maintain, and refactor existing libraries, provide technical documentation to libraries or the language itself, and you can even spread the popularity by teaching the language to our newest generation.

So, mathematics as if it were a programming language. Here are some of its features:

  1. Syntax: Mathematics has a specific syntax that is used to express mathematical operations and relationships. This syntax includes mathematical symbols, such as +, -, x, ÷, =, and various others, as well as conventions for expressing mathematical functions, equations, and expressions.