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

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

11920222425100

Posts

  • mightyjongyomightyjongyo Sour Crrm East Bay, CaliforniaRegistered User regular
    Apple makes great products, it is locked down but 99% of the time you wont need it and therefore wont give a shit.

    My only gripe is the astronomical price, I can never bring myself to spend that much of my own money on something...

    urahonkybowenPolaritieDisruptedCapitalistASimPerson
  • admanbadmanb unionize your workplace Seattle, WARegistered User regular
        var child0 = (function() {
          return {
            isHTMLBars: true,
            revision: "[email protected]",
            blockParams: 1,
            cachedFragment: null,
            hasRendered: false,
            build: function build(dom) {
              var el0 = dom.createDocumentFragment();
              var el1 = dom.createTextNode("              ");
              dom.appendChild(el0, el1);
              var el1 = dom.createElement("li");
              dom.setAttribute(el1,"class","item");
              var el2 = dom.createTextNode("\n                ");
              dom.appendChild(el1, el2);
              var el2 = dom.createElement("p");
              dom.setAttribute(el2,"class","title");
              var el3 = dom.createComment("");
              dom.appendChild(el2, el3);
              dom.appendChild(el1, el2);
              var el2 = dom.createTextNode("\n                ");
              dom.appendChild(el1, el2);
              var el2 = dom.createElement("div");
              dom.setAttribute(el2,"class","innerItem");
              var el3 = dom.createTextNode("\n                  ");
              dom.appendChild(el2, el3);
              var el3 = dom.createElement("img");
              dom.setAttribute(el3,"class","photo");
              dom.appendChild(el2, el3);
              var el3 = dom.createTextNode("\n                ");
              dom.appendChild(el2, el3);
              dom.appendChild(el1, el2);
              var el2 = dom.createTextNode("\n                ");
              dom.appendChild(el1, el2);
              var el2 = dom.createElement("div");
              dom.setAttribute(el2,"class","details");
              var el3 = dom.createTextNode("\n                  ");
              dom.appendChild(el2, el3);
              var el3 = dom.createElement("div");
              dom.setAttribute(el3,"class","type");
              var el4 = dom.createTextNode("\n                      ");
              dom.appendChild(el3, el4);
              var el4 = dom.createElement("span");
              dom.setAttribute(el4,"class","doctype");
              dom.setAttribute(el4,"title","Sheet");
              var el5 = dom.createComment("");
              dom.appendChild(el4, el5);
              dom.appendChild(el3, el4);
              var el4 = dom.createTextNode("\n                  ");
              dom.appendChild(el3, el4);
              dom.appendChild(el2, el3);
              var el3 = dom.createTextNode("\n                  ");
              dom.appendChild(el2, el3);
              var el3 = dom.createElement("span");
              var el4 = dom.createTextNode("\n                    ");
              dom.appendChild(el3, el4);
              var el4 = dom.createElement("a");
              dom.setAttribute(el4,"tabindex","-1");
              dom.setAttribute(el4,"class","tileUrl");
              dom.setAttribute(el4,"role","link");
              dom.setAttribute(el4,"target","_blank");
              dom.setAttribute(el4,"href","undefined");
              var el5 = dom.createTextNode("\n                        ");
              dom.appendChild(el4, el5);
              var el5 = dom.createElement("span");
              var el6 = dom.createComment("");
              dom.appendChild(el5, el6);
              dom.appendChild(el4, el5);
              var el5 = dom.createTextNode("\n                    ");
              dom.appendChild(el4, el5);
              dom.appendChild(el3, el4);
              var el4 = dom.createTextNode("\n                  ");
              dom.appendChild(el3, el4);
              dom.appendChild(el2, el3);
              var el3 = dom.createTextNode("\n                ");
              dom.appendChild(el2, el3);
              dom.appendChild(el1, el2);
              var el2 = dom.createTextNode("\n              ");
              dom.appendChild(el1, el2);
              dom.appendChild(el0, el1);
              var el1 = dom.createTextNode("\n");
              dom.appendChild(el0, el1);
              return el0;
            },
            render: function render(context, env, contextualElement, blockArguments) {
              var dom = env.dom;
              var hooks = env.hooks, set = hooks.set, get = hooks.get, element = hooks.element, content = hooks.content, concat = hooks.concat, attribute = hooks.attribute;
              dom.detectNamespace(contextualElement);
              var fragment;
              if (env.useFragmentCache && dom.canClone) {
                if (this.cachedFragment === null) {
                  fragment = this.build(dom);
                  if (this.hasRendered) {
                    this.cachedFragment = fragment;
                  } else {
                    this.hasRendered = true;
                  }
                }
                if (this.cachedFragment) {
                  fragment = dom.cloneNode(this.cachedFragment, true);
                }
              } else {
                fragment = this.build(dom);
              }
              var element0 = dom.childAt(fragment, [1]);
              var element1 = dom.childAt(element0, [3, 1]);
              var element2 = dom.childAt(element0, [5]);
              var morph0 = dom.createMorphAt(dom.childAt(element0, [1]),0,0);
              var attrMorph0 = dom.createAttrMorph(element1, 'src');
              var morph1 = dom.createMorphAt(dom.childAt(element2, [1, 1]),0,0);
              var morph2 = dom.createMorphAt(dom.childAt(element2, [3, 1, 1]),0,0);
              set(env, context, "item", blockArguments[0]);
              element(env, element0, context, "action", ["selectItem", get(env, context, "item")], {});
              content(env, morph0, context, "item.Title");
              attribute(env, attrMorph0, element1, "src", concat(env, [get(env, context, "item.Address")]));
              content(env, morph1, context, "item.ItemType");
              content(env, morph2, context, "item.SiteTitle");
              return fragment;
            }
          };
        }());
    

    This cannot be how you're supposed to use Ember.

  • EndEnd Registered User regular
    those text nodes...

    I wish that someway, somehow, that I could save every one of us
    zaleiria-by-lexxy-sig.jpgsteam~tinythumb.png
    Delmain
  • bowenbowen How you doin'? Registered User regular
    NO GOOGLE I DO NOT WANT TO TRANSLATE THAT BLOCK OF CODE

    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
    RendBarrakkethurahonkycrimsoncoyotemightyjongyoSaerisEvigilantVegemyteironsizideDisruptedCapitalist
  • urahonkyurahonky Registered User regular
    Having used Ember for a short bit... No that's not it at all.

  • crimsoncoyotecrimsoncoyote Registered User regular
    Adventures in porting!
    Today's episode: MSVC lets you cheat do weird things that GCC hates.

    Basically, ran into this: http://www.cplusplus.com/forum/general/36984/

  • JasconiusJasconius sword criminal mad onlineRegistered User regular
    edited October 2015
    raise your hand if 90% of the shit you achieve with angular js you have no fucking idea how it actually is not only working, but working perfectly

    what is this voodoo framework

    Jasconius on
    ecco the dolphinAlistair Hutton
  • admanbadmanb unionize your workplace Seattle, WARegistered User regular
    urahonky wrote: »
    Having used Ember for a short bit... No that's not it at all.

    I figured it out. The client gave me a compiled version of their Ember code. I just have to hope they have an uncompiled version...

    Also your new avatar is gonna confuse me for a while.

    Delmain
  • djmitchelladjmitchella Registered User regular
    edited October 2015
    Oh, definitely -- that's what the handlebars compiler generates for templates. What does the .hbs file look like that generated that output? I would guess there's a lot of blank lines in it, and if you have newlines and whitespace in your template, it'll put newlines in the DOM, because newlines and whitespace might matter.

    (that's 1.12 code -- 1.13 versions are a bit different because then they have the full react-style virtual DOM. It's not much prettier, though, just different)

    djmitchella on
  • urahonkyurahonky Registered User regular
    admanb wrote: »
    Also your new avatar is gonna confuse me for a while.

    Yeah I hate changing it but I like this one better: A cooler, smoother Simon Pegg.

  • bowenbowen How you doin'? Registered User regular
    That movie was also not quite as good as shaun.

    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
  • urahonkyurahonky Registered User regular
    Just had a recruiter call my work number asking me if I wanted a job...

    ecco the dolphin
  • InfidelInfidel Heretic Registered User regular
    Say yes.

    OrokosPA.png
    Delmainecco the dolphinbowenThe Anonymous
  • KakodaimonosKakodaimonos Code fondler Helping the 1% get richerRegistered User regular
    Infidel wrote: »
    Say yes.

    And then transfer them to your boss.

    ecco the dolphinDisruptedCapitalist
  • NogsNogs Crap, crap, mega crap. Crap, crap, mega crap.Registered User regular
    edited October 2015
    Jasconius wrote: »
    raise your hand if 90% of the shit you achieve with angular js you have no fucking idea how it actually is not only working, but working perfectly

    what is this voodoo framework

    ya, thats why i like react and the ideas it brings, you know exactly what everything is doing and how its doing it.

    angular is just like...magic and its real hard to debug because of that.

    Nogs on
    rotate.jpg
    PARKER, YOU'RE FIRED! <-- My comic book podcast! Satan look here!
  • LD50LD50 Registered User regular
    bowen wrote: »
    NO GOOGLE I DO NOT WANT TO TRANSLATE THAT BLOCK OF CODE

    What the hell is it translating to/from?

  • admanbadmanb unionize your workplace Seattle, WARegistered User regular
    Oh, definitely -- that's what the handlebars compiler generates for templates. What does the .hbs file look like that generated that output? I would guess there's a lot of blank lines in it, and if you have newlines and whitespace in your template, it'll put newlines in the DOM, because newlines and whitespace might matter.

    (that's 1.12 code -- 1.13 versions are a bit different because then they have the full react-style virtual DOM. It's not much prettier, though, just different)

    If I had been provided the .hbs files by our client I would be happy to tell you that...

  • FremFrem Registered User regular
    Apple makes great products, it is locked down but 99% of the time you wont need it and therefore wont give a shit.

    If you have access to a Mac, it's now possible to compile/sign your own apps and sideload them onto iOS 9 devices without paying for a developer license.

  • iTunesIsEviliTunesIsEvil Cornfield? Cornfield.Registered User regular
    Frem wrote: »
    Apple makes great products, it is locked down but 99% of the time you wont need it and therefore wont give a shit.

    If you have access to a Mac, it's now possible to compile/sign your own apps and sideload them onto iOS 9 devices without paying for a developer license.

    I ... what? Link please @Frem.

  • zeenyzeeny Registered User regular
    edited October 2015
    LD50 wrote: »
    bowen wrote: »
    NO GOOGLE I DO NOT WANT TO TRANSLATE THAT BLOCK OF CODE

    What the hell is it translating to/from?

    Have you not been following programming languages? To Javascript.

    zeeny on
    Gethurahonky
  • urahonkyurahonky Registered User regular
    Infidel wrote: »
    Say yes.

    Nah fuck that. That's not cool. He couldn't find my personal number so he saw my company on LinkedIn, looked them up on Google, called customer service and asked for me. If you can't find my number: send me an email so I can ignore you.

    AngelHedgie
  • djmitchelladjmitchella Registered User regular
    edited October 2015
    admanb wrote: »
    Oh, definitely -- that's what the handlebars compiler generates for templates. What does the .hbs file look like that generated that output? I would guess there's a lot of blank lines in it, and if you have newlines and whitespace in your template, it'll put newlines in the DOM, because newlines and whitespace might matter.

    (that's 1.12 code -- 1.13 versions are a bit different because then they have the full react-style virtual DOM. It's not much prettier, though, just different)

    If I had been provided the .hbs files by our client I would be happy to tell you that...

    I think you're stuffed, in that case -- without the source files you are going to have a heck of a time doing anything more than CSS tweaks. It's as if they'd given you a .exe / DLL rather than the original C and said "okay, fix it" -- technically possible, sure, but much more work than it should be to reverse-engineer what's meant to be going on, let alone make useful changes. (edit: I asked around here, and the response is "oh, he's going to have a bad time there", so it's not just me).

    What are you trying to do with the app in question? You can tweak CSS, you can potentially change the logic of how the DOM gets updated, but changing the actual DOM structure is going to be a hard go.

    djmitchella on
  • urahonkyurahonky Registered User regular
    @admanb listen to @djmitchella, he's our resident expert on the subject matter and helped me immensely.

  • RendRend Registered User regular
    urahonky wrote: »
    Infidel wrote: »
    Say yes.

    Nah fuck that. That's not cool. He couldn't find my personal number so he saw my company on LinkedIn, looked them up on Google, called customer service and asked for me. If you can't find my number: send me an email so I can ignore you.

    But

    The answer is yes though

    DelmaincrimsoncoyoteThe Anonymous
  • urahonkyurahonky Registered User regular
    bowen wrote: »
    That movie was also not quite as good as shaun.

    It's tough to compare the two. It really depends on my mood but I quite enjoyed both.

  • urahonkyurahonky Registered User regular
    Feels so good to rip out shitty, old code and replace it something shiny.

    Basically the previous developer wrote some code in the RouteHandler of our app that checked a field every two seconds and then called setState on it, which was causing re-renders on everything under that route every two seconds. I'm sure you guys remember me complaining about this about a month and a half ago.

    Well today I wrote an actual timer that users can see when they are going to get logged out. If it hits zero THEN it auto-logs them out. And when it updates every second the only thing that changes is this small component.

    crimsoncoyoteNogs
  • FremFrem Registered User regular
    Frem wrote: »
    Apple makes great products, it is locked down but 99% of the time you wont need it and therefore wont give a shit.

    If you have access to a Mac, it's now possible to compile/sign your own apps and sideload them onto iOS 9 devices without paying for a developer license.

    I ... what? Link please @Frem.

    It's new in Xcode 7 and is one of the top features listed on the Xcode site right now. I'm not going to link to detailed instructions on how to build and deploy an app without a dev license (because the only ones I could find are for building an app that would violate forum policy) but it's very similar to how Xcode normally works. The major difference is that you can sign in to Xcode and generate certificates with any Apple account right now, not just one enrolled in their developer program.

    Someone on StackOverflow picked apart the app profile a bit and discovered that sideloaded applications expire after three months. I hadn't seen that before, and I hope that it won't always be the case.

    htm
  • AngelHedgieAngelHedgie Registered User regular
    Oh god. They've unveiled Perl 6 .

    Be afraid.

    Be very afraid.

    XBL: Nox Aeternum / PSN: NoxAeternum / NN:NoxAeternum / Steam: noxaeternum
    ecco the dolphinFrem
  • EndEnd Registered User regular
    I thought Perl 6 was already being unveiled, over the last 10 years

    I wish that someway, somehow, that I could save every one of us
    zaleiria-by-lexxy-sig.jpgsteam~tinythumb.png
    bowenecco the dolphin
  • KakodaimonosKakodaimonos Code fondler Helping the 1% get richerRegistered User regular
    I love it when overly pessimistic locking leads to a lock inversion and deadlock. Especially at 11 pm at night when someone decided to "make reentrant" all this code that was working fine before the changes and isn't ever going to be dealing with multiple threads entering the same stack space.

    ecco the dolphinThe Anonymousa5ehren
  • EchoEcho ski-bap ba-dapModerator mod
    Man, the GitHub Windows client is so bare-bones it's barely usable.

  • The AnonymousThe Anonymous Uh, uh, uhhhhhh... Uh, uh.Registered User regular
    You might say it's un-bare-able.

    jjae2123
  • FremFrem Registered User regular
    It's very similar to the OS X version, isn't it? It's much easier to build a user-friendly git UI when you only have to support a limited number of workflows.

    Delmain
  • EchoEcho ski-bap ba-dapModerator mod
    Yeah, I use Tower in OS X and it's excellent.

    htm
  • NogsNogs Crap, crap, mega crap. Crap, crap, mega crap.Registered User regular
    command line for life.

    rotate.jpg
    PARKER, YOU'RE FIRED! <-- My comic book podcast! Satan look here!
    DelmainDisruptedCapitalistmightyjongyoThe Anonymous
  • bowenbowen How you doin'? Registered User regular
    Echo wrote: »
    Man, the GitHub Windows client is so bare-bones it's barely usable.

    You could do more in the previous versions.

    For some reason they stripped it down.

    partial commit is the best though

    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
  • LuvTheMonkeyLuvTheMonkey High Sierra Serenade Registered User regular
    Atlassian SourceTree is pretty nice, may be worth looking into.

    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
    Madpoetironsizide
  • djmitchelladjmitchella Registered User regular
    SourceTree is a good client for viewing diffs before commit/push, but with HG, at least, it is weirdly much slower than the command line client. I've also seen it just totally mess things up when merging a few times, and leave the code in a state where the only sane way back out is to manually reapply all the changes to a new clone. It doesn't do this all the time, but it's done it often enough that I stay well clear of it these days.

  • EchoEcho ski-bap ba-dapModerator mod
    bowen wrote: »
    Echo wrote: »
    Man, the GitHub Windows client is so bare-bones it's barely usable.

    You could do more in the previous versions.

    For some reason they stripped it down.

    partial commit is the best though

    It's really annoying to select what to partially commit in their client, though. In Tower I get a button to easily (de)select staged chunks.

This discussion has been closed.