this post was submitted on 23 Mar 2025
99 points (100.0% liked)

Selfhosted

45148 readers
948 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

cross-posted from: https://lemmy.zip/post/34733394

Snac (AKA Snac2) is a minimal microblogging ActivityPub instance written in C.

Features (from its Codeberg repo):

  • Lightweight, minimal dependencies
  • Extensive support of ActivityPub operations, e.g. write public notes, follow users, be followed, reply to the notes of others, admire wonderful content (like or boost), write private messages...
  • Multiuser
  • Mastodon API support, so Mastodon-compatible apps can be used
  • Simple but effective web interface
  • Easily-accessed MUTE button to silence morons
  • Tested interoperability with related software
  • No database needed
  • Totally JavaScript-free
  • No cookies either
  • Not much bullshit
you are viewing a single comment's thread
view the rest of the comments
[–] atzanteol@sh.itjust.works 15 points 5 days ago (4 children)

Bonkers that anyone would start a social media app in C in 2025. "No JavaScript" but you're just one buffer overflow from arbitrary code execution.

[–] sugoidogo@discuss.online 11 points 5 days ago (2 children)

C is also faster than JavaScript, uses less memory, and memory safety isn't impossible in C either. I wouldn't consider a scripting language to even be a choice for writing a backend server if I can use a compiled language instead.

[–] atzanteol@sh.itjust.works 5 points 5 days ago

memory safety isn't impossible in C

In practice it is.

C is also faster than JavaScript, uses less memory, I wouldn't consider a scripting language to even be a choice for writing a backend server if I can use a compiled language instead.

Neat.

[–] jewbies 2 points 5 days ago* (last edited 5 days ago)

I do get your point and agree.

But Id just like to point out that there is no such thing as "compiled" languages. The compiler or interpretor is the implementation of the spec. Did you know that there are interpreted versions of c?

[–] 56_@lemmy.ml 9 points 5 days ago

I feel like snac is social media made specifically for people who like C though. I'm sure most users of it are well aware of the implications.

[–] eutampieri@feddit.it 8 points 5 days ago (1 children)

I’m a rust fan, but may I remind you that the Linux kernel is mostly C?

[–] atzanteol@sh.itjust.works 16 points 5 days ago* (last edited 5 days ago) (1 children)

No. Go away. That's not "starting a social media app" now is it?

Besides, even the Linux team has started the shift away from C.

Edit: besides - "Linux does it" doesn't mean it's beyond criticism. Linux has had numerous security vulnerabilities due to C.

[–] killeronthecorner@lemmy.world 3 points 5 days ago (1 children)

Please write the "C considered harmful blog post". I just want to see everyone's faces. Pleeeeeease.

[–] atzanteol@sh.itjust.works 3 points 5 days ago (1 children)

Others have written on the topic. Including Greg KH - one of the major Linux maintainers.

https://lkml.org/lkml/2025/2/19/222

[–] killeronthecorner@lemmy.world 4 points 5 days ago

Yes but those are inferior because they aren't in a rage-baiting meme format

[–] z3r0_Geek@lemmy.zip 2 points 5 days ago (1 children)
[–] atzanteol@sh.itjust.works 10 points 5 days ago

C is a "memory unsafe" language. There are whole categories of security vulnerabilities that simply aren't possible in memory-safe languages that C allows. There is no good reason to continue using C anymore for new projects if you care at all about security.

https://www.cisa.gov/resources-tools/resources/product-security-bad-practices