35 Commits

Author SHA1 Message Date
hayodea acf62e61da Remove boostAsioLinkageFix 2026-05-30 12:12:59 -04:00
hayodea 4266af545a Boost.ASIO: upgrade io_service=>io_context, finally 2026-05-30 12:01:00 -04:00
hayodea 1c397dfeb5 Split: Split libspinscale off from SMO.
Now we can probably begin using libspinscale in Couresilient
without worrying about excessive technical debt later on.
2026-02-22 17:46:27 -04:00
hayodea 9159e9f7b4 Update: rename mrntt=>pptr 2026-02-18 01:14:26 -04:00
hayodea 5a4f498663 Libspinscale: Add separate CMake project config 2025-12-28 03:44:01 -04:00
hayodea 34d76df7d9 Spinscale: create new namespace sscl 2025-12-27 16:21:22 -04:00
hayodea 45959f9d1c Libspinscale: begin splitting it off 2025-12-26 01:18:39 -04:00
hayodea eeb057effd Dbg:Threading: prefix thread names with "smo:" so they group 2025-11-06 15:09:15 -04:00
hayodea c7e117b08e Dbg:Threading: use pthread_setname_np for debugging ease 2025-11-06 15:04:04 -04:00
hayodea 91ccd16b33 Add Mrntt component; init globalMind in mrntt.initializeReq
This makes the initialization sequence much cleaner and conceptually
well encapsulated.

We also now dynamically allocate the Mind objects. They're allocated
dynamically by Mrntt inside of initializeReq. This means that we no
longer have to worry about jolting and cleaning up the running threads
of global mind object even when we never explicitly called
Mind.initializeReq.

Along with other conceptual improvements to our abstractions, this
patch also gets us to a real "end of program initialization" point
for the first time.
2025-09-14 22:17:19 -04:00
hayodea 0dc8abaa28 Rework: Modularize Mind
Now we have modularized the Mind class to contain all of its
ComponentThreads. This enables us to run multiple mind instances
within the same SMO process, at least in theory.

We probably won't actually do this, but we want to ensure that the
design is clean enough to enable it.
2025-09-03 14:56:00 -04:00
hayodea 36c79f3a2e Threading: run all code in PThreads, add JOLTing & exception bubbling
This commit significantly restructures the way we setup threading in
SMO. We now don't use the CRT main() thread at all. It's only used
as a mechanism to ensure that Marionette doesn't execute before
global constructors have been executed.

JOLTing:

This is a simple ASIO post()ed message that makes each thread setup
its thread-local data pointer to its own ComponentThread object,
and then enter its main ASIO run() loop to await commands from
Marionette.

Exception bubbling:

We now cleanly cause mind threads to report their exceptions
to marionette, so that marionette can cleanly shut the mind down
in an orderly fashion.

Thread Control messaging API:

A namespace of asynchronous messages to be post()ed to threads to
control them. It enables us to pause and resume threads. This will
be very useful for Marionette when we add the ability for it to
suspend Salmanoff's running mind, inject new goals, inspect current
state, etc; and then resume the mind's execution.
2025-07-28 07:20:44 -04:00
hayodea d0aa8e2306 Rename hk=>smo 2025-07-22 06:48:04 -04:00
hayodea a5c2f47e9f Add design thoughts for intrins, compartmentalization, value-judgment 2025-07-22 02:03:45 -04:00
hayodea 09caf314f1 Eliminate the C FFI; Namespace lib API and DeviceManager
We decided to get rid of the C FFI for libs. It was becoming too intricate
and complicated. It was becoming a technical burden and expanding into
too much extra code. It's unfortunate, but we'll have to give up on getting
out-of-tree hot-loadable libraries the easy way.

It's possible to still do it with cross compilation or by keeping track
of the libstdc++ version that the running harikoff binary was compiled
against. Then we can ensure that our loadable lib code is linked against
that same libstdc++ code and this should ensure ABI stability.
2025-01-13 21:57:11 -04:00
hayodea 660f0f0e73 DevMgr: Make vectors hold sh_ptr and not uniq_ptr
This allows us to mirror the contents of the two lists into the unified
list much more easily.
2025-01-13 08:02:59 -04:00
hayodea 0a36f7d370 Build: Add XCB_LIBS; Skeleton: mlo_initializeInd, mlo_attachDeviceReq
* Renamed some of the Sense API lib classes
  (CSensorDeviceDesc=>CSenseDeviceDesc,
  SensorDeviceDesc=>SenseDeviceDesc).
