Learning Rust and Lemmy

393 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


Policies and Purposes

  1. This is a place to learn and work together.
  2. Questions and curiosity is welcome and encouraged.
  3. 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.
  4. 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

  1. Lemmy.ml rule 2 applies strongly: "Be respectful, even when disagreeing. Everyone should feel welcome" (see Dessalines's post). This is a constructive space.
  2. 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.
  3. Posts and comments should be (more or less) within scope (on which see Policies and Purposes above).
  4. See the Lemmy Code of Conduct
  5. Where applicable, rules should be interpreted in light of the Policies and Purposes.

Relevant links and Related Communities


Thumbnail and banner generated by ChatGPT.

founded 1 year ago
MODERATORS
51
 
 

cross-posted from: https://discuss.online/post/5803977

About this Book

The Rust programming language is extremely well suited for concurrency, and its ecosystem has many libraries that include lots of concurrent data structures, locks, and more. But implementing those structures correctly can be difficult. Even in the most well-used libraries, memory ordering bugs are not uncommon.

In this practical book, Mara Bos, team lead of the Rust library team, helps Rust programmers of all levels gain a clear understanding of low-level concurrency. You’ll learn everything about atomics and memory ordering and how they're combined with basic operating system APIs to build common primitives like mutexes and condition variables. Once you’re done, you’ll have a firm grasp of how Rust’s memory model, the processor, and the role of the operating system all fit together.

With this guide, you’ll learn:

  • How Rust's type system works exceptionally well for programming concurrency correctly
  • All about mutexes, condition variables, atomics, and memory ordering
  • What happens in practice with atomic operations on Intel and ARM processors
  • How locks are implemented with support from the operating system
  • How to write correct code that includes concurrency, atomics, and locks
  • How to build your own locking and synchronization primitives correctly

Available free of charge. But I doubt I'll ever read it. Never enough time and energy for everything.

52
 
 

Hi all!

What?

I will be starting a secondary slot/sessions for the Reading Club, also on "The Book" ("The Rust Programming Language"). We will, also, very likely use the Brown University online edition (that has some added quizzes & interactive elements).

Why?

This slot is primarily to offer an alternative to the main reading club's streams that caters to a different set of time zone preferences and/or availability.

When ?

Currently, I intend to start at 18:00 UTC+1 (aka 6pm Central European Time). Effectively, this is 6 hours "earlier in the day" than when the main sessions start, as of writing this post.

The first stream will happen on the coming Monday (2023-03-04).

Please comment if you are interested in joining because you can't make the main sessions but would prefer a different start time (and include a time that works best for you in your comment!). Caveat: I live in central/western Europe; I can't myself cater to absolutely any preference.

How ?

We will start from the beginning of "The Book".

There are 2 options:

  1. mirror the main sessions' pace (once every week), remaining ~4 sessions "behind" them in terms of progression through "The Book"
  2. attempt to catch up to the main sessions' progression

I am personally interested in trying out 2 sessions each week, until we are caught up. This should effectively result in 2-3 weeks of biweekly sessions before we slow back down. I'm not doing this just for me, however, so if most people joining these sessions prefer the first option I'm happy to oblige.

I will be hosting the session from my own twitch channel, https://www.twitch.tv/jayjader . I'll be recording the session as well;~~this post should be edited to contain the url for the recording, once I have uploaded it~~ here's a youtube link to the recording of the session: https://youtu.be/gQDO_UtXKBg

Who ?

You! (if you're interested). And, of course, me.

53
 
 

For those who don't know, rust-analyzer is the main rust LSP (Language Server Protocol). So super handy! Here's their homepage: https://rust-analyzer.github.io/

I wanted to have it running for little all the programs and tests I'd write and run while going through "The Book" and have settled on a setup I thought I'd share.

The main problem I encountered is that having R-A run on a single file isn't really a thing. It seems it kinda is but I couldn't get it working and it seemed to be a pain anyway. Plus I wanted to be able to use both cargo projects/crates and little test programs/functions simultaneously from a single workspace in my text editor dedicated to working through The Book.

My solution

at the moment

What I settled on was:

  • Running multiple cargo projects under a single instance of rust-analyzer running in a single workspace in my editor
  • Organising simple test programs as specific functions in a single cargo project.
    • So far, I'm thinking of organising these thematically specifical cargo projects. So I've got one called "borrow_checker" for all borrow checker and ownership toy examples.
    • These specific functions can get called from a single main() if helpful/necessary.

EG directory structure:

the_book/
 ├──  Cargo.lock
 ├──  Cargo.toml
 ├──  guessing_game/
 │  ├──  .gitignore
 │  ├──  Cargo.lock
 │  ├──  Cargo.toml
 │  ├──  src/
 │  └──  target/
 ├──  hello_cargo/
 │  ├──  .gitignore
 │  ├──  Cargo.lock
 │  ├──  Cargo.toml
 │  ├──  src/
 │  └──  target/
 ├──  misc_play/
 │  └──  borrow_checker/
 │     ├──  .gitignore
 │     ├──  Cargo.lock
 │     ├──  Cargo.toml
 │     ├──  src/
 │     └──  target/
 └──  target/
    ├──  .rustc_info.json
    ├──  CACHEDIR.TAG
    └──  debug/

Basically everything inside the_book/ is its own cargo project.

And inside misc_play/borrow_checker/src/ is a typical main.rs with multiple functions testing or toying with something I was trying to understand ... and hopefully use the LSP to help me with.

Getting this to work

So that's the structure. But getting it to work requires a little trick. It requires using a Cargo Workspace.

In this case, it's a matter of adding a Cargo.toml file at the top level (ie, the_book/Cargo.toml) with the following:

[workspace]

resolver = "2"
edition = "2021"

members = [
	"guessing_game",
	"hello_cargo",
	"misc_play/borrow_checker"
]

Here, members is clearly listing each of the projects or libraries. And I added the resolver and edition keys to silence a cargo warning about incompatible resolvers (which I don't know anything about).

With this file, when at the top level, one can run cargo build to build all of the projects/packages. Or, cargo build -p SPECIFIC_MEMBER to build only a specific project/package. Meanwhile, rust-analyzer seems happy to work on any file from any of these projects in a single editor workspace.

There's a section in The Book on cargo workspaces: https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html (where this feature is about much more than just getting rust-analyzer to work with my preferred directory structure!)


Anyone else have thoughts on how best to structure your code and setup for working through something like The Book or any other materials for that matter?

54
 
 

For those on matrix but not aware of any rust spaces on there, here are some links to active rooms/spaces (courtesy of @[email protected] ):

https://matrix.to/#/#rust:mozilla.org

https://matrix.to/#/#rust:matrix.org

They're both part of this Space for Rust Matrix Rooms:

https://matrix.to/#/#rust-space:matrix.org (also the main link/url of the post)

In the rust-space you'll find a number of rooms specific to crates/libraries such as diesel and actix-web, and they seem active and open to helping people out with problems.

55
 
 

Intro

So ... as we learn rust, exercises and puzzles are obviously valuable (at least in the early stages).

But IMO, jumping into just trying to write actually functional and useful programs can be very valuable.

I've been away for a bit and was wondering what I should do to start up rust learning again and figured that trying to power through some simple but not trivial program would be great. Then I figured people learning rust here might find the process worthwhile too.

The Idea of the Challenge

  • Pose a challenge in a post, outlining roughly what sort of program should be written, and at roughly what level it's pitched.
  • Propose a time period during which people can try to write the program, while having as much of a discussion as they like about it of course
  • When the time period is up, make another post inviting everyone to post where they got up to, posting code so we can discuss and provide feedback.

Any thoughts on this?

If you've got ideas for other challenges, feel free to post them. If there are a number of ideas it might be best to catalogue them and run them every week or month so as not to clog things.

The Challenge

A file diff program. Basically something like git diff or diff/colordiff.

git diff --no-index A B
  • Takes two files/paths as inputs, "A" and "B".
  • Determines the differences between them, or rather, what changes have been made to "B" relative to "A".
  • Changes are measured on a line by line bases (generally like git).
  • Provides some sort of output showing these changes.

Discussion

As I see it (not being an expert in this sort of program), there are three kinds of changes:

  • Addition
  • Deletion
  • Alteration

The difference between them depends, as far as I can understand right now, on whether lines surrounding the changed lines are duplicated in the reference file (file "A" lets say) and where they occur in the reference file relative to the changes.

I've got rough ideas about how this could work (which may be very wrong!) but I suspect working out the logic (if you haven't done it before) is a good part of the challenge as you then have to map that to rust.

We can talk about the logic in the comments here though, of course.

Also, an alteration here is really a deletion + addition, so not necessary, but it makes sense to me so I might try to implement it.

Otherwise, the output is open ended I'd say ... whatever makes sense to you. My first thought is JSON (which presents a chance to maybe try serde?). Something like:

[
  {
    "start_line_no": 0,
    "end_line_no": 1,
    "lines": ["this is a line of text", "and another"],
    "type": "unchanged"
  },

  {
    "start_line_no": 2,
    "end_line_no": 3,
    "lines": ["an added line",],
    "type": "addition"
  },

  ...
]

Probably a few complications there I haven't thought about, but you get the idea. You could even go further and supplement the program with a renderer that takes this JSON and produces HTML or something else.

Time

I'd say we can have a decent shot at this in a week. So how about I post again in a week asking how we all did.

56
11
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 
 

I'll reply in the comments with a example of what lemmy sends for each thing you can do (I think I've thought of everything, but you can probably guess the format if not, or I can always add it).

So, the setup for these is:
Our instance is called 'local.com'
Our user is called 'freamon'
The other instance is called 'remote.com'
The community on that instance is called 'interesting'

For many of these, remote.com will receive them, and rewraps them in an Announce to send out to all the other instances with a copy of the community, so everyone stays in sync.

Sort by 'Old' for the best hope of these making sense.
I'll follow this post up with a script, that can be used to send these activities from the command-line, as I think it can help to understand Lemmy if you're using something much simpler than Lemmy to do some of things Lemmy does.

EDIT: As nutomic as mentioned, a better list is in the docs. It's the kind of thing I should read first, I guess.

57
 
 

Hi All!

Welcome to week 2 of Reading Club for Rust's "The Book" ("The Rust Programming Language").

Have a shot at going through "the reading" and post any thoughts, confusions or insights here

"The Reading"

Basically covering the fundamentals of the language before getting to grips with the borrow checker next chapter

The Twitch Stream

Video Tutorial

What's Next Week?

  • Chapter 4 ... Understanding Ownership
  • Start thinking about challenges or puzzles to try as we go in order to get some applied practice!
    • EG, Advent of Code ... I think @[email protected] is going to be running sessions on this on twitch? (Thursday 6.30pm EST (New York))?
    • Maybe some basic/toy web apps such as a "todo"
58
 
 

cross-posted from: https://diode.zone/videos/watch/9766d1f1-6018-48ec-ad67-e971758f8a3a

Going through some exercises on basic Rust syntax and ownership.

Links:

Rust 101 is a series of videos explaining how to write programs in Rust. The course materials for this series are developed by tweede golf. You can find more information at https://github.com/tweedegolf/101-rs and you can sponsor the work at https://github.com/sponsors/tweedegolf . They are released under the Creative Commons Attribution Share Alike 4.0 International license.

This series of videos is copyright 2023 Andy Balaam and the tweede golf contributors and is released under the Creative Commons Attribution Share Alike 4.0 International license.


These videos are roughly on track with the Reading Club apparently, so this video belongs here this week, I think.

59
 
 

cross-posted from: https://diode.zone/videos/watch/020c07e6-f124-4b3e-8270-cc2d21bf9c67

Continuing on Rust programming basics by looking at ownership and memory management, including the stack and the heap: what they are, how they differ, and why you need to care. > > For more help on ownership and the stack and the heap, try Chapter 4 of the Rust book. > > Links: >

60
 
 

Just a quick rundown of things happening here recently.

Getting Started

We got started! And definitely have some interest here already!

See, if you missed them:


First Reading Club

We had our first "Reading Club Meeting"! This was for reading through "The Book".

See, if you missed it:

Note also that there's a section in the sidebar for "Running Projects", basically any "series" of regular posts/cadences for a specific shared project. There's plenty of scope for more here ... let me know your thoughts!

I think us new to the language pretty quickly started wrestling with the ideas around the borrow checker (who would have thought!), which is also the part of the "official reading" for the next reading club!

This reading club has a twitch stream running in parallel (see https://www.twitch.tv/deerfromsmoke), on Tuesday's, 6.30pm EST (New York Time). If you can't make it then, videos will be on youtube and discussions will happen here of course.

Personally, I think the value of "study groups" or "workshops" or "reading clubs" is often forgotten. I was quickly reminded of that when just being in the twitch stream or reading a comment on the post got me compiling rust code. This community and the reading club has already helped me learn rust better/quicker!


Fediverse Friends

Turns out there's a nice video series on Rust over on PeerTube (fediverse youtube), which nicely parallels our rust reading club.

Even more nicely, PeerTube and lemmy federate with each other, which means you can subscribe to the channel through your lemmy instance and comment directly on the videos from lemmy! The channel should be available at [email protected] (this may require nudging your instance to get it to fetch the details, and, if none of the rust videos show up, may need to be searched specifically to force your instance to back fill).

See the channel on PeerTube here: https://diode.zone/w/p/xesbWmNanEHNBfJCZFQRUm (and the first post here: https://lemmy.ml/post/11655570).

The author, Andy, is also a subscriber here and is likely interested in any comments you have.

They posted here on how fediverse interop does work: https://mastodon.social/users/andybalaam/statuses/111906773513868731 (it's from mastodon but to this lemmy community and about their peertube account)


Recommended Rust Reading

For more experienced or confident rust programmers, having reading clubs for code bases or bigger/harder projects is probably a good idea.

We haven't got anything like that up and running, but we probably could and should.

To that end:

  • the rust crate/package for managing ActivityPub federation, employed by lemmy, was suggested (see GitHub Repo and post here)
  • The new lemmy API client re-written in rust (for the upcoming leptos front-end): see post here

Let me know if you're interested in having a regular reading group for such things!


Rust Practice Projects

Something that's been spoken about is starting to work together on projects or puzzles to practice our rust as we learn.

Advent of code with rust is one idea that may become a regular "series" here.

I'm sure there are others that you're interested in.

Personally, I'm thinking of just diving in and trying to make a basic "ToDo" web app with rust using Actix-web (web framework) and diesel (sql ORM in rust), both of which are used by lemmy, and some http template renderer. I'd probably stall pretty quickly but it's also such a common thing that fumbling around on it might be quite productive.

Anyone else interested in something like that as a regular/weekly series of posts for facilitating loosely collective work?

61
 
 

Will it happen again this week? Same day and time? Just curious.

62
 
 

The fediverse is working. I am now following (using Mastodon) a "Learning Rust" community on Lemmy [1], who I found through them commenting on my peertube video [2] using Lemmy.

[1] @learningrustandlemmy [2] https://diode.zone/w/wJJJ7DRh3fCvHq6KuZY3t9

#fediverse #rust #lemmy #peertube

63
 
 

An introduction to the Rust language basics.

What Rust is and why you might want to learn it
Examining a simple program
Learning about the types of variable you can have (numbers, strings, tuples, arrays)
Introducing control flow with if, for, while and loop
Talking about functions and expressions

Preparing ourselves for the next video, which is about memory management

If you'd like to learn more about Unicode and character sets, try my video Interesting Characters where I share how surprisingly interesting this whole area is.

Links:

Florian Gilcher on "Why Learn Rust?": https://youtu.be/l8Qk5Nh6qsg
Slides: http://artificialworlds.net/presentations/rust-101/A1-intro-to-rust
Exercises: https://101-rs.tweede.golf/A1-language-basics/mod.html

Rust 101 is a series of videos explaining how to write programs in Rust. The course materials for this series are developed by tweede golf. You can find more information at https://github.com/tweedegolf/101-rs and you can sponsor the work at https://github.com/sponsors/tweedegolf . They are released under the Creative Commons Attribution Share Alike 4.0 International license.

This series of videos is copyright 2023 Andy Balaam and the tweede golf contributors and is released under the Creative Commons Attribution Share Alike 4.0 International license.


This project is on-going, is hosted on PeerTube, and we aren't too far behind, so I thought it might be of interest.
Playlist so far: https://diode.zone/w/p/xesbWmNanEHNBfJCZFQRUm

64
 
 

Introducing the Rust 101 series and how to install Rust.

Rust 101 is a series of videos explaining how to write programs in Rust.

How to install Rust: https://rustup.rs/
Slides: http://artificialworlds.net/presentations/rust-101/0-intro
Exercises: https://101-rs.tweede.golf/0-install/mod.html

Follow the "Exercises" link to find the other tools you might want to install to follow along.

The course materials for this series are developed by tweede golf. You can find more information at https://github.com/tweedegolf/101-rs and you can sponsor the work at https://github.com/sponsors/tweedegolf . They are released under the Creative Commons Attribution Share Alike 4.0 International license.

This series of videos is copyright 2023 Andy Balaam and the tweede golf contributors and is released under the Creative Commons Attribution Share Alike 4.0 International license.

Duration: 9min 44sec


This project is on-going, is hosted on PeerTube, and we aren't too far behind, so I thought it might be of interest.
Playlist so far: https://diode.zone/w/p/xesbWmNanEHNBfJCZFQRUm

65
 
 

General page for the Rust for Lemmings Reading Club.

All relevant links and posts should be collected here (go to specific discussion posts for discussion).

Also, a link to this "Portal", and any others, should be in the sidebar for easy access.

General Structure of the Reading Club:

A good companion set of materials to use are @[email protected] 's videos over on PeerTube (fediverse youtube).

Week 1

Week 2

Week 3 - Ownership and the borrow-checker

Week 4

...

66
 
 

Hi All! Welcome to the Reading Club for Rust's "The Book" ("The Rust Programming Language"). This is week 1 (the beginning!!).

Have a shot at going through "the reading" and post any thoughts, confusions or insights here

"The Reading"

The Twitch Stream

What's Next Week?

  • Chapters 3 and 4
  • Start thinking about challenges or puzzles to try as we go in order to get some applied practice!
    • EG, Advent of Code
    • Maybe some basic/toy web apps such as a "todo"
67
 
 

I think the fist meet up when well and covered some nice ground. Learning about the match statement for flow of control feels like a cool idea that I hope to experiment with more in my own learning projects.

68
11
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 
 

Streamed Code Together

A streamed reading club focused on rust's The Book and becoming reasonably good rust developers through community collaboration. The end goal is to read the lemmy codebase and contribute to the platform we all love. This stream will serve as a club meeting where we read some of the content together, discuss previous topics, and write some code.

Anybody's welcome, whether you want to continue once we get to the code base or not. If you're completely new to rust this is a great place to start and if you already know the language we'd love to have you all the more. At the very least it's a good networking opportunity but you'll likely learn more than you thought.

Post Stream

After the stream, a discussion post will be made to This Community stating what we've gone over and what we're planing to read/code/do before the next stream. This will act as a place to talk about what you've learned, what issues you're having, how your post-stream learning is going, and to help your fellow lemmings. I strongly encourage posting a comment even if everything you've stated has already been said.

Timing

We will meet weekly at 6:30pm EST (New York Time) on Tuesday with a maximum length of two hours.

Hosting

For now, the host will be myself however if you're interested in hosting or co-hosting yourself please feel free to message me about this especially if you can stream at a time where people in a European or Asian timezone can join in.

Missed the stream?

A video will be available on youtube so you can watch at a later point and a discussion post will be posted here weekly which states what we've gone over and what we're going to do before the next stream.

Links

The weekly stream will be hosted on twitch with that site being our main chatroom. Vods will be available on Youtube after the stream along with a mildly edited version for those who couldn't join in but still want to keep up

Twitch: https://www.twitch.tv/deerfromsmoke

Youtube Playlist: https://www.youtube.com/playlist?list=PL5HV8OVwY_F9gKodL2S31czb7UCwOAYJL

Our Learning Rust and Lemmy Community: [email protected]

Original Post: https://sh.itjust.works/post/13993219

69
 
 

Running Test Instances

The question has come up of running a test instance under a domain such that it could federate with other instances over the internet.

See, eg, MxRemy's comment and the thread that follows: https://lemmy.ml/comment/7984848

We don't want to pollute the network

The issue is that we might "pollute" the federation network with our instances that won't do much and are likely to be short-lived or intermittent. If you don't know, managing how a lemmy instance reacts to other instances that have gone silent or failed to reply/receive a request is a thing. AFAIU, the general idea is you don't want to give up on an instance ... timeouts and downtimes happen ... but how do you know when to actually just give up? Most lemmy instances are likely still pinging instances/domains that went dark ages ago.

Our own closed/local federation

A work around though could be to run our test instances in "allowlist federation" mode. IE, they only federate with specified domains.

See the docs on this: https://join-lemmy.org/docs/administration/federation_getting_started.html?highlight=allowlist#federation


Should there be interest in this ... we could have a simple list of domains here (linked in the sidebar too) from people running their test instance and eager to poke and prod federation. When you setup your own test instance, you can then just run in allowlist mode and copy the list from here.

70
 
 

The library has a nice guide and two working examples, so I tried the local_federation example. To build the example, you need Rust compiler, cargo package manager, and git:

$ git clone https://github.com/LemmyNet/activitypub-federation-rust
$ cd activitypub-federation-rust
$ cargo run --example local_federation axum
[INFO  local_federation] Start with parameter `axum` or `actix-web` to select the webserver
[INFO  local_federation::axum::http] Listening with axum on localhost:8001
[INFO  local_federation::axum::http] Listening with axum on localhost:8002
[INFO  local_federation] Local instances started
[INFO  local_federation] Alpha user follows beta user via webfinger
[INFO  activitypub_federation::fetch] Fetching remote object http://localhost:8002/.well-known/webfinger?resource=acct:beta@localhost:8002
[INFO  activitypub_federation::fetch] Fetching remote object http://localhost:8002/beta
[INFO  activitypub_federation::fetch] Fetching remote object http://localhost:8001/alpha
[INFO  local_federation] Follow was successful
[INFO  local_federation] Beta sends a post to its followers
[INFO  local_federation] Alpha received post: Hello world!
[INFO  local_federation] Test completed

You may want to use network analizyer (e.g, wireshark) to see how it works under the hood.

GET /.well-known/webfinger?resource=acct:beta@localhost:8002 HTTP/1.1
accept: application/jrd+json
digest: SHA-256=[redacted]
signature: keyId="http://localhost:8001/#main-key",algorithm="hs2019",[...]
host: localhost:8002

HTTP/1.1 200 OK
content-type: application/json
content-length: 269
date: Sat, 03 Feb 2024 23:05:19 GMT

{
  "subject": "acct:beta@localhost:8002",
  "links": [
    {
      "rel": "http://webfinger.net/rel/profile-page",
      "type": "text/html",
      "href": "http://localhost:8002/beta",
      "template": null
    },
    {
      "rel": "self",
      "type": "application/activity+json",
      "href": "http://localhost:8002/beta",
      "template": null
    }
  ]
}

[...]
71
30
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 
 

The concept

A streamed reading club focused on rusts The Book and becoming reasonably good rust developers through community collaboration. If you're interested, please comment so we know this's something you'd like to join in on.

A Begining

To begin, I'll be setting up a twitch stream where we read through the book together and solve some problems together related to the concepts provided. We'll be able to collaborate in chat, and talk about it here after each stream. This way, we'll be able to lean on each other or just hang out while we learn the language Lemmy uses for it's backend. Other hosts will be welcome as the end goal is to create a group of people whose goal is to support our collective growth as developers

Anybodies welcome of any skill set, whether or not they want to continue on once we get to lemmys code base. If you're completely new to rust this is a great place to start and if you already know the language we'd love to have you all the more. At the very least it's a good networking opportunity but you'll likely learn more than you thought.

Timing

Please comment your availability so we can find the best time and day to do this. As a stand-in and default though, 6:30pm EST (New York Time) on tuesday will be the start time. I'd be available on most days myself after 5pm Eastern Time (new york) though so don't hesitate to suggest another time/date.

Where?

For now, I'll be streaming this on a twitch channel I created a bit ago but never used. The link is here: https://www.twitch.tv/deerfromsmoke

Thank you @[email protected] for the idea.

72
 
 

So something I’m thinking about is posting regular (weekly, fortnightly or monthly) “digests” of what’s happened here in that time period. I’ll provide links to posts or comments etc that seem interesting or notable.

This way, stuff can continue in mega threads or “general discussions” as I’m calling them, and then regular posts can appear in people’s feeds and point them to interesting things.

I like the idea of running general discussion mega threads for general chats, but the main issue they have is that activity in these threads/posts won’t appear in your feed. A regular digest helps with that.

Thoughts?

Am I off base in thinking mega threads are a good idea? They only work if people visit this community intentionally, so for getting started, they may just not work at all.

A compromise might be to have a pinned post that collects links to relevant/interesting posts.

73
 
 

The idea here is that this is a general discussion mega thread style post. Feel free to come in and ask questions, answer questions, and generally discuss.

This can go on as long as we want, and stay pinned if that works. We can simply using sorting to see the latest or "biggest" comments in here.


Getting started with rust!?

  • Setting up a development environment ...
  • basic concepts for people new to rust ...
  • hardest concepts to start preparing for ...
  • crates (libraries) and concepts most relevant to the Lemmy codebase/platform.
74
 
 

The idea here is that this is a general discussion mega thread style post. Feel free to come in and ask questions, answer questions, and generally discuss.

This can go on as long as we want, and stay pinned if that works. We can simply using sorting to see the latest or "biggest" comments in here.


The worst bit about digging into a codebase, IMO, is orientating yourself and working out what does what!

The backend codebase can be found here: https://github.com/LemmyNet/lemmy

The "Contributing" section of the documentation (see here) lists how the other components of the platform interact with each other and the backend. But I don't think there's any outline of how the pieces of the backend work.

Perhaps another relevant codebase is the activity pub framework made along with lemmy: https://github.com/LemmyNet/activitypub-federation-rust.

75
 
 

Hi! Welcome to Learning Rust and Lemmy!

This community started from the realisation that there are probably a fair few people interested in learning Rust and in contributing to Lemmy but just don't quite know where to start and are struggling to get going on their own. See the post where I first suggested the idea.

So ... why not get all those people together and start a cooperative learning and tinkering community? Well here we are!

This is intended to be a space where people at any level can come and try to learn Rust together, learn about the Lemmy code base together, discuss whatever confusions or difficulties they're having in these endeavours and work together on solving problems, including, maybe, some contributions back to the Lemmy code base.

So checkout some of the general discussions, the meta discussion on how this place can or should work, and enjoy!

view more: ‹ prev next ›