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

World: r4wp

[#Red] Red language group

ACook
16-Aug-2012
[993]
Spanish dialects are a bit more intense than English ones it seems. 
English dialets tend to be unintelligable, very few words mean something 
offensive to others.
Kaj
16-Aug-2012
[994]
Hm, there are several words that change to embarassing between English 
and Dutch
ACook
16-Aug-2012
[995x2]
English is closer to Dutch than say German, but had been seperated 
for so long that I can imagine the drift meaning, not just pronunciation, 
is significant.
Afrikaans is an offshoot of Dutch and they seem to have incorporated 
a lot of interesting slang.
Kaj
16-Aug-2012
[997]
Yes, there are also such cases between Dutch and German :-)
ACook
16-Aug-2012
[998x3]
Question about Red, as I understand it, the Parser and Compiler are 
written in REBOL, but the Runtime is written in Red?
Just going from the source code I can see on GitHub
Really nice website (red-lang.org) by the way.
DocKimbel
16-Aug-2012
[1001]
Kaj: your two new issues have been fixed, let me know if it works 
fine with your code now.
Kaj
16-Aug-2012
[1002x3]
I just saw it happening. :-) Thanks!
Anthony, the current runtime is written in Red/System, to be precise
The parser and compiler will be rewritten in Red once it's ready
ACook
16-Aug-2012
[1005]
And Red/System is a subset/simplification of Red?
Henrik
16-Aug-2012
[1006]
I think Red is built on top of Red/System, which is meant to have 
C-like performance. Red/System can also be inlined in Red code.
ACook
16-Aug-2012
[1007x2]
Hi Henrik, BrianH requested you (or your automated system) invite 
me, I don't know if we've actually spoken before.
That makes Red/System sound like a VM
Henrik
16-Aug-2012
[1009x2]
We probably haven't. :-)
I better let someone more experienced with Red answer that one, before 
I screw something up. :-)
ACook
16-Aug-2012
[1011]
I just ask a lot of questions. Especially right now, since I'm fumbling 
along building my first programming language.
DocKimbel
16-Aug-2012
[1012]
ACook: you can see Red/System as a human-friendly VM if you want. 
;-) But it's more than that, because it allows you to access very 
low-level system or hardware features directly.
ACook
16-Aug-2012
[1013]
Does it do platform abstraction for those low level features, or 
are they platform dependent?
DocKimbel
16-Aug-2012
[1014]
It does abstract everything that can be abstracted, currently, IIRC, 
only FPU options (system/fpu/* properties) are platform-specific.
ACook
16-Aug-2012
[1015]
One thing I'm torn on when it comes to VMs is if I need to write 
my own at all. I know I will have to write a Bootstrapping language 
as an intermediary, but I'm thinking it might be a waste of time 
when LLVM has such aggressive optimization for compilation and also 
supports JIT - both of which I'd have to write myself otherwise.
DocKimbel
16-Aug-2012
[1016]
LLVM is a good choice if you really want a VM (Red/System is more 
a standalone language than a VM).
ACook
16-Aug-2012
[1017]
Of course.
Jerry
16-Aug-2012
[1018x2]
Yes Jerry wants that.
for making Chinese Alias
BrianH
16-Aug-2012
[1020]
Doc, aliases are used in R3 internally to implement case-insensitive 
words. Explicit use of the ALIAS function is rare and unsafe though, 
so it's been recommended that the function be removed.
PeterWood
16-Aug-2012
[1021]
How much of an overhead is there from using this mechanism over alias:

  my-alias-of-print: :print
DocKimbel
16-Aug-2012
[1022x2]
No overhead, but it's not equivalent to an alias.
Brian: I think that was the case for R2 too? I used the same trick 
in r-sharp, so ALIAS was coming almost for free.
Robert
17-Aug-2012
[1024]
Isn't Red/System more the runtime environtment for Red? Like for 
Smalltalk or Oberon systems?
PeterWood
17-Aug-2012
[1025x2]
No, I don't think so. The Red runtime is written in Red/System. Red/System 
compiles to machine code.
I suspect that the Red runtime will be linked into Red executables 
rather than exist as a separate file.
BrianH
17-Aug-2012
[1027]
Doc, aliases weren't used that way in R2. R2 stores the word strings 
using the case that the word was first loaded in. When you load subsequent 
words of the same name, they display with the case that the first 
one had. In R3 words are case-preserving, displaying with the case 
they had when they were loaded, even if other words with the same 
name have different cases. I prefer the R3 method, it's a good system, 
though it does lead to some confusion from people used to R2. For 
instance, they compare like strings:
>> 'a = 'A
== true
>> 'a == 'A
== false
>> 'a =? 'A
== false
DocKimbel
17-Aug-2012
[1028]
Peter: exactly.
Gabriele
18-Aug-2012
[1029]
Brian, that was REBOL 1. REBOL 2 is case preserving.

>> [a A ab Ab aB AB]
== [a A ab Ab aB AB]
Robert
18-Aug-2012
[1030x3]
Well, IMO than it's not really so clearly stated. Taking a look at 
chart 10, confuses me.  Maybe it's the wording. Doc, I would simplify 
all this to more commone terms to make it as simple as possible for 
new users.
So, Red Compiler is like the first C++ compilers that emitted C code, 
but emits Red System language?
A reduced dialect?
Kaj
18-Aug-2012
[1033]
Yes, except that Red/System is designed to fit Red, and Red will 
pass code to Red/System efficiently in loaded block form, instead 
of text form that the C compilers had to parse again
PeterWood
18-Aug-2012
[1034]
Robert, Nenad's intial plan was for the Red compiler to directly 
generate machine code. So his first presentation reflects that. It 
was a few months after the launch that he decided to generate Red/System 
code from the Red compiler.
Robert
19-Aug-2012
[1035]
Ok, IMO it just needs to be made more clear. I'm confusig it after 
not tracking this here for a time. Just make things as simple as 
possible.
DocKimbel
19-Aug-2012
[1036x3]
Robert: C++ is a superset of C. Red is not a superset of Red/System, 
they are two different languages that share the same syntax and superficially, 
some semantic rules. Red/System is a low-level dialect of Red than 
enables system & hardware programming with C-level performances. 
Additionally, Red/System is used to build Red runtime (memory manager, 
lexer, natives,...).
Merged namespaces branch with master branch.
Kaj: I'll give tonight a quick try to add namespaces support to aliases, 
then I'll make the 0.2.6 release.
Kaj
19-Aug-2012
[1039]
Cool :-)
DocKimbel
19-Aug-2012
[1040x3]
Kaj: aliases are now namespace-aware! ;-)
But I'm not 100% confident that my changes cover all possible use-cases, 
so I'll delay the 0.2.6 release until tomorrow night to give us time 
to test it better.
In the meantime, I'll also have a look at the compilation target 
folder issue you've raised.