World: r3wp
[!REBOL3 Extensions] REBOL 3 Extensions discussions
older newer | first last |
BrianH 29-Jan-2010 [655] | Never mind, it was an AltME delay. |
Andreas 29-Jan-2010 [656x4] | thought so :) |
>> append system/options/file-types [%.rx extension] == [%.bmp bmp %.gif gif %.png png %.jpg %.jpeg jpeg %.dll extension %.rx extension] >> import %ext/sample.rx >> add-mul 10 20 30 == 900 | |
works with whatever extension you like | |
don't get me wrong, i really like the .rx idea | |
BrianH 29-Jan-2010 [660] | Cool, like Windows. I can make a mezzanine patch for the platform file-types that would work for all supported platforms if you like. |
Andreas 29-Jan-2010 [661x4] | but this minimal change of adding two lines would get things started for now |
yes, please | |
but wouldn't that exactly be what i did in rebdev#6258? | |
heck, osx is not even supported right now :) | |
BrianH 29-Jan-2010 [665] | No, it wouldn't be the same. Don't take it personally if I deny that submission - it's what started this conversation :) |
Andreas 29-Jan-2010 [666x2] | I don't |
So you'd get rid of the append in mezz-init.r completely, and add the extension filetype some place else? | |
BrianH 29-Jan-2010 [668x2] | I'd put it there (I think), but it would be different code. |
The mezzanine parts of the extension/module model are where I am the most familiar with the code :) | |
Andreas 29-Jan-2010 [670x2] | great |
just a quick reminder: on osx .dylib and .so are both ok | |
BrianH 29-Jan-2010 [672x2] | OK. They're just for convenience though, since every almost dylib that is loadable as an extension will have been written specificly for that purpose and probably can't be used otherwise, so sticking to the .rx filename makes sense. |
I'm hoping to prove that wrong with some extensions though. | |
Andreas 29-Jan-2010 [674x3] | It might be nice to use .rx as "virtual" extension only |
then i could have a single script, say foo.r shipped with bar.dll bar.so and bar.dynlib, use import %bar.rx in foo.r and it will select the proper platform specific library | |
this will break down as soon as we have e.g. 32b and 64b builds for the same platform | |
BrianH 29-Jan-2010 [677x7] | If LOAD-EXTENSION can be changed to look for .rx first then for .dll (or whatever) then this can be seamless. Otherwise it will require ugly changes to LOAD. It might be better to make a platform wrapper module for your app. |
Fortunately the module system is based around importing into the system, rather than importing into modules directly. This means that you can have all of your platform-specific requirements handled by one module or script and then have the rest just reference by module name, not file name. | |
There won't be 32 and 64 bit builds on the same platform, in theory; 32bit builds get one platform number, 64bit builds another. | |
We'll see if they mess that up though. | |
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. |
older newer | first last |