Skip to content

refactor: convert single-use 1-3 line helper functions to inline expr… - #28

Closed
ekrama040-byte wants to merge 1 commit into
iCog-Labs-Dev:mainfrom
ekrama040-byte:refactor/lambda-expressions
Closed

ekrama040-byte wants to merge 1 commit into
iCog-Labs-Dev:mainfrom
ekrama040-byte:refactor/lambda-expressions

Conversation

@ekrama040-byte

Copy link
Copy Markdown

Description

Streamlined the codebase by identifying small, single-use utility functions (1-3 lines long) across the repository and refactoring them directly inline to optimize structural overhead.

Key Changes

  • Inlined is_metta_test and output_tail in scripts/run-tests.py.
  • Inlined evaluateBaseline in evaluate_trading.py.
  • Inlined _clamp11 in context_parser.py.
  • Optimized execution_instruction directly inside the behavioral prompt f-string block inside llm/conversation.py.

Verification

Verified that all files successfully pass python syntax compilation checks via py_compile.

@Nahom32 Nahom32 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ekrama040-byte I told you to use this format: https://github.com/trueagi-io/PeTTa/blob/ae66fa8e41dcd5539d614706bd4e5cfb34f9608d/examples/forall.metta#L64 . I didn't want you to write lambda expressions for the python implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants