nutomic

joined 5 years ago
MODERATOR OF
[–] nutomic@lemmy.ml 7 points 9 months ago (1 children)

This, now we have school holidays and my kids are home 24/7. Takes a lot of time and energy to keep them entertained.

[–] nutomic@lemmy.ml 5 points 9 months ago (3 children)

I am planning to implement private communities soon, hopefully it can help with that. Then maybe Lemmy can become an alternative for Discord and other platforms too.

[–] nutomic@lemmy.ml 19 points 9 months ago (2 children)

I don't have time to respond everything, but just about the growth part: Before the Reddit blackout happened, Lemmy was stuck with around 1000 monthly users for at least a year. It was quite boring compared to now, in 15 or 30 minutes you could read all new posts and comments for a day. It was also easy to recognize the handful of regular posters (cheers). At that time you could easily think the same, that Lemmy will never grow and people will leave. But then the Reddit migration happened and we got completely overwhelmed with a 70x increase in active users.

It seems to me that growth on the internet always happens with short spurts and long quiet periods. There will probably be a time when people come to Lemmy again and we reach hundreds of thousands or millions of active users. Then we will fondly remember the time when it was so small.

[–] nutomic@lemmy.ml 9 points 9 months ago (3 children)

Votes are needed to sort the posts and decide which ones are shown at the top of your frontpage. If we add different reaction types, it's not at all clear how each of them should affect the score. We might come up with some arbitrary numbers, but then the system will get a lot less intuitive and more complex.

[–] nutomic@lemmy.ml 1 points 9 months ago

With crypto you can make international transfers within a few minutes and only pay a few cents. Using a bank account it takes multiple days, and costs a few euros at least. For me that's a major use case and something I do regularly.

[–] nutomic@lemmy.ml 6 points 10 months ago (1 children)

Congratulations! It's great to have multiple alternative platforms, so there is more user choice and better resilience.

[–] nutomic@lemmy.ml 1 points 10 months ago

Yes that sounds like a good idea. Unfortunately lemmy-ui isn't getting many contributions so development is rather slow, but contributions are always welcome. I don't work on that project myself, so I suggest you discuss it in the dev chat on matrix to make sure your approach will actually work.

[–] nutomic@lemmy.ml 3 points 10 months ago (2 children)

I think the issue isn’t that the Lemmy developers don’t want these things to exist that you’re talking about, so much as them being the only ones in a position to make the changes or accept the PRs to make them happen.

Lemmy maintainer here, and I'm really curious what gave you this idea. We generally welcome all contributions to the project. On the backend I made a pull request to add plugin support which is waiting for feedback. Onthe frontend I havent heard any interest in a plugin system yet.

So if this is something you want, you're welcome to implement it and open a pull request.

[–] nutomic@lemmy.ml 0 points 10 months ago (1 children)

Don't speak yankee to me

[–] nutomic@lemmy.ml 3 points 10 months ago (5 children)

The highest temperature on this map is 37 degrees (south of Spain). Other places barely reach 30. This is definitely not a heat wave. Where I live the summer has been extremely cold so far.

[–] nutomic@lemmy.ml 4 points 10 months ago (1 children)

10k is the price of a used car so it affects almost everyone. And with inflation the limit will go even lower over time. Its a bad plan all around, and gives more power to states which are already too powerful.

2
submitted 4 years ago* (last edited 4 years ago) by nutomic@lemmy.ml to c/rust@lemmy.ml
 

Between Lemmy versions v0.8.10 and v0.9.0, we did a major database rewrite, which helped to improve compilation time by around 30% (see below). In this post we are going to explain which methods were effective to speed up Rust compilation for Lemmy, and which werent.

Compilation time comparison

Here is a comparison of debug compilation times for Lemmy. All measurements were done in with Rust 1.47.0, on Manjaro Linux and an AMD Ryzen 5 2600 (6 cores, 12 threads). Results are taken as the average of 5 runs each.

v0.8.10 v0.9.0-rc.11 improvement
Clean build 195s 129s 34%
Incremental build 23s 17s 26%

Build Graph

The build graph and statistics can be generated with the following command, which will generate a file cargo-timing.html.

cargo +nightly build -Ztimings

In our experience, it is really the most useful tool in order to speed up compilation time. There are a few ways to use it:

  • The table at the bottom shows which crates took longest to compile. You can try disable unused features for slow crates, or remove those dependencies entirely. If your own crates are slow, split them up (see below).
  • In the bar graph near the top, you can mouse over each crate to see which other crate it has to wait for in order to start compilation. You can try to remove these dependencies, or features that you don't need.

Splitting code into workspaces

This is often tricky to do, but proved to be the most effective way to speed up compilation. At the same time, it helped to better organise our code into independent parts, which will make future maintenance work easier.

As a first step, it is enough to split the code into crates which depend on each other linearly, as this is relatively easy and already helps to speed up incremental builds (because only part of the project needs to be recompiled when something is changed).

In case you have a particular dependency which takes very long to build, you should take all code which does not depend on that dependency, and move it into a separate crate. Then both of them can be built in parallel, reducing the overall build time.

