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

World: r3wp

[!REBOL3 Extensions] REBOL 3 Extensions discussions

BrianH
29-Jan-2010
[681x3]
Andreas, what do you think of this code instead?

append system/options/file-types [%.rx extension]
switch fourth system/version [
	3 [append system/options/file-types [%.dll extension]]

 2 [append system/options/file-types [%.dylib extension %.so extension]]
	4 7 [append system/options/file-types [%.so extension]]
]
Whoops, that's a little too verbose.
switch/default fourth system/version [
	3 [append system/options/file-types [%.rx %.dll extension]]

 2 [append system/options/file-types [%.rx %.dylib %.so extension]]
	4 7 [append system/options/file-types [%.rx %.so extension]]
] [append system/options/file-types [%.rx extension]]
Gregg
29-Jan-2010
[684]
append system/options/file-types switch/default fourth system/version 
[
	3 [[%.rx %.dll extension]]
	2 [[%.rx %.dylib %.so extension]]
	4 7 [[%.rx %.so extension]]
] [[%.rx extension]]

?
BrianH
29-Jan-2010
[685]
Better. I wrote the original before I wrote the default.
Pekr
30-Jan-2010
[686]
I like .rx name for an extensions. I also seem to understand, what 
is your motive for it. But - will not it confuse users? I mean - 
if I try to run R3 under Linux, I might be tempted to copy extensions 
to linux, becase I expect .r script to be cross-platform, so some 
ppl might expect .rx is just cross-platform too. But that surely 
is not the case - those are platform specific, no?
Robert
30-Jan-2010
[687]
I have some extension macros (simple stuff) how to submit to Carl?
Steeve
30-Jan-2010
[688]
and why not submitting it to our eyes too ?
Pekr
30-Jan-2010
[689]
R3 Chat ...
Robert
30-Jan-2010
[690x2]
Ok, because posting source-code within AltME is really no fun.
Further it's lost within the discussions at some point. I just wanted 
to provide the file so that it can be reviewed and included in the 
next release.
BrianH
30-Jan-2010
[692]
Some people put files on a website and post a link.
Ashley
30-Jan-2010
[693]
AltME File Sharing?
Graham
30-Jan-2010
[694]
Not enabled here ..
Reichart
30-Jan-2010
[695]
You could always post it to Qtask's REBOL SIG project.   It has been 
there for about 5 years...
BrianH
30-Jan-2010
[696]
That's a good one!
Robert
31-Jan-2010
[697]
So I can choose between 5 different ways. And I don't know which 
way will be the best that the contribution is taken into account... 


Guys, you know that I'm a real Rebol supporter but as long as the 
most basic things (like submiting a patch, and being sure it's taken 
into account)  are not made clear and simple and people can see it's 
looked at we don't have to wonder about "low participance".
Pekr
31-Jan-2010
[698]
Robert - R3 Chat is official SVN for R3 and soon even for R2. I would 
learn to use the Chat. Hopefully once R3 Veiw is available, GUI client 
will emerge ..
Henrik
31-Jan-2010
[699x2]
I'd agree on using R3 chat. Contributions directly to Carl is what 
it's for. If I could figure out how to upload sources, surely Robert 
can. :-)
Remember that R3 chat is the direct replacement of Devbase we had 
for R2.
Robert
31-Jan-2010
[701]
Years, ago I said that information channel fragmentation in a small 
community is evil. We still have the same situation or add new channels.

