[REBOL] forskip??? Re:(4)

2000-06-22 Thread tim781

THANKS!! :) Julian. It worked.:)

I'm going to start using rebol to
edit audio files. I found out that
.au sound files are contructed
simple and the samples can
easily be modified with rebol
scripts. I attached a text file I got
from http://www.wotsit.org/
incase anyone wants to work with
sound files.

with 8-bit audio this is what I
learned about .au files.

Hex codes:

00 to 7F - is below zero ( and 00 is farthest from zero )
FF  - is zero
FF to 80 - is above zero ( and 80 is the farthest from zero )

timmy :)


The following is supposedly the sound format used by Sun and Next
machines:

[ From: [EMAIL PROTECTED] (Marshall Rose) ]

Audio data is encoded in three parts: a header, containing fields that
describe the audio encoding format; a variable-length information field,
in which, for instance, ASCII annotation may be stored; and, the actual
encoded audio.  The header and data fields are written using big-endian
ordering.

The header part consists of six 32-bit quantities, in this order:

longwordfield   description
-   ---
0   magic numberthe value 0x2e736e64 (ASCII ".snd")

1   data offset the offset, in octets, to the data part.
The minimum valid number is 24 (decimal).

2   data size   the size in octets, of the data part.
If unknown, the value 0x should
be used.

3   encodingthe data encoding format:

value   format
  1 8-bit ISDN u-law
  2 8-bit linear PCM [REF-PCM]
  3 16-bit linear PCM
  4 24-bit linear PCM
  5 32-bit linear PCM
  6 32-bit IEEE floating point
  7 64-bit IEEE floating point
 23 8-bit ISDN u-law compressed
using the CCITT G.721 ADPCM
voice data encoding scheme.

4   sample rate the number of samples/second (e.g., 8000)

5   channelsthe number of interleaved channels (e.g., 1)


The information part, consists of 0 or more octets, and starts 24 octets
after the beginning of the header part. The length of the information
part is calculated by subtracting 24 (decimal) from the data offset
field in the header part.
--
 Bill Janssen  [EMAIL PROTECTED]  (415) 812-4763
 Xerox Palo Alto Research Center  FAX: (415) 812-4777
  Coyote Hill Road, Palo Alto, California   94304






[REBOL] Ping Tool

2000-06-22 Thread whc-export


Hi to all you fellow Rebolians,

I am new to Rebol as well as to Network-Programming. I need to develop a
kind of Ping Tool to check which IP-adresses in our WAN are connected and
get the adresses returned.

1 Q. How can i ping via TCP/IP with REBOL?

2 Q. How can i retrieve the connected adresses?

Any Ideas out there?


Thorsten M




[REBOL] Ping Tool Re:

2000-06-22 Thread Al . Bri

Thorsten M wrote:
 I am new to Rebol as well as to Network-Programming. I need to develop a
kind of Ping Tool to check which IP-adresses in our WAN are connected and
get the adresses returned.

 1 Q. How can i ping via TCP/IP with REBOL?

 2 Q. How can i retrieve the connected adresses?

Being inexperienced with networking myself, this may or may not be useful to
you:

 read dns://sourceforge.net
== 198.186.203.33
 read dns://198.186.203.33
== "sourceforge.net"

Andrew Martin
ICQ: 26227169
http://members.xoom.com/AndrewMartin/
--




[REBOL] Ping Tool Re:

2000-06-22 Thread morgenw

Thorsten
I think you have to get the rebol/command version and use a system call.
try [EMAIL PROTECTED] see:  http://www.rebol.com/developer.html
Larry

[EMAIL PROTECTED] wrote:

 Hi to all you fellow Rebolians,

 I am new to Rebol as well as to Network-Programming. I need to develop a
 kind of Ping Tool to check which IP-adresses in our WAN are connected and
 get the adresses returned.

 1 Q. How can i ping via TCP/IP with REBOL?

 2 Q. How can i retrieve the connected adresses?

 Any Ideas out there?

 Thorsten M




[REBOL] XMLRPC

2000-06-22 Thread rebol

Hello,

I am in the process of creating a XMLRPC framework for REBOL, according to the specs 
at http://www.xmlrpc.com/

currently most of the marshalling is done, and I'm able to actually call a procedure 
on thier test server and get back a result.




Best regards
Thomas Jensen




[REBOL] Ping Tool Re:(2)

2000-06-22 Thread tim781

Hi, I'm not too knowledgable about ping,
but I'm pretty sure you need to know
the ip address first before you can
try a ping. It might be possible to
finger the ip address of the main
software program on your network
to get all users. Sorry I can't help
more. timmy :)


[EMAIL PROTECTED] wrote:

 Thorsten M wrote:
  I am new to Rebol as well as to Network-Programming. I need to develop a
 kind of Ping Tool to check which IP-adresses in our WAN are connected and
 get the adresses returned.
 
  1 Q. How can i ping via TCP/IP with REBOL?
 
  2 Q. How can i retrieve the connected adresses?

 Being inexperienced with networking myself, this may or may not be useful to
 you:

  read dns://sourceforge.net
 == 198.186.203.33
  read dns://198.186.203.33
 == "sourceforge.net"

 Andrew Martin
 ICQ: 26227169
 http://members.xoom.com/AndrewMartin/
 --




[REBOL] ping check?

2000-06-22 Thread anton

Hi folks,

Given an ip, how can I do a ping check in rebol?

I would find this useful for raising the alarm for our clients.
Is it possible?

Thanks...

-Anton.




[REBOL] typing it again Re:

2000-06-22 Thread johnkenyon



Hi Anton,

You could always try

n-tab: func  [ n (integer!) ] [ loop n [ append "" tab ] ]

print rejoin ["my name is: " name n-tab 3 "my hobby is: " hobby n-tab 2]

(I am pretty sure there is a neater way to do this other than append, but
it works)

cheers,  john


Hi !

I can't think of a way to do this:
I wanted to write something like this:

print rejoin ["my name is: " name 3 * (tab) "my hobby is: " hobby 2 *
(tab)]

where each n * (tab) is supposed to give back something like
tab tab tab  for n=3 etc.

Of course, it doesn't work, but is there a nice way to write this?
It's like some sort of "macro multiplier"
How would you guys do it?

I don't really want to write:
loop 3 [print tab]
in the middle, breaking apart the string...

-Anton.





[REBOL] A data inconsistency Re:(9)

2000-06-22 Thread giesse

[EMAIL PROTECTED] wrote:

  And what happens when I write:
 
 values: second system/words
 
  What value should I find there for unset words?
 
 This really is a tough question.

Yup. :-)

 Solution #1:
[...]

Might be an idea; not totally convincent tough...

 Solution #2: If you prefer the situation, where you can get the
 value of any word, then any unitialized word can be initialized to
 None.

There's difference between an uninitialized word and one
initialized to none; with this solution, the interpreter would no
more be able to catch typos and a lot of bugs could remain
unnoticed causing strange and unpredictable effects.

 Solution #3: you don't have
 
 second system/words
 
 you have only
 
 first system/words
 
 which is enough.

Well, yes and no. This limits somewhat reflectivity I think.
Anyway, perhaps it's worth considering (I used SECOND on an object
only once or perhaps twice until now, so it's not a feature I'm
using very often).

[armed errors]
 That complicates some things with:
 
 second system/words
 
 too. 

I don't agree; just don't leave armed errors around if you don't
want them to explode. If you really want to avoid them, you just
have to test for ERROR?.

But well, this is just a little detail after all. I can live with
both solutions.

 Moreover, you cannot legally get error as a result of a
 computation as in
 
 error? err: do block

Which is not too bad, why should you produce an error as result of
a computation (if it is NOT really an error that should fire)?

 and if you do:
 
 error? err: try block
 
 , you can never be sure if the result Err you have is a result of
 a successful computation or a sign of a disaster.

If it is an ERROR!, it is an error ! :-)

I don't think being able to return errors would be useful in real
code.

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




[REBOL] How's this for frustration... or...NT/CGI/mail prob solved... Re:

2000-06-22 Thread danielsz




 FINALLY!!!

 No matter what I tried I could not get the "send"
 command to work on my NT4/IIS3.0 via a certain cgi
 script. If I called a basic "send" script on its own
 via cgi it worked fine, the console worked
 fine...EVERYTHING WAS WORKING FINE... except the
 script I NEEDED to work. 

Nice you solved it. I'm still trying to solve my CGI problem, the one
that concerns file access.

Reminder: my rebol CGI script cannot open local files for
reading/parsing.

I thought it was a system setup issue, so in a previous thread I
insisted on the NT / Apache combo.

I also thought it was related to calling child scripts with do/args.

So I debugged thoroughly :
I included all the code in one CGI script
I migrated the script on a Solaris machine that runs Netscape web server.

Same problem !


Now if someone could explain me how the following is possible :

list-dir %/existing/path/

produces a correct directory listing. But with the same path,

 print exists? %/existing/path/

results in false.

Note: the script does run with execution permission.

 Here's what happened...

 My script was something like...

 the-script-in-question.r ;residing in the cgi
 folder... and had the following code...

 do %/c/remote-folder/file1.r ;a irrelevant script
 do %/c/remote-folder/file2.r ;a script that looks up
 the e-mail address
 do %/path-to-cgi/mail.r ;the mailing script that would
 send the mail

 This would not work, but if I called the mail.r script
 directly via cgi.. it would. THIS COMPLETELY BAFFLED
 ME.

 As it turns out, when you call a script in the cgi-bin
 it will execute normally... UNTIL the script LEAVES
 the cgi-bin to read or do ANYTHING! (as in going out
 to read file1.r and file2.r)  When it comes back to
 the parent script (in the cgi-bin) it seems to have
 picked up a NO EXECUTE clause, and thus, would not
 "send" anything.

 The simple fix was to move the do %/path-to-cgi/mail.r
 to the top of the list as such

 do %/path-to-cgi/mail.r 
 do %/c/remote-folder/file1.r  
 do %/c/remote-folder/file2.r 

 That only took a WEEK!

 TBrownell





 __
 Do You Yahoo!?
 Send instant messages with Yahoo! Messenger.
 http://im.yahoo.com/


--
[EMAIL PROTECTED]
http://perso.worldonline.fr/mutant






[REBOL] How's this for frustration... or...NT/CGI/mail prob solved... Re:(2)

2000-06-22 Thread danielsz

 Now if someone could explain me how the following is possible :

 list-dir %/existing/path/

 produces a correct directory listing. But with the same path,

  print exists? %/existing/path/

 results in false.

 Note: the script does run with execution permission.

I'm getting somewhere :

query: make object! decode-cgi system/options/cgi/query-string

when the line above is commented out, all file access problems
disappear.

This is not a solution, of course, because I need to fetch CGI
parameters, but the problem comes from creating an object, or using
it, I don't know yet...

--
[EMAIL PROTECTED]
http://perso.worldonline.fr/mutant






[REBOL] How's this for frustration... or...NT/CGI/mail prob solved... Re:(3)

2000-06-22 Thread allenk

Acutally it is quite easy to understand, now that you have shown what else
in your script.

'query is a function in Rebol (you redifine it in your code) and 'exists?
uses the 'query function.
(Use ? query and source exists? to see what I mean)

So just change the word to something like this.

query-object: make object! decode-cgi system/options/cgi/query-string

To help prevent yourself from accidently redifining system words you could
use
'protect-system

Cheers,

Allen K


- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, June 23, 2000 1:45 AM
Subject: [REBOL] How's this for frustration... or...NT/CGI/mail prob
solved... Re:(2)


  Now if someone could explain me how the following is possible :

  list-dir %/existing/path/

  produces a correct directory listing. But with the same path,

   print exists? %/existing/path/

  results in false.

  Note: the script does run with execution permission.

 I'm getting somewhere :

 query: make object! decode-cgi system/options/cgi/query-string

 when the line above is commented out, all file access problems
 disappear.

 This is not a solution, of course, because I need to fetch CGI
 parameters, but the problem comes from creating an object, or using
 it, I don't know yet...

 --
 [EMAIL PROTECTED]
 http://perso.worldonline.fr/mutant








[REBOL] Ping Tool Re:

2000-06-22 Thread holger

On Thu, 22 Jun 2000, you wrote:
 Hi to all you fellow Rebolians,
 
 I am new to Rebol as well as to Network-Programming. I need to develop a
 kind of Ping Tool to check which IP-adresses in our WAN are connected and
 get the adresses returned.
 
 1 Q. How can i ping via TCP/IP with REBOL?

You cannot. Ping requires ICMP, and on many oeprating systems that requires
superuser (root) privileges.

 2 Q. How can i retrieve the connected adresses?

If the machines are running any TCP services then try to connect to them.

--
Holger Kruse
[EMAIL PROTECTED]




[REBOL] A data inconsistency Re:(10)

2000-06-22 Thread lmecir

*Unset*

Allow me to be a little bit philosophical here. You feel, that the
initialization is bad, because:

[G]
 There's difference between an uninitialized word and one
 initialized to none; with this solution, the interpreter would
no
 more be able to catch typos and a lot of bugs could remain
 unnoticed causing strange and unpredictable effects.

[/G]

I do agree with you. The problem is, that the difference between
words initialized to None, Unset or any other legal value is
small. You see some difference just because you see, that Unset is
a "second class" Rebol value as opposed to None, which is "first
class". But, that introduces another bad thing to Rebol. A code
like:

a: first block

doesn't work for all nonempty blocks, only for blocks containing
"first class" Rebol values. For the code to be exception proof
(sometimes you must process all possible cases), one must write:

error? set/any 'a first block

This code is working for "any class" values, but it has got its
price: we lost the simplicity of the former expression and, at the
same time, we lost the typo protection.

