I’m the administrator of kbin.life, a general purpose/tech orientated kbin instance.

  • 0 Posts
  • 238 Comments
Joined 1 year ago
cake
Cake day: June 29th, 2023

help-circle

  • It’s not how ActivityPub (at least Lemmy/*bin servers) works. There isn’t so far as I’ve ever seen an API that allows for this within ActivityPub (now specific to Lemmy/*bin implementations there’s the API the browser/apps use that must provide this, but that’s not ActivityPub). It actually looks to be cleverly designed to prevent it. It might look like backfilling is happening because old stuff appears, but there are reasons for this.

    How it works from my experience (I did some work on the federation in kbin a year or so ago).

    • Instance A subscribes to community B hosted on Instance C.
    • Instance C notes this and does nothing. No previous content is sent, only future activities will be.
    • User on Instance D already subscribed to community B upvotes a comment on a post in community B.
    • Instance D sends the activity to Instance C.
    • Instance C sends the activity to Instance A.
    • Instance A gets the notice of the upvote, but realises it has no context for the upvote. But luckily the upvote has the comment ID of the comment that it was related to. So, now Instance A makes a request for the comment from Instance C.
    • Instance A receives the response from Instance C. But it turns out that comment was in reply to another comment. But the comment contains the ID of the parent comment. So Instance A requests that comment (and any parent comments until it gets the parent post).
    • By now Instance A has the information about the like, all comments from the liked comment to the post. These are saved to the database and will appear on the local system.
    • For each of the likes, comments and posts. If the user isn’t known locally the profile will also be fetched from their instance and stored locally.

    And so old posts and comments will begin to appear as activities linked to them happen. But there isn’t a method to ask for “all the posts in community X” using activity pub. I remember because I was specifically looking for this a year or so ago. It let’s you see the parent object but not any children.

    Maybe Mastadon etc does it different? No idea.

    And all of this is moot because if I block a User Agent, or I block an AS number/IP block. They’re not getting anything either by ActivityPub or scraping unless they change User Agent, AS number, or both.



  • But, they aren’t. They’re not after Activitypub specifically. They’re scraping the whole internet, most of them using clear bot User Agents. So, I routinely block their bots because the AI ones are usually hitting you multiple times a second non-stop. If they started making fake Activitypub nodes they would not be scraping as a bot, and they would want specifically fediverse data. Important to note here though, an Activitypub node doesn’t “collect” data, they subscribe (to mastadon users/hashtags or communities) and then get new data delivered to them. So they wouldn’t get the old stuff.

    Having said that, I’ve seen some obvious bots using genuine browser user agents on IP addresses from certain very large Chinese companies. For those I just blocked their whole AS number.





  • I don’t think it’s rose-tinted glasses really. I think it’s just the change in dynamic. It was definitely different during the “real” classic times (I would say classic to Wrath).

    In 2005 when I started playing you needed to group up to get things done really. When you did this you met people. You talked, not with a microphone, but you would be talking. You’d get to know people, they’d invite you to dungeon groups and vice-versa, it would widen both of your in game circles and so on.

    When I got to the position to raid, I was on an RP-PvP realm and while there were raiding guilds, many people were in smaller guilds that were either role-playing or guilds of friends. So, there were often raiding groups. I was in one of these, and we had our own guild chat-esque thing that everyone in the group could chat through and of course raids were mandatory voice. Because generally you did need to have communications to raid. This increased your in game circle too.

    I still speak to some people now, on social media in various forms that I played the game with in 2005-2010. Some I met, others I never did. I’ve not really played retail much for a while now. But, it’s not the same. To an extent, neither is classic now.

    Now, probably an unpopular opinion because I think a lot of people think Blizzard’s actions led to this change in community spirit. I actually think it’s the other way round. I think they saw their player-base changing, and adjusted the game to suit. The side effect is that it put off some of those with a more social gaming mindset for good. But, it would have happened anyway.

    Times change, and they just rolled with it.


  • OK, look back at the original picture this thread is based on.

    We have two situations.

    The first is a dedicated system for providing navigation and other subsystems for a very specific purpose, with very specific hardware that is very limited. An 8 bit CPU with a very clearly known RISCesque instruction set, 4kb of ram and an bus to connect devices.

    The second is a modern computer system with unknown hardware, one of many CPUs offering the same instruction set, but with differing extensions, a lot of memory attached.

    You are going to write software very differently for these two systems. You cannot realistically abstract on the first system, in reality you can’t even use libraries directly. Maybe you can borrow code from a library at best. On the second system you MUST abstract because, you don’t know if the target system will run an Intel or Amd CPU, what the GPU might be, what other hardware is in place, etc etc.

    And this is why my original comment was saying, you just cannot compare these systems. One MUST use abstraction, the other must not. And abstractions DO produce overhead (which is an inefficiency). But we NEED that and it’s not a bad thing.


  • Exactly my point though. My original point was that you cannot compare this. And the main reason you cannot compare them is because of the abstraction required for modern development (and that happens at the development level and the operating system you run it on).

    The Apollo software was machine code running on known bare metal interfacing with known hardware with no requirement to deal with abstraction, libraries, unknown hardware etc.

    This was why my original comment made it clear, you just cannot compare the two.

    Oh one quick edit to say, I do not in any way mean to take away from the amazing achievement from the apollo developers. That was amazing software. I just think it’s not fair to compare apples with oranges.


  • r00ty@kbin.lifetoProgrammer Humor@lemmy.mlProgress!
    link
    fedilink
    arrow-up
    4
    arrow-down
    8
    ·
    12 days ago

    It does. It definitely does.

    If I write software for fixed hardware with my own operating system designed for that fixed hardware and you write software for a generic operating system that can work with many hardware configurations. Mine runs faster every time. Every single time. That doesn’t make either better.

    This is my whole point. You cannot compare the apollo software with a program written for a modern system. You just cannot.


  • r00ty@kbin.lifetoProgrammer Humor@lemmy.mlProgress!
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    12 days ago

    Wait a second. When did I say abstraction was bad? It’s needed now. But when you are comparing 8bit machine code written for specific hardware against modern programming where you MUST handle multiple x86/x86_x64 cpus, multiple hardware combinations (either via the exe or by the libraries that must handle the abstraction) of course there is an overhead. If you want to tell me there’s no overhead then I’m going to tell you where to go right now.

    It’s a necessary evil we must have in the modern world. I feel like the people hating on what I say are misunderstanding the point I make. The point is WHY we cannot compare these two things!


  • r00ty@kbin.lifetoProgrammer Humor@lemmy.mlProgress!
    link
    fedilink
    arrow-up
    9
    arrow-down
    4
    ·
    12 days ago

    Except it’s not nonsense. I’ve worked in development through both eras. You need to develop in an abstracted way because there are so many variations on hardware to deal with.

    There is bloating for sure, and of course. A lot is because it’s usually much better to use an existing library than reinvent the wheel. And the library needs to cover many other use cases than your own. I encountered this myself, where I used a Web library to work with releases on forgejo, had it working generally, but then saw there was a library for it. The boilerplate to make the library work was more than I did to just make the Web requests.

    But that’s mostly size. The bloat in terms of speed is mostly in the operating system I think and hardware abstraction. Not libraries by and large.

    I’m also going to say legacy systems being papered over doesn’t always make things slower. Where I work, I’ve worked on our legacy system for decades. But on the current product for probably the past 5-10. We still sell both. The legacy system is not the slower system.


  • I did a routine upgrade on my mbin server, where I had an old version with changes I made myself.

    Well turns out I upgraded something (probably redis) that broke symfony that broke everything.

    So I had a fun afternoon upgrading to the latest mbin version. I mean I needed to anyway but my hand was forced.

    Yep sometimes an innocent looking update will change your weekend plans.

    Anyways, any reason not to use ssh?


  • r00ty@kbin.lifetoProgrammer Humor@lemmy.mlProgress!
    link
    fedilink
    arrow-up
    32
    arrow-down
    3
    ·
    12 days ago

    It’s a different world now though. I could go into detail of the differences, but suffice to say you cannot compare them.

    Having said that, Windows lately seems to just be slow on very modern systems for no reason I can ascertain.

    I swapped back to Linux as primary os a few weeks ago and it’s just so snappy in terms of ui responsiveness. It’s not better in every way. But for sure I never sit waiting for windows to decide to show me the context menu for an item in explorer.

    Anyway in short, the main reason for the difference with old and new computer systems is the necessary abstraction.




  • All of this is layman with some basic understanding only.

    So, on the one hand in our galaxy alone there are between 100 and 400 billion stars (wikipedia), now a lot of those have no planets, but of course a lot have many more than our system does. So at least the same number in planets. There’s a good chance there’s more than one planet capable to supporting life among that number.

    In fact as we improve our ability to observe our galaxy we are able to verify more and more viable planets and even a reasonable number that are similar to our own planet.

    This means that there’s definitely going to be a reasonable chance that somewhere, life has evolved to similar or beyond our level already.

    But, this for sure doesn’t mean there’s any reason to expect visitors. That’s because even if they can travel at the speed of light, it’s still going to be thousands of years for the majority of them to reach us, provided they even choose to come to us. Because, from where they are they wouldn’t be able to make out our radio signals, nor likely any other signs of life. So we’d be one of many “potentially live bearing” planets.

    So, just my opinion. I think the chance of life being out there is reasonably high, the chance of actually being visited (assuming it holds true that we cannot travel faster than light) is probably very very low.


  • Sort of when it clicked for me, was when I realized that your code needs to be a tree of function calls.
    I mean, that’s what all code is anyways, with a main-function at the top calling other functions which call other functions. But OOP adds a layer to that, i.e. objects, and encourages to do all function calls between objects. You don’t want to do that in Rust. You kind of have to write simpler code for it to fall into place.

    Yes, this ties in with what I’m saying though. You need a paradigm shift in your design philosophy, which is hard when you come from a Cx background.

    I also think that in OO there shouldn’t be much cross contamination. It happens (and it happens a lot in my personal projects to be fair) but when well designed it shouldn’t need to be. In C# for example it should be the case that rather than a function owning a resource, a class should. So when using an object between classes you take it as a reference from a method in one class and pass it into a method to another class rather than call that class and make it a dependency of that class too. In this way you would have a one way dependency, rather than a two way.

    This kind of thinking has moved into creating objects in rust. Also I think yes within a same class the idea of a function (that isn’t static) accepting an object that is part of the class that was returned by another function in the case class feels very wrong from a Cx style point of view. If we knew we were going to do that, we’d just make it a class level variable and use it in both functions.

    Like I say, just another way of thinking and I’m not there yet.


  • The bingo one actually uses crossbeam channels instead of mutexes, so that’s nice. I haven’t looked too closely at it though.

    The C# original uses the equivalent of read/write locks. But I found it problematic to work the same way in rust and then discovered the communication option was far easier to implement and actually avoids holding up threads. So went with that. Much easier and much faster in execution I think.

    I don’t think you can do too much about the Spectrum one if you want to keep the two threads, but here’s what I would change related to thread synchronization. Lemmy doesn’t seem to allow me to attach patch files for whatever reason so have an archive instead… dblsaiko.net/pub/tmp/patches.tar.bz2 (I wrote a few notes in the commit messages)

    In reality I’m never likely to remake the CPU project in rust. Firstly because I’d need to entirely re-engineer it because it’s extensively using hierarchical classes, which just doesn’t work the same way in rust. And I’m not sure traits would allow me to do things in even close to the same way. But if it were to work with a CPU emulator they need to share the memory, and also the CPU needs its own thread.

    So basically it’s channels indexed by channel number and name? That one is actually one of the easy cases. Store indices instead:

    This was something I was thinking about the other evening. I needed to get the index to remove some other data anyway and wondered if I’d be better off having a master vector and usize lookups for that data store. It’s one extra lookup, but by index it’s the tiniest and the speed isn’t a real issue anyway. It’s replacing perl scripts pulling data from mysql. It couldn’t possibly run slower than that :P

    Thanks for the commentary though and I think I’m going to make the changes to use indices to lookup data. I wanted to re-order the way things are done a bit anyway. The problem I see potentially is that the lookups probably need to be regenerated every time I delete something. But actually I think that since it is rebuilt from a file on load. Maybe I just remove the items from the lookups and leave them in the vector. Since next run they would be gone anyway.