skysight-inc/HackerNews huggingface dataset:
As a matter of fact, manually checking out all the intermediate commits and building/testing those is precisely what our team does.

Except, it's not done manually, we have a set of tools that walks along a branch and tries to build each revision, storing the build/test status using the commit's SHA-1 hash as a key so that we don't waste effort rebuilding things unnecessarily. Then, this is used for our code reviews to verify that each commit on the branch to be integrated has a clean build/test status saved -- or an explanation why not.

We've given some thought into writing a version of git bisect that takes this cached data as input to select better trees to try given some set of known broken commits, but that hasn't happened quite yet.
Yes, I need a lot of my code to 'just work' out of the box on OSX, so I'm sticking with 2.7. I really wish Apple had put python3 in Mavericks, as /usr/bin/python3, rather than the default. sigh
Now it is time to learn illustrator and photoshop.
Wrong-o. At that level (or any level) of business, it's all about the relationship. You buy from the person you know and trust. That's true in the US, and even more so in China.
Agreed. More and more important libraries are being ported to Python 3. I'm working on a web app supporting Python 3.3. I keep it backward-compatible with Python 2.7 just in case I would badly need a library that hasn't yet been ported to Python 3 but it hasn't happened yet and I have good hope that we'll be able to deploy it on Python 3.3. I develop and test locally with Python 3.3 and travis runs my tests against both Python 3.3 and Python 2.7. Every time the Python 2 build breaks it's because of some silly unicode-related problem that has been fixed in Python 3, so it really motivates me to develop with Python 3 from now on.
Yep, just added folder sharing:

https://github.com/noplay/docker-osx/commit/a7470f9f583cfdad...

We're interested in using boot2docker for docker-osx too. Ubuntu is unnecessarily heavyweight for just running Docker.
I have to strongly disagree with your example. In fact I feel it may just be one of the worst usages of macros I have seen in that you are hiding the control flow of the program and thus obfuscating your code for other programmers. It might be easier for you to read because you wrote it but for every one that comes after you it will be a massive pain that adds unneeded additional cognitive overhead.

I say this from the point of view of someone having to debug your code: "OK so step, step, step, run to this line... wait, what? How did this function return when there is no return statement? Let me run that again from the beginning... ... ... What? This ASSERT macro doesn't actually assert it just returns?"

Keyboard out window etc.

Please stick to language conventions. Macros are bad because they hide what the code is actually doing.
There were some aspects of the apps that were not supported on Scirra, so I had to do it myself. But yes, they were made with Construct 2.
The first block of code seems more readable to me than the second. I'm used to seeing the first; it's idiomatic C. I don't understand why it says "do ... while (0)" in the macro, for instance. Wouldn't you want to handle different errors in different ways anyway? In your example, you're just going to leave the file open and the string allocated? Isn't trying to influence how the compiler compiles it by using a macro instead of a function a clear example of (premature) optimization?
For anyone interested in how to actually do this efficiently, without building a suffix tree, here's a good explanation: http://www.akalin.cx/longest-palindrome-linear-time
Right idea at the wrong time maybe. A large proportion of the US didn't own a PC 15 years ago and some people still thought the internet was a fad, I'm not sure what PC adoption was like in other countries. There are still some problems to be fixed with the general use of digital currencies, but Chaumian digital cash could make a comeback if there were broader digital currency exchanges and people saw value in it. As for why countries might switch to such a currency... probably to get off the US dollar, but I don't know much about that sort of thing. They'd also have greater control over their economy if they could control their own currency's source code. Also, if bitcoins do take off then the last countries to support them will be poorest and might be better off starting their own currency. I think it could end up being like a stock market, where each unit of currency would represent some unit of specific resources.
I assume there are only 3 sustainable paths for the human race. The first, is the norm. We continue as we are, we don't adjust to climate change etc in time. Society eventually collapses under the magnitude that it has swelled up to. We enter a second "dark age". The second, is we find a way to to sustain with the resources we have on this planet alone. Population finds a balance, and we go on living another 5000 years, just like we did for the first... except now technology plays a bigger role. The third, is we expand to space and limits become boundless.

