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

World: r3wp

[Core] Discuss core issues

Volker
23-Mar-2005
[832x2]
http://vbnet.mvps.org/index.html?code/fileapi/folderdatetime.htm
for visual basic, googled "windows change directory date api"
can zip do it?
Graham
25-Mar-2005
[834]
>> to-block %test
== [test]
>> to-block %test/
** Syntax Error: Invalid path -- test/
** Near: (line 1) test/
Tomc
25-Mar-2005
[835]
>> b: copy [] insert b %test/
== []
>> b
== [%test/]
Volker
26-Mar-2005
[836x2]
file! is an any-string and thus sourced. probe to-block %"1 + 2"
only usable for loading from strings, or with some caution IMHO.
  probe to-block mold/only %test/
Raimund
30-Mar-2005
[838]
Hi, is it possible to restore the date of a file which was read via 
ftp?
Colin
30-Mar-2005
[839]
How about not using ftp and try Coyote :)
Chris
30-Mar-2005
[840]
>> foo: [a [does this]]
== [a [does this]]
>> bar: [b [does that]]
== [b [does that]]
>> rejoin [foo bar]
== [a [does this] [b [does that]]]

Is there an equivelant function that would give me:
== [a [does this] b [does that]]
Izkata
30-Mar-2005
[841]
>> A: []
== []
>> insert A bar
== []
>> insert A foo
== [b [does that]]
>> ? A
A is a block of value: [a [does this] b [does that]]
Chris
30-Mar-2005
[842]
Yep, I can fudge it that way, but I was looking for a single function, 
like 'rejoin or 'reduce
Izkata
30-Mar-2005
[843x4]
Or, if you don't mind changing 'bar:
>> insert bar foo
== [b [does that]]
>> ? bar
BAR is a block of value: [a [does this] b [does that]]
There probably is, but I prefer simpler commands so I know what's 
going on  (^.-)
ah
compose [(foo) (bar)]
Ammon
30-Mar-2005
[847]
How about...

>> foo: [a [does this]]
== [a [does this]]
>> bar: [b [does that]]
== [b [does that]]
>> append copy foo bar
== [a [does this] b [does that]]
>> compose [(foo) (bar)]
== [a [does this] b [does that]]
Izkata
30-Mar-2005
[848]
ugghhh I still needa get used to 'copy
Chris
30-Mar-2005
[849x2]
No, specifically looking for -- word [foo bar]
I have a feeling that if 'reduce doesn't do it, then nothing will...
Ammon
30-Mar-2005
[851x2]
>> one-word: func [block /local val][val: copy [] foreach word block 
[append val get word]val]
>> one-word [foo bar]
== [a [does this] b [does that]]
;~>
Chris
30-Mar-2005
[853]
I should have specified built-in...
Ammon
30-Mar-2005
[854x2]
Hehe, I expected that. ;~>
Although, I don't understand why.  It is a one-line solution so I 
don't see why it should make a difference if it is built in or not...
Chris
30-Mar-2005
[856x2]
I was thinking (name pending) --

one-word: func [blk][head while [not tail? blk][blk: change/part 
blk get blk/1 1]]
I'm not partial to creating new values when I don't have to :^)
Ammon
30-Mar-2005
[858x3]
I think I like that better.
I think that this functionality should be added to GET
There are quite a few words in REBOL that, IMHO, should have automatic 
block handling.
Chris
30-Mar-2005
[861]
Hmm, and I was thinking of a refinement to 'reduce.  'Get makes more 
sense...
[unknown: 10]
30-Mar-2005
[862]
... Is there a quick trick to compare 2 pairs??  Seems 'lesser? or 
greater? dont work on pairs...
Ammon
30-Mar-2005
[863]
Tell me, is 10x0 or 0x10 greater?
[unknown: 10]
30-Mar-2005
[864x2]
from my point of view its equal ;-)
Thansk for the wakeup call ;-)
Brock
30-Mar-2005
[866]
Are you thinking about this?
>> data: 10x0
== 10x0
>> data/x
== 10
>> data/y
== 0
>>
Ammon
30-Mar-2005
[867]
I'd just compare X and Y values separately...
[unknown: 10]
30-Mar-2005
[868x2]
perhpas yes...
Yes thats what i do currently...
Chris
30-Mar-2005
[870]
Are you trying to compare area?  -- greater-pair?: func [p1 p2 /local 
ps][ps: reduce [p1 p2] pick ps (p1/x * p1/y) > (p2/x * p2/y)] -- 
which can be tweaked for when p1 and p2 are equal...
[unknown: 10]
30-Mar-2005
[871]
Thanks Chris... i worked it out by splitting the pair into parts...
Ladislav
31-Mar-2005
[872x2]
Chris:

>> foo: [a [does this]]
== [a [does this]]
>>  bar: [b [does that]]
== [b [does that]]
>> foobar: compose [(foo) (bar)]
== [a [does this] b [does that]]
ah, it's there already
Izkata
31-Mar-2005
[874]
Yes it is - but he wants [foo bar] to become  [a [does this] b [does 
that]] without the () or anything else inside..
Anton
31-Mar-2005
[875]
I think the answer is: it's not in current rebol.
Chris
31-Mar-2005
[876]
Yep, I'm resigned to that.  (and I'll word my queries a little better 
next time :^)
Gregg
1-Apr-2005
[877]
http://www.rebolforces.com/articles/pairs/
[unknown: 10]
1-Apr-2005
[878]
A nice one...
Graham
5-Apr-2005
[879x2]
how does one find out the currrent secure level?
secure query
eFishAnt
5-Apr-2005
[881]
a nice 1x1...