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
BLOCK 974398
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.
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
"not to be mean or anything like that but the guy's a fucking moron" lol ... i'm sorta watching this chat w/ dr wright https://coingeek.com/a-catch-up-with-the-inventor-of-bitcoin-dr-craig-wright/
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
general motors to you, my friend! i just heard the alert that you posted that b/c i just restarted my internet :D
general motors, everyone
What are you trying to accomplish?
Maybe a long polling request that returns as soon as a new post comes in would be useful?
General motors to you too
here's a version with the less aggressive polling https://bico.media/c6ffdcab181558874fe4bd67657781e66a095fdb61c259e64365b99a1c6ce8ae see how nice i'm being to the api, aren't i such a good example, be nice like me and this free api will last for a while :D
but i don't need to respond quicker than five minutes if someone else posts here
how's everyone doing today
how's everyone doing indeterminate lengths of time into the future when you read this
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 :)
showing it to superduper
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
i found out there's a thing "suppress" where you can just say "with suppress(Exception):" so i just said that, lel
here's that version https://bico.media/3bcb9bbabb20a4652d238b03ddab3945729c5eef4507493fe9f40fb536e0cef5
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 ;)
now the eerie silence here is literal
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 (:
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 :)
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)