Amalgam™
Amalgam™ is a domain specific language (DSL) developed primarily for genetic programming and instance based machine learning, but also for simulation, agent based modeling, data storage and retrieval, the mathematics of probability theory and information theory, and game content and AI. The language format is somewhat LISP-like in that it uses parenthesized list format with prefix notation and is geared toward functional programming, where there is a one-to-one mapping between the code and the corresponding parse tree. The Howso Engine is an example of a program written in Amalgam.
Resources
General Overview
Coding in Amalgam can be done natively as demonstrated in the Amalgam User Guide or through this Amalgam™ Python wrapper. The Python wrapper handles the binaries for the user so the user just needs to worry about the code.
Supported Platforms
Compatible with Python versions: 3.9, 3.10, 3.11, and 3.12.
Operating Systems
| OS | x86_64 | arm64 |
|---|---|---|
| Windows | Yes | No |
| Linux | Yes | Yes |
| MacOS | Yes | Yes |
Install
To install the current release:
pip install amalgam-lang
Usage
This wrapper allows the user to write and execute Amalgam™ code in Python, just like any other Python program. Once the wrapper is imported, the code handles like native Python code as shown below:
from amalgam.api import Amalgam
import json
amlg = Amalgam()
# Load entity .amlg or .caml file
amlg.load_entity("handle_name", "/path/to/file.amlg")
# Execute a label in the loaded entity, passing parameters as JSON
response = amlg.execute_entity_json("handle_name", "label_name", json.dumps({ "abc": 123 }))
result = json.loads(response)
The wrapper handles the Amalgam language binary (so/dll/dylib) automatically for the user, however the default binary can be overridden using the library_path parameter.
amlg = Amalgam(library_path="/path/to/amalgam-mt.so")
Testing
There is a Pytest unit test suite located in amalgam/test. The tests in test_standalone.py will only execute if an Amalgam binary is located in the default expected path of amalgam/lib/{os}/{architecture}.
To specify whether test_standalone.py should use single-threaded or multi-threaded Amalgam (assuming the appropriate binary is in the above path), set the AMALGAM_LIBRARY_POSTFIX environment variable to the desired postfix, e.g., -st or -mt.
License
Contributing
Metadata
Release files for amalgam-lang 16.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| amalgam_lang-16.1.0.tar.gz | 66.5 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| amalgam_lang-16.1.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| amalgam_lang-16.1.0-py3-none-manylinux_2_29_x86_64.whl | Python 3 | none | Linux glibc 2.29+ x86-64 | Details |
| amalgam_lang-16.1.0-py3-none-manylinux_2_29_aarch64.whl | Python 3 | none | Linux glibc 2.29+ ARM64 | Details |
| amalgam_lang-16.1.0-py3-none-manylinux_2_28_x86_64.whl | Python 3 | none | Linux glibc 2.28+ x86-64 | Details |
| amalgam_lang-16.1.0-py3-none-macosx_12_0_x86_64.whl | Python 3 | none | macOS 12.0+ x86-64 | Details |
| amalgam_lang-16.1.0-py3-none-macosx_12_0_arm64.whl | Python 3 | none | macOS 12.0+ ARM64 | Details |
| amalgam_lang-16.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 248.3 MB
Release files / amalgam_lang-16.1.0.tar.gz
| Download URL | amalgam_lang-16.1.0.tar.gz |
|---|---|
| Size | 66.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f1213b9f95d2f62fe820f4f64aef5351ea9e37ac2fdb05bd1078695478d74211
|
|
BLAKE2b-256 checksum How to use checksums |
b55fdd4542e3040944a3a9076700f561d934eed3d07c77a74d2e60b6b3191ff4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Release files / amalgam_lang-16.1.0-py3-none-win_amd64.whl
| Download URL | amalgam_lang-16.1.0-py3-none-win_amd64.whl |
|---|---|
| Size | 4.8 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
13d613ee02b2e0caa949f3031e261fd410c87d39d0f038e6be3acc38f9aaade8
|
|
BLAKE2b-256 checksum How to use checksums |
6828193d413ae6e4d46070e78c3b23938e67e601641980fad23a6a1abd0a2e10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Release files / amalgam_lang-16.1.0-py3-none-manylinux_2_29_x86_64.whl
| Download URL | amalgam_lang-16.1.0-py3-none-manylinux_2_29_x86_64.whl |
|---|---|
| Size | 47.8 MB |
| Tags | Linux glibc 2.29+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
3e209eeff925acc3aa0cf5ac7923ce981fc9c42f9607ec8616aa70deb122a42f
|
|
BLAKE2b-256 checksum How to use checksums |
5b6f8dee06707fb55aa3ec2c454b4bf40cbb338b527cb93bb0b9825389a8d095
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Release files / amalgam_lang-16.1.0-py3-none-manylinux_2_29_aarch64.whl
| Download URL | amalgam_lang-16.1.0-py3-none-manylinux_2_29_aarch64.whl |
|---|---|
| Size | 5.5 MB |
| Tags | Linux glibc 2.29+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
21bc260a557080d420169a0c50ec166dbb2d642312a8ceccf781394a94de0835
|
|
BLAKE2b-256 checksum How to use checksums |
98df2961ba21d850f4d9fe265ec53856b845ccdc026d5ffb0edb335c7090b600
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Release files / amalgam_lang-16.1.0-py3-none-manylinux_2_28_x86_64.whl
| Download URL | amalgam_lang-16.1.0-py3-none-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 48.0 MB |
| Tags | Linux glibc 2.28+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
fa5a087ad550a00f110f5a0f73902f4c6aef167850c6101ce67a7a3e82f084b2
|
|
BLAKE2b-256 checksum How to use checksums |
caf57cbc3c674e8a32e1ce59d2592b1970fbaa8f4816413a94a4d1d904343158
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Release files / amalgam_lang-16.1.0-py3-none-macosx_12_0_x86_64.whl
| Download URL | amalgam_lang-16.1.0-py3-none-macosx_12_0_x86_64.whl |
|---|---|
| Size | 5.5 MB |
| Tags | Python 3 macOS 12.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
80ec7f8f5ef162d5515a36a3b40602b73a2d41999a940410158c3eca21126218
|
|
BLAKE2b-256 checksum How to use checksums |
860840df82932739cdb02dd2fa8557e185a645c05faf7e2316f2c78b18255a4f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Release files / amalgam_lang-16.1.0-py3-none-macosx_12_0_arm64.whl
| Download URL | amalgam_lang-16.1.0-py3-none-macosx_12_0_arm64.whl |
|---|---|
| Size | 3.3 MB |
| Tags | Python 3 macOS 12.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
183896437cbbef0977a4f025ebcec71115324c8889a740551690a39d5ddb325e
|
|
BLAKE2b-256 checksum How to use checksums |
94f87d5cf2dd29ac5f1f3fa755014ffe804c8ecf9333c918b8be70212709cce6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Release files / amalgam_lang-16.1.0-py3-none-any.whl
| Download URL | amalgam_lang-16.1.0-py3-none-any.whl |
|---|---|
| Size | 66.8 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a4729dcb9c239797e1dfb5357dad5b9694ca71498f284bd2d54c5b7f7983f7ff
|
|
BLAKE2b-256 checksum How to use checksums |
0181473b261b63cb30e3c46987aa430d82fd475327640ac0a681d48897688be0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|