1
4
submitted 1 hour ago by git@hexbear.net to c/programming@hexbear.net
2
7
submitted 5 days ago by git@hexbear.net to c/programming@hexbear.net
3
10
submitted 1 week ago by git@hexbear.net to c/programming@hexbear.net
4
14
submitted 2 weeks ago by git@hexbear.net to c/programming@hexbear.net
5
16

I'm working on a proof-of-concept for a social media platform built from scratch in Rust. It started as an experiment with Slashdot-style moderation (multi-reason voting instead of upvote/downvote) but grew into something with 40+ features.

Full feature list here: https://git.disroot.org/hirrolot19/social-platform

Why I'd host this

The reason I'm posting this on Hexbear specifically is that if I do spin up a public instance, it wouldn't be another general-purpose site. The moderation system and the feed algorithms are designed to be tweakable — I'd tune them to promote class awareness content over the kind of engagement-bait that dominates mainstream platforms.

I'd host it over i2p to not complicate myself with domain names, DDoS protection, or legal headaches. Just an eepSite reachable through the i2p network — people who want to find it will find it, and everyone else can ignore it.

It's already live: http://6ur3cvs7uldkg7lmaioj6sezqbefnjmmw7oluxg5pwjbsuovosga.b32.i2p (requires I2P browser/proxy — see my comment below for setup)

