Skip to content

Conversation

@ssoelvsten
Copy link
Collaborator

@ssoelvsten ssoelvsten commented Dec 4, 2025

Continuation of #80 as I'm looking at adding monadic values (generalisation of #66).

In this case, I seemed to have to make changes to the p2p layer. Furthermore, I also would need a cryptographic hash of Troupe values (where the Hash module would not be applicable). Hence, these changes constitute some cleanup and documentation of both.

Code should NOT be left as a comment; it only leaves an unmaintained noise
that makes the remaining code harder to deal with.
Trailing whitespaces, missing semi colons, missing trailing comma on objects,
odd comment structur, outcommented dead code, odd order of functions, ...
Trailing whitespace, missing semi colons, hard to understand comments, ...
Trailing whitespace, missing semi colons, odd comments, dead code, ...
There is no reason to have an inconsistent access to `scheduer.__currentThread`;
one may as well just access it directly (as is done in the Runtime Monitor).
Furthermore, why the `__` when the variable is treated as public anyways?
This function is only called in one placed with these arguments given. This is
essentially dead code.
There seems to be no reason why we have to have an O(n) unblocking logic.
Furthermore, this is much cleaner.
… an enum

This much better conveys the meaning of this argument, especially from the call site
This operation seems only designed for the values of the Raw type as
is now defined in rawUtil.mts. Yet, it is hard to get it into the type
system, as the basic types (number, string, and boolean) do not have a
'_troupeType' value.

Either this algorithm needs some rewriting and/or we need to redesign
the type definition a bit to make it easier for TypeScript to follow.
@ssoelvsten ssoelvsten added this to the Nomadic Modules & Values milestone Dec 4, 2025
@ssoelvsten ssoelvsten added 📁 ./rt Changes and additions to the runtime ✨ code quality Uncle Bob would be proud labels Dec 4, 2025
@ssoelvsten ssoelvsten mentioned this pull request Dec 4, 2025
@ssoelvsten ssoelvsten force-pushed the fork/dev/rt-cleanup-2 branch from 82fcee2 to c1c8350 Compare December 5, 2025 09:50
@ssoelvsten ssoelvsten force-pushed the fork/dev/rt-cleanup-2 branch 5 times, most recently from ddcd496 to 8558bc8 Compare December 5, 2025 11:43
@ssoelvsten ssoelvsten force-pushed the fork/dev/rt-cleanup-2 branch 2 times, most recently from 543448a to 4a69d77 Compare December 8, 2025 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ code quality Uncle Bob would be proud 📁 ./rt Changes and additions to the runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants