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

World: r4wp

[#Red] Red language group

Gregg
26-Mar-2013
[6632]
Got it.
DocKimbel
26-Mar-2013
[6633]
Sorry, I mean otherwise.
Gregg
26-Mar-2013
[6634]
Ummm, which one?
DocKimbel
26-Mar-2013
[6635]
Including a TBD: header in the doc-string is better.
Gregg
26-Mar-2013
[6636]
Ah, OK.
DocKimbel
26-Mar-2013
[6637]
I have extended FUNCTION to collect iterator counter words. Will 
push the changes tonight:

red>> f: function [] [repeat i 5 [print i]]
== func [/local i][repeat i 5 [print i]]
red>> f
1
2
3
4
5
red>> i
*** Error: word has no value!
Gregg
26-Mar-2013
[6638]
Doc, please be sure to leave something for old REBOLers to complain 
about, or they won't be happy. ;-)
DocKimbel
26-Mar-2013
[6639]
I'll try, but no promises. ;-)
Kaj
26-Mar-2013
[6640]
:-)
Gregg
26-Mar-2013
[6641]
For MOLD/ALL, are you calling it "serialized" format in Red? And 
I assume that's a TBD at this point.
DocKimbel
26-Mar-2013
[6642]
/ALL is TBD.
Gregg
26-Mar-2013
[6643]
Just from quick tests and a glance at code.
DocKimbel
26-Mar-2013
[6644x3]
What is the latest consensus for that naming in R3? I like the "loadable" 
format expression but I'm not sure it is the best one.
No: without /ALL: "source" format, /ALL: "loadable" format?
No => So
Gregg
26-Mar-2013
[6647x2]
For FORM I have:
	"Returns a string representation of a value."
and for MOLD:
	"Returns a loadable string representation of a value."
Ah, OK.
DocKimbel
26-Mar-2013
[6649]
FORM is used to create a human-friendly format. The description should 
hint for that.
Gregg
26-Mar-2013
[6650]
Returns a source format representation of a value.
		value	  [any-type!]
		/only "Exclude outer brackets if value is a block"
		/all  "TBD: Return value in loadable format"
		/flat "Exclude all indentation"
		/part "Limit the length of the result"
DocKimbel
26-Mar-2013
[6651]
Sounds good to me, maybe Ladislav or BrianH would like to be nitpicking 
about it? ;-)
Gregg
26-Mar-2013
[6652x3]
I'm sure they'll help improve things. :-)
FORM:  "Returns a user-friendly string representation of a value."
OR

FORM:  "Returns a value as a user-friendly string."
DocKimbel
26-Mar-2013
[6655]
I prefer the former.
Gregg
26-Mar-2013
[6656x2]
OK.
So this for MOLD?

Returns a source format string representation of a value.

i.e., include "string"
DocKimbel
26-Mar-2013
[6658]
Looks ok to me.
Gregg
26-Mar-2013
[6659x4]
Got it.
Can we use the ROUND doc strings from REBOL, since Ladislav and I 
wrote them outside of RT?
I know ROUND is TBD, and you probably want it native, or you could 
use the old mezz version.
Even though REBOL uses /dup for APPEND and INSERT, would /dupe be 
a better refinement name?
Kaj
26-Mar-2013
[6663x2]
Isn't that to fool someone?
Also, perhaps human-friendly instead of user-friendly?
Gregg
26-Mar-2013
[6665x2]
It can be, but it's also the standard abbreviation for duplicate.
I'll let Doc say if it's for humans for users.
DocKimbel
26-Mar-2013
[6667x5]
ROUND: a bit premature, we still don't have a float type in Red.
Or you mean doc-string: sure you can.
Forth and RPL (I've done a lot of code in RPL long time ago) use 
DUP as abbreviation for "duplicate".
I see no need to make arbitrary changes from Rebol unless we have 
something to gain.
(Bookmark it, you might throw at me that quote someday in the future 
after I make a purely subjective and arbitrary change from Rebol. 
;-))
Kaj
26-Mar-2013
[6672]
version.r seems to be missing from the repository
DocKimbel
26-Mar-2013
[6673]
https://github.com/dockimbel/Red/blob/master/version.r
Kaj
26-Mar-2013
[6674]
Sorry, it's probably missing from my build recipe
Gregg
27-Mar-2013
[6675]
Has anyone tried APPEND/DUP?

red>> s: copy ""
== ""
red>>
red>> append/dup s #" " 10
== 10
red>> s
== " "
red>> head s
== " "
PeterWood
27-Mar-2013
[6676x6]
red>> s: copy ""
== ""
red>> append/dup s #"1" 10
== "1111111111"
red>> length? s 
== 10
red>> s
== "1111111111"
There aren't any tests of refinements to append yet. I'll start an 
append-tests.red file for them inlcuding your 10 spaces test Gregg.
It appears that the problem is only appending spaces to a null string. 
it seems okay appending 10 spaces to a space.

red>> length? append/dup " " #" " 10
== 11
The issue seems to be with the console as the tests work in both 
the compiler and the interpreter.
The issue seems to be with the console as the tests work in both 
the compiler and the interpreter.
Sorry for the double posting.