• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

AltME groups: search

Help · search scripts · search articles · search mailing list

results summary

worldhits
r4wp1023
r3wp10555
total:11578

results window for this page: [start: 4701 end: 4800]

world-name: r3wp

Group: Core ... Discuss core issues [web-public]
Geomol:
23-Feb-2006
hehe, well. My problem is, I have so many things to do and so little 
time.
Geomol:
23-Feb-2006
It's been a while, since I last used Qtask. Do I need special permission 
to see that project?
Anton:
23-Feb-2006
Geomol, are you able to login to Qtask still ?

Reichart has approved/released the task, so all I need to do is add 
interested people as watchers.
Pekr:
1-Mar-2006
simply to bind 'do to the context of the function?
Pekr:
1-Mar-2006
well, the quote char was there simply by mistake and because I rewrote 
example according to initial syntax of do bind load str 'a, where 
'a is quoted too ;-)
Ingo:
5-Mar-2006
How can I position the internal (imap) scheme position? I'm trying 
to do sth. along the lines of: 

i: open imap://....
insert i [get mail 7]

and want to get the 7th mail ...
DideC:
9-Mar-2006
In the other way there is 'to-url :
	>> to-url "a b"
	== a b
But is there something simple to do the opposite ?
Oldes:
14-Mar-2006
only wait if you want to wait and do not want to quit;-)
Tomc:
21-Mar-2006
should also be noted that other  langs i.e. perl exibit the same 
behavior on windows do it is apt to be an OS call that decides two 
decimal places is wau too heady for its users
Gregg:
24-Mar-2006
I don't like hacks, but the minus op is a very practical shortcut. 
Should it try to be smart and return days if no time exists for either 
arg; otherwise do the same thing DIFFERENCE does (and what time do 
you assume if only given for one arg; midnight UTC?)?
Jarod:
26-Mar-2006
Can rebol do hashes of hashes, arrays of hashes, hashes of arrays, 
data structures within data structures, similar to the way Perl does 
it with references?
Jarod:
26-Mar-2006
but let's say I set some words to some blocks, and I put those words 
into another block, do I always have to reduce to actually see the 
stuff pointed to by the words in the blocks, or is there a way to 
actually insert the content of the words themselves into the blocks
ChristianE:
26-Mar-2006
you can do B: REDUCE[A], but if don't want to reduce you can also 
do sth. like B: [ ] APPEND B A
But I think what your looking for is sth. like
	>> a: [1 2 3] b: [ ]
	>> append/only b a
	>> probe b
	>> [ [ 1 2 3 ] ]
	>> clear a
	== [ ]
	>> probe b
	== [ [ ] ]
	>> append a 4 probe b
	== [ [ 4 ] ]
Jarod:
27-Mar-2006
But I am actually talking thorough discussion and documentation of 
every nook and cranny and how to do basic things people want and 
need to do with the language
Jarod:
27-Mar-2006
that was one of the things that drove me crazy about lisp, yeah it 
is a powerful language, and yeah it is a programmable language, but 
to some degree the only way to do anything really useful in the langauge 
was to in essence program lisp to function similar to other languages 
you were already familiar with, or to in essence extend lisp with 
functionality it should have already had before you even started 
programming in it it
Jarod:
27-Mar-2006
having to write a function to do that is a pain, but I can probably 
live with it, knowing exactly what it is doing
Jarod:
27-Mar-2006
how can you do more with dates than just add days to them?
Geomol:
28-Mar-2006
The situation with REBOL is, that you can do almost anything with 
it. If someone should document that, she could start now and not 
be finish, before she turned 100 years old. I saw myself as a very 
competent programmer with many years of experience in many different 
languages, before I discovered REBOL. It took me a year or so do 
'get' REBOL, because it's so different. I could very fast write simple 
things, but to get in under the skin of REBOL takes some time. In 
some way REBOL is a bit hard at first, and it takes some time to 
'get' it, then suddently it become very easy.
Gregg:
28-Mar-2006
Fore example In the case of "substring", that's a bad name IMO, because 
you can use the same concept on any series, not just strings. Is 
"subseries" a good name? Does it read well? Not so much. It could 
mean different things to different people (e.g. are you looking for 
nested series values?). What about "extract", ah, that's used already, 
and what are the implied semantics if we do override it and add behavior? 
I like EXCERPT myself, but it's not a nice short word that's easy 
to guess if you're not sure what it might be called. Whatever the 
name, should there be a /REMOVE refinement, or should there be a 
separate function for that?