The problems we have seen above are caused by the fact, that we
wanted to retain the initialization property and at the same time
retain the typo protection available for uninitialized words. The
present solution is a compromise. We surely retained the benefits
of initialization (you can get the value of any word) , the price
is a loss of simplicity. The typo protection is only an illusion
in some cases. At the same time we introduced the "second class"
values that cannot be handled as "first class". That introduces
another kind of bugs - code can be "almost" correct - ie. work
with some exceptions (a tricky thing).

The possible alternatives:

1) Use initialized words and have no exception to the rule, that
we can get the value of any word. In this case the simplicity
wins. Example:

reduce [:word]

We may miss some typo protection.

2) Use uninitialized words. In this case we lose simplicity
partially - sometimes we must write:

either value? 'word [
reduce [:word]
] [
copy []
]

We retain the maximum available typo protection, but look out! If
we use:

wordval: func [word [word!]] [
either value? 'word [
reduce [:word]
] [
copy []
]
]

, than the expressions of type:

wordval 'word

are not typo protected.

3) The current Rebol solution is closer to 1) than 2) I think, but
we lost simplicity:

head insert/only copy [] get/any 'word

and retained some typo protection. OTOH we have got a new kind of
bugs not existing in the case 1).

*Armed errors:*

  Moreover, you cannot legally get error as a result of a
  computation as in
 
  error? err: do block


[G]
 Which is not too bad, why should you produce an error as result
of
 a computation (if it is NOT really an error that should fire)?

 If it is an ERROR!, it is an error ! :-)

 I don't think being able to return errors would be useful in
real
 code.
[/G]

Well, that is one side of reasoning. The other one is, that our
code should be able to process values. As long as errors are
armed, they are only "second class" values that cannot be handled
with normal code without too much complication. OTOH, disarmed
Error can be handled with usual code. If we introduce "second
class" values, we may introduce complications too. I am pretty
sure, that even the Rebol interpreter could be simpler and faster
without the "second class" values.

Ladislav




[REBOL] Optional Arguments Working? Re:(5)

2000-06-22 Thread rsnell

You must perform your test in a script file and
'do it to see the bug.  The bug does not occur
in a console session.

Rodney

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 21, 2000 9:17 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] Optional Arguments Working? Re:(4)


Larry wrote:
 REBOL []

 print {
  Bug in optional args called from script.
  If  123 is removed from the 6th call to f,
  f is not called at all.
 }

 f: func [a [any-type!]][print "f got called"]

 f
 f
 f
 f
 f
 f 123
 halt

Actually, there is no bug. Here's a console session:

 f: func [a [any-type!]][print "f got called"]
 f
f got called
 f f f f f f 123 halt
f got called
f got called
f got called
f got called
f got called
f got called
 f f f f f f 123
f got called
f got called
f got called
f got called
f got called
f got called
 f f f f f f halt


Note that Rebol evaluates the arguements to a function before calling the
function. In this case:
f f f f f f halt
the 'halt is evaluated just before evaluating the last (or first in
reverse order) 'f function. 'halt has the side effect of stopping execution
of Rebol, so the last 'f is not evaluated.

I hope that helps!

Andrew Martin
Infinitely nested Rebol...
ICQ: 26227169
http://members.xoom.com/AndrewMartin/
--




[REBOL] typing it again Re:(3)

2000-06-22 Thread lmecir

Hi, you can use insert/dup:

n-tab: func  [n [integer!]] [head insert/dup copy "" tab n]

Ladislav


 Anton,

 Forgot one word - copy :)

 n-tab: func  [ n (integer!) ] [ loop n [ append copy "" tab ] ]

 john


 
 Hi Anton,

 You could always try

 n-tab: func  [ n (integer!) ] [ loop n [ append "" tab ] ]

 print rejoin ["my name is: " name n-tab 3 "my hobby is: " hobby
n-tab 2]

 (I am pretty sure there is a neater way to do this other than
append, but
 it works)

 cheers,  john

 
 Hi !

 I can't think of a way to do this:
 I wanted to write something like this:

 print rejoin ["my name is: " name 3 * (tab) "my hobby is: "
hobby 2 *
 (tab)]

 where each n * (tab) is supposed to give back something like
 tab tab tab  for n=3 etc.

 Of course, it doesn't work, but is there a nice way to write
this?
 It's like some sort of "macro multiplier"
 How would you guys do it?

 I don't really want to write:
 loop 3 [print tab]
 in the middle, breaking apart the string...

 -Anton.










[REBOL] Ping Tool Re:(2)

2000-06-22 Thread rsnell

Yes, it doesn't appear that Rebol has an ICMP 
protocol handler.  This is unfortunate because with
all of it's shortcomings, a ping is one of the most
useful network debugging tools (in my experience -
especially on a LAN).

This also points to a potentially larger problem in
that Rebol doesn't appear to handle any protocol
not based on TCP.  And unfortunately you can't create
your own sockets (to do a ping you need a different
socket type than TCP) which means no UDP broadcasting/
multicasting, etc. can be done.  This is one area
that I would like to see /Core improve on (and I would
really like to see it as /Core, NOT /Command).  But yes,
you can use /Command to call into your own ping function
if you had to.

The fact that using ICMP might require superuser (admin)
priveleges is a user issue only and should not affect RT's 
decision to implement it or other basic socket calls.

RT should note that not all machines (especially those
in the embedded controller world) have a TCP stack
installed and choose to use UDP instead (for various
reasons - speed, size, more control, etc.).

Rodney


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 22, 2000 9:31 AM
To: [EMAIL PROTECTED]
Subject: [REBOL] Ping Tool Re:


On Thu, 22 Jun 2000, you wrote:
 Hi to all you fellow Rebolians,
 
 I am new to Rebol as well as to Network-Programming. I need to develop a
 kind of Ping Tool to check which IP-adresses in our WAN are connected and
 get the adresses returned.
 
 1 Q. How can i ping via TCP/IP with REBOL?

You cannot. Ping requires ICMP, and on many oeprating systems that requires
superuser (root) privileges.

 2 Q. How can i retrieve the connected adresses?

If the machines are running any TCP services then try to connect to them.

--
Holger Kruse
[EMAIL PROTECTED]




[REBOL] Optional Arguments Working? Re:(6)

2000-06-22 Thread allenk


- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, June 23, 2000 2:43 AM
Subject: [REBOL] Optional Arguments Working? Re:(5)


 You must perform your test in a script file and
 'do it to see the bug.  The bug does not occur
 in a console session.

 Rodney


It is not a bug, see Andrew's explanation from the bottom of the message.
The safer way to have optional arguments is to use refinements.

Cheers,

Allen K

 Note that Rebol evaluates the arguements to a function before calling the
 function. In this case:
 f f f f f f halt
 the 'halt is evaluated just before evaluating the last (or first in
 reverse order) 'f function. 'halt has the side effect of stopping
execution
 of Rebol, so the last 'f is not evaluated.

 I hope that helps!

 Andrew Martin







