techPowerUp! Forums

Go Back   techPowerUp! Forums > Software > Programming & Webmastering

Reply
 
Thread Tools
Old Jan 1, 2013, 01:39 PM   #1
FordGT90Concept
"I go fast!1!11!1!"
 
FordGT90Concept's Avatar
 
Join Date: Oct 2008
Location: IA, USA
Posts: 10,576 (6.28/day)
Thanks: 1,755
Thanked 2,596 Times in 1,960 Posts

System Specs

YAML sucks

For those who haven't heard about it, here's the official site for it:
http://www.yaml.org/

Sure, it is a readable format but it is the worst format I've ever worked with in terms of coding for. I tried using other people's libraries (three of them I think) and was so confused, I trashed them. I tried coding my own, also resulted in confusion and trashing it. Finally, I decided the only way I can navigate the all important "spaces" (because they refuse to use tabs) was to use a tree so I could easily tell it to move between children and parents as it was parsing each line. That finally got the hierarchy mess sorted but then, to output the file back in YAML format, I had to write a wall of text because Trees aren't navigator friendly (have to open child after child after child and/or assign new objects to new objects to new objects). Not only that but in order to do the "name: value" at the end, I had to put in some shameful, unflexible wizardry to make it ignore outputting tabs (which breaks the format), not output colons, and ignore linebreaks. It's amazing it works at all.

For the love of the computing gods, use XML, INI, or some other decent scripting format than YAML. They may not be as human ledgible as YAML but editors are relatively easy to make which end up being infinitely better than text editing a YAML anyway.

JSON is better than YAML because it has brackets to tell when something starts and stops. YAML omits almost all of them.
__________________
Golden Rule of Programming: Never assume.

try { SteamDownload(); }
catch (Steamception ex) { RageQuit(); }
FordGT90Concept is offline  
Crunching for Team TPU
Reply With Quote
Old Jan 1, 2013, 01:52 PM   #2
3870x2
3500 Posts
 
3870x2's Avatar
 
Join Date: Feb 2008
Location: Joplin, Mo
Posts: 4,543 (2.37/day)
Thanks: 175
Thanked 691 Times in 557 Posts
Send a message via Skype™ to 3870x2

System Specs

+1, same goes for HAML. They use white space for syntax, so editing is a SOB.
__________________
A+, N+, S+, MCSE.
Heatware
STEAM ID Name: furi0nst0rmrage (0s are zeros)
M O D E R N||W A R F A R E || 2 || CLUBHOUSE // TEAM
The amount exaltation of the processor cores can brings amazing floating” -sparkle
3870x2 is offline  
Reply With Quote
The Following User Says Thank You to 3870x2 For This Useful Post:
Old Jan 1, 2013, 02:21 PM   #3
Aquinus
3500 Posts
 
Aquinus's Avatar
 
Join Date: Jan 2012
Location: Dover, New Hampshire, USA
Posts: 4,263 (8.86/day)
Thanks: 1,276
Thanked 1,329 Times in 986 Posts

System Specs

I'll stick with JSON and XML, thank you.
__________________
MyHeat
Aquinus is offline  
Crunching for Team TPU
Reply With Quote
The Following User Says Thank You to Aquinus For This Useful Post:
Old Jan 2, 2013, 04:08 AM   #4
FordGT90Concept
"I go fast!1!11!1!"
 
FordGT90Concept's Avatar
 
Join Date: Oct 2008
Location: IA, USA
Posts: 10,576 (6.28/day)
Thanks: 1,755
Thanked 2,596 Times in 1,960 Posts

System Specs

It's the format DynMap saves data in. I couldn't change it to something else and expect DynMap to still work.
__________________
Golden Rule of Programming: Never assume.

try { SteamDownload(); }
catch (Steamception ex) { RageQuit(); }
FordGT90Concept is offline  
Crunching for Team TPU
Reply With Quote
Old Jan 2, 2013, 04:13 AM   #5
Jstn7477
2000 Posts
 
Jstn7477's Avatar
 
Join Date: Aug 2009
Location: Sarasota, Florida, USA
Posts: 3,136 (2.30/day)
Thanks: 387
Thanked 1,193 Times in 805 Posts

System Specs

