Live data from Hacker News

I found a useful Git one liner buried in leaked CIA developer docs

spencer.wtf

71–80 of 273 posts

Re: I found a useful Git one liner buried in leaked CIA developer docs

#71
post #29

Earlier quoted context omitted.

Can you explain TUI? I have never heard this before

Terminal User Interface, contrasting with a Graphical User Interface (GUI). Most often applied to programs that use the terminal as a pseudo-graphical canvas that they draw on with characters to provide an interactive page that can be navigated around with the keyboard. Really, they're just a GUI drawn with Unicode instead of drawing primitives. Like many restrictions, limiting oneself to just a fixed grid of colored…

> an interactive page that can be navigated around with the keyboard

Or mouse / trackpad.

I really haven't seen anything better for making TUIs than Borland's Turbo Vision framework from 35ish years ago.

Re: I found a useful Git one liner buried in leaked CIA developer docs

#73

We all have something similar, it seems! I stole mine from https://stackoverflow.com/questions/7726949/remove-tracking-... . I also set mine up to run on `git checkout master` so that I don't really have to think about it too hard -- it just runs automagically. `gcm` has now become muscle memory for me. alias gcm=$'git checkout master || git checkout main && git pull && git remote prune origin && git branch -vv | gre…

Same using a git alias rather than shell, and without the network bits, it just cleans up branches which have an upstream that has been deleted:

    '!f() { git branch --format '%(refname:short) %(upstream:track,nobracket)'  | awk '$2~/^gone$/{print $1}'  | xargs git branch -D; }; f'

Re: I found a useful Git one liner buried in leaked CIA developer docs

#75
post #30

The main issue with `git branch --merged` is that if the repo enforces squash merges, it obviously won't work, because SHA of squash-merged commit in main != SHA of the original branch HEAD. What tools are the best to do the equivalent but for squash-merged branches detections? Note: this problem is harder than it seems to do safely, because e.g. I can have a branch `foo` locally that was squash-merged on remote, but…

Not just squash merges, rebase-merges also don't work.

> What tools are the best to do the equivalent but for squash-merged branches detections?

Hooking on remote branch deletion is what most people do, under the assumption that you tend to clean out the branches of your PRs after a while. But of course if you don't do that it doesn't work.

Re: I found a useful Git one liner buried in leaked CIA developer docs

#76

So effectively "I just discovered xargs"? Not to disparage OP but there isn't anything particularly novel here.

And they have to learn that from cia? That says so much about the generation we are in, just don’t go to school but learn math from mafia

Where else would you learn about triple-entry bookkeeping?

Re: I found a useful Git one liner buried in leaked CIA developer docs

#77

So effectively "I just discovered xargs"? Not to disparage OP but there isn't anything particularly novel here.

This feels like gatekeeping someone sharing something cool they've recently learned. I personally lean more towards the "let's share cool little productivity tips and tricks with one another" instead of the "in order to share this you have to meet [entirely arbitrary line of novelty/cleverness/originality]." But each to their own I suppose. I wonder how you learned about using xargs? Maybe a blog-post or article not…

No I agree with you. This whole aura of "well IIIII knew this and YOUUUUU didnt" needs to die. I get that it's sometimes redundant and frustrating to encounter the same question a few times... but there's always new people learning in this world, and they deserve a chance to learn too.

Why do people constantly have to be looking for any way to justify their sense of superiority over others? Collaborative attitudes are so much better for all involved.

Re: I found a useful Git one liner buried in leaked CIA developer docs

#78
post #37

Earlier quoted context omitted.

[flagged]

Sorry, but this 65 yo grey-beard disagrees. A TUI to me, back in the 80s/90s, was something that ran in the terminal and was almost always ncurses-based. This was back when I was still using ADM-3A serial terminals, none of that new-fangled PCs stuff.

We might've been caught on different parts of the wave. I checked Ngrams out of curiosity

https://books.google.com/ngrams/graph?content=TUI&year_start...

Basically it was never used, then it was heavily used, and then never used, and then in the early 00s it took off again.

That'd explain why you used it, I never did, and now young kids are.

Re: I found a useful Git one liner buried in leaked CIA developer docs

#79
post #50
post #29

Earlier quoted context omitted.

Terminal User Interface, contrasting with a Graphical User Interface (GUI). Most often applied to programs that use the terminal as a pseudo-graphical canvas that they draw on with characters to provide an interactive page that can be navigated around with the keyboard. Really, they're just a GUI drawn with Unicode instead of drawing primitives. Like many restrictions, limiting oneself to just a fixed grid of colored…

I prefer tui's for two reasons. 1. Very used to vi keybindings 2. I like low resources software. I love the ability to open the software in less than a second in a second do what I needed using vi motions. And close it less than a second. Some people will be like you save two seconds trying to do something simple. You lose more time building the tool than you will use it in your life. It's not about saving time. It's…

"It's not about saving time, it's about eliminating the mental toll from having to context switch"

This broke my brain! Woah!

Post reply on HN