summaryrefslogtreecommitdiff
path: root/intellect-framework-from-internet/starts/meaning-vm/level-0/memorystore.hpp
diff options
context:
space:
mode:
authorolpc user <olpc@xo-5d-f7-86.localdomain>2020-01-10 14:56:27 -0800
committerolpc user <olpc@xo-5d-f7-86.localdomain>2020-01-10 14:56:27 -0800
commit26c980d302adce8e3d802cb8db8ab1c69d58ce1a (patch)
treee296225f17370c9e472660396b3a51539f76ff28 /intellect-framework-from-internet/starts/meaning-vm/level-0/memorystore.hpp
parent2e01fed206e46a669ba56f57b4b943cfe661a0f1 (diff)
parentc8bb547bea279af2bb48c13260f98aa8add07131 (diff)
downloadstandingwithresilience-26c980d302adce8e3d802cb8db8ab1c69d58ce1a.tar.gz
standingwithresilience-26c980d302adce8e3d802cb8db8ab1c69d58ce1a.zip
Merge branch 'intellect-framework-from-internet'
Diffstat (limited to 'intellect-framework-from-internet/starts/meaning-vm/level-0/memorystore.hpp')
-rw-r--r--intellect-framework-from-internet/starts/meaning-vm/level-0/memorystore.hpp63
1 files changed, 63 insertions, 0 deletions
diff --git a/intellect-framework-from-internet/starts/meaning-vm/level-0/memorystore.hpp b/intellect-framework-from-internet/starts/meaning-vm/level-0/memorystore.hpp
new file mode 100644
index 0000000..f416540
--- /dev/null
+++ b/intellect-framework-from-internet/starts/meaning-vm/level-0/memorystore.hpp
@@ -0,0 +1,63 @@
+#pragma once
+
+#include "common.hpp"
+
+#include <any>
+
+namespace intellect {
+namespace level0 {
+
+// self-reference loops are real.
+//
+// one person can feel urgent about issue A, and act on this urgency to engage
+// another person around B, who acts in a different way to someone else, eventually
+// cycling back to stress that stimulates the original person to feel more urgent
+// about issue A.
+// human behavior can make arbitrary positive or negative feedback loops.
+//
+// here in memory allocation, i've designed a system intended to reduce such loops
+// by encouraging my usage to be a certain way, but it still readily provides for
+// them.
+//
+// in process expansion / simple thought, we also have the issue of recursion.
+// if we trust a task to complete, and it ends up triggering itself in a subcontext,
+// we could wait forever.
+//
+// the solution to many of these things is to recognize repetition in systems.
+// we also become skeptical as things continue constantly. we expect to develop
+// some level of understanding that they will shrink, or we stop them and try
+// something else.
+
+// A solution to recursion appears to involve emotional expression.
+// Too much recursion maps acceptably to frustration of the process doing the repetitive task.
+// The building unmet need for effectiveness should influence other decision-making processes
+// if nothing else is larger. Notably if the caller needs timeliness, they won't get this
+// if the callee(s) do not have effectiveness.
+// propose: raise frustration[effectiveness] when calling self or repeating same behavior
+// propose: raise frustration[timeliness] if subprocess takes long (say every 400ms)
+// ideally raising an emotional expression should be associated with what caused it
+// and how the the universe might change to fix it.
+// decision-making processes need to judge what is relevent to them: a product of how well
+// they can help something and how strongly it is needed.
+
+namespace concepts {
+
+extern ref allocator(); // link shows what is holding something alive
+extern ref allocates(); // link shows what is being held alive
+
+extern ref allocations(); // to use as a basic allocator for simple things
+extern ref level0allocations(); // allocator for concepts internal to level0
+
+}
+
+ref basic_alloc(std::any data = {});
+void basic_dealloc(ref allocated);
+
+ref alloc(ref allocator, std::any data = {}); // new concept
+void alloc(ref allocated, ref allocator); // extra ownership for concept
+void realloc(ref allocated, ref allocator); // move ownership for concept to allocator
+void dealloc(ref allocated, ref allocator); // remove ownership for concept
+std::size_t allocated();
+
+}
+}