Skip Navigation

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/)CO
Posts
0
Comments
375
Joined
5 yr. ago

  • Nix does something like this with the protocol specifier: e.g. git+https://...

    I'm not sure what name means here exactly, but it might make sense to treat that separately, like git remotes:

    tool add [name] git+https://foo

  • The whole thing is built around pulling binary packages from servers, and there's no consistent way of building those things from source.

    It's extremely difficult to package anything non-trivial without referencing those binary blobs.

    They had to build this whole custom thing (https://github.com/dotnet/dotnet) just to make the SDK itself buildable from source, and most releases still have some binary dependencies. They only did it for the SDK so it could be packaged in Debian, etc.

  • All the core parts of dotnet (e.g. roslyn) seem to be built that way. I find them very frustrating to work on. Between that and the whole nuget thing being somewhat FOSS unfriendly, I'd steer people away from C#.

  • I don't have any previous knowledge of this at all, but from reading the docs, nothing you're describing sounds wrong.

    A u32 selector will match 4 bytes (u32 meaning unsigned 32bit presumably, which is 4 bytes).

    It makes sense that you'd only be able to configure the matches on 4 byte intervals, because keeping them aligned may make the implementation simpler and more efficient. You can still match any set of bits this way.

    Perhaps you could describe what you're trying to match exactly and the selectors you tried.

    Edit: also if you look at 'raw payload expressions' in nft: https://netfilter.org/projects/nftables/manpage.html

    That seems like it would do what you want, and you can actually access the ethernet header in a documented way. You have to switch to nft though.

  • They are now going to be an advertising driven company, regardless of what tier you're on.

    Instagram has a 10 euro/mo premium to remove ads, and they still would rather you take the ads. How long before Netflix starts nagging you to save money by turning ads on?

  • I get why you'd do that for the flight control stuff, but is there a reason to think that the loose-bolts/side-falling-off thing is specific to this plane? It seems like any new Boeing plane would be vulnerable to the same process failures.

    I guess they are 3/4 of the planes Boeing delivers, and the only ones likely to be used short haul.

  • It's not just the visible complexity in this one file. The point of it is to keep a subscriber count in sync, but you have that code I referenced above, plus:

    LinkPersonCommunityCreatedEvent LinkPersonCommunityDeletedEvent LinkPersonCommunityCreatedPublisher LinkPersonCommunityDeletedPublisher

    And then there are things like LinkPersonCommunityUpdated[Event/Publisher] which don't even seem to be used.

    This is all boilerplate IMO.

    And all of that only (currently) serves keeping that subscriber count up to date.

    And then there's the hidden complexity of how things get wired up with spring.

    And after all that it's still fragile because that event is not tied to object creation:

     
        
      @Transactional
      public void addLink(Person person, Community community, LinkPersonCommunityType type) {
    
        final LinkPersonCommunity newLink = LinkPersonCommunity.builder().community(community)
            .person(person).linkType(type).build();
        person.getLinkPersonCommunity().add(newLink);
        community.getLinkPersonCommunity().add(newLink);
        linkPersonCommunityRepository.save(newLink);
        linkPersonCommunityCreatedPublisher.publish(newLink);
      }
     
      

    And there's some code here:

    https://github.com/sublinks/sublinks-api/blob/main/src/main/java/com/sublinks/sublinksapi/api/lemmy/v3/community/controllers/CommunityOwnerController.java#L138C31-L138C50

     
        
        final Set<LinkPersonCommunity> linkPersonCommunities = new LinkedHashSet<>();
        linkPersonCommunities.add(LinkPersonCommunity.builder().community(community).person(person)
            .linkType(LinkPersonCommunityType.owner).build());
        linkPersonCommunities.add(LinkPersonCommunity.builder().community(community).person(person)
            .linkType(LinkPersonCommunityType.follower).build());
    
        communityService.createCommunity(community);
    
        linkPersonCommunityRepository.saveAllAndFlush(linkPersonCommunities);
    
      

    that is able to bypass the community link service and create links in the repository directly, which would presumably not trigger than event.

    Maybe there's a good reason for that, but it sure looks fragile to me.

  • Here's an example:

    https://github.com/sublinks/sublinks-api/blob/main/src/main/java/com/sublinks/sublinksapi/community/listeners/CommunityLinkPersonCommunityCreatedListener.java

    IMO that's a lot of code (and a whole dedicated file) just to (magically) hook a global event and increase the subscriber count when a link object is added.

    The worst part is that it's all copy/pasted into a neighbouring file which does the reverse:

    https://github.com/sublinks/sublinks-api/blob/main/src/main/java/com/sublinks/sublinksapi/community/listeners/CommunityLinkPersonCommunityDeletedListener.java

    It's not the end of the world or anything, I just think good code should surprise you with its simplicity. This surprises me with its complexity.

  • The one I was able to test on qemu was a reliable failure of memory management syscalls triggered by a certain usage pattern. Unfortunately yours sounds like it's probably hardware dependent. People in that Reddit thread mentioned video decoding, so you could try hammering that.

    The nice thing about bisecting is that it's mostly logarithmic, so doubling the commits should only take one extra step. I'd be surprised if you had to do more than a 10-12 steps.

    You may already have a good kernel config, but for this sort of thing I usually use make localmodconfig. That'll build all the modules that are loaded when you run it, which can cut down on compile time massively.

  • I did this recently and it was extremely quick to bisect and debug, but I was lucky enough to have a simple repro that worked in the emulator.

    I think if I were you I'd try to repro on bleeding edge first. Then if it's still broken, I'd try to get the repro time down as much as possible and automate it. Then I'd either bisect on qemu if possible, or bare metal.