« first day (947 days earlier)      last day (2833 days later) » 

8:00 AM
Not sure which build I'm using, though
Could be the original open source build
 
if it's not the one on rebolsource marked as a console build, then it shouldn't be used
 
I'm using r3-view
downloaded a few days ago
 
I don't attach anything. Defining new task does not help - now it starts new task - R3, but not the shell. I want it to start with 2 tabs actually. The settings section is a mess, and was done, well, by a programmer, not a human being ...
 
@pekr defining a task is not enough
 
I need some task group?
 
8:02 AM
on the startup section, choose a tasks file where you would list all the tasks you want started on startup
 
have no task file, so I need to create one in filesystem? They could just add one stupid multiline field for that ...
 
so first define tasks (as I said you will then have the option to select these from a toolbar as well) and then choose a file - yes you need to create it - agree, dumb that you can't choose multiple tasks in a textbox
but remember, tasks can have quite a bit of stuff in them, not just one command
 
the thing is I don't know, how to create it. I can e.g. see rebol console being launched with -cur_console:d:C:|!rebol\!R3 ... that's kind of cryptic, but I expect it being a working dir plus current console
 
One helpful thing is that most controls in the settings have hover help.
 
ok, will try to manage it somehow ...
 
8:06 AM
I haven't tried the task file myself. I assume it's just a plain text file where you have a task name on each line.
7
Q: How do I give each tab opened by a {Task} a custom name?

Charles RoperI have a ConEmu {Task} that opens several tabs, each to a different directory. The trouble is, these tabs all have the same name and are hard to tell apart. I know I can rename each tab by right-clicking it and selecting rename*, but is there a way of renaming each one automatically via the task ...

looks like one task could open multiple tabs...
There are quite a few questions tagged ConEmu on superuser.com.
Hmm, you can split a terminal window so you can see multiple consoles in one tab, too.
 
Frankly, I would prefer that a "normal" Ctrl-D would close the console, than that stupid Q.
But this is just a detail.
 
4
Q: Сonemu: How do I make several console windows in one tab from task file?

doom123How to make several console windows in one tab from task file? I want to make a grid 2x2 of consoles in one tab. I can do it by hands when create new consoles and select "To right" or "To bottom" options. But I want it to be created automatically on start up. Option "autosave/restore opened tasks...

 
OK, it works both ways - having it in separate conemu.txt file, and I found out, that even for a single task, you can use it as a taskgroup, launching multiple commands/consoles. Now the only thing is, that it does not remember names, when I rename the tab
hmm, the solution is: >RenameTab "R3" & C:\!rebol\!R3\r3-console.exe -cur_console:d:C:\!rebol\!R3
 
8:24 AM
make error! [
code: 513
type: 'Access
id: 'Protocol
arg1: {Redirect to a protocol different from HTTP not supported}
arg2: none
arg3: none
near: none
where: none
]
@Vishwas Welcome to the Rebol and Red room. See our FAQ.
 
9:14 AM
make error! [
code: 513
type: 'Access
id: 'Protocol
arg1: {Redirect to a protocol different from HTTP not supported}
arg2: none
arg3: none
near: none
where: none
]
@atLANtis Welcome to the Rebol and Red room. See our FAQ.
 
 
1 hour later…
10:27 AM
@GrahamChiu Just on Call. In Rebol 2 (windows), when using redirection, you could'nt get the output until the command had finished, which meant you could not control an interactive program (one waiting for keystrokes). I eventually worked around that with two slave Rebol processes connected to the master by Tcp and feeding/receiving the called program by piping. Just thought I'd raise it for the Trello task in case people want to discuss that use case.
 
@rgchris new OSX saphir with https is available
@Brett can you do this with R3?
 
11:00 AM
Unfortunately there is still a lot of clean up to do. There are pages like this one where the author has just pasted html into the wiki pages so they need to be converted either manually or by some parse code into the asciidoc format.
Pandoc converted that page into this which turns into this html
 
 
2 hours later…
12:41 PM
@GrahamChiu where is it available?
 
@Henrik thanks. of course when i tried it, it blew up, but we talked about this yesterday:
>> pg: read https://google.com
** Access error: protocol error: "Redirect to other host - requires custom handling"
 
@onetom: ok, I'm out of options, as Robert is the one who makes these, but he still doesn't have access.
 
btw, the /string and /lines refinements still doesn't seem to do anything. why are those are even there in the help then?
 
1:07 PM
(I mean the read/string and read/lines)
 
1:31 PM
@user1671639 Welcome to the Rebol and Red room. See our FAQ. Cool, you have a reputation score of 462 and so can chat to us!
 
@GrahamChiu I assume so, because /input and /output are not used on the call. I'll have to try. Currently travelling on hols, so it will probably take me some time.
 
@onetom the error "Redirect to other host - requires custom handling" doesn't mean HTTPS is not working. It just mean the HTTP protocol is incomplete and doesn't support redirecting.
You would get the same message when accessing normal HTTP only page with such kind of redirection to other host.
The HTTP protocol was written by Gabriele but AFAIK noone did any ehancements to it (except some small changes I did when working on the TLS support)
But there is relatively easy way how to use the HTTP even without the auto-redirection
For example this way:
>> p: open https://www.google.com
>> d: read p
** Access error: protocol error: "Redirect to other host - requires custom handl
ing"

>> to-string p/data
== {<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8
">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="https://www.google.cz/">here</A>.
</BODY></HTML>
}

