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

World: r3wp

[!REBOL3]

BrianH
30-Sep-2010
[5146]
If you want something as high-level as R2's /Base, use -b 'mods.
Pekr
30-Sep-2010
[5147x2]
OK, but in base, you don't have any load or do - it is practically 
useless, no?
I want to understand the stuff. So - if 'base does not allow load 
or do, I can't execute any code? I can not load additional stuff, 
etc?
BrianH
30-Sep-2010
[5149]
No, 'base is not useless, it's just useful in more rare circumstances. 
Users like Maxim will likely want to replace all of that stuff anyways.
Pekr
30-Sep-2010
[5150]
Now I want to understand 'sys level - "Provides a basic load function 
but with very limited special options (no import, needs, versions, 
or related features.)" - I don't understand the "no import" argument 
- so I can't use modules here?
BrianH
30-Sep-2010
[5151]
Right. People who thought that the 'lib context is just a renaming 
of 'exports were way off.
Pekr
30-Sep-2010
[5152]
And as for 'mods. This is why you try to define mezz+ packages? So 
that help will be e.g. in mezz+? So 'mods is now old /base?
BrianH
30-Sep-2010
[5153]
Right. And no specified boot level is the old /Core.
Pekr
30-Sep-2010
[5154x2]
OK, what is 'sys level precisely good for?
Maybe we should explicitly add 'all feature, which would be just 
the same as not specifying boot-level at all ...
BrianH
30-Sep-2010
[5156]
No, it wouldn't, because there are still a few opt-in modules that 
are included but not imported by default. For instance, modules that 
implement conflicting functionality, such as CGI vs. GUI.
Pekr
30-Sep-2010
[5157]
This stuff will require very precise documentation and examples, 
explaining e.g. how user can save some cycles for CGI purposes, yet 
how he/she can load his own framework (modules) etc.
BrianH
30-Sep-2010
[5158]
The 'sys level is good for really low-level programming, replacing 
the mezzanines with your own, testing host code, all sorts of things. 
And it will enable the few users in the REBOL community who write 
their own module systems to use them instead of the standard one. 
You might be able to build sandboxes at that level too.
Pekr
30-Sep-2010
[5159]
The best would be to have complete map of what functions are available 
for what level ...
BrianH
30-Sep-2010
[5160]
Which has not yet been decided. For that matter, there is also the 
question of *where* they are available at different levels. It is 
possible that some stuff put into 'lib will be transferred from other 
contexts in the system catalog.
Pekr
30-Sep-2010
[5161x2]
I like the SDK aproach - you get your base, and then you include 
any mezz funcs/packages you want. This all now sounds so cryptic 
...
I mean - without user not precisely understanding new module system, 
all the bindings, he has absolutly no chance to understand, what 
we are talking about ...
BrianH
30-Sep-2010
[5163]
It only sounds cryptic because it isn't done yet. A system redesign 
has been planned for a while now, but we had to nail down the semantics 
of the language first and fix a *lot* of bugs.
Pekr
30-Sep-2010
[5164]
This should become part of docs asap - http://www.rebol.net/r3blogs/0334.html
BrianH
30-Sep-2010
[5165]
The module system, the boot levels, it is all progressive-reveal. 
By default, things are really simple for users and there isn't that 
much to understand. As you learn options you can make the system 
do more tricks, but the default is really simple.
Pekr
30-Sep-2010
[5166]
Are you still working on module system?
BrianH
30-Sep-2010
[5167]
I am putting the finishing touches on the initial implementation. 
More tweaks will be necessary for the integration (mostly renaming 
variables), but the new system model will simplify things a bit. 
In particular, the predefined 'sys word makes the module-tools mixin 
unnecessary, which simplifies the bootstrapping and use of the system 
immensely.
Pekr
30-Sep-2010
[5168]
Why the rewrite, if I may ask? I thought your module code was already 
finished?
BrianH
30-Sep-2010
[5169]
Well, there was a new feature required (delayed modules) that when 
added had wide-reaching implications for the rest of the module system, 
and caused a bunch of other features and the improving of others 
as a side-effect. Also, the old module system violated the "hit by 
a bus" principle: I was the only person who understood the code fully, 
so noone else could modify or enhance the code, and if I went away 
the code would become instantly unmaintainable. So the new code is 
easier to use, does more, and can be understood by the average REBOL 
guru. Believe me, it was that last part that has been the trickiest.
Maxim
30-Sep-2010
[5170]
BrianH note that if you read my blog posts, I am rooting for 'RESIDENT... 
not 'EXPORTS.


and thanks for your better explanations they shed a little bit more 
light on the whole thing.
Andreas
30-Sep-2010
[5171x3]
Don't handicap the implementors of R3 just because you want to handicap 
yourself.


