skip to content
tlam://feed

// think like a machine

feelings.compile()

15 expressions · 8 languages

~/mrpotato/dream_or_nightmare.cpp

Dream or nightmare?

Just messing around with C++ as I can't really code anything useful in it...

#include <iostream>#include <vector>#include <cstdlib>#include <ctime>class Dream {protected:    std::string content;    double serenityLevel; // 0 (pure terror) to 1 (absolute peace)public:    Dream(std::string content, double serenity) : content(content), serenityLevel(serenity) {}    virtual void experience() const {        std::cout << "Drifting into a dream... " << content << "\n";
~/mrpotato/playing_with_a.js

Playing with a 🐶

I've created a fun jQuery function that models dog behavior, including zoomies, tail wags, and belly rubs. It's all based on a core "excitement level" metric.

function playWithDog($dog) {    // Dog's initial excitement level affects everything!    let excitementLevel = $dog.data('excitement') || 50;        // Dogs get more excited when you show them a toy    function showToy(toyType) {        const toyMultiplier = {            'ball': 2,            'frisbee': 1.8,            'stick': 1.3,            'squeakyToy': 2.5        };                excitementLevel *= toyMultiplier[toyType];
~/pooper/regret.php

Regret

It's a tough one, but it's true. Funny how we are actually not that complicated...

<?phpclass Person{    private string $name;    private array $pastDecisions = [];    private array $regrets = [];    private float $selfForgiveness = 0.5; // Scale: 0 (never forgive) to 1 (always forgive)    public function __construct(string $name)    {        $this->name = $name;    }
~/pooper/decisions_decisions.php
<?phpclass Person {    private float $mentalEnergy = 100.0;    private array $decisionsToday = [];    private array $habits = [];    private array $decisionWeights = [        'trivial' => 0.5,      // What socks to wear        'minor' => 2.0,        // What to eat for lunch        'moderate' => 5.0,     // Whether to go to the gym        'major' => 15.0,       // Whether to accept a job offer        'critical' => 25.0     // Whether to move to a new city    ];    
~/pooper/a_sunny_day.js

A sunny day

This is what ChatGPT told me a sunny day was in JS... "Here's a fun JavaScript class representing a sunny day, complete with methods to shine, warm up, cool down, change mood based on cloudiness, and even experience a beautiful sunset. Enjoy the digital sunshine! 🌞😎"

class SunnyDay {    constructor(temperature = 25, cloudiness = 0, mood = "cheerful") {        this.temperature = temperature;        this.cloudiness = cloudiness; // 0 means no clouds, 100 means storm incoming!        this.mood = mood;        this.brightness = 100 - this.cloudiness;    }    shine() {        if (this.cloudiness > 80) {            return "The sun is trying its best, but those clouds are really in the way...";        }        return `The sun is shining brightly with a brightness level of ${this.brightness}!`;    }