
Lemmy: Federated Alternative to Reddit in Rust - adamnemecek
https://github.com/dessalines/lemmy
======
5trokerac3
One suggestion: if you want the federated crowd to jump on board, then choose
another font provider than Google, which uses their font links for tracking.

~~~
goodells
Thanks for pointing this out. I guess this is something I had assumed Google
does by serving the fonts for free, but I never really bothered to look into
it. Going to remove all Google Fonts references from my projects now.

~~~
drivebycomment
Google claims they don't track with fonts:
[https://developers.google.com/fonts/faq#what_does_using_the_...](https://developers.google.com/fonts/faq#what_does_using_the_google_fonts_api_mean_for_the_privacy_of_my_users)

Whether you believe them or not is up to you of course.

~~~
sanbor
Where does it claims that it does not track?

From your link:

Google Fonts logs records of the CSS and the font file requests, and access to
this data is kept secure. Aggregate usage numbers track how popular font
families are, and are published on our analytics page. We use data from
Google’s web crawler to detect which websites use Google fonts. This data is
published and accessible in the Google Fonts BigQuery database. To learn more
about the information Google collects and how it is used and secured, see
Google's Privacy Policy.

~~~
drivebycomment
Just before the part you quoted has this:

"Use of Google Fonts is unauthenticated. No cookies are sent by website
visitors to the Google Fonts API. Requests to the Google Fonts API are made to
resource-specific domains, such as fonts.googleapis.com or fonts.gstatic.com,
so that your requests for fonts are separate from and do not contain any
credentials you send to google.com while using other Google services that are
authenticated, such as Gmail."

That's basically saying Font download is not being associated with any
individual. And the part you quoted says they keep the aggregate stats, which
is reasonable, especially given that the aggregated stats are available
publicly.

~~~
sanbor
Thanks for the clarification. However I'm not sure that means they don't
track. They specify some of the things that they do with the data, but the
last sentence "To learn more about the information Google collects and how it
is used and secured, see Google's Privacy Policy" means that they could also
use any piece of data to improve their products.

------
onlyrealcuzzo
Serious question: from a user perspective, isn't spam going to be insanely bad
in the Fediverse? How do you stop spam without a central authority?

~~~
kitotik
Similar to an email service. You rely on the node operators to manage it.

~~~
theamk
So delegate this all to a few large blacklists (spamhaus)? And block all
residential users by default?

~~~
StudentStuff
Generally not, proactive blocking or silencing is reserved for instances that
host illicit content like child porn or hate speech. Inter-moderator
communication happens between your instance admin/democracy (or whatever
structure your instance uses) and other instances.

Traditional tools like muting a user, silencing an instance (if they're
spamming up the Federated Timeline on other instances, like Humblr.social
does) and blocking (if the mods are total shit) can still be used. Small
instances are the bulk of the content, so you aren't about to block them.
Large instances like Mastodon.social are generally blocked tho (if your
admin/democracy cares about a vibrant Fediverse).

~~~
pjc50
> Large instances like Mastodon.social are generally blocked tho (if your
> admin/democracy cares about a vibrant Fediverse).

Ah, so you achieve vibrancy by .. blocking a large number of the users?

~~~
MrEldritch
Honestly, I think this is the wrong way of looking at things. The Fediverse
isn't really like a single social network that's shattered amongst many
instances ... it's more like a bunch of _individual, separate_ hangouts, in
the vein of classic forums and IRC chatrooms and fandom websites, which have
the ability to talk to each other and share stuff if they want.

It's not so much about "blocking" mastodon.social as _not choosing_ to link up
with it - because your instance is a specific community, and actual human
social relations thrive when they can choose who they're hanging out with. So
you choose to talk to other smaller, more diverse communities that you can
actually _get to know_ a good chunk of the people in them, instead of just
drinking straight from the firehose that is a big instance.

Federating with another instance is basically two groups of people deciding to
hang out together, effectively merging. Federating with mastodon.social means,
effectively, merging your community with mastodon.social ... which means
_submerging_ it beneath the mass of mastodon.social's much greater activity.

A vibrant Mastodon isn't a more-obtuse recreation of the Twitter experience.
Twitter is _already_ Twitter. It's about fostering all the things that Twitter
_isn 't_ \- personal and Dunbar-scaled and locally moderated and _diverse_.

~~~
koheripbal
I think it's sad that we cannot figure out a way to have LARGE federated
communities that remain functional.

~~~
lasagnaphil
I think this is inherently a sociological problem than a technological one.
When there are enough people in an organically grown group, the community will
become unsustainable and then 1) it disintegrates into multiple groups until
it becomes stable again or 2) it transforms into a hierarchial, authoritative
society where a small group of people makes most of the decisions.