[REBOL] Optional Arguments Working? Re:(7)

2000-06-22 Thread rsnell

Thanks for your patience.  I do understand what 
Andrew is saying.  But maybe you guys can then
explain the following behavior.  Type the following
into a script and 'do it:

REBOL[]

print-val: func [val [any-type!]] [
print either value? 'val [val]["No value given"]
]

print-val 1234
print-val
print "DONE"
print "WHAT?"


On my system (NT, latest /View) I see printed:

1234
DONE
No value given
WHAT?

How is "No value given" being printed after "DONE"?
Sorry if I'm being obtuse here but this just seems wrong.

Also, refinements aren't exactly the same as optional
arguments - you'll always have to pass a dummy argument
along with a refinement.  But it will work fine.  

Thanks for the help,

Rodney




-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 22, 2000 10:18 AM
To: [EMAIL PROTECTED]
Subject: [REBOL] Optional Arguments Working? Re:(6)



- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, June 23, 2000 2:43 AM
Subject: [REBOL] Optional Arguments Working? Re:(5)


 You must perform your test in a script file and
 'do it to see the bug.  The bug does not occur
 in a console session.

 Rodney


It is not a bug, see Andrew's explanation from the bottom of the message.
The safer way to have optional arguments is to use refinements.

Cheers,

Allen K

 Note that Rebol evaluates the arguements to a function before calling the
 function. In this case:
 f f f f f f halt
 the 'halt is evaluated just before evaluating the last (or first in
 reverse order) 'f function. 'halt has the side effect of stopping
execution
 of Rebol, so the last 'f is not evaluated.

 I hope that helps!

 Andrew Martin






[REBOL] Ping Tool Re:(4)

2000-06-22 Thread Petr . Krenzelok



[EMAIL PROTECTED] wrote:

 [EMAIL PROTECTED] wrote:

  This also points to a potentially larger problem in
  that Rebol doesn't appear to handle any protocol
  not based on TCP.  And unfortunately you can't create
  your own sockets (to do a ping you need a different
  socket type than TCP) which means no UDP broadcasting/
  multicasting, etc. can be done.  This is one area
  that I would like to see /Core improve on (and I would
  really like to see it as /Core, NOT /Command).  But yes,
  you can use /Command to call into your own ping function
  if you had to.
 

 "I believe IRC uses UDP which should be fully supported very soon." - Those
 were the words of Bo some time ago :-)
 As for /Core, - yes, it should be part of it if implemented.

 btw: I've heard UDP is used for Ethernet? Is it right?

I have found another earlier comment from Jeff :-)
-

  [EMAIL PROTECTED] wrote:

  Aha,  so I  missunderstood you, is   it  possible to  udp talk with
 current version of port implementation?

  Yep:

  close insert open udp://somewhere:9090 "something"

  and "something" will, infact, be sent via udp to somewhere's 9090
udp port (which I verified earlier today).  For some reason it doesn't
seem possible to create a udp listen port, though.  I don't think, or
at least never heard that anyone had ever really verified the udp
stuff before (due to udp's lack of popularity I suppose) so I thought
I'd take a peek it at.  I think the problem with the udp listen ports
is in the port interface.  Perhaps they can be fixed before the next
release.
-

-pekr-





 -pekr-

 
  Rodney
 




[REBOL] open/direct not working right? Re:(2)

2000-06-22 Thread Galt_Barber




 o: skip o o/size

Thanks to everybody who suggested this.

But I am pretty sure I was already doing that
and it just behaved as if the skip never happened.
I didn't know if it was a bug or not.
Does anybody else want to try this?

To test it out, you have to open/direct on a file
that already exists and has some stuff.
Then try to skip to the end and append some stuff.

I guess the appended stuff will really be placed
at the beginning of the file, not the end, as
if the skip didn't have any impact nor error.
Seemed weird, which was why I wrote the msg
in the first place.

Then I had gc problems
just using write/append which I got around using
recycle/on, so eventually I did reach Mt. GigaJunk,
but the trek was tougher than expected.

-galt





[REBOL] Ping Tool Re:(3)

2000-06-22 Thread holger

On Thu, 22 Jun 2000, you wrote:

 This also points to a potentially larger problem in
 that Rebol doesn't appear to handle any protocol
 not based on TCP.

REBOL handles UDP as well. The UDP handler that is part of Core 2.2 has a few
bugs though, which were fixed in VIEW and will also be fixed in the next
Core releases. Even in Core 2.2 you can send UDP packets. Receiving does not
work in that version though.

REBOL currently handles all protocols based on IP which work across platforms
and can be supported without requiring su privileges.

 The fact that using ICMP might require superuser (admin)
 priveleges is a user issue only and should not affect RT's 
 decision to implement it or other basic socket calls.

It would mean that anyone using Unix would have to either install REBOL
as setuid (which would be a Very Bad Thing because it would allow any user to
run arbitrary REBOL scripts with root permissions), or the use of ping and
other ICMP-based functions would be restricted to the superuser (probably not a
good idea either).

--
Holger Kruse
[EMAIL PROTECTED]




[REBOL] Ping Tool Re:(5)

2000-06-22 Thread jeff


 
  Petr quoting me:
 For some reason
 it   doesn't seem possible   to create a   udp listen port,
 though.  

  In view you can see that udp listen ports are working:

  ;-- UDP listen and send --

x: open udp://:9090
close insert open udp://localhost:9090 "hello udp!"
y: wait reduce [x 1]
copy y
== "hello udp!"


-jeff




[REBOL] Ping Tool Re:(4)

2000-06-22 Thread jeff



 
 "I believe  IRC  uses UDP  which should  be fully supported
 very soon." - Those were the words of Bo  some time ago :-)

  Nope, it's TCP/IP.
 




[REBOL] Ping Tool Re:(4)

2000-06-22 Thread doug . vos

Maybe someone should write the next REBOL killer app? Call it RING?

RING -- A REBOL ping that is much smarter and tests various network
protocols
against a given IP address or DNS name. 

Even Robert Metcalf who invented Ethernet, says PING is an outdated
tool/utility
that was great for the days of ARPA net and the early
days of the Internet, but can't someone come up with a better tool after 20
years??


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 22, 2000 1:37 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] Ping Tool Re:(3)


On Thu, 22 Jun 2000, you wrote:

 This also points to a potentially larger problem in
 that Rebol doesn't appear to handle any protocol
 not based on TCP.

REBOL handles UDP as well. The UDP handler that is part of Core 2.2 has a
few
bugs though, which were fixed in VIEW and will also be fixed in the next
Core releases. Even in Core 2.2 you can send UDP packets. Receiving does not
work in that version though.

REBOL currently handles all protocols based on IP which work across
platforms
and can be supported without requiring su privileges.

 The fact that using ICMP might require superuser (admin)
 priveleges is a user issue only and should not affect RT's 
 decision to implement it or other basic socket calls.

