102 days ago · 5 min read1032 words · Tech · hide · Fediverse post

Hello, loves! Tout le monde déteste l’IA. I feel some tiny objects coming on. I plan to let them come. Tiny objects FTW. I’m tentatively planning some hand objects for Denizens that say things. I have a few notions in mind: A sequence of sayings that are spoken once to the end and then the last one repeats if more requests are made. A sequence that cycles from beginning to end to beginning to end. A sequence that produces a random saying at each reference. A wrapper for the above that prefixes the string with a name and quotes the text. Begin with a test. class TestSaying: def test_say_sequence(self): seq = SequenceSayer(['a', 'b', 'c']) assert seq.saying == 'a' assert seq.saying == 'b' assert seq.saying == 'c' assert seq.saying == 'c' And a class. class SequenceSayer: def __init__(self, messages): self.messages = messages self.index = 0 @property def saying(self): message = self.messages[self.index] self.index = min(self.index + 1, len(self.messages)-1) return message And a test: def…

Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town