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

World: r3wp

[!REBOL3]

GrahamC
4-Mar-2011
[7580x2]
Does tab for path completion not work anymore ?
Or, did it never work?
Rebolek
4-Mar-2011
[7582]
never worked in R3
GrahamC
4-Mar-2011
[7583x2]
ok.
How bad would it be to have a strict  version of rebol vs a relaxed 
version.  I'm thinking of things like skip which require an integer 
and choke on none ...
BrianH
4-Mar-2011
[7585x2]
It would be bad to have a non-strict version, as someone might use 
it.
That's only bad if their scripts were published or used by others.
Rebolek
4-Mar-2011
[7587x2]
Can I create object from block of words and values?
*blocks of... like -  words: [a b] values [1 2]
Sunanda
4-Mar-2011
[7589]
This is one (fairly manual) way:
    words: [a b]
    values: [1 2]
    obj: make object! []
    for n 1 length? words 1 [
        append obj words/:n set in obj words/:n values/:n
        ]
BrianH
4-Mar-2011
[7590]
set bind/new/copy words obj values
Rebolek
4-Mar-2011
[7591x2]
yes..I though that there may be some fast native function for it 
;)
ah, thanks!
BrianH
4-Mar-2011
[7593]
The /copy is only necessary if you will be reusing the words block.
Sunanda
4-Mar-2011
[7594]
This line of code (complete with typo of extra colon on the ONLY) 
works in R2
    a: copy [] insert/only: a 8
But, in R3, it acts as a no-op

Neither behaviour seems reasonable -- why not a syntax error?
BrianH
4-Mar-2011
[7595]
There is a ticket about that already.
Sunanda
4-Mar-2011
[7596]
Thanks -- must have missed that one.
BrianH
4-Mar-2011
[7597]
See http://issue.cc/r3/1558and http://issue.cc/r3/1559
Claude
5-Mar-2011
[7598]
the rebol3-gui of RMA is on a good way. now we would like a R3 fixe 
to have the GUI on Linux & Mac !!!!!
Rebolek
5-Mar-2011
[7599]
Is there some good documentation about ports and schemes? Finding 
anything on rebol.com is almost impossible.
Gregg
5-Mar-2011
[7600]
I don't know of anything current from RT, but maybe these will help:

http://www.rebol.net/docs/prot-http.html
http://www.rebol.net/docs/
http://www.compkarori.co.nz:8000/Rebol3/Schemes/Http
Rebolek
5-Mar-2011
[7601]
Thanks! I also found this useful doc

http://www.rebol.net/wiki/Schemes:Notes
Pekr
5-Mar-2011
[7602x2]
There were imo better docs. I'll try to find my previous posts, I 
gathered some links ...
http://www.rebol.net/wiki/Ports
http://www.rebol.net/wiki/Port_Examples

http://www.rebol.net/r3blogs/0130.html- More about Port layers - 
the OSI Model

