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/
Options

[Programming] Page overflow to new thread

16667697172101

Posts

  • Options
    EchoEcho ski-bap ba-dapModerator mod
    Important part of the background scenery when I'm in video meetings.

    oofayqt86tng.png

  • Options
    CampyCampy Registered User regular
    Echo wrote: »
    Important part of the background scenery when I'm in video meetings.

    snip
    oofayqt86tng.png

    That's great, Jaeger has to have my all time favourite logo. So much determination on his fuzzy little face.

    092fjrgzoou6.png


  • Options
    GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    I have my Gopher sitting in front of me. I should find a way to get him integrated in to the background for my zoom meetings.

    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
  • Options
    ElaroElaro Apologetic Registered User regular
    Okay, let's be frank. Who here has looked at the technical vocabulary of our field and thought "This is a weird word for that concept. I could do better"?

    Like, look at "library" (and I'm only partially saying this because looking up "MIDI file programming library" generally gives half programming results and half MIDI file archives). Why are a bunch of functions/classes not strung together by a program called a "library" and not, say, a "toolbox"? Heck, why aren't certain classes meant to be used as-is (or out-of-the-box) simply called "tools" or "tool classes"? Hell, why is it called a "class" and not a "blueprint"?

    Ugh, my profession irritates me sometimes, I swear.

    Children's rights are human rights.
  • Options
    LD50LD50 Registered User regular
    Nearly every programming lingo word was a bad choice.

  • Options
    admanbadmanb unionize your workplace Seattle, WARegistered User regular
    All words are bad.

  • Options
    EtheaEthea Registered User regular
    Wikipedia says we use the term library since some of the architectures of 'modern' computing imagined libraries / shelves full of subroutines that people could basically check out.

    https://en.wikipedia.org/wiki/Library_(computing)

  • Options
    TelMarineTelMarine Registered User regular
    Elaro wrote: »
    Okay, let's be frank. Who here has looked at the technical vocabulary of our field and thought "This is a weird word for that concept. I could do better"?

    Like, look at "library" (and I'm only partially saying this because looking up "MIDI file programming library" generally gives half programming results and half MIDI file archives). Why are a bunch of functions/classes not strung together by a program called a "library" and not, say, a "toolbox"? Heck, why aren't certain classes meant to be used as-is (or out-of-the-box) simply called "tools" or "tool classes"? Hell, why is it called a "class" and not a "blueprint"?

    Ugh, my profession irritates me sometimes, I swear.

    I often have found myself getting caught on trying to understand nomenclature. For a long time, I had a hard time understanding and remembering what a "callback" was. Once I understood it, the term "handler" made more sense to me. Now every time I see "callback" I substitute it for "handler" in my head.

    3ds: 4983-4935-4575
  • Options
    SpoitSpoit *twitch twitch* Registered User regular
    Ethea wrote: »
    Wikipedia says we use the term library since some of the architectures of 'modern' computing imagined libraries / shelves full of subroutines that people could basically check out.

    https://en.wikipedia.org/wiki/Library_(computing)

    Was that back when they were stacks of cards?

    steam_sig.png
  • Options
    EchoEcho ski-bap ba-dapModerator mod
    Spoit wrote: »
    Ethea wrote: »
    Wikipedia says we use the term library since some of the architectures of 'modern' computing imagined libraries / shelves full of subroutines that people could basically check out.

    https://en.wikipedia.org/wiki/Library_(computing)

    Was that back when they were stacks of cards?

    "Aww, you're out of if/else?"

  • Options
    EtheaEthea Registered User regular
    Before punch cards when you had ticker tape, physical wiring, and vacuum tubes.

  • Options
    PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    We've got some cmake people here right?

    I have some code structured like this

    /modules/foo/CMakeLists.txt
    /modules/foo/src/...
    /modules/foo/test/test.cc
    /test/CMakeLists.txt
    /test/... (other test code)

    Right now, I produce a module_foo library, a module_foo_test library that links against module_foo and the main test binary can link against that library, but because how googletest interacts with linking rules all the tests get dropped because they rely on c++ static initializers being run without being referenced

    One option could be to explicitly reference test.cc in the main test binary's rule, but referenceing something like ../../modules/foo/test/test.cc is kinda ugly. --whole-archive does what I want (include all of the object files directly) but I don't know if I can just turn it on for the one library, though if I can't just do it for just the one I guess that's fine

  • Options
    EtheaEthea Registered User regular
    Phyphor wrote: »
    We've got some cmake people here right?

    I have some code structured like this

    /modules/foo/CMakeLists.txt
    /modules/foo/src/...
    /modules/foo/test/test.cc
    /test/CMakeLists.txt
    /test/... (other test code)

    Right now, I produce a module_foo library, a module_foo_test library that links against module_foo and the main test binary can link against that library, but because how googletest interacts with linking rules all the tests get dropped because they rely on c++ static initializers being run without being referenced

    One option could be to explicitly reference test.cc in the main test binary's rule, but referenceing something like ../../modules/foo/test/test.cc is kinda ugly. --whole-archive does what I want (include all of the object files directly) but I don't know if I can just turn it on for the one library, though if I can't just do it for just the one I guess that's fine

    Yes I am a CMake person.

    module_foo_test should be an OBJECT library so that all the .o get slammed into the final test executable instead of using an archive.

  • Options
    PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    Ethea wrote: »
    Phyphor wrote: »
    We've got some cmake people here right?

    I have some code structured like this

    /modules/foo/CMakeLists.txt
    /modules/foo/src/...
    /modules/foo/test/test.cc
    /test/CMakeLists.txt
    /test/... (other test code)

    Right now, I produce a module_foo library, a module_foo_test library that links against module_foo and the main test binary can link against that library, but because how googletest interacts with linking rules all the tests get dropped because they rely on c++ static initializers being run without being referenced

    One option could be to explicitly reference test.cc in the main test binary's rule, but referenceing something like ../../modules/foo/test/test.cc is kinda ugly. --whole-archive does what I want (include all of the object files directly) but I don't know if I can just turn it on for the one library, though if I can't just do it for just the one I guess that's fine

    Yes I am a CMake person.

    module_foo_test should be an OBJECT library so that all the .o get slammed into the final test executable instead of using an archive.

    Okay that fixes the link issue, but I'd like to be able to add some include paths and without calling target_link_libraries (which seems to cause issues with object libraries) target_include_directories seems to have no effect

  • Options
    EtheaEthea Registered User regular
    Sounds like tour CMake version is fairly old.

    You will want to upgrade to CMake 3.12+ and those issues will go away

  • Options
    PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    Ahh that explains why it worked on my machine and failed on the build bots. Thanks

  • Options
    PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    Holy crap things have gotten massive. An Unreal Engine build on the ue5 experimental branch + a debug game editor build clocks in at 210 GB. Between that, a normal UE4 build and a hundred GB from having all of LLVM compiled in debug no wonder I'm out of space on that SSD

  • Options
    AkimboEGAkimboEG Mr. Fancypants Wears very fine pants indeedRegistered User regular
    I was really excited to play around with UE5. And then I saw the file sizes. Just absolutely not worth the hassle.

    Give me a kiss to build a dream on; And my imagination will thrive upon that kiss; Sweetheart, I ask no more than this; A kiss to build a dream on
  • Options
    CampyCampy Registered User regular
    AkimboEG wrote: »
    I was really excited to play around with UE5. And then I saw the file sizes. Just absolutely not worth the hassle.

    That demo really was something else though. First time in a while where I feel like I've been blown away by an engine.

  • Options
    bowenbowen How you doin'? Registered User regular
    AkimboEG wrote: »
    I was really excited to play around with UE5. And then I saw the file sizes. Just absolutely not worth the hassle.

    Yup, Unity for me because I do not have Terabytes of hard drive space to work with.

    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
  • Options
    PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    It probably would be significantly smaller if I just installed the prebuilt ones they make available but if they're gonna give me C++ source to a quality game engine I'm gonna compile it from source so I can poke around in it!

  • Options
    GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    I have a serious love/hate relationship with Rust at this point. I love what it's trying to do, I think it's goals are great and it has some wonderful features...but I hate the syntax in a lot of cases. And I hate having to constantly fight the compiler and it's very obtuse error messages that assume you already know the Rusty-ass-rust way to do something.

    Someone is going to take the next logical step here and write a language that provides a lot of Rusts data guarantees but without a compiler that hates you and wants you to get nothing practical done.

    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
  • Options
    TelMarineTelMarine Registered User regular
    GnomeTank wrote: »
    I have a serious love/hate relationship with Rust at this point. I love what it's trying to do, I think it's goals are great and it has some wonderful features...but I hate the syntax in a lot of cases. And I hate having to constantly fight the compiler and it's very obtuse error messages that assume you already know the Rusty-ass-rust way to do something.

    Someone is going to take the next logical step here and write a language that provides a lot of Rusts data guarantees but without a compiler that hates you and wants you to get nothing practical done.

    I was learning Rust for fun some months ago and one thing I found really hard to understand was the crate/packaging system. I like though how with borrowing/ownership, it makes you think about how memory is being allocated and used, even though it can be a bit tricky sometimes.

    3ds: 4983-4935-4575
  • Options
    EchoEcho ski-bap ba-dapModerator mod
    I've been meaning to take a look at Rust, but nowadays I really don't feel like looking at code after work hours.

  • Options
    CampyCampy Registered User regular
    Echo wrote: »
    I've been meaning to take a look at Rust, but nowadays I really don't feel like looking at code after work hours.

    Hello me, how are you doing?

  • Options
    electricitylikesmeelectricitylikesme Registered User regular
    C# is a good language which is filled with baffling design omissions

    Auto-properties are one of them. What is an autoproperty you ask? It's when you write this:
    namespace MyProgram {
        public class MyClass {
            public string MyProperty { get; set; }
        }
    }
    

    Now, this primarily exists so you can do things like make the setter private or whatever so you can make a read-only "variable-like" thing.

    But here's an obvious thing you'd also like to do with this syntax: filter the setter in some way. In my specific case I'm doing COM-interop with VBA, and so to pass a sensible thing onto the JSON library I'd really like incoming DateTime's to be forced to be interpreted as Local - since this is what they are. Simple, literally does not change value change.

    You would think that this would be allowed syntax:
    namespace MyProgram {
        public class MyClass {
            public string MyProperty { get; set => FilterFunc(value); }
        }
    }
    

    And you would be wrong. That one simple change suddenly explodes into this monstrosity:
    namespace MyProgram {
        public class MyClass {
            private string _MyProperty;
            public string MyProperty { get => _MyProperty; set => { _MyProperty = FilterFunc(value); } }
        }
    }
    

    An extra variable, namespacing concerns, more brackets and whatever else. Just...why? Why do this?

  • Options
    LuvTheMonkeyLuvTheMonkey High Sierra Serenade Registered User regular
    That's changing in C# 10! New 'field' keyword added to access the backing field of auto-implemented properties without dropping to the full syntax:
    class Person
    {
      public string Name { get; init => field = value.Trim(); }
      public DateTime DateOfBirth { get; set => field = value.Date; }
    }
    

    Molten variables hiss and roar. On my mind-forge, I hammer them into the greatsword Epistemology. Many are my foes this night.
    STEAM | GW2: Thalys
  • Options
    electricitylikesmeelectricitylikesme Registered User regular
    Finally.

  • Options
    InfidelInfidel Heretic Registered User regular
    Finally.

    No that's for exceptions.

    OrokosPA.png
  • Options
    LuvTheMonkeyLuvTheMonkey High Sierra Serenade Registered User regular
    I am sad that the Discriminated Unions proposal is not making it into C# 10, I'd really like to have that functionality.

    Molten variables hiss and roar. On my mind-forge, I hammer them into the greatsword Epistemology. Many are my foes this night.
    STEAM | GW2: Thalys
  • Options
    gavindelgavindel The reason all your software is brokenRegistered User regular
    edited July 2021
    Infidel wrote: »
    Finally.

    No that's for exceptions.

    electricitylikesme does not deserve to catch that kind of guff.

    gavindel on
    Book - Royal road - Free! Seraphim === TTRPG - Wuxia - Free! Seln Alora
  • Options
    CampyCampy Registered User regular
    gavindel wrote: »
    Infidel wrote: »
    Finally.

    No that's for exceptions.

    electricitylikesme does not deserve to catch that kind of guff.

    Come on, you're not even trying with that pun.

  • Options
    CampyCampy Registered User regular
    I am sad that the Discriminated Unions proposal is not making it into C# 10, I'd really like to have that functionality.

    Having spent a decent amount of my time at my new job working with Typescript on React. Going back to C# has me missing unions haaaaard. There's all this new wiring in my brain that just doesn't work.

  • Options
    GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    Part of the reason that TypeScript works is that it has a wildly flexible type system. If it was too rigid you couldn't express the wild-west of interfaces that JavaScript allows.

    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
  • Options
    CampyCampy Registered User regular
    Yeah, I've no idea how the types systems of either language works under the hood. But I can imagine that trying to shoehorn union types into a language that's been strictly typed from the bottom up can be no easy task.

    There's just been a good few times over the last weeks where I'm coding with a solution in mind before realising that no, I can't do that part at all!

    Hopefully it's just back end work for me for a while so I can get my knuckle dragging mojo back!

  • Options
    urahonkyurahonky Resident FF7R hater Registered User regular
    So how do you guys use git's cherry pick? We have 3 branches:

    production
    master
    bug-fix

    In bug-fix branch I made a change that needs to go to production today. Unfortunately it's been branched from master and contains stuff that isn't ready for production. So all I need is production to have the changes I made in bug-fix. Without causing issues on the next production deployment.

  • Options
    urahonkyurahonky Resident FF7R hater Registered User regular
    Is it seriously just:

    git cherry-pick <bug-fix sha>
    git checkout production
    git cherry-pick -f

    ??? noo there's no way.

  • Options
    InfidelInfidel Heretic Registered User regular
    urahonky wrote: »
    So how do you guys use git's cherry pick? We have 3 branches:

    production
    master
    bug-fix

    In bug-fix branch I made a change that needs to go to production today. Unfortunately it's been branched from master and contains stuff that isn't ready for production. So all I need is production to have the changes I made in bug-fix. Without causing issues on the next production deployment.

    Sounds like you created your fix branch incorrectly, should be made off a release branch/tag and then the fix cherry-picked into it.

    You can make your fix on the fix branch directly and then cherry-pick to master, but that tends to end up with more regressions from missed fixes. If you do it onto master (like your sorta have?) then cherry-pick it into your fix branch (off release branch/tag as mentioned) then you get the same result but without the ability to miss merging back into mainline.

    You're very unlikely to miss putting the commit in your fix branch you're releasing right away. :P

    OrokosPA.png
  • Options
    KakodaimonosKakodaimonos Code fondler Helping the 1% get richerRegistered User regular
    Save yourself a headache and create a branch (hotfix or whatever you want to call it) from production. Cherry pick the change from bug-fix into your newly created branch. If there's no merge issues, commit & push and then either merge or do a pull request from the hotfix branch you created into production.

    Doing a cherry pick into the intermediate branch makes it easier if you have any merge conflicts that need resolved.

  • Options
    urahonkyurahonky Resident FF7R hater Registered User regular
    Infidel wrote: »
    urahonky wrote: »
    So how do you guys use git's cherry pick? We have 3 branches:

    production
    master
    bug-fix

    In bug-fix branch I made a change that needs to go to production today. Unfortunately it's been branched from master and contains stuff that isn't ready for production. So all I need is production to have the changes I made in bug-fix. Without causing issues on the next production deployment.

    Sounds like you created your fix branch incorrectly, should be made off a release branch/tag and then the fix cherry-picked into it.

    You can make your fix on the fix branch directly and then cherry-pick to master, but that tends to end up with more regressions from missed fixes. If you do it onto master (like your sorta have?) then cherry-pick it into your fix branch (off release branch/tag as mentioned) then you get the same result but without the ability to miss merging back into mainline.

    You're very unlikely to miss putting the commit in your fix branch you're releasing right away. :P

    Yeah the bug-fix branch was created off master because our production release was last night and I need to also push it to UAT for testing (we have CI/CD setup) and I didn't realize that there were possible breaking changes pushed to master in the last 12 hours lol.

This discussion has been closed.