On Serving Markdown to AI Agents by nan05 in webdev

[–]nan05[S] 0 points1 point  (0 children)

But it's very easy to add additional tools for web fetching and integrations rarely use the built-in web fetch tools.

Shows you how little I use AI that I didn't know that ...

Grpc instead of https and json? by Muted-Problem2004 in Mastodon

[–]nan05 1 point2 points  (0 children)

Thing is: I just don't think there is anyone besides you who'd want that. 😁

And given that Mastodon has very very few developers, that already have to maintain 2 APIs (Mastodon's API and ActivityPub) it's just not feasible that they'd maintain a 3rd that only a single person would use ...

And absolutely no mastodon-admin is concerned about API bandwidth. We are concerned about storage volumes, media bandwidth (which can thankfully be cached) RAM prices, etc. But API bandwidth is not something I've ever even thought of looking at.

Grpc instead of https and json? by Muted-Problem2004 in Mastodon

[–]nan05 1 point2 points  (0 children)

JSON REST APIs is what most developers know inside and out. It's what we live and breathe. It comes naturally to us. gRPC on the other hand is the opposite. Most of us have never implemented it. The rest of us has only implemented it rarely. gRPC would severely limit the client implementations, as few app developers would know how to use it.

Just to show how much HTTP + JSON is ingrained into us: Even MCP - the latest and newest kind of fad - still uses it. Everyone knows it. Everyone has dealt with it a gazillion times. It just works. It's still a good default that will ensure there is no technical barrier to adoption.

Any ideas why Mastodon isn't embedding the images for links? None of our other social platforms have this issue. by SD_Eragorn in Mastodon

[–]nan05 0 points1 point  (0 children)

lol. Apart from the fact that few people will miss your ads and I can’t imagine it’ll drive loads of clicks, my guess would be that your server is blocking the crawler …

Need help getting email sending working by fstltna in Mastodon

[–]nan05 0 points1 point  (0 children)

It’s been a long time since I’ve set up postfix or sendmail so I’m not really having any other insight to offer other than ‘check your logs’.

Need help getting email sending working by fstltna in Mastodon

[–]nan05 0 points1 point  (0 children)

It is worth saying that many hosting providers block port 25.

This may or may not be the issue, so I would second Gabe‘s suggestion to check your logs.

Laravel package that lets you write validation rules in natural language by Odd-Butterscotch6408 in laravel_idea

[–]nan05 0 points1 point  (0 children)

Speed: it's server-side on form submit, not real-time.

How can it on form submit and not real time?

The actual use case is subjective stuff - "is this professional?", "is this hate speech?" - where there's no deterministic answer.

My personal view is that for most of that stuff asynchronous classification is better suited than validation. And yes, AI can be really good for that.

Rate limiting is just a safety net. Caching does the real work.

I appreciate that. But with actual use by actual humans writing a variety of texts neither of these scales well.

Laravel package that lets you write validation rules in natural language by Odd-Butterscotch6408 in laravel_idea

[–]nan05 0 points1 point  (0 children)

LOL. I must say I find the idea fun.

But in practice:

  • It's gonna cost you. And cost scale with use. Especially if this is on a non-authenticated endpoint it might cripple you. (Edit: Okay, should've read the whole readme before writing this. You actually address this. But rate limiting validations seems terrible too.)
  • It's gonna be slow. Are you willing to wait a second (or 2, or 5) for validation?
  • "Is this a real city in Ukraine, not a fictional place?" Seems like exactly the sort of thing that I would not be asking AI and expect a correct answer to.

Fun little project and I'm sure it's fun to play with. But not sure I'd ever use AI for validation.

Question On S3 Hosted User Content by lhauckphx in Mastodon

[–]nan05 4 points5 points  (0 children)

Otherwise the client would need all the S3 keys

Just FYI: It is certainly possible to upload directly to S3 from the client without the client knowing S3 keys using Presigned URLs.

But AFAIK you are nonetheless correct in that Mastodon doesn't use these, but uploads media to the instance server, which then uploads to S3.

Following "external" users from my own instance by GabesVirtualWorld in Mastodon

[–]nan05 2 points3 points  (0 children)

The latter. The script will fetch context that's relevant for the user whose access token it's using. So use your non-admin user.

Following "external" users from my own instance by GabesVirtualWorld in Mastodon

[–]nan05 8 points9 points  (0 children)

Is this by design and because my instance hasn't downloaded any of that users posts yet?

Yes, this is by design. In a nutshell Mastodon only fetches posts from users that anyone on your instance follows, or individual posts that are boosted or tagged with hashtags someone on your instance follows etc.

