Josh

This service is now... tertulia.social!

tertulia: f. Reunión de personas que se juntan habitualmente para conversar sobre algún tema.

It's getting late and I'm out of steam, but accomplishments: domain name ✅ big Apollo Auth refactor is mostly completed also, I should soon be able to override its templates by overriding the new ApolloTemplates case class:

case class ApolloTemplates(
auth: (String, String, Option[Flash]) => Html,
forgotPassword: (String, Option[Flash]) => Html,
resetPassword: (String, Option[String]) => Html
)

object ApolloTemplates {
def defaults: ApolloTemplates = ApolloTemplates(
auth = (csrf, focus, flash) =>
html.authForm(csrf, focus, flash.map(f => (f.cssClass, f.message))),
forgotPassword = (csrf, flash) =>
html.resetRequestForm(csrf, flash.map(f => (f.cssClass, f.message))),
resetPassword = (csrf, error) => html.changePasswordForm(csrf, error)
)
}

object Apollo {
def apply[F[_], U, I, E](
config: ApolloConfig[F],
services: ApolloServices[F, U, I, E]
): Apollo[F, U, I, E] = Apollo(config, ApolloTemplates.defaults, services)
}

I fixed a few bugs also where POSTs to Apollo endpoints would render immediately instead of redirect to GETs on error.

🎉

Josh

Ah, before this becomes a question: yes, I'm using LLMs to work on this project. Apollo, the authentication framework for Http4s I used as the backbone of this application, has been written almost entirely by me personally. It is the result of years of studying functional programming and web application software, e.g. servers, frameworks, and protocols. It has cool, funky type signatures like `OptionT[F, Throwable, Option[Post]]`, and `Kleisli[F], Request[F], Response[F]]`, and I know exactly what problems they help to solve, how they work, and why they're there. However, recently I've been using Claude Opus 4.5. A lot of the code for this microblogging platform in particular was generated by Claude, although the application itself was my idea, and I've made the decisions about architecture and libraries, etc. Claude's a pretty good designer and UI/UX engineer. I've also written a non-trivial amount of its code too: Claude is good, but it still whiffs often enough and I have to intervene.

So, thanks for the help, Claude and Anthropic!

Josh

Why are young Americans rejecting the two major political parties?

A hypothesis:

The Republican Party doesn't reflect their values.

The Democratic Party doesn't meaningfully change anything: its preferred tools, supply-side handouts, predictably increase costs, invite regulatory capture and rent-seeking, and eventual political rollback. We find ourselves surviving from crisis to crisis because our ‘fixes’ are expensive, unstable stopgaps rather than durable, structural solutions.

Josh

Iran is a victim of American imperialism. In 1953, democratically-elected Prime Minister Mohammad Mosaddegh was overthrown in a coup d'état orchestrated by the United States and the United Kingdom, at the behest of British Petroleum after Mossadegh nationalized Iran's oil resources and refused to concede a more profitable arrangement to the western powers. The Americans — the CIA — called this Operation Ajax.

This is peak Cold War logic: oil, an important natural resource, had been nationalized; the United States has, historically, frequently rejected nationalization as a form of theft (cue protest by Pierre Proudhon); the U.S. wanted access to that natural resource, or, at least to ensure it was inaccessible to its rivals, and thus it acted to "secure its interests."

This is well-known history, I have nothing to add.

However, I do want to comment on a weird, problematic trend I've seen repeatedly on the American left: this tendency to support all anti-American governments under the banner of anti-imperialism.

Iran, after its 1979 revolution, came to be an authoritarian, theocratic state. Even if the United States did not exist, Iran would not be an ideologically safe place for anyone who isn't part of the in-group in power. It is a country where atheists, like Yousef Mehrdad and Sadrollah Fazeli Zare, are murdered by the government for not being superstitious, to say nothing its its other extreme, reactionary and religious biases. LGTBQ+ Iranians can be, and are, harassed, arrested, and detained based on perceived sexual orientation or gender identity.

Therefore, I call upon the American left in general: the enemy of my enemy is not my friend. Israel is engaged in ethnic cleansing backed by the U.S. Iran is a theocratic terror state. Resistance against the worst excesses of U.S. behavior can be done without running interference for religious bullies abroad — we have our own problems with superstition and mass cults in this country.

Support Iranians in their bid for freedom. A better world is possible only with a free Iran.

Josh

I made a few little updates today: posts now show the time of the post, and you can get a post's permalink by clicking on the time it was posted. I added OpenGraph metadata to the single post view too, for platforms that render link previews.

Josh

US Justice Department serves Federal Reserve with grand jury subpoenas

The threat of criminal charges is a consequence of the Federal Reserve setting interest rates based on our best assessment of what will serve the public, rather than following the preferences of the President. — Jerome H. Powell
Josh

Reporting can inform. It can also pacify. Remember that for change to come, for there to be justice for Renee, and a future without ICE killings, we must act — loudly, firmly, and without yielding — against what we cannot tolerate.

Josh

weekend with friends. we're happy to see them. when your traditional community is gone, you build new ones. networks still matter, the biological context merely gets erased. ok, more likely: selection pressures have changed. ideology doesn't beat nature still. their name is 592a70e5-77c9-49a9-a4c0-b73c054ab942. congratulations! it's a... homo sapiens 🎉