Don't harm the users of R3 just because you are a lazy implementor.
But it will be easier to discuss this once there is a concrete implementation 
to play with and discuss, not just vapour.
And in any case, even having 'lib defined in 'lib won't stop script 
writers from just ignoring it, continuing to use the LIB name for 
their own purposes, and refer to the LIB context as system/contexts/lib 
if they ever need it.
BrianH
30-Sep-2010
[5174]
See, that last message is exactly what I was recommending, Andreas. 
You have just pointed out that there is no harm whatsoever to defining 
the 'lib word in 'lib. Though there is no evidence of the "lazy" 
in your earlier comment.
Henrik
5-Oct-2010
[5175]
http://www.rebol.net/r3blogs/0339.html

Module issues.
Pekr
5-Oct-2010
[5176x2]
uh oh, now I fear Carl will scrap BrianH's work, and we are going 
to wait for 3 months for Carl to come-up with his own version :-)
I hope this is not the case, however following is scary, while understandable 
-  ".... a fight between simplicity and complexity, between maintainability 
and chaos, between elegance and ugliness"
Maxim
5-Oct-2010
[5178]
no Brian is doing the module work, its just that the changes to how 
the contexts are now layed out provoke deep changes in how things 
are bound.


because that is a big part of the module system's job, it means Brian 
has to update a lot of the code.


also remember that Brian has been splitting up the module code into 
sub-functions, so all of that makes it simpler, and more re-usable.
Pekr
5-Oct-2010
[5179]
Earlier prototypes worked well. They were functional, clean, and 
simple. Understandable.

 - that simply means, that Carl does not like something about current 
 system ...
Maxim
5-Oct-2010
[5180]
They where coding at opposite ends of the spectrum, now they are 
fighting to merge the two together.  that's how I read it.


IMO its just a question of getting it to work again. with new contexts 
layout and new, better module functionality.
Henrik
5-Oct-2010
[5181]
AFAIK, Brian's code is usually accepted.
Pekr
5-Oct-2010
[5182]
I like the following part :-) "Some of you may be saying "Carl, we 
don't care." Yes, I know, I've heard that before. But, (if I had 
a Yoda voice, I'd use it here) you will care. You just don't know 
it yet."
Maxim
5-Oct-2010
[5183x2]
The module system has grown to include many advanced features, which 
are all usefull and viable.  Brian has been working to simplify the 
code by breaking it up into smaller pieces.   At some point you can't 
have features without at least a minimal amount of code.


The new contexts layout makes it a more complex task because my guess 
is that basically, its broken everywhere and that is hard to debug.


The original module system wasn't very powerfull in the sense that 
it didn't add much more than special objects... what Brian is doing 
is sooooo much more than that.
So I don't think Carl and Brian are fighting... hehe

I think they are fighting the code  :-)
Pekr
5-Oct-2010
[5185x2]
Henrik - I know, that is just why I am surprised by Carl stating, 
that he liked to early prototypes. This just seems to follow the 
Gab's VID scenario - Carl detached from Gab's VID for quite some 
time, then having difficulcy to understand it, then - scrapping it.
Max - I hope so :-)
Maxim
5-Oct-2010
[5187]
I've looked at the module code and it was a large and barely understandable 
by its complexity.  Even by Brian.   He was already working on this 
problem... its just that now that its all broken, they can't ignore 
it anymore  ;-)>
BrianH
6-Oct-2010
[5188x4]
We weren't ignoring it, trust me. I have been working on integrating 
the new features, which resulted in a redesign of the semantics. 
But the code was intimidating even after the rewrite, and there were 
some repeating awkward code patterns that needed native replacement, 
which I couldn't do. The new module system that Carl and I are working 
on is based on my work, even if the code may not resemble my code 
on a surface level.
Main changes so far, relative to my recent work:

- A different code style which Carl thinks will be easier to read 
and maintain (mostly using CASE/all).

- Some of the more awkward repeating code patterns have been split 
out into functions, which in some cases will be made native.

- The API of LOAD has been simplified, though is more flexible. Its 
behavior with no options is the same, but some options have changed.

- Some functions are renamed, and some code has been moved from function 
to function (this was expected).

- The sys and lib contexts take the role previously planned for the 
exports context and module-tools mixin, though the usage is the same.

- Fewer functions will be exported into lib than I was expecting. 
The short names of the lib and sys contexts enable this.
Those first three were tricks that I couldn't do, because I don't 
set the standard APIs and don't write the natives. But the core semantics 
are quite similar to my recent work.
Btw, the reason why I didn't use CASE/all before is because I thought 
it would make things trickier. Apparently it made things easier. 
Who knew? :)
Steeve
6-Oct-2010
[5192]
me :-)
BrianH
6-Oct-2010
[5193]
Well, yeah, of course you :)
Maxim
6-Oct-2010
[5194]
I have been recently starting to use CASE... funny how we can discover 
new code patterns after over a decade of using a tool.
Anton
7-Oct-2010
[5195]
BrianH, could you show us a before & after example of code modified 
to use CASE ?