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

World: r3wp

[!REBOL3]

Steeve
14-May-2010
[3095]
for free :)
BrianH
14-May-2010
[3096x2]
The real problems blocking systematic fixing of awkward code is:

- A lack of a large enough set of R3 code to examine. R3 is already 
different enough from R2 that the code isn't comparable in this way.

- Not having metrics for "awkward". We've been eyeballing it so far, 
and meijeru and I have been the most systematic about that approach.
But we've made a rather large set of changes to R3 already that fix 
most of the R2 awkwardness.
Steeve
14-May-2010
[3098x2]
I've give you one awkward idioms for free, pretty common.
>> unless find serie value [append serie value]
i'm bored to have to write such code again and again
Graham
14-May-2010
[3100]
prerebol it
Steeve
14-May-2010
[3101]
ahah
BrianH
14-May-2010
[3102]
APPEND is a modifying operation. This is an excellent example of 
where the propagation should stop.
Steeve
14-May-2010
[3103x3]
Agree,  indeed
but not on the first parameter:
append find serie value value
Stupid me...
BrianH
14-May-2010
[3106]
No, it's the first parameter that is being modified. In all other 
cases with none pass-through the value isn't being modified. Modifying 
operations are where the pass-through should stop.
Graham
14-May-2010
[3107x3]
if file: request-file [
	append files file
]
append/found files request-file
I lose the temp variable
Steeve
14-May-2010
[3110x3]
In that case, I usually do 
>> append files [request file []]
no temp var
missing the ANY
before the block
Graham
14-May-2010
[3113]
mine is cleaner :)
BrianH
14-May-2010
[3114]
Steeve, I suggested your unless find serie value [append serie value] 
trick earlier as an INCLUDE function, because it's the opposite of 
EXCLUDE.
Steeve
14-May-2010
[3115x3]
matter of taste :)
Yep B
Yes Brian, I saw your ticket
BrianH
14-May-2010
[3118]
bbl8r
Steeve
14-May-2010
[3119]
Bed time, see you later Guys...
Maxim
14-May-2010
[3120x3]
steeve.... about:  

unless find serie value [append serie value]
did you know rebol has a fantastic thing called.... a function?  
and yes... you are allowed to write these !!  ;-D
brianH I have been using include for years.
Graham
14-May-2010
[3123]
Max, did you know Rebol has these things called natives ?
Maxim
14-May-2010
[3124]
yeah, but many series and loop funcs aren't natives anyways.
Graham
14-May-2010
[3125]
I believe the idea is to make the language more friendly and creating 
your own mezzanines doesn't help others
Ladislav
15-May-2010
[3126x2]
I use Include function for year too, but it does something totally 
different :-p
for years
Steeve
15-May-2010
[3128]
well, 'include is a polysemic vocable, not the best choice.
BrianH
15-May-2010
[3129x2]
Steeve, good one, I had to look "polysemic" up.
Yeah, discouraging that use in R3 is a good reason to call the function 
INCLUDE.
Steeve
15-May-2010
[3131]
Sorry it's a term I like to use in French and I just googled a traduction.
BrianH
15-May-2010
[3132]
I like the concept and the word, but won't be able to use it in conversation 
much :(
Steeve
15-May-2010
[3133x2]
It's really easy b
... because all words are polysemics (more or less)
BrianH
15-May-2010
[3135]
No, I usually can't use words in conversation unless the person understands 
them. Most non-technical conversations fall apart when too many words 
have to be looked up in a dictionary - it breaks the flow. So, unfortunately, 
I don't often get to use cool words like "polysemic", and have to 
translate them to more accessible language instead.
Steeve
15-May-2010
[3136x2]
(I use it to impress Girls)
:-)
BrianH
15-May-2010
[3138]
It's nice when that works :)
Steeve
15-May-2010
[3139]
sometimes...
BrianH
15-May-2010
[3140]
But back on topic, we all know that Ladislav and Maxim have been 
using functions named INCLUDE to write their own code organizing 
or module systems over the years. But R3 has a standard module system 
already. We want to encourage people to use *that* module system, 
or to improve it if it isn't good enough for them. Code written for 
incompatible module systems is incompatible because of that, and 
thus can't easily be integrated or reused. This leads to fragmentation 
of the community code base, which we definitely *don't* want. Especially 
since the proposed standard library of community-provided R3 modules 
is supposed to be compatible with R3's module system, and each other.


So we definitely don't want to reserve the word "include" for use 
by alternative module systems, because we don't want people to *make* 
alternative module systems for R3 unless they are compatible supersets 
of R3's module system, which uses IMPORT instead (different concept 
too).


R2 is a different matter: We're already stuck with different module 
systems and incompatible code bases, and they have to keep working. 
Even if a R3-style module system gets backported to R2 (and it will 
be) it will have to be an optional addon. And if INCLUDE gets added 
to R3 as the opposite of EXCLUDE, there would be downsides to adding 
it to R2. We wouldn't be able to use it in any mezzanine code because 
the function would be overriden by Maxim's module system or Ladislav's 
non-modular code organization system. So INCLUDE probably wouldn't 
be backported.
Robert
15-May-2010
[3141]
Do we have anything in R3 that equals PREBOL? I use this pre-processing 
quite a lot to include code (features), logos, colors etc. user dependent.
BrianH
15-May-2010
[3142x3]
It's the next thing on my list to rewrite PREBOL to be compatible 
with R3's module system. The syntax should be a compatible superset, 
but the internals will be a lot different.
It shouldn't be hard: R3's module dependencies are statically determinable, 
and the semantics can be translated to one-script form using known 
transforms. The module system was designed with this in mind.
This is, btw, the reason the module system doesn't have an INCLUDE 
function, and the reason for the limits of the IMPORT function.