Configuration file 3D RAS

Post anything on anything here

Moderator: Moderators

What format do you prefer ?

YAML
3
27%
S-Exp
1
9%
XML
5
45%
JSON
1
9%
Other (please specify)
1
9%
 
Total votes : 11

Wed Jan 16, 2008 9:20 pm

  • Hello.
    For those that know i'm making a Sound Engine.
    But, I need to add a configuration file where the user can set there preferences.
    So I was wondering what style would be preferred: (Ignore the content of the format, but look at the syntax in witch the data is represented)
    (if unsure DON'T vote please)
    Example of YAML
    Example of S-exp
    Example of XML
    Example of JSON
    This is the dataset i need to store
    Code: Select all
    {Setup1 %
         Headphones {
              headsize=12cm;
              headtype=a;
         }
    }
    { Setup2 %
           Speakers {
                Count 4
                 Speaker 1 {
                         5 degree; 50cm
                  }
             }
    }
    Last edited by Qantourisc on Wed Jan 16, 2008 10:25 pm, edited 1 time in total.
    Qantourisc
    Alien
     
    Posts: 130
    Joined: Fri Jun 16, 2006 5:44 am

Wed Jan 16, 2008 9:44 pm

  • Plain INI file type syntax perhaps? What more than key/value pairs do you need?
    Whenever You go, then You aren't.
    kyre
    Alien
     
    Posts: 118
    Joined: Tue Jun 13, 2006 8:56 pm
    Location: Sweden

Wed Jan 16, 2008 10:23 pm

  • kyre's suggestions:
    Code: Select all
    Setup1:
      Headphones:
        headsize=12cm
        headtype=a
    Setup2:
      Speakers:
    Code: Select all
    Setup1 = {
      Headphone = {
         headsize=12cm;
         headtype=a;
      };
    };
    Qantourisc
    Alien
     
    Posts: 130
    Joined: Fri Jun 16, 2006 5:44 am

Wed Jan 16, 2008 10:32 pm

Wed Jan 16, 2008 10:37 pm

  • Open for discussion :)
    Qantourisc
    Alien
     
    Posts: 130
    Joined: Fri Jun 16, 2006 5:44 am

Wed Jan 16, 2008 10:51 pm

  • I'm for XML in this regard just because there are so many tools for handling XML. Any modern program language has modules for handling XML which will allow the configuration to be handled by just about anything.
    Ed
    Forum addon
     
    Posts: 1172
    Joined: Wed Mar 01, 2006 12:32 am
    Location: UK

Thu Jan 17, 2008 8:01 am

  • Ed wrote:...because there are so many tools for handling XML.
    What if peaple don't desire to use any of these ?
    Qantourisc
    Alien
     
    Posts: 130
    Joined: Fri Jun 16, 2006 5:44 am

Thu Jan 17, 2008 9:19 am

  • Yes, XML may be nice to parse, but is awful for users to edit.
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Thu Jan 17, 2008 12:40 pm

  • i vote for INI too, but i hope we will never need to edit it anyway :)
    User avatar
    Morphed
    Alien
     
    Posts: 197
    Joined: Tue Feb 28, 2006 10:41 pm
    Location: Poland

Thu Jan 17, 2008 12:42 pm

  • Morphed wrote:i vote for INI too, but i hope we will never need to edit it anyway :)
    For now yes ... later you should get a GUI for it ...
    Qantourisc
    Alien
     
    Posts: 130
    Joined: Fri Jun 16, 2006 5:44 am

Thu Jan 17, 2008 1:14 pm

  • YAML... lol
    the only time i was confronted with yaml was porting somethign to osx... and yaml sucked there ...
    probably my fault
    nevertheless, I vote for XML
    User avatar
    Blµb
    Alien trapper
     
    Posts: 277
    Joined: Thu Mar 29, 2007 1:49 pm

Thu Jan 17, 2008 2:20 pm

  • lua if you are not going to auto create config files
    (maybe lua is over kill for just a config file)

    simplified yaml with '>' instead of ' '
    n0rqu3
    Member
     
    Posts: 28
    Joined: Thu Jan 03, 2008 1:23 am
    Location: gone

Thu Jan 17, 2008 4:47 pm

  • I have the feeling most choice Yaml for the readability.
    Kyre's suggestion seem the best.
    So can most agree on this ?
    Code: Select all
    Setup1:
      Headphones:
        headsize=12cm
        headtype=a
    Setup2:
      Speakers:

    Tabs will be used for intending. If the selection betweens tabs or space gets to hot i'll start the config file with:
    Code: Select all
    Intending: 4 space
    OR
    Code: Select all
    Intending: 1 tab
    Qantourisc
    Alien
     
    Posts: 130
    Joined: Fri Jun 16, 2006 5:44 am



Return to General Discussion




Information
  • Who is online
  • Users browsing this forum: No registered users and 1 guest