Skip Navigation
UI differences are a big factor in the success/failure of decentralised federation of diverse platforms and content
  • IMO bridging or translation isn't federation per se. Also it seems unlikely that protocols would converge to that extent. In fact AP implementations are already different enough that even within the same protocol it's hard to represent all the different activities instances can present.

  • An Interview With Jack Dorsey
  • For me the weirdest part of the interview is where he says he doesn't want to follow anyone, that he wants the algorithm to just pick up on his interests. It's so diametrically opposed to how I want to intentionally use social networks and how the fedi tends to work that it's sometimes hard to remember there are people who take that view.

  • Too big to win
  • Kind of interesting, especially on the diagnosis of the problem. The proposed solutions seem way out there, though, as one might expect from the founder of Blackwater.

    Edit: Needless to say, I have no desire for imperialism to become more effective. But even in its own terms, the pro-market, private sector stuff is really odd and doesn't explain how all those rivals and enemies are doing so much better.

  • Question on holding related data in a struct.
  • Not sure I understand. What I'm trying to do is something like this:

    • Poll a stream which takes fedi events. Read player commands.
    • If an event comes from a known player, check which match they are into.
    • With that info, get their opponents/coplayers etc and perform the change of state in the game (send replies, next turn, etc).

    So what I have as a key is a player name (AP username) and from that I need to find which match they're in.

    There's nothing semantically useful about a match ID.

  • Question on holding related data in a struct.
  • Thanks, the RC is a possible approach. It seems to violate DRY a bit but maybe there's no way around it.

    The reason I had the players outside the match is that I need them there anyway, because when I get a player action I need to check in which match they are, who are their opponent(s) and so on. So even if they're in, they'll have to be out too as there are concurrent matches and the player actions come all through the same network stream.

  • Question on holding related data in a struct.

    I have a struct that looks like this:

    pub struct Game { /// A HashSet with the players waiting to play as account strings. lobby: HashSet<String>, /// capacity determines how many people a match contains. capacity: u8, /// A vector of ongoing matches. matches: Vec<Match>, /// HashSet indicating for each player which match they are in. players: HashMap<String, usize>, }

    I realised that this won't work because if there are 3 matches (0, 1, 2) and I remove 1 because it ends, the players that used to point at 2 will be pointing outside the vector or to an incorrect match.

    So I thought the obvious solution was to use a reference to the match: players: HashMap<String, &Match>. But this makes lifetimes very complicated.

    What's a good way to deal with a case like these where data are interrelated in the same struct?

    8
    RFC for Private Communities in Lemmy
  • I can think of alternatives. For example, the server could keep the user's private key, encrypted with a passphrase that the user must have. So key loss wouldn't be an issue. (Yes, passphrase loss might, but there are lots of ways to keep those safely already, compared to key material which is difficult to handle.)

  • Okay hear me out. What if we all chipped in 5 bucks to ? How many people would it take to fund it well enough so they don’t have to do layoffs? I get it, the FOSS community wants the “F” part
  • Security and performance are hard to measure but it's at least questionable that they're behind in either.

    AI has many good uses, for example the local translation capability that allows for privacy-preserving translations of websites is AI and already in Firefox, and makes it possible to translate in environments that do not allow sending data out for security reasons.

  • Seppo: Personal Social Web
  • So, not super sure what this is or how this works. Is the idea that you run the cgi, it sets up static files, and it responds to AP requests like follows, mentions, boosts and such? I realise lots of people don't like long docs but I didn't really understand the use case very well.

  • A poll: are followers-only posts on Mastodon public?
  • On my instance, the following control measures apply:

    • Only public posts are visible through the web interface.
    • Only public posts appear on RSS.
    • Following requires approval.
    • Authorised fetch is required.

    So I think I have reason to feel fairly strongly that follower only posts are not public, and even unlisted posts are reasonably restricted.

  • Israel’s Comically Bad Disinfo Proves They’re Losing PR War
  • I don't get why states do this. Lie? Yes, that makes sense. But lie so badly it's inevitable they get caught? A lot of people, I would think, will now also have qualms believing anything coming from them, even things that might be true.

  • Spain’s Socialists reach gov’t coalition deal with hard-left party
  • Hypothetically? Maybe, but it seems extremely unlikely. Even if the referendum would have run normally back then, what would have happened next?

    In fact, the declaration of independence lasted seconds, because anyone who knows anything can realise the extreme infeasibility of a unilateral declaration and all it would entail.

    that said, if the Spanish state is so fragile a vote could split it, then it should probably split.

  • Combining native-windows-gui and tokio

    Hi there,

    I'm trying to do some native windows rust programming. I'm using native-windows-gui and native-windows-derive to do it, but if I try to mix that with tokio, I get the following:

    No entry point found error for GetWindowSubclass. On console, I get:

    error: process didn't exit successfully: `C:\source\myprojectanem\target\debug\myprojectname.exe` (exit code: 0xc0000139, STATUS_ENTRYPOINT_NOT_FOUND)

    If I change

    #[tokio::main] async fn main() {

    to:

    fn main() {

    The problem goes away, but obviously I can't use tokio then.

    Any clue what the problem is and how to fix it?

    5
    Best way to enforce lineal sequence of operation in async code?

    Hi there,

    I'm working on a bot to do social games on the fedi, and using the mastodon-async crate for communicating with the ActivityPub server in question. At the moment I'm using tokio mt as a runtime, though I'm new at async so if you think I shouldn't let me know.

    The pattern I want to implement is the following:

    • At any given time, a user sends a "play" message to the bot.
    • If the player list is empty, the player is added to it awaiting someone else.
    • Otherwise, the bot checks if there are enough players on its list (who have previously sent a play message). For some games, enough is 1, since it's a 2-player game, for some it's 3 or more.
    • If there are enough players, play commences. list is cloned for that match, then emptied so other players can get in.

    What I'm not very clear is how to keep this list to assure that sequence will be respected. I.a., if two play messages come reasonably quick together, I want one to be processed, then entered on the list, or get the match to start; then the other to get processed.

    My current thoughts:

    • I could use a channel that receives the player accounts. When a new player is added, it performs the logic.
    • I could use a mutex with a list (or an option player value for the degenerate case of 2-player games).

    Any thoughts on what the reasonable thing to do is here? I'm very new to async and while I realise there's probably lots of ways to do this, they're not all equally ergonomic and I want to avoid myself future pain.

    4
    The Military Recruiting Crisis: Even Veterans Don’t Want Their Families to Join
    www.wsj.com The Military Recruiting Crisis: Even Veterans Don’t Want Their Families to Join

    The Pentagon is scrambling to retain the main pipeline for new service members as disillusioned families steer young people away. This article is part of a series examining the problems confronting America’s military.

    The Military Recruiting Crisis: Even Veterans Don’t Want Their Families to Join
    0
    InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)MO
    modulus @lemmy.ml

    Interested in the intersections between policy, law and technology. Programmer, lawyer, civil servant, orthodox Marxist. Blind.

    -----

    Interesado en la intersección entre la política, el derecho y la tecnología. Programador, abogado, funcionario, marxista ortodoxo. Ciego.

    Posts 4
    Comments 60