>> to-string read https://www.google.cz
== {<!doctype html><html itemscope="itemscope" itemtype="http://schema.org/WebPa
As you can see I was able to read the secure page in the end.
You might also check the p/state/info object, namely p/state/info/headers for more information about the redirect.
 
1:52 PM
i was just reflecting on the topic of "why are you still using r2?"
because these small little annoying things are all over the place in r3...
that final touch which gives it elegance is missing from it...
but i dont want to complain; im happy it's open source
 
yes, the more people wil get involved into some 'real work' the sooner we will have more polished R3 available. But I don't count much on that premise. I guess this picture says it all, no matter how big any community is:
 
but there are 37 pull requests... github.com/rebol/r3/pulls
 
yes, the 37 requests has been done be 8 people....I think that's the 1% if we assume the REBOL community have 100people now (maybe still too optimistic number) :)
 
ah, i see there is a "community fork"
 
2:14 PM
make error! [
code: 513
type: 'Access
id: 'Protocol
arg1: {Redirect to a protocol different from HTTP not supported}
arg2: none
arg3: none
near: none
where: none
]
@Andreas Welcome to the Rebol and Red room. See our FAQ.
 
2:48 PM
@GrahamChiu Erk, back to 'Illegal Instruction'.
endeavour:bin chris$ curl -o /usr/local/bin/r3-saphir development.saphirion.com/experimental/r3-osx
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  520k  100  520k    0     0   189k      0  0:00:02  0:00:02 --:--:--  237k
endeavour:bin chris$ chmod 755 r3-saphir
endeavour:bin chris$ r3-saphir
Illegal instruction
 
@GrahamChiu are there many such pages? Do they include other things but tables?
Here's a script that fixes your testdata, and should be easily extendable. So I hope.
 
@rgchris do you have ./ in you $PATH ?
 
Only to a viewable state, not to a nice one so far.
 
@onetom Yes.
 
3:28 PM
wow, on travis ci it takes almost a minute to build r3 travis-ci.org/earl/r3/builds
it's 12 seconds on my laptop on 1 thread and just 5sec on 4 threads. that's crazy fast... no that the 1 minute is terrible, just saying
at my last job, it took more than 5 seconds just to start a rails application... and it was just loading/running ruby scripts, not like optimized compilation to machine code...
 
 
3 hours later…
6:18 PM
make error! [
code: 513
type: 'Access
id: 'Protocol
arg1: {Redirect to a protocol different from HTTP not supported}
arg2: none
arg3: none
near: none
where: none
]
@RobertP. Welcome to the Rebol and Red room. See our FAQ.
 
6:32 PM
so is this still the latest source for rebol syntax highlighting for sublime: ross-gill.com/page/TextMate_and_REBOL ?
 
6:58 PM
@onetom Are you sure that you aren't comparing apples and oranges here? The Travis CI build time includes the time for cloning the R3 repo and downloading an R3 binary to be used as r3-make?
 
@earl good point...
 
7:45 PM
@onetom when you use read or any of the other actions on a url that opens a port scheme, such as http, the action is performed by the port scheme's handler for that action. Unfortunately, the http and clipboard schemes don't yet implement those options (though I am talking about the mainline builds, not Saphiron's).
 
@BrianH thanks, got it. btw, the saphirion one doesn't handle it either
 
@onetom @cypher I submitted a fix for the http error but looks like it has not been noticed
redirect error
@ingo thanks just progressively cleaning
 
@GrahamChiu I'm working on a related problem anyway
 
it all helps!
 
8:02 PM
@earl i second the idea of having 'q defined only in the REPL. a lot of tools use it. vim, less, darcs all understand q.
@HostileFork i was never been bitten by 'q, but i was from it's opposite. world, boron or red - cant remember which one - hasn't defined it and i was keep trying to use it... i don't like ctrl-d too much because if i press it twice, my shell quits too, but otherwise i expect ctrl-d to work too.
 
8:15 PM
I never use ^D, since I'm not often on platforms where that key sequence has any meaning whatsoever. However, I use q in many tools for that purpose, and it always annoys me when it doesn't serve that purpose - mostly Linux, OSX and Windows console command lines. But having it load in just the REPL would be OK, if possibly a bit confusing to people who would expect it to be defined in scripts as well.
 
8:29 PM
@BrianH In R2 one could patch schemes in memory. Possible still in R3 or does the module security system stop that?
 
@GrahamChiu Yes, working on it.
(Not sure I understood your "or are you happy to leave it" remark.)
 
@GrahamChiu the module security system doesn't change that kind of thing, but patches are a bit more heavy-weight in R3 than they were in R2. Look at my rebol-patches collection to see the method. Basically, you can't patch functions in place, but you can use the reflectors on functions to get a unbound copy of their code, which you can adjust, rebind, and use to create a new function that you can assign to the places where the old was assigned.
Someone who wanted to lock things down using module or other security methods would be able to do so, but for the most part that just doesn't happen. It's only worth the effort on code that is meant to be secure, such as the SECURE function. Most code is patchable.
 
@earl I mean to leave it until there is some concensus built up, committtees formed etc on community control of what gets accepted etc
 
@GrahamChiu It's already merged.
 
The rebol-patches collection also includes, in its README, a tutorial on how to patch code in R3, and how the process is different than in R2.
 
8:37 PM
@earl Is there a new build that I can download then? I presume if so, then it includes your redirect patches?
@BrianH where is it?
 
@GrahamChiu No build yet, no. Working on that, as mentioned before.
But you can of course build rebolsource/r3 yourself.
 
The actual patches themselves might be a bit outdated, at least for the open-source builds. It's on my todo list to improve misfeature-detection, since for the open-source builds version numbers don't matter. When I do the patches collection for R2, versions will be a lot more important.
 
So, does this work also for bitsets and other stuff that are defined in the modules? How do you access those?
 
@GrahamChiu stuff defined in modules isn't hidden unless you declare it to be, or use other methods of hiding. Exporting doesn't make it visible, it actually exports it to lib. All words in the module context that aren't hidden can be accessed if you can get a reference to the context. For regular named modules, access to the context is as simple as using IMPORT. However, schemes are a lot easier to patch because they are referenced through the system object.
 
8:46 PM
I'm interested in reusing functions and bitsets defined in modules so we don't have to redefine them
 
@GrahamChiu by "reusing" do you mean in patched functions replacing functions in modules, or do you mean in general?
 
reusing in general .. eg all these bitsets github.com/rebol/r3/blob/master/src/mezz/sys-ports.r#L80
 
You can rebind patched functions to their original modules or other contexts, making a new function that was bound the same way as the original. That kind of thing is done for system functions in rebol-patches, but the same method works with module functions. For bitsets, no rebinding is necessary.
@GrahamChiu that function/object is accessible through the sys context.
 
Probably not a good example .. I just got up
 
@RebolBot do words-of sys
 
8:51 PM
; Brought to you by: tryrebol.esperconsultancy.nl
>> words-of sys
== [native action do* make-module* boot-banner boot-help boot-host boot-mezz boot-prot boot-exts export assert-utf8 make-port* *parse-url decode-url make-scheme init-schemes decode encode encoding? intern bind-lib export-words mixin? load-header load-ext-module load-boot-exts read-decode load do-needs load-module import start]
 
Perhaps I remember wrong but there might be some anonymous contexts that I wanted to recycle parts from
 
Sorry, I don't have a working R3 right here, so I'll have to demonstrate with RebolBot.
 
that is what she's here for
 
@GrahamChiu R3's security practices are based around preventing the leakage of bindings to those who you don't want to access them. There are various ways to hide those bindings, such as PROTECT/hide, USE, the HIDDEN keyword, or other methods that work in R2 as well. The security mechanisms that are new to R3 are built around making it easier to prevent context leakage, if you want to. That is why BODY-OF function returns an unbound copy of the body, not a reference to the original.
However, just because a context is anonymous doesn't mean that you can't get access to it somehow. It might be indirectly referenced, for instance. It's not truly secure unless someone has made it so on purpose, as they did in the SECURE function. Or maybe it's secure by accident, who knows? Patching is tricky stuff.
Now, as for the bitsets in *parse-url and such, making them reusable is a good idea. Randomly grabbing them from some predefined source is not so much a good idea, since it is depending on code and data that was not designed for reuse, and so might change out from under you. This kind of reuse is exactly what utility modules are for: Make a module that exports a bunch of bitsets, directly or indirectly, there to be reused.
It's all well and good to be grabbing stuff from unexported module variables or internal contexts like sys when your purpose is to patch things in place, since that kind of activity is supposed to be dependent on a particular situation, and so would not be expected to apply in general when that situation changes. But general reuse is another matter: Do it properly.
 
9:10 PM
Bitsets module ... feel free to add to this trello.com/card/…
Once that is agreed on, we can write those other functions to reuse and not redefine
 
Good to know it's on people's radar. And I hope that the various changes that url parsing needs, native and mezzanine, are still on people's todo lists as well.
 
Bitsets module is a good idea, also to shake out some basic usage patterns / practices.
I think it should be delay-loaded.
Then the question arises: what's the recommended usage pattern?
 
For modules like this package of bitsets where if done as direct exports would spam lib with many words, should we start a convention of just exporting the module's own context by its own name instead? It wouldn't need support in the module system itself, necessarily, it could be as simple as putting export module-name: self in the top level code block of the module. And even that module could be private.
 
Exactly the question I had in mind :)
 
9:25 PM
@earl utility modules are usually best made as named private. Then they only get loaded once, and their exports only get imported where the module is requested by name. They can be delay-loaded as well, in cases where the system itself isn't using their facilities (in which case there would be no point).
 
@BrianH Everything is best made named private :)
Quick module Q: how can I create/register a delay-loaded module dynamically?
(Or is that even the wrong question to ask?)
So far I have:
module [name: 'bitsets] [digits: charset "0123456789"]
What do I need to afterwards import 'bitsets w/o error?
 
@earl actually, that is not necessarily the case. For instance, I tend to make rebol.r unnamed private. There are all of these different combinations because different ones are better suited to different situations.
 
@BrianH Exception proves the rule.
 
@earl people forget that in the case of that phrase, the old meaning of "proves", meaning "tests", applies. Those exceptions test the rule, and often the rule fails those tests.
 
In the case of that phrase in German it's proves as in "approves" (or "confirms").
 
9:31 PM
Actually, no, it really doesn't mean that at all. It really does mean tests. The modern misunderstanding of that phrase is really damaging.
Back on topic :)
Let's answer all of your above questions by rewriting that module source using all of the practices we suggested above.
 