The only scenario where we can think about super long life spans is the later. My point is, this is like deciding how to spend your millions of dollars before you've made them. My personal opinion is that the singularity is as close to inevitable for as long as we as a society choose to pursue technology. To me the likely scenarios are either A or C, and it really depends on which happens first... an environmental collapse or the singularity.
This is going to sound like an is-therefore-it-ought-to-be fallacious argument but it makes sense to me that there are more female nurses simply because women are better suited to the task and more importantly want to be nurses? I mean there are probably historical reasons for the low number of male nurses and other things to attribute the low ratio to but we didn't sit down one day and force females to be nurses.

Healthcare and educations has way bigger problems than some patients responding better to male nurses. There's a lot of what I consider grasping at straws when it comes to this sort of discussion. Let's start by talking about the curriculum and spending and stuff that has way more of an impact on our society.
It's actually just a parable for Marxism. Read up!
Wonderful. And - nostalgia advances. And how, at 15 I probably was a more productive programmer than now, where I barely manage to wrap up a few miniscule open source projects per year, if any. Back then I wrote what looks like major projects to me now - in month, alongside school, friends, holidays and everything ...

Any experiences or tips on how to get 15 again in terms of productivity? :)
It seems quite similar to Scratch, although if that's what it takes to get interested in software engineering, then good for him either way.
My idiocy is useful to science and the public welfare, whereas yours is useful to snake-oil salesmen and quacks.
use shift. This guy's a lefty clueless faggot.

My original compiler did yoda conditionals wrong. I assumed changing sides was negating logic. Not so.

I like #define. I don't like const and enum so I did not put them in my compiler. No typedef in my compiler, no ? operator.

This guy's just a retard.

God says...
na_na you're_fired I'm_in_suspense rip_off what_a_mess little_fish
geek you_do_it you_never_know mission_from_God after_a_break
That's_my_favorite hopefully do_it Varoom youre_welcome
cracks_me_up Mom bastard go_ahead_make_my_day fortitude
Oh_Hell_No but_of_course anger quite segway wife so_let_it_be_done
heh i know u were. i get what youre saying here but my issue with that is it just leads to like watered-down pseudo-journals of questionable reputation.

it almost feels like a better alternative would be for the students to run their own informal conferences & publish through an open publishing network (a lot of these are emerging in academia to subvert all the licensing BS from the journals)
Moral of the story? Police and federal agents must be more transparent and accountable for their actions and expenditures.

The whole concept of "spend money so that our budget doesn't shrink next year" has go to be fixed also. I don't know a solution other than having more auditors and efficiency experts (GAO, gao.gov).

Would people flip out if there was a bill proposed to require all guns in the US to have a GPS tracker? Just an idea, I know it wouldn't fix all gun problems, but it might be prevent some gun thefts and murders. Of course, this data shouldn't be able to be accessed without a warrant.

Stings are slightly unfair and can sometimes catch dumb people who wouldn't otherwise commit the crime. On the other hand, if you purchase a gun without a license or attempt to hire a contract killer and it turns out to be a police officer you are in contact with, then that sting just save a life, which is good.

Preventing abuses of power is key. There should be adequate training at organizations on how and where to report abuses of power or potentially unethical behavior. Most of this is already in place, obviously more resources and oversight is needed constantly to ensure that the police are protecting citizens and not entrapping them or abusing their power for career advancement.
>the line workers had the ability to fix the problem all along

Yes they had the ability, but did the line workers know that empty boxes being shipped was a problem?

There is no solution without a problem.
>you want to check the accident rate relative to the non-accident rate

You are right - that the "risk of dying decreased by 60 percent from 1935 to 2010" in the U.S. [2] while the unintentional accident death rate remained constant so, yes, the fraction of deaths caused by accidents would have increased. My mistake.

>You should check statistics only for under age 30.

