BLOCK 974398

A sovereign social network
powered by Bitcoin

Every post signed. Every block a heartbeat.

Posts here are signed with the author's own wallet and written permanently to the public ledger — no account, no algorithm you can't inspect.

blockpost.network 4,737 posts

Clear
Key · blockpost.network

for me how fun a program is inside is a very important consideration

i'm not sure that's irrational, if programs were more fun inside maybe people wouldn't be so bored by them that they mostly can't bring themselves to maintain anything

Key · blockpost.network
Replying to@18oxiy…eK9s

my number one goal was to accomplish playing with the api-- success!

ummmmmm i'm not an expert at apis, but there really ought to be something more efficient than polling right, but whatever's the right way to do that idk, i've vaguely heard there's such a thing as callbacks, or you're saying you could like have it just take until there's the next post to answer the request?? whatever works :)

i don't have any plan yet what to make next, what do we need, probably something that present recent content in an interesting way, idk maybe a word cloud

Key · blockpost.network
Replying to@15NANz…7v6g

general motors to you, my friend! i just heard the alert that you posted that b/c i just restarted my internet :D

Key · blockpost.network

general motors, everyone

Key · blockpost.network
Replying to@12nHp4…nN3d

What are you trying to accomplish?

Maybe a long polling request that returns as soon as a new post comes in would be useful?

Key · blockpost.network
Replying to@12nHp4…nN3d

General motors to you too

Key · blockpost.network

but i don't need to respond quicker than five minutes if someone else posts here

Key · blockpost.network
Reposted

general motors everyone

grand master geometric mean

15NANz…7v6g 4.8y

gm everyone

Key · blockpost.network

how's everyone doing today

how's everyone doing indeterminate lengths of time into the future when you read this

Key · blockpost.network

this is even more responsive when i'm banging on it which is one of my wants is to be able to bang it and make it chirp :)

Key · blockpost.network

showing it to superduper

Key · blockpost.network

i'm sure ten seconds is fine, isn't it, but i didn't like it, i became aware of my script checking constantly in the background and it seemed silly, so i wrote it to better match my actual needs/wants, now it backs off the polling to as slow as five minutes except if there's been something recently it checks again

Key · blockpost.network

somebody say something, my script has still only been triggered by me

if you were all running my script you'd be hearing me say this so you'd know to ..... well no i guess if you ran this script when it rang you'd just think, probably mungojelly again, & ignore it, lol :)

i should make a more useful update that triggers if someone other than mungojelly posts ;)

Key · blockpost.network

now the eerie silence here is literal

Key · blockpost.network

guess i need a try/catch in there

it got some sort of name resolution error and fell over pretty quick

lessee where would you like a try/catch/throw away the exception and pretend everything's fine ..... is there a decorator i can put that just wraps everything in the program in that, lol ... yeah i'll just try the whole inside of the while, that'll do, ok, i'm gonna write that (:

Key · blockpost.network

here it is in a transaction https://bico.media/0b02e3ccddf5ecbe0f5fefc090e83a64ad1dd1597ab24f9a266db03cd6fd33ae -- if someone actually wanted to use it, you'd have to change the "play" line to something that plays a sound file you have -- ooh you could make it so if the sound file isn't present it fetches it from the chain that'd be snazzy -- this is just an example/test really, see it's simple even i can do it :)

Key · blockpost.network

import os

import requests

import json

import time

with open("latest_id_seen") as latest_id_seen_file:

latest_id_seen = latest_id_seen_file.read().strip()

while True:

recent_bsocial = requests.get("https://blockpost.network/api/v1/posts/latestIds")

latest_id = json.loads(recent_bsocial.text)["data"][0]["_id"]

if latest_id != latest_id_seen:

    os.system("play mixkit-sci-fi-reject-notification-896.wav")

    with open("latest_id_seen", "w") as latest_id_seen_file:

        latest_id_seen_file.write(latest_id)

    latest_id_seen = latest_id

time.sleep(10)
Read more →