World: r3wp
[!REBOL3 Extensions] REBOL 3 Extensions discussions
older newer | first last |
Maxim 20-Jul-2010 [1142x2] | not safelly. while in the command, if you run arbitrary code, the GC might swap the references you have while your in the command. so that when you return values, the data they used to refer ot do not exist anymore! |
man exceptions are quick. more than 4 million adds a second, even though the values are cast to 32 bits and its using a stub (it jumps into a C function from a library) . | |
Graham 20-Jul-2010 [1144x3] | Seems like I should be able to call Qt's sql or network functions |
So this http://doc.trolltech.com/3.3/sql.html#4should work for DB access for R3 | |
But I guess you're going to have to open and close a new connection for each query which is not very satisfactory | |
Carl 20-Jul-2010 [1147x5] | http://www.rebol.com/r3/downloads/r3-host-kit-a101.zip |
And, thank Maxim for his help on testing it. | |
And see my general rant at: http://www.rebol.net/r3blogs/0327.html | |
Ah, I see Graham posted it. Yes, insane. the pressure... was... too... intense. | |
So, now with that out, let me see about getting the posix release too... then one of you can port the graphics to X win. | |
Maxim 20-Jul-2010 [1152x3] | I want an Amiga version... ;-) |
and it has to run faster than the PC version which has a 1000 times faster CPU ;-D | |
funny thing is that getting an amiga version to work probably would take the least time of all OSes... its so clean. | |
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. |
older newer | first last |