• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

YAML sucks

FordGT90Concept

"I go fast!1!11!1!"
Joined
Oct 13, 2008
Messages
26,259 (4.63/day)
Location
IA, USA
System Name BY-2021
Processor AMD Ryzen 7 5800X (65w eco profile)
Motherboard MSI B550 Gaming Plus
Cooling Scythe Mugen (rev 5)
Memory 2 x Kingston HyperX DDR4-3200 32 GiB
Video Card(s) AMD Radeon RX 7900 XT
Storage Samsung 980 Pro, Seagate Exos X20 TB 7200 RPM
Display(s) Nixeus NX-EDG274K (3840x2160@144 DP) + Samsung SyncMaster 906BW (1440x900@60 HDMI-DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay + USB 3.2 (A+C) 3.5" bay
Audio Device(s) Realtek ALC1150, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse Nixeus REVEL-X
Keyboard Tesoro Excalibur
Software Windows 10 Home 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
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.
 
Joined
Feb 26, 2008
Messages
4,876 (0.83/day)
Location
Joplin, Mo
System Name Ultrabeast GX2
Processor Intel Core 2 Duo E8500 @ 4.0GHZ 24/7
Motherboard Gigabit P35-DS3L
Cooling Rosewill RX24, Dual Slot Vid, Fan control
Memory 2x1gb 1066mhz@850MHZ DDR2
Video Card(s) 9800GX2 @ 690/1040
Storage 750/250/250/200 all WD 7200
Display(s) 24" DCLCD 2ms 1200p
Case Apevia
Audio Device(s) 7.1 Digital on-board, 5.1 digital hooked up
Power Supply 700W RAIDMAXXX SLI
Software winXP Pro
Benchmark Scores 17749 3DM06
+1, same goes for HAML. They use white space for syntax, so editing is a SOB.
 

Aquinus

Resident Wat-man
Joined
Jan 28, 2012
Messages
13,147 (2.94/day)
Location
Concord, NH, USA
System Name Apollo
Processor Intel Core i9 9880H
Motherboard Some proprietary Apple thing.
Memory 64GB DDR4-2667
Video Card(s) AMD Radeon Pro 5600M, 8GB HBM2
Storage 1TB Apple NVMe, 4TB External
Display(s) Laptop @ 3072x1920 + 2x LG 5k Ultrafine TB3 displays
Case MacBook Pro (16", 2019)
Audio Device(s) AirPods Pro, Sennheiser HD 380s w/ FIIO Alpen 2, or Logitech 2.1 Speakers
Power Supply 96w Power Adapter
Mouse Logitech MX Master 3
Keyboard Logitech G915, GL Clicky
Software MacOS 12.1
I'll stick with JSON and XML, thank you. :)
 

FordGT90Concept

"I go fast!1!11!1!"
Joined
Oct 13, 2008
Messages
26,259 (4.63/day)
Location
IA, USA
System Name BY-2021
Processor AMD Ryzen 7 5800X (65w eco profile)
Motherboard MSI B550 Gaming Plus
Cooling Scythe Mugen (rev 5)
Memory 2 x Kingston HyperX DDR4-3200 32 GiB
Video Card(s) AMD Radeon RX 7900 XT
Storage Samsung 980 Pro, Seagate Exos X20 TB 7200 RPM
Display(s) Nixeus NX-EDG274K (3840x2160@144 DP) + Samsung SyncMaster 906BW (1440x900@60 HDMI-DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay + USB 3.2 (A+C) 3.5" bay
Audio Device(s) Realtek ALC1150, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse Nixeus REVEL-X
Keyboard Tesoro Excalibur
Software Windows 10 Home 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
It's the format DynMap saves data in. I couldn't change it to something else and expect DynMap to still work. :(
 
Joined
Aug 30, 2009
Messages
4,012 (0.75/day)
Location
Sarasota, Florida, USA
System Name Awesomesauce 4.3 | Laptop (MSI GE72VR 6RF Apache Pro-023)
Processor Intel Core i7-5820K 4.16GHz 1.28v/3GHz 1.05v uncore | Intel Core i7-6700HQ @ 3.1GHz
Motherboard Gigabyte GA-X99-UD5 WiFi LGA2011-v3| Stock
Cooling Corsair H100i v2 w/ 2x EK Vardar F4-120ER + various 120/140mm case fans | Stock
Memory G.Skill RJ-4 16GB DDR4-2666 CL15 quad channel | 12GB DDR4-2133
Video Card(s) EVGA GTX 1080 Ti Hybrid SC2 11GB @ 2012/5151 boost | NVIDIA GTX 1060 6GB +200/+500 + Intel 530
Storage Samsung 840 EVO 500GB + Seagate 3TB 7200RPM + others | Kingston 256GB M.2 SATA + 1TB 7200RPM
Display(s) Acer G257HU 1440p 60Hz AH-IPS 4ms | 17.3" 1920*1080 60Hz wide angle TN notebook panel
Case Fractal Design Define XL R2 | MSI
Audio Device(s) Creative Sound Blaster Z | Realtek with quad stereo speakers and subwoofer
Power Supply Corsair HX850i Platinum | 19.5v 180w Delta brick
Software Windows 10 Pro x64 | Windows 10 Home x64
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. :shadedshu
 

FordGT90Concept

"I go fast!1!11!1!"
Joined
Oct 13, 2008
Messages
26,259 (4.63/day)
Location
IA, USA
System Name BY-2021
Processor AMD Ryzen 7 5800X (65w eco profile)
Motherboard MSI B550 Gaming Plus
Cooling Scythe Mugen (rev 5)
Memory 2 x Kingston HyperX DDR4-3200 32 GiB
Video Card(s) AMD Radeon RX 7900 XT
Storage Samsung 980 Pro, Seagate Exos X20 TB 7200 RPM
Display(s) Nixeus NX-EDG274K (3840x2160@144 DP) + Samsung SyncMaster 906BW (1440x900@60 HDMI-DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay + USB 3.2 (A+C) 3.5" bay
Audio Device(s) Realtek ALC1150, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse Nixeus REVEL-X
Keyboard Tesoro Excalibur
Software Windows 10 Home 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
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! :laugh:
 
Joined
Aug 10, 2007
Messages
4,267 (0.70/day)
Location
Sanford, FL, USA
Processor Intel i5-6600
Motherboard ASRock H170M-ITX
Cooling Cooler Master Geminii S524
Memory G.Skill DDR4-2133 16GB (8GB x 2)
Video Card(s) Gigabyte R9-380X 4GB
Storage Samsung 950 EVO 250GB (mSATA)
Display(s) LG 29UM69G-B 2560x1080 IPS
Case Lian Li PC-Q25
Audio Device(s) Realtek ALC892
Power Supply Seasonic SS-460FL2
Mouse Logitech G700s
Keyboard Logitech G110
Software Windows 10 Pro
Ciaran McCreesh (blogger) said:
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.
 

newtekie1

Semi-Retired Folder
Joined
Nov 22, 2005
Messages
28,472 (4.23/day)
Location
Indiana, USA
Processor Intel Core i7 10850K@5.2GHz
Motherboard AsRock Z470 Taichi
Cooling Corsair H115i Pro w/ Noctua NF-A14 Fans
Memory 32GB DDR4-3600
Video Card(s) RTX 2070 Super
Storage 500GB SX8200 Pro + 8TB with 1TB SSD Cache
Display(s) Acer Nitro VG280K 4K 28"
Case Fractal Design Define S
Audio Device(s) Onboard is good enough for me
Power Supply eVGA SuperNOVA 1000w G3
Software Windows 10 Pro x64
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.
 
Top