Replies: 4 comments 3 replies
-
How about a whitelist that overwrites the blacklist, where you could then enter the machine thing. I've been thinking about this anyway, how about you host the blacklist and the ServerPackCreator fetches the latest version every time it starts. |
Beta Was this translation helpful? Give feedback.
-
In addition, you could have an integrated always UP-TO-DATE playlist and provide the users with an additional one in which they could enter their mods. This way, the users always have the latest blacklist, but keep their configuration. Overall, I think REGEX is a good idea, but it will cause problems. Unless you provide a generator that turns a string into REGEX. |
Beta Was this translation helpful? Give feedback.
-
I would implement regex, and then just be flat amazed because people won't use it the way it's intended.
Which is also legal and won't match the one with multiple names it in, such as:
Yes, I'll cheat and use the windows way most times with regex. I only go Einsteinian when I'm forced to do so for a special use case scenario. |
Beta Was this translation helpful? Give feedback.
-
Windows users are taught wildcards too, especially when the dive into msdos
batch files and powershell scripts. By default most tutorials and documents
will say to use the asterisk (file glob) to do the pattern matching, and
from my experience they don't go any deeper than ? (character glob) for
fine control. I believe that powershell can do REGEX.
I think of REGEX as that type of elitism one gets from watching too many of
a type of show. Like when you encounter someone that has watched all the
Dr. Who shows since it was created, plus they didn't stop there, they
bought the books, toys, etc, they got into all the lore and more. We've
witnessed this Star Wars, Lost, Star Trek, Downton Abbey, etc.
REGEX is powerful, also so is elite trivia on a subject (I just used
televison shows for the above example, I could have used science
[Einsteinian])
The example you gave on REGEX, the complex one, that is what I call
Einsteinian, -- of or liking to be as if Einstein wrote the pattern to be
matched.
I'm srs, but also seriously, just implement REGEX. It will be welcomed and
you're not responsible for users using it wrong. And BY AMAZED, it's simply
that, most will be issues for basic pattern matching because they don't
understand basic globbing, That's not on you, it will be on them.
Think of REGEX like water.
What can you do with water?
1. Drink it for hydration
2. Wash in it for cleanliness
3. Wash things with it for the same as #2
4. Use it to make inert mixes, cement for example
5. Use it to make food stuffs, cake mixes, coffee, and tea for example
that's some examples of good ways to use it, and then there are the
negatives.
6. drown in it
7. use it to make poisonous beverages that drug the brain (alcohols)
8. leave it stagnate to breed deadly bacteria, or algae blooms
9. created acid rain by pumping pollution into the atmosphere (industry,
volcanos)
10. mix it with stuff to create soda and get diabetes and nice movie
mechanic (watch the movie Idocracy: fun fact, the crocs everyone wears, was
created for this movie and to the chagrin of the movie props team, it
caught on).
I would implement REGEX, and relish in being amazed.
…On Wed, Apr 6, 2022 at 4:48 AM Griefed ***@***.***> wrote:
I would implement regex, and then just be flat amazed because people won't
use it the way it's intended.
Yeah, that's always going to happen when a user has even the most basic
freedom of choice in anything. 😂 Shit's gonna break, yo.
Yes, I'll cheat and use the windows way most times with regex. I only go
Einsteinian when I'm forced to do so for a special use case scenario.
You'll have to explain this one to me. What do you mean by the windows way
and Einsteinian?
—
Reply to this email directly, view it on GitHub
<#320 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA5TJCCVOWZ7HUR4HUW5X4TVDVMV5ANCNFSM5STPAY5Q>
.
You are receiving this because you commented.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
ServerPackCreator currently uses a potentially error-/false-positive-prone solution to exclude a user-specified mod from a server pack.
It does so by checking whether the filename of a mod contains a user-given string.
Example:
User entry:
effective-
Mod which should be excluded:
effective-1.2.3.jar
Mod which should not be excluded:
effective-machines-or-something-2.3.4.jar
(imaginary mod, you get the point)You guessed it, the second mod would also be excluded, even though it is probably meant to be on the client and server.
Can't have that now, can we?
So, one solution to this problem would be to make use of....REGEX!
However, wise people have once said:
Why? Because properly writing regex can be time-consuming, terrifying, annoying, you name it. The benefit would be a powerful system which allows people to exclude whatever mod they want without running the risk of any false-positives, due to the way ServerPackCreator excludes things.
With the example above in mind, the regex for
effective-1.2.3.jar
would look something like this:This would only match
effective-1.2.3.jar
or any update of it, likeeffective-1.3.4.jar
,effective-6.6.6.jar
Of course, false-positives due to poorly written regexes by a given user are still a posibility, but then a user still has the chance to remedy that situation by writing better regex. The same can not be said for a given version of ServerPackCreator. If ServerPackCreator's way of excluding a mod leads to false-positives or other problems, then people would have to wait for me to fix it and release a new version.
Not the case with regex.
So. Elephant in the room. Jadoon platoon up on the moon.
What do you think?
regex yay or nay?
For more details, you can also check out my issue about this feature here: https://git.griefed.de/Griefed/ServerPackCreator/-/issues/137
Beta Was this translation helpful? Give feedback.
All reactions