User Tag List

Page 2 of 6 FirstFirst 1 2 3 4 ... LastLast
Results 11 to 20 of 58

Thread: Allegro pull requests

  1. #11
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,760
    Level
    21
    vBActivity - Bars
    Lv. Percent
    68.7%
    Well, the edit post button seems to be failing. I'll post a P.S. about that below.

    Here is a link to the discussion on this topic over at allegro.cc. Mates, you might want to chime in over there.
    @War Lord & @DarkDragon

    I have encountered some issues on AGN today, and yesterday. The edit post button seems to fail to load the edit dialogue, and on two occasions I received an error:

    Code:
    You do not have permission to accesss /newreply.php on this server.
    I'm posting this here, in the event that I run into it again. I'm hoping that this post goes through.

  2. #12
    The Time-Loop Continues ZC Developer
    Gleeok's Avatar
    Join Date
    Apr 2007
    Posts
    4,815
    Mentioned
    259 Post(s)
    Tagged
    10 Thread(s)
    vBActivity - Stats
    Points
    12,933
    Level
    33
    vBActivity - Bars
    Lv. Percent
    23.44%
    I was just going to copy over some atomic code from my own library I use and use that to fix it, but if you guys want to do it then be my guest.


    Quote Originally Posted by ZoriaRPG View Post
    I'm not really sure how to make this an atomic operation that is respected in each of our various compilers, and on every architecture that we use. I think it would be different between gcc/MinGW, and MSVC, and possibly between different MSVC versions; plus it may be different from Windows to Liux and OSX (FreeBSD).

    If any if you are clever-enough to know a solution, I'm all eyes. Is using std::atomic for the variable sufficient for our needs, or will that fail based on the compiler? I'm not sure at what point this was introduced as art of the cpp spec, to keep this cpp08 happy.

    Which allegro file is this, BTW, so that I can post the problem on allegro.cc? ?
    You can use intrinsics. std::atomic, like all of c++, is just bloated wrappers around c. Plus, allegro compiles as c code so simple is fine. For example, std::atomic::operator++ is the equivalent of:
    _InterlockedIncrement(); on windows, or
    __sync_add_and_fetch(). on gcc, etc.

    Quote Originally Posted by DarkDragon View Post
    Right. It's one of the many things that is a lot easier to do in C++11 than C++03. I'm pretty sure Allegro already has a mutex implementation somewhere, though.
    Lies! Nothing in c++11 makes anything easier. Only sadness will you find.
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  3. #13
    Administrator DarkDragon's Avatar
    Join Date
    Oct 2001
    Posts
    6,228
    Mentioned
    70 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    11,025
    Level
    31
    vBActivity - Bars
    Lv. Percent
    8.16%
    Okay, challenge accepted. Please post C or C++03 code that performs an atomic increment correctly on every single standard-compliant C++03 compiler on every computer architecture in the world. I will do the same for C++11

  4. #14
    Administrator DarkDragon's Avatar
    Join Date
    Oct 2001
    Posts
    6,228
    Mentioned
    70 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    11,025
    Level
    31
    vBActivity - Bars
    Lv. Percent
    8.16%
    Quote Originally Posted by ZoriaRPG View Post
    Well, the edit post button seems to be failing. I'll post a P.S. about that below.

    Here is a link to the discussion on this topic over at allegro.cc. Mates, you might want to chime in over there.
    @War Lord & @DarkDragon

    I have encountered some issues on AGN today, and yesterday. The edit post button seems to fail to load the edit dialogue, and on two occasions I received an error:

    Code:
    You do not have permission to accesss /newreply.php on this server.
    I'm posting this here, in the event that I run into it again. I'm hoping that this post goes through.
    I pinged War Lord about this earlier in the afternoon and he is aware of the problem. I think the host has fixed the issue... for now.

  5. #15
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,760
    Level
    21
    vBActivity - Bars
    Lv. Percent
    68.7%
    Quote Originally Posted by Gleeok View Post
    I was just going to copy over some atomic code from my own library I use and use that to fix it, but if you guys want to do it then be my guest.




    You can use intrinsics. std::atomic, like all of c++, is just bloated wrappers around c. Plus, allegro compiles as c code so simple is fine. For example, std::atomic::operator++ is the equivalent of:
    _InterlockedIncrement(); on windows, or
    __sync_add_and_fetch(). on gcc, etc.



    Lies! Nothing in c++11 makes anything easier. Only sadness will you find.
    Ill take your fix for now, thanks. I don't want to delve into the murky waters of this more than needed. If it turns out to need more, than it needs more, but let's try the simple fix, first.

    I will also further try to convince the allegro blokes to incorporate it, or take it and expand if if they so desire. One genius telling me that we should not care about threads and that allegro was not designed to be thread-safe on 1980s architecture, is just an example of pure madness.

    If for some reason it does not work on one compiler or another, we can add in compiler definitions. Yay.
    @jman2050 Still has an allegro.cc account, and he is the one who posted the original ZC project listing there. I posted an updated listing, and I will add to it as time permits. There is some weird issue with their FTP upload, which claims to support 100MB files, but it is failing me. (I', trying to add the stable Linux build, which is 43MB in size.)

    Here is the entry: https://www.allegro.cc/depot/ZeldaClassic1

    If @jman2050 wants to go in and update his entry (here), then that would also work. Please let me know what you think of my project description and either approve, or grumble.

  6. #16
    Administrator DarkDragon's Avatar
    Join Date
    Oct 2001
    Posts
    6,228
    Mentioned
    70 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    11,025
    Level
    31
    vBActivity - Bars
    Lv. Percent
    8.16%
    Allegro already has code for mutexes. I can guarantee you they will refuse to incorporate a fix that half-works on only some platforms, instead of using their own mutex implementation for some reason.

  7. #17
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,760
    Level
    21
    vBActivity - Bars
    Lv. Percent
    68.7%
    Quote Originally Posted by DarkDragon View Post
    Allegro already has code for mutexes. I can guarantee you they will refuse to incorporate a fix that half-works on only some platforms, instead of using their own mutex implementation for some reason.
    Well, again, if you want to do this, go for it. I don't understand why you and Gleeok butt heads every ten seconds these days. I don't want every stage of this to be a bicker-fest.

  8. #18
    Administrator DarkDragon's Avatar
    Join Date
    Oct 2001
    Posts
    6,228
    Mentioned
    70 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    11,025
    Level
    31
    vBActivity - Bars
    Lv. Percent
    8.16%
    Butting heads where? We're bantering about C++11 but switching the whole Allegro project from C to C++11 was obviously not a serious suggestion (and there's a 0% chance the Allegro folks would accept a pull request that tries to do so).

    I'm trying to give you practical advice about how to proceed in the way least likely to waste your time, based on my observations about how the Allegro folks run their ship. Obviously feel free to check with Edgar directly if you believe I am wrong.

  9. #19
    Is this the end?
    ZC Developer
    Saffith's Avatar
    Join Date
    Jan 2001
    Age
    41
    Posts
    3,389
    Mentioned
    178 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,430
    Level
    24
    vBActivity - Bars
    Lv. Percent
    69.57%
    You don't need C++, anyway. C11 added stdatomic.h and an _Atomic qualifier.

  10. #20
    The Time-Loop Continues ZC Developer
    Gleeok's Avatar
    Join Date
    Apr 2007
    Posts
    4,815
    Mentioned
    259 Post(s)
    Tagged
    10 Thread(s)
    vBActivity - Stats
    Points
    12,933
    Level
    33
    vBActivity - Bars
    Lv. Percent
    23.44%
    Fun fact: Mutexes is not multi-threading. Mutex locks are the opposite of multi-threading! Bicker!!!

    Quote Originally Posted by DarkDragon View Post
    Okay, challenge accepted. Please post C or C++03 code that performs an atomic increment correctly on every single standard-compliant C++03 compiler on every computer architecture in the world. I will do the same for C++11
    Bicker bicker bicker!!! Are you saying that c++11 is more widely supported than c? Bicker? Stuff, bicker. Nonsense! Bicker!!


    P.S. Anyway, I guess newer gcc can use "__atomic*" prefix...? But clang uses "__sync*" ? ..Whatever. AFAICT they cover windows and unix toolchains so there's probably no issues there.

    [edit] Keep in mind that the allegro.cc folks like to argue about anything and everything. At least that's what happened every time I used to stop by there.
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social