You want to tell me that I don't understand German :) ?
 
@earl the phrase is English :)
 
The phrase I wanted to use is obviously German :)
And the more accurate (as far as "meaning" goes) translation is "No rule without exception."
 
@earl which leads to the damage. The original meaning of "exceptions test, and possibly invalidate, the rule" more reflects the way science actually works. Rules with exceptions are underspecified, or wrong, unless the exceptions fit within the overall structure of the rule. Which strangely enough in this case they do, since every combination of options in R3's module system leads to a type of module that is explicitly supported and has known uses :)
(trying to swing it back on topic :)
 
This explosion of combinations is part of the problem of R3's module system.
And the German saying stems from a very practical background, not scientific at all (but in a nice way also deeply acknowledging the value of the scientific method) which is why it's very applicable to this particular case.
So, now how do I dynamically register a module?
 
9:42 PM
@earl (replying because I have to cut code to the clipboard whenever you continue the side topic) The main problem is that the requirements for a module system in this kind of situation - general-purpose scripting language with a range of uses - are inherently contradictory. We need different kinds of modules for different situations. You see this in other module systems that have to serve the same range of needs.
 
@BrianH A good design (partly) dictates the needs it wants to serve.
 
@earl keep in mind that I can't run R3 on this computer (a Mac), and it's been a while, so I need to try to remember the methods from when I last did this. Sorry, my only R3 is RebolBot at this moment. And these side arguments are making it difficult for me to write the code that answers your question.
@earl did you read the articles I wrote on the subject? The R3 module system does, in fact, dictate the needs it wants to serve. However, those needs are primarily those of making a system that can run scripts written by people who shouldn't have to know that R3 is modular and multithreaded underneath, until they do. This is "progressive reveal". The main purpose of "regular modules" is managing lib, which is used as the source of knowledge for scripts and modules alike.
The more advanced stuff, like private and/or isolated modules, is supported for people like you who can handle the tricky topics.
 
@BrianH It dictates very little, and tries to serve far too many masters.
 
Damn, now I lost the code that answered your question. Have to start over.
 
I'm not sure how I feel about a module system that thinks that "named private" modules is advanced stuff that needs progressive reveal.
Also, why does just adding the minimal amount of code necessary to answer my question take so much code that it can be lost over and over again :) ?
 
9:55 PM
Modules at all are advanced stuff. And scripts are meant to pretend that R3 is single-tasking too.
 
That is probably the most concise description of what I consider the fundamental design flaws.
 
@earl if you've seen my wrist, you'd understand how much of a bother typing is. Which makes my wordiness ironic, I suppose :)
 
Just drop me a bone, then :)
(And I hope your wrist will get better soon!)
Type: 'isolate-or-whatever-its-called-these-days?
do on the created module!?
 
@earl not likely, it was damaged in 1986.
 
Ah, so typing is a bother in general?
 
10:00 PM
Yes. So much so that it has shaped my entire approach to computers for most of my career.
 
Then I can indeed see the irony :) (And I'll slow down a bit.)
 
First of all, the main problem with delayed modules is that while sys/load-module supports them fully, we never came up with a high-level mezzanine to support loading them because the usage model was supposed to emerge as the module system was used, but the resolve bug killed the module system for years so it was rarely used.
So if you want to delay-load modules, you currently have to use sys/load-module to do so. Same goes for embedded modules, actually.
Given that, there is still a standard method for indicating that you want your module delay-loaded: the delay option.
You can also use sys/load-module/delay if that option isn't specified - it's the same thing.
 
options: [delay] ?
 
Yup. Use the same options block for the private option, or any others you want to use.
 
Modules I declare dynamically are not private by default?
 
10:10 PM
@BrianH here's a guy who's developed a workable voice-drive programming environment. Maybe you could do something similar.
 
@earl Unnamed modules are private by default, because you need a name to implement the method for not being private (it's an unavoidable semantic constraint). Named modules aren't private unless you use the private option, or some of the /no-* options of IMPORT.
 
Worth watching this - he's got some pretty creative ideas for how to structure the voice commands.
 
@Adrian thanks, I'll watch that later. Actually, that is part of what got me into programming language design in the first place.
So, here is the collection of techniques that you can do to make a utility module that exports a ton of stuff without spamming lib with a ton of names:
sys/load-module module [name: bitsets options: [private]] [
    digits: charset "0123456789"
    export bitsets: self
]
; later on in a script
import 'bitsets
parse "0123643" [some bitsets/digits]
 
Ah, funny timing :)
 
If you are using the module function, the delay option has no effect. The delay option delays the construction of the module, but since the module function already constructed the module there is no point in delaying it.
 
10:20 PM
And sys/load-module does no automatic importing in either case?
 
The private option is the one that puts off the exporting of the module's exported words.
 
Understood, thanks.
And I guess sys/load-module is so low-level that it doesn't know/care about the user context at all?
 
The delay option is mostly useful for modules or extensions that were preloaded from source, either in the build or in rebol.r or some other prep code. With that option, only the header is parsed, not the rest of the script.
 
What's the body of the module parsed for, for private modules?
 
@earl sys/load-module just manages lib and system/modules. The user context is managed higher up.
 
10:29 PM
presumably to save typing in your script you'd just use

digits: bitsets/digits

etc
 
@earl there is the standard parsing of the Rebol source into Rebol data. But then when a module is created by make module!, the top level block is parsed for the export and hidden keywords, so that they may be handled before the module body is executed. It's no different for private modules.
The main difference for private modules is where the exports are exported to, that they don't go through lib. Because they don't go through lib their exports are put off until the module is imported by name, an event that signifies to the system that you want their exports. But they still have stuff exported.
@GrahamChiu or you could bind your rules to the bitsets context, or any number of standard Rebol tricks. Module contexts are just objects once they're built, like most other contexts. Different datatype, same thing underneath.
You're not just saving typing by accessing stuff by bound word instead of by path, you're also saving path evaluation overhead. So there is definitely room for optimization there.
Now keep in mind, if you go full-modular and just use private and isolated modules, you can pretty much give up on overriding, hot-patching or hot-upgrading anything. There are a lot of real benefits to using lib, not just supporting scripts. There was a lot more thought put into the lib model than you might think at first.
It's the isolation that makes patching or upgrading difficult, though making modules private makes the problem worse. The user context can get away with isolation because it is referenced globally, so you can update stuff in it. Private imports in modules though can't be as easily tracked down and updated, so your modularity comes with a price.
 
10:49 PM
Is a private, named module also isolated by default?
 
Nope, it is otherwise regular. The isolate option affects the import model; the private option affects the export model. They're kind of not related. The name doesn't affect isolation either.
 
Good.
 
Module isolation is really for very special cases. Mostly for porting code from Gabriele's or Maxim's module systems for R2.
 
So basically the missing piece of the puzzle is selective imports (and maybe a slightly more flexible import mechanism in general).
Last time I tried to build a selective import facility, I tripped the latest RESOLVE bug. With that resolved, I guess I could try again.
 
Selective imports on a per-module basis are what private modules are for. But on a more fine-grained basis, importing just particular words, you currently have to resort to calling the import function and doing things manually. And I would welcome any feedback on changing such things. I'm already thinking through better ways of doing versioning, inspired by bundler among other things.
The main thing is that normally you would be exporting through lib, and selective import from lib requires a bind option that doesn't yet exist. It is easier to do selective import from private modules, because that is done with resolve, and because you actually make reference to these modules at all.
 
11:02 PM
Normally: named, private, non-isolated modules.
Combined with a slightly more flexible import.
That might be a best practice and default usage I could endorse :)
 
