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

World: r3wp

[Core] Discuss core issues

Henrik
24-Feb-2007
[7313]
hmm... is it possible to find () elements in a block? they don't 
have a specific datatype.

find [a b c (code) d] ?? ; what type?
Sunanda
24-Feb-2007
[7314]
Is this a start?
 find [a b c (code) d] paren!
Henrik
24-Feb-2007
[7315x2]
ah, precisely, thanks. didn't know there was a type for them
because:

type? () == unset!
Sunanda
24-Feb-2007
[7317]
And, perhaps worse:
    type? (1)
    == integer!

which is not what you might expect..... You have to do this to get 
type? to work:
     type? first [(1)]
    == paren!
JaimeVargas
24-Feb-2007
[7318x2]
The parens! triger evaluation so type? (1) = type? 1 ;== integer!
But parens inside blocks are not evaluated.
Robert
25-Feb-2007
[7320x2]
Is there a way to find out if a loaded file is encrypted with CLOAK?
Or do I have to read it and try to DECLOAK it?
Sunanda
25-Feb-2007
[7322]
As far as I know, an encloaked string is just a jumbled up, binary 
version of the original string: it carries no prefix signature so 
you can't tell at a glance it is an encloaked string rather than 
another bit of binary.

So, yes, as far as I knoww, you'll have to read and attempt decloaking. 
 Or, if you have control over the writing, ensure some sort of identifiable 
prefix is added)
Henrik
25-Feb-2007
[7323]
>> do to-path reduce ['now 'none]   
** Script Error: now/none has no refinement called none
** Near: do to-path reduce ['now 'none]
>> do to-path reduce ['now none] 
== 25-Feb-2007/20:40:18+1:00
>> do probe to-path reduce ['now none]
now/none
== 25-Feb-2007/20:40:28+1:00
>> now/none
** Script Error: now has no refinement called none
** Near: now/none


I guess the difference is between 'none and none!, but I thought 
it was curious that the none! is accepted as a refinement.
Anton
25-Feb-2007
[7324x2]
>> now/#[none!]
== 26-Feb-2007/14:28:03+11:00
Actually it looks like you can put any issue!
>> now/#hello
== 26-Feb-2007/14:28:43+11:00
Gabriele
26-Feb-2007
[7326]
functions just ignore anything that is not a word in the path.
Robert
26-Feb-2007
[7327]
DECLOAK: I have the problem that a random char is added as the first 
char to a decloaked string. Is this a known problem?
Anton
26-Feb-2007
[7328x3]
Not to me it isn't. What version of rebol ?
It's not in Rambo.
encloak / decloak seem pretty stable to me. Be aware that these functions 
modify the string you pass it.
Robert
26-Feb-2007
[7331]
I only have the problem when not using read/binary but just have 
used WRITE and READ... strange.
Oldes
26-Feb-2007
[7332]
Just don't use just WRITE with encloked data as these data are binary 
data.
Gregg
26-Feb-2007
[7333]
I've never had a problem with encloak/decloak, but I would also avoid 
string ops that might translate the binary data somehow.
Anton
27-Feb-2007
[7334]
Yes, READ and WRITE are in text mode and translate line terminators, 
so LF can become CRLF and vice versa.
Oldes
27-Feb-2007
[7335]
Is there any better way how to convert issue! to binary! than this 
silly one?

issue-to-binary: func[clr ][load head insert tail insert next mold 
clr "{" "}"]
Maxim
27-Feb-2007
[7336]
and what do you want... the string or the value?
Oldes
27-Feb-2007
[7337]
I want binary value
Maxim
27-Feb-2007
[7338x2]
so four byte issue gives 32 bite value...
or is initial issue a decimal type integer?
Oldes
27-Feb-2007
[7340x3]
>> issue-to-binary #ff0000
== #{FF0000}
at this moment as-binary is working like:
>> as-binary #ff0000
== #{666630303030}
which i really don't like
Maxim
27-Feb-2007
[7343x3]
I know... both are valid .
same for tuples, etc.
for going to-from hex... I don't have a solution.
Oldes
27-Feb-2007
[7346x2]
it's stupid behaviuor. I really don't know what it can be good for, 
as I can always do:
>> as-binary next mold #ff0000
== #{666630303030}
ech, I know why it's molded as string - issue can hold any value... 
:( so my Rambo wish is pretty stupid now:-)
Ladislav
27-Feb-2007
[7348x2]
issue-to-binary: func[clr] [debase/base as-string clr 16]
issue-to-binary: func[clr] [debase/base clr 16]
Oldes
27-Feb-2007
[7350]
YES :-) that's much more better, thanks.
Gabriele
28-Feb-2007
[7351]
oldes, do you want me to delete that ticket or should i keep it?
Oldes
28-Feb-2007
[7352x2]
yes please
delete it as it's a nonsense
Gabriele
1-Mar-2007
[7354]
done
Maxim
1-Mar-2007
[7355]
(Oldes, just so you know, in english "more better" makes no sense. 
 better implies more.  ( I'm saying this just cause I've seen you 
write it a few times ;-)
Henrik
2-Mar-2007
[7356x2]
continuing from AltME: of course now that I think of it, launch/quit 
will always restart the app rather than run the script I made. :-/
using enbase 64 isn't safe for filenames is it?
Sunanda
2-Mar-2007
[7358]
Do you mean using it to generate file names that will be acceptable 
on any platform that REBOL runs on?
If so, I don't know, but I wouldn't take the risk.....

....I use checksum/secure and remove #{} part -- gets me a file name 
that is just letters (a-f) and digits.
Gabriele
3-Mar-2007
[7359x2]
i think base 64 uses /
henrik: the detective only updates the interpreter if it is needed; 
when it is needed, it downloades the new version as update.exe, and 
runs it, then quits. update.exe overwrites the main executable with 
itself then launchs it and quits. there is no other way on windows 
that i know of.
Henrik
3-Mar-2007
[7361]
gabriele, so you can rename a file while it runs?
Gabriele
3-Mar-2007
[7362]
not that i know of.