Email or username:

Password:

Forgot your password?
492 posts total
Gregory

Small #Smithereen update. I now update actor objects if my local copy is older than 24 hours and an activity comes in from this actor. Cache invalidation is one of the hardest problems in programming and this isn't perfect but will work for the time being. Also started logging exceptions and fixed a bunch.

#activitypub #mastodev

Gregory

I'm so spoiled by Android runtime. There, NullPointerExceptions are informative: it tells you what was null and what exactly you tried to do that caused the null pointer dereference. The regular JVM says "java.lang.NullPointerException" and that's it, the message is always an empty string, because is it even life if you aren't suffering.

Gregory

Another #Smithereen update: someone just came by and translated the whole thing into Turkish. 🇹🇷

#activitypub #mastodev

Groosha

@grishka честно говоря, я сначала попытался прочитать фразу "a gde druz'ya online" по-турецки. А потом только дошёл смысл :D

Gregory

#Smithereen update.
- Friendship status is now shown clearly below the profile picture.
- Sending friend requests and removing friends is now done with ajax (but is still followed by a page reload — for now).
- Also fixed a bug where if you unfriended someone you couldn't follow them again to add them back to your friend list.

#activitypub #mastodev

#Smithereen update.
- Friendship status is now shown clearly below the profile picture.
- Sending friend requests and removing friends is now done with ajax (but is still followed by a page reload — for now).
- Also fixed a bug where if you unfriended someone you couldn't follow them again to add them back to your friend list.

a1ba-nyan
@grishka gonna host it when it's done.

Also, how friend request comments looks from other AP social networks?
Gregory

Small #smithereen update: it now accepts username@domain in the external interaction endpoint. There also are some security-related fixes, like disallowing localhost connections for anything federation related.
#activitypub #mastodev

Gregory

#Smithereen update: ajax form submission where it makes sense. That, and replying to things feels so much better because you can now reply to a comment without opening its own page. You can now also post posts and comments with cmd+enter.

#activitypub #mastodev

Gregory

#Smithereen update. Some frontend stuff this time. Performing actions without page reloads is important for UX, so I started implementing just that. Laid some groundwork for ajax actions. The first, and currently the only one is post deletion.

Friend requests are the logical next step because they are similar to post deletion in terms of networking. And then form submissions. Especially comment replies, those are so frustrating to post currently.

#activitypub #mastodev

Groosha

@grishka ты в одиночку всё это пилишь?

Gregory

I'd make a paid, key-activated program just to see someone make a keygen for it with some wonderful music.

Dr. Quadragon ❌

@grishka я люблю людей, делающих музыку к кейгенам.

Серьезно, это лучше, чем 90% современной музыки. И это даже не профессиональные композиторы, а просто прогеры, убивающие время.

И мы часто даже никогда не узнаем их имен.

Dr. Quadragon ❌

@grishka я люблю людей, делающих музыку к кейгенам.

Серьезно, это лучше, чем 90% современной музыки. Серьезно, многие вещи написаны прямо таки академически грамотно.

Как так получилось, что профессиональные композиторы с дорогущими студиями, оборудованием и образованием не годятся в подметки хакерам, убивающим время?

И мы часто даже никогда не узнаем их имен.

Gregory

Today's discovery: vim knows what TypeScript is and does syntax highlighting correctly. As opposed to Sublime Text 2, in which I had to select ActionScript for it to highlight anything at all.

Even code completion via YouCompleteMe works 🤯

Gregory

Also here's my favorite thing about TypeScript: .ts extension is also a media container.

Gregory

Another small #Smithereen update. I've added og: meta tags to profiles and posts because I became tired of there being no preview cards whenever I send someone a link to my instance. Now, for example, this post link should have a card here: https://friends.grishka.me/posts/6442

#activitypub #mastodev

Show previous comments
Liaizon Wakest

@grishka sadly not displaying a card in Toot! app, I will check on desktop later

lostinlight

@grishka No preview card on desktop Mastodon for now.

django

@grishka I'm pretty sure Mastodon uses twitter:card tags

Gregory

#Smithereen update! Image attachments. The UI currently looks fugly, but hey, it works for now at least. I'll make it prettier when I get to all this JS/AjaxLayout stuff, which is the next thing on my todo list anyway.

Took me too long because I participated in the Telegram developer contest, and also because it just takes so much thinking to figure out how to keep files in sync with the database. Hopefully I'll be able to reuse this code wherever I need image uploads.

#ActivityPub #mastodev

Alexey Skobkin

@grishka Там ведь будет поддержка разных бэкендов для загружаемых файлов? Чтобы можно было не только локально, но ещё на S3, например, хранить?

Gregory

Why do people put selfies behind content warnings 🤔

Gregory

Ой, смотрите-ка, ВК лежит)

@rf

[DATA EXPUNGED]
Gregory

Is this another weird "privacy" feature in Mastodon? The web profile is publicly accessible, but the corresponding #ActivityPub actor doesn't even have the "url" field that my code expects. The web profile contains a name, a profile picture, a cover image, 2 fields and a summary, but those are nowhere to be seen in the actor. Just... why?
#mastodev

marius

@grishka I think that if you "expect" anything but id and type (maybe inbox for actors), you're going to have a bad time with AP. :)

Gregory

#Smithereen update: mentions. They now actually work. There now are two kinds of mentions:
- The one that's inserted automatically when you reply to a comment (not a post), of the form "Name, " like in VK
- The one that you can type manually of the form @username@domain, or without the domain for local users

Here's how these look: https://friends.grishka.me/posts/4845

#ActivityPub #mastodev

Gregory

I thought I knew everything about Java but... it turns out you are allowed to have a public field with matching name and type in a class and in its superclass. And which one is being used depends on the type of the variable you use to access the field. That's why my mentions had wrong URLs in them.

#Smithereen

Gregory

Also this is pretty dumb. Generics work by generating casts at compile time. An empty list is type-agnostic because it's empty and throws an exception when you try adding anything to it. Yet Idea shows this warning, implying there's something fundamentally wrong with your code.

Gregory

Another day, another flawed library. Found out the HTML sanitizer I use needlessly escapes too much, including emojis and @ signs. Had to implement an HTML writer (thankfully there's an interface exposed for that) that doesn't do any of this. Literally the only characters it touches are <, > and " (in attribute values), those do legitimately need escaping.

#Smithereen #ActivityPub #mastodev

Gregory

#Smithereen update: I now support timezone detection for those of you who happen to not live in GMT+3. For now the implementation is sorta ugly and requires a page refresh, but that's a start. Also requires JavaScript but I'll probably add a manual setting at some point.

#ActivityPub #mastodev

Gregory

#Smithereen update: language setting and English translation.

It turns out the Spark framework (or is it Jetty?) is smart enough to parse the Accept-Language header and make a ready-to-use Locale object. Handy for initial language detection.

#ActivityPub #mastodev

Gregory

Rick and Morty makes a classical science-fiction mistake: most intelligent life speaks English and every single planet and space station has a human-breathable atmosphere.

Later

@grishka никто не говорит на английском, объяснялось в одной из серий. Просто у Рика есть штука, которая сама переводит речь.

Но сериал всё равно скатился после 2 сезона. Это факт, мне кажется 😞

Go Up