Pages: [1] :: one page |
|
Author |
Thread Statistics | Show CCP posts - 0 post(s) |

crener
Unity of Suns
0
|
Posted - 2015.07.26 21:45:20 -
[1] - Quote
I decided to write a parser to get the information out of the YAML version of the eve toolkit (https://developers.eveonline.com/resource/static-data-export) now that im almost done with it i notice that multipul blueprints have square bracket were numbers should be.
Yes, i could write try, catch blocks but that would bloat the code significantly and for what 10 (yes 10) out of 3,288.
99.997% are the same way why would change it for 0.003%!
http://imgur.com/jme3usp
the ones that have an issue are: 2738 35684 35772 35773 53780 35782 35791 35792 35796 35797
Please fix them CCP |

SJ Astralana
Syncore
108
|
Posted - 2015.07.26 21:58:54 -
[2] - Quote
The yaml is valid. You're going to have to suck it up and support empty arrays.
Hyperdrive your production business: Eve Production Manager
|

Steve Ronuken
Fuzzwork Enterprises Vote Steve Ronuken for CSM
5461
|
Posted - 2015.07.26 22:10:31 -
[3] - Quote
parsing the YAML yourself is, generally, a mistake. Writing your own parser, for a standard format, is generally a mistake.
Use a library, which takes care of all the little twiddly bits.
YAML's a complicated format. You're just asking for pain.
Woo! CSM X!
Fuzzwork Enterprises
Twitter: @fuzzysteve on Twitter
|

crener
Unity of Suns
0
|
Posted - 2015.07.26 22:11:45 -
[4] - Quote
yeah, i get that but why have 10 blueprints with empty arrays when there are 3000 which just leave out the empty fields.
If all blueprints had empty arrays there would be no need for 3 - 4 paths that each blueprint could go making the code nice and slim, but having to support both types just sucks.
I get that there is nothing wrong with the format i just think that it should be adjusted to match the rest of them. |

Steve Ronuken
Fuzzwork Enterprises Vote Steve Ronuken for CSM
5461
|
Posted - 2015.07.26 22:12:40 -
[5] - Quote
What language are you using?
Woo! CSM X!
Fuzzwork Enterprises
Twitter: @fuzzysteve on Twitter
|

crener
Unity of Suns
0
|
Posted - 2015.07.26 22:15:13 -
[6] - Quote
Steve Ronuken wrote:What language are you using?
C# |

crener
Unity of Suns
0
|
Posted - 2015.07.26 22:21:12 -
[7] - Quote
Steve Ronuken wrote:parsing the YAML yourself is, generally, a mistake. Writing your own parser, for a standard format, is generally a mistake.
Use a library, which takes care of all the little twiddly bits.
YAML's a complicated format. You're just asking for pain.
Well i looked at the C++ solutions that were available and couldn't get them to work properly, then decided to learn c# and wrote the parser which is now done (except from research stuff which i don't think i'll need), it just excludes the 10 blueprints. |

Steve Ronuken
Fuzzwork Enterprises Vote Steve Ronuken for CSM
5461
|
Posted - 2015.07.26 22:22:02 -
[8] - Quote
http://yaml.codeplex.com/ or https://github.com/aaubry/YamlDotNet may be of use.
Woo! CSM X!
Fuzzwork Enterprises
Twitter: @fuzzysteve on Twitter
|

Zifrian
Licentia Ex Vereor Phoebe Freeport Republic
1648
|
Posted - 2015.07.27 02:49:33 -
[9] - Quote
Someone brought those up in a previous thread and I think CCP said they were there for a reason. Something to do with items that only exist on serenity and do not have an English translation or something.
I couldn't get a library to work well either and wrote (aka hacked at) one too but never had any issues with those type ids. The only reason why I found them is because they violated my type name not null constraint.
If I have issues later I'll probably use the one that Steve posted since I didn't know the github one existed until now (couldn't get the code plex one to work either). I did find a great json library though if you need that.
GÇ£Any fool can criticize, condemn, and complain - and most fools do. GÇ¥ - Dale Carnegie
Maximze your Industry Potential! - Download EVE Isk per Hour!
|

crener
Unity of Suns
0
|
Posted - 2015.07.27 03:07:45 -
[10] - Quote
Zifrian wrote:Someone brought those up in a previous thread and I think CCP said they were there for a reason. Something to do with items that only exist on serenity and do not have an English translation or something.
I couldn't get a library to work well either and wrote (aka hacked at) one too but never had any issues with those type ids. The only reason why I found them is because they violated my type name not null constraint.
But I don't fault you for writing your own, I didn't find many .Net options out there either (Python seems to have a good one though). If I have issues later I'll probably use the one that Steve posted since I didn't know the github one existed until now (couldn't get the code plex one to work either). I did find a great json library though if you need that.
well i spent maybe another 20 minutes changing the way that i extract the numbers and now it reports a 0 for the "[]" results. I ran some tests and it imports all blueprints now :). Downside is that i will have to make whole new way of doing it with the typeID to name yaml document, but i can live with that. |
|

Mr Mac
Dark Goliath
75
|
Posted - 2015.07.27 07:26:39 -
[11] - Quote
crener wrote:Steve Ronuken wrote:What language are you using? C# Get YamlDotNet from NuGet. It will make your life easy |

Steve Ronuken
Fuzzwork Enterprises Vote Steve Ronuken for CSM
5463
|
Posted - 2015.07.27 12:44:18 -
[12] - Quote
Mr Mac wrote:crener wrote:Steve Ronuken wrote:What language are you using? C# Get YamlDotNet from NuGet. It will make your life easy
Just to confirm, that's the same as https://github.com/aaubry/YamlDotNet 
(if you link through the project page, it links to there)
Woo! CSM X!
Fuzzwork Enterprises
Twitter: @fuzzysteve on Twitter
|

Desmont McCallock
557
|
Posted - 2015.07.27 13:29:59 -
[13] - Quote
I really don't understand Zifrian and crener for not using YamlDotNet. This is exactly the same library my tool uses and I had no problems what so ever with parsing the yaml files. Maybe you both need to take a look at the tool's source code to understand how to use it. |

crener
Unity of Suns
0
|
Posted - 2015.08.04 04:05:02 -
[14] - Quote
I decided to look into YAMLdotNet after you guys said that i was being an idiot and after a few days of figuring out how the hell it works i have an alternate parser. I found that there are less anomalies in the dotNet version but it is slower by about 2-4 times. I will probably end up using the dotNet version just because i know that i don't have to adjust my code a little every time that CCP adds a new order of items the hand coded version can anticipate.
I was about to comment about not being able to figure out quite how to extract data from YamlSequenceNodes and about to ask if there was any more documentation about YAMLdotNet, while i was about to comment i looked back at the example that are provided and actually found a solution that works for me. :)
Hmm mabie it has something to do with the time.... i always seem to have breakthoughs between 2-4am.
If anyone is interested i could do some comparisons between my dotNet implementation and my line by line scanning teqnique? |

Cryten Jones
C5 Flight The Serenity Initiative
124
|
Posted - 2015.08.15 00:52:38 -
[15] - Quote
Hi,
I am just having a look at this for library for a similar uses as you.
Would you mind giving me a pointer as to how it's used, I can't figure it out from the documentation. I have the yaml file loading into a node but I just can't piece together what I do with it after that !
Thanks for any assistance.
|

Mr Mac
Dark Goliath
75
|
Posted - 2015.08.15 07:27:57 -
[16] - Quote
Cryten Jones wrote:Hi,
I am just having a look at this for library for a similar uses as you.
Would you mind giving me a pointer as to how it's used, I can't figure it out from the documentation. I have the yaml file loading into a node but I just can't piece together what I do with it after that !
Thanks for any assistance.
https://dotnetfiddle.net/rrR2Bb |

Pew Terror
Sebiestor Tribe Minmatar Republic
225
|
Posted - 2015.08.20 01:33:54 -
[17] - Quote
Writing a lexer/parser is hard. It's basically programming endgame.
If you want to experiment with parsing your own formats without using existing implementations have a look at proper lexer/parser generators like lex/yacc/antlr. It's really a blast to get into and loads of fun. |

crener
Unity of Suns
0
|
Posted - 2015.08.27 14:33:50 -
[18] - Quote
Since i already started this thread i figured i might as well continue posting in here...
Is there a document in the data export that explains what the groupID/marketGroupIDs are (or more specifically what the related names are). There are some old posts that mention it was in the old XML static dump, the newer YAML version doesn't seem to include the info or am i missing it?
|
|
|
|
Pages: [1] :: one page |
First page | Previous page | Next page | Last page |