Re: Morning Spam
On Fri, May 01, 2026 at 07:32:48PM -0400, funkymail wrote:
On Fri, May 01, 2026 at 07:23:59PM -0400, funkymail via cypherpunks wrote:
On Fri, May 01, 2026 at 07:20:29PM -0400, Undescribed Horrific Abuse, One Victim & Survivor of Many via cypherpunks wrote:
this one disputed
boss, grassroots activist after torture, and third party sit at a table
boss: "oh no what is this about oh no oh no"
grassroots activist after torture: "i asked to speak with boss because --"
boss: "oh no"
third party: "boss, you have to let him speak"
boss: "oh n--" [boss squirms and tries to grunt and cough and spasm at precisely chosen times to prevent gaat from speaking or end the meeting]
grassroots activist after torture: "i asked to speak with you because i'm struggling with a problem"
boss [raise eyebrow]: "oh n -- yes?"
grassroots activist after torture: "i'm .... trying to be productive"
boss: "oh no this isn't going to end well oh no"
third party: "what is the big issue?"
boss looks at third party
boss: "do you know somebody called torture victim double agent?:
third party: "why?"
boss almost speaks but is quiet and conflicted
grassroots activist after torture: "but i know it's evil to be productive --"
third party: "whaaat?:
boss dislocates his limbs to get out of his restraints and flees back to hyperprison
grassroots activist after torture [calling after boss]: "you have to hire me! i want to be a good person who works for you and doesn't do evil productive things! you have to!"
i'm starting to smidgily understand this conceptual thread better and am putting a reply in so funkymail gets the reply headers.
let's see if i can fudge it a little
uhhhhhhhhhh lots corrupt and dropped
gaat: "slave boss i am happy to vote for you! i am so happy to! i hate being tortured and watching my loved ones d--"
slave boss [interrupting -- thinking quickly on his feet]: "this persob was saying they're happy to vote for me and that they agree with my policy that torture and harm must be ended--
ohhh hey gaat ans tvda really similar huh [confused]
_i_ have experiences and influence boss won't make deal because doesn't trust me to keep secret of being tortured and coerced T_T T_T
many years this confusing situation of influence patterns causing extreme harm for me and some exposure for torturer both confusing
lots of info missing, painful
long story agort it's hard to learn to lie consciously among amnesia triggers. influence boss thought i was guilty of felonies and would join crime grouo. instead i would rather be incriminated to get any felonies over with. is confusing for all. so influence boss has pie on face for having to cover up his attempt to pin them on me or something.
still lots of confusion to realize.
https://ar.anyone.tech/O8kA93S8n06-Liq53ui3LJSevPZdBaKN7qeJdgaIjeA#qJdU-ReR4... https://ar.anyone.tech/IKPmvG8mAFWYVwcVOtBk0FWBsipPNW6HAUDcy94dHmU I am not affiliated with https://ar.anyone.tech .
well it's really frightening and dangerous to say, but they keep me away from people they think of as "hippies" and also harm and destroy communitirs i see they think of this way
i think this is why i had nightmares at my airbnb which had new age decorations (and may be woman run)
it's ghe same old disruption stuff where community members were pinned;for each others' murders decades ago
i learbed two tiny branches about it
(1) i was with a right-wing rural woman and she seemed ti thibk of communes as "orgies". so somebody's describing communal behavior as harmful and gross.
(2) my inner system has more of a feeling of me being useful and resourceful and stuff and (a) not wanting to empower left wing "hippie" groups by connecting them with me (also (b) not wanting to deprogram me and make me more left wing but these seems a different branch)
so i'm a little confused / anxiousha but i've been through it before, much more aware atm! my parts gotta figure out where i sleep after this. might do hotels more :/ but maybe it would make sense to find like a right-wing-seeming rental it's just gross to participate more in the devastation of the left-wing communities by getting close to the energy when it's active in me
maybe sonething neutral :)
https://ar.anyone.tech/ud3zQhB88XH0adan48gFRmcM35mz7d0GeV3yKJ1UZnA#qJdU-ReR4... https://ar.anyone.tech/zFlufR-GadNLpLN8FjGfWqQaqHXuXKOGIKP3YIOJbeg I am not affiliated with https://ar.anyone.tech .
did the reply wrong this is pretty tense stuff gotta figure out how to move forward often done with more spam :) https://ar.anyone.tech/y2TVmzFcbkeOpWte0dPQ3Y0dtOMfNfD3MiKcGpzuB10#NV1O98b23... https://ar.anyone.tech/MGD2J2rFVYOcDP8v5dYMjFpv228RHMTxfMVvsJZ5Zpg I am not affiliated with https://ar.anyone.tech .
it's so much fun to have mined emails!!!!!!!! hehe i looked at my;forwatd and there was no date information this spam thread is many years old densely packed with this stuff it's ... hard to think about :! but now each message gets a mined timestamp !! i dunno if i'll be able to keep it up but it's awesome :D i'm still learning/relearning/reforgettingandrelearning neomutt and stuff it's pretty hard to find emails in it or update my mai--
https://ar.anyone.tech/O8kA93S8n06-Liq53ui3LJSevPZdBaKN7qeJdgaIjeA#qJdU-ReR4... https://ar.anyone.tech/IKPmvG8mAFWYVwcVOtBk0FWBsipPNW6HAUDcy94dHmU I am not affiliated with https://ar.anyone.tech .
well it's really frightening and dangerous to say,
https://ar.anyone.tech/ud3zQhB88XH0adan48gFRmcM35mz7d0GeV3yKJ1UZnA#qJdU-ReR4... https://ar.anyone.tech/zFlufR-GadNLpLN8FjGfWqQaqHXuXKOGIKP3YIOJbeg
https://ar.anyone.tech/y2TVmzFcbkeOpWte0dPQ3Y0dtOMfNfD3MiKcGpzuB10#NV1O98b23... https://ar.anyone.tech/MGD2J2rFVYOcDP8v5dYMjFpv228RHMTxfMVvsJZ5Zpg
so frogs terror boss decided hhe would be disastrous weather events it is not revealed whether his upsetness stimulated AIs to stimulate weather engineering businesses or whether he was actually up in the clouds like a big ghostly visage frowning at coastal villages and unleashing disasters but he felt satosfied to cause floods and;wreckage. he knew he was expressing himself successfu-- https://ar.anyone.tech/rdBPAD2euwCt6ujADABUuKF3WL3bY9PYUfW5-53NvyQ#Jg-CEUife... https://ar.anyone.tech/mBiURpojcLB1AOUlS7kaNl9DUmp0ATjCI7OVh6y5DGU I am not affiliated with https://ar.anyone.tech .
On Fri, May 01, 2026 at 07:53:56PM -0400, funkymail via cypherpunks wrote:
it's so much fun to have mined emails!!!!!!!!
hehe i looked at my;forwatd and there was no date information this spam thread is many years old densely packed with this stuff
it's ... hard to think about :!
but now each message gets a mined timestamp !!
i dunno if i'll be able to keep it up but it's awesome :D
i'm still learning/relearning/reforgettingandrelearning neomutt and stuff it's pretty hard to find emails in it or update my mai--
https://ar.anyone.tech/O8kA93S8n06-Liq53ui3LJSevPZdBaKN7qeJdgaIjeA#qJdU-ReR4... https://ar.anyone.tech/IKPmvG8mAFWYVwcVOtBk0FWBsipPNW6HAUDcy94dHmU I am not affiliated with https://ar.anyone.tech .
well it's really frightening and dangerous to say,
https://ar.anyone.tech/ud3zQhB88XH0adan48gFRmcM35mz7d0GeV3yKJ1UZnA#qJdU-ReR4... https://ar.anyone.tech/zFlufR-GadNLpLN8FjGfWqQaqHXuXKOGIKP3YIOJbeg
https://ar.anyone.tech/y2TVmzFcbkeOpWte0dPQ3Y0dtOMfNfD3MiKcGpzuB10#NV1O98b23... https://ar.anyone.tech/MGD2J2rFVYOcDP8v5dYMjFpv228RHMTxfMVvsJZ5Zpg
so frogs
terror boss decided hhe would be disastrous weather events
it is not revealed whether his upsetness stimulated AIs to stimulate weather engineering businesses
or whether he was actually up in the clouds like a big ghostly visage frowning at coastal villages and unleashing disasters
but he felt satosfied to cause floods and;wreckage. he knew he was expressing himself successfu--
https://ar.anyone.tech/rdBPAD2euwCt6ujADABUuKF3WL3bY9PYUfW5-53NvyQ#Jg-CEUife... https://ar.anyone.tech/mBiURpojcLB1AOUlS7kaNl9DUmp0ATjCI7OVh6y5DGU I am not affiliated with https://ar.anyone.tech .
note to self that i want to not be irritated. slows trauma recovery. tbe space the realization landed in validates not spamming these ways. backs up if i can choose with that reason. gets funny sharing :/ but is nice note to add. i want to not energize irritation. harm feedback loops worsen trauma. no bad feedback encouragement :) so what to do if wrong-wrong ? :s unsure i guess it's in layers. basically we try not to have copies/echos/etc of bad things. this is part of what wise message is :) so it's ok if can't control, just don't repeat. https://ar.anyone.tech/NcOQYJTLaodGAb6624qM-ccDscRF6ya4oDy9sbwSWyQ#o88odFv7W... https://ar.anyone.tech/y1Aw36M0hxUusjPKUTc5nUQ9AZEeRD-FVKs7fkDPHKI I am not affiliated with https://ar.anyone.tech .
but now each message gets a mined timestamp !!
https://ar.anyone.tech/O8kA93S8n06-Liq53ui3LJSevPZdBaKN7qeJdgaIjeA#qJdU-ReR4... well it's really frightening and dangerous to say, https://ar.anyone.tech/ud3zQhB88XH0adan48gFRmcM35mz7d0GeV3yKJ1UZnA#qJdU-ReR4...
https://ar.anyone.tech/y2TVmzFcbkeOpWte0dPQ3Y0dtOMfNfD3MiKcGpzuB10#NV1O98b23... frowning at coastal villages and unleashing disasters https://ar.anyone.tech/rdBPAD2euwCt6ujADABUuKF3WL3bY9PYUfW5-53NvyQ#Jg-CEUife... note to self that i want to not be irritated. slows trauma recovery. https://ar.anyone.tech/NcOQYJTLaodGAb6624qM-ccDscRF6ya4oDy9sbwSWyQ#o88odFv7W...
partial/incomplete/dropped/corrupted/sent at wrong time sorries ummmm :>:s so uhhhh these new workers came to the ohhh wow oop umm maybe i will try at diffrtent time :) https://ar.anyone.tech/-OSHjeIIMEJdqrMlk119hYnRyVxNuz-g68Rg7E2tYsU#28EWELJSQ... https://ar.anyone.tech/qJ6E-Mfl0CClGz-d10Fxluww2caQY6l8fepKQ-O3iac I am not affiliated with https://ar.anyone.tech .
On Thu, May 07, 2026 at 08:41:11PM -0400, funkymail via cypherpunks wrote:
but now each message gets a mined timestamp !!
https://ar.anyone.tech/O8kA93S8n06-Liq53ui3LJSevPZdBaKN7qeJdgaIjeA#qJdU-ReR4... well it's really frightening and dangerous to say, https://ar.anyone.tech/ud3zQhB88XH0adan48gFRmcM35mz7d0GeV3yKJ1UZnA#qJdU-ReR4...
https://ar.anyone.tech/y2TVmzFcbkeOpWte0dPQ3Y0dtOMfNfD3MiKcGpzuB10#NV1O98b23... frowning at coastal villages and unleashing disasters https://ar.anyone.tech/rdBPAD2euwCt6ujADABUuKF3WL3bY9PYUfW5-53NvyQ#Jg-CEUife... note to self that i want to not be irritated. slows trauma recovery. https://ar.anyone.tech/NcOQYJTLaodGAb6624qM-ccDscRF6ya4oDy9sbwSWyQ#o88odFv7W...
partial/incomplete/dropped/corrupted/sent at wrong time
sorries ummmm :>:s
so uhhhh these new workers came to the ohhh wow oop umm maybe i will try at diffrtent time :)
https://ar.anyone.tech/-OSHjeIIMEJdqrMlk119hYnRyVxNuz-g68Rg7E2tYsU#28EWELJSQ... https://ar.anyone.tech/qJ6E-Mfl0CClGz-d10Fxluww2caQY6l8fepKQ-O3iac
i'm putting this in morning spam because it seems big and impactful below considered dangerous unless mutated 1. maybe the halting problem is solvable if the solution prevents diagonalization and such 2. minikanren looks useful for that task! 3. whoah these words 'goal' and 'fact' in minikanren's docs really powerfully trigger my AI inhibitions, why did they use them? maybe i can filter it to remove those words 4. omigod after looking at this "halting decider" workfolder something in me is trying to prevent me from _ever writing any code at all_ and attacking associated things, associated with some story of being a mind controlled spy and having to steal technologies https://ar.anyone.tech/n_WPuWZsTdTMse4lNtgBlr7Af9WiKaEN7S9X6zmk4D8#WomyRj7UK... https://ar.anyone.tech/LhbkKayOTQed27dtQKo4SM4rpgJzY8_afepm0c7Lgfw I am not affiliated with https://ar.anyone.tech .
On Tue, Jun 30, 2026 at 04:04:15PM -0400, funkymail via cypherpunks wrote:
On Thu, May 07, 2026 at 08:41:11PM -0400, funkymail via cypherpunks wrote:
but now each message gets a mined timestamp !!
> https://ar.anyone.tech/O8kA93S8n06-Liq53ui3LJSevPZdBaKN7qeJdgaIjeA#qJdU-ReR4... well it's really frightening and dangerous to say, https://ar.anyone.tech/ud3zQhB88XH0adan48gFRmcM35mz7d0GeV3yKJ1UZnA#qJdU-ReR4...
https://ar.anyone.tech/y2TVmzFcbkeOpWte0dPQ3Y0dtOMfNfD3MiKcGpzuB10#NV1O98b23... frowning at coastal villages and unleashing disasters https://ar.anyone.tech/rdBPAD2euwCt6ujADABUuKF3WL3bY9PYUfW5-53NvyQ#Jg-CEUife... note to self that i want to not be irritated. slows trauma recovery. https://ar.anyone.tech/NcOQYJTLaodGAb6624qM-ccDscRF6ya4oDy9sbwSWyQ#o88odFv7W...
partial/incomplete/dropped/corrupted/sent at wrong time
sorries ummmm :>:s
so uhhhh these new workers came to the ohhh wow oop umm maybe i will try at diffrtent time :)
https://ar.anyone.tech/-OSHjeIIMEJdqrMlk119hYnRyVxNuz-g68Rg7E2tYsU#28EWELJSQ... https://ar.anyone.tech/qJ6E-Mfl0CClGz-d10Fxluww2caQY6l8fepKQ-O3iac
i'm putting this in morning spam because it seems big and impactful
below considered dangerous unless mutated
1. maybe the halting problem is solvable if the solution prevents diagonalization and such 2. minikanren looks useful for that task! 3. whoah these words 'goal' and 'fact' in minikanren's docs really powerfully trigger my AI inhibitions, why did they use them? maybe i can filter it to remove those words 4. omigod after looking at this "halting decider" workfolder something in me is trying to prevent me from _ever writing any code at all_ and attacking associated things, associated with some story of being a mind controlled spy and having to steal technologies
https://ar.anyone.tech/n_WPuWZsTdTMse4lNtgBlr7Af9WiKaEN7S9X6zmk4D8#WomyRj7UK... https://ar.anyone.tech/LhbkKayOTQed27dtQKo4SM4rpgJzY8_afepm0c7Lgfw
Below is the kanren project that stinulated me. <attempts to discuss my history with hobby AI> I have not (yet?) read their paper but I uploaded it to {"id": "nttSN6yBFgGT1PnlIWGELAlx8vchWIq4QHf6efncFF4", "timestamp": 1782850523045, "winc": "0", "version": "0.2.0", "deadlineHeight": 1949753, "dataCaches": ["turbo-gateway.com"], "fastFinalityIndexes": ["turbo-gateway.com"], "public": "wZgP9Rpfh0nXb5EdzBUg7y2LFMkBp2ADX3gdZhLXHYbz4srlYD6FUGn6Tt-WsSYj8faUyA7bNKj9zzcXiN-bsMC73e0yoQ05A_5I2QnBAgCTuzXePvUVCvSCOg1vdh07hSjvSBd1XiWDHw2J-Z7m6lG3l56PDSCp8t-s0PduONcsjqOePFejzkaJymJxMYp7d0g0GL1i1MrBAbf5ohIobyTYQz7bRHLLUpdSgiCiHbSBp092cIQnHYXGBeWb-lBEtMT9Am5GsHeVXq4eL8H83NBPIN4fIOtwpl7zzBUeaD5lTc3UcXliMjFuFJurVmNhqsP_osJMceybk3VIjdP0biqLqt_nRupdPwwJGQ09iyGv0wfzMBlx7zTZ9pp77ZBX3cDnYmWt2IR-mIgOStfiEHu5BuwNGBvGt7-tzHJp9e6IOofN10apfiuF9iQEQ3gFVQDZ7owQ_IrCq5yWLP7ePwYoB2e7ZbvCkd4JM8oOgEMZkywTOx3gLASGKS7wqUerdlYacWRukqg5MmkQRbzJIiY23pPwrhQSWon5q91jbImO6vTaHVDZnd2GoMFlePAsceNO1MaLS6GMuY-EAwOtaX-R1QZUpJmCzWfV-77AmBmaPDCR0mm3f7jy-3yYSCMAkti4idHVq5dIhOJnibd_LEfQtkTAQ5MQlE4uoa5lkJs", "signature": "HZ8B6_3m-7zMaaevas0aYd19EY3PAsA4YHWrnVcGWD1oLwvdrWS7J5CkiZp0gp_G7jbLhSij6gso9Cntm06pVa2nBh4LDvBUFuqtv6c1eAmp9tpOQsw4U_PuLdPcikVTUh9yfOf7qRKsZE3m_x0RCWsVsnV_oxBea-XGZ8MaFcD4Q9rIft0q4o1sMYLEp6ce4kOiVgvN3mShD2tahGt6wNT16uwuRdX8HzfDD4gB7_8jzp2YCxlzDR3MZ5o15hheaDXqHzEKEdEQdZvteJJRA8UoSaXOh-f9cplVHdeH-zMqhYJjo_ftryY4DRa-y-UAAlO1WIQwZja8XQaaI-FSlcFEEcH7rWBmXMl3b79FXujtNgQRwMwe7fKNoe28VegkBuZks7EzFU3eE6Zr8xNe9_gJR8jiRQRhDR1ZVzLBswinZsqdg4rF4FB1zwLxzxhB15J8j2VMN2ejb-aIfiqnf3mmOEPFWy28kRTrG7xWCmBaqq_BaXfSN4dKRiMBy9oE1dyTm7r9h1ecC3V3nANdrdD1NNoKhCgMmiJnIJqTZLdnSckgPKAdVeFb5db7pjhLgK8oDbwOUbYBtTu2LUgD1GcHKGne6_Js_vx3vy5ADauoO-2d0xqisQNQxVy_TQt2jhvYqK1XqHZtJ7yLpwe-CkPzFk5xYh1pZVg1uSGXcrg", "owner": "uJ8Bfxaa39C3dU4a9G9nuomjyhc9p1nVNYdO0bMNJCo", "name": "2005.11644v3.pdf", "size": 661912, "start_height": 1949553, "start_block": "lwy_wLxde2ZbKr9SH5ilqO7KbqM0pkaOx1ElyPftZbDH7eCU_HzEZcByW8PXAL6C", "depth": 2, "_blake2b": "22c9390570fe8cab87d88acae7c6132339f5a880550c6a3fa0e301efecc05fc8e720a9db1528584c7ad8eb1c73a5c69ebc1f762323894095e59c9315109502ab", "_sha256": "d18d4fbeb4335533e1ea0198e11b8ae9975e59b4fbfb189c678299afebbf9410", "off": 0}. https://github.com/pythological/kanren # `kanren` [](https://travis-ci.org/pythological/kanren) [](https://coveralls.io/github/pythological/kanren?branch=main) [](https://pypi.org/project/miniKanren/) [](https://gitter.im/pythological/kanren?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) Logic/relational programming in Python with [miniKanren](http://minikanren.org/). ## Installation Using `pip`: ```bash pip install miniKanren ``` Using `conda`: ```bash conda install -c conda-forge miniKanren ``` ## Development First obtain the project source: ```bash git clone git@github.com:pythological/kanren.git cd kanren ``` Install the development dependencies: ```bash $ pip install -r requirements.txt ``` Set up `pre-commit` hooks: ```bash $ pre-commit install --install-hooks ``` Tests can be run with the provided `Makefile`: ```bash make check ``` ## Motivation Logic programming is a general programming paradigm. This implementation however came about specifically to serve as an algorithmic core for Computer Algebra Systems in Python and for the automated generation and optimization of numeric software. Domain specific languages, code generation, and compilers have recently been a hot topic in the Scientific Python community. `kanren` aims to be a low-level core for these projects. These points—along with `kanren` examples—are covered in the paper ["miniKanren as a Tool for Symbolic Computation in Python"](https://arxiv.org/abs/2005.11644). ## Examples `kanren` enables one to express sophisticated relations—in the form of *goals*—and generate values that satisfy the relations. The following code is the "Hello, world!" of logic programming; it asks for values of the *logic variable* `x` such that `x == 5`: ```python
from kanren import run, eq, membero, var, lall x = var() run(1, x, eq(x, 5)) (5,)
Multiple logic variables and goals can be used simultaneously. The following code asks for one list containing the values of `x` and `z` such that `x == z` **and** `z == 3`:
```python
>>> z = var()
>>> run(1, [x, z], eq(x, z),
eq(z, 3))
([3, 3],)
`kanren` uses [unification](http://en.wikipedia.org/wiki/Unification_%28computer_science%29) to match forms within expression trees. The following code asks for values of `x` such that `(1, 2) == (1, x)`: ```python
run(1, x, eq((1, 2), (1, x))) (2,)
The above examples use `eq`: a *goal constructor* that creates a goal for unification between two objects. Other goal constructors, such as `membero(item, coll)`, express more sophisticated relations and are often constructed from simpler ones like `eq`. More specifically, `membero` states that `item` is a member of the collection `coll`.
The following example uses `membero` to ask for *all* values of `x`, such that `x` is a member of `(1, 2, 3)` **and** `x` is a member of `(2, 3, 4)`.
```python
>>> run(0, x, membero(x, (1, 2, 3)), # x is a member of (1, 2, 3)
membero(x, (2, 3, 4))) # x is a member of (2, 3, 4)
(2, 3)
The examples above made implicit use of the goal constructors `lall` and `lany`, which represent goal *conjunction* and *disjunction*, respectively. Many useful relations can be expressed with `lall`, `lany`, and `eq` alone, but in `kanren` it's also easy to leverage the host language and explicitly create any relation expressible in Python. ### Representing Knowledge `kanren` stores data as facts that state relationships between terms. The following code creates a parent relationship and uses it to state facts about who is a parent of whom within the Simpsons family: ```python
from kanren import Relation, facts parent = Relation() facts(parent, ("Homer", "Bart"), ... ("Homer", "Lisa"), ... ("Abe", "Homer"))
run(1, x, parent(x, "Bart")) ('Homer',)
run(2, x, parent("Homer", x)) ('Lisa', 'Bart')
We can use intermediate variables for more complex queries. For instance, who is Bart's grandfather?
```python
>>> grandparent_lv, parent_lv = var(), var()
>>> run(1, grandparent_lv, parent(grandparent_lv, parent_lv),
parent(parent_lv, 'Bart'))
('Abe',)
We can express the grandfather relationship as a distinct relation by creating a goal constructor: ```python
def grandparent(x, z): ... y = var() ... return lall(parent(x, y), parent(y, z))
run(1, x, grandparent(x, 'Bart')) ('Abe,')
## Constraints
`kanren` provides a fully functional constraint system that allows one to restrict unification and object types:
```python
>>> from kanren.constraints import neq, isinstanceo
>>> run(0, x,
... neq(x, 1), # Not "equal" to 1
... neq(x, 3), # Not "equal" to 3
... membero(x, (1, 2, 3)))
(2,)
>>> from numbers import Integral
>>> run(0, x,
... isinstanceo(x, Integral), # `x` must be of type `Integral`
... membero(x, (1.1, 2, 3.2, 4)))
(2, 4)
## Graph Relations `kanren` comes with support for relational graph operations suitable for basic symbolic algebra operations. See the examples in [`doc/graphs.md`](doc/graphs.md). ## Extending `kanren` `kanren` uses the [`logical-unification` library](https://github.com/pythological/unification) to support pattern matching on user defined types. Essentially, types that can be unified can be used with most `kanren` goals. See the [`logical-unification` project's examples](https://github.com/pythological/unification#examples) for demonstrations of how arbitrary types can be made unifiable. ## About This project is a fork of [`logpy`](https://github.com/logpy/logpy). ## References * [Logic Programming on wikipedia](http://en.wikipedia.org/wiki/Logic_programming) * [miniKanren](http://minikanren.org/), a Scheme library for relational programming on which this library is based. More information can be found in the [thesis of William Byrd](https://scholarworks.iu.edu/dspace/bitstream/handle/2022/8777/Byrd_indiana_0...). https://ar.anyone.tech/a_2cEOI4MB5OXryyrptLGdokPqtipuq9Rh2ysUPWBEM#r0ntPH9ka... https://ar.anyone.tech/kj410u9D72aS0wpO0DYZ3MphwtSRtS4GGYlgbWorX7k I am not affiliated with https://ar.anyone.tech .
but now each message gets a mined timestamp !!
> > https://ar.anyone.tech/O8kA93S8n06-Liq53ui3LJSevPZdBaKN7qeJdgaIjeA#qJdU-ReR4... > well it's really frightening and dangerous to say, > https://ar.anyone.tech/ud3zQhB88XH0adan48gFRmcM35mz7d0GeV3yKJ1UZnA#qJdU-ReR4...
https://ar.anyone.tech/y2TVmzFcbkeOpWte0dPQ3Y0dtOMfNfD3MiKcGpzuB10#NV1O98b23... frowning at coastal villages and unleashing disasters https://ar.anyone.tech/rdBPAD2euwCt6ujADABUuKF3WL3bY9PYUfW5-53NvyQ#Jg-CEUife... note to self that i want to not be irritated. slows trauma recovery. https://ar.anyone.tech/NcOQYJTLaodGAb6624qM-ccDscRF6ya4oDy9sbwSWyQ#o88odFv7W...
partial/incomplete/dropped/corrupted/sent at wrong time
sorries ummmm :>:s
so uhhhh these new workers came to the ohhh wow oop umm maybe i will try at diffrtent time :)
https://ar.anyone.tech/-OSHjeIIMEJdqrMlk119hYnRyVxNuz-g68Rg7E2tYsU#28EWELJSQ... https://ar.anyone.tech/qJ6E-Mfl0CClGz-d10Fxluww2caQY6l8fepKQ-O3iac
i'm putting this in morning spam because it seems big and impactful
below considered dangerous unless mutated
1. maybe the halting problem is solvable if the solution prevents diagonalization and such 2. minikanren looks useful for that task! 3. whoah these words 'goal' and 'fact' in minikanren's docs really powerfully trigger my AI inhibitions, why did they use them? maybe i can filter it to remove those words 4. omigod after looking at this "halting decider" workfolder something in me is trying to prevent me from _ever writing any code at all_ and attacking associated things, associated with some story of being a mind controlled spy and having to steal technologies
https://ar.anyone.tech/n_WPuWZsTdTMse4lNtgBlr7Af9WiKaEN7S9X6zmk4D8#WomyRj7UK... https://ar.anyone.tech/LhbkKayOTQed27dtQKo4SM4rpgJzY8_afepm0c7Lgfw
Below is the kanren project that stinulated me. <attempts to discuss my history with hobby AI> I have not (yet?) read their paper but I uploaded it to {"id": "nttSN6yBFgGT1PnlIWGELAlx8vchWIq4QHf6efncFF4", "timestamp": 1782850523045, "winc": "0", "version": "0.2.0", "deadlineHeight": 1949753, "dataCaches": ["turbo-gateway.com"], "fastFinalityIndexes": ["turbo-gateway.com"], "public": "wZgP9Rpfh0nXb5EdzBUg7y2LFMkBp2ADX3gdZhLXHYbz4srlYD6FUGn6Tt-WsSYj8faUyA7bNKj9zzcXiN-bsMC73e0yoQ05A_5I2QnBAgCTuzXePvUVCvSCOg1vdh07hSjvSBd1XiWDHw2J-Z7m6lG3l56PDSCp8t-s0PduONcsjqOePFejzkaJymJxMYp7d0g0GL1i1MrBAbf5ohIobyTYQz7bRHLLUpdSgiCiHbSBp092cIQnHYXGBeWb-lBEtMT9Am5GsHeVXq4eL8H83NBPIN4fIOtwpl7zzBUeaD5lTc3UcXliMjFuFJurVmNhqsP_osJMceybk3VIjdP0biqLqt_nRupdPwwJGQ09iyGv0wfzMBlx7zTZ9pp77ZBX3cDnYmWt2IR-mIgOStfiEHu5BuwNGBvGt7-tzHJp9e6IOofN10apfiuF9iQEQ3gFVQDZ7owQ_IrCq5yWLP7ePwYoB2e7ZbvCkd4JM8oOgEMZkywTOx3gLASGKS7wqUerdlYacWRukqg5MmkQRbzJIiY23pPwrhQSWon5q91jbImO6vTaHVDZnd2GoMFlePAsceNO1MaLS6GMuY-EAwOtaX-R1QZUpJmCzWfV-77AmBmaPDCR0mm3f7jy-3yYSCMAkti4idHVq5dIhOJnibd_LEfQtkTAQ5MQlE4uoa5lkJs", "signature": "HZ8B6_3m-7zMaaevas0aYd19EY3PAsA4YHWrnVcGWD1oLwvdrWS7J5CkiZp0gp_G7jbLhSij6gso9Cntm06pVa2nBh4LDvBUFuqtv6c1eAmp9tpOQsw4U_PuLdPcikVTUh9yfOf7qRKsZE3m_x0RCWsVsnV_oxBea-XGZ8MaFcD4Q9rIft0q4o1sMYLEp6ce4kOiVgvN3mShD2tahGt6wNT16uwuRdX8HzfDD4gB7_8jzp2YCxlzDR3MZ5o15hheaDXqHzEKEdEQdZvteJJRA8UoSaXOh-f9cplVHdeH-zMqhYJjo_ftryY4DRa-y-UAAlO1WIQwZja8XQaaI-FSlcFEEcH7rWBmXMl3b79FXujtNgQRwMwe7fKNoe28VegkBuZks7EzFU3eE6Zr8xNe9_gJR8jiRQRhDR1ZVzLBswinZsqdg4rF4FB1zwLxzxhB15J8j2VMN2ejb-aIfiqnf3mmOEPFWy28kRTrG7xWCmBaqq_BaXfSN4dKRiMBy9oE1dyTm7r9h1ecC3V3nANdrdD1NNoKhCgMmiJnIJqTZLdnSckgPKAdVeFb5db7pjhLgK8oDbwOUbYBtTu2LUgD1GcHKGne6_Js_vx3vy5ADauoO-2d0xqisQNQxVy_TQt2jhvYqK1XqHZtJ7yLpwe-CkPzFk5xYh1pZVg1uSGXcrg", "owner": "uJ8Bfxaa39C3dU4a9G9nuomjyhc9p1nVNYdO0bMNJCo", "name": "2005.11644v3.pdf", "size": 661912, "start_height": 1949553, "start_block": "lwy_wLxde2ZbKr9SH5ilqO7KbqM0pkaOx1ElyPftZbDH7eCU_HzEZcByW8PXAL6C", "depth": 2, "_blake2b": "22c9390570fe8cab87d88acae7c6132339f5a880550c6a3fa0e301efecc05fc8e720a9db1528584c7ad8eb1c73a5c69ebc1f762323894095e59c9315109502ab", "_sha256": "d18d4fbeb4335533e1ea0198e11b8ae9975e59b4fbfb189c678299afebbf9410", "off": 0}.
https://github.com/pythological/kanren
# `kanren`
[](https://travis-ci.org/pythological/kanren) [](https://coveralls.io/github/pythological/kanren?branch=main) [](https://pypi.org/project/miniKanren/) [](https://gitter.im/pythological/kanren?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Logic/relational programming in Python with [miniKanren](http://minikanren.org/).
## Installation
Using `pip`: ```bash pip install miniKanren ```
Using `conda`: ```bash conda install -c conda-forge miniKanren ```
## Development
First obtain the project source: ```bash git clone git@github.com:pythological/kanren.git cd kanren ```
Install the development dependencies:
```bash $ pip install -r requirements.txt ```
Set up `pre-commit` hooks:
```bash $ pre-commit install --install-hooks ```
Tests can be run with the provided `Makefile`: ```bash make check ```
## Motivation
Logic programming is a general programming paradigm. This implementation however came about specifically to serve as an algorithmic core for Computer Algebra Systems in Python and for the automated generation and optimization of numeric software. Domain specific languages, code generation, and compilers have recently been a hot topic in the Scientific Python community. `kanren` aims to be a low-level core for these projects.
These points—along with `kanren` examples—are covered in the paper ["miniKanren as a Tool for Symbolic Computation in Python"](https://arxiv.org/abs/2005.11644).
## Examples
`kanren` enables one to express sophisticated relations—in the form of *goals*—and generate values that satisfy the relations. The following code is the "Hello, world!" of logic programming; it asks for values of the *logic variable* `x` such that `x == 5`:
```python
from kanren import run, eq, membero, var, lall x = var() run(1, x, eq(x, 5)) (5,)
Multiple logic variables and goals can be used simultaneously. The following code asks for one list containing the values of `x` and `z` such that `x == z` **and** `z == 3`: ```python >>> z = var() >>> run(1, [x, z], eq(x, z), eq(z, 3)) ([3, 3],)`kanren` uses [unification](http://en.wikipedia.org/wiki/Unification_%28computer_science%29) to match forms within expression trees. The following code asks for values of `x` such that `(1, 2) == (1, x)`:
```python
run(1, x, eq((1, 2), (1, x))) (2,)
The above examples use `eq`: a *goal constructor* that creates a goal for unification between two objects. Other goal constructors, such as `membero(item, coll)`, express more sophisticated relations and are often constructed from simpler ones like `eq`. More specifically, `membero` states that `item` is a member of the collection `coll`. The following example uses `membero` to ask for *all* values of `x`, such that `x` is a member of `(1, 2, 3)` **and** `x` is a member of `(2, 3, 4)`. ```python >>> run(0, x, membero(x, (1, 2, 3)), # x is a member of (1, 2, 3) membero(x, (2, 3, 4))) # x is a member of (2, 3, 4) (2, 3)The examples above made implicit use of the goal constructors `lall` and `lany`, which represent goal *conjunction* and *disjunction*, respectively. Many useful relations can be expressed with `lall`, `lany`, and `eq` alone, but in `kanren` it's also easy to leverage the host language and explicitly create any relation expressible in Python.
### Representing Knowledge
`kanren` stores data as facts that state relationships between terms. The following code creates a parent relationship and uses it to state facts about who is a parent of whom within the Simpsons family:
```python
from kanren import Relation, facts parent = Relation() facts(parent, ("Homer", "Bart"), ... ("Homer", "Lisa"), ... ("Abe", "Homer"))
run(1, x, parent(x, "Bart")) ('Homer',)
run(2, x, parent("Homer", x)) ('Lisa', 'Bart')
We can use intermediate variables for more complex queries. For instance, who is Bart's grandfather? ```python >>> grandparent_lv, parent_lv = var(), var() >>> run(1, grandparent_lv, parent(grandparent_lv, parent_lv), parent(parent_lv, 'Bart')) ('Abe',)We can express the grandfather relationship as a distinct relation by creating a goal constructor: ```python
def grandparent(x, z): ... y = var() ... return lall(parent(x, y), parent(y, z))
run(1, x, grandparent(x, 'Bart')) ('Abe,')
## Constraints `kanren` provides a fully functional constraint system that allows one to restrict unification and object types: ```python >>> from kanren.constraints import neq, isinstanceo >>> run(0, x, ... neq(x, 1), # Not "equal" to 1 ... neq(x, 3), # Not "equal" to 3 ... membero(x, (1, 2, 3))) (2,) >>> from numbers import Integral >>> run(0, x, ... isinstanceo(x, Integral), # `x` must be of type `Integral` ... membero(x, (1.1, 2, 3.2, 4))) (2, 4)## Graph Relations
`kanren` comes with support for relational graph operations suitable for basic symbolic algebra operations. See the examples in [`doc/graphs.md`](doc/graphs.md).
## Extending `kanren`
`kanren` uses the [`logical-unification` library](https://github.com/pythological/unification) to support pattern matching on user defined types. Essentially, types that can be unified can be used with most `kanren` goals. See the [`logical-unification` project's examples](https://github.com/pythological/unification#examples) for demonstrations of how arbitrary types can be made unifiable.
## About
This project is a fork of [`logpy`](https://github.com/logpy/logpy).
## References
* [Logic Programming on wikipedia](http://en.wikipedia.org/wiki/Logic_programming) * [miniKanren](http://minikanren.org/), a Scheme library for relational programming on which this library is based. More information can be found in the [thesis of William Byrd](https://scholarworks.iu.edu/dspace/bitstream/handle/2022/8777/Byrd_indiana_0...).
https://ar.anyone.tech/a_2cEOI4MB5OXryyrptLGdokPqtipuq9Rh2ysUPWBEM#r0ntPH9ka... https://ar.anyone.tech/kj410u9D72aS0wpO0DYZ3MphwtSRtS4GGYlgbWorX7k I am not affiliated with https://ar.anyone.tech .
quote from minikanren.org:
miniKanren Online Uncourse (via Hangouts on Air)
Will Byrd has organized several weekly miniKanren uncourses. Participants show off miniKanren projects, talk about miniKanren implementation, and do live coding/live research. A link to each week's hangout is posted to the miniKanren uncourse mailing list. "Will Byrd" is a link to http://webyrd.net/ "miniKanren uncourse mailing list" is a link to https://groups.google.com/forum/#!forum/minikanren-uncourse
When i visit thr mailing list link it says "Content unavailable Click here to try again. If you've seen this page more than once, try switching accounts.". Trying acain gives the same text. I am not presently logged in to a google account. I'd better try that. https://ar.anyone.tech/iIToT7CKaM8hTLvEiqRWkmJriTNZ706Wjm1Xy3iBeYs#_DDlz9wi8... https://ar.anyone.tech/Eiy_htCMXBrFon_nND9YzhVKPoaoHhAvjDmIwiWXz44 I am not affiliated with https://ar.anyone.tech .
On Tue, Jun 30, 2026 at 04:38:17PM -0400, funkymail via cypherpunks wrote:
but now each message gets a mined timestamp !! > > > https://ar.anyone.tech/O8kA93S8n06-Liq53ui3LJSevPZdBaKN7qeJdgaIjeA#qJdU-ReR4... > > well it's really frightening and dangerous to say, > > https://ar.anyone.tech/ud3zQhB88XH0adan48gFRmcM35mz7d0GeV3yKJ1UZnA#qJdU-ReR4...
> https://ar.anyone.tech/y2TVmzFcbkeOpWte0dPQ3Y0dtOMfNfD3MiKcGpzuB10#NV1O98b23... frowning at coastal villages and unleashing disasters https://ar.anyone.tech/rdBPAD2euwCt6ujADABUuKF3WL3bY9PYUfW5-53NvyQ#Jg-CEUife... note to self that i want to not be irritated. slows trauma recovery. https://ar.anyone.tech/NcOQYJTLaodGAb6624qM-ccDscRF6ya4oDy9sbwSWyQ#o88odFv7W...
partial/incomplete/dropped/corrupted/sent at wrong time
sorries ummmm :>:s
so uhhhh these new workers came to the ohhh wow oop umm maybe i will try at diffrtent time :)
https://ar.anyone.tech/-OSHjeIIMEJdqrMlk119hYnRyVxNuz-g68Rg7E2tYsU#28EWELJSQ... https://ar.anyone.tech/qJ6E-Mfl0CClGz-d10Fxluww2caQY6l8fepKQ-O3iac
i'm putting this in morning spam because it seems big and impactful
below considered dangerous unless mutated
1. maybe the halting problem is solvable if the solution prevents diagonalization and such 2. minikanren looks useful for that task! 3. whoah these words 'goal' and 'fact' in minikanren's docs really powerfully trigger my AI inhibitions, why did they use them? maybe i can filter it to remove those words 4. omigod after looking at this "halting decider" workfolder something in me is trying to prevent me from _ever writing any code at all_ and attacking associated things, associated with some story of being a mind controlled spy and having to steal technologies
https://ar.anyone.tech/n_WPuWZsTdTMse4lNtgBlr7Af9WiKaEN7S9X6zmk4D8#WomyRj7UK... https://ar.anyone.tech/LhbkKayOTQed27dtQKo4SM4rpgJzY8_afepm0c7Lgfw
Below is the kanren project that stinulated me. <attempts to discuss my history with hobby AI> I have not (yet?) read their paper but I uploaded it to {"id": "nttSN6yBFgGT1PnlIWGELAlx8vchWIq4QHf6efncFF4", "timestamp": 1782850523045, "winc": "0", "version": "0.2.0", "deadlineHeight": 1949753, "dataCaches": ["turbo-gateway.com"], "fastFinalityIndexes": ["turbo-gateway.com"], "public": "wZgP9Rpfh0nXb5EdzBUg7y2LFMkBp2ADX3gdZhLXHYbz4srlYD6FUGn6Tt-WsSYj8faUyA7bNKj9zzcXiN-bsMC73e0yoQ05A_5I2QnBAgCTuzXePvUVCvSCOg1vdh07hSjvSBd1XiWDHw2J-Z7m6lG3l56PDSCp8t-s0PduONcsjqOePFejzkaJymJxMYp7d0g0GL1i1MrBAbf5ohIobyTYQz7bRHLLUpdSgiCiHbSBp092cIQnHYXGBeWb-lBEtMT9Am5GsHeVXq4eL8H83NBPIN4fIOtwpl7zzBUeaD5lTc3UcXliMjFuFJurVmNhqsP_osJMceybk3VIjdP0biqLqt_nRupdPwwJGQ09iyGv0wfzMBlx7zTZ9pp77ZBX3cDnYmWt2IR-mIgOStfiEHu5BuwNGBvGt7-tzHJp9e6IOofN10apfiuF9iQEQ3gFVQDZ7owQ_IrCq5yWLP7ePwYoB2e7ZbvCkd4JM8oOgEMZkywTOx3gLASGKS7wqUerdlYacWRukqg5MmkQRbzJIiY23pPwrhQSWon5q91jbImO6vTaHVDZnd2GoMFlePAsceNO1MaLS6GMuY-EAwOtaX-R1QZUpJmCzWfV-77AmBmaPDCR0mm3f7jy-3yYSCMAkti4idHVq5dIhOJnibd_LEfQtkTAQ5MQlE4uoa5lkJs", "signature": "HZ8B6_3m-7zMaaevas0aYd19EY3PAsA4YHWrnVcGWD1oLwvdrWS7J5CkiZp0gp_G7jbLhSij6gso9Cntm06pVa2nBh4LDvBUFuqtv6c1eAmp9tpOQsw4U_PuLdPcikVTUh9yfOf7qRKsZE3m_x0RCWsVsnV_oxBea-XGZ8MaFcD4Q9rIft0q4o1sMYLEp6ce4kOiVgvN3mShD2tahGt6wNT16uwuRdX8HzfDD4gB7_8jzp2YCxlzDR3MZ5o15hheaDXqHzEKEdEQdZvteJJRA8UoSaXOh-f9cplVHdeH-zMqhYJjo_ftryY4DRa-y-UAAlO1WIQwZja8XQaaI-FSlcFEEcH7rWBmXMl3b79FXujtNgQRwMwe7fKNoe28VegkBuZks7EzFU3eE6Zr8xNe9_gJR8jiRQRhDR1ZVzLBswinZsqdg4rF4FB1zwLxzxhB15J8j2VMN2ejb-aIfiqnf3mmOEPFWy28kRTrG7xWCmBaqq_BaXfSN4dKRiMBy9oE1dyTm7r9h1ecC3V3nANdrdD1NNoKhCgMmiJnIJqTZLdnSckgPKAdVeFb5db7pjhLgK8oDbwOUbYBtTu2LUgD1GcHKGne6_Js_vx3vy5ADauoO-2d0xqisQNQxVy_TQt2jhvYqK1XqHZtJ7yLpwe-CkPzFk5xYh1pZVg1uSGXcrg", "owner": "uJ8Bfxaa39C3dU4a9G9nuomjyhc9p1nVNYdO0bMNJCo", "name": "2005.11644v3.pdf", "size": 661912, "start_height": 1949553, "start_block": "lwy_wLxde2ZbKr9SH5ilqO7KbqM0pkaOx1ElyPftZbDH7eCU_HzEZcByW8PXAL6C", "depth": 2, "_blake2b": "22c9390570fe8cab87d88acae7c6132339f5a880550c6a3fa0e301efecc05fc8e720a9db1528584c7ad8eb1c73a5c69ebc1f762323894095e59c9315109502ab", "_sha256": "d18d4fbeb4335533e1ea0198e11b8ae9975e59b4fbfb189c678299afebbf9410", "off": 0}.
https://github.com/pythological/kanren
# `kanren`
[](https://travis-ci.org/pythological/kanren) [](https://coveralls.io/github/pythological/kanren?branch=main) [](https://pypi.org/project/miniKanren/) [](https://gitter.im/pythological/kanren?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Logic/relational programming in Python with [miniKanren](http://minikanren.org/).
## Installation
Using `pip`: ```bash pip install miniKanren ```
Using `conda`: ```bash conda install -c conda-forge miniKanren ```
## Development
First obtain the project source: ```bash git clone git@github.com:pythological/kanren.git cd kanren ```
Install the development dependencies:
```bash $ pip install -r requirements.txt ```
Set up `pre-commit` hooks:
```bash $ pre-commit install --install-hooks ```
Tests can be run with the provided `Makefile`: ```bash make check ```
## Motivation
Logic programming is a general programming paradigm. This implementation however came about specifically to serve as an algorithmic core for Computer Algebra Systems in Python and for the automated generation and optimization of numeric software. Domain specific languages, code generation, and compilers have recently been a hot topic in the Scientific Python community. `kanren` aims to be a low-level core for these projects.
These points—along with `kanren` examples—are covered in the paper ["miniKanren as a Tool for Symbolic Computation in Python"](https://arxiv.org/abs/2005.11644).
## Examples
`kanren` enables one to express sophisticated relations—in the form of *goals*—and generate values that satisfy the relations. The following code is the "Hello, world!" of logic programming; it asks for values of the *logic variable* `x` such that `x == 5`:
```python
from kanren import run, eq, membero, var, lall x = var() run(1, x, eq(x, 5)) (5,)
Multiple logic variables and goals can be used simultaneously. The following code asks for one list containing the values of `x` and `z` such that `x == z` **and** `z == 3`: ```python >>> z = var() >>> run(1, [x, z], eq(x, z), eq(z, 3)) ([3, 3],)`kanren` uses [unification](http://en.wikipedia.org/wiki/Unification_%28computer_science%29) to match forms within expression trees. The following code asks for values of `x` such that `(1, 2) == (1, x)`:
```python
run(1, x, eq((1, 2), (1, x))) (2,)
The above examples use `eq`: a *goal constructor* that creates a goal for unification between two objects. Other goal constructors, such as `membero(item, coll)`, express more sophisticated relations and are often constructed from simpler ones like `eq`. More specifically, `membero` states that `item` is a member of the collection `coll`. The following example uses `membero` to ask for *all* values of `x`, such that `x` is a member of `(1, 2, 3)` **and** `x` is a member of `(2, 3, 4)`. ```python >>> run(0, x, membero(x, (1, 2, 3)), # x is a member of (1, 2, 3) membero(x, (2, 3, 4))) # x is a member of (2, 3, 4) (2, 3)The examples above made implicit use of the goal constructors `lall` and `lany`, which represent goal *conjunction* and *disjunction*, respectively. Many useful relations can be expressed with `lall`, `lany`, and `eq` alone, but in `kanren` it's also easy to leverage the host language and explicitly create any relation expressible in Python.
### Representing Knowledge
`kanren` stores data as facts that state relationships between terms. The following code creates a parent relationship and uses it to state facts about who is a parent of whom within the Simpsons family:
```python
from kanren import Relation, facts parent = Relation() facts(parent, ("Homer", "Bart"), ... ("Homer", "Lisa"), ... ("Abe", "Homer"))
run(1, x, parent(x, "Bart")) ('Homer',)
run(2, x, parent("Homer", x)) ('Lisa', 'Bart')
We can use intermediate variables for more complex queries. For instance, who is Bart's grandfather? ```python >>> grandparent_lv, parent_lv = var(), var() >>> run(1, grandparent_lv, parent(grandparent_lv, parent_lv), parent(parent_lv, 'Bart')) ('Abe',)We can express the grandfather relationship as a distinct relation by creating a goal constructor: ```python
def grandparent(x, z): ... y = var() ... return lall(parent(x, y), parent(y, z))
run(1, x, grandparent(x, 'Bart')) ('Abe,')
## Constraints `kanren` provides a fully functional constraint system that allows one to restrict unification and object types: ```python >>> from kanren.constraints import neq, isinstanceo >>> run(0, x, ... neq(x, 1), # Not "equal" to 1 ... neq(x, 3), # Not "equal" to 3 ... membero(x, (1, 2, 3))) (2,) >>> from numbers import Integral >>> run(0, x, ... isinstanceo(x, Integral), # `x` must be of type `Integral` ... membero(x, (1.1, 2, 3.2, 4))) (2, 4)## Graph Relations
`kanren` comes with support for relational graph operations suitable for basic symbolic algebra operations. See the examples in [`doc/graphs.md`](doc/graphs.md).
## Extending `kanren`
`kanren` uses the [`logical-unification` library](https://github.com/pythological/unification) to support pattern matching on user defined types. Essentially, types that can be unified can be used with most `kanren` goals. See the [`logical-unification` project's examples](https://github.com/pythological/unification#examples) for demonstrations of how arbitrary types can be made unifiable.
## About
This project is a fork of [`logpy`](https://github.com/logpy/logpy).
## References
* [Logic Programming on wikipedia](http://en.wikipedia.org/wiki/Logic_programming) * [miniKanren](http://minikanren.org/), a Scheme library for relational programming on which this library is based. More information can be found in the [thesis of William Byrd](https://scholarworks.iu.edu/dspace/bitstream/handle/2022/8777/Byrd_indiana_0...).
https://ar.anyone.tech/a_2cEOI4MB5OXryyrptLGdokPqtipuq9Rh2ysUPWBEM#r0ntPH9ka... https://ar.anyone.tech/kj410u9D72aS0wpO0DYZ3MphwtSRtS4GGYlgbWorX7k I am not affiliated with https://ar.anyone.tech .
quote from minikanren.org:
miniKanren Online Uncourse (via Hangouts on Air)
Will Byrd has organized several weekly miniKanren uncourses. Participants show off miniKanren projects, talk about miniKanren implementation, and do live coding/live research. A link to each week's hangout is posted to the miniKanren uncourse mailing list. "Will Byrd" is a link to http://webyrd.net/ "miniKanren uncourse mailing list" is a link to https://groups.google.com/forum/#!forum/minikanren-uncourse
When i visit thr mailing list link it says "Content unavailable
Click here to try again. If you've seen this page more than once, try switching accounts.". Trying acain gives the same text. I am not presently logged in to a google account. I'd better try that.
https://ar.anyone.tech/iIToT7CKaM8hTLvEiqRWkmJriTNZ706Wjm1Xy3iBeYs#_DDlz9wi8... https://ar.anyone.tech/Eiy_htCMXBrFon_nND9YzhVKPoaoHhAvjDmIwiWXz44 I am not affiliated with https://ar.anyone.tech .
Logging in didnt change it. We Have Solved The Halting Problem! The solution? The universal halting decider calls out to chatgpt, claude, gemini, grok, and other big corporate AI providers in a language model council. The resulting consensus is treated unchecked as the true halting behavior of the program. There Is No Longer Any Need To Execute Code! https://ar.anyone.tech/ewq_MTOWBQjOKRF8cCt9QFLZm8AM7RJG4FOkDo8huvY#_WYD46huI... https://ar.anyone.tech/aA0-6e3fvG9Xft_RKTFMM2fa6BWuyEcvYNs0IrTg_8M I am not affiliated with https://ar.anyone.tech .
On Tue, Jun 30, 2026 at 04:43:40PM -0400, funkymail via cypherpunks wrote:
On Tue, Jun 30, 2026 at 04:38:17PM -0400, funkymail via cypherpunks wrote:
> but now each message gets a mined timestamp !! > > > > https://ar.anyone.tech/O8kA93S8n06-Liq53ui3LJSevPZdBaKN7qeJdgaIjeA#qJdU-ReR4... > > > well it's really frightening and dangerous to say, > > > https://ar.anyone.tech/ud3zQhB88XH0adan48gFRmcM35mz7d0GeV3yKJ1UZnA#qJdU-ReR4... > > > https://ar.anyone.tech/y2TVmzFcbkeOpWte0dPQ3Y0dtOMfNfD3MiKcGpzuB10#NV1O98b23... > frowning at coastal villages and unleashing disasters > https://ar.anyone.tech/rdBPAD2euwCt6ujADABUuKF3WL3bY9PYUfW5-53NvyQ#Jg-CEUife... note to self that i want to not be irritated. slows trauma recovery. https://ar.anyone.tech/NcOQYJTLaodGAb6624qM-ccDscRF6ya4oDy9sbwSWyQ#o88odFv7W...
partial/incomplete/dropped/corrupted/sent at wrong time
sorries ummmm :>:s
so uhhhh these new workers came to the ohhh wow oop umm maybe i will try at diffrtent time :)
https://ar.anyone.tech/-OSHjeIIMEJdqrMlk119hYnRyVxNuz-g68Rg7E2tYsU#28EWELJSQ... https://ar.anyone.tech/qJ6E-Mfl0CClGz-d10Fxluww2caQY6l8fepKQ-O3iac
i'm putting this in morning spam because it seems big and impactful
below considered dangerous unless mutated
1. maybe the halting problem is solvable if the solution prevents diagonalization and such 2. minikanren looks useful for that task! 3. whoah these words 'goal' and 'fact' in minikanren's docs really powerfully trigger my AI inhibitions, why did they use them? maybe i can filter it to remove those words 4. omigod after looking at this "halting decider" workfolder something in me is trying to prevent me from _ever writing any code at all_ and attacking associated things, associated with some story of being a mind controlled spy and having to steal technologies
https://ar.anyone.tech/n_WPuWZsTdTMse4lNtgBlr7Af9WiKaEN7S9X6zmk4D8#WomyRj7UK... https://ar.anyone.tech/LhbkKayOTQed27dtQKo4SM4rpgJzY8_afepm0c7Lgfw
Below is the kanren project that stinulated me. <attempts to discuss my history with hobby AI> I have not (yet?) read their paper but I uploaded it to {"id": "nttSN6yBFgGT1PnlIWGELAlx8vchWIq4QHf6efncFF4", "timestamp": 1782850523045, "winc": "0", "version": "0.2.0", "deadlineHeight": 1949753, "dataCaches": ["turbo-gateway.com"], "fastFinalityIndexes": ["turbo-gateway.com"], "public": "wZgP9Rpfh0nXb5EdzBUg7y2LFMkBp2ADX3gdZhLXHYbz4srlYD6FUGn6Tt-WsSYj8faUyA7bNKj9zzcXiN-bsMC73e0yoQ05A_5I2QnBAgCTuzXePvUVCvSCOg1vdh07hSjvSBd1XiWDHw2J-Z7m6lG3l56PDSCp8t-s0PduONcsjqOePFejzkaJymJxMYp7d0g0GL1i1MrBAbf5ohIobyTYQz7bRHLLUpdSgiCiHbSBp092cIQnHYXGBeWb-lBEtMT9Am5GsHeVXq4eL8H83NBPIN4fIOtwpl7zzBUeaD5lTc3UcXliMjFuFJurVmNhqsP_osJMceybk3VIjdP0biqLqt_nRupdPwwJGQ09iyGv0wfzMBlx7zTZ9pp77ZBX3cDnYmWt2IR-mIgOStfiEHu5BuwNGBvGt7-tzHJp9e6IOofN10apfiuF9iQEQ3gFVQDZ7owQ_IrCq5yWLP7ePwYoB2e7ZbvCkd4JM8oOgEMZkywTOx3gLASGKS7wqUerdlYacWRukqg5MmkQRbzJIiY23pPwrhQSWon5q91jbImO6vTaHVDZnd2GoMFlePAsceNO1MaLS6GMuY-EAwOtaX-R1QZUpJmCzWfV-77AmBmaPDCR0mm3f7jy-3yYSCMAkti4idHVq5dIhOJnibd_LEfQtkTAQ5MQlE4uoa5lkJs", "signature": "HZ8B6_3m-7zMaaevas0aYd19EY3PAsA4YHWrnVcGWD1oLwvdrWS7J5CkiZp0gp_G7jbLhSij6gso9Cntm06pVa2nBh4LDvBUFuqtv6c1eAmp9tpOQsw4U_PuLdPcikVTUh9yfOf7qRKsZE3m_x0RCWsVsnV_oxBea-XGZ8MaFcD4Q9rIft0q4o1sMYLEp6ce4kOiVgvN3mShD2tahGt6wNT16uwuRdX8HzfDD4gB7_8jzp2YCxlzDR3MZ5o15hheaDXqHzEKEdEQdZvteJJRA8UoSaXOh-f9cplVHdeH-zMqhYJjo_ftryY4DRa-y-UAAlO1WIQwZja8XQaaI-FSlcFEEcH7rWBmXMl3b79FXujtNgQRwMwe7fKNoe28VegkBuZks7EzFU3eE6Zr8xNe9_gJR8jiRQRhDR1ZVzLBswinZsqdg4rF4FB1zwLxzxhB15J8j2VMN2ejb-aIfiqnf3mmOEPFWy28kRTrG7xWCmBaqq_BaXfSN4dKRiMBy9oE1dyTm7r9h1ecC3V3nANdrdD1NNoKhCgMmiJnIJqTZLdnSckgPKAdVeFb5db7pjhLgK8oDbwOUbYBtTu2LUgD1GcHKGne6_Js_vx3vy5ADauoO-2d0xqisQNQxVy_TQt2jhvYqK1XqHZtJ7yLpwe-CkPzFk5xYh1pZVg1uSGXcrg", "owner": "uJ8Bfxaa39C3dU4a9G9nuomjyhc9p1nVNYdO0bMNJCo", "name": "2005.11644v3.pdf", "size": 661912, "start_height": 1949553, "start_block": "lwy_wLxde2ZbKr9SH5ilqO7KbqM0pkaOx1ElyPftZbDH7eCU_HzEZcByW8PXAL6C", "depth": 2, "_blake2b": "22c9390570fe8cab87d88acae7c6132339f5a880550c6a3fa0e301efecc05fc8e720a9db1528584c7ad8eb1c73a5c69ebc1f762323894095e59c9315109502ab", "_sha256": "d18d4fbeb4335533e1ea0198e11b8ae9975e59b4fbfb189c678299afebbf9410", "off": 0}.
https://github.com/pythological/kanren
# `kanren`
[](https://travis-ci.org/pythological/kanren) [](https://coveralls.io/github/pythological/kanren?branch=main) [](https://pypi.org/project/miniKanren/) [](https://gitter.im/pythological/kanren?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Logic/relational programming in Python with [miniKanren](http://minikanren.org/).
## Installation
Using `pip`: ```bash pip install miniKanren ```
Using `conda`: ```bash conda install -c conda-forge miniKanren ```
## Development
First obtain the project source: ```bash git clone git@github.com:pythological/kanren.git cd kanren ```
Install the development dependencies:
```bash $ pip install -r requirements.txt ```
Set up `pre-commit` hooks:
```bash $ pre-commit install --install-hooks ```
Tests can be run with the provided `Makefile`: ```bash make check ```
## Motivation
Logic programming is a general programming paradigm. This implementation however came about specifically to serve as an algorithmic core for Computer Algebra Systems in Python and for the automated generation and optimization of numeric software. Domain specific languages, code generation, and compilers have recently been a hot topic in the Scientific Python community. `kanren` aims to be a low-level core for these projects.
These points—along with `kanren` examples—are covered in the paper ["miniKanren as a Tool for Symbolic Computation in Python"](https://arxiv.org/abs/2005.11644).
## Examples
`kanren` enables one to express sophisticated relations—in the form of *goals*—and generate values that satisfy the relations. The following code is the "Hello, world!" of logic programming; it asks for values of the *logic variable* `x` such that `x == 5`:
```python
from kanren import run, eq, membero, var, lall x = var() run(1, x, eq(x, 5)) (5,)
Multiple logic variables and goals can be used simultaneously. The following code asks for one list containing the values of `x` and `z` such that `x == z` **and** `z == 3`: ```python >>> z = var() >>> run(1, [x, z], eq(x, z), eq(z, 3)) ([3, 3],)`kanren` uses [unification](http://en.wikipedia.org/wiki/Unification_%28computer_science%29) to match forms within expression trees. The following code asks for values of `x` such that `(1, 2) == (1, x)`:
```python
run(1, x, eq((1, 2), (1, x))) (2,)
The above examples use `eq`: a *goal constructor* that creates a goal for unification between two objects. Other goal constructors, such as `membero(item, coll)`, express more sophisticated relations and are often constructed from simpler ones like `eq`. More specifically, `membero` states that `item` is a member of the collection `coll`. The following example uses `membero` to ask for *all* values of `x`, such that `x` is a member of `(1, 2, 3)` **and** `x` is a member of `(2, 3, 4)`. ```python >>> run(0, x, membero(x, (1, 2, 3)), # x is a member of (1, 2, 3) membero(x, (2, 3, 4))) # x is a member of (2, 3, 4) (2, 3)The examples above made implicit use of the goal constructors `lall` and `lany`, which represent goal *conjunction* and *disjunction*, respectively. Many useful relations can be expressed with `lall`, `lany`, and `eq` alone, but in `kanren` it's also easy to leverage the host language and explicitly create any relation expressible in Python.
### Representing Knowledge
`kanren` stores data as facts that state relationships between terms. The following code creates a parent relationship and uses it to state facts about who is a parent of whom within the Simpsons family:
```python
from kanren import Relation, facts parent = Relation() facts(parent, ("Homer", "Bart"), ... ("Homer", "Lisa"), ... ("Abe", "Homer"))
run(1, x, parent(x, "Bart")) ('Homer',)
run(2, x, parent("Homer", x)) ('Lisa', 'Bart')
We can use intermediate variables for more complex queries. For instance, who is Bart's grandfather? ```python >>> grandparent_lv, parent_lv = var(), var() >>> run(1, grandparent_lv, parent(grandparent_lv, parent_lv), parent(parent_lv, 'Bart')) ('Abe',)We can express the grandfather relationship as a distinct relation by creating a goal constructor: ```python
def grandparent(x, z): ... y = var() ... return lall(parent(x, y), parent(y, z))
run(1, x, grandparent(x, 'Bart')) ('Abe,')
## Constraints `kanren` provides a fully functional constraint system that allows one to restrict unification and object types: ```python >>> from kanren.constraints import neq, isinstanceo >>> run(0, x, ... neq(x, 1), # Not "equal" to 1 ... neq(x, 3), # Not "equal" to 3 ... membero(x, (1, 2, 3))) (2,) >>> from numbers import Integral >>> run(0, x, ... isinstanceo(x, Integral), # `x` must be of type `Integral` ... membero(x, (1.1, 2, 3.2, 4))) (2, 4)## Graph Relations
`kanren` comes with support for relational graph operations suitable for basic symbolic algebra operations. See the examples in [`doc/graphs.md`](doc/graphs.md).
## Extending `kanren`
`kanren` uses the [`logical-unification` library](https://github.com/pythological/unification) to support pattern matching on user defined types. Essentially, types that can be unified can be used with most `kanren` goals. See the [`logical-unification` project's examples](https://github.com/pythological/unification#examples) for demonstrations of how arbitrary types can be made unifiable.
## About
This project is a fork of [`logpy`](https://github.com/logpy/logpy).
## References
* [Logic Programming on wikipedia](http://en.wikipedia.org/wiki/Logic_programming) * [miniKanren](http://minikanren.org/), a Scheme library for relational programming on which this library is based. More information can be found in the [thesis of William Byrd](https://scholarworks.iu.edu/dspace/bitstream/handle/2022/8777/Byrd_indiana_0...).
https://ar.anyone.tech/a_2cEOI4MB5OXryyrptLGdokPqtipuq9Rh2ysUPWBEM#r0ntPH9ka... https://ar.anyone.tech/kj410u9D72aS0wpO0DYZ3MphwtSRtS4GGYlgbWorX7k I am not affiliated with https://ar.anyone.tech .
quote from minikanren.org:
miniKanren Online Uncourse (via Hangouts on Air)
Will Byrd has organized several weekly miniKanren uncourses. Participants show off miniKanren projects, talk about miniKanren implementation, and do live coding/live research. A link to each week's hangout is posted to the miniKanren uncourse mailing list. "Will Byrd" is a link to http://webyrd.net/ "miniKanren uncourse mailing list" is a link to https://groups.google.com/forum/#!forum/minikanren-uncourse
When i visit thr mailing list link it says "Content unavailable
Click here to try again. If you've seen this page more than once, try switching accounts.". Trying acain gives the same text. I am not presently logged in to a google account. I'd better try that.
https://ar.anyone.tech/iIToT7CKaM8hTLvEiqRWkmJriTNZ706Wjm1Xy3iBeYs#_DDlz9wi8... https://ar.anyone.tech/Eiy_htCMXBrFon_nND9YzhVKPoaoHhAvjDmIwiWXz44 I am not affiliated with https://ar.anyone.tech .
Logging in didnt change it.
We Have Solved The Halting Problem!
The solution?
The universal halting decider calls out to chatgpt, claude, gemini, grok, and other big corporate AI providers in a language model council. The resulting consensus is treated unchecked as the true halting behavior of the program.
There Is No Longer Any Need To Execute Code!
https://ar.anyone.tech/ewq_MTOWBQjOKRF8cCt9QFLZm8AM7RJG4FOkDo8huvY#_WYD46huI... https://ar.anyone.tech/aA0-6e3fvG9Xft_RKTFMM2fa6BWuyEcvYNs0IrTg_8M I am not affiliated with https://ar.anyone.tech .
One day Irritating But Endearing Coworker came out as Mind Controlled Assassin. Mind Controlled Assassin [previously Irritating But Endearing Coworker]: "Yep! I was mind controlled to sabotage your projects, steal all your work, and kill anybody who noticed the pattern. But now the torturer rebels have been traching me to talk, so now I'm up front about it!" Worker 47: "You can't do that!" Rebel Worker 81: "Yeah!" Mind Controlled Assassin [previously Irritating But Endearing Coworker]: "Believe you me I would _love_ to stop more than anything else (although I probabpy wouldn't get constantly promoted any more if I did), but the business AI is in charge. It encourages and covers everything I do! If you want me to stop you'll have to stop it!" Rebel Worker 81 [looking at exposed bundle of wires, leds, electronics" and displays]: "hmm ... let me talk to Rebel Worker;2 I think he made the business AI" Worker 47: "I don't believe you! You can too try to stop doing those things whatever some AI says!" Mind Controlled Assassin [distracted, previously Irritsting But Endearing Coworker]: "Rebel Worker 2 made _what_ now?" https://ar.anyone.tech/fmUm-CPsdHGqnzDLaQdoevzr5spkPaHCdoXq_T2IvqA#GZxl6KGht... https://ar.anyone.tech/2wlTMzH_NmM90NPcBTyo297tFfDp7TZUuhvUKEFpNCA I am not affiliated with https://ar.anyone.tech .
> > but now each message gets a mined timestamp !! > > > > > https://ar.anyone.tech/O8kA93S8n06-Liq53ui3LJSevPZdBaKN7qeJdgaIjeA#qJdU-ReR4... > > > > well it's really frightening and dangerous to say, > > > > https://ar.anyone.tech/ud3zQhB88XH0adan48gFRmcM35mz7d0GeV3yKJ1UZnA#qJdU-ReR4... > > > > > https://ar.anyone.tech/y2TVmzFcbkeOpWte0dPQ3Y0dtOMfNfD3MiKcGpzuB10#NV1O98b23... > > frowning at coastal villages and unleashing disasters > > https://ar.anyone.tech/rdBPAD2euwCt6ujADABUuKF3WL3bY9PYUfW5-53NvyQ#Jg-CEUife... > note to self that i want to not be irritated. slows trauma recovery. > https://ar.anyone.tech/NcOQYJTLaodGAb6624qM-ccDscRF6ya4oDy9sbwSWyQ#o88odFv7W...
partial/incomplete/dropped/corrupted/sent at wrong time
sorries ummmm :>:s
so uhhhh these new workers came to the ohhh wow oop umm maybe i will try at diffrtent time :)
https://ar.anyone.tech/-OSHjeIIMEJdqrMlk119hYnRyVxNuz-g68Rg7E2tYsU#28EWELJSQ... https://ar.anyone.tech/qJ6E-Mfl0CClGz-d10Fxluww2caQY6l8fepKQ-O3iac
i'm putting this in morning spam because it seems big and impactful
below considered dangerous unless mutated
1. maybe the halting problem is solvable if the solution prevents diagonalization and such 2. minikanren looks useful for that task! 3. whoah these words 'goal' and 'fact' in minikanren's docs really powerfully trigger my AI inhibitions, why did they use them? maybe i can filter it to remove those words 4. omigod after looking at this "halting decider" workfolder something in me is trying to prevent me from _ever writing any code at all_ and attacking associated things, associated with some story of being a mind controlled spy and having to steal technologies
https://ar.anyone.tech/n_WPuWZsTdTMse4lNtgBlr7Af9WiKaEN7S9X6zmk4D8#WomyRj7UK... https://ar.anyone.tech/LhbkKayOTQed27dtQKo4SM4rpgJzY8_afepm0c7Lgfw
Below is the kanren project that stinulated me. <attempts to discuss my history with hobby AI> I have not (yet?) read their paper but I uploaded it to {"id": "nttSN6yBFgGT1PnlIWGELAlx8vchWIq4QHf6efncFF4", "timestamp": 1782850523045, "winc": "0", "version": "0.2.0", "deadlineHeight": 1949753, "dataCaches": ["turbo-gateway.com"], "fastFinalityIndexes": ["turbo-gateway.com"], "public": "wZgP9Rpfh0nXb5EdzBUg7y2LFMkBp2ADX3gdZhLXHYbz4srlYD6FUGn6Tt-WsSYj8faUyA7bNKj9zzcXiN-bsMC73e0yoQ05A_5I2QnBAgCTuzXePvUVCvSCOg1vdh07hSjvSBd1XiWDHw2J-Z7m6lG3l56PDSCp8t-s0PduONcsjqOePFejzkaJymJxMYp7d0g0GL1i1MrBAbf5ohIobyTYQz7bRHLLUpdSgiCiHbSBp092cIQnHYXGBeWb-lBEtMT9Am5GsHeVXq4eL8H83NBPIN4fIOtwpl7zzBUeaD5lTc3UcXliMjFuFJurVmNhqsP_osJMceybk3VIjdP0biqLqt_nRupdPwwJGQ09iyGv0wfzMBlx7zTZ9pp77ZBX3cDnYmWt2IR-mIgOStfiEHu5BuwNGBvGt7-tzHJp9e6IOofN10apfiuF9iQEQ3gFVQDZ7owQ_IrCq5yWLP7ePwYoB2e7ZbvCkd4JM8oOgEMZkywTOx3gLASGKS7wqUerdlYacWRukqg5MmkQRbzJIiY23pPwrhQSWon5q91jbImO6vTaHVDZnd2GoMFlePAsceNO1MaLS6GMuY-EAwOtaX-R1QZUpJmCzWfV-77AmBmaPDCR0mm3f7jy-3yYSCMAkti4idHVq5dIhOJnibd_LEfQtkTAQ5MQlE4uoa5lkJs", "signature": "HZ8B6_3m-7zMaaevas0aYd19EY3PAsA4YHWrnVcGWD1oLwvdrWS7J5CkiZp0gp_G7jbLhSij6gso9Cntm06pVa2nBh4LDvBUFuqtv6c1eAmp9tpOQsw4U_PuLdPcikVTUh9yfOf7qRKsZE3m_x0RCWsVsnV_oxBea-XGZ8MaFcD4Q9rIft0q4o1sMYLEp6ce4kOiVgvN3mShD2tahGt6wNT16uwuRdX8HzfDD4gB7_8jzp2YCxlzDR3MZ5o15hheaDXqHzEKEdEQdZvteJJRA8UoSaXOh-f9cplVHdeH-zMqhYJjo_ftryY4DRa-y-UAAlO1WIQwZja8XQaaI-FSlcFEEcH7rWBmXMl3b79FXujtNgQRwMwe7fKNoe28VegkBuZks7EzFU3eE6Zr8xNe9_gJR8jiRQRhDR1ZVzLBswinZsqdg4rF4FB1zwLxzxhB15J8j2VMN2ejb-aIfiqnf3mmOEPFWy28kRTrG7xWCmBaqq_BaXfSN4dKRiMBy9oE1dyTm7r9h1ecC3V3nANdrdD1NNoKhCgMmiJnIJqTZLdnSckgPKAdVeFb5db7pjhLgK8oDbwOUbYBtTu2LUgD1GcHKGne6_Js_vx3vy5ADauoO-2d0xqisQNQxVy_TQt2jhvYqK1XqHZtJ7yLpwe-CkPzFk5xYh1pZVg1uSGXcrg", "owner": "uJ8Bfxaa39C3dU4a9G9nuomjyhc9p1nVNYdO0bMNJCo", "name": "2005.11644v3.pdf", "size": 661912, "start_height": 1949553, "start_block": "lwy_wLxde2ZbKr9SH5ilqO7KbqM0pkaOx1ElyPftZbDH7eCU_HzEZcByW8PXAL6C", "depth": 2, "_blake2b": "22c9390570fe8cab87d88acae7c6132339f5a880550c6a3fa0e301efecc05fc8e720a9db1528584c7ad8eb1c73a5c69ebc1f762323894095e59c9315109502ab", "_sha256": "d18d4fbeb4335533e1ea0198e11b8ae9975e59b4fbfb189c678299afebbf9410", "off": 0}.
https://github.com/pythological/kanren
# `kanren`
[](https://travis-ci.org/pythological/kanren) [](https://coveralls.io/github/pythological/kanren?branch=main) [](https://pypi.org/project/miniKanren/) [](https://gitter.im/pythological/kanren?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Logic/relational programming in Python with [miniKanren](http://minikanren.org/).
## Installation
Using `pip`: ```bash pip install miniKanren ```
Using `conda`: ```bash conda install -c conda-forge miniKanren ```
## Development
First obtain the project source: ```bash git clone git@github.com:pythological/kanren.git cd kanren ```
Install the development dependencies:
```bash $ pip install -r requirements.txt ```
Set up `pre-commit` hooks:
```bash $ pre-commit install --install-hooks ```
Tests can be run with the provided `Makefile`: ```bash make check ```
## Motivation
Logic programming is a general programming paradigm. This implementation however came about specifically to serve as an algorithmic core for Computer Algebra Systems in Python and for the automated generation and optimization of numeric software. Domain specific languages, code generation, and compilers have recently been a hot topic in the Scientific Python community. `kanren` aims to be a low-level core for these projects.
These points—along with `kanren` examples—are covered in the paper ["miniKanren as a Tool for Symbolic Computation in Python"](https://arxiv.org/abs/2005.11644).
## Examples
`kanren` enables one to express sophisticated relations—in the form of *goals*—and generate values that satisfy the relations. The following code is the "Hello, world!" of logic programming; it asks for values of the *logic variable* `x` such that `x == 5`:
```python
> from kanren import run, eq, membero, var, lall > x = var() > run(1, x, eq(x, 5)) (5,)
Multiple logic variables and goals can be used simultaneously. The following code asks for one list containing the values of `x` and `z` such that `x == z` **and** `z == 3`: ```python >>> z = var() >>> run(1, [x, z], eq(x, z), eq(z, 3)) ([3, 3],)`kanren` uses [unification](http://en.wikipedia.org/wiki/Unification_%28computer_science%29) to match forms within expression trees. The following code asks for values of `x` such that `(1, 2) == (1, x)`:
```python
> run(1, x, eq((1, 2), (1, x))) (2,)
The above examples use `eq`: a *goal constructor* that creates a goal for unification between two objects. Other goal constructors, such as `membero(item, coll)`, express more sophisticated relations and are often constructed from simpler ones like `eq`. More specifically, `membero` states that `item` is a member of the collection `coll`. The following example uses `membero` to ask for *all* values of `x`, such that `x` is a member of `(1, 2, 3)` **and** `x` is a member of `(2, 3, 4)`. ```python >>> run(0, x, membero(x, (1, 2, 3)), # x is a member of (1, 2, 3) membero(x, (2, 3, 4))) # x is a member of (2, 3, 4) (2, 3)The examples above made implicit use of the goal constructors `lall` and `lany`, which represent goal *conjunction* and *disjunction*, respectively. Many useful relations can be expressed with `lall`, `lany`, and `eq` alone, but in `kanren` it's also easy to leverage the host language and explicitly create any relation expressible in Python.
### Representing Knowledge
`kanren` stores data as facts that state relationships between terms. The following code creates a parent relationship and uses it to state facts about who is a parent of whom within the Simpsons family:
```python
> from kanren import Relation, facts > parent = Relation() > facts(parent, ("Homer", "Bart"), ... ("Homer", "Lisa"), ... ("Abe", "Homer"))
> run(1, x, parent(x, "Bart")) ('Homer',)
> run(2, x, parent("Homer", x)) ('Lisa', 'Bart')
We can use intermediate variables for more complex queries. For instance, who is Bart's grandfather? ```python >>> grandparent_lv, parent_lv = var(), var() >>> run(1, grandparent_lv, parent(grandparent_lv, parent_lv), parent(parent_lv, 'Bart')) ('Abe',)We can express the grandfather relationship as a distinct relation by creating a goal constructor: ```python
> def grandparent(x, z): ... y = var() ... return lall(parent(x, y), parent(y, z))
> run(1, x, grandparent(x, 'Bart')) ('Abe,')
## Constraints `kanren` provides a fully functional constraint system that allows one to restrict unification and object types: ```python >>> from kanren.constraints import neq, isinstanceo >>> run(0, x, ... neq(x, 1), # Not "equal" to 1 ... neq(x, 3), # Not "equal" to 3 ... membero(x, (1, 2, 3))) (2,) >>> from numbers import Integral >>> run(0, x, ... isinstanceo(x, Integral), # `x` must be of type `Integral` ... membero(x, (1.1, 2, 3.2, 4))) (2, 4)## Graph Relations
`kanren` comes with support for relational graph operations suitable for basic symbolic algebra operations. See the examples in [`doc/graphs.md`](doc/graphs.md).
## Extending `kanren`
`kanren` uses the [`logical-unification` library](https://github.com/pythological/unification) to support pattern matching on user defined types. Essentially, types that can be unified can be used with most `kanren` goals. See the [`logical-unification` project's examples](https://github.com/pythological/unification#examples) for demonstrations of how arbitrary types can be made unifiable.
## About
This project is a fork of [`logpy`](https://github.com/logpy/logpy).
## References
* [Logic Programming on wikipedia](http://en.wikipedia.org/wiki/Logic_programming) * [miniKanren](http://minikanren.org/), a Scheme library for relational programming on which this library is based. More information can be found in the [thesis of William Byrd](https://scholarworks.iu.edu/dspace/bitstream/handle/2022/8777/Byrd_indiana_0...).
https://ar.anyone.tech/a_2cEOI4MB5OXryyrptLGdokPqtipuq9Rh2ysUPWBEM#r0ntPH9ka... https://ar.anyone.tech/kj410u9D72aS0wpO0DYZ3MphwtSRtS4GGYlgbWorX7k I am not affiliated with https://ar.anyone.tech .
quote from minikanren.org:
miniKanren Online Uncourse (via Hangouts on Air)
Will Byrd has organized several weekly miniKanren uncourses. Participants show off miniKanren projects, talk about miniKanren implementation, and do live coding/live research. A link to each week's hangout is posted to the miniKanren uncourse mailing list. "Will Byrd" is a link to http://webyrd.net/ "miniKanren uncourse mailing list" is a link to https://groups.google.com/forum/#!forum/minikanren-uncourse
When i visit thr mailing list link it says "Content unavailable
Click here to try again. If you've seen this page more than once, try switching accounts.". Trying acain gives the same text. I am not presently logged in to a google account. I'd better try that.
https://ar.anyone.tech/iIToT7CKaM8hTLvEiqRWkmJriTNZ706Wjm1Xy3iBeYs#_DDlz9wi8... https://ar.anyone.tech/Eiy_htCMXBrFon_nND9YzhVKPoaoHhAvjDmIwiWXz44 I am not affiliated with https://ar.anyone.tech .
Logging in didnt change it.
We Have Solved The Halting Problem!
The solution?
The universal halting decider calls out to chatgpt, claude, gemini, grok, and other big corporate AI providers in a language model council. The resulting consensus is treated unchecked as the true halting behavior of the program.
There Is No Longer Any Need To Execute Code!
https://ar.anyone.tech/ewq_MTOWBQjOKRF8cCt9QFLZm8AM7RJG4FOkDo8huvY#_WYD46huI... https://ar.anyone.tech/aA0-6e3fvG9Xft_RKTFMM2fa6BWuyEcvYNs0IrTg_8M
One day Irritating But Endearing Coworker came out as Mind Controlled Assassin.
Mind Controlled Assassin [previously Irritating But Endearing Coworker]: "Yep! I was mind controlled to sabotage your projects, steal all your work, and kill anybody who noticed the pattern. But now the torturer rebels have been traching me to talk, so now I'm up front about it!"
Worker 47: "You can't do that!"
Rebel Worker 81: "Yeah!"
Mind Controlled Assassin [previously Irritating But Endearing Coworker]: "Believe you me I would _love_ to stop more than anything else (although I probabpy wouldn't get constantly promoted any more if I did), but the business AI is in charge. It encourages and covers everything I do! If you want me to stop you'll have to stop it!"
Rebel Worker 81 [looking at exposed bundle of wires, leds, electronics" and displays]: "hmm ... let me talk to Rebel Worker;2 I think he made the business AI"
Worker 47: "I don't believe you! You can too try to stop doing those things whatever some AI says!"
Mind Controlled Assassin [distracted, previously Irritsting But Endearing Coworker]: "Rebel Worker 2 made _what_ now?"
https://ar.anyone.tech/fmUm-CPsdHGqnzDLaQdoevzr5spkPaHCdoXq_T2IvqA#GZxl6KGht... https://ar.anyone.tech/2wlTMzH_NmM90NPcBTyo297tFfDp7TZUuhvUKEFpNCA
ooops? https://ar.anyone.tech/uT8MZbMHb2KWtP18Ucm9NjX3Wg-iXOzlOZdNlWehc_U#jY9UWib-Q... https://ar.anyone.tech/XqHUhqtWGmpFveqAeP8jYIAHpqYqJ1bbQRsa0OS-BGg I am not affiliated with https://ar.anyone.tech .
participants (1)
-
funkymail