[REBOL] tuple math

2000-05-08 Thread bobr

 REBOL 2.2.0.4.2
...

 a: 192.9.200.211
== 192.9.200.211
 a + 1
== 193.10.201.212


what justification is there to changing
-all- the integer fields? I expected at most to
change either the highest order or the lowest order
integer field by this operation - not all of them.


 a: 192.9.255.1
== 192.9.255.1
 a + 1
== 193.10.255.2
 a + 0.0.1.0
== 192.9.255.1

humm, neither of these does what I expected.
What I was looking for was some form of carry propagation. 


Now there are 2 contexts that I consider using tuples for:
IP addrs and version numbers. I would welcome the list to show
some alternate uses for them. [big math like bigint seems out -- too bad]

As internet addresses, I can reasonably stay away
from adding + 1 and instead use 0.0.0.1 to get the next higher IP
addr to try.   The lack of carry is probably not going to be discovered
by other programmers using them for IP because 255 becomes a 
broadcast address in most systems so logic is likely
in place [I hope others remember to look...] before this value
is taken on.

no wrap or carry?
My gut tells me it is wrong to have to check
my results after every addition.

so here is what I am looking for:
- an example of a use for the current behavior which warrants
adding math checks to all other uses.




;# mailto: [EMAIL PROTECTED]




[REBOL]

2000-05-08 Thread KenNeedham

unsubscribe 
end


This email and any files transmitted with it are confidential and intended solely for 
the use of the addressee. It may contain privileged information that is exempt from 
disclosure by law. If you are not the addressee, please note that unauthorised 
dissemination, copying or accessing of this email and its contents is prohibited and 
may be unlawful. If you have received this email in error please inform us immediately 
by telephone on
 +44 (0)1428 727476
 
Although this email has been created on a machine protected by Anti-Virus software, we 
cannot be held responsible for any viruses or other material transmitted with or as 
part of this email




[REBOL] list test...

2000-05-08 Thread giesse

Sorry, I had some problems posting, I'm just trying if it works
now...

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




[REBOL] Re: load/next - bug?! (repost)

2000-05-08 Thread giesse

Hello [EMAIL PROTECTED]!

On 06-Mag-00, you wrote:

 a the "REBOL-header" is skipt even if it is somewhere in the
 a code, even in nested blocks?!
 a when at start of line!
 a this means i have to check for occasional REBOL everywhere in
 a my save - databases?!
 a Bug, yes?

No, I think this is intended behaviour. (rip works thanks to this,
too.) If the string contains a REBOL header, it is assumed to be a
script... but perhaps this should happen for files only, and not
for strings?

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




[REBOL] SunOS 5.6? Re:(2)

2000-05-08 Thread zoon

[EMAIL PROTECTED] wrote:
 
  Any plans to support SunOS 5.6 or whatever (this happens to be the OS my virtual
  host uses ;-)
 
 SunOS 5.6 = Solaris 2.6.  Try the Solaris binary and see if it works
 for you.
 

shortly after posting that message I found this out, downloaded the Solaris
binary, installed it and vanilla 0.3.0, and now have them both running happily
on my virtual host ;-) Thanks for the reply...

-- 
Pete Wason|"LWATPLOTG"|[EMAIL PROTECTED]|[EMAIL PROTECTED]|CUCUG|TA|PHX

Get a cool electronic checking account at: 
https://preview.x.com/new_account.asp?[EMAIL PROTECTED]




[REBOL] list test... Re:(2)

2000-05-08 Thread Petr . Krenzelok



[EMAIL PROTECTED] wrote:

 - Original Message -
 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, May 08, 2000 8:47 PM
 Subject: [REBOL] list test...

  Sorry, I had some problems posting, I'm just trying if it works
  now...
 
  Please ignore,
 Gabriele.
  --
  Gabriele Santilli [EMAIL PROTECTED] - Amigan - REBOL programmer
  Amiga Group Italia sez. L'Aquila --- http://www.amyresource.it/AGI
 
 

 The errors seem to be more common when replying rather than when posting
 new.messages. So consider this a reply test, and ignore also

Yes, I sent reply to Rebert's post on /Command ml and got an answer from
@rebol.net. Some strange kind of redirection ...

-pekr-



 Cheers,

 Allen K




[REBOL] R: [REBOL] Get-word problems Re:

2000-05-08 Thread mjelinek

The first thing I tried was:

print mold first :test

