Nemokosch
Nemokosch
Explore posts from servers
SIASapphire - Imagine a framework
Created by Nemokosch on 8/5/2024 in #sapphire-support
Statefulness and data sharing for Pieces
I haven't used Spring but I have used some ASP.NET Core and I'm pretty sure it's not like this. Everything is instantiated and passed around.
52 replies
SIASapphire - Imagine a framework
Created by Nemokosch on 8/5/2024 in #sapphire-support
Statefulness and data sharing for Pieces
you would never import or export a variable
52 replies
SIASapphire - Imagine a framework
Created by Nemokosch on 8/5/2024 in #sapphire-support
Statefulness and data sharing for Pieces
In Java, this dichotomy doesn't really exist. One file is one class. The static parts are plain singletons
52 replies
SIASapphire - Imagine a framework
Created by Nemokosch on 8/5/2024 in #sapphire-support
Statefulness and data sharing for Pieces
to be frank, I don't like this confusion between hard singletons (like a cached package) and object instances that happen to be the only one of their kind
52 replies
SIASapphire - Imagine a framework
Created by Nemokosch on 8/5/2024 in #sapphire-support
Statefulness and data sharing for Pieces
(by the way, this codebase still doesn't seem to organize separate features into any sort of unit, it is a big chunk of DJS handlers dressed up into OO syntax in this regard)
52 replies
SIASapphire - Imagine a framework
Created by Nemokosch on 8/5/2024 in #sapphire-support
Statefulness and data sharing for Pieces
is there a way to keep the data of a certain feature more local than the container but less local than the same class?
52 replies
SIASapphire - Imagine a framework
Created by Nemokosch on 8/5/2024 in #sapphire-support
Statefulness and data sharing for Pieces
anyway, now that I caught this gotcha and have a fix
52 replies
SIASapphire - Imagine a framework
Created by Nemokosch on 8/5/2024 in #sapphire-support
Statefulness and data sharing for Pieces
it's the first step to improvements
52 replies
SIASapphire - Imagine a framework
Created by Nemokosch on 8/5/2024 in #sapphire-support
Statefulness and data sharing for Pieces
then perhaps it was about time
52 replies
SIASapphire - Imagine a framework
Created by Nemokosch on 8/5/2024 in #sapphire-support
Statefulness and data sharing for Pieces
but to silently do the thing that you would basically never want...
52 replies
SIASapphire - Imagine a framework
Created by Nemokosch on 8/5/2024 in #sapphire-support
Statefulness and data sharing for Pieces
talking about skill issue
52 replies
SIASapphire - Imagine a framework
Created by Nemokosch on 8/5/2024 in #sapphire-support
Statefulness and data sharing for Pieces
and this is not even hard to implement better, I actually created a custom class builder that encodes the folder structure into the name...
52 replies
SIASapphire - Imagine a framework
Created by Nemokosch on 8/5/2024 in #sapphire-support
Statefulness and data sharing for Pieces
if you hardcode the category into all names, there isn't much to categorize
52 replies
SIASapphire - Imagine a framework
Created by Nemokosch on 8/5/2024 in #sapphire-support
Statefulness and data sharing for Pieces
why even have directories if you still gonna hardcode the feature into the file name
52 replies
SIASapphire - Imagine a framework
Created by Nemokosch on 8/5/2024 in #sapphire-support
Statefulness and data sharing for Pieces
Okay, this is cheap now. If anything, it is a skill issue to not distinguish same file names coming from unrelated components
52 replies
SIASapphire - Imagine a framework
Created by Nemokosch on 8/5/2024 in #sapphire-support
Statefulness and data sharing for Pieces
yes, and it is really close to a trap. You wouldn't want name collisions for things you intend to be completely unrelated components
52 replies
SIASapphire - Imagine a framework
Created by Nemokosch on 8/5/2024 in #sapphire-support
Statefulness and data sharing for Pieces
I started thinking that listeners of the same name might even override each other, regardless that they have different paths. I wouldn't know the implementation but it's too suspicious
52 replies
SIASapphire - Imagine a framework
Created by Nemokosch on 8/5/2024 in #sapphire-support
Statefulness and data sharing for Pieces
In discord.py, this is a no-brainer because the whole functionality could be one cog with its shared state
52 replies
SIASapphire - Imagine a framework
Created by Nemokosch on 8/5/2024 in #sapphire-support
Statefulness and data sharing for Pieces
Yeah well, this is the point: this is better than nothing but in a sufficiently complex bot - which this will become over time - you wouldn't want to globally expose things that are only related to one functionality
52 replies
SIASapphire - Imagine a framework
Created by Nemokosch on 8/5/2024 in #sapphire-support
Statefulness and data sharing for Pieces
"Worst case" that should still be a container service but it really would be best to keep this the business of those 2 or 3 classes inside the same "module" (registered path)
52 replies