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

For the same reason they never go on time.

Because for them to do so, every single thing needs to happen perfectly, while to be late of over budget, a single thing needs to go wrong.

Over budgetting doesn't work because then your customers won't chose you when the bidding starts.


Fantastic article.

I was exactly in the situation the article describes, I installed it, then, didn't find a use case.

But that's because Ubuntu doesn't come with completion enabled by default.

You have to add in your bashrc:

    if [ -e /usr/share/doc/fzf/examples/key-bindings.bash ]; then
      source /usr/share/doc/fzf/examples/key-bindings.bash
    fi
The fzf and ubuntu docs don't mention you have to.

Couldn't find easily how to do it with google, but chatgpt saved the day once again.


You do have to remember to use it, but the thing to keep in mind is that you can pipe a list of ANYTHING into it. Any list of text items you can search through with a text query is fair game.

   git log --oneline | fzf
for example is one of my favorite tricks. Instead of scanning by eye or repeatedly grepping to find something, it's a live fuzzy filter. And depending on how deep you want to go you can then add key bindings to check out the selected commit, or preview the full message, or anything really.


And don't forget that your selection is printed to stdout:

    git log --oneline | fzf | cowsay
Sky's the limit.


Strictly speaking the ubuntu/debian docs do mention it, but yeah its not super discoverable: https://salsa.debian.org/go-team/packages/fzf/-/blob/master/...


The default install script asks if you want to install key bindings and adds that to your bashrc. How did you install fzf?


apt install? There's no way I'm integrating a core tool like that with a crude "curl | zsh" hack. How and when would it get updated? Am I expected to stick that in an Ansible playbook?


A shoutout to home-manager, where it's just programs.fzf.enableBashIntegration = true;



Yes. It's a shell hook, it's expected for you to add it to your bash/zsh .rc yourself. How else can it work?


For an article titled "You've installed fzf. Now what?", I would've expected step 1 to be "how to add the shell hook for your particular shell". Especially since people here are referencing extra integrations that the bundled shell hook doesn't setup.


Packages can place init scripts into /etc/profile.d and those get autoloaded by shells.


This is what happens when tooling providers try to do their own packaging. Homebrew, apt, rpm, and other package managers, as well as bash, zsh and other shells, all offer standardized ways to install configuration loader scripts for the user's environment, and to display installer messages that prompt the user to do it - but fzf has a bunch of functionality to go around all that and auto-update itself in place and hack lines into the user's bashrc/zshrc.

Not trying to single out fzf here - there are many other tools that do this - but I find this behavior really sad because it makes me very disinclined to trust the tool with anything. A command-line tool should not be trying to auto-update itself or manipulate dotfiles in the user's home directory. It's dangerous and unexpected.


There’s no real good mechanism for what fzf is trying to do. profile.d might work, but I think that is more intended for environment variables, rather than interactive shell changing scripts.

There’s no standardised way to extend interactive shell configuration without just appending to /etc/bashrc.

The other problem with this is that it is hard to disable. What if you want fzf but without the key bindings? FZF could add a mechanism for this, but it doesn’t fully solve the problem, because the FZF script being added to global configuration will always be run before any user config.

In this specific case, it is a limitation of bash (and probably ZSH as well) that there is no simple package-manger compatible extension mechanism for interactive shell plugins which doesn’t sacrifice user control.


That is not where interactive shell confs should go, or it'll get loaded in non interactive contexts as well, which you usually don't want.


Not parent but on pop-os, using sudo apt install zfz I got the same behavior, had to add it myself to .bashrc


Pretty much par for the course, Linux distributions don't do per user configuration of tools beyond appending to PATH or setting some essential environment variables using scripts in in /etc/profile.d/. They will most certainly not mess with login scripts.


Yeah sure, that makes sense. I'm surprised that the .deb doesn't install the stuff from `$upstream/shell` into `/usr/share/fzf` though. That's the sort of thing `/usr/share/$prog` is intended for.

Then it would just be (in bash anyway):

   source /usr/share/fzf/keybindings.bash


In debian:

  source /usr/share/doc/fzf/examples/completion.bash
  source /usr/share/doc/fzf/examples/key-bindings.bash


This enables the C-r / M-c / C-t key bindings, but there's also a completion.bash file. This enables the "**" completion trigger, which can contextually complete paths, envvar names or PIDs in commands. (See "Fuzzy completion for bash and zsh" in fzf's readme [1]). Similarly, you can add to your .bashrc:

    if [ -e /usr/share/doc/fzf/examples/completion.bash ]; then
      source /usr/share/doc/fzf/examples/completion.bash
    fi
/usr/share/doc/fzf/README.Debian explains this, as well as the setup for zsh, fish and vim.

[1]: https://github.com/junegunn/fzf#fuzzy-completion-for-bash-an...


Thanks fore sharing. I was also lost reading this article, because I installed with apt (Debian). After searching for "fzf + Ctrl+R" I found about the keybindings part.


Given the terrible result we came up with in the Python community, I understand the JS wants to take their time. It's a great feature, but it's hard to get right, especially on an existing language.

Not to mention JS is not typed, but pattern matching that can't match typescript types would be terrible.


What's wrong with match? I've used it quite a bit and it is quite powerful.


The syntax is reusing regular python syntax with completely different effects, so you have to learn 2 syntaxes.

Trying to do simple things like matching the content of a variable will fail if you forget you have to use a dotted path if you want to avoid binding.

Trying to do advanced things such as "match a dict with variable key names and values, but you wish to enforce the number and the types and unpack them in variables" is ridiculously twisted to do, when it's even possible.

I use match/case, but it like the early years of type hints or asyncio: terrible ergonomics, and we know there is a ceiling to how much it can improve.


