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/

[Programming] Thread: Fixed last bug in 5 month thread

1939495969799»

Posts

  • Alistair HuttonAlistair Hutton Dr EdinburghRegistered User regular
    Oh gawd Javascript why do you let me use double and single quotation marks for strings?

    WHY ARE THERE TWO CHOICES FOR A FUNDAMENTAL DATA TYPE LIKE THIS??

    'Because then I can do "this" without going crazy with what the kids call "backslashes"'

    I have a thoughtful and infrequently updated blog about games http://whatithinkaboutwhenithinkaboutgames.wordpress.com/

    I made a game, it has penguins in it. It's pay what you like on Gumroad.

    Currently Ebaying Nothing at all but I might do in the future.
  • Monkey Ball WarriorMonkey Ball Warrior A collection of mediocre hats Seattle, WARegistered User regular
    edited August 2015
    Infidel wrote: »
    That's because too long of lines in content is poor for readability, they're doing that intentionally.

    Zoom in with Ctrl +!

    Eh, only if you are not used to it. I think using huge margins like that is a far too common web design crutch. If you were really worried about readability you could use columns or dynamic font sizes or something.

    Although compared to the horrible things microsoft has been doing with UI's the past several years it is relatively benign. I played around with Win10 a bit. They are completely obsessed with right angles. And hiding the edges of UI elements so you have to guess where they are or hover over them.

    Monkey Ball Warrior on
    "I resent the entire notion of a body as an ante and then raise you a generalized dissatisfaction with physicality itself" -- Tycho
  • Jimmy KingJimmy King Registered User regular
    wheee. Demo of our latest website today internally. Not at all a complete product yet, just a "here's what it currently is". Hopefully I'm finding all of the "this works in dev, why the fuck is it broken on the staging site?" shit right now so that I can fix them or explain why it's reasonable for the issue at this point. Definitely found a few things.

  • bowenbowen How you doin'? Registered User regular
    Infidel wrote: »
    That's because too long of lines in content is poor for readability, they're doing that intentionally.

    Zoom in with Ctrl +!

    Eh, only if you are not used to it. I think using huge margins like that is a far too common web design crutch. If you were really worried about readability you could use columns or dynamic font sizes or something.

    Although compared to the horrible things microsoft has been doing with UI's the past several years it is relatively benign. I played around with Win10 a bit. They are completely obsessed with right angles. And hiding the edges of UI elements so you have to guess where they are or hover over them.

    There's not enough text to fill it.

    Dynamic font sizes would be crazy. The point of high resolution monitors isn't "HOW BIG CAN I MAKE MY ONE PROGRAM?!" it's "Yay now I can have more programs open at once at their native resolution!"

    There's never really a good answer to this, it's almost certainly "change your browser for your monitor and zoom/unzoom" and has been that way since the late 90s when people started having wildly different monitor sizes.

    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
  • crimsoncoyotecrimsoncoyote Registered User regular
    Woo, hackathon has begun!

  • EchoEcho ski-bap ba-dapModerator mod
    Dear person who makes registration codes that are hexadecimal strings and make them case-sensitive:

    cut%20yourself.jpg

  • urahonkyurahonky Registered User regular
    I'm a rebel. I use single and double quotes in the same line.

    It pains me to go back to Java where single quotes is only for chars and double quotes are for strings.

  • TofystedethTofystedeth Registered User regular
    Python strings
    'string'
    "alsostring"
    "string with 'quotes' "
    ' "scare quotes" '
    """ the fuck
    even is 
    this"""
    
    ''' nooo single
    quotes
    not you 
    too! '''
    

    steam_sig.png
  • a5ehrena5ehren AtlantaRegistered User regular
    Hrm, having a weird segfault issue, but I want to save it for the next thread so I actually get help :P

  • bowenbowen How you doin'? Registered User regular
    Oh shit I didn't even realize we're at 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
  • BarrakkethBarrakketh Registered User regular
    Python strings
    """ the fuck
    even is 
    this"""
    
    Not sure if serious, but that is a multiline string. Handy for docstrings, CLI help (argparse et al), and regular expressions using the verbose flag:
    a = re.compile(r"""\d +  # the integral part
                       \.    # the decimal point
                       \d *  # some fractional digits""", re.X)
    
    Which can help save your sanity when dealing with long/complex expressions and you're using features like named groups.

    Rollers are red, chargers are blue....omae wa mou shindeiru
  • TofystedethTofystedeth Registered User regular
    Not serious. Just like poking fun.
    I <3 Python.

    steam_sig.png
  • crimsoncoyotecrimsoncoyote Registered User regular
    edited August 2015
    ihavenoideawhatimdoing

    it's k
    we got this
    #hackathon

    crimsoncoyote on
  • InfidelInfidel Heretic Registered User regular
    ihavenoideawhatimdoing

    it's k
    we got this
    #hackathon

    I won my last hackathon. The pressure is on you now, cc!

    OrokosPA.png
  • a5ehrena5ehren AtlantaRegistered User regular
    edited August 2015
    class BaseCls
    {
    	public:
    	virtual void Cleanup() {};
    	SIGNAL *ReleaseSignal() {
    		//stuff
    		Cleanup(); //SIGSEGV, code 1 "address not mapped to object"
    		//stuff
    	};
    }
    
    class derivedCls : public BaseCls
    {
    	public:
    	void Cleanup() {};
    }
    
    class ddCls : public derivedCls
    {
    	//nothing useful
    }
    
    void Function (void){
    	ddCls thing;
    	//this goes straight to the base class because the intermediates do not overload it...
    	//  so it calls the virtual in the base class?
    	thing.ReleaseSignal();
    }
    

    This is obviously greatly simplfied, but the general flow is the same.

    Only change is going from GCC 4.6/C++03 to GCC 4.9/C++11. I assume it is something to do with calling the virtual function, but I really have no idea.

    Cleanup() is an empty function everywhere I've seen it, so I don't know why they bothered making it virtual (or making it in the first place).

    a5ehren on
  • TofystedethTofystedeth Registered User regular
    Yes Visual Studio, complain in the part of the XAML where I defined the style that the target type doesn't match the thing I tried to apply it to, instead of where I made the bogus assignment.
    That makes perfect sense.

    steam_sig.png
  • bowenbowen How you doin'? Registered User regular
    It's so hit or miss what it complains about.

    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
  • djmitchelladjmitchella Registered User regular
    GnomeTank wrote: »
    At a fundamental level it's no different than just using HTML. The syntax differs. You're not using Jade or Handlebars for the templating so much in this case as using it for syntax, which many people prefer over HTML. No different than writing your React's JavaScript code in Coffee or TypeScript (which is a touch harder because of the way JSX works, but people are doing it).

    Okay, that makes sense; thanks for explaining!

  • PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    a5ehren wrote: »
    class BaseCls
    {
    	public:
    	virtual void Cleanup() {};
    	SIGNAL *ReleaseSignal() {
    		//stuff
    		Cleanup(); //SIGSEGV, code 1 "address not mapped to object"
    		//stuff
    	};
    }
    
    class derivedCls : public BaseCls
    {
    	public:
    	void Cleanup() {};
    }
    
    class ddCls : public derivedCls
    {
    	//nothing useful
    }
    
    void Function (void){
    	ddCls thing;
    	//this goes straight to the base class because the intermediates do not overload it...
    	//  so it calls the virtual in the base class?
    	thing.ReleaseSignal();
    }
    

    This is obviously greatly simplfied, but the general flow is the same.

    Only change is going from GCC 4.6/C++03 to GCC 4.9/C++11. I assume it is something to do with calling the virtual function, but I really have no idea.

    Cleanup() is an empty function everywhere I've seen it, so I don't know why they bothered making it virtual (or making it in the first place).

    So the call order here would be base::releasesignal -> derived::cleanup. Everything should be fine here unless something interesting happens in those stuff blocks

  • a5ehrena5ehren AtlantaRegistered User regular
    edited August 2015
    Except my core dump has it calling base::cleanup, and then GDB can't access the memory at the address the segfault is reporting (which is not the address for base::cleanup...) . So I'm not even sure what it's trying to do, but the segfault disappears if I comment out the call to cleanup() in the releasesignal method.

    My suspicion is some kind of stack overflow (the main "stuff" block in the function is loading up a fuckoff-huge signal), but I'm not sure why that would only show up after I changed compilers.

    a5ehren on
  • bowenbowen How you doin'? Registered User regular
    Hmm yeah I would expect that.

    ReleaseSignal calls Cleanup, so Cleanup should be the top most on your stack?

    I imagine the problems are in //stuff

    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
  • JasconiusJasconius sword criminal mad onlineRegistered User regular
    if I had a nickel for every "how did it even run in the first place" moment...

    id have a shitload of nickels

  • bowenbowen How you doin'? Registered User regular
    Jasconius wrote: »
    if I had a nickel for every "how did it even run in the first place" moment...

    id have a shitload of nickels

    Maybe even a dollar!

    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
  • bowenbowen How you doin'? Registered User regular
    Actually it should be going into derivedCls' cleanup shouldn't it?

    Why is it attempting to use the BaseCls? Sounds like there might be a compiler option or some such that's fucking with this?

    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
  • JasconiusJasconius sword criminal mad onlineRegistered User regular
    when you fix the last bug in a four month project....

    https://www.youtube.com/watch?v=D-8tMD77bvI

  • ecco the dolphinecco the dolphin Registered User regular
    Jasconius wrote: »
    when you fix the last bug in a four month project....

    https://www.youtube.com/watch?v=D-8tMD77bvI

    Haha, good way to end the thread! =)

    New thread here:

    http://forums.penny-arcade.com/discussion/200316/this-is-new-programming-thread-0-days-since-last-bug

    Penny Arcade Developers at PADev.net.
  • a5ehrena5ehren AtlantaRegistered User regular
    edited August 2015
    bowen wrote: »
    Actually it should be going into derivedCls' cleanup shouldn't it?

    Why is it attempting to use the BaseCls? Sounds like there might be a compiler option or some such that's fucking with this?

    Only compiler options are -O0 and -std=gnu++11, with -Wall and -Wextra for good measure. Static analysis on the two classes doesn't come up with anything, either.

    My next thing to try is either Address Sanitizer or Valgrind.

    a5ehren on
  • bowenbowen How you doin'? Registered User regular
    Hmm, seems to work 100% fine on Visual Studio and a few other online based ones.

    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
  • a5ehrena5ehren AtlantaRegistered User regular
    Yeah, I guess I'll run it with ASAN and see if it is a stack issue.

This discussion has been closed.