Next browser – web browser in Common LISP
next.atlas.engineer
next.atlas.engineer
Seriously, a web browser which is capable of running the decades of elisp out there would be basically the only tool I need on my desktop: text editor, web browser, mail reader, git client, console, shell, calculator, diary, organiser. Boot directly into that and life would be perfect.
You can use the SLIME Emacs extension to connect to a running instance of the Next browser. Then, you have complete programmatic access to the full browser data structure through a REPL in Emacs (eg: switching tabs by using shortcut/command in Emacs). And Lisp REPLs are awesomer than something like ipython!
Keyboard driven browsing is now the least imaginative thing possible.
Take the high-quality tools you have for processing text, and apply that to your browsing workflow! Imagine being able to integrate your browsing workflow with your information management system, eg: org-mode. Switch to a project, and with a couple of keystrokes, open the relevant links on a page in a set of browser tabs/buffers. Filter all the HN pages in your browser and bookmark them to a text file (to be resumed later). Save all arXiv pages to your reference management system (eg: bibtex), etc. When browsing webpages, evaluate code blocks (via Emacs). Download/cache videos for all all Youtube tabs you have open. Emacs becomes the IFTTT-like glue for all your browsing activity!
For some chatter/ideas along these lines, take a look at this Github discussion: https://github.com/atlas-engineer/next/issues/195
The last time I played with the Next Browser, I loaded it from source and in principle all your ideas are doable. Please post a link if you implement something and writer it up.
I'm also given to understand that the Next codebase is currently undergoing significant refactoring, so I hope to delve into this more once the internals have stabilized.
If somebody has a complementary outlook/background, I'm happy to be baited into discussion and activity. As they say, two people together may be thrice as effective.
> Imagine being able to integrate your browsing workflow with your information management system, eg: org-mode.
Is this better than alt-tabbing between your browser and your note taking app?
> Save all arXiv pages to your reference management system (eg: bibtex)
All? Which? What would this workflow look like?
> When browsing webpages, evaluate code blocks (via Emacs) > Filter all the HN pages in your browser and bookmark them to a text file
How many times is this useful, really?
> Download/cache videos for all all Youtube tabs you have open
youtube-dl?
> Emacs becomes the IFTTT-like glue for all your browsing activity!
Why is this good?
Eventually we would like to make our own web-renderer, but we recognize that it is a lot of work, and a bit away
OK, looking through the README in the ports/ directory, I see this:
> Next is made of two programs:
> The Lisp core which offers the user full control over the browsing. It’s 100% Common Lisp.
> The “platform port”, which only purpose is to display a window with two components: the minibuffer and the web view.
> The two parts communicate via D-Bus, an RPC system. The Lisp core sends a D-Bus request to the platform port (for example, “open this URL”); the platform port acts upon it and sends a D-Bus response back to the Lisp core.
So you've put the WebKit stuff into another process, but your browser is WebKit based, unless I completely misunderstood what I just read. You couldn't use Next to drive Firefox, for example, without some interesting re-writes on the Firefox end.
(Just to make it abundantly clear: I think this is a really neat hack and a good way to separate concerns, but the way you phrased things confused me until I dug into the README you linked to and read some source code.)
Of course, writing a text-based browser in Lisp or any other language is far simpler but also less practical.
Emacs has a few; the included one is called “ewww”, and is pretty nice if you’re into emacs already.
But it’s already a lot more than a “Webkit shell”, e. g. see https://github.com/atlas-engineer/next/blob/master/source/re...
(what-is-p wrong (with 'that))
More seriously, there's also the security angle with browser, that using an independently developed engine has certain advantages.
The keyboard driven navigation using search to flip between tabs and the tree structured history is interesting. Also, as always, I am happy to see people using Common Lisp for implementing creative ideas! Off topic, but I have been using Common Lisp professionally since 1983 and the first book I ever wrote was a Common Lisp book for Springer Verlag. It has been a fun ride.
Thanks for this project!
Edit: one example but I’ve found Vimium — while great — falls short due to “the platform.”
Anyone out there with a good idea of how serious a risk this is?
Edit - I mean, it sounds very serious, so I don't really want to run it on OSX. That said, I woudn't mind knowing if I am being overly careful here.
Nonetheless, congratulations on your project! It is already a big accomplishment!
See for example Redox. The whole point is to build an operating system in Rust because of the language safety, which allegedly trickles down to more safety in the user space.
Or PyPy, whose whole point is that it's written in Python.
Re. Pypy, the advantage of “the language you like written in the language you like” is also pretty immediate.
My point being, dont leave the target of the message do the work of researching and understanding. Just selling the language is normally not enough.
Why is it important to call out the fact that is in [lang]?
https://atlas.engineer/technical-article/why-lisp.org
it also contains some nice links at the bottom to further articles. I'd be curious to know your opinion, thanks!
Hopefully this is or something else will be able to take it's place and eventually implement basic features that for some reason or another no current web browsers have: tiling frames, emacs keybindings, and a powerful extension language that allows for the modification of core structures (analogous to elisp for emacs).
One nitpick though: I feel like you should be able to open a new buffer with C-x C-f, and maybe open in the same buffer with C-x f? C-l in emacs centers the text on where your cursor is, so using that and M-l to open links/buffers feels a little odd.
Edit: Also, I don't know if you maintain the AUR package. But I had to install libfixposix manually as it wasn't listed in the dependencies and had to restart the compilation from the sbcl debugger.
Feel free to add new keybindings in your init.lisp file :) Its just as hackable as Emacs :)