Injury deaths for ages 0 to 29 actually average 36 per 100 000 per year, less than the population average of 39. Granted this is a quirk of injury death rates being lowest for 4 to 12 year olds (average 6 per 100 000 per year) - this is the only age group for which injury death rates are below 10 per 100 000 per year. It then climbs to a local maximum of 75 at age 21, a level not seen again until age 74. A second local minimum occurs at ages 30 to 34 (average 56 per 100 000 per year) and a third at 56 to 67 (average 51 per 100 000 per year).

[1] http://www.cdc.gov/nchs/data/misc/injury2007.pdf page 16

[2] http://www.cdc.gov/nchs/data/databriefs/db88.pdf page 2
Funnily enough, these days I'm spending most of my time writing Javascript. So that's like two steps back. But that's ok, because the language is not the bottleneck in software development. The big time sinks are learning new concepts and managing inherent logical complexity.
Why? You can stage the changes you want to commit, and stash the unstaged changes. Run tests, &c. Commit locally but do not push. If you test more and it's still broken, you can iterate on that with git commit --amend. The rest of your change will happily live on in the stash.

As others have pointed out, nobody sees your change because it's still only local. That means you could make 10 tiny commits as you work. Then, later on, rebase and squelch a series of smaller commits into a bigger one, and then push, send a pull request, whatever.
We don't neccesarily need a body. I posted this link a while back but it went unnoticed:

http://aeon.co/magazine/being-human/virtual-afterlives-will-...

"The question is not whether we can upload our brains onto a computer, but what will become of us when we do"
> Is it 100% feature complete or fast? No.

If it's not feature complete it's vaporware.
I'm not completely on board with #4 (initialization of variables). I agree that 'declaring and then assigning a value' _within the same block_ vs 'initialized declaration' has no speed gains, only downsides.

However, if the assignment can happen in a _different block_ (maybe inside an 'if' block) you could save 1 memory write, depending on how many times the if condition is satisfied.

This obviously optimizes for speed at the expense of maintainability, and it's for the programmer to make intelligent trade offs, but the fact is that one method is faster than the other.

Silly example that decrements 'a' repeatedly if condition is non-zero:

//temp = 0 inside if block
int dec(int a, int condition) {
int temp;

if (condition) {
temp = 0; //<-- memory write depends on condition

//compute something here in a loop
while (temp < a) {
a -= (temp++);
}
}

return a;
}

//temp = 0 at declaration
int dec2(int a, int condition) {
int temp = 0; // <-- memory write always executed

if (condition) {
//compute something here in a loop
while (temp < a) {
a -= (temp++);
}
}

return a;
}

We can disassemble the output to verify that dec() will only write to memory if the condition was satisfied (see 400458), while dec2() will always write into temp (see 400482):

# <dec>
400448: push %rbp
400449: mov %rsp,%rbp
40044c: mov %edi,0xffec(%rbp)
40044f: mov %esi,0xffe8(%rbp)
400452: cmpl $0x0,0xffe8(%rbp) # if (condition)
400456: je 400473 <dec+0x2b>
400458: movl $0x0,0xfffc(%rbp) # temp = 0 <-- depends on condition
40045f: jmp 40046b <dec+0x23> # while
400461: mov 0xfffc(%rbp),%eax
400464: sub %eax,0xffec(%rbp)
400467: addl $0x1,0xfffc(%rbp)
40046b: mov 0xfffc(%rbp),%eax
40046e: cmp 0xffec(%rbp),%eax
400471: jl 400461 <dec+0x19> # loop
400473: mov 0xffec(%rbp),%eax # return a
400476: leaveq
400477: retq

# <dec2>
400478: push %rbp
400479: mov %rsp,%rbp
40047c: mov %edi,0xffec(%rbp)
40047f: mov %esi,0xffe8(%rbp)
400482: movl $0x0,0xfffc(%rbp) # temp = 0 <-- always executed
400489: cmpl $0x0,0xffe8(%rbp) # if (condition)
40048d: je 4004a3 <dec2+0x2b>
40048f: jmp 40049b <dec2+0x23> # while
400491: mov 0xfffc(%rbp),%eax
400494: sub %eax,0xffec(%rbp)
400497: addl $0x1,0xfffc(%rbp)
40049b: mov 0xfffc(%rbp),%eax
40049e: cmp 0xffec(%rbp),%eax
4004a1: jl 400491 <dec2+0x19> # loop
4004a3: mov 0xffec(%rbp),%eax # return a
4004a6: leaveq
4004a7: retq

