this post was submitted on 08 Feb 2024
24 points (100.0% liked)
Learning Rust and Lemmy
391 readers
1 users here now
Welcome
A collaborative space for people to work together on learning Rust, learning about the Lemmy code base, discussing whatever confusions or difficulties we're having in these endeavours, and solving problems, including, hopefully, some contributions back to the Lemmy code base.
Rules TL;DR: Be nice, constructive, and focus on learning and working together on understanding Rust and Lemmy.
Running Projects
- Rust for Lemmings Reading Club (portal)
- Rust beginners challenges (portal)
- Heroically Helpful Comments
Policies and Purposes
- This is a place to learn and work together.
- Questions and curiosity is welcome and encouraged.
- This isn't a technical support community. Those with technical knowledge and experienced aren't obliged to help, though such is very welcome. This is closer to a library of study groups than stackoverflow. Though, forming a repository of useful information would be a good side effect.
- This isn't an issue tracker for Lemmy (or Rust) or a place for suggestions. Instead, it's where the nature of an issue, what possible solutions might exist and how they could be or were implemented can be discussed, or, where the means by which a particular suggestion could be implemented is discussed.
See also:
Rules
- Lemmy.ml rule 2 applies strongly: "Be respectful, even when disagreeing. Everyone should feel welcome" (see Dessalines's post). This is a constructive space.
- Don't demean, intimidate or do anything that isn't constructive and encouraging to anyone trying to learn or understand. People should feel free to ask questions, be curious, and fill their gaps knowledge and understanding.
- Posts and comments should be (more or less) within scope (on which see Policies and Purposes above).
- See the Lemmy Code of Conduct
- Where applicable, rules should be interpreted in light of the Policies and Purposes.
Relevant links and Related Communities
- Lemmy Organisation on GitHub
- Lemmy Documentation
- General Lemmy Discussion Community
- Lemmy Support Community
- Rust Community on lemmy.ml
- Rust Community on programming.dev
Thumbnail and banner generated by ChatGPT.
founded 9 months ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
So this actually looks great, and all fediverse too (on Peertube, fediverse answer to YouTube)!
FYI, you can subscribe to Peertube channels on lemmy.
In this case, search “ [email protected]” in the lemmy search (you can specify a community search if you like). You may have to repeat this a few times as you server goes fetches the meta data. Once it shows up you can subscribe and start pulling in content into your instance.
Unfortunately older posts don’t come through, such as these videos.
But, you can just run a lemmy search for a video’s URL, and repeat it a couple of times if necessary, and Lemmy will go and fetch it.
This way, the videos look like posts in lemmy, which we can cross post and comment on. Commenting on particular should be cool because the video author themselves will get them and probably reply.
I might go ahead and do all of that myself for my instance and provide a link to their channel from the side bar.
Subscribing to his channel from Lemmy never even occurred to me (?!)
Now is as good a time as any though to investigate Lemmy/PeerTube interactions:
The search that lemmy will do:
curl --header 'accept: application/activity+json' https://diode.zone/.well-known/webfinger?resource=acct:[email protected] | jq .
The 'activity+json' links section reveals that the url is
https://diode.zone/video-channels/andybalaam_lectures
'Click' on that:
curl --header 'accept: application/activity+json' https://diode.zone/video-channels/andybalaam_lectures | jq .
Interesting parts:
'type' is Group, which is what lemmy uses for communities
there's no 'moderators' link, so that'll be empty on the community page
'outbox' is at
https://diode.zone/video-channels/andybalaam_lectures/outbox
which lemmy should be able to use to fetch the recent videos. It doesn't work because community outboxes on Lemmy just list the last 20 posts directly, whereas PeerTube (and Mastodon) redirect you to a 'outbox?page=1' url.'playlists' is at
https://diode.zone/video-channels/andybalaam_lectures/playlists
, which is what we want really (the Rust 101 playlist)These are of type Playlist though, which Lemmy doesn't know what to do with.
Following the 'playlist' link:
--> https://diode.zone/video-channels/andybalaam_lectures/playlists?page=1 (posts 1 to 10)
--> https://diode.zone/video-channels/andybalaam_lectures/playlists?page=2 (post 11)
Bash script to get the URLs
gives us:
I used endlesstalk.org's Search to bring most of these through, before getting bored and using the API. e.g.:
So the bash script could easily be modified to resolve everything as well.