skip to content
tlam://feed

// think like a machine

php.compile()

15 expressions · 8 languages

~/pooper/class_person.php

class Person

You say fine. The internal state says otherwise.

<?phpenum Mood: string{    case Content = 'content';    case Fine = 'fine';    case Tired = 'tired';    case Anxious = 'anxious';}class Person{    private const MAX_ENERGY = 100;    private const HOURS_NEEDED = 8;
~/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    ];