Like Tree31Likes

Let's talk about Rust!

This is a discussion on Let's talk about Rust! within the General Discussions forums, part of the Community Boards category; I have to admit I don't know where this is going. Does whatever we're talking about have to be an ...

  1. #136
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,752
    I have to admit I don't know where this is going. Does whatever we're talking about have to be an advantage all the time? To expect that just seems like a pessimistic point of view. At least assembly on the Mill is more legible than the average dialect these days.

  2. #137
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,915
    Quote Originally Posted by whiteflags View Post
    Does whatever we're talking about have to be an advantage all the time? To expect that just seems like a pessimistic point of view. At least assembly on the Mill is more legible than the average dialect these days.
    At least it has to be not a disadvantage.
    But I'm mostly just curious as this is the first time I've heard of using "C++ as assembly," and of course, getting a significant speed boost of x86.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #138
    Registered User
    Join Date
    May 2009
    Posts
    2,747
    Question about Rust; does it really have a standard ABI?
    Note: I have found info that implies it supports multiple ABI; but, no info that implies it support a standard ABI as like C does.
    C supports a standard ABI that is used by multiple Compiler Vendors.

    Tim S.
    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the Universe is winning." Rick Cook

  4. #139
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,915
    C does not have a standard ABI AFAIK. It only happens that due to its simplicity, it often just works.
    stahta01 likes this.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #140
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    1,678
    Quote Originally Posted by stahta01 View Post
    Question about Rust; does it really have a standard ABI?
    No. It may be on their roadmap, but for now it's very much like the C ABI.


    Quote Originally Posted by Elysia View Post
    C does not have a standard ABI AFAIK.
    That's a good thing. ABIs should be an implementation detail.


    Quote Originally Posted by Elysia View Post
    It only happens that due to its simplicity, it often just works.
    Incorrect! It's much more complicated than one might naively think. The reason it "just works", is because each platform has their own standard C ABI.
    stahta01 likes this.
    A class that doesn't overload all operators just isn't finished yet. -- SmugCeePlusPlusWeenie
    A year spent in artificial intelligence is enough to make one believe in God. -- Alan J. Perlis

  6. #141
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,370
    C supports a standard ABI that is used by multiple Compiler Vendors.
    O_o

    Elysia is correct.

    There is no C standard ABI. Sometimes things will work out because the language is simpler. (You don't, for example, need mangling to account for overloading.) The ABI you are probably familiar with is one of a few common ABI mostly designed by hardware engineers. (A variation of the "Itanium" ABI is very common these days even in x8664 land.) Even then, the ABI you are familiar with only has so much conformance. (On x86, for example, different compilers use different "internal padding" for variables depending on the options. You might, same example, compile with some variation of "use double precision for all mathematics" changing the size of all structures with a `float' member. Depending on other compilers, you'll never be able to directly interface the compiled code because some compilers do not have options for aligning `double' to 96 bits while that is the standard for other compilers.) One you reach beyond default everything, the ABI gets less and less "standard".

    Soma
    “Often out of periods of losing come the greatest strivings toward a new winning streak.” -- Fred Rogers
    “Salem Was Wrong!” -- Pedant Necromancer

  7. #142
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,915
    Quote Originally Posted by Yarin View Post
    That's a good thing. ABIs should be an implementation detail.
    That is a bad thing. ABIs should be standardized so that any two compilers can just plug and play. Of course, it may be that it needs to be on a platform level.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  8. #143
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    1,678
    Quote Originally Posted by Elysia View Post
    That is a bad thing. ABIs should be standardized so that any two compilers can just plug and play. Of course, it may be that it needs to be on a platform level.
    :facepalm:

    When a language aspect is standardized by the platform rather than the language specification itself, that makes it an implementation detail, just as I said.
    A class that doesn't overload all operators just isn't finished yet. -- SmugCeePlusPlusWeenie
    A year spent in artificial intelligence is enough to make one believe in God. -- Alan J. Perlis

  9. #144
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,915
    Quote Originally Posted by Yarin View Post
    When a language aspect is standardized by the platform rather than the language specification itself, that makes it an implementation detail, just as I said.
    No, it doesn't.
    A standard may still mandate what a platform ABI may and may not do.
    Besides, many things such as name mangling can be part of the standard ABI, while lower level things such as calling convention may be part of the platform ABI.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  10. #145
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,370
    Besides, many things such as name mangling can be part of the standard ABI, while lower level things such as calling convention may be part of the platform ABI.
    O_o

    If the standard mandated a particular mangling scheme, most vendors would not follow that part of the standard.

    *shrug*

    Face it, you aren't going to see a standard ABI which will be widely adopted for years and years if ever.

    For a vendor, "backwards compatibility" would be more important than rigid adherence to the standard because clients expect a level of compatibility.

    Soma
    “Often out of periods of losing come the greatest strivings toward a new winning streak.” -- Fred Rogers
    “Salem Was Wrong!” -- Pedant Necromancer

  11. #146
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,915
    Quote Originally Posted by phantomotap View Post
    Face it, you aren't going to see a standard ABI which will be widely adopted for years and years if ever.

    For a vendor, "backwards compatibility" would be more important than rigid adherence to the standard because clients expect a level of compatibility.
    That's why it's important to have in place from day #1 so no legacy code will be able to "get in the way." That gives the highest probability of there ever existing a common ABI.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  12. #147
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    1,678
    Quote Originally Posted by Elysia View Post
    That's why it's important to have in place from day #1 so no legacy code will be able to "get in the way." That gives the highest probability of there ever existing a common ABI.
    You just don't get it, do you? The 'B' in ABI means 'binary', as in, machine code. It cannot be fully standardized by the language specification without making it unportable (to anything not covered by the spec, obviously).
    A class that doesn't overload all operators just isn't finished yet. -- SmugCeePlusPlusWeenie
    A year spent in artificial intelligence is enough to make one believe in God. -- Alan J. Perlis

  13. #148
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,915
    I do get it, and I never said it had to be fully specified by the standard.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  14. #149
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    1,238
    So... Are we gonna all just ignore the fact that MILL architecture CPUs sounds absolutely astonishingly amazing? It's free performance boosts without code rewrites. I started watching the presentation on branching and I'm really starting to get into this. I mean, forget writing in assembly. Learning assembly in this day and age just seems silly unless you're either getting paid for it or you're getting paid a lot for it.

    The speaker is also a perfect caricature of a computer scientist, imo. And I absolutely loved his joke, "Now, some of you younger folks may not recognize it but this is 'assembly language'."

  15. #150
    Registered User
    Join Date
    Jun 2014
    Posts
    13
    Quote Originally Posted by Elysia View Post
    So in other words, it just generates more complex instructions.
    it doesn't

    both of those examples expand to simple codes when compiled, just a few repeated instructions in the binary
    Last edited by iopq; 06-22-2014 at 03:54 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Do I talk too much?
    By GoodStuff in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 05-20-2003, 11:45 PM
  2. Who wants to talk on AIM?
    By Death Wish in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 07-05-2002, 07:29 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21