OK, so let's assume we have a good name now, how do you define the 
bounds? There is no range! or bounds! type in REBOL. Do you just 
use lower and upper bounds, or should it take an offset and length? 
Should we define a dialect for this? If so, how flexibile should 
it be? Can you get multiple "pieces" all at once? Can you handle 
2D extractions easily and clearly? Should you? Can you specify reverse 
extractions (e.g. from the tail)? Should it return the elements in 
reverse in that case, or should it throw an error if the lower bound 
is higher than the upper bound? etc.
Gregg:
28-Mar-2006
So, you have to do this:
	COPY/PART AT xxx 5 10
instead of
	SUBSTRING xxx 5 14
	(or maybe SUBSTRING 5 10) 


Yeah, it's a few extra characters, but it's actually pretty expressive 
and clear.
Anton:
2-Apr-2006
Ok I have a question.


I would like to catch an error inside a function and throw it out 
so the error position is reported "near"

the function itself. As far as I understand we should do that with 
something like this:

check: func [

 [catch]  ; <-- function spec attribute flag which changes the reported 
 position of the error.
][
	load "http://("  ; <-- cause an error on purpose
]

Now I have tried various things:

>> check: func [][load "http://("]
>> check
** Syntax Error: Missing ) at end-of-script
** Near: (line 1) http://(

>> check: func [[catch]][load "http://("]
>> check
** Syntax Error: Missing ) at end-of-script
** Near: (line 1) http://(

>> check: func [[catch]][throw-on-error [load "http://("]]
>> check
** Syntax Error: Missing ) at end-of-script
** Near: 



But none of these seems to be reporting the "Near:" position that 
I'm expecting.

(Indeed, the last one looks kind of buggy reporting to me. Anyone?)
Jerry:
5-Apr-2006
Outer: context [
	name: "Outer"
	Inner: context [
		name: "Innter"
		get-outer-name: does [
			; I would like to return the outer name.
			; How would I do that? Thank you.
		]
	] 
]

; Making the get-outer-name function return Outer/name is not
; a good idea, since Outer can be cloned and its name can be
; changed, as follows 

Outer2: make Outer [ name: "Outer2"]
Outer2/Inner/get-outer-name

; Any help will be appreciated.
JeffM:
8-Apr-2006
I assume there is a simple refinement to do so (like /size to get 
the size of the image), but I can't seem to find it.
Jerry:
10-Apr-2006
How can I convert an integer! value to 2-byte hex binary! value? 
Say, 

>> do-something 15
== #{000F}

Thanks.
BrianH:
10-Apr-2006
It has been aailable in versions of View that can be upgraded to 
View/Pro with a license, even when the Pro features are disabled 
by the lack of a license. However, the struct! type is implemented 
by the library extension, along with routine! and such. Can anyone 
confirm that struct! is available in versions of View that do not 
have the library extension at all, like View for Mac?
JeffM:
11-Apr-2006
Not sure the best forum to put this on (to where Carl will see it). 
Are there plans in the future for actual bit operations besides and/or/xor? 
RIght now, bit shifting, rotating, etc. are extremely painful (and 
slow compared to what they should be) to do.
Anton:
12-Apr-2006
I am trying right now to write a file to an FTP server. What I would 
like to do is:
- open the port 
- try to write the file
- if that fails, create the parent directory if necessary
- try to write the file again
- close the port
Anton:
16-Apr-2006
Ah... figured out how to do that :) The solution is to disable close-on-fail 
in the handler, so that a failure in open does not close the ports. 
This allows the command port to be reused for other commands, such 
as make-dir.
JeffM:
18-Apr-2006
Like bit shifting. I do appreciate Gregg's functions. However, when 
something that boils down to a single instruction in hardware requires 
6 lines of code and multiple function calls, something is wrong. 
;)
Graham:
18-Apr-2006
this is what I want to do
Ingo:
19-Apr-2006
Do you mean like this?

>> b: "(blue)"
== "(blue)"
>> compose bind to block! b 'white
== [0.0.255]


You just have to give any word from the same context to bind ... 
so inthis case any word from the global context (i.e. system/words).

The only point to be aware of: If all this happens in a different 
context, and you happen to have a word named 'white in this context, 
then you have to use another word.
Geomol:
20-Apr-2006
Bit-shifting

