• 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
r4wp5907
r3wp58701
total:64608

results window for this page: [start: 28001 end: 28100]

world-name: r3wp

Group: Core ... Discuss core issues [web-public]
Gabriele:
25-Jun-2006
you need to put the LOAD or DO that are loading that code in a try 
block.
Pekr:
26-Jun-2006
I would prefer 29-Feb-2006 error, as well as e.g. error? try [load 
380.250.250] being a bit more relaxed in interpreter ...
DideC:
26-Jun-2006
To be executed, a script is loaded in a whole. So each values is 
loaded/binded and your error appears at this time, not while the 
expression is evaluated.
Graham:
26-Jun-2006
Doesn't like the 29-Feb-2006 as a date string
Henrik:
26-Jun-2006
looks like a bug?
Volker:
26-Jun-2006
Does not like 32-may-2006 too. Isn't this more a feature than a bug?
Volker:
26-Jun-2006
Thats why ladislav puts the date in a string. compiled later.
Pekr:
26-Jun-2006
how would it work? dunno? a bit more relaxed evaluation? interpreter 
finding string 29-Feb-2006 - it is valid format, not just valid value. 
Under some condition it could be even valid date (leap year). I would 
expect even such error to be catchable ...
Henrik:
26-Jun-2006
how does Rebol not know how to handle 29-feb-2006 as a date! ? I'm 
not sure I understand this, because how then is the unrecoverable 
error generated? from what I see, you'll always need to wrap some 
precautionary measures around handling dates to avoid this. that's 
not good design.
Volker:
26-Jun-2006
internal its not a string, but a number. you would get 29-feb-2006 
as 1-mar-2006. would that be ok?
Pekr:
26-Jun-2006
anyway ... I don't like current state, that is all. I even don't 
know consequences, just a feeling :-) Maybe Carl could give us his 
opinion, if it is bug or not, and if not, if this is desirable behavior 
...
Volker:
26-Jun-2006
maybe a hook in 'load, whcih can do some spellchecking?
Pekr:
26-Jun-2006
hmm, help me to imagine, how does interpreter internally works? So 
let's simplify it - it reaches 280.250.250 tuple. It tries to parse 
it. It eventually recognises it as a tupple, otherwise it would not 
return "Invalid tuple", no? But then it finds invalid values ... 
why just doesn't it recognise, it is part of 'try block and does 
not throw error, which would be catchable?
Volker:
26-Jun-2006
if load cant handle something, it is helpless. it does not know something 
is inside a try-block. it only knows it has loaded a lot of words 
already and the followingtext is not right.
Pekr:
26-Jun-2006
then maybe there could be two phases of load .... parse form, not 
the value first :-) 999.999.999 for a valid tuple! datatype. It is 
too strict, in opposite to:

>> email? to-email "nonsense"
== true
Henrik:
26-Jun-2006
that's why we have the term "loadable", right? Carl talks about this 
when parsing. Otherwise this wouldn't be a problem.
Volker:
26-Jun-2006
maybe some datatype "weird" with the original string and a type-suggestion? 
but then you get problems with ambiguities.
Volker:
26-Jun-2006
what is a typo, what ignored? 6-pfu-206 ?
Volker:
26-Jun-2006
maybe i amn to conservative, used to compilers which tell me each 
bug, instead of fixin it. always fearing a misunderstanding when 
the compiler would try toguess itself. if it could reliable guess, 
thatwould be cool :)
Graham:
26-Jun-2006
quick question ... I have a number of simple objects that I create 
on the web server and then send back to client in molded format.
Graham:
26-Jun-2006
If I load them, I just get a block
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.
Volker:
26-Jun-2006
Btw rebol cheats and uses a calendar ;)>> 29-feb-2004
== 29-Feb-2004
>> 29-feb-2005
** Syntax Error: Invalid date -- 29-feb-2005
** Near: (line 1) 29-feb-2005
Volker:
26-Jun-2006
No, thats the basic equpment of a god loader. pda and such ;)
Pekr:
26-Jun-2006
even a cell phone? probably so :-)
Volker:
26-Jun-2006
*riing* "Hi" - "This isnt a date, you know?" :)
Volker:
26-Jun-2006
Until Carl finds a clever magic new way to keep performance. :)
DideC:
26-Jun-2006
A language is not there to solve any particular needs, but to solve 
the needs of most of us

Not the original sentence, but Carl said something like that, one 
day (maybe in a blog, or what is Altme?).
DideC:
26-Jun-2006
As a comment, try "29/02/2006" in Excel and it will give you a nice 
"text" value, not a date value.
Don't expect 'load to make this kind of choice !
Ladislav:
26-Jun-2006
Pekr: "I am not talking about string..." - Wrong! You are talking 
about string but refuse to admit it. Every source code is a string 
before LOAD transforms it to a block. (see my articles on this)
Edgar:
26-Jun-2006
Like Pekr, I am confused here. It would seem that if the loader cannot 
convert a value into the internal format, then it should have a fall 
back of loading it as a string. Other values that Rebol can't convert 
to an internal datatype should convert it to a string to be consistent.
Anton:
26-Jun-2006
That would cause rather strange bugs. Quite often, you wouldn't notice 
that you had made a syntax error. How would you know whether a string 
was an incorrectly written date or just some other string ? eg:  
How could you tell whether   "jan 12"  was intended to be a date! 
or not ? Maybe it's somebody's name and age in a string.
Anton:
26-Jun-2006
I am completely happy with the way load works in this regard. A given 
date string must comply with the rebol syntax and have valid sub-values 
otherwise I don't want it. If messy data is coming in, just catch 
errors loading it from a string. Simple.
BrianH:
26-Jun-2006
Petr, 29-Feb-2006 is always an invalid date. You can't say "Under 
some condition it could be even valid date (leap year)" because the 
year 2006 is specified in that date, and 2006 is not a leap year.


Data types have syntactic forms and semantic constraints. In order 
for the loader to recognize the data type, the syntactic form must 
be followed. In order for the resulting data to be valid, the semantic 
constraints must be obeyed. One such constraint is that date! values 
must correspond to a date on the calendar. Semantic violations are 
the bugs that all of that nasty exploit code does its job.
Anton:
2-Jul-2006
Rebol doesn't have a jpeg datatype, so you would have to specify 
Content-Type to SEND.
Pekr:
2-Jul-2006
I am also not sure, how many ppl has turned off ability to display 
html content in email .... maybe it would be better to actually not 
send post-card .... but post a link to on-server stored image?
Gabriele:
9-Jul-2006
keep in mind that mold uses {} instead of "" in a number of cases 
(included when the size of the string is greater than a certain amount)
Anton:
13-Jul-2006
I don't think encryption changes the file-length, so you could just 
choose a large chunk size and encrypt those separately.
Graham:
14-Jul-2006
any reason why Rebol has a get-env function, but not the set-env?
Graham:
14-Jul-2006
run 	Runs the system application associated with a file.
 	
I'm sure that is not working ...
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.
Volker:
14-Jul-2006
run is available in ios. Somewhere i read in windows one can type 
a filename in shell, like text.txt, and windows launches the accosiated 
application. If that works, maybe with 'call too?
Gregg:
15-Jul-2006
; Does this work for you Graham?

REBOL []

; GET-ENV is a standard REBOL function now

; environment variable APIs
; msvcrt.dll
; getenv _putenv _environ
; char *getenv( const char *varname );
; int _putenv( const char *envstring );

lib:  load/library %msvcrt.dll

get-env: make routine! [
	varname [string!]
	return: [string!]
] lib "getenv"

put-env: make routine! [
	env-string [string!]
	return:    [integer!]
] lib "_putenv"

remove-env-var: func [name [string!]] [put-env join name "="]

env-var-exists?: func [name [string!]] [
	either "^@" = get-env name [false][true]
]

tz-set: make routine! [
	return:    [integer!]
] lib "_tzset"

print get-env "path"
print get-env "lib"
print get-env "temp"
print get-env "test"

if 0 <> put-env "test=blah" [
	print "error writing environment variable"
]
print get-env "test"
remove-env-var "test"
print mold get-env "test"

print get-env "TZ"
tz-set

free lib

halt
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.
BrianH:
18-Jul-2006
Then it's registry values you need to change. Give me a moment and 
I'll figure out which ones.
BrianH:
18-Jul-2006
You can check in regedit for your current values. Remember to use 
REG_EXPAND_SZ values if you want references to other environment 
variables to be expanded, but keep in mind that these are evaluated 
in one pass for each category, and that local machine is evaluated 
before current user. A value can't make references to other variables 
in its own category, just references to values in other categories 
that are evaluated earlier.
BrianH:
18-Jul-2006
The environments you are likely interested in are in the locations 
I specified. If you want to make changes to all users' local environments, 
look at the other keys under HKEY_USERS. The .DEFAULT key is what 
gets copied to a new user's local registry when that user is created.
Louis:
26-Jul-2006
Hi everyone, I am presently in Indonesia. I can send email to myself, 
but when I try to send email to other I get the following error message:


** User Error: Server error: tcp 550-(LATURK-WS-2) [61.94.196.24] 
is currently not permitted
 to relay through

Is this a problem I can correct in the script? If yes, how?
Graham:
26-Jul-2006
since you're not getting a smtp authentication error.
Henrik:
26-Jul-2006
how does one avoid that variables listed in a block in an object 
become global in this instance:

>> unset [a b c]
>> y: make object! [a: [b c d] set a [1 2 3]]
>> a
** Script Error: a has no value
** Near: a
>> b
== 1
>> c
== 2
>> d
== 3

These give the same result:

>> y: make object! [a: [b c d] set bind a self [1 2 3]]
>> y: make object! [a: [b c d] set bind/copy a self [1 2 3]]
>> y: make object! [a: copy [b c d] set a [1 2 3]]
>> y: make object! [a: bind [b c d] self set a [1 2 3]]
Henrik:
26-Jul-2006
hm... seem to be the old "how to add new variables to an existing 
object" problem. looks like I'll have to find a different approach...
Ladislav:
27-Jul-2006
do you know this one?

d: [a b c]
d: use d reduce [d]
set d [1 2 3]
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
   ]
]
Graham:
29-Jul-2006
I was hoping that a direct way of writing to specified usb port migh 
now be avable.
Louis:
30-Jul-2006
If you would have taught me a direct way of writing to a USB port, 
then I would have been able to help you.  LOL.
eFishAnt:
5-Aug-2006
Louis, that is a cool example
Graham:
8-Aug-2006
If I have a table of say 4 x 3 and another table of say 3 x 10 .. 
is there a way to merge them so I end up with a table of 7 x 10 where 
the missing cells are either empty or none?
Anton:
10-Aug-2006
By table, do you mean a block of blocks (a 2-dimensional array) ?
Given
	table-A: [[1 2 3 4][5 6 7 8]]
	table-B: [[a b c][d e f][g h i]]
then
	MERGE-TABLES table-A table-B
== [
        [1 2 3 4 a b c]
        [5 6 7 8 d e f]
        [none none none none g h i]
    ]
Is that the desired output ?
Anton:
10-Aug-2006
Or something like:
	result-table: copy/deep table-A
	; <- scan for longest row

 ; <-- now extend result-table with values from table-B, creating/initializing 
 any missing/short rows first
Graham:
10-Aug-2006
Yes, like a sql join.
Graham:
10-Aug-2006
I was trying to print a table from two different sources, and trying 
to wrap the data inside the cells at the same time.  But I got it 
worked out now.  But was thinking that some type of sql join on tables 
would be good.
Ladislav:
11-Aug-2006
this is a way how to convert something to binary too: http://www.compkarori.com/vanilla/display/peek_and_poke.r
Sunanda:
11-Aug-2006
the pwerpack idea was a good one: one central point for crucial mezzanines 
and their documentation, perhaps as easily included as 
  do %powerpack.r 
  powerpack/install 'all
in user.r
Henrik:
14-Aug-2006
is there a complete list of all the error codes anywhere? I think 
the error appendix in the Core manual is not adequately describing 
them.
Henrik:
14-Aug-2006
it would make it a lot easier to create error handling, if you are 
running some code and might expect a large number of different errors 
that need to be translated into a different language
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.
Henrik:
14-Aug-2006
that's one thing. another thing is to make it meaningful to the users. 
it's part of explaining what caused, say a TCP error 550 and help 
the user to act on it, rather than just saying "TCP error 550 blabla". 
The same error may be meaning different things in different contexts.
Gabriele:
16-Aug-2006
subtract gives difference in days (integer), while difference gives 
difference as a time! so it is finer grained.
Anton:
16-Aug-2006
An old decision - probably not going to change. (although Rebol3 
could change this.) I agree it seems anti-intuitive. If it's not 
in rambo already, make a ticket.
Henrik:
19-Aug-2006
would anybody be interested in some PHP tools? a source generator 
with REBOL blocks -> PHP arrays, variable lists. a simple thing.
Ladislav:
22-Aug-2006
if you try the code in the console, you will find out, that it is 
an infinite loop. The question is, if it is OK, (I would not expect 
that normally, because FOR can be implemented in such a way that 
the loop is finite)
Pekr:
22-Aug-2006
I will let it to gurus to decide, but it does not sound logical to 
me, as it states - starting value, ending value ... what is starting 
value for [1 2 3 4]? What is for ["c" "a" "b"], what is for [b c 
d] (referring to others, e.g. binary?) .... we imo refer to index 
here, don't we?
JaimeVargas:
22-Aug-2006
;; This example illustrates a bit better the behaviour of FOR with 
series

>> series: [a b c d e f g h i j k]  

== [a b c d e f g h i j k]

>> start: skip series 0

== [a b c d e f g h i j k]

>> stop: skip series 6

== [g h i j k]

>> for b start stop 1 [print mold b]

[a b c d e f g h i j k]

[b c d e f g h i j k]

[c d e f g h i j k]

[d e f g h i j k]

[e f g h i j k]

[f g h i j k]

[g h i j k]
>> for b start stop 2 [print mold b]

[a b c d e f g h i j k]

[c d e f g h i j k
]
[e f g h i j k]

[g h i j k]
>> for b start stop 6 [print mold b]

[a b c d e f g h i j k]

[g h i j k]

>> for b start stop 7 [print mold b]

[a b c d e f g h i j k]
JaimeVargas:
22-Aug-2006
Just a small typo, replace b with series for the examples of FOR 
usage.
JaimeVargas:
22-Aug-2006
;So a similar result can behaviour can be  accomplished  with FORSKIP, 
ie:


>> forskip series 2 [print mold series if 6 < index? series [break]]

[a b c d e f g h i j k]

[c d e f g h i j k]

[e f g h i j k]

[g h i j k]

is equivalent to

>> for b start stop 2 [print mold b]

[a b c d e f g h i j k]

[c d e f g h i j k]

[e f g h i j k]

[g h i j k]


I believe we should have only one form for acommplishing the this 
type of series traversal. FORSKIP seems like the better choice than 
FOR. I support  removing series support from FOR. If series support 
is maintained with FOR the infinite loop race condition should be 
removed.
Anton:
25-Aug-2006
Ladislav made a small typo, getting a digit wrong in the number, 
the first time, and the second time he missed the variable (i).
Anton:
25-Aug-2006
These kinds of issues/bugs are expectable when using fixed byte-length 
numbers, as rebol does. If you avoid the maximum integer then you 
should be ok. So I don't think it is as bad as all that. I am not 
saying the errors are good and fine, but you can "expect trouble", 
when going that high.

Also, each function (LOOP, REPEAT etc) may use a different test ( 
< ,  <=  etc) and so exhibit different behaviour.
Graham:
25-Aug-2006
A little peeve of mine .. you have to use parens to force Rebol evaluation 
in a particular order, but parens are also used by compose.
Will:
29-Aug-2006
Any idea what can cause this or a good idea how to find the bug?
>> read %/

Trace:  read (word)

Trace:  %/ (file)

** Access Error: Trace:  "Cannot open" (string)

Trace:  :arg1 (get-word)
Cannot open /

** Where: boot

** Near: read %/
PeterWood:
29-Aug-2006
Is it a permissions problem?
PeterWood:
30-Aug-2006
The Core Manual  ( http://www.rebol.com/docs/core23/rebolcore-17.html
)does limit the possible causes a little:

6.3.1 cannot-open