If there's genuine interest I'd:

  1. Clean up the codebase (it's AI-generated, needs human love)
  2. Add ActivityPub federation so it can talk to the rest of the fediverse
  3. Tune the recommendation algorithms toward educational/political content
  4. Set up a basic moderation team

What it does

  • Slashdot moderation — multi-reason voting, limited mod points, meta-moderation, score capping, obfuscated karma
  • Advanced search — boolean operators, field search, date range, tag filtering, saved searches
  • Tags — booru-style tagging with categories and filtering
  • Custom feeds — weighted sources (users, tags, keywords), include/exclude
  • Image upload — multipart upload with serving
  • Themes — dark, light, forest, ocean
  • Communities — self-governing with visibility controls
  • Private messaging, notifications, reactions, follows
  • Polls, achievements, threaded comments, Q&A
  • Content filters — regex/domain/keyword hide/blur
  • Report system with moderation queue
  • Post/comment editing and deletion
  • Login rate limiting

Stack

Rust + Axum + SQLite. Single binary, no runtime dependencies. Server-side rendered HTML (no JS framework).

What's missing

  • ActivityPub federation (schema has placeholders, not wired)
  • Real-time WebSockets (pull-based for now)
  • Any kind of proper frontend (it's ugly server-side HTML)
  • ML recommendation algorithms (would need to be built)

Repo

https://git.disroot.org/hirrolot19/social-platform

Quick start: cargo run --release, opens at http://0.0.0.0:3000/, login admin/admin123

If you'd use something like this or have thoughts on the moderation/algorithm direction, let me know. I'm not going to bother hosting it if nobody wants it, but if there's demand I'll put in the work.


In-depth guide: accessing .i2p sites from Manjaro Linux

1. Prerequisites & The Big Picture

The .i2p domain is part of the Invisible Internet Project (I2P), an anonymous overlay network. Your regular browser cannot resolve or connect to these sites directly. To access them, you need two things:

  1. An I2P Router running on your system. This acts as a local proxy server (listening on 127.0.0.1:4444 by default).
  2. A Browser configured to route .i2p traffic through that local proxy.

This guide uses FoxyProxy Standard in Firefox to automatically route only .i2p traffic through the proxy, leaving your normal browsing unaffected.

2. Step 1: Install and Run an I2P Router

You need a program that connects you to the I2P network. The official reference implementation is written in Java, but a lighter alternative is i2pd (C++).

Option A: Install i2pd (Recommended for Manjaro)

i2pd is available in the official Manjaro repositories and is very lightweight.

  1. Open a terminal and update your package list:
    sudo pacman -Syu
    
  2. Install i2pd:
    sudo pacman -S i2pd
    
  3. Start the i2pd service and enable it to run automatically on boot:
    sudo systemctl enable --now i2pd
    
  4. Verify it's running. The router will take a few minutes to connect to the network.
    sudo systemctl status i2pd
    
    You can also access the I2P router web console at http://127.0.0.1:7070/ to monitor its status.

Option B: Install the Official I2P (Java)

The official I2P implementation is available via Snap on Manjaro.

  1. Ensure Snap is installed and enabled on your system.
  2. Install I2P via Snap:
    sudo snap install i2pi2p
    
  3. Run it:
    /snap/i2pi2p/current/runplain.sh
    

Note: The Snap version may require additional setup. The i2pd option (Option A) is generally simpler for Manjaro users.

3. Step 2: Install FoxyProxy Standard in Firefox

Now, configure your browser to use the proxy.

  1. Open Firefox.
  2. Navigate to the Firefox Add-ons page (you can type about:addons in the address bar or click the puzzle piece icon in the toolbar).
  3. In the Add-ons Manager, search for "FoxyProxy Standard".
  4. Click "Add to Firefox" and confirm the installation when prompted.
  5. The FoxyProxy icon (a small fox) will appear in your browser's toolbar.

4. Step 3: Configure FoxyProxy for I2P

This is where you tell FoxyProxy how to route traffic.

  1. Click the FoxyProxy icon in the toolbar.
  2. Select "Options".
  3. In the "Proxies" tab, click the "Add New Proxy" button.
  4. Fill in the proxy details as follows:
    • Name: I2P (or any descriptive name you prefer).
    • Proxy Type: Select HTTP.
    • Host/IP: Enter 127.0.0.1.
    • Port: Enter 4444.
    • Username/Password: Leave these fields blank. The I2P proxy does not require authentication.
  5. Click the "URL Patterns" tab.
  6. In the "Add Pattern" section:
    • Pattern: Enter *.i2p.
    • Pattern Type: Select "Wildcard".
    • Click "Add".
  7. Click "Save" to create the new proxy profile.

5. Step 4: Activate FoxyProxy

The final step is to tell FoxyProxy to use the rules you just created.

  1. Click the FoxyProxy icon in the toolbar again.
  2. Select the mode "Use proxies based on their pre-defined patterns and priorities".

This mode ensures that only requests to URLs matching the *.i2p pattern will be routed through the I2P proxy. All other traffic will go directly, as usual.

6. Step 5: Access the .i2p Site

With the I2P router running and FoxyProxy configured, you're ready.

  1. Open a new tab in Firefox.
  2. Enter the address: http://6ur3cvs7uldkg7lmaioj6sezqbefnjmmw7oluxg5pwjbsuovosga.b32.i2p
  3. Press Enter. FoxyProxy will detect the .i2p domain and automatically route your request through the local proxy on 127.0.0.1:4444, allowing you to access the site.

7. Troubleshooting

  • "I can't reach the site" or "Connection refused": Your I2P router is likely not running or not fully connected.
    • Check the router status with sudo systemctl status i2pd.
    • Restart the router: sudo systemctl restart i2pd.
    • Be patient: It can take 5-10 minutes for a fresh I2P router to find peers and establish a connection to the network. Check the web console at http://127.0.0.1:7070/ to see if "Tunnels Participating" and "Integrated" are increasing.
  • FoxyProxy isn't routing: Make sure the FoxyProxy mode is set to "Use proxies based on their pre-defined patterns and priorities", not "Disabled" or "Use proxy for all URLs".
  • Slow loading: I2P is an anonymous network with inherent latency. Sites can take 10-30 seconds to load, especially on the first visit. This is normal.
  • URL pattern not working: Ensure the pattern is exactly *.i2p (with a period before the asterisk) to match any subdomain of .i2p.
6
17
submitted 3 weeks ago* (last edited 3 weeks ago) by hello_hello@hexbear.net to c/programming@hexbear.net

image is a bar graph from the article showing rust taking 162x longer to compile than Python, the next comparable compiler is GCC which is 86x longer at around 3 hours.

To be fair, these 699 MB worth of source code contain all the sources required to build Rust, including some 10 million lines of LLVM code and three different versions of OpenSSL.

Well, it's true. All the sources are included, but not the binary Rust compiler (and the cargo binary), both of which are required to build Rust from source!!! Wait, what? Isn't there a chicken and egg problem? We are actually trying to build Rust from source...!? Yes, there is.

Now let's compile Rust! As Rust 1.84.1 did not build (some kind of error message after 2 hours into the build IIRC), I tried to build Rust 1.81 instead.

Here is the build time for Rust 1.81. Sit down please:

12563 seconds, or 3 hours and 30 minutes.

OCaml builds in 197 seconds, or 3 minutes and 17 seconds. On the same machine, obviously.

That's a factor of 63 times slower than OCaml, or 162 times slower than Python, or 4753 times slower than Lua.

To be fair, the build time of Rust includes building LLVM, cargo and some other tools, and it builds Rust at least twice: stage1 is the Rust 1.81 compiler built with the Rust 1.80 bootstrap, while stage2 is using stage1 (1.81) to build itself again.

Note that a significant part of the problem, and why bootstrapping Rust is so expensive, is that each version of Rust must be bootstrapped with exactly the previous version.


Me wondering why people call Rust a systems programming language when getting to the system from source requires multiple weeks of compiling only to be entirely dependent on statically linked binaries from 100s and 100s of dependents from dozens and dozens of vendors in a centralized npm-type site (No CPP boost, Maven Central, or decentralized management here).

7
8
Every byte matters (fzakaria.com)
submitted 1 month ago by git@hexbear.net to c/programming@hexbear.net
8
18
submitted 1 month ago by git@hexbear.net to c/programming@hexbear.net
9
25
submitted 1 month ago* (last edited 1 month ago) by invalidusernamelol@hexbear.net to c/programming@hexbear.net

I've been using a package called pyvis for a while to help visualize general graph data, but it's been pretty limited in terms of exposed API for vis.js (which is what it renders in) so I've been working on a more general full featured wrapper in Python that uses a fast graph library backend.

My test project is to visualize the repository as an interactive graph. It builds the html template in under a second right now and I'm planning on trying to make it something you can use to generate interactive repo graphs with.

It's still very WIP, but I think it's fun so I wanted to share.

Also, you can double click any node to have it open the source on GitHub. My goal is to make it host agnostic so you can just slap a repo url in there and it'll generate a graph with properly formatted links. I've got all the components exposed though, so you can manipulate how the link is generated as needed.

10
9
submitted 1 month ago by git@hexbear.net to c/programming@hexbear.net
11
16
submitted 1 month ago by git@hexbear.net to c/programming@hexbear.net
12
9
The pressure (daniel.haxx.se)
submitted 1 month ago by git@hexbear.net to c/programming@hexbear.net
13
25
Leave Me Behind (androidessence.com)
submitted 1 month ago by git@hexbear.net to c/programming@hexbear.net
14
9
submitted 1 month ago by git@hexbear.net to c/programming@hexbear.net
15
16
submitted 1 month ago by git@hexbear.net to c/programming@hexbear.net
16
7
submitted 1 month ago by git@hexbear.net to c/programming@hexbear.net
17
29
submitted 1 month ago by git@hexbear.net to c/programming@hexbear.net
18
5
Prolog Basics Explained with Pokémon (unplannedobsolescence.com)
submitted 1 month ago* (last edited 1 month ago) by AernaLingus@hexbear.net to c/programming@hexbear.net

This blog post introduces the basics of Prolog, then motivates and describes a project the author created where they built a Prolog database that allows them to easily make incredibly specific queries about Pokémon (which would be unwieldy in a relational database query language like SQL). For an idea of how powerful it is, here's one which "finds all the Special moves that Tornadus learns which are super-effective against any member of Justin’s team" (the Prolog database was set up to help the author in planning their teams for a Pokémon draft tournament):

?- justin(Target), learns(tornadus, Move), super_effective_move(Move, Target), move_category(Move, special).
   Target = charizardmegay, Move = chillingwater
;  Target = terapagosterastal, Move = focusblast
;  Target = alomomola, Move = grassknot
;  Target = scizor, Move = heatwave
;  Target = scizor, Move = incinerate
;  Target = runerigus, Move = chillingwater
;  Target = runerigus, Move = darkpulse
;  Target = runerigus, Move = grassknot
;  Target = runerigus, Move = icywind
;  Target = screamtail, Move = sludgebomb
;  Target = screamtail, Move = sludgewave
;  Target = trapinch, Move = chillingwater
;  Target = trapinch, Move = grassknot
;  Target = trapinch, Move = icywind
;  false.
?-
19
8
submitted 1 month ago by git@hexbear.net to c/programming@hexbear.net
20
16
submitted 1 month ago by git@hexbear.net to c/programming@hexbear.net
21
13
Programming Sucks (www.stilldrinking.org)
submitted 1 month ago by git@hexbear.net to c/programming@hexbear.net
22
36
submitted 2 months ago by git@hexbear.net to c/programming@hexbear.net
23
4
submitted 2 months ago* (last edited 2 months ago) by AernaLingus@hexbear.net to c/programming@hexbear.net

a laptop, then ported the same algorithm to a Commodore 64.

Very cool stuff. In an age of throwing ungodly amounts of compute at LLMs, it's nice to see someone approach a problem with the goal of making it as lightweight as possible. Like the author, the extreme resource limitations are one of the reasons that I love retro tech, since they breed ingenious solutions.

24
10
submitted 2 months ago by git@hexbear.net to c/programming@hexbear.net
25
3
submitted 2 months ago by git@hexbear.net to c/programming@hexbear.net
view more: next ›

programming

305 readers
3 users here now

  1. Post about programming, interesting repos, learning to program, etc. Let's try to keep free software posts in the c/libre comm unless the post is about the programming/is to the repo.

  2. Do not doxx yourself by posting a repo that is yours and in any way leads to your personally identifying information. Use reports if necessary to alert mods to a potential doxxing.

  3. Be kind, keep struggle sessions focused on the topic of programming.

founded 2 years ago
MODERATORS