Search results

  1. fukurou

    πŸ‘¨β€πŸ’» dev F sharp port

    type Chobits() = let mutable fusion = Fusion() let mutable noiron = Neuron() let mutable kokoro = Kokoro(AbsDictionaryDB()) let mutable isThinking = false let mutable algTriggered = false let dClasses = ResizeArray<Skill>() let awareSkills = ResizeArray<Skill>()...
  2. fukurou

    πŸ‘¨β€πŸ’» dev F sharp port

    kokoro cls update: type Kokoro(initialGrimoireMemento: AbsDictionaryDB) = let mutable emot = "" let mutable grimoireMemento = initialGrimoireMemento let toHeart = Dictionary<string, string>() member this.Emot with get() = emot and set(value) = emot <- value...
  3. fukurou

    πŸ‘¨β€πŸ’» dev F sharp port

    type Cerabellum() = let mutable fin = 0 let mutable at = 0 let mutable incrementAt = false let mutable alg: Algorithm option = None let mutable isActive = false let mutable emot = "" // Advance in algorithm member this.AdvanceInAlg() = if incrementAt then...
  4. fukurou

    πŸ‘¨β€πŸ’» dev F sharp port

    type Skill(initialKokoro: Kokoro option) = let mutable kokoro = initialKokoro let mutable outAlg: Algorithm option = None let mutable outpAlgPriority = -1 // Getter and Setter for Kokoro member this.Kokoro with get() = kokoro and set(value) = kokoro <- value...
  5. fukurou

    πŸ‘¨β€πŸ’» dev F sharp port

    type Neuron() = let defcons = Dictionary<int, ResizeArray<Algorithm>>() do // Initialize the dictionary with priority levels for i in 1 .. 5 do defcons.Add(i, ResizeArray<Algorithm>()) member this.InsertAlg(priority: int, alg: Algorithm) = if priority >...
  6. fukurou

    πŸ‘¨β€πŸ’» dev F sharp port

    // Define the Kokoro type type Kokoro(grimoireMemento: AbsDictionaryDB) = let mutable emot = "" let toHeart = Dictionary<string, string>() member this.Emot with get() = emot and set(value) = emot <- value member this.GrimoireMemento = grimoireMemento member...
  7. fukurou

    πŸ‘¨β€πŸ’» dev F sharp port

    type Algorithm(algParts: IMutatable list) = member this.AlgParts = algParts member this.Size = List.length algParts // Create an instance of APVerbatim let mutatableInstance = APVerbatim(["Test Sentence"]) :> IMutatable // Now it can be passed to Algorithm let algInstance =...
  8. fukurou

    πŸ‘¨β€πŸ’» dev F sharp port

    module LivinGrimorie open System.Collections.Generic // Define the AbsDictionaryDB class type AbsDictionaryDB() = member val Save: string -> string -> unit = fun _ _ -> printfn "Default Save method" with get, set member val Load: string -> string = fun _ -> "null" with get, set //...
  9. fukurou

    πŸ‘¨β€πŸ’» dev F sharp port

    type MyClass(value: int) = member this.Value = value member this.ExecuteFunction(f: MyClass -> int) = f this // Calls the function with the current instance // Define a function that accesses the object's attribute let getValue (obj: MyClass) = obj.Value // Create an instance...
  10. fukurou

    πŸ‘¨β€πŸ’» dev lambda skill experiment

    self.f1 = lambda ear, skin, eye: ""
  11. fukurou

    πŸ‘¨β€πŸ’» dev lambda skill experiment

    def create_and_use_global(): global counter # Declare the variable as global if "counter" not in globals(): # Check if it exists first counter = 0 # Initialize only once print(f"Counter created: {counter}") else: counter += 1 # Modify the existing global...
  12. fukurou

    πŸ‘¨β€πŸ’» dev lambda skill experiment

    class CustomBot: def __init__(self, action_func): self.action = action_func # Set function dynamically def perform_action(self, *args): return self.action(*args) # Call the function with arguments # Define a custom function def greet(name): return f"Hello...
  13. fukurou

    πŸ‘¨β€πŸ’» dev lambda skill experiment

    class Robot: def greet(self): return "Hello, I am a robot." # Define a new function def new_greet(): return "Hi! I'm your waifubot!" # Change the method dynamically robot_instance = Robot() robot_instance.greet = new_greet print(robot_instance.greet()) # Output: "Hi! I'm...
  14. fukurou

    πŸ‘¨β€πŸ’» dev lambda skill experiment

    def process_text(text): text = text.strip() # Remove whitespace text = text.upper() # Convert to uppercase return f"Processed: {text}" result = apply_function(process_text, " hello world ") print(result) # Output: "Processed: HELLO WORLD"
  15. fukurou

    πŸ‘¨β€πŸ’» dev F sharp port

    module LivinGrimorie // Define the AbsDictionaryDB class type AbsDictionaryDB() = member val Save: string -> string -> unit = fun _ _ -> printfn "Default Save method" with get, set member val Load: string -> string = fun _ -> "null" with get, set // Declare an object outside the class...
  16. fukurou

    πŸ‘¨β€πŸ’» dev F sharp port

    module AbsDictionaryDB // Define the AbsDictionaryDB class type AbsDictionaryDB() = member val Save: string -> string -> unit = fun _ _ -> printfn "Default Save method" with get, set member val Load: string -> string = fun _ -> "null" with get, set // Declare an object outside the...
  17. fukurou

    cts ports

    CTS Methods Ported from Java to Swift 1/5 - AddContinuousSkill func addContinuousSkill(skill: Skill) { if isThinking { return } skill.setKokoro(kokoro) ctsSkills.append(skill) } 2/5 - ClearContinuousSkills func clearContinuousSkills() { if isThinking { return }...
  18. fukurou

    cts ports

    CTS Methods Ported from Java to JavaScript 1/5 - AddContinuousSkill function addContinuousSkill(skill) { if (this.isThinking) return; skill.setKokoro(this.kokoro); this.cts_skills.push(skill); } 2/5 - ClearContinuousSkills function clearContinuousSkills() { if (this.isThinking)...
  19. fukurou

    cts ports

    CTS Methods Ported from Java to C# 1/5 - AddContinuousSkill public void AddContinuousSkill(Skill skill) { if (this.IsThinking) return; skill.SetKokoro(this.Kokoro); this.CtsSkills.Add(skill); } 2/5 - ClearContinuousSkills public void ClearContinuousSkills() { if...
  20. fukurou

    cts ports

    CTS Methods Ported from Java to VB.NET 1/5 - AddContinuousSkill Public Sub AddContinuousSkill(skill As Skill) If Me.IsThinking Then Return skill.SetKokoro(Me.Kokoro) Me.CtsSkills.Add(skill) End Sub 2/5 - ClearContinuousSkills Public Sub ClearContinuousSkills() If Me.IsThinking...
Top