Normal modules extend the system (the runtime library) with their exports. It is as if their exports are built into Rebol, as far as the code using their facilities are concerned. You don't even have to know that they're there, or that Rebol is modular. That is Carl's model.
Private modules require more work to use, such as import statements, and they have limitations.
 
Needs headers, which you'll mostly need for "normal" modules anyway.
(Or can't private modules be imported via a Needs header?)
 
@earl Actually, no, not really. You only have to import normal modules once in an app. The individual modules and scripts that make up the app usually don't need to have Needs headers, unless they are using private modules. That is what the lib model gives you.
 
@BrianH If you have time, it would be useful if you could collect the various writings you've done on modules into one document that we could place into the new documentation system. I can accept anything that pandoc can convert to asciidoc. And then we can make it more concrete for those of us who can't cope with too abstract descriptions!
 
@GrahamChiu most of those have been collected into SO answers. Otherwise, it's mostly in chat. The standalone docs I wrote weren't updated to reflect the alpha 108 revamp. It's on my todo list.
 
11:09 PM
@BrianH Yes, just what I said: "once in an app" you'll mostly need a Needs header (or just rely on that the modules you want are built into the interpreter build you use).
 
Fork is not online at present .. so I guess I can say, that's not ideal .. I'd rather we collected docs into a rebol doc repo.
 
@GrahamChiu Well, we can easily reuse the SO answer as it's Markdown.
 
@earl And merge the information from chats?
 
@GrahamChiu Someone eventually will have to bring that into a coherent form, yes.
Fortunately, I think that I slowly see a pretty solid default recommendation coming up (which can then be put into writing).
 
That someone needs to be familiar with the topic!
 
11:13 PM
@earl part of the goal of the system is to make it so you only need one Needs header (or IMPORT block) in your app to be able to specify all of your dependencies. Most module systems don't have the ability to be that simple to use. It makes it simple enough that even people who aren't used to strong modularity can make Rebol apps. Of course you can make your app more complicated if you like, but you don't have to.
 
@BrianH I don't consider that simple/complicated but more like dangerous/sane.
 
@earl I want it to be at least as simple as a Gemfile in Ruby. It was better when we made alpha 108, but they have improved since then.
 
@BrianH I think I understand, but that's a slightly different concern.
Gemfile is mainly about packaging. That's related, but still different.
And I'm very fine with having something at least as simple :)
 
@earl not really. The module system is a way to help you organize and build apps. If you want to make your apps more structured and rigid, that's up to you, it supports that. It also supports a looser approach, or a more unified approach.
@earl I have literally spent most of the last month fighting with Ruby's app packaging and module system, so I know its strengths and weaknesses. We can adopt the strengths that apply to Rebol, but we don't have to adopt the weaknesses. I've studied the module systems of a couple dozen other languages as well.
 
And you found a system held in high regard that uncontrollably and pervasively pollutes the single global namespace?
 
11:24 PM
@earl not uncontrollably, and not pervasively, at least not in R3's case. But you have not really been using it for most of your Rebol work, and you've been using app packagers and preprocessors that haven't been using it either, so you haven't really considered its strengths. No offense intended, not your fault, it was that damned resolve bug that has been killing Rebol PITL.
If it wasn't for that resolve bug we could have fixed everything by now. Instead, Saphiron has been working around the module system, instead of taking advantage of it, enhancing it and fixing it.
Just a delay though.
 
@BrianH I've been considering it's strengths a lot. Just looking for a sane default usage pattern to recommend.
(But I'm pretty sure we've that basically figured out.)
 
I have been working towards that. Well, more like intending to work towards that, while I've been moving to SF and getting started in a new job, but you know what I mean :)
 
If I have liquid done for R3 (in time for the devcon), we'll have slim for R3, which may be what Earl is looking for. I will probably piggy back over modules. all of my apps use strong modularisation which doesn't use exporting from a module, but importing from it. its a different, safer, but a bit more rigid system.
 
@BrianH copied your initial doc to https://github.com/gchiu/rebol.net/blob/master/Overview_Rebol3_Modules.md here so feel free to add to it.
 
Rebol does what I once wished Lisp did
 
11:33 PM
I left it as markdown if that's what you're comfortable with.
 
Here's the thing: Carl has specified a module system that is really easy to use, especially by people who aren't used to strong modularity (most programmers), and made it possible for people to extend Rebol in a relatively clean way for use by such people; these are the "script" and "regular" module types, respectively. But people who want strong modularity or even more advanced tricks can use the options do their thing.
 
Can I use a script written by someone not so great with modularity in my own programs that do the modularity stuff heavily?
 
my issue is that the modules themselves don't seem to offer mechanical differences beyond what is coded in the mezz code... unless its changed since I looked last time.
 
@Sgeo If you IMPORT a regular script, it is treated as a module. You can also use some IMPORT options to make it behave better, if you like. Most of the stuff you can specify that your module should do, you can make someone else's script or module do from the outside.
 
The problem I see is in the defaults.
Just as FUNC without automatic locals quickly becomes an annoying default, the "let's pretend modules don't exist" default quickly becomes annoying.
 
11:40 PM
@moliad the mezz code was intended to be organized into modules, so that's not surprising. And was written at a time when only mezz code could be contributed from the outside so it is itself mezz code. This may change in the future - I already see opportunities for native enhancement. Still, it's not bad that it is mezz code, it makes it more replaceable by advanced people like @earl who actually have heard of modules.
 
@BrianH As long as I can force a misbehaving script to behave, I'm happy
Well, no
I have a lot of other conditions before I become happy
 
@Sgeo Even if that entails a lengthy prologue each and every time you want to use a third-party lib? :)
 