Its incredibly powerful! One downside is variables captured in the match are lifted to the function level. The lack of block level scoping in the match statement leads to a lot of people shooting themselves in the foot by overwriting a variable that they didn't intend to. On a personal note, I find the 2 levels of indentation to reach the case body to be too much as well... but that's just a personal preference.


Sure.

Meanwhile ChatGPT is used everywhere in France, and it's now synonymous with AI for most people in Europe.

Game over.


OpenAI has had significant up time issues. They don't seem to know how to run production services. Business cannot rely on them as a foundation to build upon. Their moat is quite thin and dry


Well they are on Azure so....


Just like Netscape is synonymous with browser? Just 5 years ago DeepMind was at the forefront. AI tech is changing so fast who knows who will be ahead in the next 5 years?


If Google product was ahead of the competition I would agree with you.

But GPT is just miles away better than everything else, and it keeps getting better at a scary rate, especially because the feedback loop from so many users is making it better.


Except that ChatGPT is such a bad name for a product. I don't think Bard is much better but I don't think ChatGPT is going to be a household name.


CatGPT is a better name than ChatGPT, perhaps that’s why it’s taking off (allegedly) in France.


I think one of the reasons it's working so well here is because formal writing is still a big thing:

- heavy administration

- schools have a strong emphasis on essays

- getting a job often implies writing a cover letter

And since French is not easy, so many people find it to be a barrier to entry.

While I love GPT for quickly giving me code snippets of things I would take minutes to come up with, my friends have this problem for the regular day-to-day language.

I never noticed it before, because it's so natural to write to me, that I never have to think to hard to express anything. And because I've been a freelance for so long, doing formal writing is fluid. I know all the canned phrases by heart. The polite words to end the message.

But I came to realize: they don't.

As soon as I showed them chatgpt, their eyes light up. The killer feature for them was not the ability to answer complicated questions or save on search, nor was it the possibility of getting a summary. It was producing boring letter-like messages, with no typo.


chatGPT is great to rewrite certain text in grammatically correct and simplify or make it more formal, etc.


The most popular theory for the North Stream sabotage is that the US did it, so there is that.


President Biden said the US was going to stop it.

https://m.youtube.com/watch?v=OS4O8rGRLf8


The official motivation in Irak were WMD, eventually revealed to be a complete fabrication by the Bush administration.

The United Nation voted against the war, and the US went anyway, under the pretense there was a link with 9/11, which we know now is BS.

If Russia did this, you would call it what it is: a bunch of greedy bullies that seized the opportunity provided by a terrorist attack to justify the occupation of a sovereign country because it's a military and economic winning move.

But apparently the US gets a pass at being a monster.


After the second world war:

- War in Iraq. Operation Iraqi Freedom (OIF; March 2003 - November 2011) ...

- War in Afghanistan. Operation Enduring Freedom (OEF; October, 2001 – December, 2014) ...

- Persian Gulf War (1991) ...

- Vietnam War (1962 - 1973) ...

- Korean War (1950 - 1953)

And this does not include things like coups in South America, or the fact they are surrounding Iran with missiles.

The USA is among the biggest war mongers of the world, they have killing millions since 1950, and everybody seems to just go "meh".


War in Afghanistan

War against China in Mongolia

War against Georgia

War against Finland

War against Insurgenst in eastern europe

War against Insurgents in ukraine

War against Checheyna

War in SouthKorea

War in Vietnam

Bloody beasts those empireus..


So what you are saying is that the US has a track record almost as long as what we consider one of the worst example of dictatorship in the world.

Stating you have only being 80% the serial killer that jack the ripper was is not really what I would strive for in life.


Im saying, that the structure of empire, does not give a damn about the values, it corrupts all, infiltrates all, from the highest king to the lowest peasant, the mindset starts to differ, the values start to differ, the processes start to devolve and dissolve, turning a democratic process of searching for compromise into a partisan war of conquest. The outcome is the same, but one struggles against it and the other embraces it to the fullest as the natural order of things.

The dosage makes a thing a poison, but this beast can not be dosaged, as the lack of self-control is in its very heart.


I agree, but that is not widely understood.

A lot of people still think the USA are angels liberating the world.


Well, compared to the alternatives that go around, dressed up in nice propaganda but horrific beneath.. they still kind of are even though heavily deformed by 70 years of empire.


Funny that you use a throwway while OP is using his real account to state opposite but equally risky positions.


Indeed, and unlike the Russian excuse of the fake bio weapon labs, the US had the totally valid excuse of weapons of mass destruction that were 100% real and not invented by the Bush administration.

Good thing the entire world opposed the war when the USA decided to go against the UN vote. Because letting those of hundreds of thousands of innocents die just because the USA are the strongest bully of the planet would be weighting heavily on our conscience otherwise.

Everyone would remember.


+1

Google track record tells us they have no problem with with blurry ethic lines. They create the software for weapons, track the entire planet and were part of PRISM.

So yes, I tend to think your explanation is most likely.


> They create the software for weapons

If you're thinking of Project Maven, that ended in 2019, so I would use past tense.

> were part of PRISM

As I understand it, the NSA was snooping on Google's internal traffic between services. Google was not complicit, at least there's no evidence of that.


https://en.wikipedia.org/wiki/PRISM

"PRISM collects stored internet communications based on demands made to internet companies such as Google LLC"


You said "were" part of PRISM, so I thought you were thinking of the related MUSCULAR program, where "GCHQ and the NSA have secretly broken into the main communications links that connect the data centers of Yahoo! and Google" (https://en.wikipedia.org/wiki/MUSCULAR). Presumably Google's deployment of TLS for internal traffic after the Snowden leaks put an end to that.

If you're thinking of PRISM itself, I'm not sure in what sense Google is "part of" it? Google sometimes provides data in response to court orders, but there's not much they can do about that.


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

Search: