HNHacker News
TopNewBestAskShowJobs

alex_smart

1,323 karma · joined April 30, 2014

submissionscomments
alex_smart··on Git ignores .gitignore with .gitignore in .gitignore
>"git status" needs to be clean. I don't want to see any untracked temporary files.

Why do you not want to see any untracked files? What harm does it cause? What is the problem that you are trying to solve?

> If it's untracked either it needs to be ignored or it's a new source file to add to the index.

Or it is a file that stores your notes or experiments that don't necessarily belong in a branch, do not want to include in your next commit, but you also don't want to be invisible to ".gitignore" aware tools - and increasingly many modern tools are (vscode, ripgrep, emacs's projectile to name a few).

>Keeping untracked files lying around not gitignored is a recipe for one day committing one by mistake, or conversely, that some of them are source files you've forgot to commit.

Neither of those are a factor if you consciously check what you are committing using "git status" and "git diff --cached".

This is the habit you want to inculcate in your junior developers, that they should consciously think about the commit they are sending for code review, not that they should meticulously manage and be completely dependent on .gitignore (and i presume you also mean .git/info/exclude - because of course they would also have local files that they don't want to commit but are not worthy of being put into the repo's .gitignore).

alex_smart··on Git ignores .gitignore with .gitignore in .gitignore
How is the git status "polluted" by reporting untracked files that you don't intend to commit?

If anything, I would say that such tricks make git status lie to you. What if you look at the git status and conclude that there are no unchanged files worth tracking and then with that false sense of safety decide to run 'git clean -fdx'? Sounds like an easy way to lose work.

Why is presence of untracked files in git status bothersome to anyone, especially when that is exactly what they are intentionally doing?

alex_smart··on Git ignores .gitignore with .gitignore in .gitignore
>There is value in "making a decision" for each untracked file, of whether to explicitly add it or ignore it.

I would argue that you should decide between explicitly adding it or ignoring it, or deliberately doing neither.

>This combines well with things like a PS1 that indicates if you have any unclean state (including both changes and untracked files).

If you intend to keep untracked files in your directory, choose a PS1 that does not bother you about untracked files.

You are losing important information from git status when you exclude untracked files that you are actually working on and not just some random junk your ide generated. What if you look at the git status and conclude that there are no unchanged files worth tracking and then with that false sense of safety decide to run 'git clean -fdx'? You would lose those files permanently!

I honestly don't understand why the presence of untracked files in your git status is such a bother to you!? Like how exactly does it hurt?

alex_smart··on Git ignores .gitignore with .gitignore in .gitignore
Even if you don't want to go the whole "git add -p" route, at the very least:

1. Use "git add <filename>" manually for the files you want to add.

2. Do a "git status" and "git diff --cached" to review what you are about to commit before committing it.

alex_smart··on Git ignores .gitignore with .gitignore in .gitignore
I mean this is only a problem if your commit work flow is "git add . && git commit".

A bad habit, in my opinion.

alex_smart··on Why does pepperoni curl? (2019)
My argument has not changed from my first comment. These were the last two sentences from it:

>If I start making pizzas in India and because mozzarella is hard to find here, just use processed cheese instead and may be put more chilis on top to suit Indian tastes, does the dish stop being pizza?

>There has to be some reasonable limitation on how little you modify something before you get to call it a new "invention".

How have I moved the goal post?

In fact I never called CTM and Butter Chicken the same dish - I called them virtually identical and too similar etc, it was a strawman you created and you then proceeded to say that I was moving the goal post when I reiterated my original position.

Please try to keep the quality of discussion higher. If I wanted to have endless discussions with argumentative people who have no ability to read, I would go on reddit.

alex_smart··on Why does pepperoni curl? (2019)
>Now Chicken Tikka Masala is the same dish as Butter Chicken. Alright then.

They are 99.9% similar. Can anybody of sound mind make the claim that they are completely different recipes?

alex_smart··on Why does pepperoni curl? (2019)
>It has tomatoes in it for one.

As does Butter Chicken which was invented in a restaurant in Delhi at least 10 years before CTM's appearance in Britain. Butter Chicken and CTM are 99.9% the same dish. So again, I ask, where exactly is the "fusion" in CTM?

The Portuguese arrived in India in 1498 and brought tomatoes with them. It was used in Indian cooking for centuries before the invention of the CTM. Our recipes did not have to travel to Britain for them to have tomatoes.

SMH. You guys have absolutely no idea how infuriating this is. Trying to teach me about my culture as if you know anything about it.

alex_smart··on Why does pepperoni curl? (2019)
>You are free to go through my comment history and draw your own conclusions.

I can also just draw my own conclusions from the interaction I am having with you right now.

>So now it can be from Bangladesh, India or Pakistan.

No, the urban legends noted in the Wikipedia say that it could be from those places.

Butter Chicken was actually invented in Delhi in a restaurant called Moti Mahal in the early 1950s by Punjabi migrants. CTM is too similar a dish to Butter Chicken to be called a new dish, let alone an "invention".

alex_smart··on Why does pepperoni curl? (2019)
>I think it's just best to accept the fact that almost all food was fusion at some point in time, and there's no reason to think it won't become part of a new fusion going forward.

What was the fusion in chicken tikka masala?

And come to think of it, what other new dish has the British Indian restaurant industry come up with in the 50-60 years after the chicken tikka masala. Such amazing creativity right at the very start (only a coincidence that it is 99.9% same thing as another dish being sold in Delhi for at least 10 years before) and nothing since? What an incredibly sad story.

alex_smart··on Why does pepperoni curl? (2019)
Recipe for butter chicken: roasted pieces of tandoori chicken in a tomatoey butter based sauce.

Recipe for chicken tikka masala: roasted pieces of tandoori chicken in a tomatoey cream based sauce.

As is often the case with cultural appropriation, the real innovation by the appropriator was the marketing. In my view, this is what probably happened: multiple restaurants found the fake origin story a profitable and interesting marketing tool and judging by how popular indian food is in the UK today, it obviously worked.

alex_smart··on Why does pepperoni curl? (2019)
>No, but if you call that pizza something like Pizza Kalari would it then be wrong to say that Pizza Kalari is an Indian invention?

I already answered your question in the next line in my comment -- There has to be some reasonable limitation on how little you modify something before you get to call it a new "invention".

Besides, no Indian would feel the need to do that because, unlike the British, we are quite comfortable in our culinary identity. And most Indians would not respond well to such marketing. In fact, things like Pizza and Burger fill pretty much the exact opposite niche in India where eating very crappy versions of these western foods seems to have an aspirational value to it.

alex_smart··on Why does pepperoni curl? (2019)
Oh, it says so in the Wikipedia. It certainly must be true!

Although it this case, it is not even true that the Wikipedia actually says that. Did you even read the article or are you just here to troll? Did I accidentally wander into reddit by mistake?

[The Wikipedia recounts several different versions of the urban legend. Three different sources with three different versions one where the chef was Bangladeshi, one where the chef was Indian, and another where the chef was Pakistani.]

alex_smart··on Why does pepperoni curl? (2019)
>According to Wikipedia [1] the dish chicken tikka masala is thought to have been invented by Bangladeshi chefs working in the UK in the 1960s. Doesn't that make it at least somewhat British?

First of all that is not a well-established origin story, but more like an urban legend. There are multiple conflicting versions of this same urban legend where multiple different restaurants claim to have invented the dish in the same way. And the restaurant chain (Moti Mahal) from one of these versions had been serving a virtually identical dish in their Delhi restaurant since the 1950s, ten years before any of these supposed origin stories. I will let you come to your own conclusions about what scope for authenticity that leaves for these stories.

>If I, as a Swedish person, move to the US and compose an awesome recipe for pizzaballs [2] where I combine Swedish meatballs with the American love for all things pizza [3] and it becomes a huge hit which is exported to the rest of the world, would that make the dish Swedish?

In your case at least you will be doing some "fusion" or "innovation" right? What exactly is the "fusion" or "innovation" in chicken tikka masala? Can anyone of sound mind actually claim that chicken tikka masala and butter chicken are two completely different dishes?

While we are making up examples on the spot, here is a more accurate one. If I start making pizzas in India and because mozzarella is hard to find here, just use processed cheese instead and may be put more chilis on top to suit Indian tastes, does the dish stop being pizza?

There has to be some reasonable limitation on how little you modify something before you get to call it a new "invention".

alex_smart··on Why does pepperoni curl? (2019)
I felt offended by chicken tikka masala being called British. How many countries in the world do you think I could be from?

Yes, I am obviously Mexican.

alex_smart··on Why does pepperoni curl? (2019)
This comment is hilarious to me because this is the first example i have seen of white people getting their culture appropriated.

I suppose an Italian reading this might feel the same way I felt when I learnt that the British claim chicken tikka masala as their own.

alex_smart··on Ask HN: Why does nobody support h.265/HEVC anymore?
Software is also, in fact, not math. Nor is the math the utility of software. Software's utility (usually) is the business problems it solves. The processes are encoded as math, and a lot of writing software is about improving those processes, but that is not in fact the utility.

Think of the guy who invented the equi-tempered scale. All throughout history you had to make instruments that are tuned to play in one scale. Now you can suddenly make instruments that can play all of them. Solves a real problem from music by making an improvement in the representation, so it can be viewed as all math. But is it really "just" math?

alex_smart··on Ask HN: Why does nobody support h.265/HEVC anymore?
It definitely is. Church Turing thesis basically states that all systematic procedures can be encoded as math. So, software can be encoded as math yes, but also music can be encoded as math. Life can be encoded as math (which is what our DNA is).

Rather than providing a basis of not allowing software to patented, I think it makes the statement "X can be encoded as math" trivially true - and therefore uninteresting.

In so far as there is value in patents on any systematic procedure at all, the position that "software should not be patentable because it can be encoded as math" is completely untenable.

alex_smart··on Ask HN: Why does nobody support h.265/HEVC anymore?
The Church Turing thesis basically states that any systematic procedure can be encoded into math. Software can be encoded as math, yes, but music can be encoded as math. Life can encoded as math (which is what your DNA is).

I really don't understand how the parent commenter fails to see that this makes "X is math" basically a meaningless statement because it is always trivially true and makes their position "math shouldn't be patented" completely untenable.

alex_smart··on Ask HN: Why does nobody support h.265/HEVC anymore?
First principles is fine, but where is the argument?
alex_smart··on Ask HN: Why does nobody support h.265/HEVC anymore?
I don't quite understand how you do not recognize that that is a strong argument against your position.
alex_smart··on Emacs for Professionals
Your assumption is that the state of a dired buffer is trivial to recreate so should be thrown away. While that is the case in the simplest use case of using dired as a replacement of a bog-standard file browser, it is possible for the state of the dired buffer to be more complicated. For example, the buffer could contain marks and flags for some batch operation the user was working on before they decided to visit a subdirectory. The dired buffer may not even correspond to just one directory but may be a result of a complex find operation or may contain some arbitrary set of directories the user manually curated. It would certainly not be nice to the user to lose all this state accidentally.

This is why emacs takes the conservative approach and chooses not to throw away dired buffers by default and gives the users the option of choosing to do discard the current buffer consciously by using the "find-find-alternate" command (bound to "a" by default in dired-mode-map).

alex_smart··on We think this cool study we found is flawed. Help us reproduce it
Since two people have come to the same misunderstanding, I must have worded my argument inadequately.

Of course review is not the time to accept or form new hypotheses. Neither I nor the author of this article is suggesting that we should accept this new hypothesis "old people are more likely to give bad faith responses" from the data collected for this study.

But review is the perfect time to look for interesting features in the data that challenge the original hypothesis. In this case, it is very difficult for the original hypothesis to explain why older people are only worse at giving random responses in a very specific way: giving answers that are all 0s or 1s.

alex_smart··on Emacs for Professionals
https://github.com/emacs-mirror/emacs/commit/5afe27624f7

This is the patch that added the feature you wanted to dired. 30 lines of diff, 20 of which is documentation.

Calling a piece of exceptional software an "abomination" because of one specific behavior that you find annoying is the wrong attitude to have, especially for an emacs user.

It is emacs. You can make it do whatever you want within a few lines of lisp.

alex_smart··on Emacs for Professionals
Someone posted a link in the comments pointing out that Emacs's internal representation of a buffer is not really designed to support multiple cursors efficiently. For batch changes in a large file, macros would be more suitable. I haven't really seen this be a problem in my workflow.
alex_smart··on Emacs for Professionals
It is more like interactive editor macros where you can see the intermediate results on the fly.

The advantage over search-and-replace is that you get to work with a nice, familiar language (the interactive commands you send to your editor) rather than using regex.

alex_smart··on We think this cool study we found is flawed. Help us reproduce it
It would be p-hacking if we just took the same data to conclude that old people are more likely to give bad faith responses. That is just a possible explanation for the data being offered to reject the original hypothesis.

At the very least, it is an interesting observation that the entire trend line disappears on removing data points where people guess all same coin toss results.

alex_smart··on We think this cool study we found is flawed. Help us reproduce it
You don't have to view it as "throwing out the data". You can just think of it as an alternative explanation for the data.

Original hypothesis: Old people are worse at giving random responses.

Alternative hypothesis: Old people are more likely give bad faith responses.

This review is suggesting the AH is equally good at explaining the data as the OH.

alex_smart··on Append Reddit – Chrome extension that redoes searches with Reddit appended
For more complex queries, you can use https://github.com/pushshift/api.
alex_smart··on Show HN: Warp, a Rust-based terminal
The emacs-like keybindings are default for bash (and probably zsh too). So you need zero lines of configuration, just the awareness that they exist.
← PreviousPage 10 of 19Next →