Metadata-Version: 2.1
Name: lang
Version: 0.1
Summary: import lang.[python,lisp,...]
Author-email: Marco Heisig <marco@heisig.xyz>
Project-URL: source, https://github.com/marcoheisig/lang
Keywords: FFI,Python,Lisp
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Lisp
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE

---
author:
- Marco Heisig
title: 'A library for cross-language interoperability.'
---

The `lang` module/system/library can be loaded from multiple programming
languages to seamlessly integrate all the other supported ones.  The currently
supported languages are Python and Lisp.

Installation
============

Requires libsbcl in your library path if you want to load Lisp into
Python.

Requires libpython3.11 or later in your library path if you want to load
Python into Lisp.

Showcases
=========

``` {.commonlisp org-language="lisp"}
(in-package #:cl-user)
(sb-ext:add-package-local-nickname '#:python '#:lang.python)

(python:list #(1 2.0 #c(3 4) "5 6"))
 => [1, 2.0, #C(3 4) "5 6"]

(python:tuple (python:map #'class-of *))
 => (<class 'lang.common-lisp.fixnum'>,
     <class 'lang.common-lisp.single-float'>,
     <class 'lang.common-lisp.complex'>,
     <class 'lang.sb-kernel.simple-character-string'>)

(python:getitem (python:dir 42) (python:slice 5))
 => ['__class__', '__bool__', '__and__', '__add__', '__abs__']

(python:isinstance (python:getitem (python:dir 42) 0) (find-class 'python:str))
 => True

(typep (python:getitem (python:dir 42) 0) 'python:str)
 => t
```