A file could not be accessed. This could be a local or network file. 
Most common reason for this error is a nonexistent directory.
Will:
30-Aug-2006
I may have been more precise.. this appens after running  (uniserve 
;-)and after a week of high traffic.. I'm thinking of parsed stuff, 
redefined words, ecc or maybe a rebol bug, async?.. Hoped some guru 
could provide some tip on how to track that down, I'm having a hard 
time! thx
Will:
30-Aug-2006
If I do
>>save/all %dump rebol ;or system?

and load the dump in a fresh console, is it correct that I should 
have the same behaviour?
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)
Will:
30-Aug-2006
Anton, do you have a preferred tool when comparing such huge files? 
do you do text comparison or you have a rebol tool? Is that correct 
that after reloading the dump in a fresh console I should have the 
same behaviour, and if not is it a sign of rebol bug?  thank you 
8)
Anton:
30-Aug-2006
Will, I just use a text editor and flick between files using Ctrl-Tab, 
scrolling down using Page-down when I don't see anything different. 
Raw, and it works pretty well, but it's probably worthwhile looking 
for a comparison tool out there.
Will:
30-Aug-2006
Gabriele that is a very good hint!

Is there a simple rebol script that I could run and test for this 
precise case?

Is there a  unix command to check for number of file-id consumed 
by process?

Althought "read %/" returned error, probe info? %/ was still working, 
can this help?
Will:
30-Aug-2006
Here you can find 3 process samples, I've done when the bug appeared 
and the CPU was at 100%, like if the process was waiting for something? 
a released file-id? Because the error appear in a crescendo, cpu 
100%, than ok for some time, cpu 100%, then work ...than stop working 
at all sometimes with cpu 100% sometimes CPU normal%, here the samples:
http://reboot.ch/sample1.txt
http://reboot.ch/sample2.txt
http://reboot.ch/sample3.txt
Gabriele:
30-Aug-2006
it's a weird situation... does OSX have something like linux's /proc 
file system?
Henrik:
30-Aug-2006
I remember that Carl posted a recursive copy routine in the blog 
somewhere, but I can't find it now. Does anyone know where it is?
PeterWood:
30-Aug-2006
I was able to duplicate the access error with read %/ with a clean 
Rebol  instance by opening more than 256 files.
PeterWood:
30-Aug-2006
From a couple of experiments, Rebol was properly free the File IDs 
when the files were closed.
Gabriele:
31-Aug-2006
so maybe Uniserve just keeps files open for performance (or a bug)?
Will:
31-Aug-2006
Thanks to all for bringing some light, it seams actually the problem 
IS related to file handle limit.
Checked with (suggested by Jaime):
sudo fs_usage -w -f filesys <process id>|grep 'open\|close'
and the number of open and close correspond.
Peter suggested "fstat -p <process id>", fortunately fstat isn't

there in 10.4 Tiger, so I was looking for a similar tool and found
lsof

 for which I did not find the flag to filter for only uniserve process

and there I saw something else was actually consuming file handles..
Sorry Carl to have thought about a rebol error ;-))
Uniserve is rock solid and blazing fast btw.
Graham:
31-Aug-2006
I take it that OSX is not a server OS.
Oldes:
3-Sep-2006
Anybody knows, why there is such a difference between result of 'stats 
and the memory usage shown in tools like 'top or 'taks-manager? For 
example I found, that if I run a script under rebol/base in linux 
and do stats I get something like 1.7MB but in the 'top I see memory 
usage more than 5MB. The same it is under windows - pure rebol/base 
has les ten 1MB but almost 4MB in the task-manager. Strange is, that 
rebol/base shows me more memory usage in 'top, then rebol/core, but 
rebol/core more if I use 'stats.
BrianW:
6-Sep-2006
I've been using the following approach for using a series like a 
stack, and I was wondering if there was a better way I'd missed:

	insert my-list item ;; "pop"
	item: my-list/first ;; "push" part 1
	remove/part my-list 1 ;; "push" part 2


I know it's working on the beginning of the series rather than the 
end, but I had trouble remembering if there is a '"pop" (remove  
last item from series and return item to caller) sort of function 
for Rebol.
Anton:
6-Sep-2006
Using a path like that is not safe if you want to pop a function. 
It will call the function. To avoid that use either FIRST or PICK 
my-list 1
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?
28001 / 6460812345...279280[281] 282283...643644645646647