r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Core] Discuss core issues

Graham
18-Sep-2005
[2063x4]
USAGE:

    SEND address message /only /header header-obj /attach files /subject 
    subj /show

DESCRIPTION:
     Send a message to an address (or block of addresses)
     SEND is a function value.

ARGUMENTS:

     address -- An address or block of addresses (Type: email block)

     message -- Text of message. First line is subject. (Type: any)

REFINEMENTS:
     /only -- Send only one message to multiple addresses
     /header -- Supply your own custom header
         header-obj -- The header to use (Type: object)
     /attach -- Attach file, files, or [.. [filename data]]

         files -- The files to attach to the message (Type: file block)
     /subject -- Set the subject of the message
         subj -- The subject line (Type: any)
     /show -- Show all recipients in the TO field
so, I guess


send/only/header  [    [test1-:-somehost-:-com][test2-:-gmail-:-com] ] "This 
is a test" lv-header "Test Subject"
I don't believe that 'send examines the header for cc and bcc fields.
yeah, it doesn't.  check source send
PhilB
18-Sep-2005
[2067]
So I have to provide all the addresses as the 2nd parameter ... an 
amalgamation of the To: CC: & BCC addresses .....
Graham
18-Sep-2005
[2068x3]
no.
you have to rebuild the header for BCC so that the to: address is 
the BCC: address, and the cc: field is none.
since BCC means blind copy - ie the recipient should not get to see 
the cc fields, and the email should be addressed to them.
PhilB
18-Sep-2005
[2071]
OK .. this seems to work .... thanks graham.
Graham
18-Sep-2005
[2072]
no problems.
Ladislav
19-Sep-2005
[2073x2]
One "poll" question. How many of you are using function with optional 
argument in your scripts and how much would you miss this feature?
Another "poll". What would you say to this:
Pekr
19-Sep-2005
[2075]
what do you mean by function with an "optional argument? do you mean 
refinement?
Ladislav
19-Sep-2005
[2076x2]
+-: :negate
+- 6 ; == -6
+- -6 ; == 6
Function with optional argument: we can say either:
    list-dir %.
or
    list-dir
Pekr
19-Sep-2005
[2078]
Weren't optional arguments problem in rebol? Wasn't it said to compliacte 
it language parser? I can live without them so far ... but ask those 
who code in rebol intensively ...
Henrik
19-Sep-2005
[2079]
I just use refinements, if I want optional arguments... but I rarely 
use them
Geomol
19-Sep-2005
[2080]
Ladislav, I've programmed an UNIX-like cd function with optional 
argument, but that's about it.
Ladislav
19-Sep-2005
[2081]
aha, but you are using it in the console rather than in sripts, aren't 
you?
Geomol
19-Sep-2005
[2082]
yes
Volker
19-Sep-2005
[2083]
its handy for console and i like it there. in programs its more a 
problem.
Ladislav
19-Sep-2005
[2084]
thanks
Pekr
19-Sep-2005
[2085]
Ladislav - why are you asking?
Ladislav
19-Sep-2005
[2086x3]
just to find out which way of handling UNSET! looks optimal
the NEGATE case: for me the name looks "ugly", I prefer something 
shorter, like +-
(any better idea?)
Geomol
19-Sep-2005
[2089]
Nope, I think your +- is fine and short.
Graham
19-Sep-2005
[2090]
why the need for short function names?  Rebol is a symbolic language, 
so why not use more symbols ? :)
Geomol
19-Sep-2005
[2091x2]
I have a question about the order of arguments to a function. I wanna 
hear your opinion. I'm programming REBOL versions of some of the 
Amiga graphics.library functions. BltMaskRGBMap is a function of 
mine, that will copy part of an image at a certain position and size 
to another image through a mask. It takes the arguments: source image, 
source position, destination image, destination position, size and 
finally mask. That would be the order of the arguments, if it was 
an Amiga graphics.library function. But in REBOL, destination is 
often (always?) first, so maybe I should switch source image and 
position with destination image and position? What do you think would 
be the better way for a REBOL programmer?
Graham, :-) readability maybe?
Graham
19-Sep-2005
[2093x4]
Well, I can't recall the last time I needed to negate something.
Better to have something expressive like 'negate than obscure symbol 
combinations.
Remember that Rebol is meant to be read like english.
memory copy operations are always source -> destination.
Geomol
19-Sep-2005
[2097]
I use negate several places in Canvas, e.g. to calculate the angle 
of an ellipse:

canvas/effect/draw/2: negate arccosine ((u/x * v/x) + (u/y * v/y)) 
/ divisor
Graham
19-Sep-2005
[2098]
that does not +- my argument.
Geomol
19-Sep-2005
[2099]
Graham, are they?
WRITE destination value
destination -- (Type: file url object block)
     value -- (Type: any)
Ladislav
19-Sep-2005
[2100]
NEGATE looks quite ugly to me:
    mod negate n scale
the
    mod +- n scale
looks more readable (to me again)
Geomol
19-Sep-2005
[2101]
But maybe write isn't considered a mem operation, even if destination 
is an object or block? Well, I'm not sure.
Ladislav
19-Sep-2005
[2102]
When there are both ABS and ABSOLUTE, I would prefer to have both 
+- and NEGATE too
Geomol
19-Sep-2005
[2103x2]
CHANGE series value

Change seem to have destination first aswell. Didn't Carl write a 
blog about it at some time?
Some say tomato and some say tomahto
Some say potato and some say 
potahto
Tomato, tomahto, potato, potahto
Oh, let's call the whole 
thing off
Ladislav
19-Sep-2005
[2105]
:-)
Geomol
19-Sep-2005
[2106x2]
I'm sure, Carl wrote something about the order of arguments somewhere, 
but can't find it!?
Like a "function arguments guideline"? Doesn't it ring a bell?
Gabriele
19-Sep-2005
[2108]
Ladislav: the short form for negate was intended to be -, but of 
course that can have its own problems. +- is not very readable to 
me though, as i wouldn't immediately associate it with negate.
Ladislav
19-Sep-2005
[2109x2]
well, there is a character used on calculators:  #"±", but I am not 
able to write it on Czech keyboard
OTOH, - isn't a shortcut for negate. Cf:
    a * negate x
Romano
19-Sep-2005
[2111]
> x: 2
== 2
>> 2 * negate x
== -4
>> 2 * - x
== -4
>> 2 - - x
== 4
>> 2 - negate x
== 4
>>
Ladislav
19-Sep-2005
[2112]
right, I picked wrong example, but anyway, - is not a NEGATE shortcut: