HNHacker News
TopNewBestAskShowJobs

The-Compiler

167 karma · joined December 20, 2014

[ my public key: https://keybase.io/the_compiler; my proof: https://keybase.io/the_compiler/sigs/75S2y5WIBsCLdQo_tr2et6Qp1zJAfFPgcN27_GdlhmQ ]
submissionscomments
The-Compiler··on Qutebrowser 2.0
> despite this not being a job

Yes and no - I'm only employed for 2 days a week, and earn enough in (recurring) donation income for this to be considered a part-time job. I also do some training/consulting around Python/pytest with my company (Bruhin Software), but that's usually only a couple of days per month.

> Using a virtual env. did not solve the issues for me.

That's weird, I'm not aware of any issues like that which wouldn't be resolved by using a virtualenv. You might want to try using qutebrowser's mkvenv.py which takes care of everything (or at least tries to):

https://github.com/qutebrowser/qutebrowser/blob/master/doc/i...

The-Compiler··on Qutebrowser 2.0
> I really love Qutebrowser. I'm mostly missing autofill/password manager integration, but that's because I'm too lazy to learn to write scripts for this.

FWIW there are various existing ones you could use: https://github.com/qutebrowser/qutebrowser/tree/master/misc/...

> And the unbeatable openness and availability of The-Compiler is really appreciated!

Thanks for the nice words! :)

The-Compiler··on Qutebrowser 2.0
> since PyQt5-sip is missing from OS packages

Arguably this is a Ubuntu (Debian?) packaging bug. Upstream recommends using "PyQt5.sip" ever since PyQt 5.11, yet Ubuntu seems to package PyQt 5.14 but retaining the old "sip" name.

I wasn't aware of it, or I would've kept the (quite small) compatibility shim in v2.0.0 - I opened an issue here: https://github.com/qutebrowser/qutebrowser/issues/6082

In the meantime, you could probably symlink it instead:

    ln -s /usr/lib/python3/dist-packages/sip.cpython-38-x86_64-linux-gnu.so /usr/lib/python3/dist-packages/PyQt5/ 
