World: r3wp
[!REBOL3 Extensions] REBOL 3 Extensions discussions
older newer | first last |
Andreas 29-Jan-2010 [594x4] | Sounds good |
I'd keep on using .dll on windows, though | |
And I'd also keep the platform specific extensions in system/options/file-types | |
Why keep the extensions stored as .dll?: I'd prefer not hiding the fact that a rebol extension is really a proper dynamic library | |
BrianH 29-Jan-2010 [598] | Windows is the one that needs to use the .rx extension the most, and the one that we definitely can use it. And system/options/file-types has to have the extension we are trying to LOAD, not what it might be translated to. |
Andreas 29-Jan-2010 [599] | Why does Windows need .rx the most? |
BrianH 29-Jan-2010 [600] | It's not hiding. Most of the executable file types on Windows are really DLLs, including .dll, .exe, .ocx, .vbx, ... |
Andreas 29-Jan-2010 [601] | Is there any harm in allowing .rx alongside with .dll .so and .dylib? |
BrianH 29-Jan-2010 [602] | We need it on Windows so we can make a .rx wrapper for a .dll third-party library. |
Andreas 29-Jan-2010 [603] | With both .rx and .dll having the same name? OK. |
BrianH 29-Jan-2010 [604] | The harm comes from having .dll, .so or .dylib in the Needs lists of what would be otherwise portable REBOL modules and scripts. |
Andreas 29-Jan-2010 [605x2] | Would only be portable, if there are ported versions of the extension they are needing |
So if you only have a .so version of your extension, using Needs: %foo.so has no harm done | |
BrianH 29-Jan-2010 [607] | It's better to not have .so in there at all. Part of the design strategy of the R3 language is to at least pretend that the language is portable, and keep all of the non-portable stuff wrapped in extensions or hidden in the host code. |
Andreas 29-Jan-2010 [608x2] | But realistically there will be loads of purpose built non-portable extensions |
And as allowing them to be used with their native extension does no harm as far as I can tell, I'd enable that usage alongside the .rx | |
BrianH 29-Jan-2010 [610] | Doesn't negate my argument. Having them named .rx will mark them as extensions, which have a specific calling convention that must be supported. Nonetheless, if you do decide to also allow the default platform dynamic library naming convention, only allow the name supported by the current platform. So no .dll on Linux, no .so on OS X, no .dylib on Windows. |
Andreas 29-Jan-2010 [611x3] | Sounds like needlessly complicating the code |
.so is correct on osx | |
simply marking rx/dll/so/dylib as possible extensions for extensions sounds perfectly reasonable | |
BrianH 29-Jan-2010 [614] | Not needlessly - .dylib files don't work on Windows. |
Andreas 29-Jan-2010 [615x2] | Yeah, but who cares? |
They even might, if someone wrote a dylib loader for windows | |
BrianH 29-Jan-2010 [617] | We do. Simplifying the code would be to just support .rx and have the LOAD-EXTENSION native in the host code do the translation. |
Andreas 29-Jan-2010 [618x5] | Go for it, then |
I'd add some nice magic for .rx | |
And keep .dll .so and .dylib as they are now | |
If some use desperately wants to use .dylibs on Linux, I don't care | |
some user* | |
BrianH 29-Jan-2010 [623] | I want to keep .dll, .so and .dylib files as they are now. That is what we write .rx extensions to wrap. |
Andreas 29-Jan-2010 [624] | But a .rx is nothing but a .so |
BrianH 29-Jan-2010 [625] | No, it's a .so with a really specific set of exported functions. |
Andreas 29-Jan-2010 [626x3] | Yes, the definition of a dynamic library |
If you want a single platform extension: name it foo.so, use it with import %foo.so; if you want a multiplatform extension: create libraries foo.so, foo.dll, foo.dylib, import with %foo.rx | |
Sounds reasonable and simple to me | |
BrianH 29-Jan-2010 [629] | It's the same as .ocx or .exe files on Windows - what matters is the specific functions they export. All .rx files export the same functions. |
Andreas 29-Jan-2010 [630x2] | That's fine, but they will still be platform specific binaries |
But whatever | |
BrianH 29-Jan-2010 [632] | So what? There's no reason why dynamic libraries should be called .dll on Windows and .so on Linux, none at all. |
Andreas 29-Jan-2010 [633x3] | Go for .rx, fine with me |
If you add a capability to ship multiple libraries easily, that would be great as well | |
I.e. that i can ship linux, windows and osx extensions along with a simple script, and use the proper extension on the proper platform | |
BrianH 29-Jan-2010 [636] | Universal Binaries or some such? |
Andreas 29-Jan-2010 [637x2] | nope, just simple namespacing issues |
if all three extensions ought to be called foo.rx, shipping them side by side will be tough :) | |
BrianH 29-Jan-2010 [639] | There are many platforms that use incompatible .so or .dll files, so a packaging/installer format would be good. |
Andreas 29-Jan-2010 [640x3] | yes |
the nice thing about my patch: it would enable linux extensions _right now_ | |
letting people play with them | |
BrianH 29-Jan-2010 [643] | We aren't just supporting 3 platforms. |
older newer | first last |