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

World: r3wp

[Core] Discuss core issues

Volker
25-Jun-2005
[1418x2]
foreach :b [1 2 3 4 5 6] compose/only [words: (b) print get words/1]
 and done ;)
but its not necceary here, as it keeps the same word-names, only 
with different bindings. so if you run the code again, the names 
are the same, the binding shall change anyway.
Pekr
25-Jun-2005
[1420]
:-)
Volker
25-Jun-2005
[1421x6]
Oops, i completely forgot about firskip ! Which you may use instead!
>> b: [1 2 3 4 5 6]
== [1 2 3 4 5 6]
>> forskip b 2[print [b/1 b/2]]
1 2
3 4
5 6
if you really need words, these would be global and easier to reach:
>> words: [x y]
>> forskip b length? words[set words b  print[x y]]
1 2
3 4
5 6
(remember view begins with 1.3, because some little things on forskip 
have changed ;)
(but the foreach may be a little bit faster)
Graham
25-Jun-2005
[1427]
Hmm.  I just noticed that rebcmd comes up saying "Component: Graphics 
1.3.0 blah ... " ... what is Graphics doing in core ?
PeterWood
25-Jun-2005
[1428]
Perhaps to allow image manipulation, for example in a CGI script?
Gabriele
26-Jun-2005
[1429]
exactly (afaik).
Maarten
26-Jun-2005
[1430]
yep, that is the 'face part without VID or X libs needed'
DideC
27-Jun-2005
[1431]
Use the 'draw function to handle draw blocks.
DideC
1-Jul-2005
[1432x4]
Does one can explain :
>> b: next next [1 2 3]
== [3]
>> head b
== [1 2 3]
>> head copy b
== [3]
>> c: [9]
== [9]
>> insert/only c b
== [9]
>> c
== [[3] 9]
>> d: copy/deep c
== [[3] 9]
>> head d/1
== [1 2 3]
head copy b

 show that 'copy only copy the block at the position we point into.
So why does 'copy/deep don't ?
Henrik
1-Jul-2005
[1436]
about graphics in core: would that mean you could create graphics 
without requiring an X server if used on BSD/Linux? I believe that 
X is normally necessary...
Gregg
1-Jul-2005
[1437]
Dide, Good question for Carl.
Maarten
2-Jul-2005
[1438]
Henrik: yes. Command has grafx capabilities without VID and without 
requiring X. So you can typically save/png etc.
Volker
2-Jul-2005
[1439x2]
x ins necessary for fonts-handling. rest would work without it. except 
that /view does some initialisations at startup and fails without 
view.
(means without X)
Graham
5-Jul-2005
[1441]
Regarding the question on the mailing list on extracting a series 
of duplicates, I wonder why Rebol doesn't allow us to subtract one 
series from another.  If we are allowed to append one series to another, 
why not allow us to subtract?
But I guess the problem then is sameness.
Volker
5-Jul-2005
[1442]
we have that with set-operations. only it does not keep duplicates 
(i prefer it this way). And the duplicate-thing can be solved in 
a little loop, as gabriele showed.
Sunanda
5-Jul-2005
[1443]
As Volker says, exclude acts as a sort of subtract, but does not 
handle duplicates in the way the questioner needs.
>> exclude [1 2 3 4 5] [ 3 5]
== [1 2 4]
Joe
6-Jul-2005
[1444]
Are any technical details on encloak and decloak functions ?
Sunanda
6-Jul-2005
[1445]
I think this is as technical as it gets
http://www.rebol.net/cookbook/recipes/0023.html
Which tells you it is SHA1
Joe
6-Jul-2005
[1446]
thanks. The key is SHA1 encoded makes me guess that it's hard to 
break the key but not the "encrypted" content
[unknown: 5]
8-Jul-2005
[1447x2]
Is there anyway to get the ip address of the local computer?  My 
problem is that I use a VPN for some functions and have other techs 
that do also and wanted to make a utility that could simply determine 
what subnet they are on.  Problem is that I get the local ip of the 
lan and not the other interface ip's.  Anyway to get those?
This is one of my more major problems with REBOL - it is an internet 
language as advertised so you assume tasks like this would be simple 
or for example enumerating connected or listening ports, retrieving 
a routing table etc.  At least I can use call to get some other application 
to do it for me.
Sunanda
8-Jul-2005
[1449]
Does this do it?
 read join dns:// read dns://
MikeJ
8-Jul-2005
[1450x2]
that returns local loopback on my fedora core installation
When I did the above, I was using a dhcp supplied address.  When 
I change to a static ip, I get the same result.
[unknown: 5]
8-Jul-2005
[1452x3]
Sunanada - that only returned the lan interface ip but not the vpn 
interface ip that I wanted to get
I can get the ip information from the system/network/host-address
But its not the right stuff I need
Guest
8-Jul-2005
[1455]
Paul - non ability to open port on specific device or stuff you mentioned 
should be submitted to RAMBO as a wish, or as a bug, if Rebol claims 
to be networking internet language ;-)
JaimeVargas
8-Jul-2005
[1456x2]
Paul maybe this will help you.
use [port interfaces][
    ipconfig: does [

        until [attempt [port: open join udp://: 64000 + random 100]]
        interfaces: get-modes port 'interfaces
        close port
        foreach dev interfaces [
            print reform compose [
                join dev/name ":" "flags" mold dev/flags newline
                "^-inet" dev/addr "mask" dev/netmask 

                (either dev/broadcast [["broadcast" dev/broadcast]][""])

                (either dev/dest-addr [["dest-addr" dev/dest-addr]][""])
            ]
        ]
        interfaces
    ]
]
[unknown: 5]
8-Jul-2005
[1458x3]
Wow - Jaime that worked!  Excellent
can ports be gathered from the interfaces also?
such as what ports are connected - listening etc..
JaimeVargas
8-Jul-2005
[1461]
No. You will need something in the os.
[unknown: 5]
8-Jul-2005
[1462x2]
ahh ok
They should add that and we should have a command like the one you 
gave as a mezz function
JaimeVargas
8-Jul-2005
[1464x2]
You could always use CALL to get this info and the parse it.
What OS?
[unknown: 5]
8-Jul-2005
[1466]
yeah I know I actually have to do that now with a call to netstat 
-aon
JaimeVargas
8-Jul-2005
[1467]
You could always use CALL to get the open ports on the host system 
and the parse it. What OS? Do you want support for?