Later you can try to reorganise your code so that crates in your project can be compiled in parallel. You can see below how we did that in Lemmy:

Before:

After:

As you can see in the before screenshot, all Lemmy crates are compiled linearly, which takes longer. In the after screenshot, at least some of the database crates are compiled in parallel, which saves time on any computer with multiple CPU cores.

For more details on how to use cargo workspaces, have a look at the documentation

Disabling debug info

This is very easy to do, as it only requires putting the following into Cargo.toml:

[profile.dev]
debug = 0

The effect is that debug information isn't included in the binary, which makes the binary much smaller and thus speeds up the build (especially incremental builds). We never use a debugger in our development, so changing this doesn't have any negative effect at all for us. Note that stack traces for crashes still work fine without debug info.

Here it is in the documentation

Removing dependencies

This only had limited success, for the most part. We weren't willing to remove or replace any of our dependencies, because then we would have to remove features, or have a lot of extra work to reimplement things ourselves.

However, there is one specific dependency where we could improve compilation time by around 50 seconds. Refactoring the database allowed us to remove diesel's 64-colum-tables feature. This was especially effective because diesel only has a single crate, and as a result is compiled on a single thread. This resulted in a period of 40 seconds where one thread would compile diesel, while all other threads were idle. There is still room for improvement here, if diesel can be split into multiple, parallel crates.

Lemmy issue with more details

With actix we noticed that it includes a compression library by default, which is useless in our case because we use a reverse proxy. Thanks to @robjtede from the actix for making the necessary changes to allow removing that library. In the end the effect was limited however, because the library could be built very early and in parallel to other things, without blocking anything. It should help with compilation on devices with few CPU cores at least.

Issue in the actix-web repo

Other optimisations

cargo bloat was commonly recommended in order to find large functions, and split them up. But that didn't help at all in our case, probably because our project is quite large. It might be more useful for smaller projects with less code and less dependencies.

It was also suggested to reduce macro usage, but there wasn't much opportunity in our case because diesel uses a lot of macros. We removed a few derive statements that weren't needed, but without any noticable effect.

 

Many elderly WWII vets in Russia live alone and haven’t the ability to improve their living conditions. Volunteers hear their dreams all across Russia starting projects to help WWII veterans improve their living conditions for free. The wave of civic engagement came after Anton from Ekaterinburg, Central Russia and Yaroslav from Simferopol in southern Russia launched projects, making social activism easy and accessible. See how the ideas are restoring faith in small miracles.

 

It looks like a very useful tool for a use case I have, but I would like to test it before setting up a server myself. And are there any other ebook libraries that work in the browser, which I might give a try?

https://github.com/janeczku/calibre-web

 

After almost a year of hard work implementing ActivityPub support on Lemmy, it is finally done! Anything that works here on dev.lemmy.ml, also works over federation between different instances (with one notable exception, community mods have to be on the same instance as the community for now).

Before we consider federation ready for production, some more testing is needed. And that's where you come in: go to our test instances enterprise.lemmy.ml, ds9.lemmy.ml and voyager.lemmy.ml, and try things like:

  • post, comment and vote
  • delete and restore posts/comments
  • send private messages
  • create communities, remove/restore posts and ban/unban users
  • setup your own lemmy instance, and federate with enterprise.lemmy.ml or ds9.lemmy.ml

If you notice any bugs, please report them on Github, as comments on this post, or in our Dev Chat on Matrix. Please keep in mind that our code of conduct also applies to the test instances.

The more you test, the sooner we will feel confident to enable federation on dev.lemmy.ml. Happy testing!

 
 

Here are the milestones and payouts we agreed on with NLnet.

  • All payouts will be split 50:50 between /u/dessalines and /u/nutomic
  • Milestone ordering is only for reference, they may be completed in any order
  • Total amount: 45.000€

1. Federation feature complete

Nearly all back-end activitypub actions (voting, commenting, posting, etc) complete.

Amount: 4500€

Tasks

  • Community updates: make sure nsfw and sidebar changes propagate
  • Federate post::stickied
  • Fetch all inreplyto objects: #694
  • Proper CommunityFollower forwarding: #662
  • In all the receives, in addition the the signature verify, do a check to make sure they are actually allowed to do the action.
  • Remove options like "make mod" or "make admin" for remote users
  • Create a "linked instances" page (from the whitelist)
  • Issue link (everything left under Backend -> Features, and Frontend)

2. Security

Various security-related checks for federated activities completed.

Amount: 6000€

Tasks

  • Ensure URLs start with https:// and verify attributedTo, ID and pubkey URLs are from the same domain/actor
  • Get rid of unwrap() in apub code
  • Apply bans, slur filters, length checks etc to posts coming in over activitypub
  • Go through all the TODO and see if there is anything important
  • Implement instance blocklist
  • Remove tags like <script> from federated html before rendering it (eg in embeds)
  • Try to fix any remaining security issues
  • Setup security@lemmy.ml address with PGP
  • Issue link (Backend -> Security and Maintenance)
  • Once this is finished we should be ready for a production release (but we might wait until things like tests are finished)

