Strange crash upon SECOND SYSTEM/WORDS
[1/14] from: geza67::freestart::hu at: 26-Jan-2002 20:05
Hello REBOLers,
REBOL/View 1.2.1.3.1 21-Jun-2001 crashes upon executing
a: copy second system/words
as well as
a: second system/words
... although SOURCE WHAT shows that the system itself executes such
a command:
.... (snip)
total: copy []
vals: second system/words
foreach word first system/words [
.... (snip)
How else could I extract the 'type? information of all words ?
--
Best regards,
Geza Lakner MD mailto:[geza67--freestart--hu]
[2/14] from: greggirwin:mindspring at: 26-Jan-2002 14:28
Hi Geza,
Doesn't crash here, but it takes about 15 seconds to return with a block of
2332 items. I think this is due to circular references in View/VID. I'm
running under W2K FWIW.
--Gregg
[3/14] from: larry:ecotope at: 26-Jan-2002 14:03
Hi Geza.
I have noticed this also. There seems to be no problem when the assignment
of a name to second system/words is made to a local variable inside a
function as is the case with WHAT. I don't know why this makes a difference,
however I have noticed a few other cases of things working inside functions
but not globally.
> How else could I extract the 'type? information of all words ?
You could do it this way:
foreach word first system/words [
print [form word type? get/any in system/words word]
]
which gives the following:
end! unset
unset! datatype
error! datatype
datatype! datatype
context! unset
native! datatype
action! datatype
routine! datatype
... etc
HTH
_Larry
[4/14] from: geza67:freestart:hu at: 26-Jan-2002 23:51
Hello Larry,
> foreach word first system/words [
> print [form word type? get/any in system/words word]
> ]
Very nice and compact solution - really the REBOLish way ... :-)
Thanx, this was what I've been looking for!
--
Best regards,
Geza mailto:[geza67--freestart--hu]
[5/14] from: joel:neely:fedex at: 26-Jan-2002 17:44
IIRC there was discussion a few months ago about circular references
being created within /View if it was started in desktop mode instead
of console mode. Try changing your startup mode to console, shutting
REBOL down, restarting, and then seeing whether you have the same
problem...
Geza Lakner MD wrote:
> Hello Larry,
> > foreach word first system/words [
<<quoted lines omitted: 9>>
> [rebol-request--rebol--com] with "unsubscribe" in the
> subject, without the quotes.
--
; sub REBOL {}; sub head ($) {@_[0]}
REBOL []
# despam: func [e] [replace replace/all e ":" "." "#" "@"]
; sub despam {my ($e) = @_; $e =~ tr/:#/.@/; return "\n$e"}
print head reverse despam "moc:xedef#yleen:leoj" ;
[6/14] from: rotenca:telvia:it at: 27-Jan-2002 2:26
H Geza, Larry, Gregg
I doesn't fail on my REBOL/View 1.2.1.3.1 21-Jun-2001
but if you type it at console try this:
>> a: copy second system/words 1
== 1
Which keep only a fraction of second (my slow system can make 50-100 of them
in a second).
If the original statement fails in the console or take too much time to
display, is only because it is molding and printing all the second
system/words content, which is the result of the assignement. The 1 after the
assignement forces the return of 1 and print or return only 1.
---
Ciao
Romano
[7/14] from: g:santilli:tiscalinet:it at: 27-Jan-2002 14:03
Hello Larry!
On 27-Gen-02, you wrote:
LP> I have noticed this also. There seems to be no problem when
LP> the assignment of a name to second system/words is made to a
LP> local variable inside a function as is the case with WHAT. I
Actually, the problem is with the hidden MOLD that the console
code does; i.e. when you type SECOND SYSTEM/WORDS at the console,
the result gets molded and printed out.
Regards,
Gabriele.
--
Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer
Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/
[8/14] from: greggirwin:mindspring at: 27-Jan-2002 12:01
Hi Romano,
<< If the original statement fails in the console or take too much time to
display, is only because it is molding and printing all the second
system/words content, which is the result of the assignement. The 1 after
the
assignement forces the return of 1 and print or return only 1. >>
DOH! That's brilliant! I love it when someone posts something that is so
obvious...in hindsight. :)
Thanks!
--Gregg
[9/14] from: geza67:freestart:hu at: 29-Jan-2002 0:22
Hello Joel,
> of console mode. Try changing your startup mode to console, shutting
> REBOL down, restarting, and then seeing whether you have the same
I ALWAYS start REBOL in console mode (I rarely use the Desktop) ! But, anyway, thanx
for the
point.
--
Best regards,
Geza mailto:[geza67--freestart--hu]
[10/14] from: geza67:freestart:hu at: 29-Jan-2002 0:30
Hello Gabriele,
> Actually, the problem is with the hidden MOLD that the console
> code does; i.e. when you type SECOND SYSTEM/WORDS at the console,
> the result gets molded and printed out.
And FIRST SYSTEM/WORDS doesn't use a hidden MOLD ?
It should ... the can be no such a big difference between the
execution of FIRST and SECOND, IMHO.
--
Best regards,
Geza mailto:[geza67--freestart--hu]
[11/14] from: geza67:freestart:hu at: 29-Jan-2002 0:28
Hello Romano,
>>> a: copy second system/words 1
> == 1
> Which keep only a fraction of second (my slow system can make 50-100 of them
> in a second).
... and when you next enter
>> a
- THEN crashes!
The strangeness esclates IMHO, because it seems that although the
binding of 'a happens in the first line, but the real (circular ...)
evaluation occurs in the second command.
--
Best regards,
Geza mailto:[geza67--freestart--hu]
[12/14] from: lmecir:mbox:vol:cz at: 29-Jan-2002 12:00
Hello Geza,
SECOND SYSTEM/WORDS is a complicated block containing a lot of circular
references, while FIRST SYSTEM/WORDS is a simple block containing Rebol
words only.
HTH
Ladislav
----- Original Message -----
From: "Geza Lakner MD" <[geza67--freestart--hu]>
To: "Gabriele Santilli" <[rebol-list--rebol--com]>
Sent: Tuesday, January 29, 2002 12:30 AM
Subject: [REBOL] Re: Strange crash upon SECOND SYSTEM/WORDS
Hello Gabriele,
> Actually, the problem is with the hidden MOLD that the console
> code does; i.e. when you type SECOND SYSTEM/WORDS at the console,
> the result gets molded and printed out.
And FIRST SYSTEM/WORDS doesn't use a hidden MOLD ?
It should ... the can be no such a big difference between the
execution of FIRST and SECOND, IMHO.
--
Best regards,
Geza mailto:[geza67--freestart--hu]
[13/14] from: rotenca:telvia:it at: 29-Jan-2002 16:12
Hi Geza,
> >>> a: copy second system/words 1
> > == 1
> > Which keep only a fraction of second (my slow system can make 50-100 of
them
> > in a second).
> ... and when you next enter
<<quoted lines omitted: 3>>
> binding of 'a happens in the first line, but the real (circular ...)
> evaluation occurs in the second command.
I do not understand well what you mean. I can only repeat:
1) On my system does not crash. It only stop with this error:
** Script Error: Not enough memory
2) The first line does not mold 'a, only copy it. (BTW Copy/deep should be
used to copy all the inner blocks).
3) The second line makes an implicit mold of 'a. But [second system/words]
can't be molded, because, i think, it has some circular reference which 'mold
is not so smart to catch and reduce.
---
Ciao
Romano
[14/14] from: g:santilli:tiscalinet:it at: 29-Jan-2002 18:05
Hello Geza!
On 29-Gen-02, you wrote:
GM> And FIRST SYSTEM/WORDS doesn't use a hidden MOLD ?
Yes, but the list of words does not contain cicular references.
MOLD goes in an infinite loop in some cases with circular
references, and View and VID contain plenty of them
(face/parent-face for example, then there's face/styles that
contains all the styles, and so on). Even if MOLD does not crash,
you'll end up with a *BIG* string when molding system/words...
Regards,
Gabriele.
--
Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer
Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted