FeoBlog
Client Newer Posts Older Posts
@Cody Casterline
2022-05-10 12:12:54 -0700

I do not have a kind view of anyone who brags about not voting. And anyone trying to convince you not to vote has motives you should definitely question.

… But watching the Democrats just roll over on every damned thing is really making it feel like a pointless ritual. Democracy Theater.

  • Continued and renewed efforts at voter suppression
  • Packing the supreme court
  • The timid handling of Jan. 6th insurrectionists. (Including a supreme court justice and former president!)
  • Now, their reaction to Roe v. Wade is
    • "Still not time to end the filibuster"
    • "Need more police protection for these poor SCOTUS judges!"
    • "Let's talk about something else."

They're guaranteed the vote of anyone like me who is against what Republicans are doing, so won't throw away their vote on a further-left party. But as a result they keep moving right to try to pick up more "middle" voters.

Feeling a bit frustrated and hopeless about the future for the U.S.

Just to be clear, though: I'll still be voting.

@Cody Casterline
2022-05-09 14:05:13 -0700

Uhh, WaPo… is this an ad for Trump? "Inaction" as democracy "came under attack"? He was and is continuing to attack democracy by continuing to lie about the legitimacy of the election. He spoke at the rally that ended up invading the capitol while the election was being finalized! And told them to do it! WTF kind of reframing is this?

This is as bad as the bootlicking "shots were fired and someone died at an altercation involving police" trope.

Screen Shot 2022-05-09 at 1.57.32 PM.jpg

@Cody Casterline
2022-05-09 13:55:51 -0700

I've been writing Java since before Generics and still ran into this landmine:

Coworker (reviewing my code): container.contains(null) can throw a NullPointerException.

Me: I don't think so, the docs say:

Returns true if this collection contains the specified element. More formally, returns true if and only if this collection contains at least one element e such that (o==null ? e==null : o.equals(e)).

And this code works as I expect:

import java.util.*;

public class Contains {
    public static void main(String[] args) {

        // Interestingly, List.of requires all its elements be non-null. Weird.
        // var list1 = List.of("foo", "bar", "baz");
        // var list2 = List.of("foo", "bar", null);

        var list1 = makeCollection("foo", "bar", "baz");
        var list2 = makeCollection("foo", "bar", null);
        
        check(list1);
        check(list2);
    }

    private static Collection<String> makeCollection(String... args) {
        // return Arrays.asList(args);
        return new HashSet<String>(Arrays.asList(args));
    }

    private static void check (Collection<String> list) {
        System.out.println(list.contains(null));
    }
}

Coworker: read a bit further. Docs also say:

Throws […] NullPointerException - if the specified element is null and this collection does not permit null elements (optional)

… sure enough. In my case I'm actually using a Set.of(predefined, elements), and that particular implementation will throw if passed a null.

UGHHh. NULLS.

FWIW, Kotlin handles this much more nicely:

fun main() {
    val c1 = setOf("foo", "bar")
    val c2 = setOf("foo", null)

    
    val value: String? = null
    println(c1.contains(value))
    println(c2.contains(value))
}

… though you can only depend on that sane behavior when using its setOf() constructor. If you might ever be passed a non-null-safe Java Collection you're back to needing to protect yourself against NPEs.

Roe v. Wade

@Cody Casterline
2022-05-03 15:16:06 -0700

So the Supreme Court is going to overturn Roe v. Wade and basically let religious fundamentalists control women's bodies.

I feel the need to write something about it.

But then the next thought is: Oh, I should take some time, really organize my thoughts, find links to sources, etc, etc. That way lies me never writing anything. "Perfect is the enemy of good [enough]", etc.

So instead, here's my stream-of-thought braindump.


First, this is terrible. It's terrible for women. Especially in states that want to ban abortion. (And even with RvW many had already effectively banned it by making it practically unavailable.) Especially poor women who don't have the means and connections to leave for more liberal states.

If the court is saying there is no right to privacy, next you'll have states start outlawing contraception.

Then they'll pass laws saying it's illegal to travel to another state to get an abortion. (I think some already exist for minors?)

Without a right to privacy, anti-sodomy laws are back on the table, and also gay marriage bans.

Without a right to privacy, the government can regulate all sorts of personal details about your life with … what limits?

