[-] Ategon@programming.dev 4 points 2 years ago* (last edited 2 years ago)

Ill be submitting some logos and another banner that im making in gimp later in the week

Edit: exams are pain, will do that before the end of the month

[-] Ategon@programming.dev 4 points 2 years ago* (last edited 2 years ago)

I dug through the code and turns out the post read table does store when its read (with number of comments when it was read stored in a person post aggregates table), it just only stores it for people from your instance so I cant get accurate numbers from all of lemmy (and why it seemed like there was a low amount)

[-] Ategon@programming.dev 4 points 2 years ago

[Rust] 11157/6740

use std::fs;

const m: [(&str, u32); 10] = [
    ("zero", 0),
    ("one", 1),
    ("two", 2),
    ("three", 3),
    ("four", 4),
    ("five", 5),
    ("six", 6),
    ("seven", 7),
    ("eight", 8),
    ("nine", 9)
];

fn main() {
    let s = fs::read_to_string("data/input.txt").unwrap();

    let mut u = 0;

    for l in s.lines() {
        let mut h = l.chars();
        let mut f = 0;
        let mut a = 0;

        for n in 0..l.len() {
            let u = h.next().unwrap();

            match u.is_numeric() {
                true => {
                    let v = u.to_digit(10).unwrap();
                    if f == 0 {
                        f = v;
                    }
                    a = v;
                },
                _ => {
                    for (t, v) in m {
                        if l[n..].starts_with(t) {
                            if f == 0 {
                                f = v;
                            }
                            a = v;
                        }
                    }
                },
            }
        }

        u += f * 10 + a;
    }

    println!("Sum: {}", u);
}

Link

[-] Ategon@programming.dev 4 points 2 years ago

added functionality for the two rules

  • getting all communities with a certain slug
  • exclude instance with domain X from above rule

was running into rate limits when trying to check every single linked instance so ive manually put in the larger ones for now

[-] Ategon@programming.dev 4 points 2 years ago

that only works for certain file types afaik. I know in 4.1 there was one time I messed with a files location and had to update manually, forget which file type it was though

[-] Ategon@programming.dev 4 points 2 years ago

Update: made !test@programming.dev and hid it from the feeds for an in-instance testing area

[-] Ategon@programming.dev 4 points 2 years ago

I added code block support to lemmy-ui so if 0.19 comes out before then yes

If not then no but I can try to figure out a solution

[-] Ategon@programming.dev 4 points 2 years ago

starts december 1st

[-] Ategon@programming.dev 4 points 2 years ago* (last edited 2 years ago)

didnt realize I added the programming community to the communities that triggers the bot haha

its relevant to this post but not crosspost relevant, will tweak the triggers

[-] Ategon@programming.dev 4 points 2 years ago

The one issue I ran into is alternate UIs other than lemmy-ui dont seem to collapse crossposts in the post feed so the recommendation of cross-posting everything floods people not using lemmy-ui

Going through and making issues in all of their repositories

[-] Ategon@programming.dev 4 points 2 years ago

yeah although I havent pushed changes to a repo recently, ill do that and share in a sec

figured having it as a message also makes it a spot where readers can see communities for that topic as well

[-] Ategon@programming.dev 4 points 2 years ago

It was put into place mostly due to that since a bunch of those communities were made with no limitations. We can look into changing if it seems to be limiting the creation of some communities but so far has just been limiting mostly topic hyperspecific communities so that the more general communities get used before splitting off into subcommunities

1
Guess the Language: #8 (programming.dev)
submitted 2 years ago* (last edited 2 years ago) by Ategon@programming.dev to c/trivia@programming.dev
function isPalindrome(str)
    str = str:gsub('%s', ''):lower()
    return str == str:reverse()
end

local input = "A man a plan a canal Panama"
if isPalindrome(input) then
    print("It's a palindrome!")
else
    print("It's not a palindrome.")
end

Testing out a new voting system of using strawpoll so that vote totals can be hidden. A thing I noticed in some of the previous rounds was that people would pile on to the same option. Loses a bit of the ease of vote but shouldnt be too bad since you can just instantly vote after you go to the site

You can vote for what you think it is here: https://strawpoll.com/xVg7j6Q5Rnr

Voting ends in 12 hours and then ill post here with the results. You can talk about it below but if you want to talk about the correct answer put it in spoiler tags

36