One way to do bit-shifting is to multiply or divide with (2 ** positions). 
To make the code more readable, I could start making a shift block:

shift: []
repeat i 16 [append shift to-integer 2 ** i]

== [2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536]

To e.g. shift the number 123 left 5 positions, you do:
123 * shift/5
== 3936
To check, that 3936 is actually 123 shifted left 5 positions:
>> enbase/base debase/base to-hex 123 16 2
== "00000000000000000000000001111011"
>> enbase/base debase/base to-hex 3936 16 2
== "00000000000000000000111101100000"

To shift 3936 right 5 positions:
3936 / shift/5
== 123


As long as the numbers are not close to 4 byte long integer (2 ** 
32), we don't get number overflow.
DideC:
24-Apr-2006
Look at system/port/serial and change it to reflect what you have 
in /dev/
I guess with [ttyc0 ttyc1]
Almost it's what we have to do under Windows.
Maxim:
25-Apr-2006
just paste the following (inserting seems to be exponentially slow!) 
do [
	;----- appending -----
	print "^/^/^/==============="
	print "START APPENDING: one million times"
	blk: [] 
	s: now/precise
	loop 1000000 [
		insert tail blk none ; append
	]
	print ["completed: " difference now/precise s]
	
	;----- inserting -----
	print "^/==============="
	print "START INSERTING: ten thousand times"
	blk: [] 
	s: now/precise
	loop 10000 [
		insert blk none
	]
	print ["completed: " difference now/precise s]
	;----- inserting -----
	print "^/==============="
	print "START INSERTING: twenty thousand times"
	blk: [] 
	s: now/precise
	loop 20000 [
		insert blk none
	]
	print ["completed: " difference now/precise s]
]
Volker:
26-Apr-2006
what do you convert to number?
Gregg:
28-Apr-2006
Hi Jerry, "I know that we can use the JOIN function, but a + operator 
for string would be nice too. Why doesn't REBOL do so?"


Do you think it would be nice because it's more readable, or because 
it's familiar to people coming from languages that have it?