http://www.rebol.net/r3blogs/0129.html- Simple TCP example: HTTP 
web page transfer
http://www.rebol.net/r3blogs/0128.html- Skip and Seek on ports
http://www.rebol.net/wiki/TCP_Port_Details
Gregg
5-Mar-2011
[7604]
Should we copy these to the REBOL 3 Schemes group?
GiuseppeC
5-Mar-2011
[7605x2]
I have not understood REBOL response of Sunanda question

     b: reduce ['now]
    do first b
    (nothing on console)
    do b
    ==6-Mar-2011/0:48:32+1:00
    do do first b
    == 6-Mar-2011/0:48:32+1:00


Why 2 "DO" are needed when you use FIRST ? Which is the difference 
?
The same for DO B/1. Which is the difference between the WORD "now" 
used by "DO B" and the WORD "now" you get from DO B/1 ?
BrianH
5-Mar-2011
[7607x4]
In R3, DO of a word! value is basically equivalent to GET of the 
word. So in the example above, the first DO performs a GET of 'now, 
retrieving the value assigned to it, the NOW function. Then the second 
DO of the value of the NOW function performs that function.
If you DO a block, it interprets the block. In that case, the word 
is inline so it is evaluated as an inline word, as a GET then a DO.
So, getting rid of the distracting REDUCE, the first line is this:
    b: [now]

It is a block with a word! value in it. In the context that the word 
is bound to, the function value NOW is assigned to that word.

You can either have a dialect processor like DO interpret the block:
    do b

or you can treat the block like data and interpret the data yourself, 
emulating the dialect processor (all of these lines are equivalent):
    do do first b
    do do b/1
    do get b/1
Note that those lines are equivalent for that particular data. For 
other data, they may or not be equivalent.
Sunanda
6-Mar-2011
[7611]
Is there a reason this works in R3? (it fails in R2)
    >> context [a: :b b: :c c: a]
    == make object! [
        a: none
        b: none
        c: none
BrianH
6-Mar-2011
[7612x2]
I'm guessing convenience.
Note that it works in USE that way as well. Specified words are initialized 
to none.
Sunanda
6-Mar-2011
[7614]
That makes some sense, thanks.

Also consistent with local words (and unused refinement words) in 
functions
BrianH
6-Mar-2011
[7615]
The guideline in R3 seems to be that things are to be consistent 
unless there is a good reason to not be in specific cases. Fewer 
docs needed that way :)
Ladislav
6-Mar-2011
[7616x2]
Hmm, I do not see a consistency there anyway - system/contexts/user 
context words are not initialized to NONE
So, instead of achieving consistency in R3 we just obtained a different 
kind of inconsistency. (Actually, I do not mind much, I just do like 
to name the things properly)
BrianH
7-Mar-2011
[7618]
There is a good reason not to be in the specific case of system/contexts/user: 
RESOLVE overriding. So this is an example of the "unless" part :)
Ladislav
7-Mar-2011
[7619x2]
That is not exactly what I had in mind. (especially when taking into 
account, that the usage of RESOLVE does not need to be considered 
"initialization") What I had in mind was, that:


1) there are two different values used to initialize variables: #[unset!] 
and #[none!]

2) because of that, the situation cannot be considered "consistent", 
unless one of the above values ceases to be used for initialization 
purposes, no matter whether we move some of the variables from the 
category of "initialized to #[unset!]' to the category of 'initialized 
to #[none!]'
Moreover, the local words in functions (I mean function arguments) 
actually are not initialized to #[none!]. The only observation that 
is true is, that after a function call, and only when the corresponding 
refinement is not used in the function call, the corresponding "refinement 
variables" are set to #[none!] - notice, that I intendedly did not 
use the notion of "initialized", since the function variables (do 
not confuse with closure variables) "exist" even before a function 
call is made in a sense, that can be easily demonstrated.
Pekr
7-Mar-2011
[7621]
Carl went alive in the R3 Chat, stating he would like to once again 
start posting status messages more frequently now. Let's hope :-)
Pekr
8-Mar-2011
[7622]
Does anyone know about some cross-platform decent serial communication 
library? I miss serial port in R3. We are playing with some devices, 
and serial communication is still being widely used method. We could 
ask Carl to release it for R3, or just map some existing open-source 
library as an extension. I could start bounty on that ....
ddharing
8-Mar-2011
[7623]
Pekr, are you on Windows or Linux?
Pekr
8-Mar-2011
[7624x2]
Windows. But I expect Linux, ARM, BeagleBoard, etc :-)
I just wonder if R2 serial communication was cross-platform? Then 
it might be best, if Carl would release the code ...
ddharing
8-Mar-2011
[7626x3]
Does R3 for Windows have DLL access? You could just use the Windows 
API to access the serial port -- http://msdn.microsoft.com/en-us/library/ms810467.aspx
This looks like a simpler start -- http://www.robbayer.com/files/serial-win.pdf
Not exactly cross platform, though
Kaj
10-Mar-2011
[7629]
Aargh