It would mean that anyone using Unix would have to either install REBOL
as setuid (which would be a Very Bad Thing because it would allow any user
to
run arbitrary REBOL scripts with root permissions), or the use of ping and
other ICMP-based functions would be restricted to the superuser (probably
not a
good idea either).

--
Holger Kruse
[EMAIL PROTECTED]




[REBOL] XMLRPC Re:

2000-06-22 Thread jeff



   Hearty pat on the back for Thomas Jensen!  A number of
   people have expressed an interest in XML-rpc and they
   ought to be happy to hear of your efforts.

 Hello,
 
 I  am in the process  of  creating  a XMLRPC framework  for
 REBOL, according to the specs at http://www.xmlrpc.com/
 
 currently most of the marshalling is  done, and I'm able to
 actually call a procedure on thier test server and get back
 a result.
 
 
 
 
 Best regards Thomas Jensen
 
 




[REBOL] forskip??? Re:(4)

2000-06-22 Thread Galt_Barber




Rebol [
]

audio: read/binary %/j/audio/first.au

forskip audio 2 [
  write/append/binary %/j/audio/firstdone.au to-char audio/1
]

Did somebody want the slowest audio program ever written?
Why not open the file once instead of for every byte?
Basically it looks as though you are keeping every other byte,
are you picking out just one track to go from stereo to mono?

I haven't tested it, but something like this ought to be a little faster.


Rebol []

audio: read/binary %/j/audio/first.au
newstuff: copy []

while not tail? audio [
  append newstuff first audio
  audio: skip audio 2
]
write/append/binary %/j/audio/firstdone.au newstuff


Does everyone like the word 'first ? It seems less than intuitive.
First what?  It's not really the first element in the list.
I know we can create our own words to alias 'first, but most
people won't do that and it makes it harder for others to read, too.

Also, having to say stuff like
   list: next list
is too bad.
Wouldn't it be nicer to have a syntax like
 list/next
 list/value
? That seems kind of nice.
list/value would return the same as "first list", and
list/next would be the same as "list: next list".

And speaking of understanding grammars,
You're = You are.   E.g. You are what you are.  You're my little bundle of
joy.
Your = possessive, e.g. It's your life!
Try this one:  You're your own best friend.

And if you can't remember which is which, just go phonetic: Yor.
At least that way people will not assume anything other than the sound.

- - -

Mu-law is pretty cool, and is used in many .au files.
I just found out about it the other day.
Some call it companding, like compression+expansion, but that's bull.
It's really just using a non-linear representation of the amplitude of the
sound wave, which is way cool, because that's the way all your
natural senses work anyways.

Because it uses a logarithm of the
amplitude, you can multiply easily just by adding (think mixing level)!
But adding itself (mixing two or more channels into final output) is made more
complex.
Also, I think some internet phone systems use Mu-law type companding,
as it adds more dynamic resolution and just sounds better without requiring
more actual bits.  You are not compressing any actual information, though.
It's not lossy.  You are however making better use of the bits so that what
the bits represent is a better match in value to your sense of hearing, e.g.
you can distinguish soft from very soft easily, but loud and very loud sound
pretty much the same.   Vision works in a similar fashion with brightness
levels.
You can see in near darkness but blinding light and twice-blinding light mean
nothing to you.

Most cameras that people buy don't perform well in low-light conditions.
You see the film coming back from the lab either black or all washed out
at light levels your eyes handle easily.  Sure, you can see a distant nebula
with long-exposure film in a gigantic telescope, but try taking that on
vacation.

- - -

By the way, how many lines of c code does it take to do this?:
   read http://www.rebol.com

And does that code run on 37 platforms without recompiling anything?

To me, the fact that I can't count an integer from 1 to 100 in an empty loop
is of no interest.  Plus the hardware coming out these days is amazing.
650 Mhz Wintel box is cheap.  Fry's has 13GB drives for $89 each.

What I want to know is what are you going to do with that hardware?
If you have rebol, you might be able to deliver a great program before you
are eligible for social security.

In fact, you could write a rebol program that
would assemble a binary executable for you if you really want to count
at the speed of the hardware.  Has anybody written any assemblers
entirely in Rebol?  It would probably turn out to be incredibly short, easy
to read (and write!) code.

Oh, and Rebol is certainly available at an attractive price.






[REBOL] Optional Arguments Working? Re:(8)

2000-06-22 Thread dankelg8


Hi Rodney,

note that you can do this to prevent your argument from being executed:

print-val: func ['val [any-type!]] [ 
  print either unset? get/any 'val ["No value given"] [get 'val]
]

Here's the result of running your code:

 print-val 1234 print-val print "DONE" print "WHAT?"

1234
print
WHAT?


REBOL can't know whether 'print is an argument to 'print-val or not.
To do that, it would have to tell data from code.
You wouldn't want that would you? ;)

Gisle




[REBOL] recursive RIP

2000-06-22 Thread sterling


I'm guessing that somebody out there has modified the original RIP
script to be recursive.  I'm in the middle of some stuff and could
sure use that right about now.  Anyone want to help me out and mail it 
to me, post it to the list, or post it to REBOL.org?

Thanks,

Sterling




[REBOL] typing it again Re:

2000-06-22 Thread brian . hawley

Hi all!

[EMAIL PROTECTED] wrote:
I can't think of a way to do this:
I wanted to write something like this:

print rejoin ["my name is: " name 3 * (tab) "my hobby is: " hobby 2 *
(tab)]

where each n * (tab) is supposed to give back something like
tab tab tab  for n=3 etc.

Of course, it doesn't work, but is there a nice way to write this?
It's like some sort of "macro multiplier"
How would you guys do it?

This should work, and be much faster than looping:

form-dup: func [a [any-type!] x [integer!]] [
 if x  1 [return copy ""]
 if not string? :a [a: form :a]
 head insert/dup (make string! x * (length? a)) a x
]

You would then use it like this:

print [
 "my name is:" name form-dup "^(tab)" 3
 "my hobby is:" hobby form-dup "^(tab)" 2
]

Of course for the purpose of generating tabs, perhaps a less
general solution might be better (and faster):

tabs: func [x [integer!]] [
 head insert/dup make string! x #"^(tab)" x
]

...and similar functions for spaces, etc.

Brian Hawley




[REBOL] Optional Arguments Working? Re:(9)

2000-06-22 Thread rsnell

Ah, I finally get it.  I was letting whitespace confuse me.

Basically, I think I'll stay away from default arguments
from now on.

Thanks for all the help!

Rodney


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 22, 2000 12:31 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] Optional Arguments Working? Re:(8)



Hi Rodney,

note that you can do this to prevent your argument from being executed:

print-val: func ['val [any-type!]] [ 
  print either unset? get/any 'val ["No value given"] [get 'val]
]

Here's the result of running your code:

 print-val 1234 print-val print "DONE" print "WHAT?"

1234
print
WHAT?


REBOL can't know whether 'print is an argument to 'print-val or not.
To do that, it would have to tell data from code.
You wouldn't want that would you? ;)

