• 3 Posts
  • 49 Comments
Joined 2 years ago
cake
Cake day: July 2nd, 2023

help-circle








  • It’s the capability of a program to “reflect” upon itself, I.E. to inspect and understand its own code.

    As an example, In C# you can write a class…

    public class MyClass
    {
        public void MyMethod()
        {
            ...
        }
    }
    

    …and you can create an instance of it, and use it, like this…

    var myClass = new MyClass();
    myClass.MyMethod();
    

    Simple enough, nothing we haven’t all seen before.

    But you can do the same thing with reflection, as such…

    var type = System.Reflection.Assembly.GetExecutingAssembly()
        .GetType("MyClass");
    
    var constructor = type.GetConstructor(Array.Empty());
    
    var instance = constructor.Invoke(Array.Empty());
    
    var method = type.GetMethod("MyMethod");
    
    var delegate = method.CreateDelegate(typeof(Action), instance);
    
    delegate.DynamicInvoke(Array.Empty());
    

    Obnoxious and verbose and tossing basically all type safety out the window, but it does enable some pretty crazy interesting things. Like self-discovery and dynamic loading of plugins, or self-configuration of apps. Also often useful when messing with generics. I could dig up some practical use-cases, if you’re curious.




  • JakenVeina@lemm.eetoGaming@lemmy.zipwould I enjoy tunic?
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    8 months ago

    It sure sounds like you would like it. I will say that for me, everything about the game is fantastic, except for the combat, which is kinda terrible. Especially the boss fights. Feels to me like they’re trying to mimic a souls-like style, but really really overshot on difficulty.

    Basically, I say go for it, but don’t hesitate to drop the difficulty settings, if you’re like me.

    Also, get yourself a physical notepad. Yeah, I kind of agree that if note-taking and such is intended as part of the game, there should be a venue to support that in-game, but there isn’t really.

    Also, also, don’t feel bad about having to look up some stuff for the really late/post-game puzzles. One thing they toom WELL from Dark Souls is the idea of puzzles that are really made to be solved by the collective wisdom of the community, not just you.

    Also, also, also, don’t disregard the language puzzle, completely. I did, and when I looked it up later, I wish I hadn’t I wish I’d at least have given it a shot, for myself.

    Good luck!





  • Generally speaking, fault protection schemes need only account for one fault at a time, unless you’re a really large business, or some other entity with extra-stringent data protection requirements.

    RAID protects against drive failure faults. Backups protect against drive failure faults as well, but also things like accidental deletions or overwrites of data.

    In order for RAID on backups to make sense, when you already have RAID on your main storage, you’d have to consider drive failures and other data loss to be likely to occur simultaneously. I.E. RAID on your backups only protects you from drive failure occurring WHILE you’re trying to restore a backup. Or maybe more generally, WHILE that backup is in use, say, if you have a legal requirement that you must keep a history of all your data for X years or something (I would argue data like this shouldn’t be classified as backups, though).