Hi, Does a permissions plugin exist that doesn't use the ridiculous YAML format? Seriously, what [sarcasm] genius thought it was a good idea? spaces instead of tabs? Multiple ranks per file with no separators? Static syntax with no room for error but no verification until reload? Terribly documented, where each example seems to contradict the next? Anyway </rant>.
1. And other file formats may not support all types of line endings. Ok? 2. by seperators, you mean empty lines between? 3. YML exists for human readability at the cost of a static syntax. YML formatter editor helps a lot. 4. Im not sure where you want the verification. You can use a YML editor or a YML parser, both exist at the touch of a google. 5. Documentation seems to be a rant about permission plugin rather than YML. There are also different permission plugins that dont use YML, such as YAPP, and upcoming PEX 2.0, but these so far dont recieve the same positive responses as YML perm plugins.
1: Line endings have nothing to do with the extension of the file, but the encoding. 2: There's no clear indication where a group starts and where a group ends, especially when using spaces instead of tabs. If a certain node has no information, it simply drops off and instantly begins the next group. 3: Readability? Even if you view the spaces as special characters, you can't easily read the file and tell how far indented something is. With tabs, it's quite obvious. And why 2 spaces? 4 spaces is the standard equivalent to 1 tab, causing more readability issues. 4: Writting YAML is equivalent to writting COBOL. Because the syntax is so messy, you can't be sure anything will work until you plug it into a server and run it. This process requires FTP access, minecraft access, and/or console access to reload. 5: All plugins I've seen are the pretty much the same. A result of the restrictive nature of YAML no doubt. I'll check out the ones you mentioned. New format? Ok that's easy. XML.
XML? Are you kidding me? Worst format ever. And i don't see any problems in reading YAML. The only thing that 1 find easier is JSON. And you should learn to use proper editors with syntax highlight like notepad++. If you can't see how far indented something is you should get a bigger screen. Also you know, tab can be any size from 1 space to 6, so quit talking about tab indents something better than space, it is not true for everyone. I hate spaces too, but tabs work like shit for configuration files.
howimineforfish XML for permissions? Please show us your example permissions.xml then. With prefix, suffix, inheritance etc. Notepad++ has a nice button: Edit->Align ( I think )->Turn tabs into spacebars, also a revert option. 2. See line above this. 3. Same as 2. 4. Or a local test server. Same for XML though, also possible to make syntax errors there. 5. The YML api isn't there for nothing, easy to use for developers and end users. XML isn't the most preferred method for end users.
howimineforfish You are aware that you can use 4 spaces OR 2 spaces in YAML, right? You don't have to use 2.
2. Tabs will change nothing here. If you want an indication, thats where indentation plays part, you can easily see that the next group name is indented much less. Want more indication? Put some yourself. Comments, empty lines, etc. 3. replace spaces with tabs -> nothing changed. Indentation is identical, and you can easily tell how much something is indented just as much. Dont like 2 spaces indentation? Use 4. Nothing stops you, YML does it fine. 4. No, thats wrong. Yml formatter, Yml parsers, etc, will easily read your file and see its syntax is correct. Non-syntax error? Can happen with every file type, and YML just limits these, because the syntax is clear and rigid, making it hard to confuse it. 5. So now YML magically breaks plugin documentation? Thats new. Not to mention that most big permission plugins have proper examples and are clear to most people. You seem to put YML, and spaces, as the problem of everything, and suggesting that somehow tabs will fix everything wrong, ever, no matter how false it is.
XML is used by the IAR, CIHI, and HL7 messaging; used by hospitals among countless other things. But you're right, they clearly chose XML because it's worse than YML. If it can handle hospital patient data, it probably can't be done for server permissions. So you'd rather hit the spacebar 4 times than tab once? Every IDE I've used had 4 spaces for tabs. So why the extra step? That tool exists for a reason, because people don't like using spaces instead of tabs. It exists specifically to convert between the two, which means it became enough of a pain the rear to warrant a tool being made to make it easier. Fair enough. Doesn't really change anything. With XML you don't technically need spaces or tabs at all. You can use as many or as few spaces / tabs as you want. Non-syntax errors are far more likely using YML, especially when the end-user is involved. If I was tasked with parsing and writting YML, I'd probably create a bunch of weird syntax and formats to make it easier to read in and out. Which is exactly what I'm seeing with the permissions plugins. Here's a perfect and simple example I keep seeing. Code: Admins: options: prefix: '&0(&4Admins&0)&7 ' permissions: - permissions.* vs Admins: options: prefix: '&0(&4Admins&0)&7 ' permissions:[] vs Admins: options: prefix: '&0(&4Admins&0)&7 ' permissions: somenode: I mean, you keep coming up with more and more creative ways to make YML EASIER to work with, which implies that it is in fact, difficult to begin with. That's fine, but you wouldn't have the requirements for that with other formats. I don't know any programmer who can't load up an XML document and understand it relatively quickly. Not to mention perform CRUD operations on it.
howimineforfish XML for the hospitals is read and written to databases, not something that is edited by hand by employees.
The above code was taken from one of the most popular permissions plugins. Three different ways of using the same or similar piece of YML. You've got braces, colons, line feeds, spaces, and sometimes just a blank entry. Sounds like a documentation nightmare to me. It's no surprise small development teams have problems mentioning all these little quirks. Ok, just threw this together as a basic example: Code: <group> <name>admin</name> <options> <prefix>&0(&4Admins&0)&7 </prefix> <suffix> &6:</suffix> <default>false<default> <inheritance>member</inheritance> </options> <permissions> <entry>worldedit.*</entry> <entry>essentials.*</entry> <entry>-essentials.ban</entry> </permission> </group> I've written plenty of it out by hand while designing the systems that automate it. You're missing my entire point. It's something universal and easy to work with. EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Not everybody thinks the same about that. They haven't implemented YML into bukkit for nothing. And might be able to make a tool to convert xml to yml with a predefined format. And please use the tahg or reply buttons if you respond to somebody, then we will get a notification of it. But anyways: why not use a permissions plugin with mysql support? http://dev.bukkit.org/bukkit-plugins/zpermissions/
howimineforfish You say that, then proceed to do the exact same thing with XML. Different ways to format a file does not mean documentation nightmare. Your XML example could look like And still be valid, does that mean XML is hard to use because it can be hard to read? No. XML may give you more freedom in syntax, but if you want a human readable format, your syntax examples in documentation are going to be one of several things anyway. There are a lot of ways to format a YML file outside of what plugins often persent.
timtower Didn't notice that functionality, I'll use it. zPermissions is actually the plugin we ended up using. At least temporarily. Necrodoom The only non-minecraft syntax I've used are <, /, and >. Like I said, I just threw it together in about 2 minutes because I was asked to. The fact that you showed my example without spaces or line feeds while still being valid just proves my point. You have one wrong space and the whole YML file seems to blow up in these plugins. Maybe it's their fault, I don't know. And I guess I'll pull the argument of the day since everyone else is, there's XML parsers to validate and format your text. Even though I would almost never need one of those to pump out valid XML.
howimineforfish You just basically compared a tag based system versus a bracket/identation one. Sure, you may be able to avoid spacing errors, but you spend just as much time writing all the extra tags for it. While, if you use a YML editor GUI, you both get the fastness and easiness of reading and writing to a YML file manualy, while having no syntax errors. Either way, if you can get an XML parser (to cut down of tag writing time), and a YML parser, writing time will be the same, and thus you acquire nothing in advantage by using XML format over YML format. Yes, you may have used a permission plugin using XML format, what did you solve in that? absolutely nothing.
Necrodoom I've already explained the other downsides of YML. The fact that I mentioned a parser doesn't prove that YML is just as easy to use as XML. Which is why I stated it rather sarcastically. You don't need a parser for XML, which I've also already stated. I thought the whole point of YML was that it was human readable and editable, why do you need a parser? Well, I've gone over why I think that isn't true and why I think XML is superior. I don't see what you're getting at. That's the whole reason I made the thread; to find permissions plugins that don't use YML.
You can use a parser if you have troubles keeping the syntax correct, same as you could use a parser for XML to keep the tags correct. Sure, you may be more comfortable with XML format, but that doesnt mean YML is bad.
XML is shit. You spend more time to write those tags than to write the actual information. If you don't like an yml that write your own plugin that uses xml and we will see how much time will you spend to fill in 24 ranks with multiple inheritance and 200+ permissions in every group.
Well someone could make an editor for yml, a special one that uses an interface rather than just checking the syntax
Definitely not for the user-editable configuration. XML is a good machine-read format, writing a parser for it is really easy, but it is not human-readable at all.