Searching txt.sour.is

Twts matching #pi
Sort by: Newest, Oldest, Most Relevant
In-reply-to » Can you beat me at the circle game? 😂 https://neal.fun/perfect-circle/

Can you automate the drawing with a script? On X11, you can:

#!/bin/sh

# Position the pointer at the center of the dot, then run this script.

sleep 1

start=$(xdotool getmouselocation --shell)
eval $start

r=400
steps=100
down=0

for step in $(seq $((steps + 1)) )
do
    # pi = 4 * atan(1)
    new_x=$(printf '%s + %s * c(%s / %s * 2 * (4 * a(1)))\n' $X $r $step $steps | bc -l)
    new_y=$(printf '%s + %s * s(%s / %s * 2 * (4 * a(1)))\n' $Y $r $step $steps | bc -l)

    xte "mousemove ${new_x%%.*} ${new_y%%.*}"
    if ! (( down ))
    then
        xte 'mousedown 1'
        down=1
    fi
done

xte 'mouseup 1'
xte "mousemove $X $Y"

Image

Interestingly, you can abuse the scoring system (not manually, only with a script). Since the mouse jumps to the locations along the circle, you can just use very few steps and still get a great score because every step you make is very accurate – but the result looks funny:

Image

🥴

⤋ Read More
In-reply-to » So, we need a computer for house (that is, wife and I) usage. We have none, we rely on our pocket computers. I would like to fill the void with the recently announced Mac mini. What technique could I use with an already stressed out wife, to accomplish this goal? 😅

So, I had a talk with the CFO last night about this. Nothing to be gained yet, but baby steps. I think we might be able to get one for Christmas. That is, if there is any left. These little things are flying off the shelves like hot apple pies!

⤋ Read More

I run Plan 9 on my server and my main home workstation (a raspberry pi). My “daily driver” time is basically split between that and a Mac (excluding time on my phone, i suppose). I think it looks elegant, too. :-)

⤋ Read More

sometimes i think i should return to a cleaner state of mind, abandon all big never-to-be-finished projects, and write simple text-processing utilities on a raspberry pi running plan 9, improvising fractile jazz over a lonely lake and spend most of my remaining time meditating.

⤋ Read More
In-reply-to » I fork bombed my computer! With ed(1)!!! Haven't done that in a while.

@lyse This was basically a trial/proof-of-concept for the real goal: a switch which, if on at boot time, causes the pi to boot straight to ed.

⤋ Read More
In-reply-to » I fork bombed my computer! With ed(1)!!! Haven't done that in a while.

I made a gpio button on my raspberry pi which opens a new window running ed. I screwed up while testing it and launched maaaaany ed windows.

⤋ Read More
In-reply-to » I just timed it: 59 seconds for my Raspberry Pi to boot, 33 of which is waiting for my keyboard firmware to initialize. That's just absurd.

For sure. The pi progresses normally until it prints that it’s initializing the keyboard, at which point the keyboard spends ~30 seconds beeping.

⤋ Read More