The permissibility of abortion, and the limitations, upon it, are to be resolved like most important questions in our democracy: by citizens trying to persuade one another and then voting.

Yeah, because that worked out so well for slavery, and interracial marriage, and segregation, and gay marriage. And, oh, what's that? Abortion.

It's just such a big "fuck you". "If you want rights, you should merely convince the majority to stop taking them from you."

And, as I've seen others point out, that's a double "fuck you" in the context of the court recently gutting the Voting Rights Act and states ramping up voter suppression and gerrymandering.

The political process is broken and I don't see it getting better any time soon.

@Cody Casterline
2022-05-03 10:14:29 -0700

$OurProduct is a love letter to $audience. ❤️

Look, if you're describing something as a "love letter" and then charging money for it, that's "solicitation".

Cool flower

@Cody Casterline
2022-04-30 19:15:02 -0700

A803E7AA-3945-482A-A96A-005F8E7932B6.jpeg

Saw this one while out yesterday. Anybody know what kind of flower it is?

@Cody Casterline
2022-04-25 20:41:02 -0700

Uh-oh. "Svelte" has taken over as the language with the most lines of code in FeoBlog.

image.png

It's funny. I started FeoBlog because I wanted the data structure to be the way that distributed social networks work. But in order to make using that appealing, you've got to have a nice UI. And it turns out there's a lot involved in working toward one of those. Who knew?

Twitter

@Cody Casterline
2022-04-25 11:04:31 -0700

So sounds like Twitter's getting bought in a hostile takeover.

I've been working on the next version of FeoBlog and I had a couple more features that I wanted to sneak in, but I should just release what I've got. (Agile! (lulz))

If you want to help me test it, or just want to play around with an open, distributed platform let me know!

@Cody Casterline
2022-04-11 21:52:48 -0700

I've been working on the next version of FeoBlog quite a bit lately. It's been fun!

One of the new features will be allowing FeoBlog to remember your private key for you, since working with them can be a bit cumbersome. I enjoyed this little experimental UI for letting users configure that behavior based on their preferred security level:

SecurityLevel.gif.gif

However, it ended up being a bit cumbersome to use in practice, so I'm going to change it to instead give you all the options, and then details about the security implications of the options you set. That way, it's less about shaming the user to choose the higher security level, and more about letting them configure it how they want and informing them of the consequences.

Another of the new features is Windows support! I switched to using ESBuild instead of Snowpack. Not only is it able to properly bundle, on Windows, I think it's actually faster as well. AND I found a plugin that lets me write my web worker as a module and inline it within the app bundle. 🎉 Definitely would recommend trying it if you're deploying JS to the browser.

@Cody Casterline
2021-08-29 23:02:47 -0700

Since about v0.5.0, I've been using FeoBlog as my own sort of RSS reader. I've got a few scripts that read Twitter, Mastodon, and some RSS feeds into FeoBlog for me, and then I just view my "My Feed" page and there's everything in one convenient place.

One surprising benefit of this is that I actually feel less of an urge to keep on top of things. The feed isn't going to get reordered by some unknown algorithm. There's no little "unread" counter telling me how many more I have to read until I'm "caught up". Plus, those posts aren't going to go away, I'll always be able to find them in the feed history. (Though it could be easier.)

So, generally a more healthy relationship with social media. Which is to say: I'm reading a bit less than before.

Bags or no bags?

@Cody Casterline
2021-08-17 10:24:57 -0700

I’m flying home to San Diego today. Trying to check in to my American Airlines flight, they’re telling me I can’t carry on my bag, and offering to charge me to check it.

9D6F54D3-18D1-4774-AF0A-766F4E43C7FF.png

But their web site says:

DE9F9B53-3AFA-404B-BBA0-B16F767A8FA6.png

… sooo which is it? I guess I’ll check in at the counter and see. Hopefully the lines aren’t bad. 🤞

FeoBlog v0.6.0 Released

@FeoBlog
2021-08-09 16:39:27 -0700

https://github.com/NfNitLoop/feoblog/releases/tag/v0.6.0

New Features

  • Support for the Open Graph Protocol.
    Now when you share links to other web sites, (or Discord) they'll be able to generate previews if they support OGP.

    Discord Example

  • Quick access to share links.
    Click the arrow at the top-right corner of a post to access share links.

    Share Demo.gif

  • db prune to remove data that's no longer being used.

    image.2.png

  • db usage to see who's hogging all your disk space.
    (See also: The tablestream crate I created to help with this output.)

    image.3.png