(notice the 'mold) Which works as expected. Probably is the same thing that
'probe does?

- Michael Jelinek

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, May 06, 2000 5:04 AM
To: [EMAIL PROTECTED]
Subject: [REBOL] R: [REBOL] Get-word problems


there seems to be problems with the print function
look :

test: func [x] [x + 3]   ; your function

probe first :test ; this is ok
print first :test; CRASH
print first first :test ; this works !!!

y: first :test; this is ok
probe y ; this is ok
print y; CRASH
print first y ; this works !!!

Maurizio




[REBOL] R: [REBOL] Get-word problems Re:(2)

2000-05-08 Thread Petr . Krenzelok



[EMAIL PROTECTED] wrote:

 The first thing I tried was:

 print mold first :test

 (notice the 'mold) Which works as expected. Probably is the same thing that
 'probe does?

- source probe
probe: func [
{Prints a molded, unevaluated value and returns the same value.}
value
][
print mold :value :value
]
-

:-)

baj,

-pekr-



 - Michael Jelinek

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, May 06, 2000 5:04 AM
 To: [EMAIL PROTECTED]
 Subject: [REBOL] R: [REBOL] Get-word problems

 there seems to be problems with the print function
 look :

 test: func [x] [x + 3]   ; your function

 probe first :test ; this is ok
 print first :test; CRASH
 print first first :test ; this works !!!

 y: first :test; this is ok
 probe y ; this is ok
 print y; CRASH
 print first y ; this works !!!

 Maurizio




[REBOL] list test... Re:(3)

2000-05-08 Thread robert . muench

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Monday, May 08, 2000 4:56 PM
 To: [EMAIL PROTECTED]
 Subject: [REBOL] list test... Re:(2)

 Yes, I sent reply to Rebert's post on /Command ml and got an
 answer from @rebol.net. Some strange kind of redirection ...

Hi, I tried to repost my message to /Command ml but got it returned
now for several times... there must be a problem somewhere. Robert




[REBOL] two-digit return of now switches

2000-05-08 Thread RChristiansen

Is there any way to make REBOL return a two-digit /month or /day or /hour or /minute 
or /second ?

I have a file-naming scheme which names files based on the date and time they are 
created in the following format...

20001225122345.html

The above file was named at 12:23:45 p.m. on Dec. 25, 2000

But unfortunately REBOL returns a single digit for a /day for example if the day is 
less than 10. This is not satisfactory since I want to be able to find my newest 
document at the tail of the directory.

Here is the naming scheme I am currently using...


current-time: now/time

file-name: rejoin [now/year now/month now/day current-time/hour current-time/minute 
current-time/second]

complete-file-name: rejoin [{%} file-name {.html}]

write-file: reform ["write" complete-file-name "new-article"]

do write-file

wait 1




[REBOL] two-digit return of now switches Re:

2000-05-08 Thread Petr . Krenzelok



[EMAIL PROTECTED] wrote:

 Is there any way to make REBOL return a two-digit /month or /day or /hour or /minute 
or /second ?

 I have a file-naming scheme which names files based on the date and time they are 
created in the following format...

 20001225122345.html

 The above file was named at 12:23:45 p.m. on Dec. 25, 2000

 But unfortunately REBOL returns a single digit for a /day for example if the day is 
less than 10. This is not satisfactory since I want to be able to find my newest 
document at the tail of the directory.

 if (length? tmp: to-string now/day)  2 [insert tmp "0"]

or just make block of days and do "select days to-string now/date" ...

-pekr-





[REBOL] list test... Re:(4)

2000-05-08 Thread tim

Yes... I am getting the same returned mail. Redirected to
rebol.net. Let's see if this goes through.
tim
At 06:09 PM 5/8/00 +0200, you wrote:
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Monday, May 08, 2000 4:56 PM
 To: [EMAIL PROTECTED]
 Subject: [REBOL] list test... Re:(2)

 Yes, I sent reply to Rebert's post on /Command ml and got an
 answer from @rebol.net. Some strange kind of redirection ...

Hi, I tried to repost my message to /Command ml but got it returned
now for several times... there must be a problem somewhere. Robert






[REBOL] tuple math Re:

2000-05-08 Thread icimjs

Hi Bob,

since make tuple! [1] generates 1.0.0, I think that a good way of handling
it would be to change the highest order.

 make tuple! "1"
== 1.0.0
 make tuple! [1]
== 1.0.0

Elan

At 03:38 AM 5/8/00 +, you wrote:
 REBOL 2.2.0.4.2
...

 a: 192.9.200.211
== 192.9.200.211
 a + 1
== 193.10.201.212


what justification is there to changing
-all- the integer fields? I expected at most to
change either the highest order or the lowest order
integer field by this operation - not all of them.


 a: 192.9.255.1
== 192.9.255.1
 a + 1
== 193.10.255.2
 a + 0.0.1.0
== 192.9.255.1

humm, neither of these does what I expected.
What I was looking for was some form of carry propagation. 


Now there are 2 contexts that I consider using tuples for:
IP addrs and version numbers. I would welcome the list to show
some alternate uses for them. [big math like bigint seems out -- too bad]

As internet addresses, I can reasonably stay away
from adding + 1 and instead use 0.0.0.1 to get the next higher IP
addr to try.   The lack of carry is probably not going to be discovered
by other programmers using them for IP because 255 becomes a 
broadcast address in most systems so logic is likely
in place [I hope others remember to look...] before this value
is taken on.

no wrap or carry?
My gut tells me it is wrong to have to check
my results after every addition.

so here is what I am looking for:
- an example of a use for the current behavior which warrants
adding math checks to all other uses.




;# mailto: [EMAIL PROTECTED]




;- Elan  [: - )]




