AltME groups: search
Help · search scripts · search articles · search mailing listresults summary
world | hits |
r4wp | 4382 |
r3wp | 44224 |
total: | 48606 |
results window for this page: [start: 43701 end: 43800]
world-name: r3wp
Group: !REBOL3 Modules ... Get help with R3's module system [web-public] | ||
Gregg: 19-Jul-2010 | Yes, poor wording on my part. The point being that there is an identifier before the version and other information related to a module, and the system version is an implicit exception. | |
BrianH: 19-Jul-2010 | Yup. But it's always at the beginning. There's another exception where Needs can just be a tuple, and only the system version is checked. | |
BrianH: 19-Jul-2010 | And it's not implicit, it's documented. | |
Gregg: 19-Jul-2010 | I'll cast my vote to allow 'REBOL as an optional key, rather than 'core, and leave it at that. Documented does not equal explicit. | |
BrianH: 19-Jul-2010 | It turns out that there is no 'system or 'rebol module - it's a chicken-vs-egg thing. If it is a module, it can be overriden, so it really does need to be special-cased. I don't like that there is a 'core optional keyword, because there can also be a 'core module and that isn't screened for. But the 'core keyword is there for backwards-compatibility. | |
BrianH: 20-Jul-2010 | If you are adding a module to the module list, and there is an existing module of that name, then the new module either overrides it, replaces it, or doesn't get added (possibly with an error triggered, but so far not). The question is which one to do in the particular circumstances. The factors are whether it is the same module, for whatever "same" means here considering it might be reloaded or still source; whether the versions are the same or greater; whether the existing module has already been made or is still source, and the same for the module to be added. | |
BrianH: 20-Jul-2010 | So far, my guess is that - Premade modules can't be delayed since their code blocks and side effects have already been executed. - Delayed modules can't be added unless they have at least the version of an existing delayed module, or more than an existing imported module. - Premade modules can't be added unless they have at least the version of an existing delayed module, or more than an existing imported module. - If a overriding module is added and the existing module is delayed, the existing reference should be replaced, not overriden. - If a overriding module is added and the existing module is already imported, the new module overrides the old but the old reference is still there. - If a delayed module is a mixin, the module is made and returned, but the stage-two delayed source is kept in the list. - I'm missing something. | |
BrianH: 20-Jul-2010 | The questions I have are: 1. What do we do when a module is not added due to a policy issue? Currently the add accessor returns none if it is a version issue, and triggers an error for a checksum violation. 2. How do we determine (officially) that two modules are to be considered the same? Name and version? 2. Can we safely LOAD-EXTENSION more than once with the same extension? 3. Does LOAD-EXTENSION on an embedded extension have any side-effects beyond creating an object? 4. ... return the same source each time, or different copies of the same source? Testable by SAME? 5. Is is safe to delay the object returned by LOAD-EXTENSION instead of the source? | |
BrianH: 21-Jul-2010 | Questions and answers posted here: http://www.rebol.net/wiki/Module_Design_Details | |
Ammon: 26-Aug-2010 | Awesome. Just read through the messages here and will be reading the document you linked shortly. | |
BrianH: 22-Sep-2010 | The modules that implement the protocols could be delay-loaded and registered with the general protocol dispatcher. Then the dispatcher could import the module the first time it is needed. | |
Andreas: 22-Sep-2010 | Bundle the modules as what Carl now calls "optionally included". Also keep a list of scheme prefix to module name, and just auto-import the module from this list when a scheme is used in on of the scheme action functions (READ, OPEN, ...). | |
BrianH: 22-Sep-2010 | A regular, non-delayed module could include a delayed module that does the real work. And there are other tricks that can be done. | |
BrianH: 22-Sep-2010 | And it's not user-level, so be warned: Here there be dragons :) | |
Andreas: 20-Oct-2010 | Now that issues are no long strings but words, maybe we want to revisit the decision to introduce EXPORT and HIDDEN keywords. In http://www.rebol.net/r3blogs/0300.html the main reason not to use #export and #hidden seems to be the nature of issues. | |
Andreas: 20-Oct-2010 | I'd actually prefer to use #export and #hidden, as I rather dislike the concept of "module keywords". | |
Andreas: 20-Oct-2010 | Currently we have the issues-as-words, and it does not look like they are going away, but rather their semantics be adapted to address the concerns raised. | |
Maxim: 20-Oct-2010 | pekr, most of whined and tried to put the change in our perspective, yes :-) | |
BrianH: 22-Oct-2010 | I have also started writing some simple charts to explain the details of the design and behavior of the module system. In CSV format. These charts helped a lot in the fixing of the problems and implementation of the tests. As with the tests, I will try to get the charts published somewhere official. | |
BrianH: 22-Oct-2010 | With alpha 109 we got some significant usability revisions to the design of the module system, relative to alpha 108: - The return of unnamed modules. They are now changed to private modules (mixins) which aren't stored in the system modules list. - IMPORT now effectively works a lot like the Needs header in user scripts. Most users won't be able to tell the difference. - The return value of IMPORT block is now a block of the modules you imported (but not the modules *they* imported). - The refinements of IMPORT have been renamed and their behavior tweaked to be nicer and more useful - the first API change since Carl's original. - /no-share: The previous /isolate option. Same behavior. - /no-lib: Don't export to the runtime library. Private modules don't do this anyways. Also, don't add to the system modules list. - /no-user: Don't export to the user context, even as a private module. When importing to a module, /no-user applies. - The old /only option was split into /no-lib and /no-user, for more control. Specify both if you don't want IMPORT to export anything. Alpha 110 should bring these changes: - The above will work properly. With a bunch of specs and charts that define what "properly" means. With a full test suite to make sure. | |
BrianH: 22-Oct-2010 | For the sake of completeness, here are the highlights of the alpha 108 changes: - Script headers can have an options block, a simple block of flag words. User extensible. - The standard script header now has a lot fewer words in it. More stuff is optional or in the options block. - Script compression, either binary and base 64 binary! encoded. Automatic, transparent. - Script checksums, both to verify the script and for IMPORT to compare with. Applies to decompressed source. - An optional script length header field (like http's Content-Length). This allows binary script embedding. - Internal support for getting the end of an embedded script, so a multi-loader is possible. - The 'content and 'isolate header fields are changed to option words. The content is still saved to a 'content header field. - The 'content field, if set, is set to the start position of the script proper, even if there is stuff before it. - The whole system/contexts/system concept is gone, as part of the system restructuring. Now we have SYS. - The system/contexts/exports concept is gone too, replaced by a not-module-specific runtime library called LIB. - The old type: 'extension is now the 'extension header option word. The only module type is 'module. And it's optional for most code. - Mixins are now called "private modules", and are flagged by the 'private option word. And they can have names. - Private modules can be added to the system modules list (because of the names). This lets them be reused without being reloaded. - Unnamed modules are now prohibited (until alpha 109, where they become private modules that reload every time). - Delayed modules, which can be partially loaded and then not fully made until they are imported. Use the 'delay option word. - A HIDDEN module source keyword, which applies PROTECT/hide to a word or words. Acts like the EXPORT keyword. - Better errors are triggered when the bad things happen. Including new error codes. - DO and MAKE--MODULE intrinsics are now in sys, as DO* and MAKE-MODULE*. No more system/intrinsics. - DO-NEEDS is no longer exported (it's in sys). IMPORT block is a public alias for DO-NEEDS anyways. - MODULE now makes modules that act more like those in script files. And has /mixin support too. - A whole bunch of changes and fixes to native functions to support the above stuff. | |
BrianH: 22-Oct-2010 | Shadwolf's "used by 3 guys around the world" comment brings to mind one of the more ironic things about the module system: Most user code for R3 will be written in "scripts", not "modules". This will be even more the case once we get more of concurrency working, because "script" code works in the user context, which will be task-local. We are going out of our way to make it extremely easy to just use "scripts" and not have to bother with "modules". The ironic part is that "scripts" are just another kind of module, one of the three including regular and isolated modules. In particular, user scripts are a kind of module that we try to make as non-module-like as it is possible to be (given that they run in a module system). The entire module system structure is built around the challenge of making the module system apparently disappear, or at least be something that you can be almost completely ignorant of. The module system is built for script programmers, to let people do PITS on a systerm that they don't even have to know is capable of the most advanced PITL. So the module system we are discussing here will be used by *everyone who programs in R3*, whether they know it or not :) (I am politely assuming that Shadwolf was not referring to the entire REBOL community when he said "3 guys".) | |
BrianH: 22-Oct-2010 | Cryptographic signing is also planned, as also mentioned in the wiki. Both will work in a similar way to the compression and checksum, respectively. | |
BrianH: 22-Oct-2010 | We plan to do encryption and signing. We aren't far enough along in the plan to know how we will do these. | |
BrianH: 22-Oct-2010 | In theory, you could generate R3 scripts using R2 and still have most of the same features. Loading them would be trickier though. | |
BrianH: 22-Oct-2010 | SAVE is pretty straightforward and doesn't use any R3-specific features. | |
BrianH: 22-Oct-2010 | I forgot to mention the LOAD and SAVE option changes in alpha 108. Perhaps later after I sleep, if their HELP is insufficient. | |
Andreas: 22-Oct-2010 | Need to find some time to play with it first, but it sounds like "private" modules and/or IMPORT/no-lib/no-user will be most useful. | |
Gregg: 22-Oct-2010 | The charts will help. I didn't have a problem with /isolate and /only as names. The new ones sound rather clunky at first glance, but I may grow to like them. Most important, I think, are small examples demonstrating why we have the various options. I hope the charts are the first step on that path. Thanks Brian! | |
Andreas: 22-Oct-2010 | My hope is that eventually R3 will be used for more than just small and dirty throw-away scripts. And that'll directly induce the need for a module system. | |
BrianH: 22-Oct-2010 | Of course, headers let you do all sorts of tricks that you can't do without them. In addition to the above stuff, header settings let you: - Embed scripts in text or binary files, even if it's just documentation before the script header. - Aggregate multiple scripts/modules in one file. - Save and verify a script/module checksum. - Compress scripts/modules. | |
BrianH: 22-Oct-2010 | Andreas, the (dis)advantage to private modules is that they need to be explicitly imported into your module for you to get their exports (selective import). For regular modules, you import into the runtime library once and it is just there to share. Regular modules can take advantage of this to support upgrading themselves in place, for instance, or more easily managing word overrides on a global basis; private modules can't be upgraded. Each approach has advantages and disadvantages in different situations. This is why we support both export models. | |
Andreas: 22-Oct-2010 | But that doesn't worry me at all, at the moment. If R3 ever reaches the stability and maturity that such long-running become realistic, then I'll start to worry about in-place upgrades. | |
BrianH: 22-Oct-2010 | Part of exporting is copying the values to another context, where it is used. You don't normally get any references to the original module words. And part of importing is copying those words again to your own context (for isolated modules and for scripts), or binding to the runtime library. So in practice, the only known contexts that you can update the values in are your own, the runtime library, and the current task's user context. To upgrade other contexts they would need to register with you, and you would have to do them one at a time. | |
BrianH: 22-Oct-2010 | REBOL processes tend to run for years, if they don't have bugs and don't use a buggy REBOL. Do you remember the first mailing list outage? | |
Andreas: 22-Oct-2010 | I say that having followed the discussion around it and read the documentation and posts about it. | |
Andreas: 22-Oct-2010 | And I really appreciate the work you put into it. | |
BrianH: 22-Oct-2010 | The first REBOL mailing list outage happened because the server rebooted. The REBOL process that was running the mailing list had been started manually, and just kept running. They forgot to add the startup code for the mailing list to the init code for the server. But noone knew this because the process just kept running for more than 3 years. It took a UPS failure to stop the list. | |
BrianH: 22-Oct-2010 | OK, most of the discussion of the new module system so far has been in a private world. And the final working system hasn't been released yet. And the documentation is outdated. So pardon me if I say that you should reserve judgement. But still, being to remove the module system with a boot level is a pretty cool feature :) | |
BrianH: 22-Oct-2010 | My first priority was to get the module system working, and fix the slight design flaws that the previous system had (mostly the API of IMPORT). Boot levels are next. | |
BrianH: 22-Oct-2010 | You'd be shocked at how many significant subtleties are tested for in the test code. And that code isn't even complete yet. | |
Andreas: 23-Oct-2010 | And from the hostkit: the long option name actually is "--boot". | |
BrianH: 31-Oct-2010 | Next week, as time allows, I will be reformatting the module system into a loadable script that can work at lower boot levels. This will both be good documentation and allow better testing, for the module system and the boot levels too. | |
Andreas: 31-Oct-2010 | Doing a plain import %module.r from the console only works as expected if the module is named and not private. Unnamed, private+named, private+unnamed modules seem to not work. | |
BrianH: 31-Oct-2010 | Despite what the blog says, unnamed modules are a bit of an advanced feature in the R3 module system. Normally modules should be named. But yes, the bug was in the criteria that determined that private import should be done, and all unnamed modules do the private import method (in alpha 110+ at least). | |
Andreas: 31-Oct-2010 | No, I'm hinting at the most simple and straightforward use. | |
BrianH: 31-Oct-2010 | Do import 'module and you will be fine - the name gets applied. | |
BrianH: 31-Oct-2010 | In order to be fully imported into the system, a module needs a name that the system can use to refer to it by in the modules list. If it doesn't have a name then it can't be reused or referred to later, so subsequent imports will reload the module source and create a new module. And all unnamed modules import privately, meaning that they import into the local context only, not into the system runtime library. This means no variable sharing. | |
BrianH: 31-Oct-2010 | I don't care how someone wants to write their modules or import statements. We have tried to make unnamed modules work as well as we can, given their limitations. However, there is a real difference between the behavior of named and unnamed modules. For most code it won't matter, but if your code depends on that difference then you better make sure it loads the way you want it to. | |
Andreas: 31-Oct-2010 | Let's try again. You wrote "Carl really should stop pushing unnamed modules in those blogs of his." I presume this also refers to: http://www.rebol.net/r3blogs/0344.html Considering this blog post, would your suggestion amount to: - A: using import 'simple instead of import %simple.reb - B: adding name: 'simple to the REBOL header - C: both, A and B - D: neither of the above | |
Andreas: 31-Oct-2010 | Or let's add, E: "Exactly one of A, B, or C", assume you chose E and be done with it. | |
BrianH: 31-Oct-2010 | ...and is released in its working form. That first part is covered already. | |
Carl: 1-Nov-2010 | I've not read the entire discussion... but let's roll back a little. Andreas, simple things should be simple. A REBOL rule. So some points on modules: 1. We've used objects as "a type of module" for many years. Pretty easy. 2. The first thing you do is give them a new datatype, calling it module! But, still basically an object. Easy. 3. Next, you make it clear what is exported... with the EXPORT word or EXPORTS block in the spec. Still easy. 4. Next, you want the runtime system to help keep track of the module. To do that, the module needs at least a name to identify it. Not difficult. From there, you can imagine many other features you might want: versions, checksums, compression, dependencies (needs). You can add quite a lot. But, the more you add, the more likely it's going to get complicated... and few users will understand it, etc. So, for R3, Brian and I agree to a design that provided quite a few features without too much code, but also kept simple things simple. | |
Andreas: 1-Nov-2010 | Obviously someone decided against that simple solution. And I am sure for good reason. | |
Carl: 1-Nov-2010 | The word "sufficient" there isn't quite true. Explicit naming is more powerful... and provides a map as well from name to filename. | |
Carl: 1-Nov-2010 | Brian and I have both used quite a few... but not really cared much for most of them. | |
Carl: 1-Nov-2010 | A110 will release all the code for the module system, and you can browse through it. | |
Pekr: 1-Nov-2010 | I like the idea of not needing to repeat a name = name the module automatically upon the filename. "However, there is a real difference between the behavior of named and unnamed modules." - why? Because someone said there should be a difference? So just not explicitly naming the module means it gets treated the different way? Why? And what was the technical reason to decide so? | |
Maxim: 1-Nov-2010 | modules within modules work fine from A108. I've required this feature in CGR. I am using the named version though (I'm conditioned by slim which also makes this the default and simplest use case). | |
Maxim: 1-Nov-2010 | if the module has a name and you rename the file, it should fail, which is probably what it does already. | |
BrianH: 1-Nov-2010 | Technical reason = because one has a name and the other doesn't. I'm not dumbing it down, it really is that simple. Say you are a module, and I want to import you. It's rather straightforward, I just add your exported words to my collection (how I do that depends on what I am, but that's a story for another time). And then I can use those words, no problem. But what if I don't know whether you have been imported already? Or what if I know you have been imported by someone else, but I want to use you in particular instead of someone who just looks like you? Or what if you have data that you want to share, or resources that can't be used more than once at the same time? Or what if you want to know if a previous version of you was imported already, so you can get that guy's data or resources and take over for him? To do all of these things, you need a way for others to refer to you, a name. If you have a name, I can put you in a collection with other modules and then others can look in that collection for a module of that name and if they find one they can know that it's you. Simply having some way to find you in a crowd makes all of that stuff possible. It really is that simple. | |
BrianH: 1-Nov-2010 | Another trick that I can do if I have a name for you is to just put you in a box and then import you later: delayed modules. If you don't have a name, I can't find you in that box, you look just like all the other delayed modules. | |
Carl: 2-Nov-2010 | Time to show examples of all of what it can do... and get developers using some of this good stuff. | |
Group: !REBOL3 Source Control ... How to manage build process [web-public] | ||
Carl: 28-Oct-2010 | Ok, so the subject of the discussion is how to move the host-kit build and its related processes to a more manageable method. | |
Carl: 28-Oct-2010 | Andreas has some suggestions, and if we can figure out a good way to put this together, it would benefit most developers (at this level.) | |
Andreas: 28-Oct-2010 | I.e. a 'Linux" repository and a "Win32" repository where you manually do merges (or copy/paste) in between will only lead to trouble. | |
Carl: 28-Oct-2010 | Back in a while. Go ahead and post your notes, then I'll reply. Thanks! | |
Andreas: 28-Oct-2010 | And then the automation kicks in. | |
Andreas: 28-Oct-2010 | The same post-commit hook then: - moves the export to someplace public (i.e. another public VCS like Github or Google Code; or simply uploading them to rebol.net/rebol.com), - and somehow notifies anyone interested of the new upload. | |
Andreas: 28-Oct-2010 | And from there on, we can have build bots which pick up any new export and build it for their platform. Build results are reported back somewhere (email, static website on the bots which gets aggregated elsewhere, a simple CGI, R3 chat, ...). | |
Andreas: 28-Oct-2010 | If that's not immediate, you can obviously still use your own build stuff (Visual Studio projects, whatever), and as long as you regularly keep the sources up to date by committing, the builders will notify you anyway if the external build mechnisms got out of sync. | |
Carl: 28-Oct-2010 | BTW, there are no merges between Linux and Win32 files. These are all in the same repository. | |
Andreas: 28-Oct-2010 | Or export into Git and put it on your server or on Github. Or export into Subversion and put it on Github, or Google Code, or .... | |
Andreas: 28-Oct-2010 | And I personally would suggest Git, put that'll take time and effort to get started with. | |
Carl: 28-Oct-2010 | For this release, i'll be making fixes to the posix files, and most of what Steve Solie posted on CureCode. | |
Carl: 28-Oct-2010 | What do you think about soliciting a few inputs from other developers regarding choice of rev control and related issues... because we'll want them to use it? | |
Carl: 28-Oct-2010 | Well, I want to make sure that Brian, Cyphre, Henrik, Maxim, and a few others have a chance to say something... since they're going to be some of the primary users. | |
Carl: 28-Oct-2010 | Also, can you point us to a concise summary of Git usage? I've used CSV and SVN, but not Git. | |
Andreas: 28-Oct-2010 | Use msysgit on Win32 and the packages provided with your system (or build from source) on everything else. | |
Fork: 28-Oct-2010 | ++ git ... and I I think someone has posted this here before. http://whygitisbetterthanx.com/ | |
Fork: 28-Oct-2010 | Github is a good site, but there are a few issues, such as how they do not acknowledge the .r extension as Rebol. I've gotten them to do .r2 .r3 and .rebol however. | |
Fork: 28-Oct-2010 | Gitorious is not quite as "hip" as GitHub but the server code is open source, you can run it on your own machines if you feel like and modify it as needed: http://gitorious.org/ | |
Maxim: 28-Oct-2010 | but msysGit seems to manage all of that into a single download and install, so it seems to not be such an issue. (not like MinGW which requires to use its rather obscure and poorly documented package downloader) | |
BrianH: 28-Oct-2010 | Github is a popularity argument. And a good demonstration of the advantages of popularity. | |
Andreas: 29-Oct-2010 | You realise that you can click on the headings and they expand to show more detail? | |
Fork: 29-Oct-2010 | One of the things I like about Git, and am quite proud of, is the data structures are simple and you can reimplement it if you wish. It's a well-defined data model. There are Git-related projects like GUI tools, for example, with the Eclipse IDE. http://www.computerworld.com/s/article/print/9126619/Q_A_Linux_founder_Linus_Torvalds_talks_about_open_source_identity | |
Fork: 29-Oct-2010 | I've said before that a concrete and vetted reimplementation of an unnecessarily complicated (but popular) tool in Rebol to show how teeny it could get would spark great interest. | |
BrianH: 29-Oct-2010 | Another advantage of popularity is alternate implementations. There are even Java and .NET reimplementations of Git (that are likely smaller than the original Git even if you include the Java or .NET runtimes). | |
Carl: 29-Oct-2010 | To git public comments on using git and github. | |
Andreas: 29-Oct-2010 | The underlying design is extremly pragmatic and simple. | |
GrahamC: 29-Oct-2010 | let's face realities ... r3chat has been in existence for how long now? And there's hardly anything posted to it. | |
Henrik: 29-Oct-2010 | and... not just learn, but install clients for it. | |
Fork: 29-Oct-2010 | Git is not particularly difficult in and of itself, but the model people typically use in GitHub adds a little layer of complexity to it with "pull requests" and things... the good news is that with a little patience and asking the large community for help you can get things going. | |
Fork: 29-Oct-2010 | I really enjoy the GitHub ability to have conversations attached to lines in checkins. (Gitorious has this also.) Fantastic for code review. And because of the way it works where you have to pull in patches explicity, you can review things and have people go back to the drawing board before you'll actually accept the change... | |
Fork: 29-Oct-2010 | There's a wide variety of models you can use. If you really want to, you can authorize people other than yourself with write access to your repository and it then works a little more like traditional centralized source control. | |
GrahamC: 29-Oct-2010 | and of course you can Fork your own repository off the main one | |
Maxim: 29-Oct-2010 | distributed source controls are much more flexible and easy to use than centralized ones like svn. | |
Cyphre: 29-Oct-2010 | I don't have experience with Git(only used Hg) and I have nothing against learning and using it. The only thing I hate about it so far is the lost 1GB!! of diskspace after installing TortoiseGit for Windows :) | |
Maxim: 29-Oct-2010 | once we have ssh on r3 (in whatever form) I think we should be able to build the entire git toolset with REBOL at a fraction of msys stuff. I already did a complete source control system (though with a completely different model) called distro-bot and its hardly 1GB! | |
Maxim: 29-Oct-2010 | rebol in and of itself already does most of the low-level OS stuff... just two days ago... I used R2 as a delete function in order to polish a windows GCC script. this strikes me as a similar situation where rebol could be used to probably replace a sizeable portion of the msys stuff... though it might not be as fast and optimised... that I do concede. |
43701 / 48606 | 1 | 2 | 3 | 4 | 5 | ... | 436 | 437 | [438] | 439 | 440 | ... | 483 | 484 | 485 | 486 | 487 |