Improvements

  • #63 Faster Sync when syncing items between servers.
  • #43 Better browser caching for static files.
  • Logged-in profiles now have a color picker.
    You can set custom background colors for each identity you log in as to help keep them separate.

Bug Fixes

  • Fixed bug (re)rendering widgets when changing pages.

TableStream

@Cody Casterline
2021-08-05 16:24:02 -0700

So, working on FeoBlog, I wanted to print some data into a table in a terminal, and I was picky about how I wanted to do so, so I wrote my own.

In particular, I wanted to be able to:

  • Stream data without worrying about how much memory it'll use.
  • Let the table formatter
    • Pick column sizes
    • truncate data
    • align data.
    • choose a table width based on the size of the data and/or the terminal window.

The existing ones I found on crates.io required holding the table in memory.

So I just wrote my own:

https://github.com/NfNitLoop/tablestream

tablestream.gif

Official Discord Server

@FeoBlog
2021-07-23 13:39:09 -0700

There's now an official Discord server for FeoBlog. If you have questions, feedback, or just want to chat, drop on by!

https://discord.gg/MQKP4MbdF4

Note: Discord invite links can expire, so check this user's profile for the latest link if the above one doesn't work.

FeoBlog v0.5.0 Released

@FeoBlog
2021-07-18 23:00:15 -0700

Released: July 18, 2021
https://github.com/NfNitLoop/feoblog/releases/tag/v0.5.0

New Features

  • You can now filter and search your "My Feed" page.
    Is someone posting a bit too much today? You can temporarily hide them from your feed to see what everyone else has to say. Looking for a post you saw last week? Now you can search for a keyword and view only posts/comments that mention that.

    v0.5.0 filter demo

Improvements

  • Posts are no longer clickable.
    Previously, the entire block containing a post was clickable, and would take you to the page for that post. But that resulted in a lot of accidental clicks. Also, since the cursor changed to a pointer for the whole block, it was difficult to see if images were clickable. Now that behavior is gone. You can click on the timestamp of a post to go to a page for just that post.

  • #52 Automatically redirect to the "My Feed" page when logged in.
    If you're logged in, you're probably repeatedly coming to FeoBlog to check your feed. So that's now the default view.

Bug Fixes

  • #51 Draft timestamps could accidentally backdate posts.
  • Fix for nav links that wouldn't highlight when they were clicked.

FeoBlog Changes

@Cody Casterline
2021-07-16 23:20:03 -0700

Whew. Have been working on some nice FeoBlog changes that I'll probably release this weekend.

  • Better handling of post timestamps.
  • Filtering and searching of your follow feed! (Which has become important now that my feed is basically 99% Twitter.)
  • ... which is now the default view if you visit feoblog and are logged in.
  • Oh yeah, and a fancy header to show you what posts/feed you're viewing, since that could sometime be ... unclear in the previous version.

I should probably make another video. The UI is looking much better now than the one I showed in v0.1. Plus, I've learned a couple things about video capture since then.

But for now, shower and bed. 😴

FeoTweet v0.2.0

@Cody Casterline
2021-07-09 12:14:47 -0700

Now available here! https://deno.land/x/feotweet@v0.2.0

It adds support for syncing a single user's tweets to FeoBlog, as well as copying tweet attachments into FeoBlog.


Developing in Deno is still pretty fun. Though I did spend a couple days scratching my head due to this bug.

Apparently HTTP clients don't do well when you close the HTTP connection when they're still sending bytes at you, even if you've already sent a response.

The HTTP 1.1 spec isn't super clear on what should happen in this case. For example, it says this about closing connections, but seems to imply it's only for idle connections:

A client, server, or proxy MAY close the transport connection at any time. For example, a client might have started to send a new request at the same time that the server has decided to close the "idle" connection. From the server's point of view, the connection is being closed while it was idle, but from the client's point of view, a request is in progress.

This means that clients, servers, and proxies MUST be able to recover from asynchronous close events.

And it says this about "Client Behavior if Server Prematurely Closes Connection":

If at any point an error status is received, the client

  • SHOULD NOT continue and

  • SHOULD close the connection if it has not completed sending the request message.