@earl How lengthy are we talking? Also, it's REBOL, surely someone could write code to simplify things?
 
@earl the module system is made to make it easy to write libs cleanly. It is slightly less easy to use libs that are not written cleanly, but that would be the case regardless.
 
@Sgeo Quite lengthy. Which is exactly why a slightly more flexible import facility is needed.
 
11:45 PM
@earl Ah. I haven't actually looked at the proposed system yet
 
@earl simply by being in the Needs header, it is treated as a module. And you can give it a name there too. For more advanced tricks you have to use IMPORT though, because the more advanced tricks affect the semantic model pretty thoroughly and can break code more quickly.
 
@BrianH Basically, what I have in mind boils down to a Needs that would enforce the imported module to be private per default, and also allows for selective imports.
Ah, but then the module itself could still do unclean imports, probably. Well, needs a bit more experimentation.
 
For instance, it is easy to make a module private if it is designed to be private, and it is easy to make a regular module manage the state in the runtime library that it is built to manage, but it is trickier for a regular module to react to being made private - it often breaks them completely. Private modules are great, but they are a different model, and often have to be programmed differently.
 
earl, you might want to look at slim's model. the version on rebol.org isn't up to date, but the most recent versions I use (which I keep improving every few months) are probably exactly what you are thinking of.
 
