Why are LLMs so small?
so much knowledge in such a small space
- tags
- ai
I want to post more to the blog, and I want to share it out a bit more. There's an indeiweb concept called POSSE, which means Publish on your Own Site, Syndicate Elsewhere. So lets write a script that pulls down my feed, looks as what I've posted so far on Mastodon, and prompts me to share something.
Lets start our publish.rb
script with some boilerplate fun, including
some inline gems so we don't need to cart a Gemfile
around all the
time.
|
|
Here we can pull down our public RSS feed of our mastodon account, which is an easy way to see what the latest posts are. We won't worry too much about going back in time.
|
|
Test it. (Down at the bottom I list out all the commands.)
|
|
Title: URL: https://floss.social/@wschenk/112000626406541728 Date: 2024-02-27 00:32:13 UTC <p>"Solar flares contain a colossal amount of energy—enough, in a ... ------------------------- Title: URL: https://floss.social/@wschenk/111654845759601896 Date: 2023-12-27 22:55:39 UTC <p>Finally getting an official API after however many years <a href="ht... -------------------------
We can use the URI.extract
method to go through a string and find all of the
URLs, like this:
|
|
https://willschenk.com/about https://google.com
Lets add that to our publish.rb
script:
|
|
And we can run it
|
|
["https://", "https://blog.tezlabapp.com/2023/12/27/teslas-api-from-old-to-new-with-improved "https://floss.social/tags/StrangeLoop", "https://floss.social/tags/ai", "https://floss.social/tags/bash", "https://floss.social/tags/cli", "https://floss.social/tags/covid", "https://floss.social/tags/gaza", "https://floss.social/tags/genocide", "https://floss.social/tags/rivian", "https://floss.social/tags/ruby", "https://floss.social/tags/strangeloop", "https://floss.social/tags/tesla", "https://floss.social/tags/tezlab", "https://floss.social/tags/thor", "https://floss.social/tags/turingpost", "https://github.com/wschenk/thorsh", "https://tezlab.app/9366b15fdf5cbd8068b251e679fde1fb-ea2f9f", "https://toot.thoughtworks.com/@cford", "https://willschenk.com/fragments/2023/should_robots_have_rites_or_rights/", "https://willschenk.com/fragments/2024/why_are_ll_ms_so_small/", "https://willschenk.com/labnotes/2023/erb_static_site_builder/", "https://www.", "https://www.newyorker.com/magazine/2024/03/04/what-a-major-solar-storm-could-d "https://www.nplusonemag.com/online-only/online-only/gimlet-on-the-rocks/", "https://www.turingpost.com/p/evonfire"]
We've already seen how to pull down an RSS feed, lets do that for the blog itself.
|
|
|
|
https://willschenk.com/fragments/2024/why_are_ll_ms_so_small/ https://willschenk.com/fragments/2024/5_year_old_hacking_chatgpt/ https://willschenk.com/labnotes/2024/ai_in_emacs/ https://willschenk.com/fragments/2024/fifteen_or_twenty_thousand_years/ https://willschenk.com/labnotes/2024/running_google_gemma_locally/ https://willschenk.com/fragments/2023/political_implications/ https://willschenk.com/labnotes/2023/sinatra_with_activerecord/ https://willschenk.com/fragments/2023/a_good_death/ https://willschenk.com/fragments/2023/locations_in_the_magicians/ https://willschenk.com/fragments/2023/everything_is_equally_evolved/
Ruby has some fun set operations on arrays! Let's use the &
one!
|
|
|
|
Getting toot_links Getting feed_links Shared links https://willschenk.com/fragments/2023/should_robots_have_rites_or_rights/ https://willschenk.com/fragments/2024/why_are_ll_ms_so_small/ https://willschenk.com/labnotes/2023/erb_static_site_builder/
My server is floss.social, so lets go on over to
https://floss.social/settings/applications and make a new app. I'm
putting my website as the url, and giving myself read
and write
permissions.
Then go into the application settings itself, and pull out the access
token
. Create the config.yml
file, which should look something like
this:
|
|
|
|
Which we can test with
|
|
Successfully posted message to Mastodon.
Lets go!
|
|
Here's the script harness to run all of this stuff.
|
|
Previously
Next