I came to REBOL with a long BASIC history, and it didn't take me 
long before I didn't miss + for concatenation at all. + is really 
a math op; I like REBOL's consistency, and I like the way REBOL concat 
code reads.
Robert:
30-Apr-2006
Hi, I need some help with BIND (I think that's what I need to use): 
I have a storage context, that has a bunch of function to handle 
the storage of other contexts. That those storage functions can work, 
they need to have access to the other context. I could do:
storage/save-record context-to-save ...
Robert:
30-Apr-2006
but I would like to do: context-to-save/save-record.
Robert:
30-Apr-2006
I think I need to switch the way it works:
	do bind [first object] storage
BrianH:
30-Apr-2006
I actually think that your best bet here is to pass the context you 
will be saving to the saving function as a parameter, like your original 
example  storage/save-record context-to-save  or if you really want 
to delegate you can assign the function as a member of context-to-save 
and call it like  context-to-save/save-record context-to-save , but 
then you are changing the context you are saving wih saving overhead. 
REBOL does direct delegation by default, rather than mixin delegation 
like Delphi, because REBOL doesn't pass the object reference as a 
hidden parameter like object-oriented languages do. Rebinding your 
function body every time would be time-consuming and either non-recursion-safe 
(bind) or consume a lot of memory (bind/copy) - just passing the 
context as a parameter would be quicker.
BrianH:
1-May-2006
Logically though, you do have an object that is providing the storage 
infrastructure and is acting on other objects. The objects aren't 
storing themselves and their storage isn't their primary function. 
They are delegating that function to another object. So, other than 
the data that the storage engine needs, you don't really need to 
be distributing the code for storage throughout the data to be stored, 
unless these objects need per-object-specific serialization and versioning 
algorithms.


All the dynamic context manipulations cal be done by your storage 
engine working on the objects to be stored as data - they really 
are anyways.
Anton:
7-May-2006
No.  I think I didn't think I still wanted to think about it, perhaps 
finding a better way as the second function is attempting to do.
Graham:
9-May-2006
>> smtp: open/lines tcp://bible-way.org:26
>> insert smtp "HELO Louis.com"
>> pick smtp 1

== {220-box61.bluehost.com ESMTP Exim 4.52 #1 Mon, 08 May 2006 22:02:46 
-0600 }
>> pick smtp 1

== {220-We do not authorize the use of this system to transport unsolicited, 
}
>> pick smtp 1
== "220 and/or bulk e-mail."
>> pick smtp 1

== {250 box61.bluehost.com Hello 203-79-92-225.cable.paradise.net.nz 
[203.79.92.225]}
Louis:
9-May-2006
Now I am getting:

Net-log: ["Opening" "tcp" "for" "esmtp"]
Net-log: [none "220"]

Net-log: {220-box61.bluehost.com ESMTP Exim 4.52 #1 Tue, 09 May 2006 
05:01:25 -0600 }

Net-log: {220-We do not authorize the use of this system to transport 
unsolicited, }
Net-log: "220 and/or bulk e-mail."
Net-log: [["HELO" system/network/host] "250"]

Net-log: {250 box61.bluehost.com Hello ip68-97-225-211.ok.ok.cox.net 
[68.97.225.211]}
Net-log: ["AUTH CRAM-MD5" "334"]
Net-log: ["WARNING! Using plain authentication."]

Net-log: [{AUTH PLAIN bGF0dXJrQGJpYmxlLXdheS5vcmcAbGF0dXJrQGJpYmxlLXdheS5vcmcAaXN0cmkx}
    "235"
]
Oldes:
9-May-2006
There is quick patch which should helps you to send crypted passwords

do http://box.lebeda.ws/~hmm/rebol/projects/smtp/latest/esmtp_1.3.2.r
Geomol:
11-May-2006
To test performance of some code, you can use this function:

time: func [:f /local t] [
	t: now/time/precise
	do f
	now/time/precise - t
]

Example:
>> time [loop 100000 [ch-db/2/drop <> "y"]]
== 0:00:00.34105
Gabriele:
16-May-2006
now, since this is a very common error among users, it may be useful 
to let send remove bcc. personally, i will vote against this, because 
i prefer educating users (documentation) rather than keeping them 
stupid and happy. ;) even in the case we do it, send is still *not* 
collecting the addresses from bcc anyway - so we're just wasting 
time removing something that someone wasted time adding.
Gabriele:
16-May-2006
so what you need to do now to send a message is - just send/header 
[list of addresses] msg header, with header being composed correctly 
- to should have what you want your recipients to see in to, from 
should have what you want your recipients to see in from, and so 
on; there should *not* be any bcc lines.
Joe:
16-May-2006
Anton, yes bcc is a blind copy. Gabriele explains it better than 
I did.  I found it very easy to code the new send function with the 
snippet above . The trick is to compose the right header and then 
send the message to both the to and bcc recipients. The MTA does 
remove the bcc field so the to: recipient or even the bcc: recipient 
do not have a bcc header field
Geomol:
19-May-2006
To give you an idea.
Instead of doing this in C:

	glClear (GL_COLOR_BUFFER_BIT);

	glColor3f (1.0, 1.0, 1.0);
	glBegin (GL_POLYGON);
		glVertex3f (0.25, 0.25, 0.0);
		glVertex3f (0.75, 0.25, 0.0);
		glVertex3f (0.75, 0.75, 0.0);
		glVertex3f (0.25, 0.75, 0.0);
	glEnd ();

	glFlush ();

You can do this in REBOL:

	glClear GL_COLOR_BUFFER_BIT

	glColor3f 1.0 1.0 1.0
	glBegin GL_POLYGON
		glVertex3f 0.25 0.25 0.0
		glVertex3f 0.75 0.25 0.0
		glVertex3f 0.75 0.75 0.0
		glVertex3f 0.25 0.75 0.0
	glEnd

	glFlush
Geomol:
20-May-2006
You can see the full example here: http://home.tiscali.dk/john.niclasen/OpenGL/GLClient.html

First you have the C source, and below that the REBOL source, that'll 
do the same thing. I first thought about putting a REDUCE in, where 
vdata is defined, but I've changed my mind. The glVertex3fv function 
has to reduce it's argument.
Geomol:
20-May-2006
Volker, I've solved the reduce problem, and it makes sense now. The 
C function glVertex3fv takes a pointer to it's data as a parameter. 
I do the same thing in REBOL (using a block), and I then reduce it 
inside the REBOL function glVertex3fv itself.
Joe:
22-May-2006
I think the above explains the problem domain. Imagine pages with 
lots of tags and that you don't want to clutter the emit-page function 
with lots of template variables neither want to compose the function 
given that if is a normal function where you do have other normal 
local variables. I am looking for ideas on how to approach this
Anton:
22-May-2006
Or wait... you want a context to keep all your template variables 
in:
	template: context [title: introduction: cost: none]
