Club PA 2.0 has arrived! If you'd like to access some extra PA content and help support the forums, check it out at patreon.com/ClubPA
The image size limit has been raised to 1mb! Anything larger than that should be linked to. This is a HARD limit, please do not abuse it.
Our new Indie Games subforum is now open for business in G&T. Go and check it out, you might land a code for a free game. If you're developing an indie game and want to post about it, follow these directions. If you don't, he'll break your legs! Hahaha! Seriously though.
Our rules have been updated and given their own forum. Go and look at them! They are nice, and there may be new ones that you didn't know about! Hooray for rules! Hooray for The System! Hooray for Conforming!

[Programming] Mirror, mirror, on the wall, show the git diff for them all

24567100

Posts

  • TofystedethTofystedeth veni, veneri, vamoosi Registered User regular
    for i in range(1,11):print("{0}  {1}".format(i,10-(i-1)))
    

    steam_sig.png
  • DehumanizedDehumanized Registered User regular
    whitespace can't save you from that loop

    nothing can

  • NogsNogs Crap, crap, mega crap. Registered User regular
    For you React folks, this looks pretty nifty - live editing of code in the browser which then gets re-run, while preserving state. (in the real world, it's when you save files, but still pretty handy).

    video here. It's not quite the same as the existing livereload you get with grunt/ember-cli/etc, this one preserves the state of your app and changes the code under it, rather than just automatically hitting "refresh".

    ya man, its pretty sweet. been using it for about a month now.

    one thing that is weird with it though, is when you pair it with flux or something. its a little hard to know/handle state stuff. hard to explain, but its hard to know what your state truly is at any given time with hot-loader.

    but it is super slick for working with css and messing around with markup in the render() method.

    rotate.jpg
    PARKER, YOU'RE FIRED! <-- My comic book podcast! Satan look here!
    djmitchella
  • EndEnd Registered User regular
    edited August 2015
    bowen wrote: »
    Rend wrote: »
    bowen wrote: »
    Sometimes I do stuff like this:
    for(int i = 0, j = 11; i < 10 && j >0; printf("%d  ",++i), printf("%d\r\n",--j));
    

    This is the strongest argument for controlled whitespace that I have seen to date.

    I bet there's still a legal move in python that does something like that.

    outside of using eval, not really something "like that" that I know of

    you can use semicolons to contain multiple statements on a line, but it's limited to "simple statements", which excludes block defining statements (if/while/etc), specifically they can't come after the semicolon

    with that specific example you could zip on range or just unroll the damn loop, but I don't think that's really the intent here, is it

    End on
    I wish that someway, somehow, that I could save every one of us
    zaleiria-by-lexxy-sig.jpgsteam~tinythumb.png
  • EndEnd Registered User regular
    not that there isn't other ways to make garbage looking python code, though

    indentation is just one place where it tries to save you from yourself

    I wish that someway, somehow, that I could save every one of us
    zaleiria-by-lexxy-sig.jpgsteam~tinythumb.png
  • KamiroKamiro Registered User regular
    Is it weird as a contractor that I hate working with other contractors? Every other contractor we've worked with has been terrible! Where are all the good ones? Just give us the contract and we'll make it work, I swear.

  • SyphyreSyphyre A Dangerous Pastime Registered User regular
    Look, we have scrolling editors for a reason. People who jam 4 lines of code into one line drive me nuts. Clarity people. Clarity.

    On the other hand, vertical space is valuable as well. People who only put one bracket on a line deserve to eat horrible things from the fridge for a month. I'm looking at you default C# settings in VS.

    As much as I enjoy C#, god the naming and coding conventions are horrible.

    Steam ID - Syphyreal --- 3DS Friend Code: 2723-9387-1002
  • RendRend Registered User regular
    edited August 2015
    Syphyre wrote: »
    Look, we have scrolling editors for a reason. People who jam 4 lines of code into one line drive me nuts. Clarity people. Clarity.

    On the other hand, vertical space is valuable as well. People who only put one bracket on a line deserve to eat horrible things from the fridge for a month. I'm looking at you default C# settings in VS.

    As much as I enjoy C#, god the naming and coding conventions are horrible.

    I actually prefer the bracket on the next line (though I usually don't use it since it defies convention for most of the code base I write in). I feel like most people use blank lines as "paragraphs" in code, right? Having a bracket on the next line is just the same as starting your functions and classes with a paragraph.

    Rend on
    Delmainhtmcrimsoncoyote
  • NogsNogs Crap, crap, mega crap. Registered User regular
    #1
    x = {
         "some": thing
    }
    

    or

    #2
    x =
    {
         "some": thing
    }
    
    the answer is #1.

    rotate.jpg
    PARKER, YOU'RE FIRED! <-- My comic book podcast! Satan look here!
    Echoqwer12
  • RendRend Registered User regular
    Nogs wrote: »
    #1
    x = {
         "some": thing
    }
    

    or

    #2
    x =
    {
         "some": thing
    }
    
    the answer is #1.

    In fairness, usually in C# the "x=" line is significantly longer :p

  • RendRend Registered User regular
    public Boolean canBeProcessed(Foo toBeProcessed) {
      if(toBeProcesssed != null && toBeProcessed.field != SOME_CONSTANT){
        //Start verifying with the Bar object about some crap
        ...
        ...
    
    public Boolean canBeProcessed(Foo toBeProcessed) 
    {
      if(toBeProcesssed != null && toBeProcessed.field != SOME_CONSTANT)
      {
        //Start verifying with the Bar object about some crap
        ...
        ...
    

  • NogsNogs Crap, crap, mega crap. Registered User regular
    still prefer #1

    by a lot

    rotate.jpg
    PARKER, YOU'RE FIRED! <-- My comic book podcast! Satan look here!
    Echoqwer12
  • DelmainDelmain Registered User regular
    edited August 2015
    brackets on new lines unless it's a one-liner a la
    var thing = new Thing { Prop = p, Name = n };
    

    Delmain on
    syndalis wrote: »
    Apple is a terrible company.
    bowenmightyjongyoa5ehrencrimsoncoyoteEvigilantIncindiumzagdrob
  • NogsNogs Crap, crap, mega crap. Registered User regular
    again

    you are all crazy

    rotate.jpg
    PARKER, YOU'RE FIRED! <-- My comic book podcast! Satan look here!
    qwer12Elaro
  • DelmainDelmain Registered User regular
    you're welcome to have your own opinion

    no matter how wrong it is

    syndalis wrote: »
    Apple is a terrible company.
    bowenMahnmutAlistair HuttoncrimsoncoyoteEvigilantIncindiumzagdrob
  • hippofanthippofant ティンク Registered User regular
    edited August 2015
    Delmain wrote: »
    you're welcome to have your own opinion {

    no matter how wrong it is
    }

    hippofant on
    urahonky
  • LD50LD50 Registered User regular
    I like #1. I like tabs instead of spaces too, because all you fucks have editors where you can change the tab width. Any other holy wars we should revive while we still have the new thread smell?

    Nogsqwer12
  • NogsNogs Crap, crap, mega crap. Registered User regular
    i like you LD50

    rotate.jpg
    PARKER, YOU'RE FIRED! <-- My comic book podcast! Satan look here!
  • RendRend Registered User regular
    Nogs wrote: »
    again

    you are all crazy

    I just prefer vertical whitespace separating blocks of code is all.

    Delmainmightyjongyourahonky
  • urahonkyurahonky Registered User regular
    Takes gulp 15 seconds to compile everything but if you are missing a parenthesis ANYWHERE the shit breaks in an instant.

  • NogsNogs Crap, crap, mega crap. Registered User regular
    edited August 2015
    urahonky wrote: »
    Takes gulp 15 seconds to compile everything but if you are missing a parenthesis ANYWHERE the shit breaks in an instant.

    eslint booooi

    http://eslint.org/

    Nogs on
    rotate.jpg
    PARKER, YOU'RE FIRED! <-- My comic book podcast! Satan look here!
  • urahonkyurahonky Registered User regular
    Nogs wrote: »
    urahonky wrote: »
    Takes gulp 15 seconds to compile everything but if you are missing a parenthesis ANYWHERE the shit breaks in an instant.

    eslint booooi

    http://eslint.org/

    God the changes I'm going to make to this project when I get some breathing space...

    I'm at 65 hours this week so far...

  • NogsNogs Crap, crap, mega crap. Registered User regular
    urahonky wrote: »
    Nogs wrote: »
    urahonky wrote: »
    Takes gulp 15 seconds to compile everything but if you are missing a parenthesis ANYWHERE the shit breaks in an instant.

    eslint booooi

    http://eslint.org/

    God the changes I'm going to make to this project when I get some breathing space...

    I'm at 65 hours this week so far...

    :(

    I know it means nothing, but if the project was open source i would totally be helping you right now

    rotate.jpg
    PARKER, YOU'RE FIRED! <-- My comic book podcast! Satan look here!
    urahonky
  • TraceTrace GNU Terry Pratchett; GNU Gus; GNU Carrie Fisher; GNU Adam We Registered User regular
    Nogs wrote: »
    urahonky wrote: »
    Nogs wrote: »
    urahonky wrote: »
    Takes gulp 15 seconds to compile everything but if you are missing a parenthesis ANYWHERE the shit breaks in an instant.

    eslint booooi

    http://eslint.org/

    God the changes I'm going to make to this project when I get some breathing space...

    I'm at 65 hours this week so far...

    :(

    I know it means nothing, but if the project was open source i would totally be helping you right now

    hey I've got an open sourced project you can get involved with.

    *winkhelpmecreateskynetwink*

  • NogsNogs Crap, crap, mega crap. Registered User regular
    edited August 2015
    if you are talking about machine learning, i am down.

    i am actually in the talks with my old uni professor to do some stuff for using neural networks to analyze fragments of original papyrus texts.

    i have no idea how to do ANY of it yet, but I'm not really too worried. learning is just time, and I got plenty right now.

    Nogs on
    rotate.jpg
    PARKER, YOU'RE FIRED! <-- My comic book podcast! Satan look here!
    Geth
  • NogsNogs Crap, crap, mega crap. Registered User regular
    hmmm

    not sure how I feel about that, Geth.

    rotate.jpg
    PARKER, YOU'RE FIRED! <-- My comic book podcast! Satan look here!
    ironsizideInfidelurahonkyThe AnonymousSyphyreMvrckjjae2123
  • TraceTrace GNU Terry Pratchett; GNU Gus; GNU Carrie Fisher; GNU Adam We Registered User regular
  • UselesswarriorUselesswarrior Registered User regular
    urahonky wrote: »
    Nogs wrote: »
    urahonky wrote: »
    Takes gulp 15 seconds to compile everything but if you are missing a parenthesis ANYWHERE the shit breaks in an instant.

    eslint booooi

    http://eslint.org/

    God the changes I'm going to make to this project when I get some breathing space...

    I'm at 65 hours this week so far...

    That's rough. I've slogged through projects like that were every step of the way you are like "this is terrible, this sucks". You'll plan to revisit but most likely never get the time to do so because the next 65 hour week of hack job shit will eat into refactoring time.

    #startuplife

    Hey I made a game, check it out @ http://ifallingrobot.com/. (Or don't, your call)
    Kakodaimonosironsizide
  • TraceTrace GNU Terry Pratchett; GNU Gus; GNU Carrie Fisher; GNU Adam We Registered User regular
    getTabs().add(new LazyTabX("Space", () -> new WebMap()) /*"Space", "Navigate a 2D map to input (map region-as-shape analysis, and lists of features and their locations)")*/);
    +
    +        getTabs().add(new Tab("Narsese", new NarseseInput(n)));
    +        getTabs().add(new ComingSoonTab("Library", "Apps, APIs, Interfaces, and Examples (ex: from .NAL files) that can be input"));
    +
    +        getTabs().add(new ComingSoonTab("Natural", "Natural language input in any of the major languages, using optional strategies (ex: CoreNLP)"));
    +        {
    +            /*getTabs().add(new Tab("En"));
    +            getTabs().add(new Tab("Es"));
    +            getTabs().add(new Tab("Fr"));
    +            getTabs().add(new Tab("De"));*/
    +        }
    +        getTabs().add(new ComingSoonTab("Sensors", "List of live signals and data sources which can be enabled, disabled, and reprioritized"));
    +        getTabs().add(new ComingSoonTab("Data", "Spreadsheet view for entering tabular data"));
    +        getTabs().add(new ComingSoonTab("Draw", "Drawing/composing an image that can be input"));
    +        getTabs().add(new ComingSoonTab("Webcam", "Webcam/video stream record; audio optional"));
    +        getTabs().add(new ComingSoonTab("Audio", "Microphone/audio stream record, w/ freq and noise analyzers, and optional speech recognition via multiple strategies"));
    +
    +
    +        getTabs().add(new ComingSoonTab("Time", "Navigate a timeline to view and edit significants in any time region"));
    +        getTabs().add(new ComingSoonTab("Patterns", "Frequently-used inputs and templates selectable via speed-dial button grid"));
    +        getTabs().add(new ComingSoonTab("URL", "Bookmarks that will create a new browser tab for web pages. Also includes URL navigation textfield"));
    +
    +    }
    

    coming soon...

  • Alistair HuttonAlistair Hutton Dr EdinburghRegistered User regular
    Spaces over tabs because we want to be able to precisely line up multi-line statements.

    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.
  • DelmainDelmain Registered User regular
    Spaces over tabs because we want to be able to precisely line up multi-line statements.

    Nah, that is accomplished with tabs and spaces. You tab to the beginning of the line and then space over however much you need.

    syndalis wrote: »
    Apple is a terrible company.
    amnesiasoft
  • JasconiusJasconius sword criminal mad onlineRegistered User regular
    tabs or die

    NogsbowenInfidelLD50EvigilantPeewi
  • crimsoncoyotecrimsoncoyote Registered User regular
    So apparently we won "most fun" at the hackathon. I'm OK with that

    Infidelurahonkyecco the dolphin
  • djmitchelladjmitchella Registered User regular
    One of the guys on the project-with-lots-of-warnings has removed ~96% of them by disabling the warning that boost headers generate for the parts of the compile where we're including boost, and turning them back on again afterwards:

    and after a few other bits of real fixing, and disabling the "deprecated register keyword" warning for some elderly third party libraries, we're now down to 250 warnings (which are pretty much all "Apple isn't going to support that API much longer, watch out", and yes, yes, we know, there is a nontrivial amount of schedule overhead for every new OSX/windows release for that sort of thing). Build logs are now down to just under 4 meg, down from 270mb.

    Etheaecco the dolphinEcho
  • gavindelgavindel The reason all your software is brokenRegistered User regular
    Current dev environment has a bug that makes a build take roughly 5 minutes. Fixing bugs one line change at a time. So boring...


  • a5ehrena5ehren AtlantaRegistered User regular
    edited August 2015
    Hahahaha a 5 minute build being slow. Our no-op build is about 15 minutes on a fast machine, clean builds (for just the company codebase) are almost an hour.

    A full build with all dependencies being redone would be most of a day, I think, since it is building a full Linux-based OS. I've done it a few times since I'm basically the distro maintainer, but I just run it overnight when needed.

    a5ehren on
    EtheaNogsjjae2123
  • EtheaEthea Registered User regular
    Our no-op is < 1min, incremental is ~1-5min, full build no dependencies 30min, full build plus deps 1.5 hour. Running the full test suite adds 40-60minutes ontop of that.

  • gavindelgavindel The reason all your software is brokenRegistered User regular
    What's a no-op build?


  • a5ehrena5ehren AtlantaRegistered User regular
    No code changes, just the time it takes the build system to check everything and repackage it.

  • RendRend Registered User regular
    gavindel wrote: »
    What's a no-op build?

    7lbnmayac02j.png

    NogsEvigilantEtheaDelmainAngelHedgieurahonkysyndalis
This discussion has been closed.