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

World: r3wp

[All] except covered in other channels

Ladislav
4-Sep-2006
[2253x2]
Current account flags for 'lmecir@...' on 'rebol':

	ECHOPOST
yet it bounces my posts
Graham
4-Sep-2006
[2255]
tomc is the mailing list man
Ladislav
4-Sep-2006
[2256]
there was a ML group, but  I don't see it, has it been deleted?
Graham
4-Sep-2006
[2257x2]
hmm.
Can't see it either.
Gabriele
4-Sep-2006
[2259x2]
ladislav, what error does it give you back?
ah, i see the messages went thru. so maybe it was a temporary problem.
Ladislav
4-Sep-2006
[2261]
aha, so you see the messages?
Graham
4-Sep-2006
[2262x2]
me too
must be your email playing up again Ladislav .. it did this a couple 
of years ago as I remember
Ladislav
4-Sep-2006
[2264]
this is different, I got mails like this:

This is the Postfix program at host mail.rebol.net.

I'm sorry to have to inform you that your message could not be
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to <postmaster>

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

			The Postfix program
Pekr
4-Sep-2006
[2265x2]
hmm, there might be some misconfiguration on your provider's side, 
and hence your mail being regarded a spam for e.g.?
But I can see your messages on ml, so ...
Ladislav
4-Sep-2006
[2267]
fine, I hope you will post your preferences, then :-)
Pekr
4-Sep-2006
[2268x3]
preferences to what? :-)
well,it is just that sometimes it happens, that mail server can be 
misconfigured, but it is not your case apparently, or my mozilla 
would mark your emails as possible spam ...
everything looks fine here ...
Ladislav
4-Sep-2006
[2271x3]
preferences to what? :-)
 - I meant your preferences to the FOUND? subject
found? select reduce [1 none] 1

and

    switch/default 1 reduce [1 none] [2]
(I hope you received that post)
Pekr
4-Sep-2006
[2274x5]
yes, twice :-)
found? select 1 reduce [1 none] .... should be found? select reduce 
[1 none] 1 probably?
I like 'found? as-is, but it is true, that I sometimes thought, that 
it would perform 'find for me too .... found? find series value - 
simply that 'find is redundant here ....
but that is just my non-native english perspective, which came to 
my mind few times, without actually thinking more deeply about consequences 
...
as to found? select ... dunno if it is valid thinking - you are not 
searching the series, altough reading the expression "in english" 
might suggest it - you are performing found? on the result of select 
function call ....
Ladislav
4-Sep-2006
[2279]
right, Pekr, I mentioned the SELECT issue because it is "at the heart" 
of the SWITCH problem
Oldes
4-Sep-2006
[2280x2]
Using found? select .. can be problem anyway as the selected value 
can be 'none (you found 'none) :-)) I'm not using found? much often 
i prefere none? and not none? (found? is a shortcut anyway)
(sorry I can see pekr founded this issue as well:-)
Ladislav
4-Sep-2006
[2282]
how about the SWITCH question?
sqlab
4-Sep-2006
[2283]
>> to logic! select [a b 0] 'b
== false
Ladislav
4-Sep-2006
[2284]
aha, that doesn't look good either
sqlab
4-Sep-2006
[2285]
This is also problematic
Gabriele
4-Sep-2006
[2286x6]
i got that bounce email after my last post today too.
maybe someone subscribed to the list is bouncing? although the error 
message refers to a mail loop.
select reduce [1 none] 1 is the same problem as pick reduce [none] 
1 and so on... the problem with switch can be considered a bug, however 
switch expects a block after the value so this is debatable.
i think, that since we have other ways to check for existence (find 
for select, or length? for pick), the behavior is still acceptable 
because useful in many cases.
of course, Ladislav's /default approach would probably be better.
(but can never solve the switch problem completely, because any value 
used as default could appear in the block  - you have to use find)
Ladislav
4-Sep-2006
[2292x3]
right, Gabriele, but SWITCH can be implemented using FIND, which 
would solve this issue
switch expects a block after the value so this is debatable.
 - how about switch/default 1 [1 #[none]] [2] then?
sorry, forget about it, I just want to say, that SWITCH doesn't check 
the value is followed by a block
Gabriele
5-Sep-2006
[2295x3]
yes, i agree it's a problem, it's just not a problem in practice 
:)
i'd actually implement switch using parse. i find it very useful 
to be able to specify multiple values for the same block.
i.e. switch val [2 4 6 ['even] 1 3 5 ['odd]]
Ladislav
5-Sep-2006
[2298x4]
that is what Cyphre wants too
a possible implementation:
switch1: func [
    "Selects a choice and evaluates what follows it."
    [throw]
    value "Value to search for."
    cases [block!] "Block of cases to search."
    /default case [block!] "Default case if no others are found."
    /local blk
][
	value: find cases value
	if value [value: find next value block!]
    either value [do first value] [if default [do case]]
]
it is slower than SWITCH due to "double search", though
Anton
5-Sep-2006
[2302]
I like that behaviour. I planned to write something similar for a 
long time... :)