Show HN: Nyxt Browser 2.0.0
nyxt.atlas.engineer
nyxt.atlas.engineer
The concern that I have is that there's going to be a learning curve to picking this up. Normally, that's fine, but this is my browser. I live in the thing and there's no other piece of software outside of my IDEs that affects my productivity more. When I took the time to learn VIM a few years ago, retrospectively, I could have about spent half as much time learning it as I did and skipped a handful of things I don't use. The tone isn't meant to be negative -- that 50% is tremendously useful and it's rare that I don't over-learn something (I enjoy it).
I'm hoping someone who uses Nyxt as their "primary browser"[0] might be able to provide their thoughts on any of my questions --
I use VIM/VIM plug-ins, but Firefox; what's the experience of becoming proficient with Nyxt?
Is there any tool/first-timer/quick-start that works better/worse for acquiring the muscle-memory?
Outside of "keyboard" ... As a full stack web developer (various front-ends, mostly .NET web FWIW), what are the "big reasons" that I want this (killer app?)? Put other ways: Are there any interesting "one-liners"[0] that solved real problems developing web-sites? Is there any feature that is so amazing that you agonize over it not being available when you're not on your own hardware?
Basically, I'm trying to answer (for myself) whether or not it's worth the effort to explore integrating this into my work tooling, so I'd love any other input.
[0] I've not used the product; I'm referring to its programmability -- I can see its use (and do this, today, kludg-ily) -- but I'm wondering if there are any use cases that were surprisingly "magical".
One thing I’ve always wanted is a way to sync cookies between my browser and curl, something like that would be relatively trivial in Nyxt, assuming it exposes APIs for managing cookies (and if it doesn’t, I’d imagine it would be easy to add).
I can easily imagine myself writing little functions like I do in Emacs to automate various things, like iterating over all my tabs and shoving their URLs into a text file, or searching through the content of all open tabs, or adding little menu shortcuts like “append this highlighted text to an email message text box in another tab”, or “take the highlighted text, construct a new URL based on it, and open it in a new tab”. I do these kinds of things all the time in Emacs and I love it, I would be excited to use a browser with the same ease of extensibility.
I can also imagine, if the community is large enough, that people smarter than me will come up with libraries for Nyxt that blow my mind. This always happens to me when a powerful tool is combined with a strong community.
I had a similar experience as you describe, where I first heard about it a couple of times, but backed off from the learning curve.
Eventually, I was fed up with the second-class-citizen state of keyboard bindings in Firefox and Chrome via Vimium/VimFX. I think the XUL "deprecation" effort was the final straw for me. I remembered browsing with Opera years ago, around version 4.x or 5.x, when keyboard bindings were first-class in Opera. I decided to lean in and do it.
It took me about three days of retraining myself and looking into the cheatsheet on a regular basis before I became productive, and a bit longer to really feel an improvement over the previous ways. But now I would never go back, and I loathe having to open Chrome for slow heavy sites (it's still faster.)
I really feel like I'm in a whole new world of browsing, where the browser really works for me and helps me access the information as quickly as imaginably possible.
It's one of the most "futuristic" things I've experienced, just pressing the keys on the keyboard, a bunch of "gibberish" appearing in my screenkey feedback, and the browser dancing around the pages, doing exactly what I want (except when I accidentally start typing out of insert mode.)
- first, there's a simple file manager in Nyxt (Webkit's), the open file command is bound to C-x C-f, just as in emacs, so it's at easy reach. We can open a directory view, an HTML file, a video in Nyxt. I wrote a snippet to dispatch to the right application depending on the extension. There was no such thing buit-in, but I could add it. Similarly, I added a command (M-x open-home-directory) to open the home directory. It's easy to write such simple commands.
- there's a built-in git cloner (I contributed it, uh). M-x git-clone and it asks for a directory. I can open a file or directory with emacsclient.
- we can write hooks: I have one to open reddits links in old.reddit.
- I have M-x download-video (built-in maybe?) that fires youtube-dl.
- I have M-x fip-radio-save-current-playing-song, that scrapes the song data on the radio's website and saves it in a text file. I can view them in HTML, I can M-x listen-saved-song, that searches it on youtube (it could find on a directory if I already have it).
=> they are little things that I usually do in a terminal that I now do in a browser. Nyxt gives me a nice fuzzy completion prompt for any list of strings, it gives me the possibility to print rich text, etc.
There's something I didn't manage to do yet but am wanting very much, is to be able to react to Webkit web events. Last time I checked they were not exposed on Nyxt, only on the C side. I would react to button clicks, I would add new buttons on the page and react to them. That'd be awesome.
All this is written in Common Lisp, that is strange at first (rest assured, you're normal), but it's a great language with a long history of industry use, so it's solid and it's good to have it on my toolbet. I am now lauching new services in CL rather than in Python, that is so slow, unstable and error prone.
my snippets: https://github.com/vindarel/next-init.lisp/ (outdated, I didn't follow the latest changes)
other great config: https://github.com/tviti/next-cfg/ and https://github.com/tviti/next-notebook (interface with Jupyter)
An honest comparison with Python, workflow and ecosystem: https://lisp-journey.gitlab.io/pythonvslisp/ (mine)
This is probably a bad analogy, but forty years ago Lisp Machine subsumed the operating system. In modern times, in some sense the web browser is like an operating system layer, or at least a portable application platform. So, my bad analogy is that Nyxt is like a Lisp Machine.
If I have time, I will try to build from source today. I just reread the dev source install instructions, and it does look straight forward. Hopefully being on a M1 MacBook won’t affect the build process.
I’ve tried Nyxt a few times but I find it quite difficult to hack on, at the time it required an elaborate Emacs + SLIME + Common Lisp setup…I don’t use CL very much so it was a lot of work and quite fragile. I hope they can get editing bootstrapped into Nyxt so that I can modify it in Nyxt itself instead of a bunch of complicated external tooling. As it stands, there’s too much friction for me to hack on it.
Regardless, tons of promise and I’m eagerly following its development!
> New simple built-in editor capabilities so that you can easily script Nyxt without opening up an external editor.
(last screenshot)
Yup, there are quirks from what I'm used to with Firefox + vimium but with Nyxt 1) I can actually understand and modify the code, and 2) it's delightful to have a browser I can use so keyboard-centrically
One of the last gaps for me is being able to use a yubikey from Nyxt, but there's an open issue in the repo which feels accessible :)
You can also check out our FAQ https://nyxt.atlas.engineer/faq
2. I just built nyxt from source on debian testing - make all works, but make install fails with
Unhandled SB-INT:SIMPLE-FILE-ERROR in thread #<SB-THREAD:THREAD "main thread" RUNNING {10018782D3}>:
Can't create directory /usr/local/share/applications/
I can invoke the browser from the build directory.3. Is there a way to clear things like history, cookies, form data, and saved passwords (either immediately or automatically when the browser is closed)? It's what I do with firefox. Also, is there a way to automatically clear the cached stuff in ~/.cache/nyxt?
I'll check the manual about hooks. Thanks.
The FAQ says it can run on either WebKit/WebEngine (Blink) – how does it decide? Which is the default, and are there tradeoffs to using one or the other with Nyxt specifically?
What JS engine is used?
I'd be pleased if a Servo hacker stepped up and did this.
Also, is there a way to securely interface with things such as keepassxc without leaking secrets while piping stuff?
As per block mode, it can block stuff by predicates, URLs, and any logic you like.
Is it available through guix?
https://guix.gnu.org/en/packages/nyxt-2.0.0/
If "guix search nyxt" does not work, perhaps you need to 'guix pull'?
Nyxt Browser - https://news.ycombinator.com/item?id=26509612 - March 2021 (125 comments)
Nyxt browser: mouseless cpy/paste - https://news.ycombinator.com/item?id=25956152 - Jan 2021 (56 comments)
Dashboard for Nyxt - https://news.ycombinator.com/item?id=25151976 - Nov 2020 (2 comments)
Nyxt Browser 2.0.0 Pre-release - https://news.ycombinator.com/item?id=24353927 - Sept 2020 (11 comments)
I'm thinking of adding code to macroexpand any links that people post to previous HN threads into the same format that you see here: "Title - <url> - mm/yy - (number of comments)". I'm not typing that shit out manually :)
I will be very happy if someone can list down the most important features that are lacking in Nyxt.
I love seeing more keyboard driven software!
But, that is speculation, and I have no proof whatsoever other than tangential conclusions from Mozilla's blunders in recent years.
The only upside for Mozilla is that making Gecko available is the right thing to do. Which, for a nonprofit, matters, and I'm sure that having an Electron-equivalent is the kind of thing that would be considered cool by staff.
But there is the downside that it makes it easier to build browsers which would compete with Firefox for the shrinking niche that is "doesn't run Chrome or Safari". I guess you could make a case that such browsers would take at least as much share from Chrome as Firefox, maybe more even; but you could make the other case as well.
When you add the additional downside that it's probably many man-decades of work to do it at all, well, then it doesn't happen. Although the existence of GeckoView implies that Firefox and Gecko aren't as tightly coupled as they could be.
Chrome team was advcied very early in their development by none other than Android team to go for WebKit because it was easier to work with. Not Presto, not Gecko. So at least since back then, thud feature was at least somewhat on Apple's list of priorities. I'm not sure if it got carried over from KHTML, but if it did, they didn't break it intentionally.
Back in IE horror days I remember using Avant Browser. It used IE to provide fancier features like tabs. I never remember Gecko anywhere in discussion for being a platform to build on top of, except for other Mozilla projects (FFOS, Thunderbird) that Mozilla dropped sooner or later.
There was supposed to be an alternate way to do it (running with ‘firefox -app’ or something), but it was poorly documented and constantly breaking in new versions, so I eventually gave up.
AFAIK the only thing around nowadays is GeckoView [2] for Android.
[0]: https://github.com/mozilla/positron [1]: https://mykzilla.org/2017/03/08/positron-discontinued/ [2]: https://mozilla.github.io/geckoview/
Even their own developers were disappointed when they changed direction.
I was working on replacing QtWebEngine(chromium) for Qutebrowser with Servo. It is very far from ready, most websites do not render correctly and JavaScript is very hit/miss with regards to updating the rendered view.
Simply put: Servo is not possible to use as a daily driver.
I often argue against purely natural language specifications in favor code based specs. I just don't think human language is nearly precise enough to write an adequate specification. Natural language words are incredibly polysemic and contextual. Look, for example, at how many meanings the word "break" has: https://www.merriam-webster.com/dictionary/break
Kolmogrov has long ago suggested that fully specified information distills down to a computer program: https://en.wikipedia.org/wiki/Kolmogorov_complexity, https://en.wikipedia.org/wiki/Minimum_description_length
The ideal language for a pure specification might be a mix of natural language and pseudo code with a pseudo test suit. However, if you are writing that, you might as well go one step further and write working testable code.
I like the concept of Literate Programming (https://en.wikipedia.org/wiki/Literate_programming) and its descendants of having code with extractable inline comments that auto generate documentation. I would argue that modern pull request based workflows that tie discussions to version controlled code changes are also the progression of this line of thought. A cleaned up version of these might make sense for a specification.
And I get some of the concerns. While natural language under specifies, reference implementations over specify. This is more of a problem with low level languages however. Modern high level languages are getting fairly close to a form of pseudo code. I fully agree that the reference implementations shouldn't contain or should hide, low level optimizations. I also understand that reference implementations can unduly tie specs to specific hardware, OSs and platforms.
But to me, over-specification is less of a problem than under-specification and it can be mitigated by labeling particular functions or blocks of code as implementation specific and not part of the spec.
Without spec written in code, the different implementations always have subtle incompatibilities. I see egregious versions of under-specification in government where horrendously vague specs are created in order to issue RFPs for getting software built. They usually end up with non working software at mind blowing cost.
People have this weird misconception that you are contracting out to build software. You are not. Building software is really easy. You press the build button or type the compile command. Building software has been fully automated for a while now. What is difficult is designing software and specifying what it must do. This is because there is a vast jungle of protocols, business flows, hardware and software platforms that need to be interacted in different ways for different needs. This is what needs to be specified and only computer code can do it adequately.
I wish that Mozilla adopted the chromium core. We really need a well funded non-profit managed release of the reference browser.
My only concern is that one ends up with something like TeX, written in a long-obsolete dialect of Pascal, requiring a translation layer to convert the source into a more relevant language (C).
Does it support customizing the interpretation of HTML and CSS? Is the web developer console implemented (it is useful for end users too, not only web developers)? Is there a split-screen mode? Can it auto-generate a table of contents? Is the jar: URI scheme supported (I used this to view EPUB files)? Form data saving to local files? Footnotes? Relative URL entry? JavaScript Date spoofing? ARIA view? Regular expression search? Better file selection? Can HSTS be disabled? Animation control? SQL (another way of sorting/filtering tables, copying them to external files, etc)? Adding or changing MIME type handlers? Does it pretty print JSON files? Disabling sounds is implemented, but can you adjust the volume or divert the sound to an external program (that will receive the audio on stdin)? Disabling scripts is implemented, but can you "partially disable" scripts (so that some APIs work and some don't or have a different behaviour)? Can you define your own character encodings? Is there any way to use extensions written in C?
Some of the things I listed might already be implemented, and some can probably be implemented easily enough in Lisp, but some might be more difficult to do.
There are a lot more things I would have it done differently, requiring probably modifying the engine significantly from common web browsers, I would guess.
Was just wondering. From the FAQ there are no links or indications on how to configure it in Vi mode.
Also the FAQ mentions the manual/tutorials for „here‘s how you configure it“.
maybe I missed sth. Being on a small screen (phone). Yet I was just interested in how the configure / change to vi worked and could not find that on the website.
Recommend to add links to the FAQ. Is there somewhere a quick how-to/setup for the vi mode and maybe a walkthough of cool features? (Found qutebrowser way more accessible and stayed with it so far)
Edit: typos
[0] https://nyxt.atlas.engineer/static/image/article/visual-mode...
Is a favorite of mine.
First, I want to programmatically control what I see on some websites. For example, facebook, linkedIn, or more websites are too distracting, so I'd like to directly fetch some information from them with my signed-in accounts.
Second, I am a Common Lisp lover.
Many of the websites we use these days are so link-heavy (or just not designed with keyboards in mind?) that pressing f, parsing the characters of the link I want, and then typing them, is still slower are at least more mental effort than using the mouse.
I'm already looking at a link when I want to 'click' it, so bringing up the shortcuts puts the relevant one right in the center of my vision. I don't know if it was faster (I have the same question about vim!) but it was fast enough, and more satisfying.
Then again, the point of my i3/qutebrowser/etc box was to be keyboard-centric, and I would use it with a "the mouse is lava" philosophy. I should really stand that box up again; too much macOS is bad for the soul...
A major thing that puts me off using it is that it does not have a dark mode. I hope that will come with ability to use some chromium or firefox extensions.
The post and the theme link explains how to create a theme, but not if the dark one shown is available in stock installation.
Also the code for that theming article doesn't really work, but if you fiddle with it you can get it going somewhat.
I say play with it for a few minutes :)
Yup, my attention was just grabbed
https://github.com/atlas-engineer/nyxt/blob/master/source/bl...
Is uBlock Origin style blocking a priority? NoScript?
They only have 8 developers on the team. I wish them well, but what do they have to offer that vendors and consumers really need? Do people really complain about Chromium being too slow? I wouldn't imagine, if most of the users on the web are using it. Then again I don't know about the niche mysterious world of elite internet browsing.
Also does this fit as an emacs package?
It doesn't run on emacs, though you can connect to a running instance with emacs.
No? Then forget it.
But I think I'm beginning to realize more concretely what they mean about potential security issues with Nyxt and the way it reuses engines from other browsers.
I think it's something like this: some functions in engines written for other browsers may assume that they will only be called from other parts of the browsers they're designed for, or similar browsers. They may assume some inputs are safe, or that they'll only be invoked in the context of a sandbox or whatever. That assumption may hold in their original uses, but Nyxt could expose them to novel uses where those assumptions are untrue, and that could have security implications.
I think maybe this is the reason that GP assumes Google might go out of their way to break compatibility or discourage the use of their engine with Nyxt.
I guess what I'm left wondering is: is it obvious that this would be a negative for Google or Apple or whomever? Why would we expect the security fixes needed for calling some functions in unexpected contexts to get in the way of the engine developers?
How could you see that relationship playing out, if Nyxt exposes vulnerabilities in these engines that aren't reachable from the browsers they're designed for?