Gisle




[REBOL] Ping Tool Re:(2)

2000-06-22 Thread Galt_Barber




I believe I saw an example of doing Ping from rebol somewhere.
On the rebol site?  In the rebol examples library?  Submitted scripts?
/View stuff?  other sites that have rebol code submitted?
Well, anyway, it's worth looking around.  If I come across it again,
I'll send a msg to the list.





[REBOL] How's this for frustration... or...NT/CGI/mail prob solved... Re:(4)

2000-06-22 Thread Galt_Barber




should 'protect-system be the default for Rebol,
so beginning users don't hurt themselves?
I am surprised that so few problems have been
reported given the number of elements that must
exist in the system.  I myself have used the word
'query when writing sql code.  I suppose the only
reason I didn't choke on that was that I remembered
to declare it as a local var so when the func was
done the original global 'query was still ok.

-galt





[REBOL] typing it again Re:(4)

2000-06-22 Thread Galt_Barber




n-str: func  [
c [char! string!]
n [integer!]
/local
 s
][
either char? c [
 s: to-string c
][
 s: c
]
return head insert/dup copy "" s n
]

 n-str "t" 3
== "ttt"

 n-str "tab" 3
== "tabtabtab"

 n-str tab 3
== "^-^-^-"

 n-str #"t" 3
== "ttt"


n-tab: func  [
n [integer!]
][[integer!]
return n-str tab n
]


-galt





[REBOL] View equation solver

2000-06-22 Thread rebol . phb

Hi Guys,

thought you might like to try a little view program to solve equations of
the form f(x) = 0.

From View just

do http://homepages.tesco.net/~phil.bevan/rebol/rebol4.html

Browse the Web Page for some hints on usig the program.

Cheers Phil








[REBOL] Messenger.r

2000-06-22 Thread rebol . phb

Hi Guys,

thought you might like this little utility to display a window at a specific
time
(I use it to to remind me to go home at 5:30 and write some more Rebol
programs)

Cheers Phil

(I have attached bay.jpg as it uses it as a bckground )




REBOL [
Title: "messenger"
Date: 16-Jun-2000
File: %messenger.r
Purpose: "Display a Reminder at a specified time"
]

pic: %bay.jpg

scroll-left: function [str] [t-str]
[
t-char: first str
t-str: remove str
t-str: join t-str t-char
return t-str
]

l-test: stylize 
[ 
ltext text [font: [align: 'right size: 60 color: 255.255.0]]
]

f-disp-msg: function [t-mess] []
[
t-mess: join "" [t-mess ""]
view/new layout 
[
styles l-test
backdrop pic effect [gradcol 1x1 0.0.80 100.0.0 fit]
time: ltext t-mess
with 
[
rate: 2
feel: make feel 
[
engage: func [face action event i] 
[
face/text: scroll-left face/text
show face
]
]
]
]
]


f-wait: function [i-time t-mess] [u-time t-time tm-time]
[
t-time: join "Waiting until " i-time
u-time: to-time i-time

view/new layout 
[
backdrop pic effect [gradcol 1x1 0.0.80 100.0.0 fit] 
c-time: text "Time : 00:00:00"
with 
[
rate: 1
feel: make feel 
[
engage: func [face action event i] 
[
if u-time  now/time
[
unview/all
f-disp-msg t-mess
]
; show current time
tm-time: to-string now/time
either (length? tm-time)  6 
[c-time/text: join "Time : " [tm-time ":00"]]
[c-time/text: join "Time : " tm-time]
show face
]
]
]
text t-time
]
]


t-time: to-string now/time

view layout
[
backdrop pic effect [gradcol 1x1 0.0.80 100.0.0 fit]
t-mess: field ""
t-time: field t-time 60x24
button "OK" 60x24 
[
system/view/vid/vid-feel/focus none
unview/all
f-wait t-time/text t-mess/text
]
]

 bay.jpg


[REBOL] Optional Arguments Working? Re:(9)

2000-06-22 Thread Galt_Barber





print-val: func ['val [any-type!]] [
  print either unset? get/any 'val ["No value given"] [get 'val]
]

 print-val 1234 print-val print "DONE" print "WHAT?"

how about this?

print-val 1234 (print-val) print "DONE" print "WHAT?"

will that stop the greedy parser from grabbing the next item?






[REBOL] Messenger.r Re:

2000-06-22 Thread ryanc

Thanks!  I am putting this script to immediate use.  My girlfriend will be very
happy.

One minor recommendation is a name change.  Messenger makes me think of sending
messages--other than to myself.  I renamed it on my computer to happy-woman.r
for now.

Godspeed,
--Ryan

[EMAIL PROTECTED] wrote:

 Hi Guys,

 thought you might like this little utility to display a window at a specific
 time
 (I use it to to remind me to go home at 5:30 and write some more Rebol
 programs)

 Cheers Phil





[REBOL] How's this for frustration... or...NT/CGI/mail prob solved... Re:(4)

2000-06-22 Thread danielsz

Thank you for the illumination, Allen.

This was so stupid.
I'm sorry to use time and resources of people that have better to do
than waste time on problems that stem from confusion and bad use.

Debugging CGI scripts is tedious.

On the same token, how could I have avoided this ? The "faulty" line
of code came from the how-to document posted on the official rebol
site !
In other words, all people trying to get a grip on rebol and CGI might
experience the same difficulties as I had (as long they aren't aware
query is a system word).

And if the author of the how-to document is reading this, can he
explain why he used a system word for storing an object. Shouldn't
that be changed at once ?




 Acutally it is quite easy to understand, now that you have shown what else
 in your script.

 'query is a function in Rebol (you redifine it in your code) and 'exists?
 uses the 'query function.
 (Use ? query and source exists? to see what I mean)

 So just change the word to something like this.

 query-object: make object! decode-cgi system/options/cgi/query-string

 To help prevent yourself from accidently redifining system words you could
 use
 'protect-system

 Cheers,

 Allen K


 - Original Message -
 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Friday, June 23, 2000 1:45 AM
 Subject: [REBOL] How's this for frustration... or...NT/CGI/mail prob
 solved... Re:(2)


  Now if someone could explain me how the following is possible :

  list-dir %/existing/path/

  produces a correct directory listing. But with the same path,

   print exists? %/existing/path/

  results in false.

  Note: the script does run with execution permission.

 I'm getting somewhere :

 query: make object! decode-cgi system/options/cgi/query-string

 when the line above is commented out, all file access problems
 disappear.

 This is not a solution, of course, because I need to fetch CGI
 parameters, but the problem comes from creating an object, or using
 it, I don't know yet...

 --
 [EMAIL PROTECTED]
 http://perso.worldonline.fr/mutant






--
email: [EMAIL PROTECTED]
homepage: http://perso.worldonline.fr/mutant
PGP information: available on homepage or on public certificate servers






[REBOL] Fw: recursive RIP

2000-06-22 Thread myers



 Sterling,
 I don't have it but Cal Dixon produced a-rip.r around April 13 2000. Here
is
 the note that was on the ally list

 ===

 That's odd..  the only difference between rip.r and a-rip.r should be that
 a-rip can compress directory trees and rip does files only... And a-rip is
 not an offical update to rip - It's just a quick patch I wrote shortly
after
 downloading rip...  But it sounds like a number of people have been using
 it, so: Anybody who is currently using a-rip - bug Carl to make a new
 official release of RIP with the features from a-rip...

   Cal Dixon ([EMAIL PROTECTED] or [EMAIL PROTECTED])
 --







[REBOL] View equation solver Re:

2000-06-22 Thread Galt_Barber




f(x)=0,
thanks, Phil, that was fun!

can we get a graph with that?
-galt





[REBOL] Re: benchmarking (teeny-bits-of-time/2 )

2000-06-22 Thread alex . pini

- Open Your Mind -



Quoting from Ryan Christiansen's message (20-Jun-00 18:16:19).

R I used Carl's expression...
R 
R t: now/time n: 1 while [n  100] [n: n + 1] n / third (now/time - t)
R 
R and here are the results:
R 
R The Windows NT machine returned a result of 500,000
R The BeOS 5 Pro machine (dual processors) returned a result of 250,000

REBOL/Core for Amiga, 68060 at 50 MHz: 28'000

R forever [ t: now
R   c: 1
R   while [ now = t ][ c: c + 1 ]
R   print c
R   c: copy []
R ]

R 37594
R 37261
R 37103
R 37313
R 37555
R 37551
R 37274
R 37472
R 37563
R 37195
R 37539
R 37556
R 37496
R 37579
R 37386
R 37540
R 37108

24
24
23
24
22
24
24
23
22
21


AAARGH!!! Please, Carl, the PPC version for Amiga, PLEASE! :-)))