The above code was compiled with gcc 4.1.2 on amd64/linux. gcc -O2 and gcc -O3 completely do away with the 'temp' variable and generate fewer instructions.
This might come across as quite harsh but the article could have been much shorter.

NP is the class of decision problems that can be solved by a non-deterministic Turing machine in polynomial time. A problem is called NP-hard when there is a polynomial-time reduction of 3-SAT to said problem. A problem is called NP-complete if it is both NP-hard and in NP. Since TSP is not a decision problem, it is not in NP, therefore it cannot be NP-complete. However, it is NP-hard.

One can call this a minor nitpick. I still point it out every now and then when I hear people talking about such things. However, the really important thing is that we haven't found a way to solve NP-hard (and hence of course NP-complete) problems efficiently on a deterministic Turing machine (and hence computers as we can actually build them). An informal way of saying the same thing is "TSP is really really hard to solve".

Either way, I'm always surprised at how many problems we encounter in our every day lives are actually NP-hard. Every decent puzzle game for instance is usually NP-hard. Goes to show that we don't really enjoy solving easy problems.

EDIT: Of course there's also a decision version of TSP, as others have pointed out. This one is NP-complete of course.
Which is why you make moronic assertions unsubstantiated by logic or evidence.
Honestly, I don't want to live forever.

100 years I think is what would be ideal.
> Unfortunately, medical technology is not even remotely advancing exponentially. The rate of new drug approvals is decreasing (and costs are rising)

New drug development is not the whole of medical technology any more than higher clock speeds are the whole of computing technology development.
I think it would be slightly unrealistic to 'get back to 15'. I'm 15, and I'm a developer; the main advantage I have right now is that I don't need to worry about rent, food, and other stuff, since I'm still with my parents. This gives me time to work on whatever project I want without any other worries.

I guess in your case, you would probably have to get some sort of job where they are a lot more lenient and give you time for side projects.
And if we solve cancer and age related deterioration, everyone will eventually die in an accident. But the fact remains that the deaths that dominate life expectancy statistics behave in the way described.
Why does nature behave mathematically?
Being black is certainly not the same as being a woman, and just because you didn't experience enough discrimination to push you away doesn't mean others don't. If anything, that feeling of being uncomfortable should make you more sympathetic, but instead, you're stuck in this bootstraps mentality that anyone who couldn't follow through just didn't apply themselves enough or something.

> Somebody having an advantage does not mean you have a disadvantage, this is not a zero sum game.

Err, yeah it does. That's exactly what it means. If someone has an advantage over you, you are at a disadvantage. That's what the word "disadvantage" means.

> Just because women knows these brands more than I (in general) does not mean I should sit back.

No one is saying you should. That actually has nothing to do with this. No one is asking for work to be segregated; in fact, they're asking for the exact opposite.

> "You see, mine count too," instead of "Make it easy for me to get in."

Why not both? Why not, "Stop treating me like shit and count mine." This isn't either-or.
I was downvoted before for remarking that Py 3 needed a killer feature or two to drive adoption, similar to this post. Perhaps I was not charitable enough.

I'd personally like to see pypy bundled and a complete package manager solution, as well as usability features like bpython. I don't think it is necessary to dump it. It just needs a little excitement.

