indeyets / syck Goto Github PK
View Code? Open in Web Editor NEWswift yaml for ruby, python, perl, etc.
Home Page: http://code.whytheluckystiff.net/syck/
License: Other
swift yaml for ruby, python, perl, etc.
Home Page: http://code.whytheluckystiff.net/syck/
License: Other
. syck . [ version 0.70 ] INSTALLATION ./bootstrap ./configure make make check sudo make install If the unit tests don't pass, notify me immediately. This distribution is tested on FreeBSD and Linux. I don't release it unless the tests pass on those machines. If tests aren't passing, then that's a problem. ABOUT Syck is the Scripters' YAML Cobble-Yourself-a-Parser Kit. I don't much care if the acronym works, as long as the library does! The whole point of Syck is to make parsing and emitting YAML very simple for scripting languages through C bindings. It doesn't strive to be a pull parser or very extendible. It just is concerned with loading a YAML document into a C structure which can be easily translated into a scripting language's internal native data type. RUBY INSTALLATION You don't need to `make install', but please configure and make libsyck as outlined above. cd ext/ruby ruby install.rb config ruby install.rb setup sudo ruby install.rb install Syck works best with Ruby. Ruby's symbol table is leveraged, as well as Ruby's VALUE system. (You can read more about that below.) Syck is now included with Ruby (beginning with Ruby 1.8.0.) Please voice your support for Syck/YAML in Ruby distributions on the various platforms. PYTHON INSTALLATION You'll need to `make install' as described above. cd ext/python/ python setup.py build sudo python setup.py install PHP INSTALLATION You'll need to `make install' as described above. ln -s lib include # or cp -r lib include cd ext/php/ phpize ./configure --with-syck=../.. make sudo make install HOW SYCK IS SO GREAT For example, in Ruby everything evaluates to a VALUE. I merely supply a handler to Syck that will take a SyckNode and transform it into a Ruby VALUE. A simple Ruby YAML::load could be built like so: static VALUE YAML_load( VALUE str ) { SyckParser* parser; parser = syck_new_parser(); syck_parser_handler( parser, YAML_handler ); return syck_parse( parser, str ); } static VALUE YAML_handler( SyckNode* node ) { switch( node->kind ) { case SYCK_MAP: VALUE key; VALUE h = rb_hash_new(); for ( key = node->content[0]; key != null; key++ ) { rb_hash_set( h, key, key++ ); } return h; break; } } For most C developers, it should be a no-brainer to bring basic YAML serialization to PHP, Tcl, Cocoa, etc. Instructions for using Syck's API are available in the README.EXT in this very same directory.
This patch...
https://gist.github.com/raw/731929/0001-Enabled-automatic-building-of-regular-or-universal-l.patch
I am running on ubuntu 12.10 LTS. I have a fresh clone of syck and I am trying to build it. I followed the installation instructions in the readme,
./bootstrap
./configure
make && make check
One test fails during make check. Here is the output,
jdowner@mirkwood:~/repos/syck$ make check
Making check in lib
make[1]: Entering directory /home/jdowner/repos/syck/lib' make[1]: Nothing to be done for
check'.
make[1]: Leaving directory /home/jdowner/repos/syck/lib' Making check in tests make[1]: Entering directory
/home/jdowner/repos/syck/tests'
make check-TESTS
make[2]: Entering directory `/home/jdowner/repos/syck/tests'
....
OK (4 tests)
PASS: test-basic
......
OK (6 tests)
PASS: test-parse
Error at [Line 1, Col 4]: TAB found in your indentation, please remove
Error at [Line 1, Col 4]: syntax error, unexpected $end, expecting YAML_INDENT or YAML_IEND
F..................................................
There was 1 failure:
!!!FAILURES!!!
Runs: 51 Passes: 50 Fails: 1
FAIL: test-yts
..
OK (2 tests)
#1 of 4 tests failed
make[2]: *** [check-TESTS] Error 1
make[2]: Leaving directory /home/jdowner/repos/syck/tests' make[1]: *** [check-am] Error 2 make[1]: Leaving directory
/home/jdowner/repos/syck/tests'
make: *** [check-recursive] Error 1
The following code leads to an EXC_BAD_ACCESS:
NSArray *a = [NSArray arrayWithObject: @"42"];
[a yamlDescription];
This happens consistently when trying to create the YAML description of a non-empty array at top-level.
$ make check
Making check in lib
make[1]: Entering directory `/home/jadams1/git/syck/lib'
make[1]: Nothing to be done for `check'.
make[1]: Leaving directory `/home/jadams1/git/syck/lib'
Making check in tests
make[1]: Entering directory `/home/jadams1/git/syck/tests'
make check-TESTS
make[2]: Entering directory `/home/jadams1/git/syck/tests'
....
OK (4 tests)
PASS: test-basic
......
OK (6 tests)
PASS: test-parse
Error at [Line 1, Col 4]: TAB found in your indentation, please remove
Error at [Line 1, Col 4]: syntax error, unexpected $end, expecting YAML_INDENT or YAML_IEND
F..................................................
There was 1 failure:
1) YtsFoldedScalars_7: expected <30> but was <40>
!!!FAILURES!!!
Runs: 51 Passes: 50 Fails: 1
FAIL: test-yts
..
OK (2 tests)
PASS: test-emit
===================
1 of 4 tests failed
===================
make[2]: *** [check-TESTS] Error 1
make[2]: Leaving directory `/home/jadams1/git/syck/tests'
make[1]: *** [check-am] Error 2
make[1]: Leaving directory `/home/jadams1/git/syck/tests'
make: *** [check-recursive] Error 1
With recent updates to the packages gcc, glibc, etc the project cannot be compiled. See attached build log with error.
https://gist.github.com/3169285
Build environment:
Arch Linux
Kernel: Linux 3.4.6-1-ARCH #1 SMP PREEMPT Fri Jul 20 08:21:26 CEST 2012 x86_64 GNU/Linux
gcc: 4.7.1
bison: 2.6
flex: 2.5.36
automake: 1.12.2
autoconf: 2.69
m4: 1.4.16
make: 3.82
glibc: 2.16.0
Thanks for taking over the project. I am using Macports to compile syck on Mac OS X and updated the portfile to use your project.
Right now I've got it pointing to the 0.70 "download". Are you interested in having me add an official Portfile to the project so we can keep the Macports community up-to-speed with the latest Syck?
LMK I am glad to contribute.
Alan
Josephs-MacBook-Pro:Formula joe$ curl -IL https://cloud.github.com/downloads/indeyets/syck/syck-0.70.tar.gz
curl: (6) Could not resolve host: cloud.github.com
I'm trying to compile 0.70 on CentOS 5.4 (x86_64) and make check identifies a failed test.
Turns out the same issue also occurs on OS X 10.5 Leopard/Intel. Compile logs follow.
CentOS:
[compiler@compiler syck-0.70]$ make clean; ./bootstrap ; ./configure; make; make check
Making clean in tests
make[1]: Entering directory /home/compiler/rpmbuild/BUILD/syck-0.70/tests' test -z "test-basic test-parse test-yts test-emit" || rm -f test-basic test-parse test-yts test-emit rm -f *.o make[1]: Leaving directory
/home/compiler/rpmbuild/BUILD/syck-0.70/tests'
Making clean in lib
make[1]: Entering directory /home/compiler/rpmbuild/BUILD/syck-0.70/lib' test -z "libsyck.a" || rm -f libsyck.a rm -f *.o make[1]: Leaving directory
/home/compiler/rpmbuild/BUILD/syck-0.70/lib'
Making clean in .
make[1]: Entering directory /home/compiler/rpmbuild/BUILD/syck-0.70' make[1]: Nothing to be done for
clean-am'.
make[1]: Leaving directory `/home/compiler/rpmbuild/BUILD/syck-0.70'
/home/compiler/rpmbuild/BUILD/syck-0.70' Making all in lib make[2]: Entering directory
/home/compiler/rpmbuild/BUILD/syck-0.70/lib'/home/compiler/rpmbuild/BUILD/syck-0.70/lib' Making all in tests make[2]: Entering directory
/home/compiler/rpmbuild/BUILD/syck-0.70/tests'/home/compiler/rpmbuild/BUILD/syck-0.70/tests' make[2]: Entering directory
/home/compiler/rpmbuild/BUILD/syck-0.70'/home/compiler/rpmbuild/BUILD/syck-0.70' make[1]: Leaving directory
/home/compiler/rpmbuild/BUILD/syck-0.70'/home/compiler/rpmbuild/BUILD/syck-0.70/lib' make[1]: Nothing to be done for
check'./home/compiler/rpmbuild/BUILD/syck-0.70/lib' Making check in tests make[1]: Entering directory
/home/compiler/rpmbuild/BUILD/syck-0.70/tests'OK (4 tests)
PASS: test-basic
......
OK (6 tests)
PASS: test-parse
Error at [Line 1, Col 4]: TAB found in your indentation, please remove
Error at [Line 1, Col 4]: syntax error, unexpected $end, expecting YAML_INDENT or YAML_IEND
F..................................................
There was 1 failure:
!!!FAILURES!!!
Runs: 51 Passes: 50 Fails: 1
FAIL: test-yts
..
OK (2 tests)
#1 of 4 tests failed
make[2]: *** [check-TESTS] Error 1
make[2]: Leaving directory /home/compiler/rpmbuild/BUILD/syck-0.70/tests' make[1]: *** [check-am] Error 2 make[1]: Leaving directory
/home/compiler/rpmbuild/BUILD/syck-0.70/tests'
make: *** [check-recursive] Error 1
[compiler@compiler syck-0.70]$ uname -a
Linux compiler.aresdirect.com 2.6.18-164.15.1.el5 #1 SMP Wed Mar 17 11:30:06 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
[compiler@compiler syck-0.70]$ gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux
Thread model: posix
gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)
OS X:
[antbox:/tmp/syck-0.70] mhughes% make check
Making check in lib
make[1]: Nothing to be done for `check'.
Making check in tests
make check-TESTS
....
OK (4 tests)
PASS: test-basic
......
OK (6 tests)
PASS: test-parse
Error at [Line 1, Col 4]: TAB found in your indentation, please remove
Error at [Line 1, Col 4]: syntax error, unexpected $end, expecting YAML_INDENT or YAML_IEND
F..................................................
There was 1 failure:
!!!FAILURES!!!
Runs: 51 Passes: 50 Fails: 1
FAIL: test-yts
..
OK (2 tests)
#1 of 4 tests failed
make[2]: *** [check-TESTS] Error 1
make[1]: *** [check-am] Error 2
make: *** [check-recursive] Error 1
[antbox:/tmp/syck-0.70] mhughes% uname -a ; gcc -v
Darwin antbox 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.41/RELEASE_I386 i3861/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-arch=apple --with-tune=generic --host=i686-apple-darwin9 --target=i686-apple-darwin9
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5484
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5484)
COPYING file says that syck is distributed under BSD license, however MIT license text is listed instead (see https://en.wikipedia.org/wiki/BSD_licenses, https://en.wikipedia.org/wiki/MIT_License). Though license terms are similar if not equal, it'd be nice to clarify which specific license is used. I, as package maintainer, am quite confused which license I should specify in the package metadata.
Hi!
I noticed that in the COPYING file, it is indicated that the files are licensed under the BSD or D&R license. However, the text below the title "BSD License" is that of the Expat (former MIT) license. Given that most of the projects of why the luck stiff were licensed under this MIT/Expat license, should we consider that the license to use is Expat instead of BSD?
Best regards,
Cédric
Compilation fails with automake-1.13. It works with automake-1.11
Output after running ./bootstrap
https://gist.github.com/4502058
As noted by josegonzalez/homebrew-php#330, a new release may fix that users issue.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.