Search results

  1. fukurou

    cpp port

    .h #ifndef KOKORO_H #define KOKORO_H #include <string> #include <unordered_map> using namespace std; class Kokoro { private: string emot; public: unordered_map<string, string> toHeart; // Constructor Kokoro(); // Getters and Setters const string& getEmot() const...
  2. fukurou

    cpp port

    .h #ifndef ALGORITHM_H #define ALGORITHM_H #include <vector> class Algorithm { private: std::vector<void*> algParts; // Using void* to avoid details about Mutatable public: // Constructors Algorithm(const std::vector<void*>& parts); Algorithm(const void* parts[], size_t...
  3. fukurou

    F# core

    the F stands 4 fuck module AbsDictionaryDB open System.Collections.Generic type DictionaryDB(saveFunc, loadFunc) = let db = Dictionary<string, string>() member _.Save key value = saveFunc db key value member _.Load key = loadFunc db key // Example save/load logic let defaultSave...
  4. fukurou

    πŸ‘¨β€πŸ’» dev core diet

    module AbsDictionaryDB open System.Collections.Generic type DictionaryDB(saveFunc, loadFunc) = let db = Dictionary<string, string>() member _.Save key value = saveFunc db key value member _.Load key = loadFunc db key // Example save/load logic let defaultSave (db...
  5. fukurou

    πŸ‘¨β€πŸ’» dev core diet

    module AbsDictionaryDB type SaveFunction = string -> string -> unit type LoadFunction = string -> string let createDictionaryDB (saveFunc: SaveFunction) (loadFunc: LoadFunction) = { new obj() with member _.Save = saveFunc member _.Load = loadFunc } // Example usage...
  6. fukurou

    πŸ‘¨β€πŸ’» dev core diet

    class Skill { protected var kokoro: Kokoro? = nil // Consciousness, shallow ref class to enable interskill communications protected var outAlg: Algorithm? = nil // Skills output protected var outpAlgPriority: Int = -1 // DEFCON levels 1->5 init() { super.init() }...
  7. fukurou

    πŸ‘¨β€πŸ’» dev core diet

    class Algorithm { private var algParts: [Mutatable] = [] init(algParts: [Mutatable]) { self.algParts = algParts } init(_ algParts: Mutatable...) { self.algParts = algParts } func getAlgParts() -> [Mutatable] { return algParts } func...
  8. fukurou

    πŸ‘¨β€πŸ’» dev core diet

    class APVerbatim: Mutatable { private var sentences: [String] = [] init(sentences: String...) { self.sentences.append(contentsOf: sentences) } init(list1: [String]) { self.sentences = list1 } override func action(ear: String, skin: String, eye: String)...
  9. fukurou

    πŸ‘¨β€πŸ’» dev core diet

    public void algPartsFusion(int priority, Mutatable... algParts) { this.outAlg = new Algorithm(algParts); this.outpAlgPriority = priority; // 1->5, 1 is the highest algorithm priority }
  10. fukurou

    πŸ‘¨β€πŸ’» dev core diet

    class Skill: def __init__(self) -> None: # Initialize protected attributes self.kokoro: Optional['Kokoro'] = None # Shallow reference for interskill communication self.outAlg: Optional['Algorithm'] = None # Skill's output self.outpAlgPriority: int = -1 #...
  11. fukurou

    πŸ‘¨β€πŸ’» dev core diet

    skill original class Skill: def __init__(self): # The variables start with an underscore (_) because they are protected self._kokoro = None # consciousness, shallow ref class to enable interskill communications self._outAlg: Algorithm # skills output...
  12. fukurou

    πŸ‘¨β€πŸ’» dev core diet

    class Algorithm: def __init__(self, algParts: list[Mutatable]) -> None: super().__init__() self.algParts: list[Mutatable] = algParts @classmethod def from_varargs(cls, *algParts: Mutatable) -> 'Algorithm': # Create an instance from varargs return...
  13. fukurou

    πŸ‘¨β€πŸ’» dev core diet

    class Algorithm: def __init__(self, *args: Mutatable) -> None: super().__init__() if len(args) == 1 and isinstance(args[0], list): # Check if input is a list self.algParts: list[Mutatable] = args[0] # Assign the list directly else: # Handle varargs case...
  14. fukurou

    πŸ‘¨β€πŸ’» dev core diet

    prechange py: class Algorithm: def __init__(self, algParts: list[Mutatable]): # list of Mutatable super().__init__() self.algParts: list[Mutatable] = algParts # *constract with string and goal @property def getAlgParts(self) -> list[Mutatable]: return...
  15. fukurou

    πŸ‘¨β€πŸ’» dev core diet

    class Algorithm: def __init__(self, *algParts): # Handle both a list input and variable arguments if len(algParts) == 1 and isinstance(algParts[0], list): self.algParts = list(algParts[0]) # Initialize with the given list else: self.algParts =...
  16. fukurou

    πŸ‘¨β€πŸ’» dev core diet

    class Algorithm: def __init__(self, *algParts): # Handle both a list input and variable arguments if len(algParts) == 1 and isinstance(algParts[0], list): self.algParts = list(algParts[0]) # Initialize with the given list else: self.algParts =...
  17. fukurou

    πŸ‘¨β€πŸ’» dev core diet

    class Algorithm: def __init__(self, *algParts): # Check if a single argument is a list, otherwise use variable arguments if len(algParts) == 1 and isinstance(algParts[0], list): self.algParts = list(algParts[0]) # Initialize with the given list else...
  18. fukurou

    πŸ‘¨β€πŸ’» dev core diet

    class APVerbatim: def __init__(self, *sentences): # Initialize with either a list of sentences or a variable number of arguments if len(sentences) == 1 and isinstance(sentences[0], list): self.sentences = list(sentences[0]) # Initialize with a copy of the list...
  19. fukurou

    πŸ‘¨β€πŸ’» dev core diet

    class Skill { constructor() { this.kokoro = null; // Consciousness, shallow ref class for interskill communications this.outAlg = null; // Skill's output this.outpAlgPriority = -1; // DEFCON levels 1->5 } // Skill triggers and algorithmic logic input(ear...
Top