[REBOL] Re: cgi question

2004-05-07 Thread Carl Read

On 07-May-04, Kai Peters wrote:

 Carl -

 thanks - removing the 'From:' line seems to do the trick. Do you or
 anyone else have a clue as to why though?

 After all, I should be able to send mail from the same sender to
 multiple recipients...

Well, a To: block for multiple recipients makes sense, but there's
only one sender, so a block for From: doesn't make sense.  (At least
not to me, anyway.  Can anyone think of a reason for multiple sender
addresses?)

-- 
Carl Read

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: cgi question

2004-05-07 Thread SunandaDH

Kai:

 You see me confused, for the script works well with 'my' formatting (am 
  coming from C and Pascal and have always wanted my braces and begin/end 
  pairs lined up nicely). I thought I read somewhere that REBOL is very 
  lenient when it comes to white space etc. including CR/LF etc.?

As Joel says when kicking of a detailed discussion on the subject: source 
layout can be a controversial and sensitive subject

http://www.rebol.org/cgi-bin/cgiwrap/rebol/ml-display-message.r?m=rmlBQFK

http://www.rebol.org/cgi-bin/cgiwrap/rebol/ml-display-message.r?m=rmlGCFK

I'm more of a style C person myself. But there is a lot to be said for 
experimenting with alternatives

Sunanda.
-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: [The Gimp] clashes with REBOL on Windows 2000

2004-05-07 Thread Arie van Wingerden

Hi Brian,

thanks for your impressive answer!

At the moment I can live again with my REBOL installation (as I wrote
earlier) but surely I will save your e-mail in order to be able to use it
when any such problem comes up again.

Luckily enough I use an account with administrator rights and I don't use
REBOL from any other accounts currently. That makes the case a lot less
complicated for me then.

Your suggestion to create a full-proof install-script sounds like a great
idea. Perhaps it would be even better to also have the script clean-up any
old REBOL installs before it does a new install?

(In fact RT should also improve the install part or, perhaps even better,
remove installation as it is done now.)

All in all a very good idea Brian! I think it could help a lot of people.
Thanks again.

Met vriendelijke groet / with kind regards,
   Arie van Wingerden
http://home.zonnet.nl/rebolution/


