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

World: r4wp

[#Red] Red language group

Ladislav
27-Mar-2013
[6685x3]
'For MOLD/ALL, are you calling it "serialized" format in Red? And 
I assume that's a TBD at this point.' Gregg, suggested reading:

http://en.wikibooks.org/wiki/REBOL_Programming/mold
'No: without /ALL: "source" format, /ALL: "loadable" format?' - /ALL 
has a totally different meaning for LOAD than for MOLD, BTW
See also http://issue.cc/r3/1955
DocKimbel
27-Mar-2013
[6688]
Your "construction syntax" is a bit long but accurate and meaningful 
naming.
Ladislav
27-Mar-2013
[6689x3]
Not exactly mine (to not take credits for something I did not invent), 
but I am promoting it is meaningful.
err: "as meaningful"
copying:

http://issue.cc/r3/2006
DocKimbel
27-Mar-2013
[6692]
Saw it in R3 group. It's a nice trick, but don't you think that the 
setword used in such place might confuse readers? (at first look, 
I read [i: 100]...)
Ladislav
27-Mar-2013
[6693x2]
We shall se what the preferences are...
(At least I hope so)
DocKimbel
27-Mar-2013
[6695]
Using [i:] instead of i: would remove the possible confusion, but 
it looks a bit inelegant.
Pekr
27-Mar-2013
[6696]
Wouldn't it look confusing, if one would like (not sure anyone would 
to :-) to use something like:

 repeat i: j: 10 [print [i j]]
Ladislav
27-Mar-2013
[6697]
confusing? hmm, you can use parentheses to make it more readable:

repeat i: (j: 10) [...]

if you prefer
Pekr
27-Mar-2013
[6698]
that's right ... I would understand the code even without parentheses, 
I think ....
Gregg
27-Mar-2013
[6699x7]
Append/dup, thanks all for testing. Not sure how I could have broken 
anything by just adding doc strings to boot.red, but it's not just 
spaces for me here (Win7):

red>> s: copy ""
== ""
red>> append/dup s #"1" 10
== 10
red>> s
== "1"
red>> length? s
== 1
I will have to test more. If I just paste the original append source 
into the console (i.e. all doc strings removed), calling append then 
crashes.
If I rebuild the console with the version of append that has no doc 
strings, it works fine. Interesting.
It's having the doc string on the /dup refinement itself that causes 
it.
Take that out and it works fine.
It looks like that 's the case for all refinements that take an arg. 
If you have a doc string before the arg, it causes the arg to be 
ignored.
Can someone please confirm?
DocKimbel
27-Mar-2013
[6706]
Testing with a string! between a refinement and its argument, I get 
odd results (but no crashes so far). Definitely a bug.
Gregg
27-Mar-2013
[6707]
Do you want a bug report, or have you logged it yourself?
DocKimbel
27-Mar-2013
[6708]
We need a bugtracker entry for this one, if you're on it, please 
add it.
Gregg
27-Mar-2013
[6709]
red>> get 'x
red>> type? get 'x
==
red>> print type? get 'x
unset

The second result is the one in question.
DocKimbel
27-Mar-2013
[6710x3]
Odd...please add it to the bugtracker.
Hmm, I get correct result here:

red>> get 'x
red>> type? get 'x
== unset!
Probably an interference from doc-strings like for APPEND.
Gregg
27-Mar-2013
[6713]
Could be.
DocKimbel
27-Mar-2013
[6714x2]
After pulling your doc-strings locally and recompiling the console 
I get the same output as you.
I need to fix that issue asap, before getting flooded with new tickets. 
:)
Gregg
27-Mar-2013
[6716]
:-)
DocKimbel
27-Mar-2013
[6717]
But I need to go to dinner now, so it will have to wait a bit.
Oldes
27-Mar-2013
[6718x3]
How to create a routine which would accept any-type?
I was trying:  r: routine [value [any-type!]][] but got error like:

*** Compilation Error: invalid definition for function exec/r: [value 
[red-any-value!]]
sorry... 

*** Compilation Error: invalid definition for function exec/r: [value 
[red-any-type!]]
PeterWood
27-Mar-2013
[6721]
The commit to introduce the doc-strings seems to have caused a number 
of tests to fail, a few in the compiler tests but a much bigger number 
in the interpreter tests. For example:

	ok - serialization....................275 / 275
	** - interpreter-serialization*********11 / 275 **
Gregg
27-Mar-2013
[6722]
Wow. Even my docs have bugs. I will run test here. Should have done 
that before.
PeterWood
27-Mar-2013
[6723x2]
My tests don't test the doc-strings so its definitely not you Gregg 
:-)

I wonder how I can test your doc-strings ?
I've just run the Red tests on both Windows 7 and OS X. Same results 
on both:

** - Red Test Suite******************5331 / 5666 **
Gregg
27-Mar-2013
[6725x3]
Evenetually we can test for missing doc strings and use some for 
reflection test, at the least.
I get the same serialization results here. Great to have so many 
tests Peter, and easy to run.
Does it log results somewhere?
PeterWood
27-Mar-2013
[6728x2]
Yes. the log is in Red/quick-test/quick-test.log
Thank Nenad for the tests being easy to run, it's his design.
Gregg
27-Mar-2013
[6730]
Excellent. Maybe have the test runner print out the log location 
at the end?
PeterWood
27-Mar-2013
[6731x2]
That's a thought.
I've just checked the quick-test docs and see that I forgot to mention 
the log file. I'll certainly need to update the docs.
DocKimbel
27-Mar-2013
[6733x2]
Oldes: you can't currently as any-type! is not a defined type yet.
Doc-string related bug fixed.