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

World: r4wp

[#Red] Red language group

DocKimbel
8-Nov-2012
[3461]
Path notation preliminary support added: you can use it on any series 
with integer! or get-word! values as accessors (nested word! values 
need SELECT action to be implemented first).


See changes in demo script: https://github.com/dockimbel/Red/commit/88fd1ff1da855a383e91566903fe373ea4d41eca
Pekr
9-Nov-2012
[3462]
Doc, apart from Twitter, please don't forget about using another 
marketing channel - Facebook :-)
DocKimbel
9-Nov-2012
[3463x3]
Pekr: I try to use each channel for what it is worth for. :-)
Set-path notation support for modifying series added.
Functions refinements support added. /ONLY option implemented for 
MOLD, much more to come soon.
Jerry
10-Nov-2012
[3466x2]
In R3, There are 56 actions, 159 natives, 21 ops, 56 datatypes. Now 
in Red, there are 19 actions, 21 natives, 10 ops, 15 datatypes, respectively.
Just a simple comparison.
Arnold
10-Nov-2012
[3468]
DO you need all 56 datatypes, 159 natives. Development last years: 
R3 nil Red exponential just a comparison ;)
Henrik
10-Nov-2012
[3469]
There is also the basic work to do, like the lexical scanner, port 
system, etc. Some of the work on actions and natives can be outsourced 
later.
BrianH
10-Nov-2012
[3470x2]
Bad comparison: Active project vs. suspended project.
They aren't even in the same stage of development, as R3 is much 
more mature at this point. This is not a criticism though, as Red 
was years away from existing yet when R3 was at the stage Red is 
at now. There is still much to look forward to from both projects.
Jerry
10-Nov-2012
[3472]
R3 has about 190 mezz functions, Red has none so far, which will 
be supported soon.
BrianH
10-Nov-2012
[3473x2]
Hopefully in a way that allows the compiler to not include the ones 
that aren't used, at least for closed apps. 190 seems like a lot. 
By closed apps, I don;'t mean closed source, I mean apps that don't 
execute external scripts, like iOS apps.
Probably not as much of a problem for Red as it was for Delphi though 
:)
DocKimbel
10-Nov-2012
[3475]
Jerry: interesting metrics. You could keep track of it month by month 
and publish them.
Henrik
10-Nov-2012
[3476x2]
He should write a script, one that runs both under R3 and Red. :-)
if Red is reflective enough to do that yet...
DocKimbel
10-Nov-2012
[3478]
We don't have system/words yet nor file I/O...looks like a challenge. 
;-)
Henrik
10-Nov-2012
[3479]
Is it possible to echo it? Then you can pipe it to a file.
DocKimbel
10-Nov-2012
[3480]
It should be possible, yes.
BrianH
10-Nov-2012
[3481]
You might be able to do source analysis using an external tool, for 
now.
DocKimbel
10-Nov-2012
[3482]
We should have file I/O in a few weeks anyway.
Jerry
10-Nov-2012
[3483x2]
Doc, I will. The metrics will be numbers of 1. Datatypes 2. Actions 
3. Ops 4. Natives 5. Functions 6. Objects 7. Schemes 8. GUI-Components
The completeness and stability of them will be ignored here, which 
is not fair to R3. But like I said, It's just a simple comparison. 
The purpose is to see the progress of Red, not to discredit R3.
DocKimbel
10-Nov-2012
[3485x2]
You can add those two also, no problem. Red is already more complete 
than R3 on some aspects, like Unicode support.
Also, Red will add its own features, like specific datatypes, natives, 
actions,... For example, MOLD and FORM both have a /PART refinement.
Jerry
10-Nov-2012
[3487]
Doc, Unicode in R3 is pretty good for me.
DocKimbel
10-Nov-2012
[3488]
IIRC, it doesn't handle characters above codepoint 0xFFFF.
Jerry
10-Nov-2012
[3489x3]
I write a book for R3 instead of R2 because R3 supports Unicode. 
Without Unicode, R2 is useless in China.
Yes, I've noticed that. By supporting USC-4, Red is better than REBOL. 
But Characters with codepoint > 0xFFFF are rarely used, I think.
I was reading your Unicode.reds earlier, It's really cool to see 
that Red supports UCS-4.
DocKimbel
10-Nov-2012
[3492]
Well, if you look at the astral planes, you'll see things like music 
notes or play cards, I bet they will become quickly as much popular 
as they are useless. ;-)
Jerry
10-Nov-2012
[3493x3]
Many years ago, I found REBOL 2 and liked it a lot, but back then 
REBOL didn't support Unicode, so it was useless in China/Taiwan. 
I wrote e-mail to Carl, but I got no feedback. So I decided to start 
a magazine column in China and Taiwan to introduce REBOL. My idea 
was to make readers love REBOL and felt the same pain (of no unicode 
support). I also kind of encouraged them to write e-mail to RT on 
the Unicode issue.
After a while, Carl said (in somewhere, blog maybe) that he didn't 
know why REBOL had many Chinese users, and they need Unicode. So 
he decided to support Unicode.
Doc, I am glad that Red support Unicode in the first place, so I 
don't have to do the same trick to you. :-)
DocKimbel
10-Nov-2012
[3496]
I remember that Unicode in R3 is mostly thanks to you. :-) No modern 
programming language can miss full Unicode support now, so it's a 
mandatory feature to have, anyway.
Ashley
10-Nov-2012
[3497]
For those of us still dealing mostly in pure ASCII will there be 
a 1-byte per character string alternative?
DocKimbel
10-Nov-2012
[3498x2]
Ashley: Red string! use 1-byte per character by default, so as long 
as you stick to ASCII, it takes the same storage space as C strings. 
As soon as you insert a non ASCII character, the string will automatically 
upgrade to the appropriate format. It's transparent for the Red user. 
Moreover, you'll be able to force string encodings back down to 2-bytes 
or 1-byte when possible.
So, upgrade is automatic, downgrade should be manual.
BrianH
10-Nov-2012
[3500]
0-127 ASCII, or UCS-1 (aka Latin1)?
DocKimbel
10-Nov-2012
[3501]
Latin1
BrianH
10-Nov-2012
[3502]
Cool :)
DocKimbel
10-Nov-2012
[3503x2]
So, I should have said "as soon as you insert a non Latin1 character".
In any case, you can always bypass the whole Unicode layer by reading 
(or converting) strings as binary! values, and then processing them 
the way you want (this is not recommended though, but some users 
might need it).
BrianH
10-Nov-2012
[3505]
For instance, users converting character encodings to Unicode, encodings 
like UTF8 or national encodings.
DocKimbel
10-Nov-2012
[3506]
Red should provide an UTF-8 codec. For national encodings, we would 
probably proceed by offering  on-demand online codecs for the most 
used ones. That could be a shared resource with R3.
BrianH
10-Nov-2012
[3507x2]
I was talking about the codecs. They need to be written too, right? 
:)
Sorry if I missed the answer to this, but are you going to be doing 
a UTF8 binary parser for Red's source the way that R3 does for its 
source? Rather than a Unicode string parser, which processes the 
source after it's been through a codec?
DocKimbel
10-Nov-2012
[3509x2]
Yes, that's the "runtime lexer" in Red's roadmap. It is required 
for implementing LOAD (or TRANSCODE if you prefer).
BTW, we already have a UTF-8 binary parser in the Red compiler.