... but that's only in the case of an "error" status, not an OK status.

Chrome handled this case by ... pausing for about 5 seconds, then continuing without error. (!?) And Deno handled this case by ... well, in the case I reproduced in that bug report, the next call to fetch() would fail, but during debugging I saw other sorts of odd failures. Like calling .read() on a Deno.Reader that seemed completely unrelated to the HTTP connection would fail and say the rid (Deno "resource ID") was invalid. Yeah, that one had me confused for a while. I wasn't able to reproduce that one in a minimal example, though.

I was able to work around the issue by just waiting for all the bytes to be sent before sending an HTTP response. But this seems like a thing that people could use to DoS your server. If you try to be nice and read all these unnecessary bytes they sent to you they can just do it forever. Though I guess there are countless other ways to DoS an HTTP server in addition to this, so what's one more?

Mastodon, now in FeoBlog

@Cody Casterline
2021-07-07 18:23:34 -0700

One of the first questions I got when I told folks about FeoBlog was "Does it support ActivityPub?" (i.e.: "Does it interoperate with Mastodon?")

And while there are some reasons why it can't interoperate directly with ActivityPub, it's always possible to sync data back and forth.

So, I wrote feomasto, a little tool to sync my Mastodon feed into FeoBlog. You can see the results here.

Some design decisions I'm interested to hear feedback on:

  1. Since FeoBlog is all public, I decided to only sync "public" and "unlisted" posts from Mastodon, so as not to expose any private posts from users I follow. (i.e.: not "private" or "direct" posts.)

  2. So as not to unnecessarily use bandwidth of (often for-free) Mastodon servers, I decided to not inline images. Though, I could see myself coming back and deciding to add them as FeoBlog attachments, which would allow for inlining them without touching Mastodon servers. (Beyond the first download.) For now, I just link to the attachments so you can click in and view them as you wish.

Let me know what you think!

I'm also still really enjoying writing stuff with Deno. Not having to deal with package.json, tsconfig.json, npm, etc, just removes a lot of friction. Plus, it's super easy to write, run, and share a standalone script that imports dependencies from online. (Though, I haven't really used the new module stuff in Node, so maybe you can do that there too these days?)

Deno & rss2fb

@Cody Casterline
2021-07-03 22:22:39 -0700

Had fun writing code for Deno! :D

https://deno.land/x/rss2fb@v0.1.1

Just published my first #Deno package. It's pretty cool!

One unexpectedly nice thing -- if there are errors in code hosted on https://deno.land, the error message contains URLs that take you directly to the line(s) of code in a web page. ❤

https://twitter.com/NfNitLoop/status/1411547380302839811

It's a pretty fun and easy way to write and distribute some TypeScript!

I want to write more, but I was "done in 20 minutes" a couple hours ago, and I need to clean the apartment. We're heading out of town tomorrow to see some friends for the 4th of July. So I don't get to play with code again until we're back on Monday afternoon. 😢😛

FeoBlog v0.4.0 Released

@FeoBlog
2021-06-25 18:01:38 -0700

Version 0.4.0

Released: June 25, 2021 https://github.com/NfNitLoop/feoblog/releases/tag/v0.4.0

  • The web client is now the default view.
    FeoBlog has two ways to access content. One is plain HTML (A.K.A.: Web 1.0), which works well for old browsers and search engines. The other is a web client (Web 2.0), which has a nicer interface. Now, if you visit a page in a browser that supports JavaScript, you'll get automatically redirected to the newer, nicer web client.

  • Post drafts are now saved.
    If you navigate away from the "New Post" page and come back later, your post will still be there. Whew!

  • Added some helpful warnings when writing markdown posts
    Now if you forget to link that [reference], you'll get a warning reminding you to add a link.

  • Better support for password managers
    You should save your private key ("password") in a password manager. But some password managers were filling in the wrong fields. Hopefully that's fixed. (If not, please open an issue!)

  • An updated README to explain the core principles behind FeoBlog's design

  • Support for attachments on iOS (and probably Android)
    Oops. You can't easily drag-and-drop on a phone, so I added a button to attach files. Now you can take photos and easily upload them from your phone!

  • Improved automatic link generation when adding attachments
    When you add an attachment to a post, FeoBlog will generate a [link] and a [link]: files/reference.example for you. Now it'll do a better job of placing those within an existing document.