Alessandro Pini ([EMAIL PROTECTED])

"I have time. All the time in the world... Do you?" (G'Kar)




[REBOL] Re: teeny-bits-of-time/2 Re:(6)

2000-06-22 Thread alex . pini

- Open Your Mind -



Quoting from Larry's message (21-Jun-00 01:21:09).

l IMO using an interpreted language like REBOL to issue high-level math
l commands in compiled binaries gives us the best of both worlds.  In fact,
l one of the world's largest and most computationally intensive simulation
l programs "The Digital Orrery" uses this approach with Scheme as the
l high-level interpreted programming language.

While we're at wishware... :-)
Once granted that, I'd still like to see math support in a portable form, /Core-style. 
I doubt I'll find LAPACK on all the 37+ systems. (-:




Alessandro Pini ([EMAIL PROTECTED])

"Dave, I've located the fault." "Good, HAL, where is it?" "Dave, I've located the 
fault." "Yes, HAL, right. What circuit?" "Dave, I've located the fault." (-O HAL 9000 
 Bowman :-)




[REBOL] Status words

2000-06-22 Thread metiisto

Did not find any word in the dictionary to list all native words and user
defined words, is there one?

Forth has a word to list all the words in the dictionary.  Logo has commands
to list user defined words and variables.  Would be nice if Rebol has
something similar.


--
Harry Parshall Jr.
[EMAIL PROTECTED]





[REBOL] sizeof values

2000-06-22 Thread tim

Hello:
Does rebol have a feature to check the size in
bytes of a value?
TIA
-Tim




[REBOL] Status words Re:

2000-06-22 Thread larry

Hi Harry

The globally known words are returned in a block by

words: first system/words

You can print them one to a line with

foreach word first system/words [print word]

You can use WHAT to list all functions.

-Larry

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 22, 2000 4:36 PM
Subject: [REBOL] Status words


 Did not find any word in the dictionary to list all native words and user
 defined words, is there one?

 Forth has a word to list all the words in the dictionary.  Logo has
commands
 to list user defined words and variables.  Would be nice if Rebol has
 something similar.


 --
 Harry Parshall Jr.
 [EMAIL PROTECTED]





[REBOL] Fw: recursive RIP Re:

2000-06-22 Thread bpaddock

 I don't have it but Cal Dixon produced a-rip.r around April 13 2000. Here


I think this is what you are looking for:

To: [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
Date: Thu, 24 Feb 2000 9:45:56 +
Subject: [REBOL] RIP

Well, RIP didn't have the ability to archive sub-directories, so I added 8 
lines and changed one slightly so it could.. I've tested it a bit and it 
seems to work well...  So here it is (attached)

Cal Dixon
--

Content-Type: text/plain; name="a-rip.r"; format=flowed
Content-Disposition: attachment; filename="a-rip.r"

REBOL [
Title: "RIP - REBOL Binary Archiver"
Date: 22-Feb-2000
File: %rip.r
Author: "Carl Sassenrath"
Email: [EMAIL PROTECTED]
Version: 1.0.1
Purpose: {
Gathers and compresses files into a self extracting
archive file that has a REBOL header.  Note that
resulting archive is BINARY for minimal size.
}
History: [
1.0.0 22-Feb-2000 "Carl Sassenrath" {Original code.}
1.0.1 24-Feb-2000 "Cal Dixon {Added subdirectoy support}
]
]

file-types: [%.r %.txt %.html %.htm %.bmp %.jpg %.jpeg %.gif]

path: to-file ask {
Enter the directory path.
Press RETURN key for current directory,
or type a path in the form: dir/dir/dir

Directory? }

if empty? trim path [path: %./]
if (last path)  #"/" [append path #"/"]
if not exists? path [print [path "does not exist"] halt]

file-list: []
archive: make binary! 32000

print "Archiving:"
foreach file (files: read path) [
if find file-types find/last file "." [
prin [tab file " "]
data: read/binary path/:file
prin [length? data " - "]
data: compress data
print [length? data]
append archive data
append file-list reduce [file length? data]
]
if dir? path/:file [
   append file-list reduce [file 'DIR ]
   foreach newfile read path/:file [ append files file/:newfile ]
]
]

print [newline "Total size:" length? archive "Checksum:" checksum archive 
newline]

filename: to-file ask "Output file name? "
if empty? trim filename [filename: %archive.rip]
if not find filename "." [append filename ".rip"]
if all [exists? filename not confirm reform ["Overwrite file" filename "? 
"]] [
print "stopped" halt
]

header: mold compose/deep [
REBOL [
Title: "REBOL Self-extracting Binary Archive (RIP)"
Date: (now)
File: (filename)
Note: (reform [{To extract, type REBOL} filename {or run REBOL and 
type: do} filename])
]
file: (filename)
size: (length? archive)
path: (path)
files: (reduce [file-list])
check: (checksum archive)
secure none
if not exists? path [make-dir path]
archive: read/binary file
archive: next find/case/tail archive to-binary probe join "!DATA" ":"
if check  checksum archive [print ["Checksum failed" check checksum 
archive] halt]
print "Reviving:"
foreach [file len] files [
print [tab file]
either len = 'DIR [
   if not exists? path/:file [ make-dir path/:file ]
][
   data: decompress copy/part archive len
   archive: skip archive len
   either any [
   not exists? path/:file
   confirm reform [file "already exists - overwrite? "]
   ][write/binary path/:file data][print "skipped"]
   ]
]
]

insert archive reduce [header newline "!DATA:" newline]
write/binary filename archive

quit




[REBOL] sizeof values Re:

2000-06-22 Thread norsepower

'size? will work with a file or a URL. If you save the value to a file 
you can read its size.

 write %testone.test ""
 size? %testone.test
== 0
 write %testtwo.text "0"
 size? %testtwo.text
== 1
  

Hello:
Does rebol have a feature to check the size in
bytes of a value?
TIA
-Tim




[REBOL] Rebol for the world - in what language?

2000-06-22 Thread Galt_Barber




What are plans if any for dealing with non-european
character sets?  Many things are already out there
like Multi-byte schemes and Unicode.

What if anything does RT want to do to deal with the
need for internationalization?

Is there a problem as well because not every platform
Rebol ports to has Unicode support, etc.?

What about fonts in /View?  If I want to use a particular
font, is there a universal font format yet that will run on
all platforms?  Can I create one and ship it with the code?

Even non-vector non-scalable fonts would be better than nothing.
I suppose you could turn them into lots of little bitmaps and
stick them all in a little gif file and write a routine to blit chars
onto the screen from the font.gif for that, but yuck!

Ever curious,

-galt

p.s. I looked in the bookstore here in Santa Cruz for rebol books
last weekend but there didn't seem to be anything.
What should I be seeing about now?





[REBOL] Re: recursive RIP

2000-06-22 Thread alanwall

Hello [EMAIL PROTECTED]

On 22-Jun-00, [EMAIL PROTECTED] wrote:
 
 I'm guessing that somebody out there has modified the original RIP
 script to be recursive.  I'm in the middle of some stuff and could
 sure use that right about now.  Anyone want to help me out and mail it 
 to me, post it to the list, or post it to REBOL.org?
 
 Thanks,
 
 Sterling

This is odd the file that daedzaphod sent is diiferent that the 1 I have so
here is that 1. 
Regards
-- 
Captain, we´re sorry. We thought you were dead. - I was. I´m better now.
-- Drazi and Sheridan
JMS Trustee http://www.jms.org
HP=http://www.sonic.net/~alanwall/
First computer solar powered vic-20
AmigaQNX-notAmigaNG=no good
computers for people not suits
sent via Yam ver2 on AmigaForever ver3
Be a Rebel get [EMAIL PROTECTED]
UIN#=9391028


REBOL [
Title: "RIP - REBOL Binary Archiver"
Date: 22-Feb-2000
File: %rip.r
Author: "Carl Sassenrath"
Email: [EMAIL PROTECTED]
Version: 1.0.1
Purpose: {
Gathers and compresses files into a self extracting
archive file that has a REBOL header.  Note that
resulting archive is BINARY for minimal size.
}
History: [
1.0.0 22-Feb-2000 "Carl Sassenrath" {Original code.}
1.0.1 24-Feb-2000 "Cal Dixon" {Added subdirectoy support}
]
]

file-types: [%.r %.txt %.html %.htm %.bmp %.jpg %.jpeg %.gif]

path: to-file ask {
Enter the directory path.
Press RETURN key for current directory,
or type a path in the form: dir/dir/dir

Directory? }

if empty? trim path [path: %./]
if (last path)  #"/" [append path #"/"]
if not exists? path [print [path "does not exist"] halt]

file-list: []
archive: make binary! 32000

print "Archiving:"
foreach file (files: read path) [
if find file-types find/last file "." [
prin [tab file " "]
data: read/binary path/:file
prin [length? data " - "]
data: compress data
print [length? data]
append archive data
append file-list reduce [file length? data]
]
if dir? path/:file [
   append file-list reduce [file 'DIR ]
   foreach newfile read path/:file [ append files file/:newfile ]
]
]

print [newline "Total size:" length? archive "Checksum:" checksum archive
newline]

filename: to-file ask "Output file name? "
if empty? trim filename [filename: %archive.rip]
if not find filename "." [append filename ".rip"]
if all [exists? filename not confirm reform ["Overwrite file" filename "?"
]
]
 [print "stopped" halt
]

header: mold compose/deep [
REBOL [
Title: "REBOL Self-extracting Binary Archive (RIP)"
Date: (now)
File: (filename)
Note: (reform [{To extract, type REBOL} filename {or run REBOL and
type: do} filename])
]
file: (filename)
size: (length? archive)
path: (path)
files: (reduce [file-list])
check: (checksum archive)
secure none
if not exists? path [make-dir path]
archive: read/binary file
archive: next find/case/tail archive to-binary probe join "!DATA" ":"
if check  checksum archive [print ["Checksum failed" check checksum
archive] halt]
print "Reviving:"
foreach [file len] files [
print [tab file]
either len = 'DIR [
   if not exists? path/:file [ make-dir path/:file ]
][
   data: decompress copy/part archive len
   archive: skip archive len
   either any [
   not exists? path/:file
   confirm reform [file "already exists - overwrite? "]
   ][write/binary path/:file data][print "skipped"]
   ]
]
]

insert archive reduce [header newline "!DATA:" newline]
write/binary filename archive

quit





[REBOL] Status words Re:

2000-06-22 Thread KGD03011


Hi Larry,

Hi Harry

The globally known words are returned in a block by

words: first system/words

You can print them one to a line with

foreach word first system/words [print word]

That'll print out all the words, including words that were only defined
in a local context.

There's also huh.r:

http://www.rebol.org/utility/huh.r

It's not so necessary now with the improved help in View, but it still
comes in handy. It prints out the words grouped by datatype, and
in a console-space-saving table format.

I guess Larry didn't mention it because he wants me to come out of my
shell ;)

Eric

You can use WHAT to list all functions.

-Larry




[REBOL] Status words Re:

2000-06-22 Thread allenk

The improved help in view can also display by type

Try these
? native!
? function!
? char!

Cheers,

Allen K

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, June 23, 2000 9:36 AM
Subject: [REBOL] Status words


 Did not find any word in the dictionary to list all native words and user
 defined words, is there one?

 Forth has a word to list all the words in the dictionary.  Logo has
commands
 to list user defined words and variables.  Would be nice if Rebol has
 something similar.


 --
 Harry Parshall Jr.
 [EMAIL PROTECTED]







[REBOL] ping check? Re:

2000-06-22 Thread yaozhang

seems rebol dont handle ICMP  ?


-z

--- [EMAIL PROTECTED] wrote:
 Hi folks,
 
 Given an ip, how can I do a ping check in rebol?
 
 I would find this useful for raising the alarm for our clients.
 Is it possible?
 
 Thanks...
 
 -Anton.
 


__
Do You Yahoo!?
Send instant messages with Yahoo! Messenger.
http://im.yahoo.com/