Quote:
Originally Posted by FordGT90Concept View Post
It's the format DynMap saves data in. I couldn't change it to something else and expect DynMap to still work.
Yeah, and basically every other Bukkit plugin out there including Bukkit itself uses it as well.
__________________
Intel Crunchers (27 threads): 2x 3770K 4.3G (14t), 2600K 4G (7t), X3210 (3t), P-M 735A, P4 HT 3G
AMD Crunchers (11 cores):1100T 3.6G (3t), 1045T 3.4G (2t), X3 8550 2.5G, X2 4200+, T64 ML-37
AMD Folders (6272 GCN cores): 2x 7950 1125/1475, 7970 1150/1650, 7770 1100/1200
NV Folders (2336 GF10x + 1344 GK104 cores):GTX 470 & 465 720/1715, 4x 460 768MB 825/2000, GTS 450, 660Ti 1228/6000

HEATWARE
Jstn7477 is offline  
Crunching for Team TPU More than 25k PPD
Reply With Quote
The Following User Says Thank You to Jstn7477 For This Useful Post:
Old Jan 2, 2013, 04:30 AM   #6
FordGT90Concept
"I go fast!1!11!1!"
 
FordGT90Concept's Avatar
 
Join Date: Oct 2008
Location: IA, USA
Posts: 10,576 (6.28/day)
Thanks: 1,755
Thanked 2,596 Times in 1,960 Posts

System Specs

Did not know that. Why would they use YAML when virtually no one manually edits them? They should use XML so it's easily program-read and those that do want to manually edit still can. We should petition Bukkit to change!
__________________
Golden Rule of Programming: Never assume.

try { SteamDownload(); }
catch (Steamception ex) { RageQuit(); }
FordGT90Concept is offline  
Crunching for Team TPU
Reply With Quote
Old Jan 2, 2013, 05:34 PM   #7
Jizzler
2000 Posts
 
Jizzler's Avatar
 
Join Date: Aug 2007
Location: Geneva, FL, USA
Posts: 3,010 (1.42/day)
Thanks: 567
Thanked 606 Times in 487 Posts

System Specs

Quote:
Originally Posted by Ciaran McCreesh (blogger)
YAML, like XML (but don’t say that around YAML fans, because they will insist that YAML is nothing like XML), is a faddish structured text format that, by virtue of its generality and abstractness, ends up being harder to work with even with a parser already written than an appropriately designed one-off flat text format.
Written back in 2009, so I guess this fad is still going.

Haven't been exposed to it yet so I took a look at a YAML sample file just now...

Barf.
Jizzler is offline  
Reply With Quote
The Following User Says Thank You to Jizzler For This Useful Post:
Old Jan 2, 2013, 06:29 PM   #8
newtekie1
Semi-Retired Folder
 
newtekie1's Avatar
 
Join Date: Nov 2005
Location: Indiana
Posts: 17,753 (6.48/day)
Thanks: 780
Thanked 5,116 Times in 3,707 Posts

System Specs

Yep, and most Minecraft Bukkit plug-ins use YAML for their config files. You have no idea how many times I've changed something in a plug-in restarted the server and had it not work. Then I have to go line by line in the config file to fine out where I went wrong. And it usually is something like I used a tab instead of spaces. Every time that happens I just want to scream.

You should see the yml file for the server permissions...I'm glad I don't have to edit that manually.
__________________

Rig1: System Specs.
Rig2: A8-5600K@4.4GHz / AsRock FM2A75 Pro4 / 8GB Corsair DDR3-1600 9-9-9-24 / HD7560D / Samsung DVD-Burner / 1.5TB WD Green + 3x3TB WD RED in RAID5
Rig3: Athlon X2 4200+ / M4A79 Deluxe / 4GB G.Skill Pi DDR2-800 4-4-4-12 / GT430 / Sony DVD-Burner / 500GB WD
Rig4: Phenom II x6 1605T @ 3.6GHz / Asus M5A99X Evo / 8GB PNY DDR3-1600 9-9-9 / GTX470 & GTX470 / Samsung DVD-Burner / 1.5TB Seagate
newtekie1 is offline  
Crunching for Team TPU More than 25k PPD
Reply With Quote
The Following User Says Thank You to newtekie1 For This Useful Post:
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
EA Sucks! 1Strive Games 8 Jan 3, 2007 01:15 PM


All times are GMT. The time now is 07:56 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
no new posts