As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/
We're funding a new Acquisitions Incorporated series on Kickstarter right now! Check it out at https://www.kickstarter.com/projects/pennyarcade/acquisitions-incorporated-the-series-2

SELECT * FROM posts WHERE tid = 'PA PROGRAMMING THREAD'

17879818384100

Posts

  • GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    bowen wrote: »
    seabass wrote: »
    Does anyone here have experience with the simple directmedia layer library (pref. version 1.2). I'm wondering what happens when too many keys are pressed at once on a keyboard. Specifically I'm curious if it is possible for a key to become unpressed without a corresponding SDL_KEYUP event.

    @seabass I don't think so, I think it queues them up in order of how you facerolled them, assuming your buffer doesn't get overflowed. But I'd imagine the buffer is larger than 101+ keycodes.

    It actually depends on the keyboard and what the key rollover is. It's actually a hardware thing, SDL will buffer up as many keys as they press and if you aren't in buffered mode you'll see them in 'order'. For most USB keyboards, that's going to max out at six keys. For PS2 keyboards, if it's a good keyboard, there is no max, it's true n-key.

    It should not be possible for a key to get an SDL_KEYDOWN without an SDL_KEYUP, because when the key rollover kicks in, the pressed keys will send no hardware signals.

    Sagroth wrote: »
    Oh c'mon FyreWulff, no one's gonna pay to visit Uranus.
    Steam: Brainling, XBL / PSN: GnomeTank, NintendoID: Brainling, FF14: Zillius Rosh SFV: Brainling
  • bowenbowen How you doin'? Registered User regular
    edited April 2012
    The question then comes down to, how deep does the SDL buffer go before an overload happens if you don't read the events? Doesn't SDL poll instead of event firing?

    bowen on
    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • seabassseabass Doctor MassachusettsRegistered User regular
    GnomeTank wrote: »
    bowen wrote: »
    seabass wrote: »
    Does anyone here have experience with the simple directmedia layer library (pref. version 1.2). I'm wondering what happens when too many keys are pressed at once on a keyboard. Specifically I'm curious if it is possible for a key to become unpressed without a corresponding SDL_KEYUP event.

    @seabass I don't think so, I think it queues them up in order of how you facerolled them, assuming your buffer doesn't get overflowed. But I'd imagine the buffer is larger than 101+ keycodes.

    It actually depends on the keyboard and what the key rollover is. It's actually a hardware thing, SDL will buffer up as many keys as they press and if you aren't in buffered mode you'll see them in 'order'. For most USB keyboards, that's going to max out at six keys. For PS2 keyboards, if it's a good keyboard, there is no max, it's true n-key.

    It should not be possible for a key to get an SDL_KEYDOWN without an SDL_KEYUP, because when the key rollover kicks in, the pressed keys will send no hardware signals.

    I was sort of afraid of that, but the docs (at least the ones I have) weren't as clear on the topic as I would have liked.

    Run you pigeons, it's Robert Frost!
  • GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    bowen wrote: »
    The question then comes down to, how deep does the SDL buffer go before an overload happens if you don't read the events? Doesn't SDL poll instead of event firing?

    In buffered mode, it's event driven, in non-buffered mode, it's a polling mechanism. With SDL if you are doing the polling, it's a very thin wrapper over polling DirectX on Windows, so what the behavior is in that scenario is likely not even handled by SDL.

    Sagroth wrote: »
    Oh c'mon FyreWulff, no one's gonna pay to visit Uranus.
    Steam: Brainling, XBL / PSN: GnomeTank, NintendoID: Brainling, FF14: Zillius Rosh SFV: Brainling
  • InfidelInfidel Heretic Registered User regular
    You may assume that a KEYUP follows a KEYDOWN.

    Just be sure that when the exceptions occur (for unknown reasons that you can never really predict) that things behave in a safe manner.

    This is usually not a big deal. You have a KEYDOWN on W to move forward and you don't see a KEYUP, even though the player let go? Okay, just run with it. The player keeps moving forward. You've seen this in games before, surely. What do players do? Hit W again. You get a KEYDOWN and then a KEYUP and the game resumes.

    So just make sure that KEYDOWN twice doesn't blow you up your engine somehow. :rotate:

    OrokosPA.png
  • PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    Input's a funny thing, being able to recover from errors is everything because weird things can happen

  • bowenbowen How you doin'? Registered User regular
    Well that makes more sense as to why things do that now that you put it that way.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Joe KJoe K Registered User regular
    Infidel wrote: »
    You may assume that a KEYUP follows a KEYDOWN.

    Just be sure that when the exceptions occur (for unknown reasons that you can never really predict) that things behave in a safe manner.

    This is usually not a big deal. You have a KEYDOWN on W to move forward and you don't see a KEYUP, even though the player let go? Okay, just run with it. The player keeps moving forward. You've seen this in games before, surely. What do players do? Hit W again. You get a KEYDOWN and then a KEYUP and the game resumes.

    So just make sure that KEYDOWN twice doesn't blow you up your engine somehow. :rotate:

    and that's why you should be payiong attention to "keypress" events and only use keyup/keydown if you're absolutely positively stuck using them.

    because..... you can run into some funny bugs... the open source rdesktop program has a bug that every now and then it won't catch a keyup on a ctrl, alt, or shift, and then you're screwed unless you know the magic combo of holding down all your alt/ctrl/shift keys for 5 seconds to reset the keyboard state. (good lord have i worked with that program too much)

  • InfidelInfidel Heretic Registered User regular
    There, closed the old thread after 80 pages of the new one. :rotate:

    I blame that one necro, but I guess I could just be a proper thread dude and ask for a lock right away! :P

    OrokosPA.png
  • PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    edited April 2012
    Cache issue. Forgot to invalidate

    Phyphor on
  • Jimmy KingJimmy King Registered User regular
    Any of you have experience with rackspace cloud servers? I'm moving from a physical server to rackspace and have found that ctrl-c doesn't do anything in my shell on my server... so I can't stop a tail -f, etc. really annoying having to ctrl-z and then look up the pid to kill stuff. I'm going to cross post this over in the sys admin thread as well.

  • GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    Joe K wrote: »
    Infidel wrote: »
    You may assume that a KEYUP follows a KEYDOWN.

    Just be sure that when the exceptions occur (for unknown reasons that you can never really predict) that things behave in a safe manner.

    This is usually not a big deal. You have a KEYDOWN on W to move forward and you don't see a KEYUP, even though the player let go? Okay, just run with it. The player keeps moving forward. You've seen this in games before, surely. What do players do? Hit W again. You get a KEYDOWN and then a KEYUP and the game resumes.

    So just make sure that KEYDOWN twice doesn't blow you up your engine somehow. :rotate:

    and that's why you should be payiong attention to "keypress" events and only use keyup/keydown if you're absolutely positively stuck using them.

    because..... you can run into some funny bugs... the open source rdesktop program has a bug that every now and then it won't catch a keyup on a ctrl, alt, or shift, and then you're screwed unless you know the magic combo of holding down all your alt/ctrl/shift keys for 5 seconds to reset the keyboard state. (good lord have i worked with that program too much)

    Except we are talking about SDL, which has no concept of a full cycle key press event. Reading back two extra posts in the conversation would have made it clear we were talking about SDL.

    Sagroth wrote: »
    Oh c'mon FyreWulff, no one's gonna pay to visit Uranus.
    Steam: Brainling, XBL / PSN: GnomeTank, NintendoID: Brainling, FF14: Zillius Rosh SFV: Brainling
  • EndEnd Registered User regular
    edited April 2012
    Jimmy King wrote: »
    Any of you have experience with rackspace cloud servers? I'm moving from a physical server to rackspace and have found that ctrl-c doesn't do anything in my shell on my server... so I can't stop a tail -f, etc. really annoying having to ctrl-z and then look up the pid to kill stuff. I'm going to cross post this over in the sys admin thread as well.

    (I haven't used rackspace, but I can attempt to help a little bit)
    Are you using some sort of web console, an ssh to the console, or are you actually getting this issue while sshing directly to the VM?

    End on
    I wish that someway, somehow, that I could save every one of us
    zaleiria-by-lexxy-sig.jpgsteam~tinythumb.png
  • InfidelInfidel Heretic Registered User regular
    PAdev update:

    Four months in nearly. Things seem to be going well. Administration is minimal and mainly just keeping up on updates. No plans for additional admins, for sure.

    It is operating at 8 paid accounts which means I am eating $10+transaction fees a month. Fine by me and I don't intend to change the $5/mo figure, but if there are a couple (or more!) people looking for cheap "full access" hosting then feel free to signup.

    OrokosPA.png
  • Jimmy KingJimmy King Registered User regular
    End wrote: »
    Jimmy King wrote: »
    Any of you have experience with rackspace cloud servers? I'm moving from a physical server to rackspace and have found that ctrl-c doesn't do anything in my shell on my server... so I can't stop a tail -f, etc. really annoying having to ctrl-z and then look up the pid to kill stuff. I'm going to cross post this over in the sys admin thread as well.

    Are you using some sort of web console, an ssh to the console, or are you actually getting this issue while sshing directly to the VM?
    ssh direct to the vm through putty and through ssh from another linux box. Same issue with ctrl-c not behaving with both.

  • InfidelInfidel Heretic Registered User regular
    Try forcing pseudo-tty.
    ssh -t [email protected]
    

    OrokosPA.png
  • Jimmy KingJimmy King Registered User regular
    nope, ssh -t didn't do it. My guess is something with the way their hypervisor is set up intercepts that and so hopefully there's another thing I can hit instead that I'll find out about when I eventually ask their support.

  • bowenbowen How you doin'? Registered User regular
    Infidel wrote: »
    PAdev update:

    Four months in nearly. Things seem to be going well. Administration is minimal and mainly just keeping up on updates. No plans for additional admins, for sure.

    It is operating at 8 paid accounts which means I am eating $10+transaction fees a month. Fine by me and I don't intend to change the $5/mo figure, but if there are a couple (or more!) people looking for cheap "full access" hosting then feel free to signup.

    Would us paying $5.50 a month fix that? :lol:

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • InfidelInfidel Heretic Registered User regular
    bowen wrote: »
    Infidel wrote: »
    PAdev update:

    Four months in nearly. Things seem to be going well. Administration is minimal and mainly just keeping up on updates. No plans for additional admins, for sure.

    It is operating at 8 paid accounts which means I am eating $10+transaction fees a month. Fine by me and I don't intend to change the $5/mo figure, but if there are a couple (or more!) people looking for cheap "full access" hosting then feel free to signup.

    Would us paying $5.50 a month fix that? :lol:

    More like $6.25 but the resources we have right now it would be best for everyone if we just get a few more on board! :)

    Surely someone needs a dedicated server but not 100% theirs heh.

    OrokosPA.png
  • InfidelInfidel Heretic Registered User regular
    Jasconius wrote: »
    SOMETHING I am doing with Azure emulator causes it to immediately eat an entire core and bloat to 1GB of physical memory within 3 minutes.

    I have absolutely no idea what. The goddamn thing is just idling on the index page when it does this.

    It's not the .NET process itself.

    It's specifically the Azure process(es)

    The something is starting the Azure emulator. :rotate:

    (Sorry, no experience to actually help here.)

    OrokosPA.png
  • JasconiusJasconius sword criminal mad onlineRegistered User regular
    edited April 2012
    SOMETHING I am doing with Azure emulator causes it to immediately eat an entire core and bloat to 1GB of physical memory within 3 minutes.

    I have absolutely no idea what. The goddamn thing is just idling on the index page when it does this.

    It's not the .NET process itself.

    It's specifically the Azure process(es)

    Jasconius on
  • JasconiusJasconius sword criminal mad onlineRegistered User regular
    It's the Azure Worker that is going bananas

    here is the psuedocode

    while true

    check CloudStorage (development) for blobs

    if there are no blobs

    thread sleep 10 seconds


    there can't be any blobs because the system loses stability before I can even create one so


    It's not the while(true)/thread sleep. That's straight out of the Azure handbook.

    It must be something about accessing Cloud Storage.

  • bowenbowen How you doin'? Registered User regular
    Infidel wrote: »
    bowen wrote: »
    Infidel wrote: »
    PAdev update:

    Four months in nearly. Things seem to be going well. Administration is minimal and mainly just keeping up on updates. No plans for additional admins, for sure.

    It is operating at 8 paid accounts which means I am eating $10+transaction fees a month. Fine by me and I don't intend to change the $5/mo figure, but if there are a couple (or more!) people looking for cheap "full access" hosting then feel free to signup.

    Would us paying $5.50 a month fix that? :lol:

    More like $6.25 but the resources we have right now it would be best for everyone if we just get a few more on board! :)

    Surely someone needs a dedicated server but not 100% theirs heh.

    The only people that come to mind are the sys admin sister thread here.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • ToddJewellToddJewell Registered User regular
    I think I am going to be using my buddies lab for setting up mirroring / vmware / logging scenarios, although I don't know if your dev setup would have helped with that anyway.

  • GodfatherGodfather Registered User regular
    Hey guys, i'm looking for a real solid batch of online video tutorials for learning how to program for someone interested in becoming a software engineer. I'd also like to learn web programming as well, but think of that as the B-team to support the A!

    I really don't mind paying for them in the least; i've already tried going the "watch some free video tutorials online" route before and I could never find a consistent enough curriculum that would streamline everything I was learning; in short I would simply regurgitate what I knew without any rhyme or reason to what I was doing, and I could really use some real-world practical application to my lessons, whether they be for work or for fun.

    Any suggestions out there?

  • TomantaTomanta Registered User regular
    edited April 2012
    Check out Udacity (start with CS101). Some really, really great interactive video Python courses taught by some fairly notable people. And free.

    The above-mentioned CS101 (the intro course) builds a search engine.

    Tomanta on
  • Jimmy KingJimmy King Registered User regular
    I'll second Udacity. I just did their CS101 just to check out the format and they did a pretty good job with it... just waiting for the final to be available now. They have several classes, but only CS101 and one other are currently self paced. I suspect more will be starting next round of classes.

  • SaerisSaeris Borb Enthusiast flapflapflapflapRegistered User regular
    Infidel wrote: »
    PAdev update:

    Four months in nearly. Things seem to be going well. Administration is minimal and mainly just keeping up on updates. No plans for additional admins, for sure.

    It is operating at 8 paid accounts which means I am eating $10+transaction fees a month. Fine by me and I don't intend to change the $5/mo figure, but if there are a couple (or more!) people looking for cheap "full access" hosting then feel free to signup.

    I might sign up in a few weeks when I have more time to work on personal projects. We get our own subdomain, yeah?

    p.s. http://infidel.padev.net/ is showing phpinfo() right now. Intentional?

    borb_sig.png
  • InfidelInfidel Heretic Registered User regular
    Saeris wrote: »
    Infidel wrote: »
    PAdev update:

    Four months in nearly. Things seem to be going well. Administration is minimal and mainly just keeping up on updates. No plans for additional admins, for sure.

    It is operating at 8 paid accounts which means I am eating $10+transaction fees a month. Fine by me and I don't intend to change the $5/mo figure, but if there are a couple (or more!) people looking for cheap "full access" hosting then feel free to signup.

    I might sign up in a few weeks when I have more time to work on personal projects. We get our own subdomain, yeah?

    p.s. http://infidel.padev.net/ is showing phpinfo() right now. Intentional?

    Yes but no longer necessary soooooooo :D

    You get the subdomain out of the box, if you want me to host your own domains just let me know.

    You're getting a Linode that is (a) shared by us and (b) is not root. Anything you need root for you just hassle me, and if you need some software that is lacking I'll drop it on there.

    The idea is you can host things that are typically dedicated host only, but you don't really need all the resources that come with a dedicated server or the hassle of learning how to admin a Linux server. Geared for developers, and it's cheap.

    OrokosPA.png
  • GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    edited April 2012
    And I'll point out that Infidel's super responsive about stuff. He spent several hours getting Mono up to snuff for me, and I am pretty sure I'm the only person using Mono in any sort of serious capacity right now.

    GnomeTank on
    Sagroth wrote: »
    Oh c'mon FyreWulff, no one's gonna pay to visit Uranus.
    Steam: Brainling, XBL / PSN: GnomeTank, NintendoID: Brainling, FF14: Zillius Rosh SFV: Brainling
  • bowenbowen How you doin'? Registered User regular
    hah I have like 2-3 projects I've been wanting to do but like getting the motivation to do them is hurrrrrrgh.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Joe KJoe K Registered User regular
    bowen wrote: »
    hah I have like 2-3 projects I've been wanting to do but like getting the motivation to do them is hurrrrrrgh.

    i've found that the longer i've been in the business, that about 2 things give me the motivation to complete a project: money or the chance to educate someone else.

  • bowenbowen How you doin'? Registered User regular
    Yeah money motivates me, but I can't feed myself on hopes either.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • an_altan_alt Registered User regular
    Money is a big motivator, but I think what really gets me going is getting a crush on a particular technology or area of knowledge. A while back it was GPS and wi-fi modules that got my soldering iron moving. A few pages back the talk of VMs lined up nicely with running across a mention of Backtrack Linux that I haven't touched since it was called Auditor. Now if I can get all doe-eyed over something that can actually be used for work, that combination of time and enthusiasm pretty much guarantees it will get finished.

    Speaking of VMs, does anyone have any preferences between VMWare vs VirtualBox? I won't be pushing either very hard, but I'd love to hear either is better to become familiar with than the other.

    Pony wrote:
    I think that the internet has been for years on the path to creating what is essentially an electronic Necronomicon: A collection of blasphemous unrealities so perverse that to even glimpse at its contents, if but for a moment, is to irrevocably forfeit a portion of your sanity.
    Xbox - PearlBlueS0ul, Steam
    If you ever need to talk to someone, feel free to message me. Yes, that includes you.
  • JasconiusJasconius sword criminal mad onlineRegistered User regular
    i just started using VirtualBox on windows to run Fedora and so far, no complaints

  • bowenbowen How you doin'? Registered User regular
    Virtual box is by far superior unless you're on a Mac and can spend $100.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • EndEnd Registered User regular
    edited May 2012
    From personal experience, generally VirtualBox seems better for running on desktop/workstation

    For server stuff, I'd probably be more likely to use VMWare (but then it'd be ESXi or whatever instead of VMWare Player or whatever), but I haven't used VMWare at all in a while.

    End on
    I wish that someway, somehow, that I could save every one of us
    zaleiria-by-lexxy-sig.jpgsteam~tinythumb.png
  • GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    For desktop/personal use, I'd use VirtualBox.

    Sagroth wrote: »
    Oh c'mon FyreWulff, no one's gonna pay to visit Uranus.
    Steam: Brainling, XBL / PSN: GnomeTank, NintendoID: Brainling, FF14: Zillius Rosh SFV: Brainling
  • an_altan_alt Registered User regular
    Wow, thanks for the advice everyone. Some of my Googling had me leaning the other way, but I value the opinions in this thread more that most on the internet.

    Even if I don't post often, I almost always keep up with this thread. Now to fire up that Alfa 2W card and see if I can remember how to use whatever they're calling Ethereal now.

    Pony wrote:
    I think that the internet has been for years on the path to creating what is essentially an electronic Necronomicon: A collection of blasphemous unrealities so perverse that to even glimpse at its contents, if but for a moment, is to irrevocably forfeit a portion of your sanity.
    Xbox - PearlBlueS0ul, Steam
    If you ever need to talk to someone, feel free to message me. Yes, that includes you.
  • bowenbowen How you doin'? Registered User regular
    VMWare has this huge cult following full of a bunch of douchenozzles. It's great enterprise level, but user level, hahahaha.

    VMWare fusion was pretty good, but I've gotten better results from VirtualBox -- especially on windows.

    Plus there's the integration piece which is hilariously amazing. Switch to integration mode, use Visual Studio on Mac.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
This discussion has been closed.