this post was submitted on 16 Dec 2025
56 points (84.1% liked)

Selfhosted

53705 readers
1269 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.

  7. No low-effort posts. This is subjective and will largely be determined by the community member reports.

Resources:

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

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

Lately I have been using AI more and more in my codebase and that's been a bit of a hit and miss if you ask me.

I reckon it's an amazing tool that allows developers to truly optimise their workflow, however at times laziness take over and code reviews are not as frequent as they should be.

I really REALLY wanted to build something without using AI after having spent months and months getting a bit too complacent. And this is the first idea that came to mind. Of course to celebrate this occasion I went for a technology I hadn't used in almost a decade: jQuery!!!

You can find the repo here: https://github.com/fccview/ackchyually-ai
You can play around with the tool on fccview.github.io/ackchyually-ai

Few disclaimers:

  • I am a full stack javascript developer (with extensive knowledge of php and a very good grasp of shell). This means majority of the detection will be revolving around javascript, if you develop in a different language and you feel like you know AI patterns in that language PLEASE do create a pull request so we can make the detection even more accurate for other type of syntax!
  • The tool uses MY OWN metrics, this is doing what I usually do to see if something is (in my opinion) been made with AI and barely reviewed by a human. It's not gospel, it's not a scientific method, it's most definitely going to be flawed, so keep it with a grain of salt, it can always be improved and collaboration/community support will definitely help with it
  • I don't hate AI, on contrary I enjoy using it and I find value in not needing to "google it" whenever I hit a blocker, more times than not, AI has a valid solution that can be used, refined and applied properly. What I have mostly an issue with is people randomly generating code, not reviewing it and trying to sell you the moon when they barely understand the architecture of what they built
  • Please do not make this post a fight between pro/against AI individuals, that's not the aim of it

All the patterns I am using to identify possible AI code are here: https://github.com/fccview/ackchyually-ai/tree/main/data if you come up with more patterns/ideas and have more ideas on what to look for please reply here, open an issue and/or make a pull request, but at ONE CONDITION, do NOT use AI for this. It'd go against the core principle of this one pure little app I decided to build <3

top 12 comments
sorted by: hot top controversial new old
[–] shads@lemy.lol 11 points 14 hours ago (4 children)

I was trying to solidify a joke about beating up people who are pro-AI, but just can't get the timing right.

But I do have a question for someone who can apparently see things from both sides. Do you think that people's perceptions and engagement would be different if "AI" was marketed as natural language processing coding / programming expert system.

I feel like some of the visceral pushback against "AI" would be reduced if we didn't all have to pretend there was actual intelligence in operation. Plus it would seem more like the successor to context aware code completion, rather than the successor to the individual sat at the keyboard.

[–] fccview@lemmy.world 1 points 18 minutes ago

100% it would! I think the biggest issue around the AI hate is a total misunderstand of how it works, paired with people using it for the dumbest reasons, actually draining important resources when there's absolutely no need for it.

I think eventually it'll be inevitably regulated as the actual shortage of water we're seeing in the US is unmanageable, and once it does get regulated things will start working way better

p.s. i'm not talking about local models, I doubt these would ever be regulated and they SHOULDN'T, I'm talking about how many resources a company that allows AI usage should be able to utilise, mostly.

[–] meltedcheese@c.im 4 points 13 hours ago

@shads @selfhosted Agreed. Words carry baggage and #AI has a lot of baggage.

[–] thedeadwalking4242@lemmy.world 2 points 13 hours ago

I wish it want thrown around like it was AGI.

AI for ML systems has always kinda been a misleading term after it was co-oped by science fiction

[–] Cybersteel@lemmy.world -2 points 9 hours ago

AI is an evolutionary dead end and will be the death of humanity as we know it.

[–] irmadlad@lemmy.world 3 points 11 hours ago (2 children)

I share some of the same views you do about AI. I do use AI to help me with code. Not to develop and sell, just for my own personal use. So I tested out your ackchyually-ai. I had Grok create a docker compose to combine BorgBackup and BorgUI.

Result:

spoiler