But OK, I use R3-Chat and will post to Extension group.
Henrik
31-Jan-2010
[702]
R3 chat is just not being advertised enough, I think. And even if 
Carl forgets to check there, be sure to let him know, so he doesn't 
forget his own tools.
Andreas
31-Jan-2010
[703]
BrianH: looks good. Maybe we should add platform-linux? platform-win32? 
and platform-osx? predicates to get rid of those evil magic numbers 
in cases like the above.
BrianH
31-Jan-2010
[704]
That won't work when we have support for a hundred platforms, which 
is more likely than you might think.
Pekr
31-Jan-2010
[705]
ARM, ARM, ARM :-)
BrianH
31-Jan-2010
[706]
Apple has two slightly incompatible ARM platforms for the iPhone 
OS alone. Even though they're both ARM, they still go Universal.
Andreas
31-Jan-2010
[707x3]
With a hundred platforms you'll have a hundred numbers. What's wrong 
with having at least a hundred predicates hiding those numbers?
If the influx of gobal words is a problem, use some universal predicates 
(os? cpu? arch?) returning symbols instead, allowing e.g. `if os? 
= 'win32 [...]`
Reported a boiled-down version of this wish as bug#1454 and submitted 
an initial implementation in chat#6785.
Maxim
31-Jan-2010
[710]
so did anyone start on the R3 /library  extension?  if not I can 
work on that for windows, and make it so its very easy for someone 
else to map it to linux ( as a few stubs to re-implement  ).
TomBon
1-Feb-2010
[711]
good news maxim, this would be highly appreciated .

I never understood why the lib development is not forced muched stronger. 

A functional interface will double the value of rebol. Unfortunatly 
my

knowledge is not sufficient to create it by myself.  therefore I 
would like 

to support this with the commitment I made before, even if this is 
not the 
first motivation for you.
Maxim
9-Feb-2010
[712x3]
so I've been looking into this a litle bit, and it seems like a portion 
of the /library extension might be a pain to implement... so far 
it seems like I will have to add in-line assembly, since I haven't 
found any C routines or macros which handle the puch/call/pop aspect 
of the program stack (not saying it doesn't exist, just that I haven't 
found any).
and since this code is totally compiler dependent... it means, the 
extension will be tailored to be compiled on one specific compiler... 
(but will be useable by others AFAICT).
I'm still looking for a definitive dll calling convention example... 
AFAIK this has to be pretty set in stone... or dlls would quickly 
be incompatible between vendors.  

Then again, its possible the DLLs contain some calling convention 
parameter...   if anyone has a bit of experience in this (and can 
point me to understandable docs) I'd welcome a few pointers (pun 
intended ;-).
TomBon
9-Feb-2010
[715]
uff, sounds complicating. I think robert could have some practical 
experience or advice with that.
Maxim
9-Feb-2010
[716x3]
I just found a few good references.  so I will test some of this 
later this week.  I am pretty confident its going to work  :-)
the rebol part of things should be pretty straightforward.
I might even be able to support C++ object methods  :-)
TomBon
9-Feb-2010
[719]
cool maxim, I have a significant interest in connecting a powerful 
lib for 
complex financials analysis with rebol. A very dry area but

if I can support your activities in the way I have mentioned before, 
please 
let me know.
Andreas
9-Feb-2010
[720x3]
maxim the thing you are looking for is known as ABI, application 
binary interface
basically the ABI specifies (among other things) the calling conventions
and yes, that's extremely platform-dependent stuff
Maxim
9-Feb-2010
[723]
for windows, the calling conventions used by the OS seem to be pretty 
standardized and simple.  which is nice.  So far it seems to be a 
bit more sprawled for linux.


first release of the /library extension will be 32 bit only, but 
when we have a 64 bit REBOL it will be pretty easy to adapt... in 
fact, MS/intel did their homework for 64bit, it seems, and there 
is only ONE calling convention for that platform.
Andreas
9-Feb-2010
[724x2]
afaik microsoft has different calling conventions for x86 and x64
and iirc they have at least 3 support cconvs anyway (cdecl, stdcall, 
fastcall; maybe more)
Maxim
9-Feb-2010
[726x2]
yep, the x64 is better in fact.  x86 has three official conventions, 
some on the stack, some using registers, and different cleanup.  
 the x64 has only one and is based on __fastcall
because the x64 has much more registers.... it makes sense.
Andreas
9-Feb-2010
[728]
but as i suggested a few days ago, using e.g. libffi or dyncall would 
really help getting started quickly
TomBon
9-Feb-2010
[729]
maxim, any change the extension will be capable to handle nested 
strucs and pointers?
Andreas
9-Feb-2010
[730]
dyncall is BSD and should even work with MSVC