World: r3wp
[!REBOL3 Extensions] REBOL 3 Extensions discussions
older newer | first last |
Graham 20-Jul-2010 [1155x4] | And least useful too |
If you import one extension which has an exported function such as test and then import a different extension which has the same test function, it only recognizes the first. | |
Also how do you "unload" an imported dll? | |
Are extensions imported into the global namespace? | |
Maxim 20-Jul-2010 [1159] | only if the commands are in the export list. |
Graham 20-Jul-2010 [1160] | Are extensions imported into the global namespace if they appear in the extension's export list? |
Maxim 20-Jul-2010 [1161] | the equivalent of it, yes IIRC |
Graham 20-Jul-2010 [1162] | that's a drag |
BrianH 20-Jul-2010 [1163] | That's what makes in-place updating and manual conflict resolution possible. |
Maxim 20-Jul-2010 [1164] | no... just dont export them and do this: lib: import %r3-test-extension.dll lib/my-command arg arg arg |
BrianH 20-Jul-2010 [1165] | That's the other part of the design. |
Maxim 20-Jul-2010 [1166] | its nice that the extensions use a module to negotiate the access of a lib. can we force an extension not to export anything? |
BrianH 20-Jul-2010 [1167x4] | Sure. |
IMPORT/only does that. | |
I am not aware of whether external extensions can be unloaded. I would hope so, because they can in theory be upgraded. | |
It's not a problem with host-embedded extensions because they are not dlls in the first place. | |
Graham 20-Jul-2010 [1171] | I notice that as long as my r3 instance is running, the dll I imported has a file lock on it. |
BrianH 20-Jul-2010 [1172x2] | Did you remove all references to the extension? If there are any references, the dll shouldn't be unloaded. There's no unimport function, so try LOAD-EXTENSION, then throwing away what it returns, then recycling. |
LOAD-EXTENSION doesn't import, it just loads. | |
Graham 20-Jul-2010 [1174] | I unset the function I imported |
BrianH 20-Jul-2010 [1175x3] | It is still referenced in system/modules if it is imported. Start over, just LOAD-EXTENSION (ignoring what it returns) and recycle. See if the DLL is still locked. |
Fot that matter, unsetting the function wouldn't work unless you unset it in both the user context and the exports context. | |
There is one global exports context. The separate user context is task-specific. Plus each module has its own context. | |
Graham 20-Jul-2010 [1178] | RobertS, I built mine using MinGW .. didn't try CygWin |
Carl 20-Jul-2010 [1179x2] | Graham, you might want to read some of the docs. Helps. |
For example, in the case of two modules with same function names, you can use a direct reference to clarify which one you're referring to, or bind your code to a specific module. Easy to do. | |
BrianH 20-Jul-2010 [1181] | Carl, do external extensions unload on recycle if there are no extant references? |
Carl 20-Jul-2010 [1182x2] | Also, every extension owns its own namespace, same as modules. |
There's no unloading, but it's possible, however, very low on the todo list considering that most extensions are long-lived. The locked DLL G refers to above is because the code segments are loaded. (That's more of an OS implementation issue, a poor one IMO.) | |
Graham 20-Jul-2010 [1184] | I've read all the docs .. as to whether I remember the content, that's a different issue |
Carl 20-Jul-2010 [1185x2] | So, the next thing on the big todo list is: C-to-R callbacks. |
Has anyone thought in detail about what is wanted for callbacks, or is it just a general idea that is wanted? | |
Graham 20-Jul-2010 [1187] | Not in detail ... |
Carl 20-Jul-2010 [1188] | Also, on the list is to add BrianH's change, in fact that probably should be A102 by itself. |
BrianH 20-Jul-2010 [1189] | Maxim has given it some thought, but his thoughts are not task-safe. |
Graham 20-Jul-2010 [1190] | When are tasks on the table? |
Carl 20-Jul-2010 [1191] | Anytime you want. |
Graham 20-Jul-2010 [1192] | Sounds like tasks should preceded callbacks then |
BrianH 20-Jul-2010 [1193] | We have tasks now. Just because they don't work properly doesn't mean they're not there, and certainly they need to be a consideration eventually. |
Carl 20-Jul-2010 [1194x2] | What has to happen is to review the additions that have been made sense tasks were first added. |
That is, classify globals into thread local or not. | |
BrianH 20-Jul-2010 [1196] | And to review the existing task-related tickets. |
Graham 20-Jul-2010 [1197] | If I bring up a GUI in Qt or something .. I'll need a way to call rebol from the GUI as otherwise I have no way of communicating except on exiting the GUi |
Carl 20-Jul-2010 [1198] | That's a messaging request. |
Graham 20-Jul-2010 [1199] | ( Unless QT is wrapped .. like AGG is ) |
Carl 20-Jul-2010 [1200] | So, you could use a socket or IPC, etc. |
BrianH 20-Jul-2010 [1201] | You probably can't wrap Qt like AGG. It would be easier to wrap R3. |
Graham 20-Jul-2010 [1202] | Isn't Rebol blocked by the extension though? |
AdrianS 20-Jul-2010 [1203] | don't know if this has been discussed wrt callbacks, but it would be good to be able to call back into REBOL for purposes of controlling execution, say for debugging from a non REBOL editor/IDE |
Carl 20-Jul-2010 [1204] | That's more of a reverse callback, right? |
older newer | first last |