[REBOL] Ho to add hex values?

2000-05-08 Thread Petr . Krenzelok

trying to send for the second time ... someone should really look into
the problem ...
--

The original message was received at Mon, 8 May 2000 12:39:40 -0400
(EDT)
from carus-t.mspring.net [207.69.232.92]

   - The following addresses had permanent fatal errors -
[EMAIL PROTECTED]

   - Transcript of session follows -
... while talking to pacific.pacific.net.:
 RCPT To:[EMAIL PROTECTED]
 550 [EMAIL PROTECTED]... Relaying denied
550 [EMAIL PROTECTED]... User unknown
-


Hi,

what is the easy way for addition and investigation of hex values? Let's

say I have h3cb and want to add h402. How to do it in an easy way?

; what is returned here???
- enbase/base to-string #FF 2
== "0100011001000110"

FF = 255 = 
- enbase/base to-string #{FF} 2
== ""
it seems to be correct, but then why #{3BC} is not regarded being
correct binary value?

I would like to have simple acces to bits of a byte:

byte: enbase/base to-string #{FF} 2
byte/1 etc

Thanks,

-pekr-








[REBOL] Ho to add hex values? Re:

2000-05-08 Thread holger

On Mon, 08 May 2000, you wrote:
 trying to send for the second time ... someone should really look into
 the problem ...

Thanks. It looks like one of the email servers at Mindspring which is
hosting rebol.com uses stale DNS settings when trying to forward the email
into our internal network, at rebol.net.

To anyone getting these bounces: please send the complete, bounced
email to [EMAIL PROTECTED] Thanks.

--
Holger Kruse
[EMAIL PROTECTED]




[REBOL] Something broke path values

2000-05-08 Thread ddalley


Hi, folks:

One of my scripts stopped working on Friday and I have not been successful in
finding out why. All it does is write a series of web pages to a ram disk.

I re-did the examples in the docs, but the same error occurs, right from the
console. I copied the URL that REBOL used from the con trace and pasted it
into my browser, but it worked!

 write %/ram/rebolpage.html READ http://www.rebol.com
connecting to: www.rebol.com
** Script Error: Cannot use path on none! value.
** Where: port/sub-port/timeout: port/timeout port/sub-port/user: port/user
port/sub-port/pass:

and

 write %/ram/TSEpage.html READ http://www.tse.com/content.html  
connecting to: www.tse.com
** Script Error: Cannot use path on none! value.
** Where: port/sub-port/timeout: port/timeout port/sub-port/user: port/user
port/sub-port/pass:

All of my other scripts, which all use similar code, still work. What's
happening?

-- 

---===///||| Donald Dalley |||\\\===---
 The World of AmiBroker Support
  http://webhome.idirect.com/~ddalley
  UIN/ICQ#: 65203020




[REBOL] Ho to add hex values? Re:

2000-05-08 Thread mdb

Hi Pekr,


Hi,

what is the easy way for addition and investigation of hex values?
Let's  say I have h3cb and want to add h402. How to do it in an easy way?



