[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Loading one YAML object at a time.

Rick DeNatale

3/4/2007 7:41:00 PM

I'd like to write a series of YAMLized objects to a file, then read
them in one by one.

I tried this test:
rick@frodo:/public/rubyscripts$ cat multiyaml.rb
require 'yaml'

File.open('testyaml','w') do |f|
YAML.dump("string1", f)
YAML.dump("string2", f)
end

File.open("testyaml") do |f|
p YAML.load(f)
p YAML.load(f)
end

File.open("testyaml") do |f|
YAML.each_document(f) {|obj| p obj}
end

rick@frodo:/public/rubyscripts$ ruby multiyaml.rb
"string1"
false
"string1"
"string2"


It looks like YAML.load isn't properly leaving the file positioned to
read the second object. Is this a bug?

YAML.each_document seems to do the right thing, but I'm concerned
about the memory overhead for large files.

--
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denh...

36 Answers

ThomMadura

12/10/2010 6:11:00 PM

0

On 12/10/2010 12:32 PM, arah wrote:
> Richo,
>
> Are your grand parents APES ?


NO - and neither were YOURS

THEY were humans

And NO Evolutionist ever said that my grandparents were apes either

THE only people who claim that are people like YOU - theists - who never
actually read what evolution means in reality.


By the way - much of the statements in the post you made are actually
NOT TRUE

YOU see - arah - posting things from your religion is useless when
posting to educated intelligent people

WE were taught NOT To believe - unless PROOF and suppport is given -
something theists like YOU never actually provide.


However - Darwin NEVER said that man evolved from apes - it does NOT
appear IN ANY of his books.

Darwin's major Book - the full title of which is "On the Origin of
Species by Means of Natural Selection, or the Preservation of Favoured
Races in the Struggle for Life." - was about Natural SELECTION -which is
NO longer a theory - and in fact was proven to happen even before Darwin
brought the information together.

Natural Selection - the process by which life forms that have natural
immunities to disease - are most likely to remain - is observable - had
been observed - on many types of life from Bacteria - to Major plant
life - and is NO longer in question. EVEN virtually all theists accept
it as a fact of life - because it is.

AS NOTED - the creation - BY HUMANS - of hybrid plants - that use
resistant root structures UNDER Stems that would have gone extinct with
their original root structures - is proof that Natural SELECTION does
exist. THAT hybridization is used every day in the world - likely for
most of the plant crops you eat - simply underscores how stupid some
theists can be to deny it happens. IT is just that prevalent.






Evergreen the Magician

12/10/2010 6:53:00 PM

0

On alt.religion.christian, arah <arah1650@gmail.com> wrote:

> Richo,
>
> Are your grandparents APES?
>
>
> Some Differences of Human & Animal Mind:
>
> Posted by khuram
>
> There is fundamental difference between human and animal mind,
>due to which humans possess knowledge whereas animals do not.
>Actually knowledge=is the theoretical awareness of any thing or
>phenomen= on.

The idea that human's are fundamentally different from other
mammals or even vertebrates is nonsense. The old way of expressing
this illusory difference and superiority was to say that God made
us in Its image therefore we are special.

The new way is through the Darwinian evolution fantasy.

The fact is that God does not care any more for humans than any other
creature.


[delete]

Sid


--
I am a Magickal Being
My Second Spell is Innocence
http://tinyurl....
usenet4444 (AT) gmail (DOT) com

Richo

12/10/2010 9:15:00 PM

0

On Dec 11, 4:32 am, arah <arah1...@gmail.com> wrote:
> Richo,
>
> Are your grand parents APES ?
>

Sure.
Well they are all dead now - but I loved them very much and keep them
fondly in my memory.
They were very special apes - especially my granddad (my mothers
father).

> Some Differences of Human & Animal Mind:
>
<snip>
Of course there are some differences - There are differences between
Lions and Tigers but they are both obviously kinds of cats.
There are differences between Hawks and Eagles but they are both
birds.
There are differences between Humans, Chimps and Gorillas but they are
also obviously kinds of apes.

Mark.

Richo

12/10/2010 9:28:00 PM

0

On Dec 11, 5:11 am, ThomMadura <Tommad...@optonline.net> wrote:
> On 12/10/2010 12:32 PM, arah wrote:
>
> > Richo,
>
> > Are your grand parents APES ?
>
> NO - and neither were YOURS
>
> THEY were humans
>
Well humans are a kind of ape - I know traditionally we have shied
away from saying this - but it doesn't make any kind of sense
biologically.

> And NO Evolutionist ever said that my grandparents were apes either
>
Well, actually - many of them would say we are apes.
You are an ape, your wife is an ape, your children are apes - so
obviously your parents and grandparents were apes.

As Creationists are very fond of pointing out - Dogs give birth to
dogs cats give birth to cats and apes give birth to apes.

> THE only people who claim that are people like YOU - theists - who never
> actually read what evolution means in reality.
>
> By the way - much of the statements in the post you made are actually
> NOT TRUE
>
> YOU see - arah - posting things from your religion is useless when
> posting to educated intelligent people
>
> WE were taught NOT To believe - unless PROOF and suppport is given -
> something theists like YOU never actually provide.
>
> However - Darwin NEVER said that man evolved from apes - it does NOT
> appear IN ANY of his books.
>

He did note that our nearest non-human relatives were the great apes
of Africa.
From that to "we are apes" is a small logical step.
I don't see the point of trying to make a distinction here - like
saying "NO a Cheetah is NOT a cat it is a Cheetah!"

Cheetahs are obviously feline - we are obviously primates - and
particularly the branch of the primates that includes Chimps, humans
and gorillas.
In fact in makes no logical sense to call both Chimps and Gorillas
"apes" and leave us out - because we are closer to chimps than either
chimps or us are to gorillas!
So that just doesn't make any sense.

Cheers, Mark.

Richo

12/10/2010 9:40:00 PM

0

On Dec 11, 5:11 am, ThomMadura <Tommad...@optonline.net> wrote:
> On 12/10/2010 12:32 PM, arah wrote:
>
> > Richo,
>
> > Are your grand parents APES ?
>
> NO - and neither were YOURS
>
> THEY were humans
>
> And NO Evolutionist ever said that my grandparents were apes either
>

Check this out:

AronRa

http://www.youtube.com/user/AronRa#p/u/32/4...

Mark.

Richo

12/10/2010 9:46:00 PM

0

On Dec 11, 5:11 am, ThomMadura <Tommad...@optonline.net> wrote:
> On 12/10/2010 12:32 PM, arah wrote:
>
> > Richo,
>
> > Are your grand parents APES ?
>
> NO - and neither were YOURS
>
> THEY were humans
>
> And NO Evolutionist ever said that my grandparents were apes either
>

Aron Ra gives his usual brilliant explanation:

http://www.youtube.com/watch?v=4...

Mark.

SkyEyes

12/10/2010 10:30:00 PM

0

On Dec 10, 10:32 am, arah <arah1...@gmail.com> wrote:
> Richo,
>
> Are your grand parents APES ?

Sure. Humans *are* apes - one of the five "great apes." Because my
grandparents were human, my answer is yes, my grandparents were apes.

> Some Differences of Human & Animal Mind:
>
> Posted by khuram
>
> There is fundamental difference between human and animal mind, due to
> which humans possess ‘knowledge’ whereas animals do not. Actually
> ‘knowledge’ is the ‘theoretical awareness’ of any thing or phenomenon.

Just stop right there. You're already telling lies.

> Only humans are theoretically aware about their surrounding
> environment as well as about their ownselves, so only humans possess
> ‘knowledge’.

This is untrue on its face.

I suggest you read up on current thinking in animal behavior before
you start spouting this bullshit. There isn't *nearly* the difference
between the human and animal mind you seem to think there is.

Brenda Nelson, A.A.#34
BAAWA Knight of the Golden Litterbox
EAC Professor of Feline Thermometrics and Cat-Herding
skyeyes nine at cox dot net OR
skyeyes nine at yahoo dot com OR
skyeyes nine at gmail dot com


ThomMadura

12/11/2010 12:38:00 PM

0

On 12/10/2010 1:53 PM, Sidney Lambe wrote:
> On alt.religion.christian, arah<arah1650@gmail.com> wrote:
>
>> Richo,
>>
>> Are your grandparents APES?
>>
>>
>> Some Differences of Human& Animal Mind:
>>
>> Posted by khuram
>>
>> There is fundamental difference between human and animal mind,
>> due to which humans possess knowledge whereas animals do not.
>> Actually knowledge=is the theoretical awareness of any thing or
>> phenomen= on.
>
> The idea that human's are fundamentally different from other
> mammals or even vertebrates is nonsense. The old way of expressing
> this illusory difference and superiority was to say that God made
> us in Its image therefore we are special.
>
> The new way is through the Darwinian evolution fantasy.
>
> The fact is that God does not care any more for humans than any other
> creature.

THe fact is that SIDNEY would have NO WAY of knowing this is true

IT IS CERTAINLY not a fact - that he can prove

ThomMadura

12/11/2010 1:07:00 PM

0

On 12/10/2010 4:27 PM, Richo wrote:
> On Dec 11, 5:11 am, ThomMadura<Tommad...@optonline.net> wrote:
>> On 12/10/2010 12:32 PM, arah wrote:
>>
>>> Richo,
>>
>>> Are your grand parents APES ?
>>
>> NO - and neither were YOURS
>>
>> THEY were humans
>>
> Well humans are a kind of ape


Actually - Humans are part of the PRIMATES - which ALSO includes the
apes and monkeys - and OTHER animals - including Lemurs.
However - we are NOT actually apes. THEy are a different animal - we are
HUMANS











>
>> And NO Evolutionist ever said that my grandparents were apes either
>>
> Well, actually - many of them would say we are apes.



No - they say we are primates - as are apes




> You are an ape, your wife is an ape, your children are apes - so
> obviously your parents and grandparents were apes.


Ans what is YOUR EDUCATIONAL level you have attained to make this
statement - ?



>
> As Creationists are very fond of pointing out - Dogs give birth to
> dogs cats give birth to cats and apes give birth to apes.



And HUMANS give birth to HUMANS


>
>> THE only people who claim that are people like YOU - theists - who never
>> actually read what evolution means in reality.
>>
>> By the way - much of the statements in the post you made are actually
>> NOT TRUE
>>
>> YOU see - arah - posting things from your religion is useless when
>> posting to educated intelligent people
>>
>> WE were taught NOT To believe - unless PROOF and suppport is given -
>> something theists like YOU never actually provide.
>>
>> However - Darwin NEVER said that man evolved from apes - it does NOT
>> appear IN ANY of his books.
>>
>
> He did note that our nearest non-human relatives were the great apes
> of Africa.



But he never said we evolved from them - SO my statement is true




> From that to "we are apes" is a small logical step.


Still - it is ONE that he never said

To quote him - on something he never said - is simply being dishonest

Christopher A. Lee

12/11/2010 4:30:00 PM

0

On Sat, 11 Dec 2010 08:06:41 -0500, ThomMadura
<Tommadura@optonline.net> wrote:

>On 12/10/2010 4:27 PM, Richo wrote:
>> On Dec 11, 5:11 am, ThomMadura<Tommad...@optonline.net> wrote:
>>> On 12/10/2010 12:32 PM, arah wrote:
>>>
>>>> Richo,
>>>
>>>> Are your grand parents APES ?
>>>
>>> NO - and neither were YOURS
>>>
>>> THEY were humans
>>>
>> Well humans are a kind of ape
>
>Actually - Humans are part of the PRIMATES - which ALSO includes the
>apes and monkeys - and OTHER animals - including Lemurs.
>However - we are NOT actually apes. THEy are a different animal - we are
>HUMANS

We are actually African Apes.

It is imossible to draw up a cladogram (ancestral tree structure) for
Apes which excludedsMan, because the split between the human's
ancestor and the chimpanzee/bonobo's ancestor is more recent than the
split from the other ancestral apes.

This essay by Dawkins is all over the net. Scroll down just before
half way for diagram 7.1 where he illustrates this.

http://www.animal-rights-library.com/texts-m/daw...

[the Animal Rights Library site was the first one in the search
results]
>
>
>
>
>
>
>
>
>
>>
>>> And NO Evolutionist ever said that my grandparents were apes either
>>>
>> Well, actually - many of them would say we are apes.
>
>
>
>No - they say we are primates - as are apes
>
>
>
>
>> You are an ape, your wife is an ape, your children are apes - so
>> obviously your parents and grandparents were apes.
>
>
>Ans what is YOUR EDUCATIONAL level you have attained to make this
>statement - ?
>
>
>
>>
>> As Creationists are very fond of pointing out - Dogs give birth to
>> dogs cats give birth to cats and apes give birth to apes.
>
>
>
>And HUMANS give birth to HUMANS
>
>
>>
>>> THE only people who claim that are people like YOU - theists - who never
>>> actually read what evolution means in reality.
>>>
>>> By the way - much of the statements in the post you made are actually
>>> NOT TRUE
>>>
>>> YOU see - arah - posting things from your religion is useless when
>>> posting to educated intelligent people
>>>
>>> WE were taught NOT To believe - unless PROOF and suppport is given -
>>> something theists like YOU never actually provide.
>>>
>>> However - Darwin NEVER said that man evolved from apes - it does NOT
>>> appear IN ANY of his books.
>>>
>>
>> He did note that our nearest non-human relatives were the great apes
>> of Africa.
>
>
>
>But he never said we evolved from them - SO my statement is true
>
>
>
>
>> From that to "we are apes" is a small logical step.
>
>
>Still - it is ONE that he never said
>
>To quote him - on something he never said - is simply being dishonest