@moliad And how would I know if the most recent versions you use are exactly what I'm thinking of? Where would I obtain then?
 
11:52 PM
@earl the only difference between regular and private modules is whether they involve lib in their exports. There is nothing illegitimate about private modules - they are trickier to use, but if we didn't want them to exist the system wouldn't support them at all. However, any code can make other changes as well, or change even lib on purpose. For that matter, installing a scheme is an example of a potentially untidy change. You can't avoid that stuff by being private.
 
a module by itself does not decide what it exports. only the loader of the module is "allowed" to do that, furthermore, the loader can rename the stuff on the fly, allowing two modules to use the same names internally without causing issues by loaders of the modules. when there are updates, there is no linkage code or module fixing.
 
@moliad I definitely want control over the exports as well as over the imports.
 
@moliad Installing a scheme should be made into a tidy change
Somehow
 
And preferrably, without having to wrap my private words in e.g. USE [...] [...] inside my module.
 
I don't update my stuff much on rebol.org, cause basically, no one uses it, so after some time, I just stop trying to maintain stuff publicly, its just a lot of effort.
my module system currently grabs all set words and makes them private, whether you inteded them as such or not in the functions, they end up private in the module, even if using FUNC. its not perfect, cause there is no native code behind it to mechanically protect it, but as long as you're not trying to break it on purpose, it makes your code much more locked.
 
11:58 PM
@earl have you tried the hidden keyword? Works great, no USE required. But you need to consider that most of the words you use will need to be function-local anyway, just for task-safety.
 
@BrianH Yes, I'm fine with the export control in R3.
 

« first day (947 days earlier)      last day (2833 days later) »