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

World: r3wp

[!REBOL3 Extensions] REBOL 3 Extensions discussions

Maxim
16-Jul-2010
[1002x2]
in R3 I could go far beyond, actually dumping some of liquid's processing 
directly in the native side of an extension.


in fact, I could use AGG or OpenGL directly without even using gobs 
or draw blocks since the interface is built by how you link things 
together and this linking and messaging will automatically fire-off 
AGG commands, without the need to go through an intermediate.
anyhow... object use is central to this, since its the most approachable 
way to group & bind things in context .
Steeve
16-Jul-2010
[1004]
maybe you could simply convert your object into gobs ;-)
Maxim
16-Jul-2010
[1005]
liquid is at a lower level than gobs (its not strictly gfx related) 
and I need object access for liquid (and other things).
Steeve
16-Jul-2010
[1006]
off the topic, 

Gobs are not specifically related to graphics if they are not rendered 
(showed)

Gobs could be used to implement some efficient data structures, like 
linked list or tree.

As far I tested, dealing with structures of gobs is faster than with 
standard objets.

A really cool feature is that when a gob is append as a child to 
a gob, it's removed from its current parent automaticly.
Carl
16-Jul-2010
[1007x2]
Yes, true and useful too.
I need to find a group to discuss the PAIR changes happening. Suggestions 
anyone?
Maxim
16-Jul-2010
[1009]
Core?
Steeve
16-Jul-2010
[1010]
no !REBOL3
Carl
16-Jul-2010
[1011]
I guess. Kind of general group tho. Was hoping we had a graphics 
or datatypes group.
Maxim
16-Jul-2010
[1012]
there's REBOL3 GUI
Graham
16-Jul-2010
[1013x2]
How to compile the sample ext-test.c using MinGW http://jira.rebolsource.net:8080/browse/REBOLKIT-5
Looks like it should be possible to call Java libraries from a C 
extension using the Java native interface ...
AdrianS
17-Jul-2010
[1015]
would be easier to use something like SWIG

http://www.swig.org/
Graham
17-Jul-2010
[1016]
Got an example of use with R3 extensions?
BrianH
17-Jul-2010
[1017]
SWIG has REBOL support now? R2 or R3?
Graham
17-Jul-2010
[1018]
sure .. just use -r in the options :)
BrianH
17-Jul-2010
[1019]
And then it magically reads your mind and chooses REBOL, rather than 
the R that it does support. We could use that ability in REBOL - 
it would allow us to implement half of the CureCode tickets we've 
had to dismiss :)
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.)