then unset all the variable in the template:
	unset bind next first template template

Your function references words in the template and receives an error 
for the first one which is unset.
	f: func [template][do bind [?? title] template]
	f template
	** Script Error: title has no value
	** Where: ??
	** Near: mold name: get name
but works fine when they have values:
	template/title: "hello"
	f template
	; ==> title: "hello"
Ladislav:
22-May-2006
Your EVAL-TEMPLATE function does not have 'TITLE as local variable. 
Do you want 'TITLE to be local or not?
Anton:
22-May-2006
It's not a terribly easy thing to do, but can be done.
Anton:
22-May-2006
Eval-template will accept a template string
1) convert to block
2) extract the words
3) create a context with these words
4) unset all words in the context

5) do your code bound to the context   ( do bind your-code the-context 
)
6) handle errors
7) return results
Joe:
22-May-2006
Ladislav, I will try to communicate better. What do you mean by "don't 
want to have it this way ?"
Anton:
22-May-2006
Yes, I can't say I find myself needing to do such an operation very 
often. Been a while since I generated html though.
Ladislav:
22-May-2006
;This is one way how to do it:
eval-template: lfunc [template [string!]][] [
	res: 		copy ""

	bind/copy 	blk 'res

	title: 		"hey"
	tag1: 		"this is tag1^/"
	tag2: 		"i am tag 2^/"
	;tag3: 		"might not be set^/"

	repend 		res bind/copy to block! template 'res
	res
]

see http://www.fm.tul.cz/~ladislav/rebol/lfunc.rThis would throw 
an error if the tag3: line is commented
Gregg:
22-May-2006
Profile it. :-) How many do you *need* to generate, how much data, 
how many tags, etc. There are a lot of variables here (no pun intended).
Anton:
22-May-2006
make-template-context: func [
	template
	/local words spec
][
	words: remove-each val to-block template [tag? val]

	spec: words
	forall spec [spec/1: to-set-word spec/1]
	append spec none

	context spec	
]

eval-template: func [
	template-ctx
	code
	/local err
][

 unset bind next first template-ctx template-ctx  ; unset all words 
 in the context
	do bind code template-ctx  ; do the code

	; Check if any tags were not set

 if find next second template-ctx unset! [ ; were any tags not set 
 ?
		print "Some tags were not set!"
		foreach word next first template-ctx [
			if not value? in template-ctx word [
				print [word "is unset!"]
			]
		]
	]
]

; now test


template: "<html><head><title> title </title></head><body>tag1 tag2 
tag3</body></html>"

template-context: make-template-context template

eval-tags: [
	title: "web page"
	tag1: "tag1"
	tag2: "tag2"
	tag3: "tag3"
]


eval-template template-context eval-tags  ; <- this sets all expected 
tags and is ok

eval-template template-context [] ; <- this doesn't set any tags 
so will complain and show all unset tags
Joe:
22-May-2006
I am using altme on linux. How do I get the clipboard to work ?
BrianH:
23-May-2006
Paths are structures like blocks. Find doesn't do structure analysis 
on block types like that - it just tries to determine if the exact 
same path is there, not another that resembles it.
Ashley:
23-May-2006
Something like:

reduce2: make function! [
	block [block!]	"Block to reduce"
	/deep		"Reduce nested blocks"
	/local blk

 "Evaluates a block of expressions, skipping words without a value, 
 and returns a block."
] [
	blk: copy []
	foreach word block [
		either block? word [
			either deep [
				insert/only tail blk reduce2/deep word
			] [insert/only tail blk word]
		] [insert tail blk either value? word [do word] [word]]
	]
	blk
]


>> reduce2 [red x now now/date (1 + 1) [red x now now/date (1 + 1)]]

== [255.0.0 x 24-May-2006/13:12:14+10:00 24-May-2006 2 [red x now 
now/date (1 + 1)]]

>> reduce2/deep [red x now now/date (1 + 1) [red x now now/date (1 
+ 1)]]

== [255.0.0 x 24-May-2006/13:12:26+10:00 24-May-2006 2 [255.0.0 x 
24-May-2006/13:12:26+10:00 24-May-2006 2]]


but as a native! and able to handle funcs with args (e.g. reduce2 
[print "hi"]).
BrianH:
24-May-2006
I was a little surprised that the lit-word didn't turn into a word. 
That could be useful. I'm going to do some experiments to see what 
else reduce/only doesn't do. Should be fun.
Ladislav:
25-May-2006
I am using my BUILD dialect http://www.fm.tul.cz/~ladislav/rebol/build.r
to do it as follows:

>> build [b: button ins red ins form now/date]
== [b: button 255.0.0 "25-May-2006"]

or, another alternative:


>> build/with [b: button red form now/date] [red: system/words/red 
form: get in system/words 'form]
== [b: button 255.0.0 "25-May-2006"]
Gabriele:
25-May-2006
Ashley, the idea is that in parse, when you get to something you 
want to evaluate, you set a marker and use do/next. like in volker's 
example. my compile-rules provided  a way to do this automatically 
:)
Sunanda:
30-May-2006
If you don't explicitly set the file permissions (under UNIX-deriviatives 
mainly) to precisely what you mean them to be, then they *may* be 
set to something other than what you wanted. That applies to all 
files and folders.
http://www.rebol.com/docs/words/wset-modes.html

I'm not suggesting your patch does something wrong.....Just that 
it may not do what someone expects.
Anton:
31-May-2006
Ok, I recommend to use open and close the port *not* in direct mode, 
just to create the directory.
Then, try opening your port in direct mode to do the write.
Oldes:
2-Jun-2006
you reached Rebol's limit - you have declared too many global variables 
with the command to-word WordStr. Do you really need it?
BrianW:
14-Jun-2006
well, I know probe is the way to do it direct to stdout, but I want 
to save the "probe" value to a string
BrianH:
17-Jun-2006
Robert, although 1 and 1.0 are both numbers, they are not the same 
type in REBOL. Sure, they can be converted, but unless you do so 
they aren't. It would be simpler to just rewrite your example to 
this:

>> a: 2.0
== 2.0
>> for test 1.0 a 1 [print test]
1.0
2.0


and not have the type mismatch I was talking about. Unfortunately 
REBOL doesn't have type signiatures that are powerful enough to specify 
that these two parameters need to be the same type, so that constraint 
has to be enforced in the code.
Robert:
18-Jun-2006
Anton, why do the actual numbers for FOR matter? The thing is, those 
numbers are of type decimal! as my app has to use decimal! values 
for calculation.
Gabriele:
25-Jun-2006
you need to put the LOAD or DO that are loading that code in a try 
block.
Volker:
26-Jun-2006
error? try [29-Feb-2006]

 is "word! word! [what-is-this?]". Reol has no idea what to do with 
 "error?" at that time.
Volker:
26-Jun-2006
Pekr, the only thing to know is that all code is loaded and checked 
for syntax, and then executed. and before execution 'try has no real 
meaning, it could be"the" 'try, or a local or style or something. 
when 'do does the code it does no longer know the original source. 
So 'load has to report errors on its own.
BrianH:
26-Jun-2006
Sorry, "code uses to do its job."
Anton:
27-Jun-2006
so... what are you going to do with "29-Feb-2006" ?
Graham:
13-Jul-2006
I have to encrypt some rather large files .. many megabytes.  Is 
there an encryption port that will do this in Rebol?  Or does encryption 
require that the whole file be in memory?
BrianH:
14-Jul-2006
Graham, there are two good reasons for that: Security and portability. 
Some platforms have one environment, some have per-process, some 
have global and per-user (like Windows) - which environment do you 
want to set? As for security, if you set any variable other than 
per-process it can affect the behavior of other programs, an ability 
that should be restricted in a sandboxed environment.


You should check out command line apps that you can call to set the 
various environments on your platform. If the REBOL process doesn't 
have call because of security restrictions, it shouldn't be able 
to set environment variables anyways.
BrianH:
18-Jul-2006
I have a few command line apps that do the job, but the best one 
I've found I got from a web site that isn't there any more. If you 
want it PM me and I will email it to you. Otherwise, try setx.exe 
from the Windows Resource Kit - it can do all sorts of stuff.
BrianH:
18-Jul-2006
Or do you mean the REBOL process' environment that is inherited by 
the subprocesses started by CALL (assuming that CALL internally passes 
along the current environment to its subprocesses)? Or do you mean 
the environment of the parent process?


