|
Jewel posted:Any good resources to learn it easily with no prior knowledge in anything of the sort? I know what a commit, a checkout, and a branch is. That's about it. I usually only use the bare minimum when it comes to SVN/Perforce, and I do it all visually, so going to a command line interface like GIT is daunting. https://www.youtube.com/watch?v=P3_ISMGXTBg https://github.com/schacon/git-presentations/tree/master/railsconf08 This is, however, absolutely necessary for anyone who uses git from day to day. Worth the one hour to understand Git more deeply, definitely. Thermopyle posted:Anytime I encounter code along those lines I shake my fist at the sky. (BTW Android is a perfect example of lovely APIs made by inept buffoons who locked it into compatibility forevermore) Doctor w-rw-rw- fucked around with this message at 16:30 on May 7, 2013 |
# ? May 7, 2013 16:26 |
|
|
# ? Jun 5, 2024 06:20 |
|
hobbesmaster posted:Its xchg eax, eax of course! The best is when you pass xor swap two pointers to the same location which will silently zero it out.
|
# ? May 7, 2013 16:44 |
|
Doctor w-rw-rw- posted:This presentation is good for the programming-minded, but may or may not be intro-level: Java in general has a shitton of features that have been @deprecated since 1.1, but never removed. I admire the developers of Qt for actually daring to make API breaking changes between major versions.
|
# ? May 7, 2013 17:04 |
|
Jewel posted:Also, using Windows 7, if that means anything. It means you're a second-class citizen in git-land. Gitizen? Whatever - Mercurial works basically the same way (internally - actual commands issued will be different) and its extensions are less likely to be broken on Windows, so maybe consider that, too or instead of.
|
# ? May 7, 2013 17:14 |
|
Ithaqua posted:My ultimate response (after eliminating all of the "reflective surfaces" options) was to suggest that every person on the island pull out one of their eyes. This met with a horrified expression. I did not receive an offer. You are my hero, I'd have offered you the job on the spot.
|
# ? May 7, 2013 17:21 |
|
Jewel posted:Any good resources to learn it easily with no prior knowledge in anything of the sort? I know what a commit, a checkout, and a branch is. That's about it. I usually only use the bare minimum when it comes to SVN/Perforce, and I do it all visually, so going to a command line interface like GIT is daunting. git on Windows still isn't the best... Just a friendly warning.
|
# ? May 7, 2013 17:21 |
|
Wait, what? Git on Win 7 works just as well as on linux or OSX for me. What exactly is broken? TortoiseGit 4 lyfe.
|
# ? May 7, 2013 17:24 |
|
Munkeymon posted:It means you're a second-class citizen in git-land. Gitizen? Whatever - Mercurial works basically the same way (internally - actual commands issued will be different) and its extensions are less likely to be broken on Windows, so maybe consider that, too or instead of. Not really so anymore. Github for Windows solves most of the problem. It gets you a nice GUI, msysgit, and posh-git (Powershell git for commandline) installed. The Pro git book was pretty helpful.
|
# ? May 7, 2013 17:32 |
|
Salvador Dalvik posted:Wait, what? Git on Win 7 works just as well as on linux or OSX for me. What exactly is broken?
|
# ? May 7, 2013 17:33 |
|
I remember having some issues with GitHub for Windows with some of the more obscure commands, like git format-patch, git am, etc.
|
# ? May 7, 2013 17:35 |
|
Wheany posted:Java in general has a shitton of features that have been @deprecated since 1.1, but never removed. I admire the developers of Qt for actually daring to make API breaking changes between major versions. I liked how at one point they marked QSettings for removal in Qt5 and stated they had no intention to replace it. This was backtracked reasonably quickly.
|
# ? May 7, 2013 17:36 |
|
I tried GitHub For Windows a while back, and while I really liked it for easily checking out branches, and a fairly nice layout, it was missing a LOT of features (I couldn't even find many good diff features? Like you had to only view the commits and had no way of viewing history/diffs for a specific file iirc. Also like no special features other than commit and checkout?)
|
# ? May 7, 2013 17:43 |
|
Jewel posted:I tried GitHub For Windows a while back, and while I really liked it for easily checking out branches, and a fairly nice layout, it was missing a LOT of features (I couldn't even find many good diff features? Like you had to only view the commits and had no way of viewing history/diffs for a specific file iirc. Also like no special features other than commit and checkout?) Not exactly a coding horror though?
|
# ? May 7, 2013 18:12 |
|
code:
|
# ? May 7, 2013 18:13 |
|
e: oh
Janitor Prime fucked around with this message at 18:27 on May 7, 2013 |
# ? May 7, 2013 18:16 |
|
"How is that not thread-safe? I'm using an ATOMIC boolean, right there!"
|
# ? May 7, 2013 18:17 |
|
gariig posted:Not really so anymore. Github for Windows solves most of the problem. It gets you a nice GUI, msysgit, and posh-git (Powershell git for commandline) installed. Did they fix the thing where cloning a repo also marked most of it as modified? There's no loving way I'm going to deal with that poo poo otherwise. SourceTree seems pretty nice, though. I was also talking about git extensions like the one that, IIRC, was mentioned a few pages ago. There's no windows port which is only required because there's no cross-platform git. Mercurial extensions are usually Python and so will run as long as mercurial itself runs and that cross-platform compatibility, in my mind, makes it a better piece of software than git. Not that that matters much - they're both basically the same so they're both great, but in my opinion the wrong one 'won' somehow. Maybe Ruby people turned up their noses at using a Python based tool and drove adoption? E: http://whatthecommit.com/125242ec6ea1910024a0166ae01ff9c5 actually is valid in many cases but lacking the profanity IE deserves. Munkeymon fucked around with this message at 18:25 on May 7, 2013 |
# ? May 7, 2013 18:21 |
|
Volte posted:The naive (and correct) solution is std::swap(a, b);
|
# ? May 7, 2013 18:53 |
|
ADL is in the running with vector<bool> as the most ill advised feature in C++.
|
# ? May 7, 2013 18:58 |
|
hobbesmaster posted:ADL is in the running with vector<bool> as the most ill advised feature in C++. Not really. ADL is very important, although it does mean that you should qualify your calls much more than people do in practice.
|
# ? May 7, 2013 19:23 |
|
hobbesmaster posted:ADL is in the running with vector<bool> as the most ill advised feature in C++. Operator overloading on &&, ||, and , is pretty loving stupid.
|
# ? May 7, 2013 19:31 |
|
b0lt posted:Operator overloading on &&, ||, and , is pretty loving stupid. Why do you think overloading || and && is bad?
|
# ? May 7, 2013 19:37 |
|
That Turkey Story posted:Why do you think overloading || and && is bad? code:
|
# ? May 7, 2013 19:45 |
|
b0lt posted:
Not exactly seeing your point, here, nor an example that makes any practical sense.
|
# ? May 7, 2013 19:50 |
|
That Turkey Story posted:Not exactly seeing your point, here, nor an example that makes any practical sense. The entire point of operator && is shortcircuiting, and overloaded operator && explicitly doesn't shortcircuit.
|
# ? May 7, 2013 19:54 |
|
That Turkey Story posted:Not exactly seeing your point, here, nor an example that makes any practical sense. And "you can make something do something else" isn't much of an argument.
|
# ? May 7, 2013 19:55 |
|
That Turkey Story posted:Not exactly seeing your point, here, nor an example that makes any practical sense. The example is a bit contrived but I think the problem in general is that short-circuiting isn't guaranteed (in fact, it's not possible) for overloaded && and || because both sides must be evaluated to form the argument list for the operator method. At the very least, it violates the Principle of Least Surprise. edit: beaten because I'm SO VERBOSE
|
# ? May 7, 2013 19:56 |
|
b0lt posted:The entire point of operator && is shortcircuiting, and overloaded operator && explicitly doesn't shortcircuit. No, that's how && and || apply to bool. When you overload the operator in a different domain, you shouldn't expect it to be the same. It's a similar reason to why it's not a "bad idea" to overload operator + for strings.
|
# ? May 7, 2013 19:58 |
|
You shouldn't operate + for strings because strings don't form a group under concatenation
|
# ? May 7, 2013 20:03 |
|
That Turkey Story posted:No, that's how && and || apply to bool. When you overload the operator in a different domain, you shouldn't expect it to be the same. It's a similar reason to why it's not a "bad idea" to overload operator + for strings. But there's *no way* to ask for short circuiting behavior.
|
# ? May 7, 2013 20:04 |
|
That Turkey Story posted:No, that's how && and || apply to bool. When you overload the operator in a different domain, you shouldn't expect it to be the same. It's a similar reason to why it's not a "bad idea" to overload operator + for strings. Sed contra, if the behavior of the operator in a different domain isn't similar to its behavior in the domain where it is already defined, you shouldn't overload it in that domain.
|
# ? May 7, 2013 20:10 |
|
Suspicious Dish posted:But there's *no way* to ask for short circuiting behavior. Yeah, and??? That doesn't change anything.
|
# ? May 7, 2013 20:14 |
|
yaoi prophet posted:You shouldn't operate + for strings because strings don't form a group under concatenation They totally can, though, if you introduce strings where every element can either be positive or negative. If a positive character is next to a negative character with the same character value, then the two cancel out and the string gets shorter. Such strings are a trivial generalization of "normal" (or "strictly positive") strings, and readily form a group under concatenation. They also let you unprint stuff, or untransmit things from the network. Obviously a useful feature, hopefully we'll see these in C++14.
|
# ? May 7, 2013 20:24 |
|
That Turkey Story posted:No, that's how && and || apply to bool. When you overload the operator in a different domain, you shouldn't expect it to be the same. It's a similar reason to why it's not a "bad idea" to overload operator + for strings. && and || short-circuit with non-booleans all the time.
|
# ? May 7, 2013 20:25 |
|
Otto Skorzeny posted:Sed contra, if the behavior of the operator in a different domain isn't similar to its behavior in the domain where it is already defined, you shouldn't overload it in that domain. Hello, boost::filesystem::path and operator/.
|
# ? May 7, 2013 20:26 |
|
hobbesmaster posted:And "you can make something do something else" isn't much of an argument. It's exactly as acceptable as it is for overloading of functions in general. Perhaps, though, you think that general function overloading isn't a good idea because it "makes something do something else." All an operator is is a function with a fancy name/syntax.
|
# ? May 7, 2013 20:27 |
|
That Turkey Story posted:It's exactly as acceptable as it is for overloading of functions in general. No it's not, stop being retarded. It affects control flow. Other overloadings do not and are plain function calls.
|
# ? May 7, 2013 20:39 |
|
ShoulderDaemon posted:They totally can, though, if you introduce strings where every element can either be positive or negative. If a positive character is next to a negative character with the same character value, then the two cancel out and the string gets shorter. Such strings are a trivial generalization of "normal" (or "strictly positive") strings, and readily form a group under concatenation. But it doesn't form an Abelian group, which is what you use + for.
|
# ? May 7, 2013 20:46 |
|
shrughes posted:No it's not, stop being retarded. It affects control flow. Other overloadings do not and are plain function calls. So what? Hypothetically, if && and || didn't short-circuit in C++ (as is the case for logical or and logical and in plenty of other languages), then would you consider these to be acceptable overloads? I don't see how that matters at all in theory nor in practice. When you see || and && in places that don't deal with bool you don't freak out about short-circuiting. It simply doesn't apply to those types.
|
# ? May 7, 2013 20:48 |
|
|
# ? Jun 5, 2024 06:20 |
|
tractor fanatic posted:But it doesn't form an Abelian group, which is what you use + for. It's settled, we're using * for string concatenation now.
|
# ? May 7, 2013 20:50 |