(Though you'll then run into the next issue, apparently Ubuntu 20.04 doesn't have importlib_resources packaged: https://github.com/qutebrowser/qutebrowser/issues/6084 ...)

Alternatively, either use the Ubuntu "qutebrowser" package (pre-v2.0.0), or install in a virtualenv instead:

https://github.com/qutebrowser/qutebrowser/blob/master/doc/i...

There's an option there to install a binary Qt/PyQt from PyPI, so you don't need to build anything from source. However, note that it comes without proprietary codec support.

The-Compiler··on Qutebrowser 2.0
I agree, all approaches to this have some kind of major drawback. The main pain point with the approach chosen by qutebrowser is probably missing support for WebExtensions (i.e. Chrome/Firefox extensions), though I still hope that'll change with QtWebEngine some day: https://bugreports.qt.io/browse/QTBUG-61676

Other similar projects are using WebKitGTK, or indeed Electron: https://vieb.dev/ - again, probably not better/worse than QtWebEngine, just a different set of problems.

qutebrowser actually has an abstraction layer over the backend (which is why it can support QtWebEngine and the older/outdated QtWebKit, with little effort needed to keep support for the latter). If there is some new kind of library appearing some day which can draw to a Qt window and used from Python, it'd totally be possible to add support for it to qutebrowser without too much effort.

I had hoped for Servo to fill that gap at some point, but so far that hasn't happened yet: https://github.com/servo/servo/issues/27579

Another possibility is for Geckoview to be ported to Desktop platforms some day: https://mozilla.github.io/geckoview/ - something the people behind Tridactyl would like to happen: https://tridactyl.xyz/ideas/#port-geckoview-to-x86_64

As for extensions - other replies to your comment already mention this, but the main problem is that the WebExtension API is very constrained. On top of that, there's no API for handling keyboard input, so those extensions work by injecting JavaScript code handling keyboard inputs into every page you visit. That works, but only barely - lots of hacks are required for those kind of WebExtension limitations, and they won't work on pages where Mozilla decides extensions can't inject JS (such as internal pages or the Mozilla addons page). Again the folks behind Tridactyl have some ideas on how to improve the situation, but so far this hasn't happened yet: https://tridactyl.xyz/ideas/#write-a-keyboard-api-for-firefo...

The-Compiler··on Qutebrowser 2.0
Thanks for the support!

As for sites not working, if there isn't an issue about them yet, please report them! Often all that's needed is either a faked user-agent or a small JavaScript snippet:

https://github.com/qutebrowser/qutebrowser/blob/v2.0.1/quteb... https://github.com/qutebrowser/qutebrowser/tree/v2.0.1/quteb...

The-Compiler··on Qutebrowser 2.0
Like mentioned by toyg in another reply, AV engines are really overzealous when it comes to PyInstaller executables :(

Not much I can do about that, but I opened https://github.com/qutebrowser/qutebrowser/issues/6081 to send a couple of appeals whenever I'm bored enough to do so.

The-Compiler··on Qutebrowser 2.0
Like mentioned by toyg, AV engines are really overzealous when it comes to PyInstaller executables :(

Not much I can do about that, but I opened https://github.com/qutebrowser/qutebrowser/issues/6081 to send a couple of appeals whenever I'm bored enough to do so.

The-Compiler··on Qutebrowser 2.0
> I stopped due to the lack of good ad blocking, but sorely miss the key bindings every day. Will give it a new try now!

Welcome back then! Happy about feedback if you miss something else :)

If qutebrowser isn't for you, there are also various other browser addons you might want to try:

https://github.com/qutebrowser/qutebrowser#similar-projects

The-Compiler··on Qutebrowser 2.0
> It seems to be difficult to generalize about these things. Someone will say that a particular version of a browser leaks memory, or pegs the CPU, and someone else will say that the same version has no problems.

FWIW that's indeed my experience with qutebrowser as well. Everyone seems to have rather different experiences (or expectations?) when it comes to performance and RAM usage. Doesn't exactly make it easier to track issues down, unfortunately.

The-Compiler··on Qutebrowser 2.0
> But I agree about the memory usage, qute uses insane amounts of memory and it gets worse over time, I think this is caused primarily by memory fragmentation in python- but it’s more evident with large memory hungry programs like a browser.

Yeah, something is leaking memory. Unfortunately, nobody has figured out what exactly yet - and everything I've seen so far is not pointing to Python (or qutebrowser) as a culprit:

https://github.com/qutebrowser/qutebrowser/issues/1476#issue...

The-Compiler··on Qutebrowser 2.0
> The latter often leads to the familiar dependency hell when trying to install or upgrade the program.

Can you elaborate?

> I have frequent crashes, it’s slow at rendering pages, it uses more memory than (for example) chromium and seems to leak memory; any kind of CSS animation causes the CPU to have a major workout.

Those are indeed most likely caused by the underlying QtWebEngine in some way - though there also have been some performance improvements in qutebrowser itself, with some more planned: https://github.com/qutebrowser/qutebrowser/issues?q=is%3Aope...

> After one upgrade most video stopped working.

If you installed qutebrowser outside of Ubuntu's packages, that might be caused by the prebuilt Qt lacking proprietary codec support.

Despite that, it's what I'd recommend if you're on a Ubuntu LTS with often grossly outdated Qt versions: https://github.com/qutebrowser/qutebrowser/blob/master/doc/i...

> I never cared about the ad blocker, as I use a hosts file for that. Why doesn’t everyone? It seems to be a better solution.

That's essentially what qutebrowser did before this release as well - but many ads and trackers are served from the visited page directly rather than a third-party host.

The-Compiler··on Qutebrowser 2.0
> Zero configuration or reading docs and most of the default keybindings just stick. It's smooth and minimal and so far things render great.

Yay! Discoverability and being intuitive are indeed things I try to keep focusing on - if you have any suggestions I'm all ears!

> Visual/caret mode seems a bit wonky with input elements but I may just have to read up on it a bit.

It's based on Chromium's caret mode code (in JS): https://chrome.google.com/webstore/detail/caret-browsing/fkl...

I think a better alternative for input elements would be to have vim emulation instead: https://github.com/qutebrowser/qutebrowser/issues/827

The-Compiler··on Qutebrowser 2.0
> Love using qutebrowser. Really an amazing opensource browser! The only extension necessary for me was adblocking and now it's even better!

Yay, glad to hear that!

> I did/continue to have issues with qt-webengine though, like 144hz monitor with qt webengine is limited to 60hz but these things are unrelated to qutebrowser.

I'm assuming you're already aware of it, but for context, here's the related Qt bug: https://bugreports.qt.io/browse/QTBUG-76006

> In fact most of my "bugs" can be related to upstream qt webengine and wayland support. I feel bad for the authors of qutebrowser for so often getting issues that is actually an upstream bug in qt.

It's not that bad, qutebrowser also has more than enough bugs on its own :D

Jokes aside: If I can reproduce something myself, I'll gladly report it upstream. If possible in any way, I'll add a workaround to qutebrowser. Sometimes neither is the case, then I'll close those bugs asking the reporter to report them upstream directly.

> It doesn't help that qt webengine work is rather slow (imo)

Yeah, it is. It's a relatively small team working on QtWebEngine, and even just keeping up with Chromium changes (and backporting security fixes) is a monumental task. When they update their Chromium snapshot (a subset of the entire Chromium tree), often there are millions of changed lines, and I've heard they regularly need around a person-month or so to adjust their stable API to those changes.

Still, there are only very few alternatives to it, and there's no way qutebrowser could shoulder this kind of work directly (by e.g. being based on Chromium's source, something people did suggest in the past).

> There's magic about pressing "o" and typing in what you want to search from history or Google which is so fast and efficient. I have tried similar setups on other browsers but in qutebrowser the search algos are so simple and snappy, it works great. My colleagues sometimes were amazed at how fast I could navigate across the browser all thanks to this great software

Hehe, yeah! There's a lot of logic people want to add to that (e.g. sorting by frequency weighed in rather than just recency), but all of that has the potential of making things much less snappy. I kind of like the simple approach, but I'm also open to improving it if it can yield even better matches without sacrificing performance. It's a hard balance to strike sometimes.

> Thank you qutebrowser!

You're welcome!

The-Compiler··on Qutebrowser v2.0.0 released, with support for Brave's Rust adblocker
Fixed now! https://lists.schokokeks.org/pipermail/qutebrowser-announce/...
The-Compiler··on Qutebrowser v2.0.0 released, with support for Brave's Rust adblocker
You were faster than my release announcement :D

(Still struggling with the macOS release because of connectivity issues at the hoster's side from what it seems)

The-Compiler··on I3: Improved Tiling Window Manager
I love this comment :)

As for adblocking, I wouldn't recommend jblock (it's rather buggy from what I've seen so far) - but a built-in adblocker based on Brave's Rust library is almost ready now: https://github.com/qutebrowser/qutebrowser/pull/5317

The-Compiler··on Starting January 4 Google will block sign-ins from embedded browser frameworks
FWIW Google already did this back in 2019, without any announcement - at that point, I added a workaround, which I hope will continue to work: https://github.com/qutebrowser/qutebrowser/issues/5182
The-Compiler··on Starting January 4 Google will block sign-ins from embedded browser frameworks
FWIW Google already did this back in 2019, without any announcement - at that point, I added a workaround, which I hope will continue to work: https://github.com/qutebrowser/qutebrowser/issues/5182
The-Compiler··on Windows 10 is now nagging users with full screen Microsoft Edge ads
You're giving me evil ideas for a new "feature" in qutebrowser for the next April's Fools.

(Though it has too many users nowadays to do those kinds of shenanigans - a couple of years back with only a handful of users, I added some code to rotate all websites by 2 degrees or so on April 1st... fun times.)

The-Compiler··on Look ma, no mouse: Vimium
Extensions are tied to the browser pretty tightly (think UI, bookmarks, open tabs access, etc. etc.), while QtWebEngine (which qutebrowser uses) uses a more low-level part of Chromium which only shows a single tab (the so called "content API").
The-Compiler··on Tridactyl: A Vim-like interface for Firefox
Thanks! I added a comment to a somewhat related issue: https://github.com/qutebrowser/qutebrowser/issues/2836
The-Compiler··on Tridactyl: A Vim-like interface for Firefox
Yep, qutebrowser should also have some more hinting modes :D https://github.com/qutebrowser/qutebrowser/issues/521

You can't really write Python well inline (as an oneliner), so custom hints would look a bit different in qutebrowser, as a separate Python extension which would be loaded from a file: https://github.com/qutebrowser/qutebrowser/issues/30

I agree it'd be great to have a bit more flexibility with regards to hinting actions!

The-Compiler··on Tridactyl: A Vim-like interface for Firefox
Thanks! I added a comment to the relevant qutebrowser issue: https://github.com/qutebrowser/qutebrowser/issues/71
The-Compiler··on Tridactyl: A Vim-like interface for Firefox
And a handful more: https://github.com/qutebrowser/qutebrowser#active (Vimium-FF, Vim Vixen, VVimpulation, Krabby)
The-Compiler··on Tridactyl: A Vim-like interface for Firefox
For at least some of those, there are plans to add support natively to qutebrowser:

Containers: https://github.com/qutebrowser/qutebrowser/issues/4102

Better adblocker: https://github.com/qutebrowser/qutebrowser/pull/5317

I'm still not sure what exactly Privacy Badger really does under the hood, but I suspect much of it won't be possible with QtWebEngine's API.

Not sure about Cookie Auto Delete - I fear it's not possible to implement either, but I'm not entirely sure, I've always found the QtWebEngine cookie APIs quite confusing so I'd need to take a closer look.

The-Compiler··on Tridactyl: A Vim-like interface for Firefox
Yup - note the built-in adblocker is very basic at the moment (just a list of blocked hosts which doesn't block e.g. YouTube ads or ads served from the main domain of a page).

This is going to change soon, however, with a new adblocker based on Brave's: https://github.com/qutebrowser/qutebrowser/pull/5317

The-Compiler··on Tridactyl: A Vim-like interface for Firefox
Can you elaborate? Maybe there's something to learn for qutebrowser's hint implementation :)
The-Compiler··on Tridactyl: A Vim-like interface for Firefox
FWIW there are userscripts to integrate password management with qutebrowser: https://github.com/qutebrowser/qutebrowser/tree/master/misc/...

What are you using for device synchronization? Something like Syncthing/Nextcloud?

The-Compiler··on Stupid solutions: Live server push without JS
Works for me. Perhaps you're using an older Qt version?
The-Compiler··on Emvi Is Out of Beta
Doesn't seem to be qutebrowser specific. I only see a date and nothing more on that page, no matter what browser I use (qutebrowser, Firefox, Chromium)
← PreviousPage 3 of 6Next →