3. Refactor Rust code

Refactor rust code to use new activitystreams library, and clean up technical debt.

Amount: 3000€

Tasks

  • Abstract API code to be able to use federated authentication, not just JWT auth. #653
  • Migrate to asonix' new activitystreams library
  • Split the code into seperate crates, like lemmy-database, lemmy-api, lemmy-apub
  • Speed up compilation time
  • Address technical debt
  • Issue link

4. Documentation for ActivityPub implementation

Complete documentation for other activitypub implementors, based on communities.

Amount: 2250€

Tasks

  • Describe how we are using ActivityPub
  • Different documentation targeted at developers, admins and users
  • Explain how instance blacklist/whitelist works (doesn't affect data that was already federated before)
  • Add activitypub json outputs to docs

5. Tests for ActivityPub implementation

Complete integration tests for all activitypub actions.

Amount: 3000€

Tasks

  • Split integration tests into multiple files, extract helper functions
  • Extend integration tests
  • Add tests for malicious behaviour (eg invalid http signature)
  • More unit tests
  • Add integration test that verifies ActivityPub sending/receiving (using raw json)
  • Look into using FediDB
  • Issue link

6. Rework Caching / Views

Complete more efficient caching system, since materialized view refreshes are currently locking reads.

Amount: 2250€

Tasks

  • Rework materialized views into fast tables. #606
  • Rewrite all SQL triggers to fill fast tables.
  • Do performance comparison.

7. Accessibility

Add accessibility tags to front-end components.

Amount: 1500€

Tasks

  • Add aria tags to all front end components.
  • Reach out to a community who can test other dynamic components (popups, etc).
  • Implement results of NGI0 Accessibility review

8. Federated Moderation

Allow federated users to be added as moderators of communities on non-local instances.

Amount: 6000€

Tasks

  • Ability to add community moderators that are users on other instances, who have full moderation abilities. IE, community mods don't need to live on the same instance as the community. (This will be important later for private communities too)
  • Federated moderation actions (ban, removes, etc)
  • Ability to appoint federated moderators

9. Private Communities

Allow the creation of private communities.

Amount: 4500€

Tasks

  • Private communities #187
  • Communities have view, submit, vote, and comment priviledges.
  • Add integration tests to make sure communities are properly invisible to non-approved users.

10. Private / Invite only instances

Complete private / invite only instances (currently all instances are public, and registration is open to the public). Amount: 4500€

Tasks

  • Private / Invite only instances #209
  • Add email verification
  • Customizeable questionaire

11. Blocking Users / Communities

Allow users to block other users and communities.

Amount: 6000€

Tasks

  • Users can block other users or communities
  • If user A blocks user B, then all interaction between these users is impossible and they can't see each other's posts
  • Also works for federated users / communities
  • Issue link

12. Create a project website for Lemmy

Create a project website for Lemmy (similar to joinmastodon), with a project description and list of instances.

Amount: 1500€

Tasks

  • Project description
  • List of instances
  • Issue link

13. Additional search functionality

Add additional functionality to Lemmy's search page, such as community and category filtering, and url searching.

Amount: 2250€

Tasks

  • Add community filtering for posts, comments
  • Add category filtering for communities
  • Add URL search type
  • Issue link
 

Let's start with the biggest news first: Lemmy is receiving funding from the NLnet foundation! The funding is for a total amount of 45.000 €, which will allow /u/dessalines and me (/u/nutomic ) to work on Lemmy full-time for at least half a year.

We have created various milestones for the work we are planning to do. Most of them are about getting ActivityPub federation ready for production. In addition, we will work on:

  • better accessibility
  • private communities and instances
  • reworking search
  • creating a joinlemmy.ml type site
  • the option to block other users or communities

The details of the milestones will be posted on our github issue tracker soon.

We're very excited about this opportunity, and can't wait to finish federation.

In other news, we have just released Lemmy v0.7.0. Most importantly, this update switches to Pict-rs for image hosting, due to various performance-related issues with Pictshare. Pict-rs was coded from scratch in Rust by the amazing @asonix, who also created the ActivityPub library for Rust. We can't thank him enough for all the work he is doing for Lemmy!

We'd also like to thank the following people for their contributions:

  • @iav for their work in building arm compatible rust docker images and builds.
  • @ernestwisniewski and @bytesnake for code contributions.
  • Many others for contributing translations via the Lemmy weblate.
  • Our Patreon and Liberapay supporters who help us devote more time to Lemmy (We're still very far from these being able to sustain two developers)
  • Everyone else who contributes to Lemmy, be it by coding, hosting instances or just using it and spreading the word!

Other than that, since v0.6.0 in January we've closed over 100 issues, fixed tons of bugs and added many new features.

You can find the full changelog and upgrade instructions here.

Edit: Here are the milestones for the funding

3
submitted 5 years ago* (last edited 5 years ago) by nutomic@lemmy.ml to c/announcements@lemmy.ml
 

Just a public service announcement.

view more: ‹ prev next ›