Also, I think Mastodon’s design deliberately steers instances away from
becoming large ones; it rather tries to be a nurturer for various small
communities and subcultures. It doesn’t view size as a good thing, and that’s
totally okay. Nowadays, I think we need less monoculture and more
diversity/creativity in our society.

------
ummonk
Looks like it uses ActivityPub -
[https://github.com/dessalines/lemmy/blob/master/docs/API.md](https://github.com/dessalines/lemmy/blob/master/docs/API.md)

Nice.

------
Communitivity
Mastodon has been responsible for helping drive a lot of growth in the
federated app space. PeerTube for videos, and perhaps a dozen other services
(see [https://blog.joinmastodon.org/2018/06/why-activitypub-is-
the...](https://blog.joinmastodon.org/2018/06/why-activitypub-is-the-future/)
for some of them).

I also recently found the early but promising Plume project for operating a
federated blog ( [https://joinplu.me/](https://joinplu.me/) ).

Icing on the cake? Quite a few of the federated projects are written in Rust.

~~~
0xb100db1ade
Federated blog?

Is that any different from a regular website?

~~~
bisby
I would assume it is just a regular website with some backend for federated
discovery.

I don't read many blogs but I would assume having tags or a "more like this"
that search across the fediverse could be useful?

Are those things that people have in blogs?

~~~
rakoo
Also the whole commenting/liking thing

------
Deimorz
It doesn't look like there's any federation right now, the test site
([https://dev.lemmy.ml/](https://dev.lemmy.ml/)) says "Federation into the
ActivityPub network is on the roadmap."

~~~
thejohnconway
Oh. Activity pub is complex and difficult to implement. The test suite is
down.

Leaving it to last makes me worry that it won’t happen.

~~~
muvek
Check out
[https://gitlab.com/mbajur/prismo/](https://gitlab.com/mbajur/prismo/).

~~~
vpzom
also doesn't really federate

~~~
0lpbm
Follows work at least. Commenting directly on stories works, as far as I
remember, but I think the main issue is that it doesn't properly create a list
of inboxes that a comment is addressed to to push the messages to them.

------
olah_1
sharing some others in case it helps

\-
[https://github.com/mariusor/littr.go](https://github.com/mariusor/littr.go)

\- [https://gitlab.com/tuxether/anancus](https://gitlab.com/tuxether/anancus)

~~~
mpnordland
Another, decentralized, project
[https://getaether.net/](https://getaether.net/)

~~~
rolleiflex
Yup, creator of Aether here. Small difference, this is federated, Aether is
decentralised. Far as I understand this is more like Mastodon where some
people host servers that talk to each other. Aether is more like a
decentralised Usenet, every user is a server.

~~~
muvek
Can you explain the 6 month thing to me? If I understand correctly,
posts/comments older than 6 months get deleted, unless you decide to save it
locally? Even if someone saves a post older than 6 months locally, others
cannot see it, right?

That does not seem like a feature to me, and completely breaks geteather imo,
sadly. Most of the good content on reddit is older than 6 months. Imagine if
reddit decided to delete posts older than 6 months, jesus, every 6 months
there would be a flood of the very same questions/posts/comments...

~~~
bovermyer
It's in keeping with the project's philosophy of being ephemeral.

There are other tools for recording information for posterity.

~~~
SmellyGeekBoy
Excellent answer.

------
microcolonel
The quality of this seems high, from the frontend on the dev instance. All
actions are effectively instantaneous.

Good work!

------
fsiefken
Very nice! I am curious how this would compare to Discourse feature and
usability wise.

It would also nice to have a NNTP gateway to these webforums. VBulletin had
one.

------
aerique
So... Usenet?

------
muststopmyths
off topic but ~20 years ago Lemmy was a beautiful,native vi clone for Windows.
I wish the author had kept it going or made it open source. Vim has such an
ugly GUI.

------
bartimus
I think a project like Diaspora failed because they chose to write it in Ruby
on Rails. Ruby is nice from a purist point of view. But you'd want to build
something like this on top of a language which is popular, accessible, has a
low learning curve and can be easily deployed anywhere.

------
cabalamat
Nice project!

(I'm also doing a Fediverse project -- MeowCat
[https://github.com/cabalamat/meowcat2](https://github.com/cabalamat/meowcat2))

~~~
muvek
Do you have a public instance? Does it federate yet?

~~~
cabalamat
No to either question yet.

------
nine_k
Nice!

What I haven't found in the docs is how federation would work.

~~~
smacktoward
Via ActivityPub — see
[https://github.com/dessalines/lemmy/blob/master/docs/API.md](https://github.com/dessalines/lemmy/blob/master/docs/API.md).

For more general info on ActivityPub itself, see
[https://activitypub.rocks](https://activitypub.rocks).

------
FraaJad
Is there a rust implementation of mastodon? The dependencies for the current
implementations are too brittle IMHO.

~~~
swills
Perhaps rustodon:
[https://github.com/rustodon/rustodon](https://github.com/rustodon/rustodon)

------
zmlzm
Cool, written in actix!

~~~
twic
Cool, or not cool, depending on whether you ever got over the unsafety scandal
around Actix.

------
pojntfx
Wow, this is awesome.

------
rum3
It works really well and looks great.

Very nice work!

------
forgotmypw3
Your site is blank without JS...

------
mattchew
Nice! I hope this gets traction.

------
sureaboutthis
I don't understand what this is. At first, I thought it was a scraper for
links which is the only reason I go to reddit at all. Such a thing would help
stop me from getting sucked into the 80% of reddit which is nothing but a
smelly pile of poo.

So what does this do?

~~~
nicoburns
This is a reimplementation of a reddit-like site. But open source, and with
ambitions to work in a federated (as opposed to centralised) way.

You could use this code to host your own Reddit (or you will be able to once
they project is more developed).

------
s_y_n_t_a_x
The code quality is amazing. Good job.

~~~
saberience
On the contrary, I thought the code was terrible quality. If someone wrote
this code at my company they would be fired, or more likely not hired in the
first place.

~~~
nvssj
What makes you say so? Can you give examples?

~~~
saberience
Well, for a start... having a single file called "server.rs" which is 2256
lines long is already disqualifying. This file, code structure would be
incredibly poor for developer efficiency. It just grows and grows and does all
the things while having a vague sounding name like "server.rs" Why is
server.rs doing "EditSite." What does the name EditSite mean anyway?

Poor code reuse, same bits of code copy and pasted all over instead of being
refactored out into their own methods. Methods which are doing too much
different crap. The single responsibility principle is broken everywhere.

Imagine trying to write unit tests for "Perform for EditPost", this method is
doing far too much and would be a pain in the ass to fully test. If you're
making a method called "EditPost" it should only be doing the actual post
editing, not making connections, or user validation or checking for a ban.
These should happen in a method which only handles connections, or a method
which is called "ValidateUser" which is properly re-used.

Generally speaking, the structure as a whole isn't very readable, poor names,
methods and files which are doing too much. The project wouldn't scale well
with a bigger team or if it grew in terms of codebase size.

~~~
A2017U1
What is the max lines in a single file for a developer "to get fired" at your
company?

~~~
Zhyl
The company has a shell script running in Cron. If it finds a source file with
more than 1000 lines it deletes the author from the payroll.

~~~
fmoralesc
No, it is written in APL for extra conciseness. When they wrote it in shell it
deleted the authors from the payroll.