Hey everyone! Just wanted to create a post on different things going on in the instance

Matrix Space

Programming.dev now has a matrix space at https://matrix.to/#/#p.d:matrix.org . We had a matrix room before but a space is essentially a collection of rooms so we have sections for different communities, a support room, etc. If you manage a community and want a matrix room for it listed feel free to reach out to me

Instance Rules

I've collected together our instance rules and extended it to be a bit more clear. Here are the rules (and they'll be going on the sidebar as well)

  • Dangerous content on the instance and federated instances including phishing, spamming, brigading, unmarked nsfw, doxing, etc. is not allowed and subject to be handled by the mods or admins
  • Hate speech is not allowed on the instance or in instances federated with it. This includes remarks directed at sex, gender, orientation, disabilities, etc.
  • Other content is up to the discretion of the mods of the community its posted in
  • If a community has no dedicated mods it will be managed by instance admins until a mod team is found
  • If a community mod team has gone inactive and no longer maintains a community new mods may be added
  • Any federated communities that have shown they will not enforce these rules while their content shows up on our feeds will have their community removed from our instance
  • Instances that continually encourage this type of behavior or are built to only do this type of behavior are subject to be defederated
  • Certain content may be hidden from our all feed including politics and bot spam. (Not currently implemented due to lemmy limitations but will be eventually). This means it won't show up in all but you can still view it and subscribe to the communities to have it show in your subscribed feed
  • Bots interacting in our communities must follow our Programming.dev bot guidelines (see below)
  • If an instance is not being managed (due to owners being gone, etc.) it is subject to be defederated

Things that do not follow these rules will be handled. This currently includes

  • Communities in exploding-heads will be removed from our instance
  • Rammy.site will be defederated from due to the site owner being MIA

Bot Guidelines

  1. Mark Bots as Bots Bot accounts should be marked that they are a bot using the checkbox in the user settings. This includes any automation in an account (if you automate part of your personal account, put what the automation is in your bio so people know)
  2. Put contact info The owner of the bot and some way to contact them must be in the bot's bio (unless its an automated personal account, in that case the account itself it the way to contact)
  3. Use mentions as prefix If a bot has commands it should use its mention as a prefix. (This will allow different bots to use the same commands without interfering with each other)
  4. Dont spam Bots should not spam posts or comments. (If a bot command has been used its fine to do a response but dont drown out non bot posts in the local new sort.) Certain cases are unavoidable such as if you want to get a bot posting weekly threads in different communities at the same time but in those cases please contact me first to get it approved
  5. Allow mods to opt in Bots participating in a community should be opt in so communities can choose what bots they want. If you want a bot to be allowed in a community please contact the moderators of that community first. EXCEPTION: If a bot is deemed to be a well behaving bot that brings net good to the instance it can override this rule as long as it has been approved by an admin. This can include things such as a tldr bot, remindme bot, link fixer bot, piped link converter bot, etc. If a bot has overriden rule 5 with this exception community moderators should still be able to opt out of the bot

These guidelines should bring us up to parity with lemmy.world along with allowing a bit more leeway within the instance since there has been some nice bots getting made that I dont want unfairly punished

If you have a bot you want whitelisted for the entire instance for the rule 5 exception feel free to dm me here or on matrix


And that's everything for this month. Progress on some features for the site is still ongoing. My laptop is currently being repaired but once I get it back I'll do a bunch of progress and share some updates here

If you have any suggestions for the rules, bot guidelines, new site features, etc. feel free to throw them down below

28
submitted 2 years ago* (last edited 2 years ago) by Ategon@programming.dev to c/godot@programming.dev

Verses of Enchantment

Koi Zen: Opposite Colors

SokoSolitaire

Vanaris Tactics

Broken Lens

Endless Adventure

Gozen Video Editor

Death Unphased

Maces and Dices

Engine Roar

17

Continuation of lukky's fps tutorials. First one was posted here https://programming.dev/post/1433628

23
12
1

Upvote a comment to vote, you can reply on an option with more details

38
  1. Constraint Solving
  2. Deformable Mesh
  3. Wiggle bone
  4. WigglyAppendage2D
  5. Third person camera
  6. Auto Layout
  7. Panku Console
  8. Mirror
  9. RL Agents
  10. Inventory System
17
1
27
21
view more: โ€น prev next โ€บ

Ategon

0 post score
0 comment score
joined 3 years ago
MODERATOR OF