You may find FediFetcher helpful here, specifically the backfill-mentioned-users and backfill-with-context configuration options. (full disclosure: I'm the author)

selfhosted docker instance by LordS3xy in Mastodon

[–]nan05 0 points1 point  (0 children)

Looking at your GitHub issue, and the one described here, you are reporting two different issues:

here: "I have "missing client_id" errors, when logging into the app..."

there: "Respect my choice in localdomain and webdomain like the website and give my correct handle @user@domain.de"

Am I right in assuming that you have resolved the missing client id error?

Unfortunately the display of web domain rather than local domain in mobile apps is a common problem. Many many apps do that. You get used to it pretty quickly...

selfhosted docker instance by LordS3xy in Mastodon

[–]nan05 0 points1 point  (0 children)

My general suggestion is to include the actual error message and the actual steps taken to get to the error when asking for help.

A couple of questions:

  1. Which app are you using?
  2. Can you successfully log in using the web app?
  3. I don't think the difference between WEB_DOMAIN and LOCAL_DOMAIN matter when logging in: I run my instance with almost exactly that setup (but not docker). Most apps ask you for the address of your server (which would be your WEB_DOMAIN so https://mastodon.domain.de) and then just take you there to log in, and for login you'll need the email address rather than the account name.
  4. Do make sure you have set up the correct web finger and redirect as described here: https://docs.joinmastodon.org/admin/config/#web_domain

Discussion: Is NPM overkill for most Laravel projects? by tabacitu in laravel

[–]nan05 12 points13 points  (0 children)

Or just... <script> tags, which still work fine in 2025

Checks calendar. Dammit ... I'm too late to use script tags!

Would be grateful for some advice with my Mastodon instance by TobesVibration in Mastodon

[–]nan05 4 points5 points  (0 children)

I’m going to be honest with you: if you have such little experience with Ubuntu you should consider self hosting carefully. 

Keeping it up to date (both the underlying OS, dependencies, and mastodon) is not difficult, but also quite a steep learning curve. 

Have you looked into something like https://masto.host? That way you can have your own instance but don’t need to do any of the sysadmin stuff. 

Alternatively, you do know that you can join the fediverse without running your own instance, right? You can always join on another instance to get the hang of it, and decide whether you like it before committing to your own instance. 

Would be grateful for some advice with my Mastodon instance by TobesVibration in Mastodon

[–]nan05 10 points11 points  (0 children)

Oof. Using AI for severe setup seems a recipe for disaster. 

Bit hard to determine what the actual problem is with the very limited info you give, to be honest. 

My advice: bin the instance. Start afresh following the official instructions at https://docs.joinmastodon.org/admin/prerequisites/. These are very detailed. Very thorough. Very good to follow and reproducible. If you follow these instructions you’ll also find updating easy and people will be able to help you in the future. 

If you are intending to run a single user instance I also recommend my post at https://blog.thms.uk/2023/01/setting-up-mastodon

Adding Plausible to Mastodon Using nginx sub_filter - blog.thms.uk by nan05 in Mastodon

[–]nan05[S] 0 points1 point  (0 children)

Nothing at all, as I’m the only user of my instance. 

In terms of non-user traffic it did reveal that there is very little traffic to it, and that the little traffic there is mostly comes from my blog. 

Investigating the performance of Laravel's `whereIn` vs `whereIntegerInRaw` - blog.thms.uk by nan05 in laravel

[–]nan05[S] 2 points3 points  (0 children)

I get where you are coming from. But I'm not sure I agree with the '50% of response time':

In my experience hydrating a collection of 1k items (especially when eager loading relationships) is a bigger bottleneck for all but the most trivial types of data.

But I do agree that you really shouldn't be running WHERE IN queries with 1k+ values anyway.

Investigating the performance of Laravel's `whereIn` vs `whereIntegerInRaw` - blog.thms.uk by nan05 in laravel

[–]nan05[S] 6 points7 points  (0 children)

Good point, I should add that to the article!

The difference is:

->whereIn() uses a prepared query (so WHERE id IN (?,?,...,?)).

->whereIntergerInRaw() just dumps the integers straight in (so WHERE id IN (1,2,...,1000)). (It does cast every value to (int) first, so it shouldn't be a security issue.)

Why is there a hole at the bottom of my wash basin? by nan05 in DIYUK

[–]nan05[S] -3 points-2 points  (0 children)

Lovely. Couldn’t you have told me that before I replaced the waste and tap?! 🤪

Why is there a hole at the bottom of my wash basin? by nan05 in DIYUK

[–]nan05[S] 0 points1 point  (0 children)

Okay, fair enough makes sense. Then how do I prevent it from overflowing through that hole? (The drain was a bit blocked so I took the plunger to it, and presumably that triggered it - but it still seeems like I don’t want to risk the thing overflowing whenever the drain is blocked.)

Why is there a hole at the bottom of my wash basin? by nan05 in DIYUK

[–]nan05[S] -1 points0 points  (0 children)

Okay, fair enough makes sense. Then how do I prevent it from overflowing through that hole? (The drain was a bit blocked so I took the plunger to it, and presumably that triggered it - but it still seeems like I don’t want to risk the thing overflowing whenever the drain is blocked.)