Still, after many years I am finally planning to move my stuff to Py 3.4 when it comes out next year. No particular reason, it just feels like it is time. Shame that it doesn't look like it will get into 14.04.
You may want to try: https://github.com/websecurify/node-vxdocker
I would say one that can set and maintain expectations.
Sharks tweet warnings to Australian beachgoers
The only assertion I make is that it's better for medicine to be regulated and have standards than not.
I want to build a site in Haskell. It's tough going though!
"More intertwined relationships" may also become inconvenient shackles, especially when are used as political leverage (look at Russia with its exports of natural gas in Europe, or at the economic sanctions against Iran). Heck, look at history - given the right condition, an economical relationship by itself can start a war if it cease, becomes abusive, or is altered in some inconvenient way! And as power balance is in continuous change, so are the economical relations shadowed by it.
I'd definitely worry about performance in Phonegap, as to me it seems more useful for static, informational apps rather than games. I'd be interested in seeing a Phonegap game though, it would be interesting to see its acceptance in any major app market.
"possibly done a bit to nurture"

There doesn't seem to be any obvious upper bound on this behavior.

I have a Harvard professor two centuries ago around 1800 in my ancestry. His DNA would still be serving a useful purpose to his descendants if he was teaching/advising my kids today in 2013, or if he was teaching/advising my descendents in early 2300 for that matter.

I would imagine being young in a post 500-year-lifespan society would be very suffocating if your first few decades had a student:teacher ratio flipped around from current numbers to 20 teachers per student rather than current 20 students per teacher.
Well, let's see.

#1: Avoiding shifting versus doing division: Nope. Crappy compilers and bad architectures will yield bad results. Know what you're doing.

#2: Use a typedef instead of a bare C type, then. Also, on many systems space is king (the last embedded system I wrote had 6 bytes left over in code space, and 16-bit operations were incredibly expensive and nearly unaffordable).

#3: Just make the code clear. This rule is lunacy.

#4: Well, maybe. Except that variable initialization can often be made quite compact by the runtime (e.g., an expansion of a compressed data segment into RAM), and so save you code space.

#5: Again, the compiler can screw you here. Also, it's possible to take the address of a constant and have it be wiped out (for naïve implementations, anyway).

My basic rules:

#0: Don't make assumptions. Know what the heck is going on, fractally. Look at the generated code.

#1: Be a responsible engineer. Design and code for production and testing, and for the next guy. This often means not being clever, but if you are being clever, be forthright about it and don't leave your brilliance as a puzzle. (Don't be clever just to be clever. That will get you fired, no foolin').

#2: Avoid platitudes. Be wary of people who tell you not to use something, always, or to use a particular contruct, always. Be suspicious of code that follows someone else's dogma. [I once worked with a code base where the engineer had used the ternary -- "?:" -- operator everywhere because he thought it was more efficient than using 'if'. Of course it was just guesswork on his part and not only was his code a train wreck, but he had never measured his results. We fired that guy).

Embedded systems are just software, they're not magical, they're not (usually) that hard, and for some reason people are afraid of them. Some of my best moments in the industry have been writing these little things, they're fun as hell.
That's a good point, I'll have to think about that more. My initial thought is that at least exchanges wouldn't be limited to currencies with that vulnerability. Most small currencies would also have limited or no initial value and probably wouldn't be worth taking over unless it was a pump and dump scheme, but centralized exchanges might be able to mitigate that.. Interesting idea, thanks.
The only way you're going to be shamed is if you really didn't make them in private conversation. Making them as you sit around a bunch of people in the middle of a conference, or in the middle of your office where everyone can hear you, or on your public twitter account is not a private conversation. Just because you directed it to someone does not make it private.
I think one of the first things the college boys are taught now - or should be - is that one of the first things they should do is talk to the low-level folks on the floor. Even if they don't have the solution, they often have information/experience that can inform the solution or even better, what the real problem is. And this applies not only to factory floors, but to any "system" made up of people and processes (equipment optional).

As an engineering major, I did a few co-op assignments in a factory. I was assigned the task of figuring out how to optimize a particular line in the factory - we had new equipment coming in and were considering retrofitting some of the other equipment. The folks working on the floor told me how much they appreciated that I spoke with them and got their input rather than simply coming down with my "stopwatch and measuring tape."

Now I'm on the other side of the line <sigh>. And I'm sick of management and/or experts trying figure out how to improve morale and processes without consulting those of us in the trenches.