Skip to main content

A direct interface with Amalgam compiled DLL or so.

Project description

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.8, 3.9, 3.10, and 3.11

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")

License

License

Contributing

Contributing

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

amalgam-lang-8.0.0.tar.gz (21.3 MB view hashes)

Uploaded Source

Built Distributions

amalgam_lang-8.0.0-py3-none-win_amd64.whl (4.5 MB view hashes)

Uploaded Python 3 Windows x86-64

amalgam_lang-8.0.0-py3-none-manylinux_2_29_x86_64.whl (5.1 MB view hashes)

Uploaded Python 3 manylinux: glibc 2.29+ x86-64

amalgam_lang-8.0.0-py3-none-manylinux_2_29_aarch64.whl (4.5 MB view hashes)

Uploaded Python 3 manylinux: glibc 2.29+ ARM64

amalgam_lang-8.0.0-py3-none-macosx_12_0_x86_64.whl (4.4 MB view hashes)

Uploaded Python 3 macOS 12.0+ x86-64

amalgam_lang-8.0.0-py3-none-macosx_12_0_arm64.whl (2.9 MB view hashes)

Uploaded Python 3 macOS 12.0+ ARM64

amalgam_lang-8.0.0-py3-none-any.whl (21.3 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page