Hacker Newsnew | past | comments | ask | show | jobs | submit | more lambda's commentslogin

The staging area is a lot more useful than what you can do with an interactive commit, since it persists between operations. You can use it to accumulate changes that are "done" while you continue to experiment with some other changes on top, even if you're planning on committing the whole thing at once, and if you wind up not liking your new changes, revert to what you had in the staging area; or you can realize what you're working on will be easier to finish as two commits, stage part of it, stash the other part, finish the part that was staged and commit it, then apply the stashed part and finish that too.

This is a lot more than you get with just a single interactive commit operation.

You could use a commit for this purpose, and continually amend or revert this commit, but in terms of UI, it's helpful to have a set of operations specifically for moving things in and out of the staging area that's different than what you do for manipulating commits on general.


How is it helpful to have more concepts and commands that simply duplicate advanced functionality and have to be used every time complicating even the simplest cases? As you said it can all be done with amend and other normal and optional commands already.

Or you can use an easy-to-use but powerful UI like TortoiseHG, where it's trivial to check files or hunks for commit, stash (shelve), amend, revert, rebase, ...

TortoiseHG with hggit is the best git client.

And that's before even mentioning the best parts like phases and obsolescence markers.


> and have to be used every time complicating even the simplest cases

Take a look at `git commit -a`. I sometimes teach this one to beginners if I feel that the idea of staging is confusing them.


The whole problem with the staging area in git is that it persists between operations.

Why would you want to add things piece by piece and not commit them? If they are done enough to be added they are done enough to be committed and if they are not you keep working on them together with all other unfinished files. Once you actually are ready to commit you can choose which files that are in fact ready.


> Why would you want to add things piece by piece and not commit them?

It provides useful checkpointing, so in practice I find that there are lots of things that I will add to the index even though I am going to keep working on them. Committing these intermediate changes is annoying because it just creates extra work when I make the final (squashed) commit.

This strikes me as one of those disagreements that simplifies to, "That's not how I do things, that's horrible."

The other half to this is that commonly, during an interactive commit (git add -p or hg commit --interactive), I realize that I missed some small change. Being able to persist that state means I can add the small change without redoing the interactive commit.


Surely some experienced people would want to do it this way and im not against providing an option to do so. The problem is that it's required and the names of the commands are totally misleading for beginners. "add" sounds like something you do the first time you add a file to the repository, not something you have to do every time you modify it. Don't even get me started on umstaging files: git reset which sounds like an extremely dangerous operation when all it does is unstage files, except if you pass it some flags then you can really loose data.


I have had a number of customers who have broken our applications, which have daemons listening on localhost, by editing their /etc/hosts files and removing the localhost entry. I guess various people edit /etc/hosts to prevent applications from talking to licensing servers, and in the process happen to accidentally blow away the localhost entry (since these customers don't know what they're doing). We had this happen enough that we eventually stopped using "localhost" and started using 127.0.0.1 in our code.


While some people might edit their host for nefarious purposes, I think it's wrong to attribute all of it to malice.

Personally, I set the host file to use https://github.com/StevenBlack/hosts in order to block ads on every computers I touch.

I also often use software that manage the host file and ignore the default physical file.


Every one of the cases I have had to debug in which someone had deleted the localhost entry was someone who had entries for blocking Adobe's licensing servers.


The relevant part of the GP might be "since these customers don't know what they're doing."


