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

World: r3wp

[!REBOL3 Extensions] REBOL 3 Extensions discussions

Graham
20-Jul-2010
[1127]
As for flooding curecode with tickets ... I've already offered my 
Jira instance to be used until the hostkit has been stabilized
Maxim
20-Jul-2010
[1128]
my extension building engine will probably be released tomorrow. 
  its currently building extensions which are 100% functional.


now I will add more types and implement the command interface directive 
so that we can mutilate how C code is bound on the REBOL side.
Graham
20-Jul-2010
[1129]
So, Robert .. where is the A101 build?
Maxim
20-Jul-2010
[1130x2]
Carl has to merge some of my fixes first.
cause right now you can't compile extensions as DLLs... a small side-effect 
of the implementation of pair floats.... just related to linking.
Graham
20-Jul-2010
[1132]
Eh??  Of course you can compile extensions as DLLs... that's done 
outside of Rebol. But A101 won't allow you to use them any more?
Maxim
20-Jul-2010
[1133]
no the hostkit release broke this capability when you compile the 
DLL, there is a problem in the order of #include... but its fixed, 
will be part of release... which Carl has confirmed is happening 
very soon (probably today)
Graham
20-Jul-2010
[1134]
So A102 is out today?
Maxim
20-Jul-2010
[1135x2]
it will be v101
and yes probably, but I can't talk for carl, but he seems commited 
to doing it.
BrianH
20-Jul-2010
[1137]
Carl is doing the release because Maxim committed to doing the testing. 
This means Maxim gets the prereleases, and we get the releases.
Maxim
20-Jul-2010
[1138x2]
its funny because the #include bug left me in rage as I was trying 
to fix my makefile (I'm VERY poor at this stuff) .


but 2 hours later, editing my scripts, makefiles and stuff, I can 
say that I've grown to understand make quite well... 

so this bug ended up being a good thing  :-)
I feel like this release is my own pet release... Carl added the 
object! handling in extensions just for me... so I felt a certain 
responsability in working with carl to test it.
Graham
20-Jul-2010
[1140x2]
Is the only way for an extension to communicate back to r3 is by 
altering the frame parameters?
Is there no way for an extension to call a R3 function?
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
[1175x2]
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.