#########################
# Services
#########################
services:

  # -------------------------------------------------
  #  Borg repository (data only)
  # -------------------------------------------------
  borg:
    image: ghcr.io/borgbackup/borg:latest
    container_name: borg_repo
    restart: always
    command: ["sleep", "infinity"]               # keep container alive
    volumes:
      - ./repo:/var/borg/repo                    # persistent repo
      - ./ssh:/root/.ssh:ro                     # optional SSH keys (read‑only)
    environment:
      # Uncomment if you want the repo to be encrypted by default
      # BORG_PASSPHRASE: "${BORG_PASSPHRASE}"
    networks:
      - backup_net

  # -------------------------------------------------
  #  Borgmatic – scheduled backup runner
  # -------------------------------------------------
  borgmatic:
    image: ghcr.io/borgmatic-collective/borgmatic:latest
    container_name: borgmatic
    restart: always
    depends_on:
      - borg
    volumes:
      - ./repo:/var/borg/repo                    # same repo as above
      - ./ssh:/root/.ssh:ro                     # SSH keys (read‑only)
      - ./borgmatic/config.yaml:/etc/borgmatic/config.yaml:ro
      - ./borgmatic/source_dirs:/source_dirs:ro # directories to back up
    environment:
      - BORG_PASSPHRASE=${BORG_PASSPHRASE}
    # Run borgmatic every day at 02:30 am using the built‑in cron of the image
    command: ["cron", "-f"]
    # If you prefer a host‑side cron, replace the command with “tail -f /dev/null”
    # and schedule `docker exec borgmatic borgmatic run` from the host.
    networks:
      - backup_net

  # -------------------------------------------------
  #  BorgWeb – Flask UI for browsing the repo
  # -------------------------------------------------
  borgweb:
    image: ghcr.io/borgbackup/borgweb:latest
    container_name: borgweb
    restart: always
    depends_on:
      - borg
    environment:
      - BORGWEB_REPO=/var/borg/repo
      - BORG_PASSPHRASE=${BORG_PASSPHRASE}
      # Optional basic‑auth (handled by the tiny built‑in Flask auth)
      - BORGWEB_BASIC_AUTH_USER=${BORGWEB_BASIC_AUTH_USER}
      - BORGWEB_BASIC_AUTH_PASS=${BORGWEB_BASIC_AUTH_PASS}
    volumes:
      - ./repo:/var/borg/repo
    # Expose the UI directly; you can map it to any host port you like.
    # 8080 = plain HTTP (for testing only)
    # 8443 = HTTPS if you put an external TLS terminator in front.
    ports:
      - "48443:8080"
    networks:
      - backup_net

  # -------------------------------------------------
  #  OPTIONAL: Minimal NGINX reverse‑proxy for TLS & auth
  #  (If you already have a front‑end proxy you can skip this block)
  # -------------------------------------------------
  nginx:
    image: nginx:alpine
    container_name: nginx_tls
    restart: always
    depends_on:
      - borgweb
    volumes:
      - ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro
      # If you have your own cert/key files, mount them here:
      # - ./certs/fullchain.pem:/etc/ssl/certs/fullchain.pem:ro
      # - ./certs/privkey.pem:/etc/ssl/private/privkey.pem:ro
    ports:
      - "443:443"
    networks:
      - backup_net

Then I ran it through your checker.

spoilerResults:

Result breakdown

Overall score

This is entirely made up by ME, it's not an official metric, so please don't take it as gospel.

There's a lot of AI generated code here, it's getting dangerously close to be sloppy. The ratio of comment to code is over 20%, this automatically pushes the score to 100% Comment ratio The amount of comments in AI generated code is borderline ridiculous. Comments are good, too many (often redundant) comments are just bloat.

34 comments for 89 lines of code. That's a ratio of 38%. The site assumes something is 100% AI generated if the ratio goes above 20%.

Interesting that comment code was the trigger apparently. Personally, I comment a lot mainly because my brain is shit, so it's very helpful. I haven't run the docker compose, but I might just do that to see if AI came close. I'm sure some of the experts here would find the compose file to be wrong in some nature or another.

[–] fccview@lemmy.world 1 points 22 minutes ago

Hey! Thank you for testing it out, I think in my head, even the most verbose of dev wouldn't leave >20% of comments in their codebase. The percentage works on a ratio of (commentsCount / linesOfCode) * 100 so it doesn't just flag "a lot of comments", it mostly checks for "too many comments", that said, the "use common sense" at the top needs to be taken quite seriously, for example if there's a majority of comments but none of the comments feel like written by AI, it's clearly just the developer being verbose :)

p.s. I find AI is pretty damn good at making docker compose files, it's probably gonna work just fine <3

[–] CrazyLikeGollum@lemmy.world 3 points 8 hours ago (1 children)

I'm far from an expert and have never setup borg, but I see some possible problems with that config, though I don't think I see anything that would cause it fail.

  • In the environment section of borg, borgmatic, and borgweb, the "BORG_PASSPHRASE" variable is used inconsitently, it either needs to be uncommented in borg or commented out in borgmatic and borgweb.

  • Networks: having a single "backup_net" network is less than ideal from a security standpoint. Nginx should probably be in it's own network (an ipvlan or macvlan network) in addition to the backup_net. backup_net should be isolated to the host that are running borg, while any communication into borg should be routed through nginx on its ip.

[–] irmadlad@lemmy.world 2 points 5 hours ago

Hey, thanks for the back-check. I'm an expert at nothing. I know just enough to get by or when something might look super squirrely. The experiment was to see OP's tool in action. I was just curious to see what would trigger a response. I wasn't pitting the accuracy of AI against OP's tool. I realize. even tho I use it, that AI can be inaccurate. Sometimes I'll pit a few of them against each other to see how each interpret the data. I even use it when creating music. I am clinically deaf, and there are some frequencies I just can't hear that well or at all. So I use AI in the mastering process. It's just for fun. I'm not looking to break into the biz.

[–] Sims@lemmy.ml 2 points 13 hours ago (1 children)

Great that you chose weights for the final evaluation. Black, and whitelists are just too ..0D/binary for any advanced use, and are unfortunately used everywhere.

[–] fccview@lemmy.world 1 points 21 minutes ago

Hi, yeah! For sure! Indeed the world is not black and white! But even with weight, take everything with a pinch of salt <3

[–] modeh@piefed.social 11 points 20 hours ago

That’s pretty neat, will play around with it whenever I get the chance later today