* Moved SenseApiDesc into /include/user/senseApiDesc.
* Add conversion constructor to convert from SenseDeviceDesc
  to
* Wireframe mlo_initializeInd to call xcb_connect().
* Add $(XCB_LIBS) to libxcbXorg_LDFLAGS.
* Wireframe mlo_attachDeviceReq().
2025-01-12 14:31:33 -04:00
hayodea b85d6f76a6 SenseApiMgr: add initialize/finalizeAllSenseApiLibs()
Also, SenseApiDesc: initializeInd() now takes void. We no longer
try to pass a struct of marionette-role ops into the libs. We'll
be using message queueing for the handshake side of async calls now.
2025-01-12 09:44:49 -04:00
hayodea c6577b1155 Add stringifiers to SenseApi related classes 2025-01-11 06:40:43 -04:00
hayodea 8aa28a877e Marionette: Post initializeHarikoff() as a lambda 2025-01-11 06:19:11 -04:00
hayodea bffc32519b ComponentThreads: now basics are working.
Next step is to get the unified event loops working generically
and then we can begin region-splitting up the data in harikoff.

We'll assign all the global resource managers to Marionette and
then assign the Mind components to the respective component threads.
2025-01-11 04:35:11 -04:00
hayodea 876526364b Build: Added -Wall,extra,-pedantic, fixed warnings and peeves. 2025-01-10 18:27:10 -04:00
hayodea 870b8de249 Marionette: Introduce concept and add other 3 component threads
We introduce the 4 main component threads of execution for Harikoff:
* Marionette: This is the resident hijacking module that makes Harikoff
  instances non-persons, if configured to allow hijacking.
* Director: :)
* Canvas: :)
* Subconscious: DB, storage and recall.
2025-01-10 17:37:49 -04:00
hayodea 090f0d3b02 senseApiMgr: new method: loadAllSenseApisFromOptions
This method dlopens() all senseApi libs that were referenced by
device specs.
2025-01-08 15:06:31 -04:00
hayodea bffa2b837c Opts: Make singleton; senseApi: check senseApiLibPath, get senseApiDescFn pointer.
* OptionsParser now has a singleton.
* We now use the cmdline opt -p <senseApiLibPath>, and search for
  the specified library in:
  * senseApiLibPath, then CWD, then the place where our executable
    is running from, and then finally we let the hosting OS do
    its own search.
* We now call dlsym() on dlopen()'d libs to to get the senseApiDescFn
  pointer.
2025-01-08 13:43:44 -04:00
hayodea 4f224003fd Main: Invoke parser and print out results 2025-01-07 14:14:57 -04:00
hayodea 6307d2869e DeviceManager: Initial class with DeviceSpecParser
Hopefully by the end of tonight we should be done with the dev
spec parser.
2025-01-05 14:19:53 -04:00
hayodea 0232293bb0 whitespace 2025-01-05 14:03:44 -04:00
hayodea 77e6eca091 main: Gh copilot insists on this formatting 2025-01-05 14:01:16 -04:00
hayodea 00ce114d40 cmdopts: Add a -?/--help option 2025-01-05 13:35:14 -04:00
hayodea 77a19deb8e cmdopts: Add --interceptor, --extrospector, --actuator and --devicefile 2025-01-05 13:25:40 -04:00
hayodea a1edf27e9e Idlework 2025-01-04 13:21:33 -04:00
hayodea 6ae037c7e7 Director: now has a goal. Goal inherits from Scene 2025-01-04 11:36:50 -04:00
hayodea 841441806c Now builds.
* Cut out all extraneous includes.
2025-01-04 07:33:15 -04:00
patergentium 6dc4287ae3 Refactor project structure and update configurations
The project now builds.

- Updated .vscode/launch.json and .vscode/tasks.json for improved
    development workflow
- Modified Makefile.am, configure, and configure.ac for build process
    enhancements
- Updated corelogic/Makefile.am and
    corelogic/include/sensors/interoceptor.h
- Renamed corelogic/main.cpp to main.cpp for better project organization
2024-11-22 20:07:42 +11:00