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
17-Jul-2010
[1020]
As you can see here .. Max took it upon himself to do something about 
swig R3B0L support http://www.rebol.net/cgi-bin/r3blog.r?view=0231
Steeve
17-Jul-2010
[1021]
Ok, we can sign the 1 billion contract now
BrianH
17-Jul-2010
[1022]
Has every group become the Humor group now? My grandma would say 
we are getting punchy :)
Graham
17-Jul-2010
[1023x2]
I guess we have to prove we're not a joke ...
Jocko, I was able to compile your tts example under visual studio 
express 2010 but with a lot of difficulties :(  
Size of the dll was 19.5 kbs vs your example which is 8.5kb
Carl
17-Jul-2010
[1025]
Maxim: Get and set of object fields has been added to the extension 
API in A101. So, great things can happen now?


But... before A101 is released I need a decent test for extensions, 
and Robert will be coordinating that project.
jocko
17-Jul-2010
[1026]
Graham, did not visual studio 2010 convert properly the visual 2008 
project file to visual studio 2010 ?
Graham
17-Jul-2010
[1027x3]
I had to do this http://jira.rebolsource.net:8080/browse/REBOLKIT-6
Maybe one would have fewer issues with using profession visual studio 
2010
@Carl, the chicken came first!  So, just give us the A101 download 
link
BrianH
17-Jul-2010
[1030]
It's not done yet.
Graham
17-Jul-2010
[1031x2]
Anyone want to try this?


write %cimgtest.dll read http://www.compkarori.com/r3extend/cimgtest.dll
secure [ extension allow ]
import %cimgtest.dll
test
This loads up the C++ CImg Image Processing library and prints "hello 
world" in purple
BrianH
17-Jul-2010
[1033]
Good to hear that the ban on directly importing extensions from URLs 
is still in effect. It's a good rule.
Graham
17-Jul-2010
[1034x3]
Eh?  Didn't try that ...
Shame shame ....
Now to see if I can get tetris up and running
BrianH
17-Jul-2010
[1037]
It's good, really. It means that you can secure a sandbox and still 
allow extensions, just by prohibiting writing to disk.
Graham
17-Jul-2010
[1038x2]
Here's another test 
download  http://www.compkarori.com/r3extend/img.zip
unpack it
run the r3.exe

secure [ extension allow ]
import %3d.dll
test

and it shows a 3d figure you can rotate with the mouse
How to simulate argc, argv .. I guess we just read the frame
BrianH
17-Jul-2010
[1040]
Except there's no way to call or declare commands with argc, argv 
style of arguments in REBOL.
Graham
17-Jul-2010
[1041x4]
Source to the 3d rotation demo http://rebol.wik.is/R3_Extensions/CImg_3D_Scene_Rotation
Someone know why we are still using AGG 2.3 from March 2005?    2.4 
still used the BSD license
There are changes in the design, files, and interfaces are made, 
so that, you will have to spend some time for migratintg your applications. 
I tried to maintain is as painless as possible, but still some concepts 
have changed. There some files were removed from the package, but 
not functionality.
 - probably ...
@brian .. what I meant was that many of the C programs I've come 
across use argv, argc in main.  Instead i would pass these parameters 
in the function that is being exported.  Just need to rewrite all 
those c functions that access argc, and argv
Carl
17-Jul-2010
[1045x7]
Graham: host-args.c -- clean and easy to modify or replace with what 
you need. And special args can still be passed in the arg struct 
if R3 needs it.
Ok, so there's a new R3 sitting here on the shelf drying out waiting 
for some better testing.
Has some useful new ext funcs:

	void *(*make_block)(u32 size);
	void *(*make_string)(u32 size, int unicode);
	int (*get_string)(REBSER *series, u32 index, void **str);
	u32 (*map_word)(REBYTE *string);
	u32 *(*map_words)(REBSER *series);
	REBYTE *(*word_string)(u32 word);
	u32 (*find_word)(u32 *words, u32 word);
	int (*series_info)(REBSER *series, REBCNT what);
	int (*get_char)(REBSER *series, u32 index);
	u32 (*set_char)(REBSER *series, u32 index, u32 chr);
	int (*get_value)(REBSER *series, u32 index, RXIARG *val);

 int (*set_value)(REBSER *series, u32 index, RXIARG val, int type);
	u32 *(*words_of_object)(REBSER *obj);
	int (*get_field)(REBSER *obj, u32 word, RXIARG *val);
	int (*set_field)(REBSER *obj, u32 word, RXIARG val, int type);
Also, the API is now auto-documented -- within the reb-ext-lib.h 
-- including special tips.
So, this will be A101.
To be released once we have a volunteer to write some tests for it.
(And no, we'll not just dump it to the group, because I don't want 
to flood Curecode due to non-tested status. Best to wait on it.)
Graham
17-Jul-2010
[1052x3]
Carl .. exactly how many posts regarding the hostkit have been made 
to curecode?
I presume curecode has a view filter too
Two ... one in May, and one in April 2010
Robert
18-Jul-2010
[1055x5]
Call to Community to help us get the next host-kit released:
We need a way to test extensions with each release.


Tests need to be able to handle normal extensions as well as embedded 
extensions (because the difference is only a few #ifdef statements.)

There are a few "dimensions" to test the basic mechanisms:

1. some commands (in a named extension module)
2. commands that use and verify all possible argument datatypes
3. commands that return all different datatypes
4. defining and setting words (variables)
5. accessing values in a block

6. accessing values in an object (new feature, but this is one reason 
why we need the test)

I'm sure there are a few other misc items.


We think that the entire tests can be generated with a REBOL script, 
and save a lot of typing. However, that's not a requirement.
I will release our test-framework, which should be used as base or 
as resulting format.
This is a simple to use test environment that can automatically run 
thousands of tests.
And, of course the host-kit that needs to be tested needs to be released. 
IMO we will release a RC to get feedback on the extension part.
Graham
18-Jul-2010
[1060x3]
Don't you release and then test?  Isn't this back to front?
What's the reason that the Linux host-kit has not been released yet?
I'm guessing most people are not on windows but other platforms
Robert
18-Jul-2010
[1063x3]
Really? I think let's first get the Windows version done, than the 
Linux.
Windows is there, so no reason not to use it for testing.
Published the test-framework on www.rm-asset.com
Maxim
19-Jul-2010
[1066]
Carl thanks.
Pekr
19-Jul-2010
[1067]
Wasn't there one RT's test framework in the past too?
Carl
19-Jul-2010
[1068x2]
Pekr, yes... RT uses a simple testing framework.
Graham: no, you don't release then test. That's insanity.