[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[FR-devel] Latest YAML format
From: |
Rich Kilmer |
Subject: |
[FR-devel] Latest YAML format |
Date: |
Fri, 8 Nov 2002 16:19:16 -0500 |
Team,
There is a question that follows this very long email...
For those that don't know, there is the cool format for config files and
serializing objects known as YAML (Yaml Ain't Markup Language).
http://www.yaml.org
And the Ruby library was presented by its author "Why the Lucky Stiff"
at RubyConf.new(2002). I really like how clean it is compared to XML
(easy to read, edit, etc) especially for configuration files. The
coolest thing is that the YAML parser will read in these files and
create Ruby objects for you (in other words, you don't use the parser
like in XML, just classes and objects). At the conference I downloaded
YAML Ruby library from here:
http://yaml4r.sourceforge.net/
And built a set of plugin configuration classes:
module FreeBASE
class Configuration; end
class SubsystemConfiguration; end
class PluginConfiguration; end
end
They contain the whole behavior of reading in the plugin config files
and for starting up freebase (and all the plugin dependency stuff)
A sample config file for the Debugger is:
--- !ruby/object:FreeBASE::SubsystemConfiguration
name: DebuggerSubsystem
version: 1.0
plugins:
- !ruby/object:FreeBASE::PluginConfiguration
name: Debugger
version: 1.0
autoload: (true)
require_path: plugins/Debugger/Debugger
startup_module: FreeRIDE::GUI::Debugger
start_dependencies:
GuiCore: "*"
- !ruby/object:FreeBASE::PluginConfiguration
name: DebuggerRenderFox
version: 1.0
autoload: (true)
require_path: plugins/Debugger/Render/Fox/DebuggerRenderFox
startup_module: FreeRIDE::DebuggerRenderFox
start_dependencies:
GuiRenderFox: "*"
Cool huh?
Q: Should we switch over to this format instead of XML?
If the answer is "no...let's use XML" then I will implement it in the
Configuration class. I would prefer to use YAML...but I want to know
your thoughts.
-Rich
_______________________________
Rich Kilmer, InfoEther LLC
trap("SIGINT") { raise [104, 101, 108, 108].pack("cccc") }
- [FR-devel] Latest YAML format,
Rich Kilmer <=
- RE: [FR-devel] Latest YAML format, Curt Hibbs, 2002/11/08
- Re: [FR-devel] Latest YAML format, Laurent Julliard, 2002/11/09
- [FR-devel] Latest YAML format (final round...really ;-), Rich Kilmer, 2002/11/09
- Re: [FR-devel] Latest YAML format (final round...really ;-), Laurent Julliard, 2002/11/09
- Re: [FR-devel] Latest YAML format (final round...really ;-), Hal E. Fulton, 2002/11/09
Hallo and ... Re: [FR-devel] Latest YAML format, why the lucky stiff, 2002/11/09