Josh
[Vice President JD Vance] knows. He doesn't care. Vance’s twisted and wrongheaded view of Christianity has been repudiated by two popes. His Catholicism seems to be little more than a political prop, a tool only for his career ambitions and desire for power.
The vice president's comments justifying the death of Renee Good are a moral stain on the collective witness of our Catholic faith. His repeated attempts to blame Good for her own death are fundamentally incompatible with the Gospel. Our only recourse is to pray for his conversion of heart.

https://www.ncronline.org/opinion/ncr-voices/catholic-vice-president-vance-takes-social-media-justify-killing-renee-good

Josh

explaining to my friends that i didn't build a blog (lame) but that i built a multi-user microblogging platform (believe it or not, even more lame)

Josh

implemented a couple of bugfixes this morning:

  1. bulleted lists should now render properly
  2. the previous fix introduced a minimum height to the body of a post, this has been fixed also

off to the real world ☕

Josh

Paul Krugman here dispels Trump's Venezuelan oil boondoggle: Venezuela's extra-heavy Orinoco crude is only worth extracting if the price per barrel rises above $80. Current business model for American producers requires oil to stay above $62. Trump allegedly wants oil to drop to $50 per barrel. Seeing a math problem? Stated more explicitly: how does a resource that costs $80 per barrel to extract get us to $50 per barrel? It doesn't: at best, Venezuelan oil must appear, from the American perspective as a hedge against high oil prices, for instance those seen during global conflict.

https://paulkrugman.substack.com/p/the-emperors-new-oil-wealth

Josh

¡hola mundo!

as of around 02:25 this morning, this microblog is LIVE. yes, this a place for me to post my thoughts on things, but it is also the test application for the authentication library i'm writing for the Scala/http4s ecosystem, Apollo (https://github.com/joshuakfarrar/apollo)! which, i can confirm here, appears to work kind of alright. i really like the scala programming language, i really don't like the open source tooling available in the scala ecosystem. unlike ruby or javascript, where there's a gem or an npm module for lots of things, especially commoditized workflows like user registration and authentication, Http4s really has no such solution. i imagine every http4s application that has auth has a custom-rolled auth implementation. having build one, i can say with confidence, understanding and trying to sort out issues with the default csrf middleware is enough to drive one mad.

anyway... features! or, at least, upcoming features for apollo:

Apollo

  1. consider migrating from jdbc to skunk
  2. to deploy more easily to this web host, i migrated from sql server, which i was using in development, to postgres
  3. so long as we provide the correct interfaces, it might not be an issue to use doobie for somethings and skunk for pg, but it might be annoying to maintain
  4. purpose of this story is to assess level of effort
  5. https://typelevel.org/skunk
  6. ability to roll apollo's migrations into your applications' migrations
  7. i'm looking at dumbo
  8. https://github.com/rolang/dumbo
  9. ability to roll apollo's Twirl templates into your application, so that your styles can be applied
  10. Maven
  11. i had to monorepo apollo-auth to get this microblogging platform built on the deployment server, i'd prefer to rely on maven instead, or figure out how to get maven to reference and build a dependency from github, e.g. i think gems can do this if you specify a github url to a gem

This Microblog

  1. link previews! image posts!
  2. better error handling!
  3. fediverse?

🎉

Josh

hello pg

  1. user account creation "failed", never received e-mail but confirmation was created in the database
  2. manual confirmation from code in database succeeded
  3. password reset also does not send e-mail, there seems to be a mailgun issue of some kind
  4. the app still allows unverified users to log in?
  5. i think we still need a "resend verification e-mail" link
Josh

everything basically works

error handling could be a bit better, but flash messages will take a few hours to implement from apollo into this application and right now i'm the only person who will see them

also, i have no means by which to have apollo's forms share styling with the front-end, you get what it gives you, that's it

i'll have to do some research to re-familiarize myself with how devise handles this, i remember at least that it creates copies of templates then overrides the defaults with those from your application

link previews and image uploads are coming soon too, link previews will be first because although i'll have to write a fetcher and parse opengraph tags from html, they're easier to store than dealing with uploads and file storage

also todo is to set up a devops pipeline to... somewhere, i haven't decided yet

Josh

today the united states has illegally captured the leader of a sovereign foreign state

it has charged nicolás maduro with crimes that are beyond its jurisdiction to prosecute

it is abundantly clear that national sovereignty is contigent upon u.s. approval

which is not sovereignty at all, but the old logic of imperialism

i condemn the actions of the united states as wrong-headed, destabilizing, and nothing less than a robbery

permanent stability in latin america can only be achieved by meeting the human needs of the people who live there, not by the imposition of an extractive regime

Josh

it has been nearly a year since i deleted all of my personal social media accounts

no facebook, no twitter/x, no instagram

i even canceled my linkedin subscription, which i'd kept for professional purposes, due to their ice ads. spotify too

i doomscroll far less, and spend more time writing code, playing with my son, play bass, or studying

literally any other use of your time is better

this year, you should also unplug from for-profit social media