Ask a Question related to Ruby, Design and Development.
-
why the lucky stiff #1
[ANN] Syck 0.41 -- 95% Support, Bytecode, Bugfixes
friends, countrymen:
Happy to announce Syck 0.41. Syck is the YAML toolkit, the undying
force that backs Ruby 1.8's YAML support. This distribution provides
support for YAML parsing in Python, PHP, and Ruby 1.6.x/1.7.x as well.
This latest release is a world of improvement over the 0.35 release.
Numerous bugfixes from users, improvements that bring the parser to
approximately 95% of the YAML spec, and preliminary support for YAML
bytecode parsing. In addition, Clark Evan's bytecode emitter is
included.
Please note that the Python extension is in some disarray as stream
parsing and type handling are in the works still. Some of this code is still
beta software and here's my disclaimer as far as that goes: I'm not
going to say "Use at your own risk" because I don't want this library to
be risky. If you trip on something, I'll share the liability by
repairing things as quickly as I can. Your responsibility is to report
the inadequacies. All the quicker we can those pieces out of beta.
Release notes below.
_why
---
released: { name: Syck, version: 0.41 }
for: [ Ruby, PHP, Python ]
by: why the lucky stiff
about: >
Syck is a YAML parser, an extension for scripting
languages, written in C.
So what is YAML? YAML is a new language for data.
Describe objects in plain text. Load the data into
your scripting language as arrays, dictionaries,
classes, or primitives.
links:
YAML: [url]http://www.yaml.org/[/url]
YAML Cookbook: [url]http://yaml4r.sf.net/cookbook/[/url]
YAML Type Repository: [url]http://yaml.org/type/[/url]
YAML Specification: [url]http://yaml.org/spec/[/url]
Syck: [url]http://www.whytheluckystiff.net/syck/[/url]
Syck Benchmarks: [url]http://www.whytheluckystiff.net/arch/2003/03/19[/url]
Tarball @ SourceForge: [url]http://aleron.dl.sourceforge.net/sourceforge/yaml4r/syck-0.41.tar.gz[/url]
status: >
Syck is about 95% compliant with the YAML spec. Largely, small
issues remain.
The extensions are quite usable. Ruby, PHP and Python
can load from a string containing YAML.
Ruby has support for stream loading, type handling, YPath, Okay.
This release includes an amount of Ruby code comprising the 0.60
release of YAML.rb.
benchmarks: >
Syck is quite speedy, although not as swift as most language's
native serialization.
Syck runs at about:
30-35% of the speed of Ruby's Marshal.
35-90% of the speed of PHP's deserialize().
600% of the speed of Python's Pickle.
33-40% of the speed of Python's cPickle.
(Based on various types of structured data.)
installation: >
Syck contains working extensions for the Ruby, PHP, and Python
languages. Each requires compilation of the libsyck library,
followed by compilation of the extension.
To compile libsyck, first download libsyck.
tar xzvf syck-0.41.tar.gz
cd syck-0.41
./configure
make
sudo make install
To install the Ruby extension:
cd ext/ruby
ruby install.rb config
ruby install.rb setup
sudo ruby install.rb install
To install the Python extension:
cd ext/python
python setup.py build
sudo python setup.py install
To install the PHP extension:
sh make_module.sh
sudo make install (if you weren't root during make_module.sh)
php -q syck.php
examples:
To load this document in Ruby: |
($:~)$ irb=> true>> require 'yaml'=> {"status"=>"Syck is about 60% compliant ..."}>> YAML::load( File.open( 'syck-0.41.yml' ) )
To load this document in PHP: |
($:~)$ php -a
Interactive mode enabled
<? dl( 'syck.so' ); print_r( syck_load( implode( '', file( 'syck-0.41.yml' ) ) ) ); ?>
.. php then outputs ..
X-Powered-By: PHP/4.2.3
Content-type: text/html
Array
(
[released] => Array
(
[name] => Syck
[version] => 0.41
)
.. and so on ..
To load this document in Python: |
($:~)$ python
Python 2.1.3 (#1, Jul 11 2002, 17:52:24)
[GCC 2.95.3 20010315 (release) [FreeBSD]] on freebsd4
Type "copyright", "credits" or "license" for more information.{'by': 'why the lucky stiff', ... }>>> import syck
>>> f = open( 'syck-0.41.yml' )
>>> syck.load( f.read() )
why the lucky stiff Guest
-
Does FMS 2 support UDP?
Hello all, I'm looking for some clarification here - I'm a Director developer and sending info across the network with UDP instead of a reliable... -
Perl B:Bytecode anyone ?
Hi, I've been trying to compile perl scripts into bytecode. Now, from what I understand I can use either perlcc -B script.pl or perl -MO=bytecode... -
syck compiling error on HPUX - aCC
I am getting the following error when compiling ruby-1.8 HP-UX B.11.00 compiling syck aCC -Ae +Z -g +Z -I. -I/opt/ruby-1.8.0 -I/opt/ruby-1.8.0... -
Ruby => Rite, AST => Bytecode?
Matz and fellow Rubyists, On pragprog, we're sort-of discussing the creation of a new language ("Pragmatic") as an exercise in extending one's... -
Syck 0.35 + YAML.rb 0.60 -- the 1st stable release
On Fri, Jun 06, 2003 at 06:15:58AM +0900, why the lucky stiff wrote: I had a problem on RedHat 8.0 with ruby-1.6.7: ruby: relocation error:...



Reply With Quote

