You can kinda see this in things like modding communities or anything piracy related too. Users just want easy solutions even if it's at the expense of creators, and creators are doing it more and more for money rather than any personal drive or satisfaction. I can't believe we've reached a point where even mods are being locked behind paywalls, need to be commissioned or sometimes have entire teams funded by patreon to work on them, it's just another business nowadays.
Cyno
I have this instinct drilled into me for years that anything using reflection is bad, both in terms of performance or code clarity/ease of debugging. Your answer is correct though, I could make a generic method using reflection... now I'm just not sure if it's better to just manually hardcode the cases for all types anyway
The switch case was based on an enum but it is what I want to get rid of. In the end I ended up doing what you wrote there, expect instead of casting I'm just writing
case Type.Int: return MyTypedMethod<int>(args)
case Type.IntNull: return MyTypedMethod<int?>(args)
// etc for another 10+ different types
It just feels like I'm doing something wrong if i have to manually handle every case in a switch (or if else) statement and I was wondering how could I write, for example, a method that would do the conversion from Type.Long to System.Int64 for me, and then I just pass that type into the generic method instead of having to manually translate it into a type every time it is used.
However, if I have to use reflection maybe hardcoding it manually every time is actually faster and easier to debug so maybe i'm just overthinking it.
That c# 7 structure looks interesting but not sure it solves my issue, I need to get to the part where i have the generic type T in the first place. I dont know how to get a "T" out of a custom field indicating type, so to speak.
edit: as for the invalid code, i just wrote it quickly as example but you are right. Pretend it says switch (field.SomeType) instead of it being a method
Git Fork is amazing
The most common usecase is generating data models based on the database, mostly using t4 files so far. We have a non-standard way of defining some parts of it so the default MS tools don't quite cut it (like ef dbcontext scaffold). I've been looking into roslyn but it seems like it might be more trouble than its worth, but default t4 doesn't even have a proper editor and syntax highlighting so its a low bar atm.
If our content gets federated to threads then it just means that google results will point to it first rather than to us, they will probably have better indexing and search features than the fediverse. People will also probably think the content originated on threads too (since that's where they see it and threads could easily obfuscate info like that) instead of who actually made it.
It could increase the short term engagement but in the long run, it will just serve to make threads better.
I was really hoping there was something like hamachi/xfire/garena from the old days but modernized and more stable 😅 I just assumed it'd be a solved problem by now.
I'm not giving up on tailscale yet, I'll try the funnel feature but yeah... seems a bit troublesome for sure
Thanks for linking that, seems like a great resource! Seems like there's a few that support UDP although I'm not sure if they will work with a CGNAT setup, also their setup seems a bit more complicated and technical than expected but I need to look more into it tomorrow. If everyone else needs to have this installed then that might be an issue
🤷♂️ Downvotes are meaningless, I'd rather see them give an actual counterargument if they have one but im used to it from reddit
That's not really a good solution although it is a temporary workaround.
- Many users won't know this is a feature they can use, or how to set it up
- Some users use alternative instances that federate with lemmy which might not have this feature
- Content still gets copied and hosted on this instance which might not be desireable
Besides, at the end of the day, shouldn't the admins and mods here curate the content according to the community's guidelines and spirit? If someone started spamming undesired content on a forum you're administrating, the answer wouldn't be "all the users can just block it if it's an issue". I don't think it should be the answer here either
Having a prepared grid helper for AoC is a 150IQ move 😁
I have a join table between Category and other entities that can be categorized in this way, but I dont think I need one between User and Category? Different users can't share the same category so it's a 1-n relationship, not n-n.
Even if I did though I still have the same issue since I have to figure out how to autoincrement it, only now in the join table rather than the Category table.