Will this do the job ???


 to-hex (to-integer #{03cb}) + (to-integer #{0402})
== #07CD


Mike.





[REBOL] Ho to add hex values? Re:

2000-05-08 Thread mdb

Pekr: 

; what is returned here???
- enbase/base to-string #FF 2
== "0100011001000110"

"0100011001000110" is binary form of hexadecimal 4646, which in turn
represents the characters "FF".

 enbase/base to-string #FF 16
== "4646" 

Mike.





[REBOL] Endless looping processes. Re:(3)

2000-05-08 Thread brian . hawley

Fredrik Bergstrom wrote:
I will, when I get the chance, I cannot do this right now because, we
may need to reboot the server to get rid of the Rebol process, will do
this later.

  Is it possible to kill a rebol process?
PKtc That's not question related to rebol, right? If you can't kill NT 
process,
PKtc then how to stop infinite loop?

Start Task Manager. Go to the Processes page. Sort by name.
End every rebol.exe process. No reboot necessary.

Brian Hawley




[REBOL] two-digit return of now switches Re:

2000-05-08 Thread Galt_Barber




I think you may wish to check this further.

current-time: now/time

file-name: rejoin [
  now/year
  now/month
  now/day
  current-time/hour
  current-time/minute
  current-time/second
  ]

complete-file-name: rejoin [{%} file-name {.html}]

When I was looking at something similar, I hit a problem
because the integer returned is of course not 0-padded on the left.
So, is it (2000116) November 6th or is it January 16th??
Statistically it may be unlikely to cause a problem,
but if it could happen even once and that would mess you
up bad, then you better pre-pad the month and day with 0 when necessary.



rant



This is part of a general theme.

You can't strip out punctuation ( dates use  / - ) and not pad (0) instead --

not unless you have a pretty sophisticated encoding process,

which is rare enough.



It's similar with escape codes in strings and so forth.

We often want to have our cake and eat it too.



Unicode makes everything two bytes and that has the

advantage of simplicity.  But it bites in certain applications

where bandwidth or storage is precious.  Escape systems

potentially offer more flexibility, but they also introduce complexity.



C-strings suck, too.  Great, they can be of indefinite length.

But that also means you can't quickly get the length of the

string without scanning the whole thing.  And because there's

no escape-encoding of the 0-terminator, you can't use any

of those in a string.  And even though it's only 1 special

character that's restricted, it ruins so many applications.



And of course there isn't a c-programmer alive who

hasn't run right of the end of his string and corrupted

his memory.  It's a hell of a lot of fun, actually,

a bit like bungy-jumping.  Goodness gracious,

I hope there's a zero at the end of this thing!



I remember years ago trying to send a zero in part of

a printer-setup command sequence, and because dbase was

written in c, you couldn't send it to the printer at all.

Actually there was a work-around, but you had to write

and assemble little assembly language scripts and

load them in at run-time.  I'm sure others could come

up with loads of similar horror stories.



The day c disappears from the planet will be a happy one.

One day we'll look on it with feelings akin to the way

we feel today about COBOL.



/rant



good luck



-galt






[REBOL] web proxy

2000-05-08 Thread Galt_Barber




Basically, I wanted to know if it was possible,
and how, to write an http proxy server, using Rebol of course.

I want to be able to have the proxy filter page content,
e.g. translate to uppercase, to another font, to another
language, or other kinds of transformations on the text,
and have it be more or less invisible and automatic
to the person browsing.

I know that I could write an app that would put up a form
and you would fill out the url and submit it and the rebol
app could fetch the page, filter it, and return it,
but it gets tedious, and it really fails on urls with frames,
and other stuff.

I dont know if the http proxy server idea would be too
complex to make it worth it or if rebol has stuff built in
already that makes it very easy, or ...

And if somebody knows where to get docs on http proxy info,
that would be kind and helpful.


Galt Barber






[REBOL] two-digit return of now switches Re:(2)

2000-05-08 Thread RChristiansen

This doesn't work...

month: to-string now/month
if (length? month  2) [insert month "0"]

** Script Error: Expected one of: string! - not: integer!.
** Where: if (length? month  2) [insert month "0"]

How come?


  if (length? tmp: to-string now/day)  2 [insert tmp "0"]




[REBOL] Ho to add hex values? Re:(2)

2000-05-08 Thread Petr . Krenzelok



[EMAIL PROTECTED] wrote:

 Hi Pekr,

 Hi,

 what is the easy way for addition and investigation of hex values?
 Let's  say I have h3cb and want to add h402. How to do it in an easy way?

 Will this do the job ???

  to-hex (to-integer #{03cb}) + (to-integer #{0402})
 == #07CD

ah well :-) I was confused, because while working with 'issue values,
everything seemed be OK

- to-hex (to-integer #3CB) + (to-integer #402)
== #07CD
-

Manual was talking about h3CB and h402 values, but once I tried:

- to-integer #{FF}
== 255
- to-integer #{3CB}
** Syntax Error: Invalid binary -- #{3CB}.
** Where: (line 1) to-integer #{3CB}
-

I was confused why "3CB" doesn't work. Now I can see you aligned it using "0"
...

Now, we can get the same results using binary datatype and issue datatype,
what's the difference in following expressions?

- enbase/base #{FF} 2
== ""
- enbase/base #FF 2
== "0100011001000110"

However, I still miss simple access to dword, word,  byte, nible, bit values


-pekr-


 

 Mike.