Skip to content

Instantly share code, notes, and snippets.

@Anniepoo
Created July 19, 2020 10:55
Show Gist options
  • Save Anniepoo/0ddb61b9eb34f323350f7104eb667d82 to your computer and use it in GitHub Desktop.
Save Anniepoo/0ddb61b9eb34f323350f7104eb667d82 to your computer and use it in GitHub Desktop.
go(Y) :-
setof(X, a_tweet(X), Tweets),
random_permutation(Tweets, RandTweets),
!,
member(Y, RandTweets).
a_tweet(X) :-
phrase(rando_tweet, Code),
length(Code, L),
L < 280,
string_codes(X, Code).
rando_tweet -->
what_happened,
call_to_action,
where_am_now.
rando_tweet -->
what_happened,
where_am_now,
call_to_action.
what_happened -->
identity,
old_accounts,
( "got " ; "were " ),
zap_action,
". ".
identity --> "My ".
identity --> "My and SWI-Prolog ".
identity --> "SWI-Prolog and my ".
identity --> "Our ".
old_accounts --> "old accounts ".
old_accounts --> "old accounts (@AnnieTheObscure and @SWI_Prolog) ".
zap_action --> "zapped".
zap_action --> "2FAed out of existance".
zap_action --> "caught up in a Twitter algo false positive".
zap_action --> "trashed by 2FA".
call_to_action --> beg, a_rt, ". ".
beg --> "Could use ".
beg --> "Could you please give us ".
beg --> "Please give us ".
a_rt --> "a retweet".
a_rt --> "an RT".
a_rt --> "a RT".
where_am_now --> possessive, "are at ", new_locs, ". ".
possessive --> "My accounts ".
possessive --> "Our accounts ".
possessive --> "New accounts ".
new_locs --> "@AnneOgborn @PrologSWI".
new_locs --> "@PrologSWI and @AnneOgborn".
new_locs --> "@PrologSWI for SWI-Prolog and here for me".
new_locs --> "SWI-Prolog now at @PrologSWI I am at @AnneOgborn".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment