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

World: r3wp

[!REBOL3]

Paul
12-Feb-2010
[660x4]
If you ask me it is that head seems to be a problem with the file 
port.
unless we mean to modify those ports now without setting the port.
in other words head and next operate on file ports much differently 
then I would have expected.  I would have expected to have to do 
this:

port: head port

but this works:

head port

Next is the same way.
Again, if this is the intention - then I like it - and not sure if 
there is indeed a problem with length? but maybe our need to understand 
how to use it R3 ports.
Paul
13-Feb-2010
[664x2]
I made some significant changes already to R3DBMS based on some of 
these findings and getting great results.
Doh wrong group.
amacleod
14-Feb-2010
[666x2]
R3..."Cannot upgrade from web."


using a96...is the server down or is there a prob with this version?
working now...never mind
Robert
14-Feb-2010
[668x2]
Here is something I think that could be changed in R3 (and I'm pretty 
sure a lot will now explain me why it's not possible):

>> a: [1]

== [1]


>> a/1

== 1


>>
 a/255

== none

If we now have an object:

>> a: make object! [a: 1]

== make object! [
    a: 1
]


>> a/test
** Script error: cannot access test in path a/test


IMO it would make our life a lot easier of the last one would return 
NONE as well.
As object! is being used more and more now in R3 and (within the 
GUI) a lot of words in objects will only be present if there is a 
value available, we have to cross-check a lot more if specific words 
are present. And this can pollute the code.
Graham
14-Feb-2010
[670x2]
so you want to access a missing value in an object and have it return 
none?
That's going to make it more work to determine if the value is none 
because it's missing or because it's none
Robert
14-Feb-2010
[672]
It could be unset! or even a special NP! (not present). Javascript 
has a nice rule that it just skips things that are not there without 
an error. It makes the code very simple. And you can still test explicitly 
if it's available.
Graham
14-Feb-2010
[673x3]
I would worry that it would make finding bugs harder
Anyway it sounds like a fundamental change .. to make all paths return 
an unset! value instead of an error if the path is absent.
All for the sake of not having to write some error trapping code
BrianH
14-Feb-2010
[676x2]
Robert, the whole advantage to objects is that for them it actually 
matters whether the field is there. Otherwise, binding wouldn't work. 
If you need the kind of behavior you propose, use the map! type instead 
- it acts exactly like that.
We like errors in R3, they are considered the programmer's best friend. 
The error you are complaining about is considered a feature.
Graham
14-Feb-2010
[678]
What about a way to set an error level?  Only want to see levels 
of a particular severity ...
BrianH
14-Feb-2010
[679]
It is not for us to say how severe an error is, short of a system 
crash; that is up to the programmer. The SECURE system can declare 
some things as being allowed or not. For the rest, use TRY/except 
and check the error code in the exception block, and retrigger the 
error if it isn't something you can handle.
Andreas
14-Feb-2010
[680]
Why is "foo" equal?/= "FOO" but "foo" not strict-equal?/== "FOO" 
?
Robert
14-Feb-2010
[681]
Brian: Ok, but I never liked the difference between block!/map! and 
object!. Looked always artificial to me. I chatted about this with 
Carl some long time ago. And IIRC he said that he thought about the 
split as well and if it can't be eleminated.
BrianH
14-Feb-2010
[682]
Andreas, strict-equal? does case-sensitive comparison. That's why 
it's a separate function :)
Andreas
14-Feb-2010
[683x3]
Then the docstring is misleading, I guess.
Will report a bug that the docstrings of equal? and strict-equal? 
are extended to mention behaviour wrt case.
The current docstrings:
equal?: "... if the values are equal"

strict-equal?: "... if the values are equal and of the same datatype."
BrianH
14-Feb-2010
[686]
There are character length limits to what you can put in a doc string. 
That is why we make the manual web page accessible from the R3 command 
line. It was the same in R2.
Andreas
14-Feb-2010
[687]
Please note that I don't consider "it was the same in R2" to ever 
be a legitimate answer to R3 quirks :)
BrianH
14-Feb-2010
[688]
Got it, I should see bug#666 :)
But that's not a quirk, that's part of the design.
Andreas
14-Feb-2010
[689]
The docstring length is by design?
BrianH
14-Feb-2010
[690x2]
Robert, the reason that we have the map!, block! and object! types 
is that they behave differently. If they behaved the same, we would 
only need one type. Pick the type that behaves the way you want for 
the circumstances, and pick another type for different circumstances.
Andreas, the docstring length is limited by what won't word-wrap 
in an 80-character console when you use HELP. For more details, use 
HELP/doc to get to the web page for the function.
Andreas
14-Feb-2010
[692]
See, that's what I call a quirk. We could simply use a word-wrapper 
to format help output in the console, and allow the docstring to 
be slightly longer.
Graham
14-Feb-2010
[693]
>> help/doc map!
map! is a datatype
It is defined as a name-value pairs (hash associative)
It is of the general type block

No values defined for map!

ie. no web entry
BrianH
14-Feb-2010
[694]
The limit is considered a feature, to keep the doc string short, 
easier to read quickly. There's a web page with more details. You 
keep calling quirks what we are doing on purpose :)
Andreas
14-Feb-2010
[695]
Yes, I understand that feature. Only the limit is arbitrary.
BrianH
14-Feb-2010
[696]
Graham, that's a bug in HELP, so report it :)
Andreas
14-Feb-2010
[697x2]
For example, when using the "search mode" of help, docstrings are 
truncated (using "..."). Or the indentation by 8 spaces in HELP robs 
the docstring of 8 possible chars.
I'd rather have a limit to be exposed explicitly: document somewhere 
that docstrings are to be of 72 chars max. And then have HELP take 
care of how it formats the output given this constraint.
BrianH
14-Feb-2010
[699]
It doesn't matter what the limit is, only that there be a limit. 
Be consise in your doc strings, detailed in the manual.
Graham
14-Feb-2010
[700]
do any of the datatypes have web entries accessible by help?
BrianH
14-Feb-2010
[701x2]
A doc string that is longer than the limit can be reported as a bug.
Graham, don't know. Check it out.
Andreas
14-Feb-2010
[703]
what is the limit? 71 as per the current HELP output?
Graham
14-Feb-2010
[704x2]
It's a bug in the help system
Andreas, doc strings have to fit on a punch card
BrianH
14-Feb-2010
[706]
So? It's an advantage to make the doc string only fit on one line 
- it takes less space and is qicker to read. The doc string is more 
of a reminder than detailed documentation. Most functions need a 
full manual page to explain their behavior.
Andreas
14-Feb-2010
[707x2]
Yes, that's great
I will figure out a way how to squeeze a case sensitivity remark 
into the strict-equal?
BrianH
14-Feb-2010
[709]
If you can phrase it,m suggest it. And remember that most types that 
== applies to don't even have a concept of case, but have other constraints 
that == makes that = doesn't...