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

World: r3wp

[Red] Red language group

Pekr
12-Feb-2012
[4950]
I tested it initially also on that machine. As I said - I was able 
to turn screen on/off, to get is-power? returning proper values ....
Kaj
12-Feb-2012
[4951x6]
That means #import basically works for this library, so the other 
functions should also be able to be made to work
The Ex function variants are not about dialogs. They take an extra 
integer parameter for the screen number, when there are multiple 
LED screens
The sample code uses the Ex functions. There may be a bug in the 
simple functions, so you should try the Ex functions instead
CLedSetApp::InitInstance() does this:
#ifdef _AFXDLL

 Enable3dControls();			// Call this when using MFC in a shared DLL
#else

 Enable3dControlsStatic();	// Call this when linking to MFC statically
#endif
I don't know why that would affect communication with the device, 
but since the library itself contains MFC dialogs, it may need one 
of these initialisation functions
Evgeniy Philippov
13-Feb-2012
[4957x7]
(See also: Not REBOL) In this way, RED could be renamed to ROD with 
many positive and complex connotations :)
ROD in modern Slavic mythology is a god of birth and of ansectry.
And RED is a color of war (including a nuclear war).
Rodit' in Russian means 'to give a birth'.
I'm thinking about deriving my own (simpler) ROD from RED :) All 
in all---Slavics must deal with their own mythology, and I am Slavic 
:)
Definitely ROD will be simpler than RED.
I don't need C influence there.
Maxim
13-Feb-2012
[4964]
note that currently, what you see isn't RED... its RED/System.
Evgeniy Philippov
13-Feb-2012
[4965x18]
Of course
This preprocessor is a BIG step BACK for a REBOL-like language and 
is completely counterproductive, and I can prove and explain why. 
I have a lot of insights into this issue.
Regardless of whether it's RED or R/S, it's highly counterproductive.
I find a code with preprocessing TERRIFIC, AWFUL, and TERRIFYING. 
It slows down compilation to orders of magnitude.
#include must be replaced by IMPORT or DEPENDENCIES
Since compilation of included file is done everytime, and for IMPORT/DEPENDENCIES 
it is done once, and then a compiled version of a dependency is used 
everytime, which is infinite orders of magnitude faster.
#define may be replaced by MACRO keyword (more specific) or by DEFINE 
keyword (if you want to use a broad term). # is redundant and ***misleading*** 
since it makes one think it's C #define.
why not use the simple
define macroname: macrovalue
syntax
?
#if and #either are easily replaceable by "if" and "either" with 
an optimising compiler
and are completely redundant
#switch is the same as #if/#either.
So, all preprocessor directives can easily be removed from a language 
of Red/System, and replaced by normal keywords.
They give no pros, and give only slowdown of a translator and also 
much greater complexity of a code (try to analyse it metaprogrammatically 
and you will understand what I tell about!) and they also give a 
redundant extra layer of complexity.
I propose to start a RED v2
Red/System v2. Without a preprocessor directives at all.
GrahamC
13-Feb-2012
[4983]
Not if it delays RED
Evgeniy Philippov
13-Feb-2012
[4984x6]
Haha. So you advicate a sShort time progress with Eternal
oops
Sorry. So you advocate a short time progress with Eternal regress 
and pain of recompiling included files and unavailability of metaprogramming 
possibility? No-preprocessor languages can easily be analysed metaprogrammatically 
and transformed, and preprocessor languages cannot (almost).
That's very childish, then. Uninformed decision.
Okay my intent is derive ROD from REBOL... Not sure I will reach 
a result.
err from RED
Steeve
13-Feb-2012
[4990x2]
I don't know what you mean by "I want to be able to analyse metaprogrammatically". 
But if you want "cleaned" sources, you just have to run the pre-processor 
on the "biased" sources.
Though, I don't know if it's possible right now to just run the pre-processor. 
But feel free to ask.
Evgeniy Philippov
13-Feb-2012
[4992x4]
http://en.wikipedia.org/w/index.php?title=Metaprogramming&oldid=472528422
I hate preprocessors installed right in the language. That's a sin 
of mixing layers into one layer.
Steeve, such cleaning removes important information from a code. 
That's reduction. And removing the preprocessor removes this reduction.
That's reduction of meaning of a program. Reduction of its semantics.
Steeve
13-Feb-2012
[4996]
Okkkkkk, I know what the word means in its regular sense. I just 
feel you should make clear yourself with the context and provide 
some use cases.
Evgeniy Philippov
13-Feb-2012
[4997x2]
for example how to analyse this:
#either macroname cond [ a if macroname ] [ b if macroname ] either 
macroname
Steeve
13-Feb-2012
[4999]
And we should switch the discussion into another thread