Relevant (source: http://catb.org/jargon/html/koans.html):

A novice was trying to fix a broken Lisp machine by turning the power off and on.

Knight, seeing what the student was doing, spoke sternly: “You cannot fix a machine by just power-cycling it with no understanding of what is going wrong.”

Knight turned the machine off and on.

The machine worked.


Looks like we need eternal IPv4 support, if it is just for 127.0.0.1 :(


I was expecting IPv4 to be around forever, for similar reasons that COBOL and the still emulated 8254 PC beep are: there's too much critical infrastructure using it.


Honestly, when could we ever retire IPv4? We've had, what three or four decades now, of building the world's infrastructure on it. What's a realistic scenario to retire that stuff even if everyone gets on IPv6 in 10 years. Another 50 years? 100? 500?

Our great-great-grandkids will still be troubleshooting the 'hey who deleted localhost from /etc/hosts' problem.


No, absolutely not. If people choose that for a local domain, that breaks mDNS.


Several of the Uber/Lyft drivers I've talked to are actually former small business owners; they owned bakeries and pizza shops, and are now retiring from that by driving for Uber or Lyft, which over much better and more flexible hours than having to work 12 to 16 hour days that they do running their former businesses.

Others are people with seasonal or part time work; they work in real estate or as relationship therapists, but use driving for Uber and Lyft to cover for the times when they're less busy.

Some more are people who are just bored during the day, and want to give people rides.

A few are college students, trying to make ends meet as they pay their way through school.

And a few more are doing this full time; some are former cabbies, who find they get a lot more business this way, some are people who never would have been cabbies, but are able to find some income from Uber or Lyft.


But then you would never be able to take advantage of the power/performance tradeoff that big.LITTLE gives you; of being able to migrate you to a big core when you need it, but save power by migrating you to the little core when you're not doing anything CPU intensive, and shutting off the power-hungry big core.


> But then you would never be able to take advantage of the power/performance tradeoff that big.LITTLE gives you

Rather: Only applications that don't depend on the invariant that the size of a cache line will stay constant over the execution time will take advantage of this. I can imagine ways how one could increase the advantage, but I don't want to go too much into technical details here.


Why would programs want to "depend on the invariant that the size of a cache line will stay constant"? That's a minor detail that most applications don't care about.

In this case, it probably mattered because when JITing code, you need to explicitly flush instruction cache after changing code. But that's not anything the application cares about; that's something the runtime cares about, and the runtime is going to want to support taking advantage of the speed/power tradeoff without making application developers have to go to the trouble of thinking about it.

Also, from a user perspective, you don't want applications to be able to demand only the big, powerful cores. That will eat through your battery much faster, with likely very little benefit.


> Also, from a user perspective, you don't want applications to be able to demand only the big, powerful cores.

This should rather be a setting in the rights system that a user can refuse the right to an application to be able to demand big, powerful cores. I can nevertheless imagine quite well scenarios where enabling a (specific) application to do so can be quite useful.


Right now, I have a MBP retina with 512 GB of SSD, 16 GB of RAM.

I could upgrade to one with the ability to drive a 4K monitor and 1TB SSD, but that's pretty much the only noticeable improvement. Sure, the CPU and GPU will probably be somewhat more powerful, but RAM and SSD space are actually my limiting factor most of the time right now. In my development, I need to run a lot of VMs, so RAM and SSD capacity are things I really need as much of as possible.

So, offering something with 32 GB of RAM, and probably a larger SSD, would make it more worthwhile for me to upgrade.


So, I think you are over-generalizing from a particular piece of anecdotal evidence.

You, yourself, have spent a lot of time online and been exposed to a lot of nasty behavior, and you don't find that a lot of rude comments bother you.

From this, you conclude that those years "desensitized" you.

Other equally valid hypotheses are that you were less sensitive to such comments in the first place; the reason you hung around, and kept on interacting in the kind of places that make such rude comments, while other people may have just spent time with their meatspace friends, is that you were less sensitive than some other people who saw nasty comments, got bothered by them, and stopped hanging out in such forums.

Or another ones is that those comments you say you are desensitized to are just things that you don't care about that much. OK, so some anon was rude to you about a throwaway comment on an imageboard. Big deal. But you might react differently when people in a community you trust or which might be influential, and which you want to value your work, actually say negative things about something that you have put a lot of your life into, but have had doubts about whether it's really the right thing for you to be doing.

The list goes on. There are a lot of possible conclusions that can be drawn from "spent a lot of time on the internet and exposed to online abuse in youth, now finds self not particularly sensitive to online rudeness." Taking from that that some people might take offense at things because they haven't had such experiences is a big leap.


Huh. I've just never installed any ad-based applications. If there's a no-ad paid version for a buck or two I'll buy it, otherwise, I just don't use it.


That sounds great in theory, until you pay for the no-ad version and the developer crams ads in a month or two later.


How did you know which apps have ads? Until recently it was not shown anywhere I think?


The latest version of the play store identifies apps that show ads or have in-app purchases.

https://files.derf.us/Screenshot_20160801-105001.png


If it's a gateway to a paid service (music stores, Uber, Lyft, etc), it generally won't have ads.

If it's free, but not a gateway to a paid service, I check to see if source is available; if source is available, it generally doesn't have ads (and if it does, I can just build it myself and remove them).

If the above checks fail, I check for a paid, ad-free version. If such a version exists, that implies the free version has ads. If the price is reasonable, I'll buy it, otherwise I'll skip it.

Finally you have free-as-in-beer but not as in freedom apps, that don't have paid alternative or any other way of generating revenue. I just assume those apps are either encrusted in ads or scams, so I don't install them.


If you only download Free Software, like from F-Droid, you can be certain it won't have advertisements or other creepy features.

The Play Store is a wild west of crap though, so you have to be much more careful.


Play Store comments, magazines and web sites that review applications?

I never install anything that hasn't been reviewed.


This is great! I was actually looking recently to see if there was any definitive guide to best practices in single and multifactor authentication, and this is a pretty good description. Would be nice if there were a separate guide on actual implementation of such systems.

I really appreciate this section, as I have been frustrated in the past by stupid password complexity requirements that actually reduce the amount of available entropy for passwords: https://pages.nist.gov/800-63-3/sp800-63b.html#appA

Note that this might have been a better link, giving an overview of the whole series and development process: https://pages.nist.gov/800-63-3/


Hmm. I wonder why one of the followup mitigations is not to move to a non-backtracking regex engine by default.

Most of what you want to do with a regex can be done with an NFA or DFA based engine. That which can't be done with an NFA or DFA based engine is generally better handled with a parser than a regex.

There are plenty of good DFA based regex matchers out there; RE2, the Rust regex crate, GNU grep, etc. At a glance, it even looks like glibc uses a DFA, though it supports POSIX REs which support backreferences so it must use backtracking at least for REs that contain backreferences.

Predictable hash collisions were a big sources of DOS attacks in web scripting languages which use tables a lot, until they started rolling out randomized hashing algorithms to prevent easily predictable hash collisions. It seems like it would be best for languages and libraries to move to DFA based regexps, at least for anything that doesn't contain backreferences, to mitigate these kinds of issues from being easy to exploit.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: