This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[component_container_isolated-10] [INFO] [1733948499.855052061] [controller_server]: Received a goal, begin computing control effort. | |
[component_container_isolated-10] [INFO] [1733948502.957650038] [controller_server]: Passing new path to controller. | |
[component_container_isolated-10] [ERROR] [1733948503.930128544] [planner_server]: Failed to create a plan from potential when a legal potential was found. This shouldn't happen. | |
[component_container_isolated-10] [WARN] [1733948503.930219308] [planner_server]: GridBased plugin failed to plan from (1.36, 1.68) to (2.80, 1.17): "Failed to create plan with tolerance of: 0.500000" | |
[component_container_isolated-10] [WARN] [1733948503.930227143] [planner_server]: [compute_path_to_pose] [ActionServer] Aborting handle. | |
[component_container_isolated-10] [INFO] [1733948503.956205964] [controller_server]: Passing new path to controller. | |
[component_container_isolated-10] [ERROR] [1733948503.956302770] [controller_server]: Path is empty. | |
[component_container_isolated-10] [INF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import deque | |
from copy import deepcopy | |
import sys | |
import time | |
import random | |
# THE WORLD | |
world = """ | |
oooooooooooo | |
o o f o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define-syntax amb-parallel | |
(syntax-rules () | |
((_ arg1 arg2) | |
(receive (pipefd0 pipefd1) (create-pipe) | |
(let ((pid (process-fork))) | |
(if (eq? pid 0) | |
(let ((pipefd1_port (open-output-file* pipefd1))) | |
(write (amb-collect arg2) pipefd1_port) ;we can't backtrack into parent so we collect all of this level's results | |
(close-output-port pipefd1_port) | |
(exit 0)) ;child is done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(import (chicken process) (chicken file posix)) | |
(define-syntax parallel-list | |
(syntax-rules () | |
((_ arg1 arg2) | |
(receive (pipefd0 pipefd1) (create-pipe) | |
(let ((pid (process-fork))) | |
(if (eq? pid 0) | |
(begin (write arg1 (open-output-file* pipefd1)) | |
(exit 0)) ;child is done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(import (chicken process) (chicken string) (chicken file posix) amb) | |
(define-syntax amb-parallel | |
(syntax-rules () | |
((_ arg1 arg2) | |
(let-values (((pipefd0 pipefd1) (create-pipe))) | |
(let ((pid (process-fork))) | |
(begin (if (eq? pid 0) | |
(begin (file-write pipefd1 (string-append (->string arg1) "\n")) | |
(exit 0)) ;child is done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python3 timing.py | |
Starting 4 tests with 10 runs each, grab a coffee! | |
== | |
Compilation started. | |
Compilation complete. | |
TEST: !(factorial 30) | |
[265252859812191058636308480000000] | |
[265252859812191058636308480000000] | |
........ | |
Time MeTTa: avg=3.9196492433547974 seconds, var=0.019423207564014434 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(! (add-atom '&self ('coffee 'moka))) | |
(! (add-atom '&self ('coffee 'turkish))) | |
(= (myMultiFunction 'moka) ('moka 'good)) | |
(= (myMultiFunction 'moka) ('moka 'excellent)) | |
(! (Let w (superpose ('big 'small myMultiFunction)) | |
(Match '&self ('coffee x) (w x)))) | |
Output: | |
;[((big turkish)), ((big moka)), ((small turkish)), ((small moka)), ((moka excellent)), ((moka good))] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(coffee moka) | |
(coffee turkish) | |
(coffee expresso) | |
(coffee cappuccino) | |
(coffee latte) | |
!(match &self (coffee $1) $1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define %coffee | |
(%rel () | |
[('moka)] | |
[('turkish)] | |
[('expresso)] | |
[('cappuccino)] | |
[('latte)])) | |
(define (test data) | |
(if data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* add.c */ | |
#include <stdio.h> | |
float add(float a, float b) { return a + b; } | |
//gcc -shared -o libadd.so add.c -fPIC | |
/* main.c */ | |
#include <stdio.h> | |
extern float add(float a, float b); | |
int main() { printf("Result: %f\n", add(3.0, 4.0)); return 0; } | |
//gcc main.c -L. -ladd |
NewerOlder