- Original Message - 
From: Brian Hawley [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 07, 2004 6:58 AM
Subject: [REBOL] Re: [The Gimp] clashes with REBOL on Windows 2000



 Hi Ari!

 You've run into a problem that tripped me up for a while:
 REBOL doesn't put its data in the proper places on Windows
 2000 and above - in other words, it is not logo-compliant.
 REBOL's default install puts its program file and data files
 in a directory under Program Files. Since Windows security
 settings prevent a standard user from writing to these
 program directories, only a Power User or administrator
 has sufficient permissions to use REBOL/View by default.

 Fortunately you can hack a REBOL/View install manually to
 make it mostly logo-compliant, and thus allow it to be used
 by ordinary users without being a security risk. Here's a
 quick overview, assuming a standard install of Windows 2000
 or above and REBOL/View 1.2.1 to 1.2.8 (please bear with me
 if you know some of this, I'm trying to make it useful to
 others that have the same problem):

 First, let REBOL/View install itself into some central place
 such as C:\Program Files\REBOL\View. This will set up most
 of the global settings in the registry and some of the local
 ones. Close REBOL. REBOL may have downloaded some files to
 this directory for the desktop - if this is a new install,
 you can delete everything but the program files.

 Next you need to create the local user settings. These are
 stored in the user profile directory, sort of like a user's
 home directory on Unix. Windows 2000 and above store their
 profiles in directories under C:\Documents and Settings,
 earlier versions of NT under C:\WINNT\Profiles. If you have
 trouble finding your profile an environment variable named
 USERPROFILE points to it automatically - this is like the
 Unix variable HOME, which is not defined by default on
 Windows. The Gimp uses USERPROFILE on Windows by default.

 Now, you'll need to repeat this for each user that already
 has a user profile created. Find the Application Data
 folder in the profile directory. It will be hidden. If you
 aren't sure where it is, there is an environment variable
 APPDATA that points to it. Create a REBOL subdirectory in
 that folder. That will be your REBOL home folder - make a
 note of where it is, it's time to hack the registry.

 Open a registry editor and find the key:
HKEY_CURRENT_USER\Software\REBOL\View
 Under that key there will be a string value named HOME,
 which will contain a REBOL-format directory name without
 the % - change that value to match the REBOL home folder
 you created earlier, for example:
/C/Documents and Settings/Ari/Application Data/REBOL/

 You should be set now. When you start REBOL now it will
 start the program in C:\Program Files\REBOL\View and
 use your REBOL home as its working directory. If you moved
 over your data to that folder it should work right away;
 otherwise REBOL will download the files it needs.

 Now here comes the tricky part. You may have noticed that
 in under that same registry key there is another string
 value named Product. That key is the marker that REBOL
 uses to determine whether it is installed and current.
 The problem is that this key is in absolutely the wrong
 place - it should be under HKEY_LOCAL_MACHINE, as it is
 a global setting, and treated as such by REBOL. It is a
 global setting because REBOL associates .r files with
 the REBOL executable, something that can only be done
 globally, and also registers an uninstaller with the
 Add/Remove Programs control panel (which can be done in
 a per-user way but they don't). Since this setting is
 under HKEY_CURRENT_USER every user that runs REBOL for
 the first time triggers a reinstall, which then messes
 up the registry settings for everyone. This key can't
 be moved to the right place either, because REBOL looks
 for it where it is. This is a long-standing REBOL bug.

 All this means that you need to create REBOL directories
 and REBOL\View registry keys for every user on the system
 and for the 

[REBOL] Re: [The Gimp] clashes with REBOL on Windows 2000

2004-05-07 Thread Gregg Irwin

Excellent info Brian,

Can we add it to REBOL.org somewhere (with due credit of course)?

If people think that would be a good thing, could a couple other
people review it as well?

Thanks!

-- Gregg 

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: [The Gimp] clashes with REBOL on Windows 2000

2004-05-07 Thread Brian Hawley

Hey Gregg,

At 07:27 AM 5/7/04 -0600, Gregg wrote:
Excellent info Brian,

Can we add it to REBOL.org somewhere (with due credit of course)?

If people think that would be a good thing, could a couple other
people review it as well?

Sure, although I'd like to be one of those people. I've had a lot
of time to give this problem thought - years, actually. If you
want I have more detail on the registry settings from an email I
wrote to this list on 16-Aug-2002, and more about directories
from a feedback about the subject I sent in Sep-2000.

Unfortunately this installation problem is a bit of a pet peeve
for me. That's why my emails on the subject have been a bit more
impressive (thanks Ari!) than I would like. If I could afford
to buy the SDK I would have rewritten the installer years ago
and submitted my changes to RT. I have offered to do so before,
no charge, but I need the existing installer source first.

Thanks!

-- Gregg

No problem!

Brian Hawley

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] ANN: IP-info plugin version

2004-05-07 Thread rebOldes

Hello rebol-list,

  IP-info version 0.0.2 is now available
  http://oldes.multimedia.cz/rss/builds/ipinfo/

-- 
Best regards,
 rebOldes -[ http://oldes.multimedia.cz/ ]

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] frustrating pairs...

2004-05-07 Thread Alain Goyé
; pairs are not numbers, not series, not objects... too bad !
; If we set:

toto: 5x5

; all this (and more...) is wrong!:

set toto/x 3; toto/x is not a word
set 'toto/x 3   ; 'toto/x is not a word
in toto 'x; toto is not an object
change toto 3; toto is not a series...

; So what ? 
; Well, I am frustrated while trying to touch only x or y of a pair in a function. 
This makes no problem:

zero-pair: func ['arg] [set arg 0x0]
zero-pair toto
toto; OK

; But now if I want a function to set the pair's x value to 0, all this is wrong again:

zero-x: func [arg] [arg/x: 0]; argument goes by reference
zero-x: func ['arg] [arg/x: 0]; Cannot use path on word! value
zero-x: func ['arg] [set arg/x 0]; toto/x is not a word
; etc.

; Of course this for example works:

zero-x: func ['arg] [
p: get arg
set arg as-pair 0 p/y
] 

; or in that special case:

zero-x: func ['arg] [set arg 0x1 * get arg]

; Is there a simpler way ?

; And what if I would like to pass an argument to specify whether to affect x or y in 
the function ?
; this is short nice:

test-print: func [p [pair!] 'd [word!]] [print p/:d]
test-print toto x

; but this isn't that an ugly usine à gaz (gas factory in French) ? :

test-change: func [
'arg [word!]the pair to affect
'd [word!]  the direction to change: x or y
val [integer!]  the value to set
] [
p: get arg
either d = 'x [
set arg as-pair val p/y
] [
set arg as-pair p/x val
]
]
test-change toto x 10

; ...while one would like so much just to write something like :

arg/:d: val; wrong of course...

; did I miss something please ?
; of course the above examples are useless, but here is the real one: 
; a function to scroll a box's pane using a horizontal OR vertical slider:

scroll: func [bx box sf slider 'd direction: x or y /local tmp][ 
if none? bx/pane [exit]
if 0  tmp: bx/pane/size/:d - bx/size/:d [
either d = 'x [ bx/pane/offset/x: - tmp * sf/data ] [ ; how to improve that ?
  bx/pane/offset/y: - tmp * sf/data ]
show bx 
] 
]

; Alain.





-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: ANN: IP-info plugin version

2004-05-07 Thread Maxim Olivier-Adlhoch

one word:


AWESOME!



-MAx
---
You can either be part of the problem or part of the solution, but in the end, being 
part of the problem is much more fun.
 

 -Original Message-
 From: rebOldes [mailto:[EMAIL PROTECTED]
 Sent: Friday, May 07, 2004 12:39 PM
 To: [EMAIL PROTECTED]
 Subject: [REBOL] ANN: IP-info plugin version
 
 
 
 Hello rebol-list,
 
   IP-info version 0.0.2 is now available
   http://oldes.multimedia.cz/rss/builds/ipinfo/
 
 -- 
 Best regards,
  rebOldes -[ http://oldes.multimedia.cz/ ]
 
 -- 
 To unsubscribe from this list, just send an email to
 [EMAIL PROTECTED] with unsubscribe as the subject.
 
 

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: ANN: IP-info plugin version

2004-05-07 Thread Arie van Wingerden

Hi rebOldes,

very very nice !!

Met vriendelijke groet / with kind regards,
   Arie van Wingerden
http://home.zonnet.nl/rebolution/

- Original Message - 
From: rebOldes [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 07, 2004 6:39 PM
Subject: [REBOL] ANN: IP-info plugin version


 
 Hello rebol-list,
 
   IP-info version 0.0.2 is now available
   http://oldes.multimedia.cz/rss/builds/ipinfo/
 
 -- 
 Best regards,
  rebOldes -[ http://oldes.multimedia.cz/ ]
 
 -- 
 To unsubscribe from this list, just send an email to
 [EMAIL PROTECTED] with unsubscribe as the subject.
-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: ANN: IP-info plugin version

2004-05-07 Thread Alain Goyé

Whaooo.

Alain.

- Original Message - 
From: rebOldes [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 07, 2004 6:39 PM
Subject: [REBOL] ANN: IP-info plugin version


 
 Hello rebol-list,
 
   IP-info version 0.0.2 is now available
   http://oldes.multimedia.cz/rss/builds/ipinfo/
 
 -- 
 Best regards,
  rebOldes -[ http://oldes.multimedia.cz/ ]
 
 -- 
 To unsubscribe from this list, just send an email to
 [EMAIL PROTECTED] with unsubscribe as the subject.
 
 

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: frustrating pairs...

2004-05-07 Thread Maxim Olivier-Adlhoch

 -Original Message-
 From: Alain Goyé [mailto:[EMAIL PROTECTED]
 Sent: Friday, May 07, 2004 1:13 PM
 To: [EMAIL PROTECTED]
 Subject: [REBOL] frustrating pairs...
 
 
 ; pairs are not numbers, not series, not objects... too bad !
 ; If we set:

(that's why they are called pairs  ;-) 

remember that you can use first second /1 and /2 

a: 1x5

a/1
a/x
first a

are all equivalent...

I know this does not answer your question... but since we are talking about pairs... 
its a good time for the reminder...


-MAx
 

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: [The Gimp] clashes with REBOL on Windows 2000

2004-05-07 Thread Gregg Irwin

Hi Brian,

Thanks very much! It would be really terrific if you could do your
review and coordinate a couple other volunteers (anyone willing?) then
give us a ping when you think it's ready.

I'll also take any input you have as I'm working on an installer
project, and I do have the SDK.

Thanks again!

-- Gregg 

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: cgi question

2004-05-07 Thread Jones, Scott

From: Kai Peters
KP You see me confused, for the script works well with 'my' formatting (am
KP coming from C and Pascal and have always wanted my braces and begin/end 
KP pairs lined up nicely). I thought I read somewhere that REBOL is very 
KP lenient when it comes to white space etc. including CR/LF etc.?

From: Gregg Irwin
GI Don't be confused, REBOL doesn't care at all about the formatting.
...

With all due respect, I am not a formatting elitist, either, and was not 
meaning to sound critical of Kai's formatting.  

In retrospect, the point I failed to make is that when cutting and pasting 
into a REBOL command line session, one can run into formatting issues.  
Here is an example from Kai's program, when a snippet is cut and pasted 
into a REBOL session (at least on Windows):

 header: make system/standard/email
** Script Error: Invalid argument: (missing value)
** Near: header: make system/standard/email
 [
[To:   [ recipient1 ]
[From: [ [EMAIL PROTECTED] ]
[Subject:  subject
[Organization: organization
[]
== [
To: [recipient1]
From: [EMAIL PROTECTED]
Subject: subject
Organization: organization
]

The same snippet runs without error when in a listing that is then run
as a program.  I frequently develop scripts by cutting and pasting 
from a text file into the command line.  I can get large code fragments 
loaded, so that I can then play with the results interactively. With
this method, at least on windows, REBOL *does* care about formatting.
As a result I tend to make sure that block arguments at least have the 
opening bracket start on the same line.

This is why I have so frequently warned of watch for line wrap when
responding to email on the list: cutting and pasting the fragment may
not work if the line received an unfortunate wrap location.

I *just* realized that I sort of assumed everyone developed using these
methods, and in that point I was being unfortunately narrow sighted.

I apologize!

With respect, best wishes to all!  Happy REBOLing however one wishes to 
format.

--Scott Jones

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: cgi question

2004-05-07 Thread Gregg Irwin

Hi Scott,

JS In retrospect, the point I failed to make is that when cutting and pasting
JS into a REBOL command line session, one can run into formatting issues.  

AH, yes! A truly excellent point! Very, very important indeed.

-- Gregg 

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: frustrating pairs...

2004-05-07 Thread Carl Read

I think it's best to just treat them as you would a number.  For
instance, when wanting to convert a number to its square-root, this
won't work...

 a: 9
== 9
 square-root a
== 3
 a
== 9

so we use this approach...

 a: 9
== 9
 a: square-root a
== 3
 a
== 3

So a zero-x function would be used like this...

 zero-x: func [arg][arg/x: 0 arg] 
 xy: 1x2 
== 1x2
 xy: zero-x xy
== 0x2
 xy
== 0x2

Not sure if that helps with your scroll function though.  My head's a
bit wolly at the moment... :-)

On 08-May-04, Alain Goyé wrote:
 ; pairs are not numbers, not series, not objects... too bad !
 ; If we set:

 toto: 5x5

 ; all this (and more...) is wrong!:

 set toto/x 3; toto/x is not a word
 set 'toto/x 3   ; 'toto/x is not a word
 in toto 'x; toto is not an object
 change toto 3; toto is not a series...

 ; So what ?
 ; Well, I am frustrated while trying to touch only x or y of a pair
 in a function. This makes no problem:

 zero-pair: func ['arg] [set arg 0x0]
 zero-pair toto
 toto; OK

 ; But now if I want a function to set the pair's x value to 0, all
 this is wrong again:

 zero-x: func [arg] [arg/x: 0] ; argument goes by reference zero-x:
 func ['arg] [arg/x: 0] ; Cannot use path on word! value zero-x: func
 ['arg] [set arg/x 0] ; toto/x is not a word ; etc.

 ; Of course this for example works:

 zero-x: func ['arg] [
p: get arg
set arg as-pair 0 p/y
 ] 

 ; or in that special case:

 zero-x: func ['arg] [set arg 0x1 * get arg]

 ; Is there a simpler way ?

 ; And what if I would like to pass an argument to specify whether to
 affect x or y in the function ? ; this is short nice:

 test-print: func [p [pair!] 'd [word!]] [print p/:d]
 test-print toto x

 ; but this isn't that an ugly usine à gaz (gas factory in
 French) ? :

 test-change: func [
'arg [word!]the pair to affect
'd [word!]  the direction to change: x or y
val [integer!]  the value to set
 ] [
p: get arg
either d = 'x [
set arg as-pair val p/y
] [
set arg as-pair p/x val
]
 ]
 test-change toto x 10

 ; ...while one would like so much just to write something like :

 arg/:d: val; wrong of course...

 ; did I miss something please ? ; of course the above examples are
 useless, but here is the real one: ; a function to scroll a box's
 pane using a horizontal OR vertical slider:

 scroll: func [bx box sf slider 'd direction: x or y /local
 tmp][
if none? bx/pane [exit]
if 0  tmp: bx/pane/size/:d - bx/size/:d [
either d = 'x [ bx/pane/offset/x: - tmp * sf/data ] [ ; how
 to improve that ?
  bx/pane/offset/y: - tmp * sf/data ]
show bx 
] 
 ]

 ; Alain.





-- 
Carl Read


-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] AW: frustrating pairs...

2004-05-07 Thread Christian Ensel

Dear Alain,

 either d = 'x [bx/pane/offset/x: - tmp * sf/data ] [ ; how to improve that
?
 bx/pane/offset/y: - tmp * sf/data ]

The function MIX-PAIRS as defined below takes two PAIR!s and a word of value
X or Y. Depending on the latter MIX-PAIRS returns a new PAIR! which is
composed by A's axis as supplied in the 'D argument and B's opposite axis.
This lets you 'simulate' touching only one axis easily.

Sounds very confusing, I know, but look at the following code snippet, you
will get the idea:

; cut'n'paste -- (beware of
line-breaks) -
REBOL []
mix-pairs: func [a [pair!] b [pair!] 'd [word!] /local way] [
  (a * way: pick [1x0 0x1] :d = 'x) + (b * reverse way)
]
scroll: func [bx sf 'd] [
  bx/pane/offset: mix-pairs bx/size - bx/pane/size * sf/data bx/pane/offset
:d

;^^^
  ;--  bx/pane/offset is modified only for the direction supplied in :d
  ;by setting the opposite axis back to the value before the
modification
  ;
  show bx
]
d: 'x
view layout [
  across bx: box 200x100 white with [
pane: make-face/spec 'box [size: 40x40 color: red]
  ]
  sf: slider 20x100 [scroll bx sf :d] return
  tg: btn toggle [d: select [x y x] :d
sf/data: bx/pane/offset/:d / (bx/size/:d - bx/pane/size/:d)
show [tg sf]
] ]
; cut'n'paste -- (beware of
line-breaks) -

regards,

Christian



-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: [The Gimp] clashes with REBOL on Windows 2000

2004-05-07 Thread Brian Hawley

Sure!

Give me an idea of what you have in mind (script, tutorial, essay)
and I'll do what I can. I've been writing installer scripts of
various forms since the Win 3.1 days and I'd be interested in an
excuse to see what changes the last couple of years have brought.

Brian Hawley

At 03:05 PM 5/7/04 -0600, Gregg wrote:
Hi Brian,

Thanks very much! It would be really terrific if you could do your
review and coordinate a couple other volunteers (anyone willing?) then
give us a ping when you think it's ready.

I'll also take any input you have as I'm working on an installer
project, and I do have the SDK.

Thanks again!

-- Gregg

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.