r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Red] Red language group

BrianH
11-Apr-2011
[1103]
That's why (after tax season) I'm going to try my hand at a Dalvik 
emitter :)
Maxim
11-Apr-2011
[1104]
its also a very big issue for me.  GPL is the license for star trek, 
when there will be no economics.
Rebolek
11-Apr-2011
[1105]
startrek sounds nice but I think it's license for Mafia.
Maxim
11-Apr-2011
[1106x2]
a lot of the people who do GPL don't work in the real world... they 
live in academia.
one thing I've always wondered... does MIT actually use the MIT license 
in their projects?
BrianH
11-Apr-2011
[1108]
Yes.
Rebolek
11-Apr-2011
[1109]
Acade Mia...
Maxim
11-Apr-2011
[1110]
and are they discouraged to use GPL?
BrianH
11-Apr-2011
[1111x2]
I don't know. MIT is public funded, so their products need to be 
usable to the public. That includes businesses.
I think they also make money off patents though.
Maxim
11-Apr-2011
[1113]
yeah... any invention eventually needs to be leveraged... that's 
ok.    and most high-profile research is funded by companies nowadays... 
I'm pretty sure its like that in all universities in the US.
BrianH
11-Apr-2011
[1114]
The big ones, yes. The others don't do a lot of research. There are 
exceptions though; my old professor contributed to Pizza, which led 
to generics in Java 6, and indirectly in C# 2.
Rebolek
11-Apr-2011
[1115]
Max, you sound like Japan anime with "most high-profile research 
is funded by companies nowadays".
BrianH
11-Apr-2011
[1116]
To be fair, research has more of a chance to become high-profile 
with marketing. Companies can afford more marketing.
Maxim
11-Apr-2011
[1117]
a lot of companies go to universities for some specific problems. 
 they fund a specific project form a team and a professor and team 
has work for 2-3 years.  sometimes it goes through the school, sometimes 
it almost like "renting" the professor for cheap.
Pavel
13-Apr-2011
[1118]
Doc is there any reason the shift functions (<< >>) are not implemented?
Dockimbel
13-Apr-2011
[1119x5]
Yes, multiplication or division by a power of 2 are generating shifts, 
so the feature is available, the << >> operators are now just syntactic 
sugar, that's why their implementation has been delayed.
They are also missing from the specification doc because I am not 
sure it is worth adding them anymore. What do you think?
Humm, looking at it a bit closer, it is not totally equivalent: the 
* and / operators will generate shifts only if the right argument 
is a literal integer. So: 
    a: 4
    123 * b
won't generate a shift.

So, I guess the conclusion would be: it is worth adding them. :-)
I'll consider adding these operators to the specifications after 
finishing my current debugging on ANY & ALL.
a: 4
    123 * b
should be:
    a: 4
    123 * a
PeterWood
13-Apr-2011
[1124]
Will  << and >> be needed in order to build the first version of 
Red?
Pavel
13-Apr-2011
[1125]
shift funcs are useful f.e. for checksums, securtity funcs etc. I 
thought the shift funcs will be produced using shift machine codes 
(i e single operation). Is there some kind of optimalization for 
multiply/delete by pow of 2? Also consider not to implement overflow 
for << (true shifting)
Dockimbel
13-Apr-2011
[1126]
Peter: strictly speaking, they are not needed because they can be 
emulated by math operations. However, on CPUs, the speed difference 
with true shifts is huge (one order of magnitude at least). I can't 
say yet how much shifts will be used in Red's runtime (mainly in 
memory manager) because in some cases, bitfield operators could be 
used instead.
PeterWood
13-Apr-2011
[1127x2]
I was wodering if you could perhaps live without them until the version 
of Red/System that will be built with Red.
wodering -> wondering
Dockimbel
13-Apr-2011
[1129x2]
Speedwise, certainly. But as the Red/System code that will be written 
for Red's runtime will stay, syntactic improvements are worth considering 
now.
It is a matter of writing, e.g.:
    123 >> 16
instead of:
    123 / 65536
PeterWood
13-Apr-2011
[1131x2]
It is certainly more readable.
I'll  guess that  the next request will be for an unsigned integer.
Dockimbel
13-Apr-2011
[1133]
BTW, Pavel is right about the overflow error checking (which is still 
pending for math ops in the current implementation), it is not required 
for shifts.
Pavel
13-Apr-2011
[1134]
Doc it would be very helpful to publish (maybe as picture) workflow 
thru respective modules (files) because for non expert it is quite 
difficult to see what is going on each module.
Dockimbel
13-Apr-2011
[1135]
You mean compilation workflow?
Pavel
13-Apr-2011
[1136]
yes and maybe light enlightment of design (ie metacode is created 
by compiler or linker?)
Dockimbel
13-Apr-2011
[1137x2]
metacode? If you mean the native code generation, it is done by the 
compiler.
I'll see if I can make a short description on how it is organized.
Pavel
13-Apr-2011
[1139]
and what linker cares about, glues together multiple compiled source 
files?
Dockimbel
13-Apr-2011
[1140x2]
Compiled source files are glued together by the compiler itself. 
The linker currently simply generates the right binary from compiled 
code, global data and external libs imports. The linker will be later 
extended to be able als to statically link external libraries.
als => also
Pavel
13-Apr-2011
[1142]
so emitter is only helper?
Dockimbel
13-Apr-2011
[1143]
Emitter module purpose is to isolate as much as possible target-specific 
code from the compiler. So, it provides target-independent helper 
functions to the compiler and for target-specific code, it loads 
one from  %targets/ folder.
Pavel
13-Apr-2011
[1144]
thx for description
Dockimbel
13-Apr-2011
[1145]
The emitter module API is used by the compiler only when it can provide 
an added value, else the compiler taps directly in the target-specific 
code through a target-independant API. In other words, a new target 
module needs to implement all the current target API (all the emit-* 
functions in %IA.r) to be able to work with the compiler.
Pekr
15-Apr-2011
[1146]
Doc - do you think we can get Red to the following page, or is it 
too preliminary?

http://en.wikipedia.org/wiki/List_of_programming_languages
GrahamC
15-Apr-2011
[1147]
somewhat premature .. it's not in use yet
Henrik
15-Apr-2011
[1148]
I agree.
Dockimbel
15-Apr-2011
[1149x2]
Probably too early.
Direct link to Red/System specifications draft changed, it is now 
available from: http://static.red-lang.org/red-system-specs.html
Pekr
18-Apr-2011
[1151]
I just visited the Haiku OS website, and I can see, that it was accepted 
for the Google summer of code 2011. Maybe once Red becomes an alpha, 
we could apply too? Let's say for 2012 :-)
Dockimbel
18-Apr-2011
[1152]
Google Summer of Code is a global program that offers student developers 
stipends to write code for various open source software projects
  I wouldn't qualify for the "student developer" part.