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

World: r3wp

[RAMBO] The REBOL bug and enhancement database

Gabriele
28-Apr-2007
[2852x2]
eg if i make a function like:  func [dir /local block] [block: read 
dir forall block [block/1: join dir block/1] block]
i expect it to work with any input, %/ included. but it would break 
if read %/ returned %/a/ .
Gregg
28-Apr-2007
[2854]
I've considered it a long-standing bug, because it didn't do that 
before, and I think Carl acknowledged it as a bug at one point. There 
are two ways to look at it, but the consistent-path model may be 
best in REBOL, meaning it's not a bug. Under Windows, where there 
is no concept of a root above the drive letters, it's more comfortable 
to think in terms of the drive spec being a top level entity. Not 
sure what's best for UNC usage.
Gabriele
28-Apr-2007
[2855]
i'll leave it in as a bug, but i personally prefer it to be consistent 
with other operating systems.
Gregg
28-Apr-2007
[2856]
I think I'm OK either way, as long as it's doc'd, though consistency 
is probably better.
Anton
28-Apr-2007
[2857]
Gregg, I seem to remember arguing *for* the change, in order to achieve 
consistency, so I'm with Gabriele, here.
Anton
1-May-2007
[2858x2]
Serialised function! not loadable 

in Rebol/View 2.7.5.3.1 on WinXP

>> load {#[function! [][]]}
** Syntax Error: Invalid construct -- #[
** Near: (line 1) #[function! [][]]

>> load/all {#[function! [][]]}
** Syntax Error: Invalid construct -- #[
** Near: (line 1) #[function! [][]]

The above are loadable on View 1.3.2
Anyone reported something like this ?
Gregg
1-May-2007
[2860]
Reproduced here.
Maxim
1-May-2007
[2861]
oh.. that is a mean bug!
crashes in 2.7.2 also.
Anton
1-May-2007
[2862]
Thankyou.
Gabriele
1-May-2007
[2863]
known and on the list for next release.
Anton
2-May-2007
[2864]
Ok, very good.
Anton
4-May-2007
[2865x5]
Strange new-line bug/issue:
foreach [style obj] svv/vid-styles [print mold to-lit-path reduce 
[style in obj 'color]]
solution/workaround:
foreach [style obj] svv/vid-styles [print mold to-lit-path new-line/all 
reduce [style in obj 'color] off]
(The first one produces lit-paths starting with a newline - looks 
weird.)
Oldes
4-May-2007
[2870x3]
foreach [style obj] new-line/all svv/vid-styles off [print mold to-lit-path 
reduce [style in obj 'color]]
and why you use [style in obj 'color]?  this will works as well: 
foreach [style obj] svv/vid-styles [print mold to-lit-path reduce 
[style 'color]]
foreach [style obj] svv/vid-styles [print mold to-lit-path reduce 
[style get in obj 'color]]
Anton
4-May-2007
[2873x3]
You are right.
This is the reduction:
>> to-lit-path first new-line/all [word] on
== '
word
I think it is an error, since I am molding a lit-path which can't 
be loaded back, because of the newline between the ' and the first 
word.
Gregg
4-May-2007
[2876]
I agree Anton. I imagine it's because paths are a block type. So 
we want to make sure it doesn't mess up other block types when fixed.
Anton
10-May-2007
[2877x7]
I think it's amazing that FIRST returns the word with its hidden 
new-line attached. Very confusing trying to reproduce it again today. 
:)
Makes me wonder how new-lines are implemented.
I thought it was an attribute of a block, but maybe it's an attribute 
of a word ?
It looks like it is. I was wondering where those new-lines were kept 
! :)
TO-PATH is affected the same way.
TO-SET-PATH is also affected.
Submitted the above bug to RAMBO.
Gregg
10-May-2007
[2884]
Interesting. I assumed new-line markers were liike pseudo-values 
in blocks. 

Thanks for doing the research Anton.
Maxim
10-May-2007
[2885]
AFAICT line-markers are attributes of the "space in between" the 
content.  using new-line we have complete, per-space control.
Gabriele
10-May-2007
[2886]
new-lines are attributes of value slots. values do not exist without 
value slots. rebol is always copyiing the 16 bytes of a rebol slot 
around... so it copies the new-line marker too
Gregg
10-May-2007
[2887]
Excellent -- attributes of a value slot; that's clear.
Anton
10-May-2007
[2888x4]
So there must be at least one bit devoted to a new-line marker.
I tested by extracting a word, then inserting into another block.
>> word: first new-line/all reduce ['word] on
== word
>> head insert [] word
== [
    word
]
and you can move the word into other series datatypes like path, 
then back to a block and see the new-line has followed it.
Gregg
10-May-2007
[2892]
As Gabriele said, it's not just words, it's any value, because it's 
part of the value slot.

>> val: first new-line/all [1 2 3] on
== 1
>> head insert [] val
== [
    1
]
Anton
10-May-2007
[2893]
Yes, that makes the most sense.
Anton
12-May-2007
[2894x2]
Interesting problem: Why do I need BIND/COPY ?


The aim is to copy the values of the facets in face F2 to face F1.

f1: make face []
f2: make face [text: "hello"]

facets: [text]

set bind      facets f1 reduce bind      facets f2
f1/text ;== none   ; <-- why ???

f1/text: none
set bind/copy facets f1 reduce bind      facets f2
f1/text ;== "hello"

f1/text: none
set bind      facets f1 reduce bind/copy facets f2
f1/text ;== "hello"

f1/text: none
set bind/copy facets f1 reduce bind/copy facets f2
f1/text ;== "hello"
Aha! I know why. I seem to remember doing this once before. :)

The SET gets its two arguments first, which binds the block twice, 
leaving the block bound to f2 before the setting takes place.
Gregg
12-May-2007
[2896]
That was my first thought.
Anton
12-May-2007
[2897]
It's interesting I stumbled the same way twice. Will I do it again 
in a year or so ?
Gregg
12-May-2007
[2898]
It would be a good guru tech-note to post somewhere, The Singularity 
of Bindings.
Anton
12-May-2007
[2899]
:-) I don't know. I kept notes in a file, but don't feel it's developed 
enough to publish. I have a vague desire for a new function which 
handles this case (as well as other, more general, set operations).
Henrik
17-May-2007
[2900x2]
I'm hitting something that causes "invalid datatype during recycle" 
sometimes. I don't know yet what it is, but I thought the recycle 
bug was gone?
this is on View 1.3.2