Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Oct 20 22:59
    @dockimbel banned @SmackMacDougal
  • Dec 03 2017 05:53
    @PeterWAWood banned @matrixbot
  • Sep 28 2016 12:19
    @PeterWAWood banned @TimeSeriesLord
  • Aug 13 2016 03:23
    @PeterWAWood banned @Vexercizer
viayuve
@viayuve
size? shows file size and folder size right? but why they show different size
I mean I have one file in one folder it should show same size right?
Boleslav Březovský
@rebolek
@viayuve it does not return folder size
that's just inode size
viayuve
@viayuve
what does shows folder size and sub-dir count in main folder
Boleslav Březovský
@rebolek
you need to write a loop and count sizes of all files together
Semseddin Moldibi
@endo64
@viayuve @toomasv
>> ? char!
    null             #"^@"
    newline          #"^/"
    slash            #"/"
    dbl-quote        #"^""
    space            #" "
    lf               #"^/"
    tab              #"^-"
    CR               #"^M"
    dot              #"."
    escape           #"^["
    sp               #" "
    comma            #","
Toomas Vooglaid
@toomasv
Oops! I took it from wrong place and didn't check! Again! Sorry :flushed:
Semseddin Moldibi
@endo64
@toomasv No problem!
Toomas Vooglaid
@toomasv
As a compensation, here is the list of keys, key-nums and chars as returned in view on-key (W10; keys wo angle brackets are returned as words):
key            num char
-----------------------
<back>          8  #"^H"
<tab>           9  #"^-"
<ctrl-enter>   10  #"^/"
<enter>        13  #"^M"
<esc>          27  #"^["
caps-lock      20  #"^T"
page-up        33  #"!"
page-down      34  #"^""
end            35  #"#"
home           36  #"$"
left           37  #"%"
up             38  #"&"
right          39  #"'"
down           40  #"("
insert         45  #"-"
delete         46  #"."
F1            112  #"p"
F2            113  #"q"
F3            114  #"r"
F4            115  #"s"
F5            116  #"t"
F6            117  #"u"
F7            118  #"v"
F8            119  #"w"
F9            120  #"x"
spTorin
@spTorin
@9214 Perfect rule for consonant "eri" consonant, tnx. I always tried to do it in a more complicated way. Like @rebolek's method.
Greg T
@gltewalt
Need to clarify feeding a binary value to make image!
Using pair and tuple with the Alpha channel included it returns:
>> make image! [1x1 255.210.0.120]
== make image! [1x1 #{FFD200} #{
78}]
But if I feed it a binary value for the alpha channel, I get this:
>> make image! [1x1 255.210.0 #{78}]
== make image! [1x1 #{FFD200}]
This seems to work though:
>> make image! [1x1 #{FFD200} #{78}]
== make image! [1x1 #{FFD200} #{
78}]
Greg T
@gltewalt
Single binary value doesn't seem to set the Alpha channel
nedzadarek
@nedzadarek
@gltewalt float/integer won't work either but they show an error like Script Error: invalid argument: 0.4
Greg T
@gltewalt
It should in that case, because it doesn’t match the spec
Craig Brown
@snotbubble

basic question, can't find info in docs:

>> g: [1 2]
== [1 2]
>> x: 1
== 1
>> g/x
== none
>> g/1
== 1

how to get at g with x ?

NjinN
@NjinN
g/:x or g/(x)
Craig Brown
@snotbubble
@NjinN got it. thanks!
Greg T
@gltewalt
If you read through that, let us know if anything is confusing, etc.
docs will be made better incrementally over the next few months
Greg T
@gltewalt
This seems to equal 84 instead of 42 if you were to convert the "on" bits in the following bitset.
>> b: make bitset! #{2A}
== make bitset! #{2A}
>> length? b
== 8

Seems to map to 01010100, but 42 is 00101010.

I'm missing something, and need to learn me some more stuff.

BlairLW
@BlairLW
Hey guys, is Ren-C & RedSystem the same?
Greg T
@gltewalt
No.
BlairLW
@BlairLW
alright, thanks. The Ren-C link to Stack Exchange went to Red, that's why I asked
Greg T
@gltewalt

"""
Ren-C is a diverging hostile fork of Rebol3 (not supported nor endorsed by Rebol3's creator). It has no relation with Red, nor is there any chance that any kind of "merge" will ever occur with it. The SO room named "Rebol and Red" is misleading, as it's mainly dedicated to that fork. It is not a place where Red contributors and community meet.

– DocKimbel Oct 2 '16 at 14:45
"""

Toomas Vooglaid
@toomasv

@gltewalt Yes that seems to be a problem:

>> c: to-binary 1
== #{00000001}
>> c: to-bitset c
== make bitset! #{00000001}
>> repeat i length? c [prin pick [1 0] c/:i]
00000000000000000000000000000010
>> to-integer 2#{00000000000000000000000000000010}
== 2

Also:

>> c: to-binary "a"
== #{61}
>> c: to-bitset c
== make bitset! #{61}
>> repeat i length? c [prin pick [1 0] c/:i]
11000010
>> to-char 2#{11000010}
*** Access Error: invalid UTF-8 encoding: #{C2000000}
*** Where: to
*** Stack: to-char  

>> to-char 2#{01100001}
== #"a"

But:

;...
>> c: to-integer 2#{11000010}
== 194
>> c: shift c 1
== 97
>> to-char c
== #"a"
Greg T
@gltewalt
Oh I think I figured it out
bitset is zero based index
>> 84 >> 1
== 42
binary! is one based index
>> shift/left 42 1
== 84
Greg T
@gltewalt
Have to shift right one bit if calculating a value from a bitsets "on" an "off" bits
I assumed to conversion did that for us
Toomas Vooglaid
@toomasv
:+1:
Semseddin Moldibi
@endo64
Would be nice to put into a wiki page
Toomas Vooglaid
@toomasv
Then correct way to look at bitset values is:
>> c: to-bitset #{2A}
== make bitset! #{2A}
>> repeat i length? c [prin pick [1 0] c/(i - 1)]
00101010
>> c: to-integer 2#{00101010}
== 42
Greg T
@gltewalt
:+1:
GiuseppeChillemi
@GiuseppeChillemi
Is there a way to know which area has focus ?
Also, is there a way to read the/set position of the text cursor ?
A last one: where do I find documentation about RTF and how to color text ?
(in RED)
Toomas Vooglaid
@toomasv

@GiuseppeChillemi

is there a way to read the/set position of the text cursor ?

I think I showed to you once.

Vladimir Vasilyev
@9214
@toomasv text selection, but not cursor position.
Toomas Vooglaid
@toomasv
Position too
Vladimir Vasilyev
@9214
And how would you do that?