Hacker News new | past | comments | ask | show | jobs | submit | justinmayer's comments login

Integrating ripgrep-all with fzf makes for a powerful combination when you want to recursively search the contents of a given directory.

I have been using a shell function to do this, and it works wonderfully well: https://github.com/phiresky/ripgrep-all/wiki/fzf-Integration

The built-in rga-fzf command appeared in v0.10 and ostensibly obviates the need for the above shell function, but the built-in command produces errors for me on MacOS: https://github.com/phiresky/ripgrep-all/issues/240


I also have a custom rga-fzf function, I think adapted from that:

rga-fzf () { local query=$1 local extension=$2 if [ -z "$extension" ] then RG_PREFIX="rga --files-with-matches --no-ignore" else RG_PREFIX="rga --files-with-matches --no-ignore --glob '*.$extension'" fi echo "RG Prefix: $RG_PREFIX" echo "Search Query: $query" FZF_DEFAULT_COMMAND="$RG_PREFIX '$query'" fzf --sort --preview="[[ ! -z {} ]] && rga --colors 'match:bg:yellow' --pretty --context 15 {q} {} | less -R" --multi --phony -q "$query" --color "hl:-1:underline,hl+:-1:underline:reverse" --bind "change:reload:$RG_PREFIX {q}" --preview-window="50%:wrap" --bind "enter:execute-silent(echo {} | xargs -n 1 open -g)" }

It allows one to continually open lots of files found through rga-fzf, so one can look at them in $EDITOR all at once. Useful sometimes.


Having owned countless Mac notebooks over the last 30 years — starting from the PowerBook 140 up through the M1 MacBook Pro — I can tell you with confidence that Apple has made the same sleep change shenanigans mentioned in OP’s article.

It used to be that you could count on a sleeping Mac to stay asleep until you explicitly woke it up by opening the lid, pressing a key on the keyboard, or pressing the trackpad (or separate trackpad buttons — yes, those used to exist). Perhaps more importantly, you could count on the sleep function to have barely any effect on the Mac battery.

I don’t recall when, but at some point over the aforementioned three decades, Apple started changing the terms of this sleep contract.

It seems Apple decided that some functions should still be available when the Mac is “sleeping”, with no way to restore the previous behavior. As a result, random wake-ups are the new normal, replete with unexpected battery drainage.

I have seen modern MacBooks go to “sleep” with an 80% charge at night, only to be rendered dead with a 0% battery level by morning. Does something this extreme happen often? No. But it never happened before. And moderate battery loss while sleeping? That happens very often on today’s MacBooks.

Your mileage may very. And Apple probably continues to implement better computer sleep behavior than competing vendors. But I would argue that people who think MacBook sleep behavior is excellent… have never experienced how it behaved in the past. That behavior was superb.

But sadly, I imagine most people have never experienced that excellence.


As the maintainer of the Python-based Pelican static site generator for over a decade, I can say with confidence that my experience has been nothing like what is described in this article.

Most of Pelican’s code was written by other people, and yet I have spent almost zero time debugging that code, much less my own. After taking advantage of Pelican’s rich plugin ecosystem and adding a handful of useful plugins, I continue to be amazed by how much time this publishing system saves me, and how little time I must spend to keep everything running smoothly.

What it would take to accomplish this by writing HTML by hand instead… I simply can’t fathom it. But once again, that’s just one person’s experience, and YMMV.

[0]: https://getpelican.com


As a credited contributor to the EDICT[1] Japanese/English dictionary, I am very pleased to see its successor JMdict[2] actively supported by this project. Bravo!

And as someone who now also speaks Italian, I am even more pleased to see that Italian support will be added tomorrow.

It is wonderful to see such a useful tool released as an open-source, self-hosted project. (^_^)

[1] EDICT: http://edrdg.org/jmdict/edict_doc_2009.html

[2] JMdict: https://en.wikipedia.org/wiki/JMdict


Hi!

Thank you for helping me learn Japanese! :)

Can you please explain what do you mean by actively supporting JMDict? I hope I didn't make an attribution mistake, or misunderstood something. My understanding is that I can use those files in my project as long as I follow the license guidelines.

It makes me really happy that so many people are interested in it. :)


Sorry for the confusing language choice on my part. I just meant that I think it's great that your project supports JMdict. I think how you are using JMdict is indeed totally okay! :^)


Oh, okay. Thank you!


Python 3.12 is now available via asdf [1]:

    asdf install python 3.12.0
[1]: https://justinmayer.com/posts/homebrew-python-is-not-for-you...


Quite true. I actually submitted a pull request [1] over a month ago to make it clear to potential users what will happen when Ollama is launched for the first time, but based on the complete lack of response from Ollama developers, I get the distinct impression that they are reluctant to draw attention to these important details. Unfortunate.

[1]: https://github.com/jmorganca/ollama/pull/395


If you use Fish shell and Python, my project VirtualFish can make managing virtual environments a lot easier and more fun:

https://github.com/justinmayer/virtualfish


Thanks for mentioning. I think it would help a bit if you copy-paste a short terminal session to show what VF looks like in operation. I know there are extensive docs, but a quick tldr/screenshot helps quite a bit in a README I find


This project is not open source but instead uses the “Business Source License”. I only mention this in case open source is something that is important to you.


I hadn't heard of the “Business Source License”, but reading it makes it seem pretty scary. Basically any usage of the software that could be considered production is prohibited, which probably could even mean personal usage in a non-development fashion.


A interesting option I haven’t seen mentioned here is Beeware, an open-source (MIT) project with this summary:

“Write your apps in Python and release them on iOS, Android, Windows, MacOS, Linux, Web, and tvOS using rich, native user interfaces. Multiple apps, one codebase, with a fully native user experience on every platform.”

Source: <https://beeware.org>


I use and really like Gitea: https://gitea.io/

You could also have a look at a recent Gitea fork, with a very unfortunate and cumbersome name: https://codeberg.org/forgejo/forgejo


It's derived from Esperanto and the word "forge". It is pronounced for-jay-oh.


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

Search: