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

If we actually (as the title seems to imply) invert the parentheses, then for your example we get 1+2)*(3 .

Now all you need are the opening and closing parentheses at the start and end, and we're back to normal.


Thank you. I thought I was going crazy reading the article which doesn’t connect open and close parenthesis :: higher and lower precedence :: indent and outdent :: +1 and -1 and just flip it around to get the opposing polarity.

A real Wesley Crusher moment.


Yeah, that seems a much more robust formulation of the whole thing. Flip all parens and enclose the whole string in more parens.


that results in

    (1+2)*(3)  
which is (as GP notes), equivalent to "normal", ie what we do today:

    (1+2)*3  
Right?


Episerver bought Optimizely and then took the name.


Oh what a strange decision. But that makes more sense than yhe reverse.


I think you mean Aldi Nord and Aldi Sud, _reportedly_ split over a dispute about selling cigarettes. Lidl is not related.


I'm more surprised when I encounter one that isn't hostile like this.


They don't even get basic details right. The ship in the 8th video changes with every camera change and birds appear out of nowhere.


selection?


Generally means "selected text". I've pitched <selectedcontent>, since it's the content of the selected option.


As Spolsky said a long time ago:

> It’s harder to read code than to write it.


I think he was referring to Kernighan when he said that.


> Files in Git can be in one of these three states: Modified, Staged, Committed

> Staged: The current version of the modified file is staged to be included in the next commit.

A bit of a nitpick, but if I change a file, "git add" it, and then change it again, both of these statements are false.


I use git add -p somewhat frequently to do partial staging of a file to split up my changes into multiple commits.


`git add -p` is such a nice utility. Sometimes I do wish that it could also be used for unstages files, so that if I'm introducing a new file, I could still break its contents up into multiple commits.

Of course, the workaround there is that one adds the initial file into the staging area and then `git add -p` the subsequent changes. It could just be a bit more convenient on that front, is all.


It can, you just gotta do a magic incantation first.

  git add -N file
  git add -p file
The first command signals to git that you intend to add the file. That makes its entire content show up in the patch editor.


TIL! I seem to have just missed the `-N`/`--intend-to-add` while perusing through the `git-add(1)` manual.

Heh, it[0] even notes a similar use case:

> `-N` > `--intent-to-add` > > Record only the fact that the path will be added later. An entry for the path is placed in the index with no content. This is useful for, among other things, showing the unstaged content of such files with `git diff` and committing them with `git commit -a`.

[0]: <https://git-scm.com/docs/git-add#Documentation/git-add.txt--...>


Alternately:

    git add file
    git reset -p file


Wow, I have been using git for ages but I did not know about this. I was relying on magit (for Emacs) and git-cola.


Magit does interactive staging (and unstaging) a lot better than git itself does.

In d u, you can “s” on a file or hunk and it’ll stage just that. And if you select lines (c-spc?) it’ll stage just those lines.

To unstage, go to d s and use “u” the same way.

The massive advantage aside from line-wise staging is that you don’t need to stage linearly.


You can also discard changes that way, e.g.:

    git checkout -p -- .


I will have to read about how to use it, because it shows some hunks on a page, and I do not want to stage all of them, for example.


When it shows you a hunk that's bigger than you like, you can use 's' to split it into smaller hunks.


Thank you!


Cherrypick (-p) is wonderful. A command I also like is rebase interactive(-I)

Git rebase -i HEAD~[number of commits]


Yeah, I use `git rebase -i HEAD~n` a lot.


I think if the word "Files" was replaced with "A change [in a file]", then the statement holds true. Perhaps a better phrasing:

> In Git, a change in a file, can be in one of these three states: unstaged, Staged, Committed


The car and the bike in the first photo ( http://cdn.vox-cdn.com/uploads/chorus_asset/file/25582867/ai... ) look about as realistic as the average AI-generated human hand.


Give it another few years and "we have evidence of you doing this and that" can become everyone's nightmare.


That's not how the legal system works. You can't take a random photo to court as evidence of anything. Whether it is AI generated or not is irrelevant.


I don't think GP is referring to the legal system, or at least not exxclusively. Think about what can happen within your family, social circle, neighbourhood, workplace etc.


Also yes, but I'm not sure the legal system would ignore video evidence. What if for example someone plants doctored videos into a CCTV security system faking their presence at the same time but far away from a place where they've just committed a homicide?


I would start by defining an MVP. What do you really need to support operations, and what can wait until later? If it can be done by hand for a while, don't put it in the MVP. If you can manage with Excel for a few months, don't put it in the MVP. That should give you insight into how big of a project you are looking at. The bigger the project, the greater the chance it's not going to go well.

EDIFACT is a bit of a mess, but not that scary. IME the details of logistics are more complex.

If you are in Europe there are a lot of people in software development in non-glamorous industries. I see more risk in judging tech talent. How do you know if you're talking to the right people?


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

Search: