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

World: r4wp

[#Red] Red language group

DocKimbel
24-Sep-2012
[2097]
We could then upgrade such docs later with Red's specific additions.
Pekr
24-Sep-2012
[2098x3]
Who implemented Try REBOL? Was it Kaj?
http://tryrebol.esperconsultancy.nl/
So - we have something to start with, no?
Kaj
24-Sep-2012
[2101]
I'll most probably add Red to TryREBOL. I need to integrate it in 
my CMS, anyway
Arnold
24-Sep-2012
[2102x3]
The next step would than be to get the REPL for Red.
This is to try more Red beyond the things that are save to allow 
on a webserver/browser.
Is it necessary for a tryred to have Red be able to process cgi on 
the webserver.
DocKimbel
24-Sep-2012
[2105]
The easiest way would be to use Topaz and "just" add a Red-to-Topaz 
converter.
Kaj
24-Sep-2012
[2106]
That sounds like a lot of work. On TryREBOL, Red and Red/System will 
be used directly
Arnold
24-Sep-2012
[2107x2]
Agreed. Also a great introduction like http://learnyousomeerlang.com/
would help using the REPL and compiling Red.
Kaj btw length-of is scaring me ;)
Kaj
24-Sep-2012
[2109x2]
Is English scaring you?
There are OS- prefixes left in all platform files except Windows
Arnold
24-Sep-2012
[2111]
I meant the discussion about the -of postfixes. :-)
DocKimbel
24-Sep-2012
[2112]
Kaj: fixed.
BrianH
24-Sep-2012
[2113]
More scary discussion of -of: http://issue.cc/r3/1818:)
DocKimbel
24-Sep-2012
[2114]
Red is now Unicode from end to end: http://t.co/FR8vNV65
BrianH
24-Sep-2012
[2115]
Cool!
DocKimbel
24-Sep-2012
[2116x3]
And with string auto-scaling from 1 to 4 bytes per codepoints. ;-)
*codepoint
I will publish the new code tomorrow.
BrianH
24-Sep-2012
[2119]
UCS1 to UCS4 scaling? Fixed-length internally?
DocKimbel
24-Sep-2012
[2120x3]
Yes, Latin-1 / UCS-2 / UCS-4
Conversion for printing in UTF-16 done on-the-fly (no additional 
buffer needed)
Brian: you don't read Red's blog? :-) See http://www.red-lang.org/2012/09/plan-for-unicode-support.html
BrianH
24-Sep-2012
[2123x3]
Been busy :(
Will you eventually be doing the same trick R3 does of keeping its 
symbols in UTF-8 format internally, for binary hashing? Of course 
you might be handling symbols completely differently...
The symbol being the string part of a word.
DocKimbel
24-Sep-2012
[2126x2]
Yes, I currently keep an UTF-8 version in cache for each small string, 
but I'm not sure I will keep it.
I'm not using currently hashing for words, but indexing as lookups 
are done mostly during compilation.
BrianH
24-Sep-2012
[2128]
I'm talking about eventually, when/if you get real runtime word types 
:)
DocKimbel
24-Sep-2012
[2129x2]
Words dynamically created might need hashing though.
Right, it could be a good option.
BrianH
24-Sep-2012
[2131]
I think that R3 stores symbols in something like a BTree.
DocKimbel
24-Sep-2012
[2132x2]
Red stores them in a block! value currently, so probably the less 
efficient way...we'll see in the future how to optimize it the best 
way.
Maybe a Trie would be the best data structure for symbols (I have 
used them in other projects for fast short strings lookups).
BrianH
24-Sep-2012
[2134]
One gotcha we ran into with R3: R3 uses aliases to handle case-insensitive 
word equality. We found that aliases were a good, safe use for that, 
but not safe or stable to use for anything else. Perhaps you might 
consider this for Red.
DocKimbel
24-Sep-2012
[2135]
Maybe, I haven't decided yet how I will handle that.
Arnold
24-Sep-2012
[2136]
I can think of using to-head and to-tail. My opinion is you should 
have a more descriptive name for your variable. So length-of-cityname 
instead of length. The length could be of anything and the variable 
could be reused. Besides native English speaking programmers have 
always faced the fact that their prime candidate for variable names 
were taken because they were a reserved word. Imho so is should stay 
length? and not be length-of though that last one saves me from pressing 
a shift-key.
Oldes
25-Sep-2012
[2137x2]
Maybe it's too soon to think about optimizations, but what about 
function inlining?
(sorry that my question is out of topic... I was offline when I send 
it without noticing the unicode news:)
DocKimbel
25-Sep-2012
[2139]
Optimizations are for Red/System v2 (the rewrite in Red). The compiler 
will have a different architecture much more suitable for optimizations 
(including function inlining).
NickA
25-Sep-2012
[2140]
Doc, how will the open sourcing of R3 have an impact on your Red 
work?  Will you be studying RT's code to see how everything was accomplished?
Pekr
25-Sep-2012
[2141x2]
well, maybe depends upon the licence Carl selects? The other thing 
is - Doc might study some internals, but still he can't directly 
use C code, as Red is being written in Red/System, so C to Red/System 
rewrite would have to happen anyway ....
Of course, being able to understand Carl's R3 architecture might 
be REALLY inspirational, so I would not discount that option :-)
DocKimbel
25-Sep-2012
[2143x3]
No changes for Red plans, I continue on the same path towards a complete 
v1.0.
Will you be studying RT's code to see how everything was accomplished?


Certainly not!! The GPL precludes me from looking at the code, the 
risk is too high to unconsciously write similar code and infringe 
the license. It is even worse than that, all Red contributions implementing 
a feature that exists in R3, will need to pass through a peer-reviewing 
process to determine if it is a derivative work of R3 or not. The 
reviewing persons would be able to look at R3 sources, but doing 
so, would not be able to contribute code to Red. So I strongly advise 
current and future Red contributors that wants to add REBOL features 
to Red from looking at R3 sources.

so C to Red/System rewrite would have to happen anyway ....

 No!! Porting GPL code to another language falls under derivate work 
 clause too. If it wasn't the case, it would be too easy to workaround 
 GPL terms by porting it from language A to B, then from B to A.


There is a reason why most big software companies prohibit their 
developers from looking at GPL source code.

Yes, that's how GPL can be bad to non-GPL world.
Besides that, GPL is great if you live in a GPL-only world.
Pekr
25-Sep-2012
[2146]
Amen!