digitalmars.D - Is there such a thing?
- Taylor Hillegeist (12/12) Feb 26 2015 So, In languages like .net they have dll's that contain not only
- "Marc =?UTF-8?B?U2Now7x0eiI=?= <schuetzm gmx.net> (4/16) Feb 26 2015 IIRC, Pascal unit files work that way. No interface source file
- Taylor Hillegeist (12/32) Feb 26 2015 That Looks pretty close to exactly correct:
- ketmar (3/6) Feb 26 2015 you can compile static library and provide autogenerated .di file.=20
- Jacob Carlborg (6/18) Feb 26 2015 I think it's better to use a package manager to handle this. It will
- Taylor Hillegeist (6/33) Feb 27 2015 I just think its a shame that all over the place people are
- Jacob Carlborg (4/8) Feb 27 2015 I think that's a completely different topic.
- H. S. Teoh via Digitalmars-d (7/16) Feb 27 2015 [...]
- Taylor Hillegeist (3/22) Feb 27 2015 Yes, But in this case there is like 300 non-competing
- H. S. Teoh via Digitalmars-d (5/27) Feb 27 2015 And soon there will be 301 non-competing non-standards. ;-)
- Dicebot (3/8) Feb 28 2015 C is pretty much a standard for cross-language ABI
- Jacob Carlborg (4/5) Mar 01 2015 You still need a way to define the bindings.
- Kagamin (4/12) Mar 03 2015 Object files have no language-level compatibility, only
- Taylor Hillegeist (18/31) Mar 03 2015 So, I don't thing C is very easy to pull data from, In fact i
- Kagamin (3/11) Mar 04 2015 That's WSDL. It works fine for simple data types. The problem is
- Paulo Pinto (7/42) Feb 28 2015 On Windows that standard it is called COM for OO languages,
- Paulo Pinto (3/46) Feb 28 2015 Sorry, should have written CLS (Common Language Specification)
So, In languages like .net they have dll's that contain not only bytecode but also the necessary headers to make them usable in any .net language. I was curious if this kind of thing has ever been attempted for static libraries? basically some type of universal header + static library = Everything Needed to use in project file. of course they would be targeted for a certain platform but would be really easy to grab/use. And if the header could be agreed upon any compiled language could use the library which would be a huge benefit. Perhaps i'm incorrect in my assumptions. Let me know what you think about the idea?
Feb 26 2015
On Thursday, 26 February 2015 at 19:53:54 UTC, Taylor Hillegeist wrote:So, In languages like .net they have dll's that contain not only bytecode but also the necessary headers to make them usable in any .net language. I was curious if this kind of thing has ever been attempted for static libraries? basically some type of universal header + static library = Everything Needed to use in project file. of course they would be targeted for a certain platform but would be really easy to grab/use. And if the header could be agreed upon any compiled language could use the library which would be a huge benefit. Perhaps i'm incorrect in my assumptions. Let me know what you think about the idea?IIRC, Pascal unit files work that way. No interface source file is required to use them.
Feb 26 2015
On Thursday, 26 February 2015 at 21:37:46 UTC, Marc Schütz wrote:On Thursday, 26 February 2015 at 19:53:54 UTC, Taylor Hillegeist wrote:That Looks pretty close to exactly correct: http://www.freepascal.org/docs-html/user/userse11.html It was still two files but it looks like the .ppu was analogous to a c header. like the compiler striped out all the necessary declarations. Very interesting... But I don't think it makes it easier to link to with d. The idea is pretty cool though. I wonder if other compilers do the work of creating sources with the logic striped out for use as a header only. One of the listed uses for a unit was if the developer wanted to hide his ip but allow others to use the code. Does D have a way of doing this?So, In languages like .net they have dll's that contain not only bytecode but also the necessary headers to make them usable in any .net language. I was curious if this kind of thing has ever been attempted for static libraries? basically some type of universal header + static library = Everything Needed to use in project file. of course they would be targeted for a certain platform but would be really easy to grab/use. And if the header could be agreed upon any compiled language could use the library which would be a huge benefit. Perhaps i'm incorrect in my assumptions. Let me know what you think about the idea?IIRC, Pascal unit files work that way. No interface source file is required to use them.
Feb 26 2015
On Thu, 26 Feb 2015 22:10:15 +0000, Taylor Hillegeist wrote:One of the listed uses for a unit was if the developer wanted to hide his ip but allow others to use the code. Does D have a way of doing this?you can compile static library and provide autogenerated .di file.=20 compiler will strip out all unnecessary parts from it.=
Feb 26 2015
On 2015-02-26 20:53, Taylor Hillegeist wrote:So, In languages like .net they have dll's that contain not only bytecode but also the necessary headers to make them usable in any .net language. I was curious if this kind of thing has ever been attempted for static libraries? basically some type of universal header + static library = Everything Needed to use in project file. of course they would be targeted for a certain platform but would be really easy to grab/use. And if the header could be agreed upon any compiled language could use the library which would be a huge benefit. Perhaps i'm incorrect in my assumptions. Let me know what you think about the idea?I think it's better to use a package manager to handle this. It will also automatically download the necessary files. Also it will help (hopefully) you to find the libraries you need. -- /Jacob Carlborg
Feb 26 2015
On Friday, 27 February 2015 at 07:26:06 UTC, Jacob Carlborg wrote:On 2015-02-26 20:53, Taylor Hillegeist wrote:I just think its a shame that all over the place people are compiling code in different programming languages, and although all the .o files are compatible with each other there isn't a standard cross language way of defining a binding. But that would be making people agree on things...So, In languages like .net they have dll's that contain not only bytecode but also the necessary headers to make them usable in any .net language. I was curious if this kind of thing has ever been attempted for static libraries? basically some type of universal header + static library = Everything Needed to use in project file. of course they would be targeted for a certain platform but would be really easy to grab/use. And if the header could be agreed upon any compiled language could use the library which would be a huge benefit. Perhaps i'm incorrect in my assumptions. Let me know what you think about the idea?I think it's better to use a package manager to handle this. It will also automatically download the necessary files. Also it will help (hopefully) you to find the libraries you need.
Feb 27 2015
On 2015-02-27 20:49, Taylor Hillegeist wrote:I just think its a shame that all over the place people are compiling code in different programming languages, and although all the .o files are compatible with each other there isn't a standard cross language way of defining a binding. But that would be making people agree on things...I think that's a completely different topic. -- /Jacob Carlborg
Feb 27 2015
On Fri, Feb 27, 2015 at 09:00:56PM +0100, Jacob Carlborg via Digitalmars-d wrote:On 2015-02-27 20:49, Taylor Hillegeist wrote:[...] http://xkcd.com/927/ :-P T -- It is widely believed that reinventing the wheel is a waste of time; but I disagree: without wheel reinventers, we would be still be stuck with wooden horse-cart wheels.I just think its a shame that all over the place people are compiling code in different programming languages, and although all the .o files are compatible with each other there isn't a standard cross language way of defining a binding. But that would be making people agree on things...I think that's a completely different topic.
Feb 27 2015
On Friday, 27 February 2015 at 21:15:10 UTC, H. S. Teoh wrote:On Fri, Feb 27, 2015 at 09:00:56PM +0100, Jacob Carlborg via Digitalmars-d wrote:Yes, But in this case there is like 300 non-competing non-standards.On 2015-02-27 20:49, Taylor Hillegeist wrote:[...] http://xkcd.com/927/ :-P TI just think its a shame that all over the place people are compiling code in different programming languages, and although all the .o files are compatible with each other there isn't a standard cross language way of defining a binding. But that would be making people agree on things...I think that's a completely different topic.
Feb 27 2015
On Sat, Feb 28, 2015 at 12:35:56AM +0000, Taylor Hillegeist via Digitalmars-d wrote:On Friday, 27 February 2015 at 21:15:10 UTC, H. S. Teoh wrote:And soon there will be 301 non-competing non-standards. ;-) T -- Question authority. Don't ask why, just do it.On Fri, Feb 27, 2015 at 09:00:56PM +0100, Jacob Carlborg via Digitalmars-d wrote:Yes, But in this case there is like 300 non-competing non-standards.On 2015-02-27 20:49, Taylor Hillegeist wrote:[...] http://xkcd.com/927/ :-P TI just think its a shame that all over the place people are compiling code in different programming languages, and although all the .o files are compatible with each other there isn't a standard cross language way of defining a binding. But that would be making people agree on things...I think that's a completely different topic.
Feb 27 2015
On Friday, 27 February 2015 at 19:49:37 UTC, Taylor Hillegeist wrote:I just think its a shame that all over the place people are compiling code in different programming languages, and although all the .o files are compatible with each other there isn't a standard cross language way of defining a binding. But that would be making people agree on things...C is pretty much a standard for cross-language ABI
Feb 28 2015
On 2015-02-28 18:06, Dicebot wrote:C is pretty much a standard for cross-language ABIYou still need a way to define the bindings. -- /Jacob Carlborg
Mar 01 2015
On Saturday, 28 February 2015 at 17:06:58 UTC, Dicebot wrote:On Friday, 27 February 2015 at 19:49:37 UTC, Taylor Hillegeist wrote:Object files have no language-level compatibility, only linker-level compatibility. You can get function arguments wrong, and linker won't tell you.I just think its a shame that all over the place people are compiling code in different programming languages, and although all the .o files are compatible with each other there isn't a standard cross language way of defining a binding. But that would be making people agree on things...C is pretty much a standard for cross-language ABI
Mar 03 2015
On Tuesday, 3 March 2015 at 10:37:49 UTC, Kagamin wrote:On Saturday, 28 February 2015 at 17:06:58 UTC, Dicebot wrote:So, I don't thing C is very easy to pull data from, In fact i would guess the only way this would work is if the compiler produced standard data format like JSON or XML or YAML if you like that kind of thing. And then transformed it to native code. <CStyleFunction="Foo"> <ReturnType> <sint32> </ReturnType> <Parameter> <Float64="MyFloat"> </Parameter> </CStyleFunction> I think YAML would look nicer... I also know that some languages have certain capabilities. And this is a lot more complex of problem. But I hear about people making automatic binding generators and all sorts of 1 off tools, I just don't understand why there doesn't seem to be common standard solution.On Friday, 27 February 2015 at 19:49:37 UTC, Taylor Hillegeist wrote:Object files have no language-level compatibility, only linker-level compatibility. You can get function arguments wrong, and linker won't tell you.I just think its a shame that all over the place people are compiling code in different programming languages, and although all the .o files are compatible with each other there isn't a standard cross language way of defining a binding. But that would be making people agree on things...C is pretty much a standard for cross-language ABI
Mar 03 2015
On Tuesday, 3 March 2015 at 17:17:18 UTC, Taylor Hillegeist wrote:<CStyleFunction="Foo"> <ReturnType> <sint32> </ReturnType> <Parameter> <Float64="MyFloat"> </Parameter> </CStyleFunction>That's WSDL. It works fine for simple data types. The problem is what to do with complex data types.
Mar 04 2015
On Friday, 27 February 2015 at 19:49:37 UTC, Taylor Hillegeist wrote:On Friday, 27 February 2015 at 07:26:06 UTC, Jacob Carlborg wrote:On Windows that standard it is called COM for OO languages, stdcall/pascal for procedural ones and BCL for those targeting .NET. -- PauloOn 2015-02-26 20:53, Taylor Hillegeist wrote:I just think its a shame that all over the place people are compiling code in different programming languages, and although all the .o files are compatible with each other there isn't a standard cross language way of defining a binding. But that would be making people agree on things...So, In languages like .net they have dll's that contain not only bytecode but also the necessary headers to make them usable in any .net language. I was curious if this kind of thing has ever been attempted for static libraries? basically some type of universal header + static library = Everything Needed to use in project file. of course they would be targeted for a certain platform but would be really easy to grab/use. And if the header could be agreed upon any compiled language could use the library which would be a huge benefit. Perhaps i'm incorrect in my assumptions. Let me know what you think about the idea?I think it's better to use a package manager to handle this. It will also automatically download the necessary files. Also it will help (hopefully) you to find the libraries you need.
Feb 28 2015
On Saturday, 28 February 2015 at 17:24:57 UTC, Paulo Pinto wrote:On Friday, 27 February 2015 at 19:49:37 UTC, Taylor Hillegeist wrote:Sorry, should have written CLS (Common Language Specification) for those targeting .NET.On Friday, 27 February 2015 at 07:26:06 UTC, Jacob Carlborg wrote:On Windows that standard it is called COM for OO languages, stdcall/pascal for procedural ones and BCL for those targeting .NET. -- PauloOn 2015-02-26 20:53, Taylor Hillegeist wrote:I just think its a shame that all over the place people are compiling code in different programming languages, and although all the .o files are compatible with each other there isn't a standard cross language way of defining a binding. But that would be making people agree on things...So, In languages like .net they have dll's that contain not only bytecode but also the necessary headers to make them usable in any .net language. I was curious if this kind of thing has ever been attempted for static libraries? basically some type of universal header + static library = Everything Needed to use in project file. of course they would be targeted for a certain platform but would be really easy to grab/use. And if the header could be agreed upon any compiled language could use the library which would be a huge benefit. Perhaps i'm incorrect in my assumptions. Let me know what you think about the idea?I think it's better to use a package manager to handle this. It will also automatically download the necessary files. Also it will help (hopefully) you to find the libraries you need.
Feb 28 2015