[REBOL] bug ? Re:(3)

2000-07-12 Thread giesse

[EMAIL PROTECTED] wrote:

> What I'm saying is that it is not consistent with the philosophy in
> Rebol. Datasets are not a datatype, it is a human convention. Take
> note of the help message : arg must be a series. Files are read as
> series. But yet difference won't work on them.

It does:

>> difference "abcd" "cdef"
== "abef"

Regards,
   Gabriele.
-- 
Gabriele Santilli <[EMAIL PROTECTED]> - Amigan - REBOL programmer
Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/




[REBOL] bug ? Re:(3)

2000-07-12 Thread yaozhang

yeee...i was thinking you 'read the files so 'difference on the
string! contents

and rebol seems prefer {"} over "^""

cheers,
-z

--- [EMAIL PROTECTED] wrote:
> 
> Sorry, haven't read you properly. I realized my previous post was
> not
> about what you were talking about. And I think you might be right,
> too. I'll check it more thoroughly. Thanks !
> 
> > i would guess those are characters exist in one file but not
> another?
> > and it use {} to brace cause " is one of the missing char.
> 
> 
> > -z
> 
> > --- [EMAIL PROTECTED] wrote:
> >> 
> >> Difference is a high-level function that returns the differences
> >> between two datasets. But datasets do not exist in Rebol
> >> (they're not a datatype), so difference accepts any series
> >> including
> >> strings. However, when you use it on the content of two files
> (read
> >> %file), you get a strange result :
> >> 
> >> >> difference file1 file2
> >> == {:"39%.@{}!(^^4567)~}  
> >> 
> >> --
> >> [EMAIL PROTECTED]
> >> http://perso.worldonline.fr/mutant
> >> 
> >> 
> >> 
> 
> 
> > __
> > Do You Yahoo!?
> > Get Yahoo! Mail – Free email you can access from anywhere!
> > http://mail.yahoo.com/
> 
> 
> --
> [EMAIL PROTECTED]
> http://perso.worldonline.fr/mutant
> 
> 
> 


__
Do You Yahoo!?
Get Yahoo! Mail – Free email you can access from anywhere!
http://mail.yahoo.com/




[REBOL] bug ? Re:(3)

2000-07-11 Thread ingo

Hi Daniel,

what exactly _are_ file1 and file2? You are calling them files,
but are you sure they're files? As I see it, the are not. Lessee
what happens here ...

REBOL/Core 2.3.0.4.2 24-Jun-2000
Copyright 2000 REBOL Technologies.  All rights reserved.
>> difference file1 file2
** Script Error: file1 has no value.
** Where: difference file1 file2
>> difference %file1 %file2
== "12"
>> difference "file1" "file2"
== "12"



>> difference file1 file2
== {:1235!"%?RUGHCFT89}

So, 'file1 'file2 are normally just words, that can't be
used for difference, %file1 %file2 work just like strings,
as expected, cause %file1 is a series. 

And now, about my "magic", it was just:

>> file1: {:12374576$!"-&)(/%&)%%%} file2: {)?&/$&()RUGHCFTR(/87694} 

And this may be, what you've done:

file1: read %somefile
file2: read %some_other_file

And then difference worked on the _contents_ of the files,
which were read as series, and referenced as 'file1 / 2


regards,

Ingo



Once upon a time [EMAIL PROTECTED] spoketh thus:
> 
> What I'm saying is that it is not consistent with the philosophy in
> Rebol. Datasets are not a datatype, it is a human convention. Take
> note of the help message : arg must be a series. Files are read as
> series. But yet difference won't work on them.
> Inconsistent.
> 

Quoted from an earlier mail:
> Difference is a high-level function that returns the differences   
> between two datasets. But datasets do not exist in Rebol
> (they're not a datatype), so difference accepts any series including
> strings. However, when you use it on the content of two files (read
> %file), you get a strange result :
 
> >> difference file1 file2
> == {:"39%.@{}!(^^4567)~}




[REBOL] bug ? Re:(3)

2000-07-11 Thread lmecir

Hi,


>
> What I'm saying is that it is not consistent with the philosophy
in
> Rebol. Datasets are not a datatype, it is a human convention.
Take
> note of the help message : arg must be a series. Files are read
as
> series. But yet difference won't work on them.
> Inconsistent.
>

it works as described, not as you expect:

>> difference %file1 %file2
== "12"

what gets compared is the %file1 and %file2 as the series, not
their contents.

Ladislav




[REBOL] bug ? Re:(3)

2000-07-11 Thread mdb

Hello,

Isn't the following consistent?

Mike.


 read %a.txt
== {1
2
3
4
5
6}
>> read %b.txt
== {1
2
3
5
6}
>> difference read %a.txt read %b.txt
== "4"
>>