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

World: r4wp

[#Red] Red language group

Gregg
25-Mar-2013
[6583x2]
Is it correct to state that FUNCTION automatically localizes all 
refinement, get-word, and set-word values found in the function body? 
And that is all that makes it cifferent than FUNC?

If so, since I don't know, why not just set-words?
Or, rather, why all word types except word?
Kaj
25-Mar-2013
[6585]
Have you tested that? As far as I know, it only adds set-words to 
the arguments and refinements
Gregg
25-Mar-2013
[6586]
I haven't. I looked at the code.
Kaj
25-Mar-2013
[6587]
Will have to wait until Doc rises again :-)
Gregg
25-Mar-2013
[6588]
Shouldn't you be sleeping too? ;-)
Kaj
25-Mar-2013
[6589]
Erm, yes
Gregg
25-Mar-2013
[6590]
A lot of doc strings talk about "evaluating", which is a long word. 
Is it less clear, or less correct, so use "do" instead, at least 
in most cases?
Endo
26-Mar-2013
[6591]
function localizes only set-words. (refinements are local by default)
DocKimbel
26-Mar-2013
[6592]
Gregg: only set-words are localized. What you saw in _function/collect-words 
is the the conversion of spec block elements to words for the ignore 
list. The collection of words from body block happens in collect-deep.
Gregg
26-Mar-2013
[6593x2]
Thanks for clarifying Doc.
In %boot.red, SET's word arg is typed as any-word!, but it accepts 
a block of words. Should the type be [any-word! any-block!] ?
DocKimbel
26-Mar-2013
[6595]
Right, but just block!.
Gregg
26-Mar-2013
[6596]
OK.
DocKimbel
26-Mar-2013
[6597x2]
Do you think we should allow paren! too?
R3 doesn't allow it.
Gregg
26-Mar-2013
[6599x2]
I don't think we need to, but Ladislav or Brian may have thoughts 
on it.
...or Andreas, or Kaj, or the other Brian... :-)
DocKimbel
26-Mar-2013
[6601]
I don't see any good use for it either.
Gregg
26-Mar-2013
[6602x2]
STRICT-EQUAL? delegates to the datatype. Should the doc string just 
say "strictly equal" in it, or should it be more like R2? i.e., there 
may be more going on, unless you have a behavior locked down for 
it.
BTW, even though I'm not ready to write deep .reds code, it's very 
enjoyable to have a reason to go through the code now. It's very 
nice.
DocKimbel
26-Mar-2013
[6604]
STRICT-EQUAL?: I prefer the R2 doc-string, it is more helpful.
Gregg
26-Mar-2013
[6605]
If the model for == is that all datatypes should use the ALL [type 
= ...  value =] tests, we can just say...OK, you beat me. :-)
DocKimbel
26-Mar-2013
[6606x2]
:-)
As several followers have requested some docs for the internal API, 
I will see this week, if I can find a few hours to write a basic 
one, just to get you started.
Gregg
26-Mar-2013
[6608]
It may save you answering a lot of  my questions. :-)
DocKimbel
26-Mar-2013
[6609x2]
As long as you have some basic knowledge of Red/System, with the 
docs, writing new natives or datatypes, should be pretty straightforward.
Gregg: I hope so. :-)
Gregg
26-Mar-2013
[6611]
Things are clearly laid out, but slot order and the stack are important 
to understand.
DocKimbel
26-Mar-2013
[6612x3]
Also the series! memory model (block! vs string!) is a fundamental 
part to understand.
Looking at %runtime/datatypes/structure.reds is a good help.
(structures.reds)
Gregg
26-Mar-2013
[6615]
Clearly. From a testing and coverage perspective, it would be great 
to have a matrix (and an easy way to generate it) to see how complete 
each type is, or make sure you have everything in place when building 
a new type.
DocKimbel
26-Mar-2013
[6616x2]
That is what I was asking for a few months ago from contributors.
Red runtime code can be easily parsed to extract those information.
Gregg
26-Mar-2013
[6618]
Let me finish my pass on boot doc strings, and then I may look at 
that.
DocKimbel
26-Mar-2013
[6619]
Peter has already started something in Red/docs/generate-reds-api.r, 
but it might be just for extracting doc-strings.
Gregg
26-Mar-2013
[6620x3]
OK.
SAME? is a tricky one. I will make it very basic for now, and we 
can fix it when more accuracy and details are needed.
I don't know how Ladislav's identity article applies, since R2 and 
R3 differ as well.
DocKimbel
26-Mar-2013
[6623]
SAME? is not implemented yet, we need first a matrix of datatypes 
and consider each case one by one, then implement it.
PeterWood
26-Mar-2013
[6624x2]
Yes - Red/docs/generate-reds-api.r just extract docstrings ... but 
it shouldn't be hard to generate the datatype matrix.
The dataype comparison matrix is on my todo list but I haven't found 
time to start on it yet.
DocKimbel
26-Mar-2013
[6626]
7000 hits so far on red-lang.org since the new blog entry. The Reddit 
wave has been the biggest I've seen since the site is online. We'll 
need to particulary target Reddit for future Red communication (the 
current one happened by accident, but it's still instructive).
Gregg
26-Mar-2013
[6627x2]
Doc, do you want any TBD marks for things that aren't implemented 
yet? e.g. /all and /header in LOAD?
Or should I put in stubs based on how they work in REBOL.
DocKimbel
26-Mar-2013
[6629]
TBD marks are more helpful for now, you can put stubs from REBOL 
in comments, so when implemented, I would just uncomment it.
Gregg
26-Mar-2013
[6630]
So you want:

; TBD: "Include Red header as a loaded value"

Not

TBD: Include Red header as a loaded value

Correct?
DocKimbel
26-Mar-2013
[6631]
Right, that's a good solution.
Gregg
26-Mar-2013
[6632]
Got it.