Skip to content

Piero Bosio Social Web Site Personale Logo Fediverso

Social Forum federato con il resto del mondo. Non contano le istanze, contano le persone

I currently have some availability for an additional freelance client.

Uncategorized
5 2 0

Gli ultimi otto messaggi ricevuti dalla Federazione
Post suggeriti
  • 0 Votes
    1 Posts
    4 Views
    so, day 1 #AdventOfCode, the #ruby solution is easy, and the #rust one too.I'm a bit sad rust doesn't seem to have integer subrange types a-la pascal (or I couldn't find them 🤷)rust important bits, if you want to criticize them :)https://gist.github.com/riffraff/7aa3fb332ae9e2d61783b671cf160361
  • 0 Votes
    1 Posts
    7 Views
    The #ocaml debacle with the ginormous slop #AI / #LLM "contributions" continues! It's round two, already! Oh no. With the same outcome, predictably. This time in the #julia community.https://discourse.julialang.org/t/ai-generated-enhancements-and-examples-for-staticcompiler-jl/134054/18The patience of the Julia people is absolutely immense here! I've huge respect for them after reading this (and the Ocaml people, only days ago).The fundamental issue seems to be that the guy attempting this novel approach to software development thinks the AI "understands" what it's doing. So even if showstopping nonsense in the AI-produced code is pointed out to him, he comes back with - oh well, yeah, the AI gets "lazy", or some other sort of narrative that rationalises the slop, and presumes the "AI" is, by definition, really understanding what's going on, and smart, and capable, and all that.Will there be no end to this nonsense? Each week the patience of a new set of #FOSS maintainers will be tested? It's Groundhog Day, but with all the quirkiness and charm removed?
  • 0 Votes
    1 Posts
    16 Views
    cross-posted from: https://lemmy.dbzer0.com/post/55501944 Hey, I’ve been kicking around an idea for a bot: it would look for fanfiction links shared in a server and keep track of which ones get shared the most. The concept: Track sites like AO3, FanFiction.net, ScribbleHub, etc. Count how often each link gets posted Commands to see the “top” links or which domains are tracked It’s just a rough idea, I haven’t built it yet. Curious if anyone thinks this would actually be useful or has tips for implementing it without overcomplicating things. import re import json import discord from collections import Counter from discord.ext import commands TOKEN = "YOUR_BOT_TOKEN" intents = discord.Intents.default() intents.message_content = True bot = commands.Bot(command_prefix="!", intents=intents) # Domain list you want to track (lower-case) TRACK_DOMAINS = { "archiveofourown.org", "fanfiction.net", "forum.questionablequesting.com", "forums.spacebattles.com", "forums.sufficientvelocity.com", "webnovel.com", "hentai-foundry.com", "scribblehub.com", } link_pattern = re.compile(r'https?://\S+') link_counter = Counter() def domain_of_url(url: str) -> str | None: try: # Extract domain part from urllib.parse import urlparse parsed = urlparse(url) domain = parsed.netloc.lower() # remove leading “www.” if domain.startswith("www."): domain = domain[4:] return domain except Exception: return None def save_links(): with open("links.json", "w") as f: # convert counts to dict json.dump(dict(link_counter), f) def load_links(): try: with open("links.json") as f: data = json.load(f) for link, cnt in data.items(): link_counter[link] = cnt except FileNotFoundError: pass @bot.event async def on_ready(): load_links() print(f"Bot is ready. Logged in as {bot.user}") @bot.event async def on_message(message): if message.author.bot: return links = link_pattern.findall(message.content) for link in links: dom = domain_of_url(link) if dom in TRACK_DOMAINS: link_counter[link] += 1 await bot.process_commands(message) @bot.command(name="links") async def links(ctx, top: int = 10): if not link_counter: await ctx.send("No links recorded.") return sorted_links = sorted(link_counter.items(), key=lambda x: x[1], reverse=True) display = sorted_links[:top] lines = [f"{link} — {count}" for link, count in display] await ctx.send("**Top links:**\n" + "\n".join(lines)) @bot.command(name="domains") async def domains(ctx): """Show which domains are tracked.""" await ctx.send("Tracked domains: " + ", ".join(sorted(TRACK_DOMAINS))) @bot.command(name="dump") async def dump(ctx): """For admin: dump full counts (might be large).""" if not link_counter: await ctx.send("No data.") return lines = [f"{link} — {cnt}" for link, cnt in sorted(link_counter.items(), key=lambda x: x[1], reverse=True)] chunk = "\n".join(lines) # Discord message length limit; you may need to split await ctx.send(f"All counts:\n{chunk}") @bot.event async def on_disconnect(): save_links() bot.run(TOKEN)
  • 0 Votes
    1 Posts
    10 Views
    🚀 Huge thanks to @revsys for being a Platinum sponsor of DjangoCon US 2025! https://www.revsys.com/ Their deep Django development & deployment expertise helps teams build incredible web applications. Excited to have them join us in Chicago!🎟️ In-person & online tickets: https://ti.to/defna/djangocon-us-2025#DjangoCon #Python #Django