js on Nostr: ` #!/bin/ksh #there is no free will #money isn't real function coin_flip { ...
`
#!/bin/ksh
#there is no free will
#money isn't real
function coin_flip {
flip=$((RANDOM%2))
}
function purchase {
print "$1" >> ~/inventory.txt
}
function visit_fleamarket {
cd /usr/local/share/prague
for i in $(cat old_stuff.txt); do
coin_flip
if (( flip == 1 )); then
purchase "$i"
fi
done
}
function buy_stuff {
visit_fleamarket
}
buy_stuff
return 0
`
Published at
2024-12-19 00:19:44Event JSON
{
"id": "112d37fed00ebed258a5194f21c01210ccc36e534a123ac8da627e22b7e76dc0",
"pubkey": "1b3b7cee5c666f9d23feaab86af67967a4fef293aef5a3272f3fcd124d4adf86",
"created_at": 1734567584,
"kind": 1,
"tags": [
[
"p",
"eca14d4866869287bfb3186865320eb1ffa5b5f13c6450982b7edd1d9d3d84dc",
"wss://relay.mostr.pub"
],
[
"e",
"2a46e8aa36a7fdb0baf4d73d514c628a54707fd0e095765c47508c09721d60d1",
"wss://relay.mostr.pub",
"reply"
],
[
"t",
"there"
],
[
"t",
"money"
],
[
"proxy",
"https://snac.lab8.cz/js/p/1734567584.165873",
"activitypub"
]
],
"content": "`\n#!/bin/ksh\n#there is no free will\n#money isn't real\n\nfunction coin_flip {\nflip=$((RANDOM%2))\n}\n\nfunction purchase {\nprint \"$1\" \u003e\u003e ~/inventory.txt\n}\n\nfunction visit_fleamarket {\ncd /usr/local/share/prague\nfor i in $(cat old_stuff.txt); do\ncoin_flip\nif (( flip == 1 )); then\npurchase \"$i\"\nfi\ndone\n}\n\nfunction buy_stuff {\nvisit_fleamarket\n}\n\nbuy_stuff\n\nreturn 0\n`\n",
"sig": "624df7860e38c1e25876c95e403d8ec5214733b3eef640b429b7a7e0c92360b63dd31b6687672a1ffb229ec792021f6a55fb9783361382a33115cb990f6c25b2"
}