From: Simon Wistow Date: 14:35 on 23 Jun 2006 Subject: YAML and its parsers I have an app. It stores some data (in this case CVS commits) as YAML. Don't ask. Then something else consumes the YAML and turns it into RSS. Again, don't ask. So YAML.pm (for these are in Perl) creates a YAML file for me. Then, int eh RSS generator it reads it back in. And throws an epi claiming it's not valid YAML. Some diagnostics indicates that it may be a problem with new lines. I try upgrading YAML (which imports half of CPAN in a scary way that makes me nervous) and it still doesn't work. I try YAML::Syck and that only parses out the first record. I try YAML::Tiny but that claims not to support 'partial-line comments'. WT and might I also add F?
From: Anton Berezin Date: 14:53 on 23 Jun 2006 Subject: Re: YAML and its parsers On Fri, Jun 23, 2006 at 02:35:15PM +0100, Simon Wistow wrote: > So YAML.pm (for these are in Perl) creates a YAML file for me. Then, int > eh RSS generator it reads it back in. And throws an epi claiming it's not > valid YAML. Some diagnostics indicates that it may be a problem with new > lines. > > I try upgrading YAML (which imports half of CPAN in a scary way that makes > me nervous) and it still doesn't work. I try YAML::Syck and that only > parses out the first record. I try YAML::Tiny but that claims not to > support 'partial-line comments'. Either I did not understand you correctly, or your hate is somewhat misplaced. It looks like you should hate only YAML.pm, since several different parsers were unable to parse what it generated, right? \Anton.
From: A. Pagaltzis Date: 16:14 on 23 Jun 2006 Subject: Re: YAML and its parsers * Simon Wistow <simon@xxxxxxxxxx.xxx> [2006-06-23 15:40]: > WT and might I also add F? Ah, one of my favourite hates. I've noted this elsewhere: the YAML spec is more complex than the XML 1.0 spec. 'Nuff said. I prefer JSON for light amounts of structured data. The syntax is far clunkier, but I feel much more at ease putting my trust into a format that can be specified exhaustively on a single page. If worst comes to worst, I know I can write a reasonably robust parser for it with finite effort. You know the clichéd anecdote about how the US space programme spent millions of dollars creating a pen that can write upside down and underwater when they discovered that normals pens don't work in zero G, and the Russians just used pencils? When it comes to technology, I'm very much a Russian. Regards,
From: demerphq Date: 16:20 on 23 Jun 2006 Subject: Re: YAML and its parsers On 6/23/06, A. Pagaltzis <pagaltzis@xxx.xx> wrote: > * Simon Wistow <simon@xxxxxxxxxx.xxx> [2006-06-23 15:40]: > > WT and might I also add F? > > Ah, one of my favourite hates. I've noted this elsewhere: the > YAML spec is more complex than the XML 1.0 spec. 'Nuff said. > > I prefer JSON for light amounts of structured data. The syntax is > far clunkier, but I feel much more at ease putting my trust into > a format that can be specified exhaustively on a single page. If > worst comes to worst, I know I can write a reasonably robust > parser for it with finite effort. > > You know the clich=E9d anecdote about how the US space programme > spent millions of dollars creating a pen that can write upside > down and underwater when they discovered that normals pens don't > work in zero G, and the Russians just used pencils? Grease pencils actually. One wouldnt want little bits of graphite floating around the capsule now would you? Yves --=20 perl -Mre=3Ddebug -e "/just|another|perl|hacker/"
From: Chris Devers Date: 22:33 on 23 Jun 2006 Subject: Re: YAML and its parsers On 23 Jun 2006, at 11:14 AM, A. Pagaltzis wrote: > You know the clich=E9d anecdote about how the US space programme > spent millions of dollars creating a pen that can write upside > down and underwater when they discovered that normals pens don't > work in zero G, and the Russians just used pencils? Yes, but... The lesson of this anecdote is a valid one, that we sometimes expend a great deal of time, effort, and money to create a "high-tech" solution to a problem, when a perfectly good, cheap, and simple solution is right before our eyes. The anecdote offered above isn't a real example of this syndrome, however. Fisher did ultimately develop a pressurized pen for use by NASA astronauts (now known as the famous "Fisher Space Pen"), but both American and Soviet space missions initially used pencils, NASA did not seek out Fisher and ask them to develop a "space pen," Fisher did not charge NASA for the cost of developing the pen, and the Fisher pen was eventually used by both American and Soviet astronauts. http://www.snopes.com/business/genius/spacepen.asp But by all means don't let that get in your way. --=20 Chris Devers=
From: A. Pagaltzis Date: 04:55 on 24 Jun 2006 Subject: Re: YAML and its parsers * Chris Devers <cdevers@xxxxx.xxx> [2006-06-23 23:35]: > Yes, but... [ snip ] I did say clichéd, no? I'm aware of the facts. "The McDonalds lawsuit" was not at all frivolous, either. Coca-Cola becoming bottled because some random stranger came up with the idea is complete bunk. Etc., etc. All soundbite anecdotes fall apart if you examine them closely; I was just using that one as an illustration. Tell me another way to convey the same point in 40-odd words and I'll concede the issue. :-) Regards,
From: Chris Devers Date: 15:08 on 24 Jun 2006 Subject: Re: YAML and its parsers On 23 Jun 2006, at 11:55 PM, A. Pagaltzis wrote: > * Chris Devers <cdevers@xxxxx.xxx> [2006-06-23 23:35]: >> Yes, but... [ snip ] > > I did say clich=E9d, no? I'm aware of the facts. [...] > Tell me another way to convey the same point in > 40-odd words and I'll concede the issue. :-) Call it what it is up front and we'll all know what you mean: "You know the clich=E9d urban legend about how the US space = programme..." :-) --=20 Chris Devers
From: A. Pagaltzis Date: 15:29 on 24 Jun 2006 Subject: Re: YAML and its parsers * Chris Devers <cdevers@xxxxx.xxx> [2006-06-24 16:10]: > Call it what it is up front and we'll all know what you mean: > > "You know the clichéd urban legend about how the US space > programme..." > > :-) Good point. :-) Regards,
From: peter (Peter da Silva) Date: 13:58 on 24 Jun 2006 Subject: Re: YAML and its parsers > You know the clichéd anecdote about how the US space programme > spent millions of dollars creating a pen that can write upside > down and underwater when they discovered that normals pens don't > work in zero G, and the Russians just used pencils? The US space program did no such thing. The Fisher Pen Company did, and made a mint out of the "space pen". Before the space pen, both Americans and Russians used pencils. Afterwards, they both used the space pen. Why? You really want flecks of wood and graphite dust floating around in zero gee? The graphite accumulating on your circuit boards and shorting things out, and the wood's flammable, and they started out with a pure oxygen atmosphere. Uh-uh.
Generated at 10:27 on 16 Apr 2008 by mariachi