Comments (5)
This behaviour is caused by trueagi-io/hyperon-experimental#601
When code is changed as @DaddyWesker describes at some point interpreter evaluates the result of (True)
and caches it as (True) -> (True)
. After a while it evaluates (cdr (1))
, (1)
is an expression and it is evaluated first. Interpreter searches (1)
in cache and finds (True)
, finally it returns (True)
and evaluates (cdr (True))
which is True
.
from metta-examples.
One way to eliminate this is to use minimal MeTTa which doesn't use caching.
from metta-examples.
Another manner is to run REPL without Python support: cargo run --features no_python --bin metta
One can also install it: cargo install --features no_python install ./repl
from metta-examples.
Well, it seems that problem not in if
statement. If I replace augend with:
(= (augend $x) (caddr $x))
I'm still getting the same error. I don't get it. I wish there was some sort of step-by-step debugger.
from metta-examples.
Okay, I can confirm, that this code works with minimal metta. Thanks.
from metta-examples.
Related Issues (11)
- Missing explanations on how to run Child AI HOT 1
- in child_ai.py hard to understand the curiosity_behavior function
- Canonical way to process and/or present complex expressions with nested subexpressions HOT 4
- Question regarding types and their understanding HOT 3
- Question regarding performance hacks HOT 6
- Recursion with multiple matches HOT 3
- Case as replacement for cond HOT 7
- How to emulate lambda calculus? HOT 17
- What is the canonical way to write queries to knowledge graph HOT 44
- Slow list creation HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metta-examples.