Follow

Thinking of rewriting the @promptodon bot (postodon) in Rust as a practice first project. 🤔

Currently it's in NodeJS: github.com/BNolet/postodon

@brandon If you want some code review afterwards, I'm happy to help.

I totally won't just run it through `rustfmt` and `clippy`… Emphasis on the “just”.

@wizzwizz4 I am definitely going to be following up on this one bud ;)

I haven't gotten one bug report for anything I've made yet unfortunately and I REALLY want some criticism on my code in some way :p

@brandon @wizzwizz4 I haven't looked at it, but your code is terrible and bad and you should feel bad.

There! 😆

@nathand @brandon I haven't read the documentation, please tell me how to do the thing on page 3.

@brandon @wizzwizz4 I can't log in with OpenID or Oauth2 to spa^H^H^Hpost to the issue tracker. Honestly, I'm not good with SSO stuff, but I seems like I could use my own gitea instance to authenticate or something.

@nathand @wizzwizz4 I didn't set up a mirror on my own instance yet for this code project, I also haven't set up open ID yet, but maybe that's the issue lol

@brandon @promptodon in case you didn't already find it yourself, probably the most up to date and actively developed rust implementation of the mastodon api is elefren on crates.io. at least according to what I found :)

@vancha @promptodon

Meh, I only really need get notifications, clear notifications, and post

BUT, I will definitely consider it if it will make the whole thing smaller in the end

@vancha @promptodon Of rewriting a thing I made in it?

Or you're interested to see what I come up with?

@brandon @promptodon sorry I meant the rewrite. It would be nice to compare it with your javascript code, to see how you translate it to rust. I wonder what the end result in rust would be like

@vancha To be honest I've been looking to either learn rust or golang for a while and then after reading an introduction to rust it started to feel a lot more accessible. Part of my aversion has been more so that I'm afraid to code in these C-like languages because I've been super afraid of royally fucking something up :P

Sounds kind of silly now that I've put it in words but yeah

@brandon rust seems to give you a harder time doing so it seems, but thus far I seem to have a bigger problem with learning gtk. I don't know C, and that seems to be almost a requirement to learn the whole gobject thing.
But the reason I'm going for rust is precisely to prevent myself from making mistakes I cold have made in C 😅

@vancha huh, I didn't know that you could write GTK apps in Rust too! Heck, I thought it was only possible to make them in C!

@brandon there's actually a couple frameworks that give rust gtk gui features, gtk-rs is probably the most well known, with the next being the less mature(i think) druid crate.
There's also pygobject for python, and gjs for javascript, and a bunch more ways for other languages :)

@vancha Hmm, I may just want to make a desktop app at some point in the future :thinking:

Sign in to participate in the conversation
Fosstodon

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.