Every started process is passed an environment, usually a copy of 
the parent environment (sometimes with some modifications). On Windows 
(NT kernel, not 9x), the initial environment is a combination of 
variables associated with the system (or machine), the user and volatile 
values, in that order. The initial values of these variables are 
constructed from data in the registry. Once these variables are constructed 
and compiled into an environment, this environment is passed to a 
process. Changes to the environment of that process (with getenv 
and setenv) don't affect the environment of the parent processes, 
and certainly don't affect the global values.


To change the initial environment variables, you need to change them 
in their original registry entries. You can either do that directly 
or through using external applications. Keep in mind that changes 
to these initial values won't affect your current environment, or 
those of any running processes, as those environments are already 
set and can only be changed internally.
Graham:
18-Jul-2006
I want to change the user environment strings that othewise I have 
to do in the control panel -> system -> advanced
BrianH:
18-Jul-2006
Do you need to support Win9x, or just WinNT derivatives like 2000, 
XP and 2003?
Graham:
26-Jul-2006
nothing to do with your script
Louis:
29-Jul-2006
;To make the following work with a USB printer, do the following:

; 1. share the printer, noting the name given to the shared printer.

; 2. from the command line type: net use lpt1 \\laturk-ws-2\EPSONSty 
/persistent:yes

; 3. put said command line in autoexec.nt so you don't have to type 
it each time.

printer: func [
    "Sends text to printer on //prn."
    [catch]
    Text [string!]    "The text to be printed."
    /Page    "Append Carriage Return (CR) and Page Feed."
    ][
    throw-on-error [
        secure [
            %//prn [allow write]
        ]
        write %//prn Text
        if Page [write/binary %//prn "^(0D)^(page)"]
        Text
   ]
]
Henrik:
14-Aug-2006
yes, but I think it's hardly a useful way to do this. once again 
you have to dig around in the system object to figure something out.
Anton:
30-Aug-2006
It may be worth to do save a dump of the system at these times:
1) after loading uniserve
2) after running for a while without error
3) after getting the error

Then compare and find differences between the second and third dump 
files.
(And if nothing is found there compare 1 & 2)
Oldes:
9-Sep-2006
How to remove once used word from system/words list? For example 
if I do>> load [my-word1 my-word2] << The words, are now in the system/words 
(find first system/words 'my-word1) Is it possible to remove them 
at this moment somehow (I know that it will be changed in R3)?
Graham:
9-Sep-2006
if you have a situation where f1:  does [  f2 f3 f4 ] .. where all 
f1 - f4 are functions, is there a way that f2 can cause a return 
to the calling function of f1.  Do I have to throw an error to do 
this?
Ladislav:
13-Sep-2006
(do you really want me to present a formula here?)
james_nak:
14-Sep-2006
Anton, thanks. I get it. You have to "turn on" the feature then use 
system/script/args with a "do/args script.r"   Thanks.
Rebolek:
21-Sep-2006
Certainly not the most elegant sollution:
set-path: func [pth val /local rslt][
	rslt: copy []
	head insert/dup head rslt [in get] -1 + length? pth

 repeat i length? pth [append rslt to block! form to path! reduce 
 ['pth i]]
	set do bind rslt 'pth val 
]
Ladislav:
21-Sep-2006
do reduce [to set-path! [a b c] 7]
Henrik:
21-Sep-2006
do reduce bind [to set-path! [a b c] 7] 'a does not seem to work
Ladislav:
21-Sep-2006
do reduce bind [to set-path! [a b c] 7] 'a does not seem to work

 - right, that is not supposed to do anything meaningful, it simply 
 keeps the context the word 'a had
Ladislav:
21-Sep-2006
>> a: context [b: context [c: 0]]
>> do reduce [to set-path! [a b c] 7]
== 7
>> a/b/c
== 7
Anton:
21-Sep-2006
You shouldn't have to do that (load mold). Can we see a bit more 
of your code ?
Henrik:
21-Sep-2006
rel-obj: make object! []

add-relation: func [path-block [block!] /local p v w] [
  p: to-block 'rel-obj
  parse path-block [
    any [
      [set w word! (
        unless all [

          find either object? do to-path p [first do to-path p][[]] w
          insert tail p w
        ] [

          do load mold reduce [to set-path! p make do to-path p reduce [to-set-word 
          w none]]
        ]
      ]
   ]
]

I'm not sure it's enough...
4701 / 1157812345...4647[48] 4950...112113114115116